(()=>{function n(n,o,e,a,t,r){var i,c,s,u="download",l=(i=u,e.location.search.substring(1).split("&").forEach(function(n){n=n.split("=");n[0]===i&&(c=decodeURIComponent(n[1]))}),c),d=(_.get(o.search(),u),n.defer()),h=d.promise,$={},f=!1;t.$on("authStateChange",function(n,o){o.hasAuth&&d.resolve(o.hasAuth)}),t.$on("$routeChangeSuccess",function(n,o){var e;o&&(!(e=(s=_.get(o.params,u))||l)||$[e]||f&&!s||($[e]=h.then(function(){var n;n=e,r({component:"binaryFileDownload",size:"sm",resolve:{binaryId:function(){return n}}})})),l)&&(f=!0)})}n.$inject=["$q","$location","$window","$interval","$rootScope","c8yModal"],angular.module("c8y.binaryFileDownload",[]).run(n)})();