Liferay.Loader.define("@liferay/search-experiences-web@3.0.30/sxp_blueprint_admin/js/utils/fetch/fetch_data",["module","exports","require","frontend-js-web","../errorMessages"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function fetchData(r="",t={}){let{headers:c}=t,i=function _objectWithoutProperties(e,r){if(null==e)return{};var t,n,o=function _objectWithoutPropertiesLoose(e,r){if(null==e)return{};var t,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)t=c[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)t=c[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,["headers"]);return(0,n.fetch)(r,_objectSpread({headers:new Headers(_objectSpread(_objectSpread({},e),c)),method:"GET"},i)).then((e=>{if(!e.ok)throw o.DEFAULT_ERROR;return e.json()})).catch((e=>{throw e}))},r.DEFAULT_HEADERS=r.DEFAULT_HEADERS_OBJECT=void 0;var n=t("frontend-js-web"),o=t("../errorMessages");function ownKeys(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 _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const e={Accept:"application/json","Accept-Language":Liferay.ThemeDisplay.getBCP47LanguageId(),"Content-Type":"application/json"};r.DEFAULT_HEADERS_OBJECT=e;const c=new Headers(e);r.DEFAULT_HEADERS=c}}));
//# sourceMappingURL=fetch_data.js.map