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}(()=>{function r(a,l,o){var u={};return{when:i,$get:["$route",function(a){return{when:function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=i.apply(this,e);return a.reload(),n},getByPath:r}}]};function i(r,e){var t,r=y(r),i=(e.resolve=e.resolve||{},e.resolve.__c8y_locales=["c8yLocales",function(r){return r.initDone}],u[r]),n=r;return i||(u[r]=[],i=u[r]),1===i.length&&((t=_slicedToArray(i,1)[0]).path=o.appendSegment(n,t.name),t.tab=c(n,t),a.when(t.path,t)),i.push(e),e.path=r,1<i.length&&(e.path=o.appendSegment(n,e.name),c(n,e),a.when(y(n),{resolveRedirectTo:["$route","$q","c8yUiUtil","c8yTabs","gettextCatalog",function(r,e,t,n,a){var a=l.sortTabsViews(i,a),o=r.current.pathParams;return e.all(_.map(a,_.unary(t.configureVisibility))).then(function(r){var t=_.find(r,"show").path;return _.forEach(o,function(r,e){t=t.replace(":".concat(e),r)}),n.redirectedViewPath=t})}]})),a.when(y(e.path),e)}function r(r){return u[y(r)]}function c(r,e){l.addTab(r,e)}function y(r){return(_.startsWith(r,"/")?"":"/")+r}}r.$inject=["$routeProvider","c8yTabsProvider","c8yPathUtils"],angular.module("c8y.ui").provider("c8yViews",r)})();