"use strict";
(() => {
var exports = {};
exports.id = 884;
exports.ids = [884];
exports.modules = {

/***/ 3513:
/***/ ((module) => {

module.exports = require("boolean-parser");

/***/ }),

/***/ 9460:
/***/ ((module) => {

module.exports = require("lokijs");

/***/ }),

/***/ 4698:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ handler)
/* harmony export */ });
/* harmony import */ var boolean_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3513);
/* harmony import */ var boolean_parser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(boolean_parser__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var util_bqToMango__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8085);
/* harmony import */ var db_loki__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4276);



function handler(req, res) {
    const q = Array.isArray(req.query.q) ? req.query.q[0] : req.query.q;
    const m = q ? (0,util_bqToMango__WEBPACK_IMPORTED_MODULE_1__/* .bqToMango */ .D0)(boolean_parser__WEBPACK_IMPORTED_MODULE_0___default().parseBooleanQuery(q), util_bqToMango__WEBPACK_IMPORTED_MODULE_1__/* .runFacets */ .nK) : null;
    // console.log(JSON.stringify(m));
    const runs = (0,db_loki__WEBPACK_IMPORTED_MODULE_2__/* .getCollection */ ._)("tds-runs");
    const r = runs.chain().find({
        ...m ?? {}
    }).sort((a, b)=>new Date(b.ts).getTime() - new Date(a.ts).getTime()).data();
    res.status(200).json({
        runs: r
    });
}


/***/ })

};
;

// load runtime
var __webpack_require__ = require("../../../webpack-api-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [833], () => (__webpack_exec__(4698)));
module.exports = __webpack_exports__;

})();