Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,149 @@
|
||||
/* Metro module 13285; source: modules/unique_usernames/UniqueUsernamesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1393, 672, 566, 694, 2] */
|
||||
function _fun101282(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:6, offset: 0x0220f6ba, size: 494 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
({'taken': null, 'error': null, 'rateLimited': true}).error = undefined;
|
||||
object2 = {'validations': null, 'currentUsernameInvalid': false, 'retryAfterTime': null};
|
||||
let value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value({'max': 100, 'maxAge': 60000});
|
||||
object2.validations = value;
|
||||
object2.suggestions = {migration: {'suggestion': null, 'fetched': false, 'usernameSuggestionLoading': false,
|
||||
suggestion: {username: undefined}}, registration: {suggestion: {username: undefined}, source: undefined,
|
||||
fetched: false}};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun101286(Store).displayName = 'UniqueUsernamesStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{UNIQUE_USERNAME_ATTEMPT_SUCCESS: UNIQUE_USERNAME_ATTEMPT_SUCCESS,
|
||||
UNIQUE_USERNAME_ATTEMPT_FAILURE: UNIQUE_USERNAME_ATTEMPT_FAILURE,
|
||||
UNIQUE_USERNAME_SUGGESTIONS_RESET: UNIQUE_USERNAME_SUGGESTIONS_RESET,
|
||||
UNIQUE_USERNAME_SUGGESTIONS_SUCCESS: UNIQUE_USERNAME_SUGGESTIONS_SUCCESS,
|
||||
UNIQUE_USERNAME_REGISTRATION_SUGGESTIONS_SUCCESS: UNIQUE_USERNAME_REGISTRATION_SUGGESTIONS_SUCCESS});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/unique_usernames/UniqueUsernamesStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_101283() { // fn#101283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:148, offset: 0x0220f8a8, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_101283_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun101286(a0) { // fn#101286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:655, offset: 0x0220f90a, size: 255 bytes, params: 2, frame: 16
|
||||
const closure = UniqueUsernamesStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'isRateLimited', value: value_101288}, {key: 'validate', value: value_101289},
|
||||
{key: 'registrationUsernameSuggestion', value: value_101290}, {key: 'usernameSuggestion', value: value_101291},
|
||||
{key: 'usernameSuggestionLoading', value: value_101292}, {key: 'isCurrentUsernameInvalid', value: value_101293},
|
||||
{key: 'wasRegistrationSuggestionFetched', value: value_101294}, {key: 'wasSuggestionsFetched',
|
||||
value: value_101295}]);
|
||||
}
|
||||
|
||||
function UNIQUE_USERNAME_ATTEMPT_SUCCESS({username, taken}) { // fn#101296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1969, offset: 0x0220fb63, size: 50 bytes, params: 2, frame: 14
|
||||
const validations = env0_8.validations;
|
||||
validations.set(username, {taken: taken});
|
||||
}
|
||||
|
||||
function UNIQUE_USERNAME_ATTEMPT_FAILURE({username, error, statusCode, retryAfter}) { // fn#101297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:2099, offset: 0x0220fb95, size: 255 bytes, params: 2, frame: 19
|
||||
var validations;
|
||||
if (statusCode === 429) {
|
||||
env0_8.validations.set(username, {'taken': null, 'error': null, 'rateLimited': true, error: error},
|
||||
(retryAfter ?? 7) * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
|
||||
} else {
|
||||
validations = env0_8.validations;
|
||||
validations.set(username, {taken: null, error: error});
|
||||
}
|
||||
if (retryAfter != null) {
|
||||
env0_8.retryAfterTime = global.Date.now() + retryAfter * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
|
||||
}
|
||||
}
|
||||
|
||||
function UNIQUE_USERNAME_SUGGESTIONS_RESET() { // fn#101298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:2432, offset: 0x0220fc94, size: 87 bytes, params: 1, frame: 6
|
||||
const binding = env0_8;
|
||||
binding.suggestions.migration = {'suggestion': null, 'fetched': false, 'usernameSuggestionLoading': false,
|
||||
suggestion: {username: undefined}};
|
||||
binding.suggestions.registration = {suggestion: {username: undefined}, source: undefined, fetched: false};
|
||||
}
|
||||
|
||||
function UNIQUE_USERNAME_SUGGESTIONS_SUCCESS({suggestion}) { // fn#101299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:2695, offset: 0x0220fceb, size: 87 bytes, params: 2, frame: 6
|
||||
env0_8.suggestions.migration = {'suggestion': null, 'fetched': true, 'usernameSuggestionLoading': false,
|
||||
suggestion: suggestion};
|
||||
if (suggestion?.invalid_current_username === true) {
|
||||
env0_8.currentUsernameInvalid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function UNIQUE_USERNAME_REGISTRATION_SUGGESTIONS_SUCCESS({suggestion, source}) { // fn#101300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:2968, offset: 0x0220fd42, size: 112 bytes, params: 2, frame: 15
|
||||
var validations;
|
||||
env0_8.suggestions.registration = {suggestion: suggestion, source: source, fetched: true};
|
||||
const username = suggestion?.username;
|
||||
if (username != null) {
|
||||
validations = env0_8.validations;
|
||||
validations.set(suggestion.username, {taken: false});
|
||||
}
|
||||
}
|
||||
|
||||
function value_101288() { // fn#101288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:988, offset: 0x0220fa09, size: 55 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return env1_8.retryAfterTime != null && global.Date.now() < env1_8.retryAfterTime;
|
||||
}
|
||||
|
||||
function value_101289(a0) { // fn#101289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1082, offset: 0x0220fa40, size: 98 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_8.validations.get(a0);
|
||||
return this.isRateLimited() && (value2 == null || value2.rateLimited) ? env1_7 : this.isRateLimited() || value2 == null ? value2 : value2.rateLimited ? undefined : value2;
|
||||
}
|
||||
|
||||
function value_101290() { // fn#101290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1278, offset: 0x0220faa2, size: 33 bytes, params: 1, frame: 1
|
||||
return env1_8.suggestions.registration.suggestion.username;
|
||||
}
|
||||
|
||||
function value_101291() { // fn#101291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1377, offset: 0x0220fac3, size: 33 bytes, params: 1, frame: 1
|
||||
return env1_8.suggestions.migration.suggestion.username;
|
||||
}
|
||||
|
||||
function value_101292() { // fn#101292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1480, offset: 0x0220fae4, size: 27 bytes, params: 1, frame: 1
|
||||
return env1_8.suggestions.migration.usernameSuggestionLoading;
|
||||
}
|
||||
|
||||
function value_101293() { // fn#101293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1588, offset: 0x0220faff, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_8.currentUsernameInvalid;
|
||||
}
|
||||
|
||||
function value_101294(a0) { // fn#101294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1679, offset: 0x0220fb0e, size: 58 bytes, params: 2, frame: 3
|
||||
return env1_8.suggestions.registration.source === a0 && env1_8.suggestions.registration.fetched;
|
||||
}
|
||||
|
||||
function value_101295() { // fn#101295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13475:1809, offset: 0x0220fb48, size: 27 bytes, params: 1, frame: 1
|
||||
return env1_8.suggestions.migration.fetched;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 13282; source: modules/unique_usernames/UniqueUsernamesTypes.tsx; dependencies: [2] */
|
||||
function _fun101270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13472:6, offset: 0x0220f20a, size: 120 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/unique_usernames/UniqueUsernamesTypes.tsx');
|
||||
exports.NameValidationState = {AVAILABLE: 'AVAILABLE', ERROR: 'ERROR', RATE_LIMIT: 'RATE_LIMIT',
|
||||
INTERNAL_ERROR: 'INTERNAL_ERROR'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* 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() {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 13284; source: modules/unique_usernames/useUsernameLiveCheck.tsx; dependencies: [31, 13285, 632, 22, 13286, 13287, 2] */
|
||||
function _fun101274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:6, offset: 0x0220f3f3, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const uniqueUsernamesStore = importDefault(13285) /* metro dependency 13285: UniqueUsernamesStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/unique_usernames/useUsernameLiveCheck.tsx');
|
||||
exports.useUsernameLiveCheck = useUsernameLiveCheck;
|
||||
}
|
||||
|
||||
function useUsernameLiveCheck(a0) { // fn#101275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:222, offset: 0x0220f47c, size: 275 bytes, params: 2, frame: 26
|
||||
const value = a1;
|
||||
const value2 = a2;
|
||||
const value3 = a3;
|
||||
const env0_0 = a0;
|
||||
const r8 = !(value !== undefined) || value;
|
||||
const r9 = value2 !== undefined ? value2 : false;
|
||||
const r1 = value3 !== undefined ? value3 : false;
|
||||
const env0_3 = r1;
|
||||
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UniqueUsernamesStore],
|
||||
_fun101276, [a0]);
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UniqueUsernamesStore],
|
||||
function() {
|
||||
return UniqueUsernamesStore.isRateLimited();
|
||||
});
|
||||
const binding = env0_3;
|
||||
binding.useEffect(_fun101280, [r8, value5, value4, a0, binding.useMemo(_fun101278, [r9, r1])]);
|
||||
return binding.useMemo(_fun101281, [value4]);
|
||||
}
|
||||
|
||||
function _fun101276() { // fn#101276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:281, offset: 0x0220f58f, size: 27 bytes, params: 1, frame: 11
|
||||
return UniqueUsernamesStore.validate(env0_0);
|
||||
}
|
||||
|
||||
function _fun101278() { // fn#101278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:376, offset: 0x0220f5bd, size: 54 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return (require(22) /* metro dependency 22 */).debounce(_fun101279, 800);
|
||||
}
|
||||
|
||||
function _fun101280() { // fn#101280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:491, offset: 0x0220f63b, size: 67 bytes, params: 1, frame: 12
|
||||
if (env0_1 && !env0_5 && env0_4 == null && env0_0 !== '') {
|
||||
env0_6(env0_0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun101281() { // fn#101281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:551, offset: 0x0220f67e, size: 60 bytes, params: 1, frame: 14
|
||||
return env0_4 != null ? (require(13287) /* metro dependency 13287: UniqueUsernamesUtils */).formatUsernameLiveCheckValidation(env0_4) : undefined;
|
||||
}
|
||||
|
||||
function _fun101279(a0) { // fn#101279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13474:398, offset: 0x0220f5f3, size: 72 bytes, params: 2, frame: 17
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(13286) /* metro dependency 13286: UniqueUsernamesActionCreators */;
|
||||
return value.attemptUsername(a0, env1_2 ? 'registration' : 'modal', env1_2, env1_3);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 13283; source: modules/unique_usernames/useUsernameStatus.tsx; dependencies: [57, 31, 13284, 2] */
|
||||
function _fun101271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13473:6, offset: 0x0220f282, size: 133 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/unique_usernames/useUsernameStatus.tsx');
|
||||
exports.useUsernameStatus = useUsernameStatus;
|
||||
}
|
||||
|
||||
function useUsernameStatus(a0) { // fn#101272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13473:216, offset: 0x0220f307, size: 167 bytes, params: 2, frame: 20
|
||||
let value = a1;
|
||||
const value2 = a2;
|
||||
const value3 = a3;
|
||||
const env0_0 = a0;
|
||||
const value4 = undefined;
|
||||
const r9 = !(value !== value4) || value;
|
||||
const r7 = value2 !== value4 ? value2 : false;
|
||||
const r5 = value3 !== value4 ? value3 : value4;
|
||||
let env0_3 = value4;
|
||||
const value5 = (require(13284) /* metro dependency 13284: useUsernameLiveCheck */).useUsernameLiveCheck(a0, r9, r7);
|
||||
const env0_2 = value5;
|
||||
const binding = env0_3;
|
||||
value = env0_2(binding.useState(value4), 2);
|
||||
const property = value[0];
|
||||
env0_3 = value[1];
|
||||
binding.useEffect(_fun101273, [value5, a0, r5]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun101273() { // fn#101273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13473:347, offset: 0x0220f3ae, size: 69 bytes, params: 1, frame: 12
|
||||
if (env0_0 === '') {
|
||||
env0_3(undefined);
|
||||
} else if (env0_0 === env0_1) {
|
||||
env0_3(undefined);
|
||||
} else if (env0_2 != null) {
|
||||
env0_3(env0_2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user