function getMatchState(t,e){const a=Math.ceil(new Date/1e3);var c="";switch(t){case 5:c=_locModel.T.T_Stat_Pen;break;case 4:c=_locModel.T.T_Stat_OverTime;break;case 3:c=_locModel.T.T_Stat_S_Part2;break;case 2:c=_locModel.T.T_HT;break;case 1:c=_locModel.T.T_Stat_S_Part1;break;case 0:c="&nbsp";break;case-1:c=_locModel.T.T_Stat_Finished;break;case-10:c=_locModel.T.T_Stat_Cancel;break;case-11:c=_locModel.T.T_Stat_Pending;break;case-12:c=_locModel.T.T_Stat_Abd;break;case-13:c=_locModel.T.T_Stat_Pause;break;case-14:c=_locModel.T.T_Stat_Postpone}var h="'";if(1==t){let t=(a-e)/60;t=Math.ceil(t),c=t<=0?"1'":t<=45?t.toString()+h:"45+'"}else if(3==t){let t=(a-e)/60+46;t=Math.ceil(t),c=t<=46?"46'":t<=90?t.toString()+h:"90+'"}else 4==t?c="Hiệp phụ":-1==t&&(c="Kết thúc");return c}function loadMatchScore(t){var e=_ENDPOINT_BF+"/Ajax/SoccerAjax?type=11&id="+t;bomHelper.ajaxGet(e,updateMatchScore),window.setTimeout("loadMatchScore("+_scheduleID+")",6e4)}function updateMatchScore(t){var e="";CheckEmpty(t)||0==(t=JSON.parse(t)).ErrCode&&(e=t.Data),CheckEmpty(e)||(""!==e.match.mTime2?jQuery("#liveSt").show().html(getMatchState(e.match.state,e.match.mTime2)):jQuery("#liveSt").html(getMatchState(e.match.state,e.match.mTime)),jQuery("#liveFt").html(e.match.state>0||-1==e.match.state?e.match.hScore+" - "+e.match.gScore:"VS"),jQuery(".detailScore__divider").html(e.match.state>0||-1==e.match.state?"-":"VS"),jQuery("#liveHS").html(e.match.state>0||-1==e.match.state?e.match.hScore:""),jQuery("#liveGS").html(e.match.state>0||-1==e.match.state?e.match.gScore:""),jQuery("#liveHt").show().html(e.match.state>=2||-1==e.match.state?"("+e.match.hHalfScore+" - "+e.match.gHalfScore+")":""))}loadMatchScore(_scheduleID);
