(()=>{function n(r){return{restrict:"A",require:"uibDropdown",link:function(n,o,t,i){n.$watch(function(){return o.attr("class")},function(){var n,t,e;o.hasClass("open")&&(n=i.dropdownMenu.get(0).getBoundingClientRect().height,e=(t=i.toggleElement.get(0).getBoundingClientRect()).top,r.innerHeight-t.bottom<n&&n<e?o.addClass("dropup"):o.removeClass("dropup"))})}}}n.$inject=["$window"],angular.module("c8y.ui").directive("uibDropdown",n)})();