void 0!==window.wcs_moment_locale&&moment.updateLocale("en",window.wcs_moment_locale),console.log("aaaa");var $lodash=void 0!==window._?window._:void 0!==window.lodash?window.lodash:null,wcs_apps=[],timetables=document.querySelectorAll("div.wcs-vue");Array.prototype.forEach.call(timetables,(function(t,s){console.log("inits");var e=t.getAttribute("id"),i=e.replace("wcs-app-",""),o=window["EventsSchedule_"+i],n=void 0!==o.options?o.options:{},l=void 0!==o.filters?o.filters:{},a="undefined"!==o.feed?o.feed:[],c=[wcs_timetable_mixins];(void 0!==o.css&&void 0!==document.getElementById("wcs_styles")&&null!=document.getElementById("wcs_styles")&&(document.getElementById("wcs_styles").innerHTML+=o.css),!1!==n.mixins)&&n.mixins.split(" ").forEach((function(t){c.push(window[t])}));n.is_single?wcs_apps[s]=new Vue({el:"#"+e,mounted:function(){this.$el.className+=" "+["wcs-vue--mounted"].join(" ")},template:"#wcs_templates_timetable--"+e,data:function(){return{css_classes:[],options:n,single:a,now:moment().utc()}},mixins:c}):wcs_apps[s]=new Vue({el:"#"+e,template:"#wcs_templates_timetable--"+e,created:function(){var t=this;void 0!==this.options.days&&this.options.days||(this.options.days=356),0===a.length?this.getEvents():a.forEach((function(s){-1===t.events_hases.indexOf(s.hash)&&(t.events_hases.push(s.hash),t.filterEvent(s))}))},computed:{schedule_events:function(){let t=this,s=t.getLimit(),e=[],i=!1;return t.events.forEach((function(s){i=!1,t.filter_var(t.options.show_past_events)||!t.filter_var(s.future)&&t.filter_var(s.finished)&&(i=!0),i||e.push(s)})),s>0&&(e=t.events.slice(0,s)),e}},mounted:function(){if(this.css_classes.push(this.hasFilters()?"wcs-timetable--with-filters":"wcs-timetable--without-filters"),this.hasFilters()){switch(!0){case 0===parseInt(this.options.filters_position):this.css_classes.push("wcs-timetable--filters-left");break;case 1===parseInt(this.options.filters_position):this.css_classes.push("wcs-timetable--filters-center");break;case 2===parseInt(this.options.filters_position):this.css_classes.push("wcs-timetable--filters-right")}this.css_classes.push(this.filter_var(this.options.show_filters_opened)?"wcs-timetable--filters-expanded":"wcs-timetable--filters-closed"),this.css_classes.push(void 0!==this.options.label_toggle.length&&this.options.label_toggle.length>0?"wcs-timetable--filters-with-toggle":"wcs-timetable--filters-without-toggle")}},methods:{extendObject:function(t,s){return Object.keys(s).forEach((function(e){t[e]=s[e]})),t},get_utc_offset:function(){let t=window.wcs_locale.gmtOffset,s=0===t.toString().indexOf("-")?"-":"+";"-"===s&&(t=t.substring(1));let e=parseInt(t/3600);e=e<10?"0"+e:e;let i=t%3600;return i=i<10?"0"+i:i,s+e+":"+i}},data:function(){return{lodash:$lodash,el_id:e,css_classes:["wcs-timetable--style-"+n.view],options:n,events:a,events_hases:[],events_filtered:[],filters:l,filters_active:this.getActiveFilters(l),loading:!1,loading_process:!1,loading_history:[],selected_day:!1,iso:!1,iso_expanded_items:[],start:void 0!==n.ts_start?n.ts_start:moment().utcOffset(this.get_utc_offset()).format("YYYY-MM-DD"),stop:void 0!==n.ts_start?n.ts_stop:moment().utcOffset(this.get_utc_offset()).add(parseInt(n.days)-1,"days").format("YYYY-MM-DD"),today:moment().utcOffset(this.get_utc_offset()).format("YYYY-MM-DD"),calendar:{},calendarDay:null,selectedDay:null,dateRange:{start:null,stop:null},dateRangeHistory:[],status:{toggler:!0}}},mixins:c})}));