"use strict";
exports.id = 3563;
exports.ids = [3563];
exports.modules = {

/***/ 863563:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {


var __values = (this && this.__values) || function(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toEpoch = void 0;
/* Some random little utils */
var misc_1 = __webpack_require__(854006);
// Convert timestamp fields as returned from postgresql queries
// into ms since the epoch, as a number.
function toEpoch(rows, fields) {
    var e_1, _a, e_2, _b;
    if (!(0, misc_1.is_array)(rows)) {
        rows = [rows];
    }
    try {
        // @ts-ignore
        for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
            var row = rows_1_1.value;
            try {
                for (var fields_1 = (e_2 = void 0, __values(fields)), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
                    var field = fields_1_1.value;
                    if (row[field]) {
                        row[field] = new Date(row[field]).valueOf();
                    }
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (fields_1_1 && !fields_1_1.done && (_b = fields_1.return)) _b.call(fields_1);
                }
                finally { if (e_2) throw e_2.error; }
            }
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
        }
        finally { if (e_1) throw e_1.error; }
    }
}
exports.toEpoch = toEpoch;
//# sourceMappingURL=util.js.map

/***/ })

};
;