text: !function(){"use strict";function e(e,n){return{replace:!0,restrict:"E",link:function(o,i,r){if(t(i[0]),!r.for)throw new Error("You must specify for what open dropdown component is attached (container id).");var d,c=r.toggleClick===!0||"true"===r.toggleClick;n(function(){if(d=document.getElementById(r.for),!d)throw new Error("Cant find a container to attach to.");d.addEventListener("keydown",f),d.addEventListener("click",p),document.addEventListener("mousedown",l)},100),r.isOpened&&o.$watch(r.isOpened,function(e){a()||s(e)});var s=function(e){i[0].style.display=e===!0?"block":"none",d&&e===!0&&r.fitWidthToAttachedContainer&&"false"!==r.fitWidthToAttachedContainer&&"0"!==r.fitWidthToAttachedContainer&&(i[0].style.width=d.offsetWidth-2+"px")},a=function(){return r.disabled?e(r.disabled)(o):!1},u=function(t){a()||(r.isOpened?(e(r.isOpened).assign(o,t),o.$digest()):s(t))},l=function(e){i[0].contains(e.target)||d.contains(e.target)||u(!1)},f=function(e){switch(e.keyCode){case 38:case 40:return e.preventDefault(),void u(!0);case 27:case 9:return void u(!1);default:return}},p=function(){var e=c&&"none"!==i[0].style.display;u(!e)};o.$on("$destroy",function(){d&&(document.removeEventListener("mousedown",l),d.removeEventListener("keydown",f),d.removeEventListener("click",p))})}}}function t(e){e.style.display="none",e.style.position="absolute",e.style.zIndex||(e.style.zIndex=1),e.style.background||(e.style.background="#FFF"),e.style.border||(e.style.border="1px solid #cccccc")}angular.module("openDropdown",[]),angular.module("openDropdown").directive("openDropdown",e),e.$inject=["$parse","$timeout"]}();