72 lines
2.8 KiB
TypeScript
72 lines
2.8 KiB
TypeScript
/* Metro module 8977; source: modules/auth/getAuthenticationErrorsFromAPIError.tsx; dependencies: [2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun69966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9162:6, offset: 0x01cea1c4, size: 100 bytes, params: 8, frame: 16
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/auth/getAuthenticationErrorsFromAPIError.tsx');
|
|
exports.getAuthenticationErrorsFromAPIError = getAuthenticationErrorsFromAPIError;
|
|
exports.getAuthenticationErrorsFromV6OrEarlierAPIError = function(a0) {
|
|
var property = global.Object;
|
|
property = property.keys(a0.fields).length;
|
|
if (property > 0) {
|
|
return a0.fields;
|
|
}
|
|
var object = {message: a0.message};
|
|
if (a0.retryAfter != null) {
|
|
object.retry_after = a0.retryAfter;
|
|
}
|
|
return object;
|
|
};
|
|
}
|
|
|
|
function getAuthenticationErrorsFromAPIError(a0) { // fn#69967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9162:216, offset: 0x01cea228, size: 142 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var Object;
|
|
var value;
|
|
var length;
|
|
var value2;
|
|
var property;
|
|
var getFirstFieldErrorMessage;
|
|
var value3;
|
|
var value4;
|
|
const object = {};
|
|
object.error_code = a0.code;
|
|
if (a0.errors != null) {
|
|
Object = global.Object;
|
|
value = Object.keys(a0.errors);
|
|
length = value.length;
|
|
value2 = 0;
|
|
if (value2 < length) {
|
|
r2 = value2;
|
|
reducibleLoop5: while (true) {
|
|
property = value[r2];
|
|
getFirstFieldErrorMessage = a0.getFirstFieldErrorMessage;
|
|
value3 = Reflect.apply(getFirstFieldErrorMessage, a0, [property]);
|
|
object[property] = [value3];
|
|
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
length = value.length;
|
|
if (value4 < length) {
|
|
r2 = value4;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
} else {
|
|
object.message = a0.message;
|
|
var retryAfter = a0.retryAfter;
|
|
reducibleJoin3: while (true) {
|
|
if (retryAfter == null) {
|
|
break reducibleJoin3;
|
|
}
|
|
retryAfter = a0.retryAfter;
|
|
object.retry_after = retryAfter;
|
|
break reducibleJoin3;
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
global.__d(_fun69966, 8977, [2]) /* metro module 8977, dependencies: [2] */;
|