"use strict"; angular.module("dialHorseshoeAppAGP", ["ngAnimate", "ngAria", "ngCookies", "ngResource", "ngRoute", "ngSanitize", "ngTouch"]).config(["$routeProvider", function(a) { a.when("/", { templateUrl: "views/main.html", controller: "MainCtrlAppAGP", controllerAs: "main" }).otherwise({ redirectTo: "/" }) }]), angular.module("dialHorseshoeAppAGP").controller("MainCtrlAppAGP", ["$scope", "$timeout", "$http", function(a, b, c) { a.dails = null, c.get("/cstatic/static/general-election/dail-agp/dail_members.json").success(function(b) { a.dails = b }), a.percentWideEnough = function(b) { return a.windowWidth < 360 ? b > 50 : a.windowWidth < 460 ? b > 35 : a.windowWidth < 620 ? b > 25 : b > 15 }, a.currentDail = 0, a.sliderValue = a.currentDail, a.fadeTimeout = 500, a.getMainCtrlScope = function() { return a }, a.updateSlider = function(b) { b = parseInt(b), b !== a.currentDail && a.updateImage(b) }, a.updateImage = function(b) { parseInt(b) < 0 || parseInt(b) >= a.dails.length || parseInt(b) !== a.currentDail && a.fadeOutImage(b) }, a.fadeOutImage = function(c) { a.startFadeIn = !1, a.startFadeOut = !0, b(function() { a.currentDail = parseInt(c) }, a.fadeTimeout) }, a.fadeInImage = function() { a.startFadeOut = !1, a.startFadeIn = !0 } }]).directive("resize", ["$window", function(a) { return function(b) { var c = angular.element(a); b.$watch(function() { b.windowWidth = c.width(), b.windowWidth < 767 ? (b.showArrows = !0, b.windowWidth < 300 ? b.showMobile = !0 : b.showMobile = !1) : (b.showArrows = !1, b.showMobile = !1) }, !0), c.bind("resize", function() { b.$apply() }) } }]), angular.module("dialHorseshoeAppAGP").run(["$templateCache", function(a) { a.put("views/main.html", '
![]() | ![]() |