{"size": 4052, "ext": "js", "max_stars_repo_path": "js/app.min.js", "max_stars_repo_name": "andrewperkins32/TSMT1", "max_stars_repo_stars_event_min_datetime": "2018-04-17T16:06:13.000Z", "max_stars_repo_stars_event_max_datetime": "2018-11-24T06:11:22.000Z", "max_issues_repo_path": "js/app.min.js", "max_issues_repo_name": "andrewperkins32/TSMT1", "max_issues_repo_issues_event_min_datetime": "2018-04-18T13:38:47.000Z", "max_issues_repo_issues_event_max_datetime": "2018-11-09T14:35:28.000Z", "max_forks_repo_path": "js/app.min.js", "max_forks_repo_name": "andrewperkins32/TSMT1", "max_forks_repo_forks_event_min_datetime": "2018-04-16T18:32:21.000Z", "max_forks_repo_forks_event_max_datetime": "2018-07-24T02:40:43.000Z"}
{"max_stars_count": 9, "max_issues_count": 20, "max_forks_count": 16, "avg_line_length": 4052.0, "max_line_length": 4052, "alphanum_fraction": 0.7823297137}
var vm="";window.onload=function(){Vue.component("v-select",VueSelect.VueSelect),vm=new Vue({el:"#app",data:{missions:[],defaults:{version:"0.0.0",last_update:"",missions:[],program_types:[],durations:[],series:[],teams:[],positions:[]},activeMissions:[],editingMission:new Mission({requirements:[]}),selectedMission:null,filteredMissions:[],selectedFilter:null,selectedTeam:null,selectedPosition:null},created:function(){var e=this;fetch("js/data/missions.json").then(function(e){return e.json()}).then(function(i){e.$data.missions=getMissionsFromData(i.missions).sort(e.sortByTitle),e.$data.defaults={version:i.version,last_update:void 0!==i.last_update?i.last_update:"",program_types:i.program_types,durations:i.durations,series:i.series,teams:i.teams,positions:i.positions},e.$data.filteredMissions=e.$data.missions}).then(function(){e.$data.activeMissions=e.getActiveMissions()})},watch:{selectedFilter:function(e){"Team Epic"!=e&&(this.$data.selectedTeam=null),this.updateProgramFilter(e)},selectedTeam:function(e){this.updateTeamFilter(e)},selectedPosition:function(e){this.updatePositionFilter(e)}},methods:{sortByTitle:function(e,i){var t=e.title.toLowerCase(),s=i.title.toLowerCase();return t<s?-1:t>s?1:0},handleSelectedMission:function(e){var i=this;null!=i.selectedMission&&(i.hasActiveMission(i.activeMissions,i.selectedMission)||(i.activeMissions.push(i.createActiveMission(i.selectedMission.id)),i.saveActiveMissions()),i.selectedMission=null)},handleEditedMission:function(e){var i=this;i.$refs.editModal.hide(),i.saveActiveMissions()},getActiveMissions:function(){var e=this,i=localStorage.getItem("CurrentActiveMissions");if(null!=i&&JSON.parse(i).length>0){var t=JSON.parse(i);return t.map(function(i){return e.updateActiveMission(i)})}return[]},updateActiveMission:function(e){var i=this,t=i.createActiveMission(e.id);return t.requirements=i.updateMissionRequirements(t,e),t},updateMissionRequirements:function(e,i){return e.requirements.map(function(e){return e.current=i.requirements.filter(function(i){return i.requirement_type===e.requirement_type}).shift().current,e})},createActiveMission:function(e){var i=this,t=i.missions.filter(function(i){return i.id===e}).shift(),s=new Mission(t);return s},saveActiveMissions:function(){var e=this;localStorage.setItem("CurrentActiveMissions",JSON.stringify(e.activeMissions))},hasActiveMission:function(e,i){return e.filter(function(e){return e.id===i.id}).length>0},requirementIncrease:function(e){var i=this;e.current<e.goal&&(e.current+=1),i.saveActiveMissions()},requirementReset:function(e){var i=this;e.current=0,i.saveActiveMissions()},requirementResetAll:function(e){for(var i=e.requirements,t=this,s=0;s<i.length;s++)i[s].current=0;t.saveActiveMissions()},isRequirementComplete:function(e){return e.current>=e.goal},isRequirementStarted:function(e){return e.current>0},areAllRequirementsComplete:function(e){for(var i=!0,t=e.requirements,s=0;s<t.length;s++)t[s].goal>t[s].current&&(i=!1);return i},removeActiveMission:function(e,i){for(var t=this,s=0;s<e.length;s++)if(e[s].id==i.id){e.splice(s,1);break}t.saveActiveMissions()},clearActiveMissions:function(){var e=this;e.activeMissions=[],e.saveActiveMissions()},editMission:function(e){var i=this;i.$data.editingMission=e,i.$refs.editModal.show()},createEmptyMission:function(){return new Mission({requirements:[]})},updateProgramFilter:function(e){this.updateFilter()},updateTeamFilter:function(e){this.updateFilter()},updatePositionFilter:function(e){this.updateFilter()},updateFilter:function(){var e=this;e.$data.filteredMissions=e.$data.missions,e.$data.selectedMission=null,null!=e.$data.selectedFilter&&(e.$data.filteredMissions=e.$data.filteredMissions.filter(function(i){return i.program_type===e.$data.selectedFilter})),null!=e.$data.selectedTeam&&(e.$data.filteredMissions=e.$data.filteredMissions.filter(function(i){return i.team===e.$data.selectedTeam})),null!=e.$data.selectedPosition&&(e.$data.filteredMissions=e.$data.filteredMissions.filter(function(i){return i.position===e.$data.selectedPosition}))}}})};