import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{getAppStorage as n}from"../../../clients/jsonApi/index.js";function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function i(e){return function(){var o=r(t.mark((function r(o,i){var p;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return p=null,r.prev=1,r.next=4,n(e.provider,e.collection,o,c(c({},e.params),{},{query:i?"{timestamp#lt#".concat(i,"}"):null,sort:"{timestamp: -1}",limit:1}));case 4:p=r.sent,r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),console.error(r.t0);case 10:return r.abrupt("return",p);case 11:case"end":return r.stop()}}),r,null,[[1,7]])})));return function(e,r){return o.apply(this,arguments)}}()}export{i as initialDataFetcher};
//# sourceMappingURL=initialDataFetcher.js.map
