126 lines
5.2 KiB
React
126 lines
5.2 KiB
React
/* Metro module 7422; source: unknown; dependencies: [6, 7, 7375, 7396] */
|
|
function _fun59839(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:6, offset: 0x016f45df, size: 101 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const env0_2 = require(6) /* metro dependency 6 */;
|
|
const env0_3 = require(7) /* metro dependency 7 */;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.SessionFlusher = _fun59840();
|
|
}
|
|
|
|
function _fun59840() { // fn#59840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:109, offset: 0x016f4644, size: 153 bytes, params: 1, frame: 15
|
|
return env0_3(SessionFlusher, [{key: 'flush', value: function() {
|
|
var property;
|
|
var value2;
|
|
var value3;
|
|
var value = this.getSessionAggregates();
|
|
if (value.aggregates.length !== 0) {
|
|
property = global.Map;
|
|
value2 = Object.create(property.prototype, {constructor: {value: property}});
|
|
value3 = new property();
|
|
this._pendingAggregates = value3 instanceof Object ? value3 : value2;
|
|
property = this._client;
|
|
property.sendSession(value);
|
|
}
|
|
}}, {key: 'getSessionAggregates', value: value_59844}, {key: 'close', value: function() {
|
|
global.clearInterval(this._intervalId);
|
|
this._isEnabled = false;
|
|
this.flush();
|
|
}}, {key: 'incrementSessionStatusCount', value: value_59846}, {key: '_incrementSessionStatusCount',
|
|
value: value_59847}]);
|
|
}
|
|
|
|
function SessionFlusher(a0, a1) { // fn#59841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:143, offset: 0x016f46dd, size: 172 bytes, params: 3, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
env1_2(this, SessionFlusher);
|
|
this._client = a0;
|
|
this.flushTimeout = 60;
|
|
const Map = global.Map;
|
|
this._pendingAggregates = new Map();
|
|
this._isEnabled = true;
|
|
this._intervalId = global.setInterval(_fun59842, 1000 * this.flushTimeout);
|
|
if (this._intervalId.unref) {
|
|
this._intervalId.unref();
|
|
}
|
|
this._sessionAttrs = a1;
|
|
}
|
|
|
|
function value_59844() { // fn#59844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:642, offset: 0x016f47e0, size: 92 bytes, params: 1, frame: 13
|
|
const Array = global.Array;
|
|
const from = Array.from;
|
|
const _pendingAggregates = this._pendingAggregates;
|
|
let value = Reflect.apply(from, Array, [_pendingAggregates.values()]);
|
|
const object2 = {};
|
|
object2.attrs = this._sessionAttrs;
|
|
object2.aggregates = value;
|
|
value = environment.__proto__;
|
|
return (require(7375) /* metro dependency 7375 */).dropUndefinedKeys(object2);
|
|
}
|
|
|
|
function value_59846() { // fn#59846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:948, offset: 0x016f4868, size: 135 bytes, params: 1, frame: 16
|
|
var value;
|
|
var requestSession;
|
|
var status;
|
|
var _incrementSessionStatusCount;
|
|
var Date;
|
|
var value3;
|
|
var date;
|
|
if (this._isEnabled) {
|
|
value = environment.__proto__;
|
|
value = require(7396) /* metro dependency 7396 */;
|
|
value = value.getIsolationScope();
|
|
requestSession = value.getRequestSession();
|
|
if (requestSession && requestSession.status) {
|
|
_incrementSessionStatusCount = this._incrementSessionStatusCount;
|
|
status = requestSession.status;
|
|
Date = global.Date;
|
|
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
Reflect.apply(_incrementSessionStatusCount, this, [status, date instanceof Object ? date : value3]);
|
|
value.setRequestSession(undefined);
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_59847(a0, a1) { // fn#59847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7600:1206, offset: 0x016f48ef, size: 248 bytes, params: 3, frame: 17
|
|
var r0;
|
|
var exited;
|
|
var errored;
|
|
var object2;
|
|
var value4;
|
|
let Date = global.Date;
|
|
let date = new Date(a1);
|
|
const value2 = 0;
|
|
date = date.setSeconds(value2, value2);
|
|
const value3 = this._pendingAggregates.get(date);
|
|
if (value3) {
|
|
r0 = value3;
|
|
} else {
|
|
object2 = {};
|
|
Date = global.Date;
|
|
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date(date);
|
|
object2.started = (date instanceof Object ? date : value4).toISOString();
|
|
this._pendingAggregates.set(date, object2);
|
|
r0 = object2;
|
|
}
|
|
if (a0 === 'errored') {
|
|
errored = r0.errored;
|
|
errored = !errored ? value2 : errored;
|
|
r0.errored = errored + 1;
|
|
return r0.errored;
|
|
}
|
|
if (a0 === 'ok') {
|
|
exited = r0.exited;
|
|
exited = !exited ? value2 : exited;
|
|
r0.exited = exited + 1;
|
|
return r0.exited;
|
|
}
|
|
let crashed = r0.crashed;
|
|
crashed = !crashed ? value2 : crashed;
|
|
r0.crashed = crashed + 1;
|
|
return r0.crashed;
|
|
}
|
|
|