function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t={}.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function _iterableToArrayLimit(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,a,o,i,l=[],u=!0,c=!1;try{if(o=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(r){c=!0,a=r}finally{try{if(!u&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw a}}return l}}function _arrayWithHoles(r){if(Array.isArray(r))return r}angular.module("c8y.ui").provider("httpCache",function(){function r(r,y,s){function a(){for(var r,e,t,n,a,o,i,l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return _.includes(p,u[0].method)?(i=((r,e)=>{var t=r;return 0<e.length&&(t+=(-1===r.indexOf("?")?"?":"&")+e),t})((i=_slicedToArray(r=u,1)[0]).url,s(i))+(r=>r.headers&&r.headers.Accept||"")(i),void 0!==window.Rx?(e=d,n=r,void 0===b[t=i]&&(b[t]=window.Rx.Subject.defer(function(){return e.apply(this,n)}).publishReplay(1,f).refCount().take(1)),a=y(function(r,e){b[t].toPromise().then(r,e)}),_.extend(b[t],a)):(void 0===b[i]&&(b[i]=d.apply(void 0,_toConsumableArray(r)),o=i,setTimeout(function(){delete b[o]},f)),b[i].then(function(r){return _.cloneDeep(r)}))):(_.includes(h,u[0].method)&&(b={}),d.apply(d,u))}var f=500,d=r,r=["post","put"],e=["get","delete","head"],t=r.concat(e),p=["GET","HEAD"],h=["POST","PUT","DELETE"],b={};return r.forEach(function(n){a[n]=function(r,e,t){r={url:r,data:e,method:n.toUpperCase()};return _.assign(r,t),a(r)}}),e.forEach(function(t){a[t]=function(r,e){r={url:r,method:t.toUpperCase()};return _.assign(r,e),a(r)}}),_.assign(a,_.omit(d,t)),a}r.$inject=["$delegate","$q","$httpParamSerializer"],this.$get=r});