(window.webpackJsonp=window.webpackJsonp||[]).push([["bcdb"],{"3y/x":function(t,e,o){"use strict";o.r(e);o("la2R"),o("QlAx"),o("BOl5");angular.module("footyroom").requires.push("fr.matchViewHelper","fr.lastname"),angular.module("footyroom").controller("MatchCtrl",["$scope","$http","lastname","livescores","matchViewHelper",function(t,e,o,a,n){var r,c,l=this;function i(t){_(c).extend(t),"finished"===t.statusType&&r&&setTimeout(function(){r&&(r.disconnect(),r=null)},3e5)}l.match=c=DataStore.match||{},l.homeTeamPerformancePoll=DataStore.homeTeamPerformancePoll,l.awayTeamPerformancePoll=DataStore.awayTeamPerformancePoll,l.lastname=o,l.voteTeamPerformance=function(t,o,a,n){var r=$(n.target);r.html("Voting...");var c={pollRef:t,choices:[{value:(a+1).toString()}]};e.post("/vote",c).success(function(){r.html("Thank you!"),o[1]++}).error(function(t){r.html(t.errors[0])})},l.hoverTeamPerformance=function(t,e,o,a){var n=$(a.target),r=n.html();n.html('Click to vote "'+e[0]+'" with '+e[1]+" others").mouseout(function(){n.html(r)})},l.$onInit=function(){l.gauges={teamPerformance:{home:_(l.homeTeamPerformancePoll.votes).map(function(t){return[t.value,t.votes]}),away:_(l.awayTeamPerformancePoll.votes).map(function(t){return[t.value,t.votes]})}};var e=n.startMinutesJob(c);t.$watchCollection(function(){return c.incidents},function(t,e){t!==e&&_(l).extend(n.arrangeIncidents(c))}),_(l).extend(n.arrangeIncidents(c)),e&&!window.isPrerenderRequest&&((r=a.connect()).on("connect",function(){a.subMatch(c.id,i,i)}),r.on("match-media",function(e){t.$broadcast("match-media",e),t.$apply()}))}}]);o("mxFJ");angular.module("footyroom").directive("motmPoll",function(){return{templateUrl:"/views/ng/motm/poll.html?1",scope:{matchId:"="},controllerAs:"ctrl",bindToController:!0,controller:["$http",function(t){var e=$("[motm-poll-formations]"),o=e.controller("formations").motm=this;o.poll=DataStore.manOfTheMatchPoll||{},o.hasVotes=function(){return o.poll.totalVotes>0},o.vote=function(){$("body").scrollTo(e,300),o.voting=!0},o.close=function(){o.voting=!1},o.clickPlayer=function(e){t.post("/vote",{results:!0,limit:5,pollRef:"motm-"+o.matchId,choices:[{value:e.participant.name,valueType:"participant",valueRef:e.participant.enetId}]}).success(function(t){o.poll=t}),o.close()}}]}}).directive("motmPollFormations",function(){return{compile:function(t){var e=t.find(".formations");e.attr("ng-class",'[{"formations-motm": ctrl.motm.voting},'+e.attr("ng-class")+"]"),e.prepend('
Cast your vote for Man of The Match by choosing any player below.
'),e.find(".player--field, .substitute, .squad-player").attr("ng-click","ctrl.motm.voting && ctrl.motm.clickPlayer(player)").addClass("motm-eligible")}}});o("KZ2r"),o("KupW"),o("opNK");angular.module("fr.review",["fr.formations"]).directive("matchStats",function(){return{restrict:"A",replace:!0,templateUrl:"match-stats-template",controller:["$scope","$rootScope","$attrs",function(t,e,o){t.stats=o.matchStats.split(", "),t.withSupported=function(t){return _.where(e.data.match.stats,{type:t,side:"home"}).length||_.where(e.data.match.stats,{type:t,side:"away"}).length},t.formatStatName=function(t){return"possesion"===t&&(t="possession"),t.replace(/-/g," ")},t.homeValue=function(t){var o=_.findWhere(e.data.match.stats,{type:t,side:"home"});return o&&o.value||0},t.awayValue=function(t){var o=_.findWhere(e.data.match.stats,{type:t,side:"away"});return o&&o.value||0},t.percentage=function(t,e){return t/(t+e)*100}}]}}).directive("gauge",function(){return{restrict:"A",templateUrl:"gauge-template",scope:!0,link:function(t,e,o){e.find("ul"),t.gaugeId=o.id,t.data=t.$eval(o.data),t.onItemClick=t.$eval(o.onItemClick),t.onItemHover=t.$eval(o.onItemHover);var a=_.reduce(t.data,function(t,e){return t+e[1]},0);_.each(t.data,function(t){t[2]=t[1]/a*100})}}}),angular.module("footyroom").requires.push("fr.review")},xeH2:function(t,e){t.exports=jQuery}},[["3y/x","d41d","970b","c5ee","1090","91fe","14aa","decc","028d","ef19"]]]);