Liferay.Loader.define("portal-search-ranking-web@3.0.58/js/utils/api.es",["module","exports","require","frontend-js-web","./util.es"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.fetchResponse=fetchResponse,t.fetchDocuments=function fetchDocuments(e,t){return fetchResponse(e,t).then((e=>({items:e.documents,total:e.total})))};var s=n("frontend-js-web"),o=n("./util.es");function fetchResponse(e,t){const n=new URL(e);return Object.keys(t).forEach((e=>{(0,o.isNull)(t[e])||n.searchParams.set(e,t[e])})),(0,s.fetch)(n).then((e=>e.json()))}}}));
//# sourceMappingURL=api.es.js.map