Blame view
public/js/dist/ef19.0790a598482b009df7f3.js
1.22 KB
e77200db5 Initial commit |
1 |
(window.webpackJsonp=window.webpackJsonp||[]).push([["ef19"],{QlAx:function(e,n){angular.module("fr.matchViewHelper",[]).service("matchViewHelper",["$interval",function(e){function n(e){e.timerStart&&(e.minute=Math.floor((new Date-new Date(e.timerStart))/1e3/60)+1,"1st"==e.status&&e.minute>45?e.minute="45'+":"2nd"==e.status&&(e.minute+=45)>90?e.minute="90'+":e.minute+="'")}return{startMinutesJob:function(t){var a;return"inprogress"!==t.statusType&&"notstarted"!==t.statusType||(a=e(function(){n(t)},3e4),n(t)),a},stopMinutesJob:function(n){n&&e.cancel(n)},setMinutes:n,setMainIncidents:function(e){e.mainIncidents=[],e.homeRedCards=0,e.awayRedCards=0,_(e.incidents).each(function(n){"g"!==n.code.category&&"r"!==n.code.id&&"y2"!==n.code.id||(e.mainIncidents.push(n),"r"!=n.code.id&&"y2"!=n.code.id||("home"==n.side?e.homeRedCards++:e.awayRedCards++))})},arrangeIncidents:function(e){var n={homeGoals:[],awayGoals:[],homeCards:[],awayCards:[]};return _(e.incidents).each(function(e){switch("ps"!==e.code.id&&"psm"!==e.code.id||(e.elapsed="PEN"),e.code.category){case"g":n[e.side+"Goals"].push(e);break;case"c":n[e.side+"Cards"].push(e)}}),n},setScore:function(e){void 0===e.homeScore&&(e.homeScore=0),void 0===e.awayScore&&(e.awayScore=0)}}}])}}]); |