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,c=[],l=!0,u=!1;try{if(o=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=o.call(t)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(r){u=!0,a=r}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}function _arrayWithHoles(r){if(Array.isArray(r))return r}angular.module("c8y.sdk").directive("c8yRepeat",["$injector","$compile","$rootScope",function(u,y,s){function e(l){return function(e,r,t){var n,a,o,i=l;function c(){var r;s.c8y&&s.c8y.user&&(r=e.filter||{},u.get("c8y".concat((r=>r[0].toUpperCase()+r.slice(1))(n))).list(r).then(function(r){a.__c8y_serviceResult=r}))}t=/^\s*([^\s]+)\s*in\s*([^\s]+)\s*/.exec(t.c8yRepeat),o=_slicedToArray(t,2)[1],n=t[2],i.removeAttr("c8y-repeat"),i.removeAttr("data-c8y-repeat"),i.attr("ng-repeat","".concat(o," in __c8y_serviceResult track by ").concat(o,".id")),t=y(i),$(r).replaceWith(i),a=e.$parent,t(a),e.refresh=c,s.$on("c8y.api.login",function(){c()}),e.$watch("filter",c,!0)}}return{restrict:"A",compile:function(r){return e($(r).clone())},transclude:!1,scope:{filter:"=?",refresh:"=?"}}}]);