Files
discord-decomp/sources/stores/ExternalStreamingStore.tsx
T
2026-07-27 16:20:00 +03:00

4565 lines
151 KiB
TypeScript

/* Metro module 6881; source: stores/ExternalStreamingStore.tsx; dependencies: [15, 17, 18, 6, 7, 5, 5040, 3996, 661, 672, 507, 5042, 694, 6873, 4915, 644, 566, 2] */
function _fun54611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:6, offset: 0x01369e82, size: 540 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(15) /* metro dependency 15 */;
const env0_4 = importDefault(17) /* metro dependency 17 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(5) /* metro dependency 5 */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let MINUTE = Millis.MINUTE;
const env0_12 = 1 * MINUTE;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
MINUTE = Millis.MINUTE;
const env0_13 = 5 * MINUTE;
const env0_14 = RegExp('live_user_(.*)-\\{width\\}', '');
const Set = global.Set;
let set = new Set();
const env0_19 = {};
set = _fun54620();
set = new set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun54642(Store).displayName = 'ExternalStreamingStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {STREAMING_UPDATE: STREAMING_UPDATE,
USER_CONNECTIONS_UPDATE: USER_CONNECTIONS_UPDATE_54647});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ExternalStreamingStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_54612() { // fn#54612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:202, offset: 0x0136a09e, size: 94 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_54612_isNativeReflectConstruct = function() {
return !!result;
})();
}
function makeTwitchRequest(a0, a1, a2) { // fn#54615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:513, offset: 0x0136a0fc, size: 139 bytes, params: 4, frame: 15
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
return HTTP.get({url: 'https://api.twitch.tv/helix' + a0, query: a1,
headers: {['Client-ID']: '33kozedd0zs6fbauka98psnc7zwom2s', Authorization: 'Bearer ' + a2},
rejectWithError: false});
}
function _getTwitchGame() { // fn#54616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:724, offset: 0x0136a187, size: 48 bytes, params: 1, frame: 14
return env0_8(_fun54618).apply(this, arguments);
}
function streamerModeUpdate() { // fn#54619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3982, offset: 0x0136a233, size: 44 bytes, params: 1, frame: 9
const enabled = StreamerModeStore.enabled;
const binding = env0_20;
if (enabled) {
binding.start();
} else {
binding.stop();
}
}
function _fun54620() { // fn#54620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:959, offset: 0x0136a25f, size: 208 bytes, params: 1, frame: 18
const binding = env0_7;
const closure = StreamingPoller;
const items2 = [{key: 'start', value: value_54622}];
items2[1] = {key: 'stop', value: value_54623};
const env0_1 = env0_8(_fun54625);
items2[2] = {key: '_checkTwitch', value: value_54629};
const env0_0 = env0_8(_fun54631);
items2[3] = {key: '_checkYouTube', value: value_54634};
items2[4] = {key: '_check', value: value_54635};
items2[5] = {key: '_scheduleCheck', value: value_54640};
return binding(closure, items2);
}
function _fun54642(a0) { // fn#54642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:4047, offset: 0x0136acb8, size: 93 bytes, params: 2, frame: 16
const closure = ExternalStreamingStore;
env0_5(closure, a0);
return env0_7(closure, [{key: 'initialize', value: function() {
var streamerModeUpdateBinding = streamerModeUpdate;
streamerModeUpdateBinding();
this.waitFor(ConnectedAccountsStore, StreamerModeStore);
this.syncWith([StreamerModeStore], streamerModeUpdateBinding);
}}, {key: 'getStream', value: value_54645}]);
}
function STREAMING_UPDATE(a0) { // fn#54646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:4619, offset: 0x0136adc4, size: 75 bytes, params: 2, frame: 15
const defaultImport = importDefault(644) /* metro dependency 644 */;
let stream = a0.stream;
if (defaultImport(stream, env0_15)) {
return false;
}
stream = a0.stream;
const value2 = null;
env0_15 = value2 != stream ? stream : value2;
}
function USER_CONNECTIONS_UPDATE_54647() { // fn#54647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:4736, offset: 0x0136ae0f, size: 19 bytes, params: 1, frame: 9
return env0_20._check();
}
function* _fun54618(a0, a1) { // fn#54618, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:775, offset: 0x0136a1c0, size: 115 bytes, params: 3, frame: 20
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let property = env2_19[a0];
if (property != null) {
return property;
}
const binding = env2_22;
const value3 = undefined;
yield binding('/games', {id: a0}, a1);
const value4 = undefined;
if (false) {
return value4;
}
property = value4.body.data[0];
const name = property == null ? value3 : property.name;
env2_19[a0] = name;
return name;
}
function StreamingPoller() { // fn#54621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:980, offset: 0x0136a32f, size: 35 bytes, params: 1, frame: 13
env1_6(this, StreamingPoller);
this._started = false;
}
function value_54622() { // fn#54622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:1070, offset: 0x0136a352, size: 88 bytes, params: 1, frame: 12
var value;
if (!this._started) {
this._started = true;
value = environment.__proto__;
if (ConnectedAccountsStore.isFetching()) {
(importDefault(5042) /* metro dependency 5042: ConnectedAccountsActionCreators */).fetch();
} else {
this._check();
}
}
}
function value_54623() { // fn#54623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:1181, offset: 0x0136a3aa, size: 105 bytes, params: 1, frame: 12
this._started = false;
const value = environment.__proto__;
if (this._nextCheck != null) {
global.clearTimeout(this._nextCheck);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'STREAMING_UPDATE', 'stream': null});
}
async function _fun54625(a0) { // fn#54625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:1364, offset: 0x0136a425, size: 793 bytes, params: 2, frame: 38
var r22;
var r9;
var r92;
var r93;
var r14;
var binding;
var object4;
var id;
var value7;
var value8;
var value9;
var body;
var data;
var property;
var value10;
var type;
var value11;
var thumbnail_url;
var game_id;
var title;
var value12;
var binding2;
var value13;
var getAssetFromImageURL;
var TWITCH;
var value14;
var value15;
var closure;
var value16;
var value17;
var value18;
var binding3;
var value19;
var get;
var value20;
var exec;
var value21;
var value22;
var value23;
var name;
var value24;
var value25;
var slice;
var value26;
var value27;
var value28;
var value29;
var object5;
var getPlatformUserUrl;
var value30;
var object6;
var value31;
var Error;
var prototype;
var error;
var value33;
var status;
var refreshAccessToken;
let value = a1;
if (false) {
return undefined;
}
const env0_1 = a0;
const value4 = undefined;
const r1 = value !== value4 ? value : null;
await value4;
if (false) {
return undefined;
}
const revoked = a0.revoked;
value = null;
if (revoked) {
return value;
}
let r3 = value != r1 ? r1 : a0.accessToken;
if (value == r3) {
return value;
}
try {
binding = env2_22;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
object4 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
id = a0.id;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
object4.user_id = id;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
object4.first = 1;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
value7 = binding('/streams', object4, r3);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
await value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
if (value9) {
return value8;
}
try {
body = value8.body;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
data = body.data;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
property = data[0];
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
value10 = value == property;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
if (value10) {
try {
Error = global.Error;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(function() {
return null;
});
return value;
}
r3 = value;
return r3;
}
try {
prototype = Error.prototype;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
error = new Error('no stream');
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value33 = error instanceof Object ? error : undefined;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
throw value33;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
} else {
try {
type = property.type;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value11 = type !== 'live';
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (!value11) {
try {
thumbnail_url = property.thumbnail_url;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
game_id = property.game_id;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
title = property.title;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object4 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value12 = value != thumbnail_url;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value12) {
try {
binding = env2_0;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
binding2 = env2_2;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
property = binding2[13];
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value13 = binding(property);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
getAssetFromImageURL = value13.getAssetFromImageURL;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
binding = env2_11;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
TWITCH = binding.TWITCH;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value14 = Reflect.apply(getAssetFromImageURL, value13, [TWITCH, thumbnail_url]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value15 = value != value14;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r22 = value15 ? value14 : value4;
} else {
r22 = value4;
}
try {
object4.large_image = r22;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
closure = getTwitchGame;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value16 = closure(game_id, r3);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
await value16;
try {
value17 = undefined;
value18 = false;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value18) {
return value17;
}
try {
binding = env2_1;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
binding3 = env2_2;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
property = binding3[14];
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value19 = binding(property);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
get = value19.get;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
binding = env2_11;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
TWITCH = binding.TWITCH;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value20 = Reflect.apply(get, value19, [TWITCH]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
binding = env2_14;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
exec = binding.exec;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value21 = Reflect.apply(exec, binding, [thumbnail_url]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value22 = value == value21;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value22) {
r9 = value4;
} else {
try {
property = value21[1];
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r9 = property;
}
try {
value23 = value != r9;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (!value23) {
try {
name = a0.name;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r9 = name;
}
try {
value24 = value != title;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value24) {
try {
value25 = title === '';
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value25) {
r92 = value4;
} else {
try {
slice = title.slice;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value26 = Reflect.apply(slice, title, [0, 128]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r92 = value26;
}
} else {
r92 = value4;
}
try {
value27 = value != value17;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value27) {
try {
value28 = value17 === '';
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value28) {
r93 = value4;
} else {
try {
slice = value17.slice;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value29 = Reflect.apply(slice, value17, [0, 128]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r93 = value29;
}
} else {
r93 = value4;
}
try {
object5 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
getPlatformUserUrl = value20.getPlatformUserUrl;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value30 = value == getPlatformUserUrl;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
if (value30) {
r14 = value4;
} else {
try {
getPlatformUserUrl = value20.getPlatformUserUrl;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object6 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
id = a0.id;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object6.id = id;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object6.name = r9;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value31 = Reflect.apply(getPlatformUserUrl, value20, [object6]);
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
r14 = value31;
}
try {
object5.url = r14;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
name = value20.name;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object5.name = name;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object5.assets = object4;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object5.details = r92;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
object5.state = r93;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
return object5;
}
try {
Error = global.Error;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
prototype = Error.prototype;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
error = new Error('no stream');
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
value33 = error instanceof Object ? error : undefined;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
try {
throw value33;
} catch (error) {
status = error.status;
if (status !== 401) {
r3 = value;
return r3;
}
if (value == r3) {
binding = env2_1;
value = binding(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
id = a0.id;
value = Reflect.apply(refreshAccessToken, value, [type, id]);
value = value.then(_fun54627);
value = value.catch(_fun54628);
return value;
}
r3 = value;
return r3;
}
}
}
async function _fun54631(a0) { // fn#54631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:2389, offset: 0x0136a78a, size: 723 bytes, params: 2, frame: 31
var environment;
var r21;
var r13;
var r3;
var binding2;
var property;
var value7;
var HTTP;
var get;
var object5;
var object6;
var object7;
var value8;
var accessToken;
var concat;
var value9;
var value10;
var value11;
var value12;
var body;
var items2;
var length;
var value13;
var snippet;
var title;
var thumbnails;
var binding3;
var value14;
var getAssetFromImageURL;
var YOUTUBE;
var high;
var url;
var value15;
var value16;
var value17;
var value18;
var slice;
var value19;
var object8;
var value20;
var binding4;
var value21;
var value22;
var name;
var Error;
var prototype;
var error;
var value24;
var status;
var add;
var refreshAccessToken;
var type;
let value = a1;
if (false) {
return undefined;
}
const env0_1 = a0;
const value4 = undefined;
const r1 = value !== value4 ? value : null;
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value6 = null;
if (a0.revoked) {
return value6;
}
let binding = env2_18;
const has = binding.has;
let id = a0.id;
if (Reflect.apply(has, binding, [id])) {
return value6;
}
try {
binding = env2_0;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding2 = env2_2;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
property = binding2[10];
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value7 = binding(property);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
HTTP = value7.HTTP;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
get = HTTP.get;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object5 = {'url': 'https://www.googleapis.com/youtube/v3/liveBroadcasts', 'query': null, 'headers': null,
'oldFormErrors': true, 'rejectWithError': false};
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object6 = {'part': 'id,snippet', 'broadcastStatus': 'active', 'broadcastType': 'all'};
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object5.query = object6;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object7 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value8 = value6 != r1;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
if (value8) {
r21 = r1;
} else {
try {
accessToken = a0.accessToken;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
r21 = accessToken;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value9 = Reflect.apply(concat, 'Bearer ', [r21]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object7.Authorization = value9;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object5.headers = object7;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value10 = Reflect.apply(get, HTTP, [object5]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
await value10;
try {
value11 = undefined;
value12 = false;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
if (value12) {
return value11;
}
try {
body = value11.body;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
items2 = body.items;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
length = items2.length;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value13 = length < 1;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
if (!value13) {
try {
property = items2[0];
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
id = property.id;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
snippet = property.snippet;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
title = snippet.title;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
thumbnails = snippet.thumbnails;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object5 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding = env2_0;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding3 = env2_2;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
property = binding3[13];
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value14 = binding(property);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
getAssetFromImageURL = value14.getAssetFromImageURL;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding = env2_11;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
YOUTUBE = binding.YOUTUBE;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
high = thumbnails.high;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
url = high.url;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value15 = Reflect.apply(getAssetFromImageURL, value14, [YOUTUBE, url]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value16 = value6 != value15;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object5.large_image = value16 ? value15 : value4;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value17 = value6 != title;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
if (value17) {
try {
value18 = title === '';
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
if (value18) {
r13 = value4;
} else {
try {
slice = title.slice;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value19 = Reflect.apply(slice, title, [0, 128]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
r13 = value19;
}
} else {
r13 = value4;
}
try {
object8 = {};
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value20 = Reflect.apply(concat, 'https://youtube.com/watch?v=', [id]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object8.url = value20;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding = env2_1;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding4 = env2_2;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
property = binding4[14];
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value21 = binding(property);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
get = value21.get;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
binding = env2_11;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
YOUTUBE = binding.YOUTUBE;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value22 = Reflect.apply(get, value21, [YOUTUBE]);
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
name = value22.name;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object8.name = name;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object8.details = r13;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
object8.assets = object5;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
env2_17 = object8;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(_fun54633);
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
return object8;
}
try {
Error = global.Error;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
prototype = Error.prototype;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
error = new Error('no stream');
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
value24 = error instanceof Object ? error : undefined;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
try {
throw value24;
} catch (error) {
status = error.status;
if (status !== 401) {
if (error.status !== 403) {
return value6;
}
binding = env2_18;
binding.add(a0.id);
return value6;
}
if (value6 == r1) {
value = env2_1(env2_2[11]);
refreshAccessToken = value.refreshAccessToken;
type = a0.type;
value = Reflect.apply(refreshAccessToken, value, [type, a0.id]);
value = value.then(_fun54632);
value = value.catch(function() {
return null;
});
return value;
}
status = error.status;
if (status !== 403) {
return value6;
}
binding = env2_18;
add = binding.add;
id = a0.id;
Reflect.apply(add, binding, [id]);
r3 = value6;
return r3;
}
}
function value_54635() { // fn#54635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3323, offset: 0x0136aa79, size: 223 bytes, params: 1, frame: 16
var environment;
var value;
var accounts;
var items2;
var value3;
if (this._started) {
value = environment.__proto__;
accounts = ConnectedAccountsStore.getAccounts();
if (accounts != null) {
if (this._nextCheck != null) {
global.clearTimeout(this._nextCheck);
}
items2 = [PlatformTypes.TWITCH];
value3 = global.Date.now();
if (env1_16 <= value3) {
items2.push(PlatformTypes.YOUTUBE);
env1_16 = value3 + env1_13;
}
value = accounts.filter(_fun54636);
value = value.map(_fun54637);
value = global.Promise.allSettled(value);
value.then(_fun54638);
}
}
}
function value_54640() { // fn#54640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3881, offset: 0x0136ac6d, size: 56 bytes, params: 1, frame: 14
var environment;
var setTimeout;
var value;
if (this._started) {
setTimeout = global.setTimeout;
value = environment.__proto__;
this._nextCheck = setTimeout(_fun54641, env1_12);
}
}
function ExternalStreamingStore() { // fn#54643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:4059, offset: 0x0136ad15, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_6(this, ExternalStreamingStore);
const value3 = env1_4(ExternalStreamingStore);
return env1_3(this, _isNativeReflectConstruct_54612() ? global.Reflect.construct(value3, arguments,
env1_4(this).constructor) : value3.apply(this, arguments));
}
function getTwitchGame() { // fn#54626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:1743, offset: 0x0136a73e, size: 30 bytes, params: 1, frame: 13
return env3_23.apply(this, arguments);
}
function _fun54627(a0) { // fn#54627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:2243, offset: 0x0136a75c, size: 28 bytes, params: 2, frame: 13
return env0_0._checkTwitch(env0_1, a0);
}
function _fun54632(a0) { // fn#54632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3153, offset: 0x0136aa5d, size: 28 bytes, params: 2, frame: 13
return env0_0._checkYouTube(env0_1, a0);
}
function _fun54636({type}) { // fn#54636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3517, offset: 0x0136ab58, size: 27 bytes, params: 2, frame: 11
return env0_1.includes(type);
}
function _fun54637(a0) { // fn#54637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3546, offset: 0x0136ab73, size: 65 bytes, params: 2, frame: 12
const type = a0.type;
const value = environment.__proto__.__proto__;
const TWITCH = PlatformTypes.TWITCH;
return type === TWITCH ? env0_0._checkTwitch(a0) : env0_0._checkYouTube(a0);
}
function _fun54638(a0) { // fn#54638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3640, offset: 0x0136abb4, size: 151 bytes, params: 2, frame: 14
var environment;
var r4;
var value9;
var defaultImport;
if (env0_0._started) {
r4 = a0.find(function(a0) {
return a0.status === 'fulfilled' && a0.value != null;
})?.value;
r4 = r4 == null && env2_17 != null ? env2_17 : r4;
value9 = environment.__proto__.__proto__;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'STREAMING_UPDATE', stream: r4});
}
env0_0._scheduleCheck();
}
function _fun54641() { // fn#54641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7059:3936, offset: 0x0136aca5, size: 19 bytes, params: 1, frame: 9
return env0_0._check();
}