360 lines
14 KiB
TypeScript
360 lines
14 KiB
TypeScript
/* Metro module 11611; source: modules/queries/ArraySearch.tsx; dependencies: [2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun88956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:6, offset: 0x01ffa539, size: 120 bytes, params: 8, frame: 16
|
|
const _arrayLikeToArray_88959 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const sortGroup = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
return a0.sort(_fun88961);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/queries/ArraySearch.tsx');
|
|
exports.queryData = queryData;
|
|
function _createForOfIteratorHelperLoose_88957(a0, a1) { // fn#88957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:47, offset: 0x01ffa5b1, size: 372 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun88958;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_88959(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_88959(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_88959(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun88958;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
function _fun88958() { // fn#88958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:618, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function sortGroup(a0, a1) { // fn#88960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:957, offset: 0x01ffa725, size: 32 bytes, params: 3, frame: 11
|
|
const env0_0 = a1;
|
|
return a0.sort(_fun88961);
|
|
function _fun88961(a0, a1) { // fn#88961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:996, offset: 0x01ffa745, size: 80 bytes, params: 3, frame: 18
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
let value = environment.__proto__;
|
|
value = _createForOfIteratorHelperLoose_88957(require);
|
|
const value2 = value();
|
|
let done = value2.done;
|
|
if (done) {
|
|
return 0;
|
|
}
|
|
let r3 = value2;
|
|
loopExit1: while (true) {
|
|
value3 = r3.value;
|
|
value4 = value3(a0, a1);
|
|
if (value4 !== 0) {
|
|
break loopExit1;
|
|
}
|
|
value5 = value();
|
|
done = value5.done;
|
|
if (done) {
|
|
return 0;
|
|
}
|
|
r3 = value5;
|
|
continue;
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
}
|
|
|
|
function queryData(a0, a1) { // fn#88962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1249, offset: 0x01ffa795, size: 297 bytes, params: 3, frame: 21
|
|
var r10;
|
|
var r4;
|
|
var r1;
|
|
var length;
|
|
var sortGroupBinding;
|
|
var value4;
|
|
var value5;
|
|
var push;
|
|
var items2;
|
|
var value6;
|
|
var value7;
|
|
const r3 = a1.limit ?? Infinity;
|
|
value = ((a0, a1) => {
|
|
var env0_0 = a1;
|
|
return a0.filter(_fun88964);
|
|
})(a0, a1.filterPredicates ?? []);
|
|
if (a1.bucketPredicates == null) {
|
|
r1 = [value];
|
|
} else {
|
|
length = a1.bucketPredicates.length;
|
|
if (length > 0) {
|
|
length = value.length;
|
|
if (r3 >= length) {
|
|
value = applyBucketingSingleIteration(value, a1.bucketPredicates ?? []);
|
|
r4 = value;
|
|
} else {
|
|
value = applyBucketing(value, a1.bucketPredicates ?? [], r3);
|
|
r4 = value;
|
|
}
|
|
r1 = r4;
|
|
} else {
|
|
r1 = [value];
|
|
}
|
|
}
|
|
const r7 = a1.sortComparers ?? [];
|
|
const items3 = [];
|
|
const value2 = _createForOfIteratorHelperLoose_88957(r1);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
sortGroupBinding = sortGroup;
|
|
value4 = r4.value;
|
|
value5 = sortGroupBinding(value4, r7);
|
|
push = items3.push;
|
|
items2 = [];
|
|
value6 = arraySpread(items2, value5, 0, r10);
|
|
apply(push, items2, items3, value6);
|
|
length = items3.length;
|
|
if (length >= r3) {
|
|
break;
|
|
}
|
|
value7 = value2();
|
|
done = value7.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r4 = value7;
|
|
r10 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
return items3.slice(0, r3);
|
|
function applyFilters(a0, a1) { // fn#88963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1315, owner: queryData.applyFilters, offset: 0x01ffa8be, size: 31 bytes, params: 3, frame: 11
|
|
let env0_0 = a1;
|
|
return a0.filter(function(a0) {
|
|
var env0_0 = a0;
|
|
return require.every(_fun88965);
|
|
});
|
|
function _fun88964(a0) { // fn#88964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1359, offset: 0x01ffa8dd, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return require.every(_fun88965);
|
|
function _fun88965(a0) { // fn#88965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1371, offset: 0x00c44018, size: 19 bytes, params: 2, frame: 11
|
|
return a0(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function applyBucketingSingleIteration(a0, a1) { // fn#88966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1665, owner: queryData.applyBucketingSingleIteration, offset: 0x01ffa901, size: 178 bytes, params: 3, frame: 18
|
|
var r2;
|
|
var r9;
|
|
var value6;
|
|
var value7;
|
|
var property;
|
|
var push;
|
|
var value8;
|
|
const Array = global.Array;
|
|
let length = a1.length;
|
|
let array = new Array(length);
|
|
array = array.fill(null);
|
|
array = array.map(function() {
|
|
return [];
|
|
});
|
|
const value3 = _createForOfIteratorHelperLoose_88957(a0);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
const value5 = 0;
|
|
if (!done) {
|
|
r2 = value4;
|
|
while (true) {
|
|
value6 = r2.value;
|
|
length = a1.length;
|
|
if (value5 < length) {
|
|
r9 = value5;
|
|
loopExit2: while (true) {
|
|
if (a1[r9](value6)) {
|
|
property = array[r9];
|
|
push = property.push;
|
|
Reflect.apply(push, property, [value6]);
|
|
break loopExit2;
|
|
}
|
|
value7 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
|
length = a1.length;
|
|
if (value7 < length) {
|
|
r9 = value7;
|
|
continue;
|
|
}
|
|
break loopExit2;
|
|
}
|
|
}
|
|
value8 = value3();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
function applyBucketing(a0, a1, a2) { // fn#88968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11797:1933, owner: queryData.applyBucketing, offset: 0x01ffa9b3, size: 194 bytes, params: 4, frame: 27
|
|
var r3;
|
|
var r9;
|
|
var r13;
|
|
var items2;
|
|
var items3;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var reduce;
|
|
let value = a0;
|
|
const items4 = [];
|
|
const value3 = _createForOfIteratorHelperLoose_88957(a1);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
r3 = value4;
|
|
r9 = value;
|
|
while (true) {
|
|
value = r3.value;
|
|
items2 = [];
|
|
items3 = [];
|
|
value5 = _createForOfIteratorHelperLoose_88957(r9);
|
|
value6 = value5();
|
|
done = value6.done;
|
|
if (!done) {
|
|
r13 = value6;
|
|
while (true) {
|
|
value7 = r13.value;
|
|
if (value(value7)) {
|
|
items3.push(value7);
|
|
} else {
|
|
items2.push(value7);
|
|
}
|
|
value8 = value5();
|
|
done = value8.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r13 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
items4.push(items3);
|
|
reduce = items4.reduce;
|
|
if (Reflect.apply(reduce, items4, [function(a0, a1) {
|
|
return a1.length + a0;
|
|
}, 0]) >= a2) {
|
|
break;
|
|
}
|
|
value = value3();
|
|
done = value.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r3 = value;
|
|
r9 = items2;
|
|
continue;
|
|
}
|
|
}
|
|
return items4;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun88956, 11611, [2]) /* metro module 11611, dependencies: [2] */;
|