This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+118
View File
@@ -0,0 +1,118 @@
// Metro module 11244 (f11245).
const sortGroup = function sortGroup(a0, c18680_0) {
return a0.sort((a, b) => {
for (const item of c18680_0) {
const r25 = item(a, b);
if (r25 === 0) {
continue;
}
return r25;
}
return 0;
});
};
export function queryData(a0, a1) {
let r15, r19;
let limit = a1.limit;
if (limit == null) {
limit = Infinity;
}
let filterPredicates = a1.filterPredicates;
if (filterPredicates == null) {
filterPredicates = [];
}
let c18681_0 = filterPredicates;
const r9 = a0.filter((c30375_0) => c18681_0.every((item) => item(c30375_0)));
if (a1.bucketPredicates != null && a1.bucketPredicates.length > 0) {
if (limit >= r9.length) {
let bucketPredicates = a1.bucketPredicates;
if (bucketPredicates == null) {
bucketPredicates = [];
}
r19 = (function applyBucketingSingleIteration(a0, a1) {
const r29 = new Array(a1.length).fill(null).map(() => []);
loop1: for (const r33 of a0) {
const r34 = r33;
let r35 = 0;
if (0 < a1.length) {
while (true) {
const r40 = a1[r35](r34);
const r41 = r35;
if (r40) {
r29[r41].push(r34);
continue loop1;
}
const r10 = r41 + 1;
r35 = r10;
if (!(r10 < a1.length)) {
continue loop1;
}
}
}
}
return r29;
})(r9, bucketPredicates);
} else {
let bucketPredicates2 = a1.bucketPredicates;
if (bucketPredicates2 == null) {
bucketPredicates2 = [];
}
r19 = (function applyBucketing(r10, a1, a2) {
let r28;
const r0 = [];
loop1: for (const r30 of a1) {
const r31 = r30;
const r32 = [];
const r33 = [];
let r35 = r10[Symbol.iterator]();
const next = r35.next;
while (true) {
const r14 = r35 === void 0 ? void 0 : (r28 = next.call(r35)).done ? r35 = void 0 : r28.value;
if (r35 === void 0) {
r0.push(r33);
r10 = r32;
if (r0.reduce((acc, item) => item.length + acc, 0) >= a2) {
break;
}
continue loop1;
}
try {
if (r31(r14)) {
r33.push(r14);
} else {
r32.push(r14);
}
} catch (r49) {
if (r35 !== void 0 && typeof r35.return === "function") {
try {
r35.return();
} catch {}
}
throw r49;
}
}
break;
}
return r0;
})(r9, bucketPredicates2, limit);
}
r15 = r19;
} else {
r15 = [r9];
}
let sortComparers = a1.sortComparers;
if (sortComparers == null) {
sortComparers = [];
}
return (function applySorting(a0, a1, a2) {
const r0 = [];
for (const item of a0) {
r0.push.apply(r0, [...sortGroup(item, a1)]);
if (!(r0.length >= a2)) {
continue;
}
return r0;
}
return r0;
})(r15, sortComparers, limit).slice(0, limit);
}