/* Metro module 14350; source: modules/remote_auth/RemoteAuthUtils.tsx; dependencies: [57, 5, 1885, 14348, 2] */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import UserRecord from '../../records/UserRecord.tsx'; /* Metro dependency 1885 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun108614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:6, offset: 0x0232739c, size: 187 bytes, params: 8, frame: 18 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/remote_auth/RemoteAuthUtils.tsx'); exports.decodeEncodedUserRecord = function() { return _decodeEncodedUserRecord.apply(this, arguments); }; exports.base64Encode = base64Encode_108619; exports.base64Decode = function(a0) { var Uint8Array = global.Uint8Array; return Uint8Array.from((0, global.atob)(a0), _fun108621); }; function _decodeEncodedUserRecord() { // fn#108615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:126, offset: 0x02327457, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun108617).apply(this, arguments); function* _fun108617(a0, a1) { // fn#108617, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:197, offset: 0x02327494, size: 243 bytes, params: 3, frame: 18 if (false) { return undefined; } value = environment.__proto__.__proto__; let binding = env2_0; const value3 = binding(env2_1[3]); yield value3.decryptEncodedCiphertext(a0, a1); const value4 = undefined; if (false) { return value4; } const value6 = value4.match(RegExp('^(\\d+):(\\d{1,4}):([a-zA-Z0-9_]+):(.*)$', '')); const value7 = null; if (value7 == value6) { throw new global.Error('Invalid encoded user record.'); } const value8 = env2_2(value6, 5); const property = value8[1]; const property2 = value8[2]; const property3 = value8[3]; const property4 = value8[4]; binding = env2_4; const object = {id: property, discriminator: property2}; object.avatar = property3 === '0' ? value7 : property3; object.username = property4; value = Object.create(binding.prototype, {constructor: {value: binding}}); const binding2 = new binding(object); return binding2 instanceof Object ? binding2 : value; } } function base64Decode_108620(a0) { // fn#108620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:870, offset: 0x02327632, size: 46 bytes, params: 2, frame: 14 const Uint8Array = global.Uint8Array; return Uint8Array.from(global.atob(a0), function(a0) { return a0.charCodeAt(0); }); } } function base64Encode_108619(a0) { // fn#108619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:714, offset: 0x02327587, size: 171 bytes, params: 2, frame: 16 const btoa = global.btoa; const String = global.String; const fromCharCode = String.fromCharCode; const Uint8Array = global.Uint8Array; let uint8Array = new Uint8Array(a0); const items2 = []; arraySpread(items2, uint8Array, 0, Uint8Array); uint8Array = apply(fromCharCode, items2, String, Uint8Array); uint8Array = btoa(uint8Array); uint8Array = uint8Array.replace(RegExp('\\/', 'g'), '_'); uint8Array = uint8Array.replace(RegExp('\\+', 'g'), '-'); return uint8Array.replace(RegExp('={1,2}$', ''), ''); } function _fun108621(a0) { // fn#108621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14547:927, offset: 0x00de9a52, size: 18 bytes, params: 2, frame: 11 return a0.charCodeAt(0); } global.__d(_fun108614, 14350, [57, 5, 1885, 14348, 2]) /* metro module 14350, dependencies: [57, 5, 1885, 14348, 2] */;