/* Metro module 7135; source: unknown; dependencies: [] */ function _fun57086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7313:6, offset: 0x013dc2e5, size: 271 bytes, params: 8, frame: 5 const closure = function() { }; const closure2 = function(a0) { this._tree = a0; this._ancestors = []; this._cursor = null; }; closure.prototype.clear = function() { this._root = null; this.size = 0; }; closure.prototype.find = function(a0) { var r3; var value; var _root = this._root; if (_root !== null) { r3 = _root; loopExit1: while (true) { value = this._comparator(a0, r3.data); if (value === 0) { return r3.data; } value = r3.get_child(value > 0); if (value !== null) { r3 = value; continue; } break loopExit1; } } return null; }; closure.prototype.findIter = function(a0) { var r4; var value2; var value3; var property = this._root; var value = this.iterator(); if (property !== null) { r4 = property; loopExit1: while (true) { value2 = this._comparator(a0, r4.data); if (value2 === 0) { value._cursor = r4; return value; } property = value._ancestors; property.push(r4); value3 = r4.get_child(value2 > 0); if (value3 !== null) { r4 = value3; continue; } break loopExit1; } } return null; }; closure.prototype.lowerBound = lowerBound; closure.prototype.upperBound = function(a0) { var value = this.lowerBound(a0); var _comparator = this._comparator; if (value.data() !== null) { if (_comparator(value.data(), a0) === 0) { while (true) { value.next(); if (value.data() === null) { break; } if (_comparator(value.data(), a0) === 0) { continue; } break; } } } return value; }; closure.prototype.min = function() { var r3; var r1; var property = this._root; if (property === null) { return null; } if (property.left === null) { r1 = property; } else { r3 = property; reducibleLoop2: while (true) { property = r3.left; if (property.left !== null) { r3 = property; continue reducibleLoop2; } r1 = property; break reducibleLoop2; } } return r1.data; }; closure.prototype.max = function() { var r3; var r1; var property = this._root; if (property === null) { return null; } if (property.right === null) { r1 = property; } else { r3 = property; reducibleLoop2: while (true) { property = r3.right; if (property.right !== null) { r3 = property; continue reducibleLoop2; } r1 = property; break reducibleLoop2; } } return r1.data; }; closure.prototype.iterator = iterator; closure.prototype.each = function(a0) { var r1; var value3; var value = this.iterator(); var value2 = value.next(); if (value2 !== null) { for (r1 = value2; true; r1 = value3) { a0(r1); value3 = value.next(); if (value3 === null) { break; } } } }; closure.prototype.reach = function(a0) { var r1; var value3; var value = this.iterator(); var value2 = value.prev(); if (value2 !== null) { for (r1 = value2; true; r1 = value3) { a0(r1); value3 = value.prev(); if (value3 === null) { break; } } } }; closure2.prototype.data = function() { var value = null; return value === this._cursor ? value : this._cursor.data; }; closure2.prototype.next = next_57100; closure2.prototype.prev = prev_57101; closure2.prototype._minNode = function(a0) { var r3; var r0; var property; var value = a0; if (value.left === null) { r0 = value; } else { for (r3 = value; true; r3 = property) { property = this._ancestors; property.push(r3); property = r3.left; if (property.left === null) { r0 = property; break; } } } this._cursor = r0; }; closure2.prototype._maxNode = function(a0) { var r3; var r0; var property; var value = a0; if (value.right === null) { r0 = value; } else { for (r3 = value; true; r3 = property) { property = this._ancestors; property.push(r3); property = r3.right; if (property.right === null) { r0 = property; break; } } } this._cursor = r0; }; module.exports = closure; function iterator() { // fn#57096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7313:1313, offset: 0x013dc66f, size: 31 bytes, params: 1, frame: 11 const value = Object.create(Iterator.prototype, {constructor: {value: Iterator}}); const iterator = new Iterator(this); return iterator instanceof Object ? iterator : value; } } function lowerBound(a0) { // fn#57092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7313:580, offset: 0x013dc4d4, size: 192 bytes, params: 2, frame: 20 var r3; var r4; var data; var value2; var _ancestors; var push; var get_child; var value3; var property; var value5; const _root = this._root; const value = this.iterator(); const _comparator = this._comparator; if (_root !== null) { r3 = _root; reducibleLoop1: while (true) { data = r3.data; value2 = _comparator(a0, data); if (value2 === 0) { value._cursor = r3; return value; } _ancestors = value._ancestors; push = _ancestors.push; Reflect.apply(push, _ancestors, [r3]); get_child = r3.get_child; value3 = Reflect.apply(get_child, r3, [value2 > 0]); if (value3 !== null) { r3 = value3; continue reducibleLoop1; } break reducibleLoop1; } } const value4 = value._ancestors.length - 1; if (value4 >= 0) { r4 = value4; reducibleLoop4: while (true) { _ancestors = value._ancestors; property = _ancestors[r4]; data = property.data; if (_comparator(a0, data) < 0) { value._cursor = property; value._ancestors.length = r4; return value; } value5 = typeof r4 === 'bigint' ? r4 - 1n : +r4 - 1; if (!(value5 >= 0)) { value._ancestors.length = 0; return value; } r4 = value5; continue reducibleLoop4; } } value._ancestors.length = 0; return value; } function next_57100() { // fn#57100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7313:1644, offset: 0x013dc713, size: 197 bytes, params: 1, frame: 13 var right; var _ancestors; var push; var _minNode; var length; var pop; var _cursor2; var _root; let _cursor = this._cursor; const value = null; if (value === _cursor) { _root = this._tree._root; if (value !== _root) { this._minNode(_root); } } else { _cursor = this._cursor; right = _cursor.right; if (value === right) { loopExit3: while (true) { _cursor = this._cursor; _ancestors = this._ancestors; length = _ancestors.length; if (length) { _ancestors = this._ancestors; pop = _ancestors.pop; this._cursor = Reflect.apply(pop, _ancestors, []); _cursor2 = this._cursor; right = _cursor2.right; if (right === _cursor) { continue; } break loopExit3; } this._cursor = value; break loopExit3; } } else { _ancestors = this._ancestors; push = _ancestors.push; _cursor = this._cursor; Reflect.apply(push, _ancestors, [_cursor]); _minNode = this._minNode; _cursor = this._cursor; Reflect.apply(_minNode, this, [_cursor.right]); } } return value === this._cursor ? value : this._cursor.data; } function prev_57101() { // fn#57101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7313:2053, offset: 0x013dc7d8, size: 197 bytes, params: 1, frame: 13 var left; var _ancestors; var push; var _maxNode; var length; var pop; var _cursor2; var _root; let _cursor = this._cursor; const value = null; if (value === _cursor) { _root = this._tree._root; if (value !== _root) { this._maxNode(_root); } } else { _cursor = this._cursor; left = _cursor.left; if (value === left) { loopExit3: while (true) { _cursor = this._cursor; _ancestors = this._ancestors; length = _ancestors.length; if (length) { _ancestors = this._ancestors; pop = _ancestors.pop; this._cursor = Reflect.apply(pop, _ancestors, []); _cursor2 = this._cursor; left = _cursor2.left; if (left === _cursor) { continue; } break loopExit3; } this._cursor = value; break loopExit3; } } else { _ancestors = this._ancestors; push = _ancestors.push; _cursor = this._cursor; Reflect.apply(push, _ancestors, [_cursor]); _maxNode = this._maxNode; _cursor = this._cursor; Reflect.apply(_maxNode, this, [_cursor.left]); } } return value === this._cursor ? value : this._cursor.data; } global.__d(_fun57086, 7135, []) /* metro module 7135 */;