50 lines
2.5 KiB
TypeScript
50 lines
2.5 KiB
TypeScript
/* Metro module 13287; source: modules/unique_usernames/UniqueUsernamesUtils.tsx; dependencies: [4242, 13282, 1244, 2] */
|
|
function _fun101309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13477:6, offset: 0x02210471, size: 96 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/unique_usernames/UniqueUsernamesUtils.tsx');
|
|
exports.formatUsernameLiveCheckValidation = formatUsernameLiveCheckValidation;
|
|
}
|
|
|
|
function formatUsernameLiveCheckValidation(a0) { // fn#101310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13477:211, offset: 0x022104d1, size: 260 bytes, params: 2, frame: 21
|
|
let value = require(4242) /* metro dependency 4242 */;
|
|
value = value.match(a0);
|
|
value = value.with({rateLimited: true}, function() {
|
|
var object = {};
|
|
object.type = require(dependencyMap[1]).NameValidationState.RATE_LIMIT;
|
|
object.message = require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.T15lqn);
|
|
return object;
|
|
});
|
|
const P = (require(4242) /* metro dependency 4242 */).P;
|
|
const not = P.not;
|
|
const P2 = (require(4242) /* metro dependency 4242 */).P;
|
|
value = value.with({error: Reflect.apply(not, P, [P2.nullish])}, function({error}) {
|
|
var object = {};
|
|
object.type = require(dependencyMap[1]).NameValidationState.ERROR;
|
|
object.message = error;
|
|
return object;
|
|
});
|
|
value = value.with({taken: false}, function() {
|
|
var object = {};
|
|
object.type = require(dependencyMap[1]).NameValidationState.AVAILABLE;
|
|
object.message = require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.PgfBSx);
|
|
return object;
|
|
});
|
|
value = value.with({taken: true}, function() {
|
|
var object = {};
|
|
object.type = require(dependencyMap[1]).NameValidationState.ERROR;
|
|
object.message = require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.mCrAUb);
|
|
return object;
|
|
});
|
|
value = value.with({error: P.nullish}, function() {
|
|
var object = {};
|
|
object.type = require(dependencyMap[1]).NameValidationState.INTERNAL_ERROR;
|
|
object.message = '';
|
|
return object;
|
|
});
|
|
return value.otherwise(function() {
|
|
});
|
|
}
|
|
|