// source --> https://www.centroaletti.com/wp-content/plugins/modern-events-calendar/assets/js/frontend.js?ver=5.5.5 // MEC Single Event Displayer var mecSingleEventDisplayer = { getSinglePage: function(id, occurrence, ajaxurl, layout) { if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-modal-preloader'); jQuery.ajax( { url: ajaxurl, data: "action=mec_load_single_page&id="+id+(occurrence != null ? "&occurrence="+occurrence : "")+"&layout="+layout, type: "get", success: function(response) { jQuery('.mec-modal-result').removeClass("mec-modal-preloader"); lity(response); }, error: function() { } }); } }; // MEC SEARCH FORM PLUGIN (function($) { $.fn.mecSearchForm = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, search_form_element: '', atts: '', callback: function() { } }, options); $("#mec_sf_category_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_location_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_organizer_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_label_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_s_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_month_"+settings.id).on('change', function(e) { search(); }); $("#mec_sf_year_"+settings.id).on('change', function(e) { // Change Month to January if it's set to ignore date and year changed if($("#mec_sf_month_"+settings.id).val() === 'ignore_date') $("#mec_sf_month_"+settings.id).val('01'); search(); }); function search() { var s = $("#mec_sf_s_"+settings.id).length ? $("#mec_sf_s_"+settings.id).val() : ''; var category = $("#mec_sf_category_"+settings.id).length ? $("#mec_sf_category_"+settings.id).val() : ''; var location = $("#mec_sf_location_"+settings.id).length ? $("#mec_sf_location_"+settings.id).val() : ''; var organizer = $("#mec_sf_organizer_"+settings.id).length ? $("#mec_sf_organizer_"+settings.id).val() : ''; var label = $("#mec_sf_label_"+settings.id).length ? $("#mec_sf_label_"+settings.id).val() : ''; var month = $("#mec_sf_month_"+settings.id).length ? $("#mec_sf_month_"+settings.id).val() : ''; var year = $("#mec_sf_year_"+settings.id).length ? $("#mec_sf_year_"+settings.id).val() : ''; var skip_date = false; if(month === 'ignore_date') skip_date = true; // Skip filter by date if(skip_date === true) { month = ''; year = ''; } var atts = settings.atts+'&sf[s]='+s+'&sf[month]='+month+'&sf[year]='+year+'&sf[category]='+category+'&sf[location]='+location+'&sf[organizer]='+organizer+'&sf[label]='+label; settings.callback(atts); } }; }(jQuery)); // MEC GOOGLE MAPS PLUGIN (function($) { $.fn.mecGoogleMaps = function(options) { // Default Options var settings = $.extend( { // These are the defaults. latitude: 0, longitude: 0, autoinit: true, zoom: 14, icon: '../img/m-01.png', markers: {}, sf: {}, getDirection: 0, directionOptions: { form: '#mec_get_direction_form', reset: '.mec-map-get-direction-reset', addr: '#mec_get_direction_addr', destination: {}, }, }, options); var bounds; var map; var infowindow; var loadedMarkers = new Array(); var canvas = this; var DOM = canvas[0]; // Init the Map if(settings.autoinit) init(); function init() { // Search Widget if(settings.sf.container !== '') { $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; getMarkers(); } }); } // Create the options bounds = new google.maps.LatLngBounds(); var center = new google.maps.LatLng(settings.latitude, settings.longitude); var mapOptions = { scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP, center: center, zoom: settings.zoom, styles: settings.styles, }; // Init map map = new google.maps.Map(DOM, mapOptions); // Init Infowindow infowindow = new google.maps.InfoWindow( { pixelOffset: new google.maps.Size(0, -37) }); // Load Markers loadMarkers(settings.markers); // Initialize get direction feature if(settings.getDirection === 1) initSimpleGetDirection(); else if(settings.getDirection === 2) initAdvancedGetDirection(); } function loadMarkers(markers) { var f = 0; for(var i in markers) { f++; var dataMarker = markers[i]; var marker = new RichMarker( { position: new google.maps.LatLng(dataMarker.latitude, dataMarker.longitude), map: map, event_ids: dataMarker.event_ids, infowindow: dataMarker.infowindow, lightbox: dataMarker.lightbox, icon: (dataMarker.icon ? dataMarker.icon : settings.icon), content: '
'+dataMarker.count+'
', shadow: 'none' }); // Marker Info-Window google.maps.event.addListener(marker, 'mouseover', function(event) { infowindow.close(); infowindow.setContent(this.infowindow); infowindow.open(map, this); }); // Marker Lightbox google.maps.event.addListener(marker, 'click', function(event) { lity(this.lightbox); }); // extend the bounds to include each marker's position bounds.extend(marker.position); // Added to Markers loadedMarkers.push(marker); } if(f > 1) map.fitBounds(bounds); // Set map center if only 1 marker found if(f === 1) { map.setCenter(new google.maps.LatLng(dataMarker.latitude, dataMarker.longitude)); } } function getMarkers() { // Add loader $("#mec_googlemap_canvas"+settings.id).addClass("mec-loading"); $.ajax( { url: settings.ajax_url, data: "action=mec_map_get_markers&"+settings.atts, dataType: "json", type: "post", success: function(response) { // Remove Markers removeMarkers(); // Load Markers loadMarkers(response.markers); // Remove loader $("#mec_googlemap_canvas"+settings.id).removeClass("mec-loading"); }, error: function() { // Remove loader $("#mec_googlemap_canvas"+settings.id).removeClass("mec-loading"); } }); } function removeMarkers() { bounds = new google.maps.LatLngBounds(); if(loadedMarkers) { for(i=0; i < loadedMarkers.length; i++) loadedMarkers[i].setMap(null); loadedMarkers.length = 0; } } var directionsDisplay; var directionsService; var startMarker; var endMarker; function initSimpleGetDirection() { $(settings.directionOptions.form).on('submit', function(event) { event.preventDefault(); var from = $(settings.directionOptions.addr).val(); var dest = new google.maps.LatLng(settings.directionOptions.destination.latitude, settings.directionOptions.destination.longitude); // Reset the direction if(typeof directionsDisplay !== 'undefined') { directionsDisplay.setMap(null); startMarker.setMap(null); endMarker.setMap(null); } // Fade Google Maps canvas $(canvas).fadeTo(300, .4); directionsDisplay = new google.maps.DirectionsRenderer({suppressMarkers: true}); directionsService = new google.maps.DirectionsService(); var request = { origin: from, destination: dest, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if(status === google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); directionsDisplay.setMap(map); var leg = response.routes[0].legs[0]; startMarker = new google.maps.Marker( { position: leg.start_location, map: map, icon: settings.directionOptions.startMarker, }); endMarker = new google.maps.Marker( { position: leg.end_location, map: map, icon: settings.directionOptions.endMarker, }); } // Fade Google Maps canvas $(canvas).fadeTo(300, 1); }); // Show reset button $(settings.directionOptions.reset).removeClass('mec-util-hidden'); }); $(settings.directionOptions.reset).on('click', function(event) { $(settings.directionOptions.addr).val(''); $(settings.directionOptions.form).submit(); // Hide reset button $(settings.directionOptions.reset).addClass('mec-util-hidden'); }); } function initAdvancedGetDirection() { $(settings.directionOptions.form).on('submit', function(event) { event.preventDefault(); var from = $(settings.directionOptions.addr).val(); var url = 'https://maps.google.com/?saddr='+encodeURIComponent(from)+'&daddr='+settings.directionOptions.destination.latitude+','+settings.directionOptions.destination.longitude; window.open(url); }); } return { init: function() { init(); } }; }; }(jQuery)); // MEC FULL CALENDAR PLUGIN (function($) { $.fn.mecFullCalendar = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, skin: '', }, options); // Set onclick Listeners setListeners(); var sf; function setListeners() { // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(); } }); } // Add the onclick event $("#mec_skin_"+settings.id+" .mec-totalcal-box .mec-totalcal-view span").on('click', function(e) { e.preventDefault(); var skin = $(this).data('skin'); $(this).addClass('mec-totalcalview-selected').siblings().removeClass('mec-totalcalview-selected'); loadSkin(skin); }); } function loadSkin(skin) { // Set new Skin settings.skin = skin; // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_full_calendar_switch_skin&skin="+skin+"&"+settings.atts+"&apply_sf_date=1&sed="+settings.sed_method, dataType: "json", type: "post", success: function(response) { $("#mec_full_calendar_container_"+settings.id).html(response); // Remove loader $('.mec-modal-result').removeClass("mec-month-navigator-loading"); }, error: function() { } }); } function search() { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_full_calendar_switch_skin&skin="+settings.skin+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { $("#mec_full_calendar_container_"+settings.id).html(response); // Remove loader $('.mec-modal-result').removeClass("mec-month-navigator-loading"); }, error: function() { } }); } }; }(jQuery)); // MEC YEARLY VIEW PLUGIN (function($) { $.fn.mecYearlyView = function(options) { var active_year; // Default Options var settings = $.extend( { // These are the defaults. today: null, id: 0, events_label: 'Events', event_label: 'Event', year_navigator: 0, atts: '', next_year: {}, sf: {}, ajax_url: '', }, options); // Initialize Year Navigator if(settings.year_navigator) initYearNavigator(); // Load Next Year in background if(settings.year_navigator) setYear(settings.next_year.year, true); // Set onclick Listeners setListeners(); // load more $(document).on("click", "#mec_skin_events_"+settings.id+" .mec-load-more-button", function() { var year = $(this).parent().parent().parent().data('year-id'); loadMoreButton(year); }); // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(active_year); } }); } function initYearNavigator() { // Remove the onclick event $("#mec_skin_"+settings.id+" .mec-load-year").off("click"); // Add onclick event $("#mec_skin_"+settings.id+" .mec-load-year").on("click", function() { var year = $(this).data("mec-year"); setYear(year); }); } function search(year) { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_yearly_view_load_year&mec_year="+year+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { active_year = response.current_year.year; // Append Year $("#mec_skin_events_"+settings.id).html('
'+response.year+'
'); // Append Year Navigator $("#mec_skin_"+settings.id+" .mec-yearly-title-sec").append('
'+response.navigator+'
'); // Re-initialize Year Navigator initYearNavigator(); // Set onclick Listeners setListeners(); // Toggle Year toggleYear(response.current_year.id); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); }, error: function() { } }); } function setYear(year, do_in_background) { if(typeof do_in_background === "undefined") do_in_background = false; var year_id = year; active_year = year; // Year exists so we just show it if($("#mec_yearly_view_year_"+settings.id+"_"+year_id).length) { // Toggle Year toggleYear(year_id); } else { if(!do_in_background) { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); } $.ajax( { url: settings.ajax_url, data: "action=mec_yearly_view_load_year&mec_year="+year+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { // Append Year $("#mec_skin_events_"+settings.id).append('
'+response.year+'
'); // Append Year Navigator $("#mec_skin_"+settings.id+" .mec-yearly-title-sec").append('
'+response.navigator+'
'); // Re-initialize Year Navigator initYearNavigator(); // Set onclick Listeners setListeners(); if(!do_in_background) { // Toggle Year toggleYear(response.current_year.id); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Set Year Filter values in search widget $("#mec_sf_year_"+settings.id).val(year); } else { $("#mec_yearly_view_year_"+settings.id+"_"+response.current_year.id).hide(); $("#mec_year_navigator_"+settings.id+"_"+response.current_year.id).hide(); } }, error: function() { } }); } } function toggleYear(year_id) { // Toggle Year Navigator $("#mec_skin_"+settings.id+" .mec-year-navigator").hide(); $("#mec_year_navigator_"+settings.id+"_"+year_id).show(); // Toggle Year $("#mec_skin_"+settings.id+" .mec-year-container").hide(); $("#mec_yearly_view_year_"+settings.id+"_"+year_id).show(); } var sf; function setListeners() { // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-agenda-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } function loadMoreButton(year) { var $max_count, $current_count = 0; $max_count = $("#mec_yearly_view_year_"+settings.id+"_"+year+ " .mec-yearly-max").data('count'); $current_count = $("#mec_yearly_view_year_"+settings.id+"_"+year+ " .mec-util-hidden").length; if($current_count > 10) { for(var i = 0; i < 10; i++) { $("#mec_yearly_view_year_"+settings.id+"_"+year+ " .mec-util-hidden").slice(0, 2).each(function() { $(this).removeClass('mec-util-hidden'); }); } } if($current_count < 10 && $current_count != 0) { for(var j = 0; j < $current_count; j++) { $("#mec_yearly_view_year_"+settings.id+"_"+year+ " .mec-util-hidden").slice(0, 2).each(function() { $(this).removeClass('mec-util-hidden'); $("#mec_yearly_view_year_"+settings.id+"_"+year+ " .mec-load-more-wrap").css('display', 'none'); }); } } } }; }(jQuery)); // MEC MONTHLY VIEW PLUGIN (function($) { $.fn.mecMonthlyView = function(options) { var active_month; var active_year; // Default Options var settings = $.extend( { // These are the defaults. today: null, id: 0, events_label: 'Events', event_label: 'Event', month_navigator: 0, atts: '', next_month: {}, sf: {}, ajax_url: '', }, options); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(); // Load Next Month in background setMonth(settings.next_month.year, settings.next_month.month, true); // Set onclick Listeners setListeners(); // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(active_year, active_month); } }); } function initMonthNavigator() { // Remove the onclick event $("#mec_skin_"+settings.id+" .mec-load-month").off("click"); // Add onclick event $("#mec_skin_"+settings.id+" .mec-load-month").on("click", function() { var year = $(this).data("mec-year"); var month = $(this).data("mec-month"); setMonth(year, month); }); } function search(year, month) { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_monthly_view_load_month&mec_year="+year+"&mec_month="+month+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { active_month = response.current_month.month; active_year = response.current_month.year; // Append Month $("#mec_skin_events_"+settings.id).html('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-monthly-view-month-navigator-container").html('
'+response.navigator+'
'); // Append Events Side $("#mec_skin_"+settings.id+" .mec-calendar-events-side").html('
'+response.events_side+'
'); // Re-initialize Month Navigator initMonthNavigator(); // Set onclick Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); }, error: function() { } }); } function setMonth(year, month, do_in_background) { if(typeof do_in_background === "undefined") do_in_background = false; var month_id = year+""+month; active_month = month; active_year = year; // Month exists so we just show it if($("#mec_monthly_view_month_"+settings.id+"_"+month_id).length) { // Toggle Month toggleMonth(month_id); } else { if(!do_in_background) { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); } $.ajax( { url: settings.ajax_url, data: "action=mec_monthly_view_load_month&mec_year="+year+"&mec_month="+month+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { // Append Month $("#mec_skin_events_"+settings.id).append('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-monthly-view-month-navigator-container").append('
'+response.navigator+'
'); // Append Events Side $("#mec_skin_"+settings.id+" .mec-calendar-events-side").append('
'+response.events_side+'
'); // Re-initialize Month Navigator initMonthNavigator(); // Set onclick Listeners setListeners(); if(!do_in_background) { // Toggle Month toggleMonth(response.current_month.id); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Set Month Filter values in search widget $("#mec_sf_month_"+settings.id).val(month); $("#mec_sf_year_"+settings.id).val(year); } else { $("#mec_monthly_view_month_"+settings.id+"_"+response.current_month.id).hide(); $("#mec_month_navigator_"+settings.id+"_"+response.current_month.id).hide(); $("#mec_month_side_"+settings.id+"_"+response.current_month.id).hide(); } }, error: function() { } }); } } function toggleMonth(month_id) { var active_month = $("#mec_skin_"+settings.id+" .mec-month-container-selected").data("month-id"); var active_day = $("#mec_monthly_view_month_"+settings.id+"_"+active_month+" .mec-selected-day").data("day"); if(active_day <= 9) active_day = "0"+active_day; // Toggle Month Navigator $("#mec_skin_"+settings.id+" .mec-month-navigator").hide(); $("#mec_month_navigator_"+settings.id+"_"+month_id).show(); // Toggle Month $("#mec_skin_"+settings.id+" .mec-month-container").hide(); $("#mec_monthly_view_month_"+settings.id+"_"+month_id).show(); // Add selected class $("#mec_skin_"+settings.id+" .mec-month-container").removeClass("mec-month-container-selected"); $("#mec_monthly_view_month_"+settings.id+"_"+month_id).addClass("mec-month-container-selected"); // Toggle Events Side $("#mec_skin_"+settings.id+" .mec-month-side").hide(); $("#mec_month_side_"+settings.id+"_"+month_id).show(); } var sf; function setListeners() { // Remove the onclick event $("#mec_skin_"+settings.id+" .mec-has-event").off("click"); // Add the onclick event $("#mec_skin_"+settings.id+" .mec-has-event").on('click', function(e) { e.preventDefault(); // define variables var $this = $(this), data_mec_cell = $this.data('mec-cell'), month_id = $this.data('month'); $("#mec_monthly_view_month_"+settings.id+"_"+month_id+" .mec-calendar-day").removeClass('mec-selected-day'); $this.addClass('mec-selected-day'); $('#mec_month_side_'+settings.id+'_'+month_id+' .mec-calendar-events-sec:not([data-mec-cell=' + data_mec_cell + '])').slideUp(); $('#mec_month_side_'+settings.id+'_'+month_id+' .mec-calendar-events-sec[data-mec-cell=' + data_mec_cell + ']').slideDown(); $('#mec_monthly_view_month_'+settings.id+'_'+month_id+' .mec-calendar-events-sec:not([data-mec-cell=' + data_mec_cell + '])').slideUp(); $('#mec_monthly_view_month_'+settings.id+'_'+month_id+' .mec-calendar-events-sec[data-mec-cell=' + data_mec_cell + ']').slideDown(); }); // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC WEEKLY VIEW PLUGIN (function($) { $.fn.mecWeeklyView = function(options) { var active_year; var active_month; var active_week; var active_week_number; // Default Options var settings = $.extend( { // These are the defaults. today: null, week: 1, id: 0, changeWeekElement: '.mec-load-week', month_navigator: 0, atts: '', ajax_url: '', sf: {} }, options); // Search Widget if(settings.sf.container !== '') { $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(active_year, active_month, active_week); } }); } // Set The Week setThisWeek(settings.month_id+settings.week); // Set Listeners setListeners(); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(settings.month_id); function setListeners() { $(settings.changeWeekElement).off('click').on('click', function() { var week = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('week-id'); var max_weeks = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('max-weeks'); var new_week_number = active_week_number; if($(this).hasClass('mec-previous-month')) { week = parseInt(week)-1; new_week_number--; } else { week = parseInt(week)+1; new_week_number++; } if(new_week_number <= 1 || new_week_number >= max_weeks) { // Disable Next/Previous Button $(this).css({'opacity': .6, 'cursor': 'default'}); $(this).find('i').css({'opacity': .6, 'cursor': 'default'}); } else { // Enable Next/Previous Buttons $('#mec_skin_'+settings.id+' .mec-load-week, #mec_skin_'+settings.id+' .mec-load-week i').css({'opacity': 1, 'cursor': 'pointer'}); } // Week is not in valid range if(new_week_number === 0 || new_week_number > max_weeks) { } else { setThisWeek(week); } }); // Single Event Method if(settings.sed_method != '0') { sed(); } } function setThisWeek(week) { // Week is not exists if(!$('#mec_weekly_view_week_'+settings.id+'_'+week).length) { return setThisWeek((parseInt(week)-1)); } // Set week to active in week list $('#mec_skin_'+settings.id+' .mec-weekly-view-week').removeClass('mec-weekly-view-week-active'); $('#mec_weekly_view_week_'+settings.id+'_'+week).addClass('mec-weekly-view-week-active'); // Show related events $('#mec_skin_'+settings.id+' .mec-weekly-view-date-events').addClass('mec-util-hidden'); $('.mec-weekly-view-week-'+settings.id+'-'+week).removeClass('mec-util-hidden'); active_week = week; active_week_number = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('week-number'); $('#mec_skin_'+settings.id+' .mec-calendar-d-top').find('.mec-current-week').find('span').remove(); $('#mec_skin_'+settings.id+' .mec-calendar-d-top').find('.mec-current-week').append(''+active_week_number+''); if(active_week_number === 1) { // Disable Previous Button $('#mec_skin_'+settings.id+' .mec-previous-month.mec-load-week').css({'opacity': .6, 'cursor': 'default'}); $('#mec_skin_'+settings.id+' .mec-previous-month.mec-load-week').find('i').css({'opacity': .6, 'cursor': 'default'}); } } function initMonthNavigator(month_id) { $('#mec_month_navigator'+settings.id+'_'+month_id+' .mec-load-month').off('click'); $('#mec_month_navigator'+settings.id+'_'+month_id+' .mec-load-month').on('click', function() { var year = $(this).data('mec-year'); var month = $(this).data('mec-month'); setMonth(year, month, active_week); }); } function search(year, month, week) { var week_number = (String(week).slice(-1)); // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_weekly_view_load_month&mec_year="+year+"&mec_month="+month+"&mec_week="+week_number+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).html('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-weekly-view-month-navigator-container").html('
'+response.navigator+'
'); // Set Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id); // Set active week setThisWeek(response.week_id); }, error: function() { } }); } function setMonth(year, month, week) { var month_id = ''+year+month; var week_number = (String(week).slice(-1)); active_month = month; active_year = year; // Month exists so we just show it if($("#mec_weekly_view_month_"+settings.id+"_"+month_id).length) { // Toggle Month toggleMonth(month_id); // Set active week setThisWeek(''+month_id+week_number); } else { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_weekly_view_load_month&mec_year="+year+"&mec_month="+month+"&mec_week="+week_number+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).append('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-weekly-view-month-navigator-container").append('
'+response.navigator+'
'); // Set Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id); // Set active week setThisWeek(response.week_id); // Set Month Filter values in search widget $("#mec_sf_month_"+settings.id).val(month); $("#mec_sf_year_"+settings.id).val(year); }, error: function() { } }); } } function toggleMonth(month_id) { // Show related events $('#mec_skin_'+settings.id+' .mec-month-container').addClass('mec-util-hidden'); $('#mec_weekly_view_month_'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); $('#mec_skin_'+settings.id+' .mec-month-navigator').addClass('mec-util-hidden'); $('#mec_month_navigator'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(month_id); } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC DAILY VIEW PLUGIN (function($) { $.fn.mecDailyView = function(options) { var active_month; var active_year; var active_day; // Default Options var settings = $.extend( { // These are the defaults. today: null, id: 0, changeDayElement: '.mec-daily-view-day', events_label: 'Events', event_label: 'Event', month_navigator: 0, atts: '', ajax_url: '', sf: {}, }, options); active_month = settings.month; active_year = settings.year; active_day = settings.day; // Set Today setToday(settings.today); // Set Listeners setListeners(); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(settings.month_id); // Initialize Days Slider initDaysSlider(settings.month_id); // Search Widget if(settings.sf.container !== '') { $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(active_year, active_month, active_day); } }); } function setListeners() { $(settings.changeDayElement).on('click', function() { var today = $(this).data('day-id'); setToday(today); }); // Single Event Method if(settings.sed_method != '0') { sed(); } } var current_monthday; function setToday(today) { // For caring about 31st, 30th and 29th of some months if(!$('#mec_daily_view_day'+settings.id+'_'+today).length) { setToday(parseInt(today)-1); return false; } // Set day to active in day list $('.mec-daily-view-day').removeClass('mec-daily-view-day-active mec-color'); $('#mec_daily_view_day'+settings.id+'_'+today).addClass('mec-daily-view-day-active mec-color'); // Show related events $('.mec-daily-view-date-events').addClass('mec-util-hidden'); $('#mec_daily_view_date_events'+settings.id+'_'+today).removeClass('mec-util-hidden'); // Set today label var weekday = $('#mec_daily_view_day'+settings.id+'_'+today).data('day-weekday'); var monthday = $('#mec_daily_view_day'+settings.id+'_'+today).data('day-monthday'); var count = $('#mec_daily_view_day'+settings.id+'_'+today).data('events-count'); var month_id = $('#mec_daily_view_day'+settings.id+'_'+today).data('month-id'); $('#mec_today_container'+settings.id+'_'+month_id).html('

'+monthday+'

'+weekday+'

'+count+' '+(count > 1 ? settings.events_label : settings.event_label)+'
'); if(monthday <= 9) current_monthday = '0'+monthday; else current_monthday = monthday; } function initMonthNavigator(month_id) { $('#mec_month_navigator'+settings.id+'_'+month_id+' .mec-load-month').off('click'); $('#mec_month_navigator'+settings.id+'_'+month_id+' .mec-load-month').on('click', function() { var year = $(this).data('mec-year'); var month = $(this).data('mec-month'); setMonth(year, month, current_monthday); }); } function initDaysSlider(month_id, day_id) { // Init Days slider var owl = $("#mec-owl-calendar-d-table-"+settings.id+"-"+month_id); owl.owlCarousel( { items : 22, //22 items above 1000px browser width responsiveClass: true, responsive: { 479: { items: 4, }, 767: { items: 7, }, 960: { items: 14, }, 1000: { items: 19, } }, dots: false, loop: true, }); // Custom Navigation Events $("#mec_daily_view_month_"+settings.id+"_"+month_id+" .mec-table-d-next").click(function(e) { e.preventDefault(); owl.trigger('owl.next'); }); $("#mec_daily_view_month_"+settings.id+"_"+month_id+" .mec-table-d-prev").click(function(e) { e.preventDefault(); owl.trigger('owl.prev'); }); if(typeof day_id === 'undefined') day_id = $('.mec-daily-view-day-active').data('day-id'); var today_str = day_id.toString().substring(6,8); var today_int = parseInt(today_str); owl.trigger('owl.goTo', [today_int]); } function search(year, month, day) { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_daily_view_load_month&mec_year="+year+"&mec_month="+month+"&mec_day="+day+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).html('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-calendar-a-month.mec-clear").html('
'+response.navigator+'
'); // Set Listeners setListeners(); active_year = response.current_month.year; active_month = response.current_month.month; active_day = '01'; // Toggle Month toggleMonth(response.current_month.id, ''+active_year+active_month+active_day); // Set Today setToday(''+active_year+active_month+active_day); }, error: function() { } }); } function setMonth(year, month, day) { var month_id = '' + year + month; active_month = month; active_year = year; active_day = day; // Month exists so we just show it if($("#mec_daily_view_month_"+settings.id+"_"+month_id).length) { // Toggle Month toggleMonth(month_id); // Set Today setToday(''+month_id+day); } else { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_daily_view_load_month&mec_year="+year+"&mec_month="+month+"&mec_day="+day+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).append('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-calendar-a-month.mec-clear").append('
'+response.navigator+'
'); // Set Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id, ''+year+month+'01'); // Set Today setToday(''+year+month+'01'); // Set Month Filter values in search widget $("#mec_sf_month_"+settings.id).val(month); $("#mec_sf_year_"+settings.id).val(year); }, error: function() { } }); } } function toggleMonth(month_id, day_id) { // Show related events $('#mec_skin_'+settings.id+' .mec-month-container').addClass('mec-util-hidden'); $('#mec_daily_view_month_'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); $('#mec_skin_'+settings.id+' .mec-month-navigator').addClass('mec-util-hidden'); $('#mec_month_navigator'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(month_id); // Initialize Days Slider initDaysSlider(month_id, day_id); } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC TIMETABLE PLUGIN (function($) { $.fn.mecTimeTable = function(options) { var active_year; var active_month; var active_week; var active_week_number; var active_day; // Default Options var settings = $.extend( { // These are the defaults. today: null, week: 1, active_day: 1, id: 0, changeWeekElement: '.mec-load-week', month_navigator: 0, atts: '', ajax_url: '', sf: {} }, options); // Search Widget if(settings.sf.container !== '') { $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(active_year, active_month, active_week, active_day); } }); } // Set The Week setThisWeek(settings.month_id+settings.week, settings.active_day); // Set Listeners setListeners(); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(settings.month_id); function setListeners() { // Change Week Listener $(settings.changeWeekElement).off('click').on('click', function() { var week = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('week-id'); var max_weeks = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('max-weeks'); var new_week_number = active_week_number; if($(this).hasClass('mec-previous-month')) { week = parseInt(week)-1; new_week_number--; } else { week = parseInt(week)+1; new_week_number++; } if(new_week_number <= 1 || new_week_number >= max_weeks) { // Disable Next/Previous Button $(this).css({'opacity': .6, 'cursor': 'default'}); $(this).find('i').css({'opacity': .6, 'cursor': 'default'}); } else { // Enable Next/Previous Buttons $('#mec_skin_'+settings.id+' .mec-load-week, #mec_skin_'+settings.id+' .mec-load-week i').css({'opacity': 1, 'cursor': 'pointer'}); } // Week is not in valid range if(new_week_number === 0 || new_week_number > max_weeks) { } else { setThisWeek(week); } }); // Change Day Listener $('#mec_skin_'+settings.id+' .mec-weekly-view-week dt').not('.mec-timetable-has-no-event').off('click').on('click', function() { var day = $(this).data('date-id'); setDay(day); }); // Single Event Method if(settings.sed_method != '0') { sed(); } } function setThisWeek(week, day) { // Week is not exists if(!$('#mec_weekly_view_week_'+settings.id+'_'+week).length) { return setThisWeek((parseInt(week)-1), day); } // Set week to active in week list $('#mec_skin_'+settings.id+' .mec-weekly-view-week').removeClass('mec-weekly-view-week-active'); $('#mec_weekly_view_week_'+settings.id+'_'+week).addClass('mec-weekly-view-week-active'); setDay(day); active_week = week; active_week_number = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active').data('week-number'); $('#mec_skin_'+settings.id+' .mec-calendar-d-top').find('.mec-current-week').find('span').remove(); $('#mec_skin_'+settings.id+' .mec-calendar-d-top').find('.mec-current-week').append(''+active_week_number+''); if(active_week_number === 1) { // Disable Previous Button $('#mec_skin_'+settings.id+' .mec-previous-month.mec-load-week').css({'opacity': .6, 'cursor': 'default'}); $('#mec_skin_'+settings.id+' .mec-previous-month.mec-load-week').find('i').css({'opacity': .6, 'cursor': 'default'}); } } function setDay(day) { // Find the date automatically if(typeof day === 'undefined') { day = $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active dt').not('.mec-timetable-has-no-event').first().data('date-id'); } // Activate the date element $('#mec_skin_'+settings.id+' dt').removeClass('mec-timetable-day-active'); $('#mec_skin_'+settings.id+' .mec-weekly-view-week-active dt[data-date-id="'+day+'"]').addClass('mec-timetable-day-active'); // Show related events $('#mec_skin_'+settings.id+' .mec-weekly-view-date-events').addClass('mec-util-hidden'); $('#mec_weekly_view_date_events'+settings.id+'_'+day).removeClass('mec-util-hidden'); } function initMonthNavigator(month_id) { $('#mec_month_navigator'+settings.id+'_'+month_id+' .mec-load-month').off('click').on('click', function() { var year = $(this).data('mec-year'); var month = $(this).data('mec-month'); setMonth(year, month, active_week); }); } function search(year, month, week) { var week_number = (String(week).slice(-1)); // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_timetable_load_month&mec_year="+year+"&mec_month="+month+"&mec_week="+week_number+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).html('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-weekly-view-month-navigator-container").html('
'+response.navigator+'
'); // Set Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id); // Set active week setThisWeek(response.week_id); }, error: function() { } }); } function setMonth(year, month, week) { var month_id = ''+year+month; var week_number = (String(week).slice(-1)); active_month = month; active_year = year; // Month exists so we just show it if($("#mec_timetable_month_"+settings.id+"_"+month_id).length) { // Toggle Month toggleMonth(month_id); // Set active week setThisWeek(''+month_id+week_number); } else { // Add Loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_timetable_load_month&mec_year="+year+"&mec_month="+month+"&mec_week="+week_number+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { // Remove Loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Append Month $("#mec_skin_events_"+settings.id).append('
'+response.month+'
'); // Append Month Navigator $("#mec_skin_"+settings.id+" .mec-skin-weekly-view-month-navigator-container").append('
'+response.navigator+'
'); // Set Listeners setListeners(); // Toggle Month toggleMonth(response.current_month.id); // Set active week setThisWeek(response.week_id); // Set Month Filter values in search widget $("#mec_sf_month_"+settings.id).val(month); $("#mec_sf_year_"+settings.id).val(year); }, error: function() { } }); } } function toggleMonth(month_id) { // Show related events $('#mec_skin_'+settings.id+' .mec-month-container').addClass('mec-util-hidden'); $('#mec_timetable_month_'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); $('#mec_skin_'+settings.id+' .mec-month-navigator').addClass('mec-util-hidden'); $('#mec_month_navigator'+settings.id+'_'+month_id).removeClass('mec-util-hidden'); // Initialize Month Navigator if(settings.month_navigator) initMonthNavigator(month_id); } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-timetable-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC WEEKLY PROGRAM PLUGIN (function($) { $.fn.mecWeeklyProgram = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, sf: {} }, options); console.log(settings); // Set Listeners setListeners(); function setListeners() { // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC MASONRY VIEW PLUGIN (function($) { $.fn.mecMasonryView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, end_date: '', offset: 0, start_date: '', }, options); // Set onclick Listeners setListeners(); // Init Masonry jQuery(window).load(function(){ initMasonry(); }); function initMasonry() { var $container = $("#mec_skin_"+settings.id+" .mec-event-masonry"); $container.isotope( { filter: '*', animationOptions: { duration: 750, easing: 'linear', queue: false } }); $("#mec_skin_"+settings.id+" .mec-events-masonry-cats a").click(function() { var selector = $(this).attr('data-filter'); $container.isotope( { filter: selector, animationOptions: { duration: 750, easing: 'linear', queue: false } }); return false; }); var $optionSets = $("#mec_skin_"+settings.id+" .mec-events-masonry-cats"), $optionLinks = $optionSets.find('a'); $optionLinks.click(function() { var $this = $(this); // don't proceed if already selected if($this.hasClass('selected')) return false; var $optionSet = $this.parents('.mec-events-masonry-cats'); $optionSet.find('.mec-masonry-cat-selected').removeClass('mec-masonry-cat-selected'); $this.addClass('mec-masonry-cat-selected'); }); } function setListeners() { // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a, #mec_skin_"+settings.id+" .mec-booking-button").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } }; }(jQuery)); // MEC LIST VIEW PLUGIN (function($) { $.fn.mecListView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, current_month_divider: '', end_date: '', offset: 0, }, options); // Set onclick Listeners setListeners(); var sf; function setListeners() { // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(); } }); } $("#mec_skin_"+settings.id+" .mec-load-more-button").on("click", function() { loadMore(); }); // Accordion Toggle if(settings.style === 'accordion') accordion(); // Single Event Method if(settings.sed_method != '0') { sed(); } } function accordion() { // Accordion Toggle $("#mec_skin_"+settings.id+" .mec-toggle-item-inner").off("click").on("click", function(event) { event.preventDefault(); var $this = $(this); $(this).parent().find(".mec-content-toggle").slideToggle("fast", function() { $this.children("i").toggleClass("mec-sl-arrow-down mec-sl-arrow-up"); }); // Trigger Google Map var unique_id = $(this).parent().find(".mec-modal-wrap").data('unique-id'); window['mec_init_gmap'+unique_id](); }); } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a, #mec_skin_"+settings.id+" .mec-booking-button, #mec_skin_"+settings.id+" .mec-detail-button").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } function loadMore() { // Add loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-load-more-loading"); $.ajax( { url: settings.ajax_url, data: "action=mec_list_load_more&mec_start_date="+settings.end_date+"&mec_offset="+settings.offset+"&"+settings.atts+"¤t_month_divider="+settings.current_month_divider+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Hide load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); } else { // Show load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Append Items $("#mec_skin_events_"+settings.id).append(response.html); // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; settings.current_month_divider = response.current_month_divider; // Single Event Method if(settings.sed_method != '0') { sed(); } // Accordion Toggle if(settings.style === 'accordion') accordion(); } }, error: function() { } }); } function search() { // Hide no event message $("#mec_skin_no_events_"+settings.id).addClass("mec-util-hidden"); // Add loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_list_load_more&mec_start_date="+settings.start_date+"&"+settings.atts+"¤t_month_divider=0&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Append Items $("#mec_skin_events_"+settings.id).html(''); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Hide it $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Show no event message $("#mec_skin_no_events_"+settings.id).removeClass("mec-util-hidden"); } else { // Append Items $("#mec_skin_events_"+settings.id).html(response.html); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Show load more button if(response.count >= settings.limit) $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Hide load more button else $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; settings.current_month_divider = response.current_month_divider; // Single Event Method if(settings.sed_method != '0') { sed(); } // Accordion Toggle if(settings.style === 'accordion') accordion(); } }, error: function() { } }); } }; }(jQuery)); // MEC GRID VIEW PLUGIN (function($) { $.fn.mecGridView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, end_date: '', offset: 0, start_date: '', }, options); // Set onclick Listeners setListeners(); var sf; function setListeners() { // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(); } }); } $("#mec_skin_"+settings.id+" .mec-load-more-button").on("click", function() { loadMore(); }); // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-event-title a, #mec_skin_"+settings.id+" .mec-booking-button").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } function loadMore() { // Add loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-load-more-loading"); $.ajax( { url: settings.ajax_url, data: "action=mec_grid_load_more&mec_start_date="+settings.end_date+"&mec_offset="+settings.offset+"&"+settings.atts+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Hide load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); } else { // Show load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Append Items $("#mec_skin_events_"+settings.id).append(response.html); // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; // Single Event Method if(settings.sed_method != '0') { sed(); } } }, error: function() { } }); } function search() { // Hide no event message $("#mec_skin_no_events_"+settings.id).addClass("mec-util-hidden"); // Add loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_grid_load_more&mec_start_date="+settings.start_date+"&"+settings.atts+"&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Append Items $("#mec_skin_events_"+settings.id).html(''); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Hide it $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Show no event message $("#mec_skin_no_events_"+settings.id).removeClass("mec-util-hidden"); } else { // Append Items $("#mec_skin_events_"+settings.id).html(response.html); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Show load more button if(response.count >= settings.limit) $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Hide load more button else $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; // Single Event Method if(settings.sed_method != '0') { sed(); } } }, error: function() { } }); } }; }(jQuery)); // MEC AGENDA VIEW PLUGIN (function($) { $.fn.mecAgendaView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, current_month_divider: '', end_date: '', offset: 0, }, options); // Set onclick Listeners setListeners(); var sf; function setListeners() { // Search Widget if(settings.sf.container !== '') { sf = $(settings.sf.container).mecSearchForm( { id: settings.id, atts: settings.atts, callback: function(atts) { settings.atts = atts; search(); } }); } $("#mec_skin_"+settings.id+" .mec-load-more-button").on("click", function() { loadMore(); }); // Single Event Method if(settings.sed_method != '0') { sed(); } } function sed() { // Single Event Display $("#mec_skin_"+settings.id+" .mec-agenda-event-title a").off('click').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); var id = $(this).data('event-id'); var occurrence = get_parameter_by_name('occurrence', href); mecSingleEventDisplayer.getSinglePage(id, occurrence, settings.ajax_url, settings.sed_method); }); } function loadMore() { // Add loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-load-more-loading"); $.ajax( { url: settings.ajax_url, data: "action=mec_agenda_load_more&mec_start_date="+settings.end_date+"&mec_offset="+settings.offset+"&"+settings.atts+"¤t_month_divider="+settings.current_month_divider+"&apply_sf_date=0", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Hide load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); } else { // Show load more button $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Append Items $("#mec_skin_events_"+settings.id+" .mec-events-agenda-container").append(response.html); // Remove loading Class $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-load-more-loading"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; settings.current_month_divider = response.current_month_divider; // Single Event Method if(settings.sed_method != '0') { sed(); } } }, error: function() { } }); } function search() { // Hide no event message $("#mec_skin_no_events_"+settings.id).addClass("mec-util-hidden"); // Add loading Class if(jQuery('.mec-modal-result').length === 0) jQuery('.mec-wrap').append('
'); jQuery('.mec-modal-result').addClass('mec-month-navigator-loading'); $.ajax( { url: settings.ajax_url, data: "action=mec_agenda_load_more&mec_start_date="+settings.start_date+"&"+settings.atts+"¤t_month_divider=0&apply_sf_date=1", dataType: "json", type: "post", success: function(response) { if(response.count == "0") { // Append Items $("#mec_skin_events_"+settings.id+" .mec-events-agenda-container").html(''); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Hide it $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Show no event message $("#mec_skin_no_events_"+settings.id).removeClass("mec-util-hidden"); } else { // Append Items $("#mec_skin_events_"+settings.id+" .mec-events-agenda-container").html(response.html); // Remove loading Class $('.mec-modal-result').removeClass("mec-month-navigator-loading"); // Show load more button if(response.count >= settings.limit) $("#mec_skin_"+settings.id+" .mec-load-more-button").removeClass("mec-util-hidden"); // Hide load more button else $("#mec_skin_"+settings.id+" .mec-load-more-button").addClass("mec-util-hidden"); // Update the variables settings.end_date = response.end_date; settings.offset = response.offset; settings.current_month_divider = response.current_month_divider; // Single Event Method if(settings.sed_method != '0') { sed(); } } }, error: function() { } }); } }; }(jQuery)); // MEC CAROUSEL VIEW PLUGIN (function($) { $.fn.mecCarouselView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', ajax_url: '', sf: {}, items: 3, autoplay:'', style: 'type1', start_date: '' }, options); // Init Sliders initSlider(); function initSlider() { if(settings.style === 'type1') { // Start carousel skin var owl = $("#mec_skin_"+settings.id+" .mec-event-carousel-type1 .mec-owl-carousel"); owl.owlCarousel( { autoplay: true, autoplayTimeout: settings.autoplay, // Set AutoPlay to 3 seconds loop: true, items: settings.items, responsiveClass: true, responsive: { 0: { items: 1, }, 979: { items: 2, }, 1199: { items: settings.count, } }, dots: true, nav: false, autoplayHoverPause:true }); } else { $("#mec_skin_"+settings.id+" .mec-owl-carousel").owlCarousel( { autoplay: true, loop: true, autoplayTimeout: settings.autoplay, items: settings.items, dots: false, nav: true, responsiveClass: true, responsive: { 0: { items: 1, }, 979: { items: 2, }, 1199: { items: settings.count, } }, autoplayHoverPause:true, navText: [""," "], }); } } }; }(jQuery)); // MEC SLIDER VIEW PLUGIN (function($) { $.fn.mecSliderView = function(options) { // Default Options var settings = $.extend( { // These are the defaults. id: 0, atts: '', autoplay: false, ajax_url: '', sf: {}, start_date: '' }, options); // Init Sliders initSlider(); function initSlider() { $("#mec_skin_"+settings.id+" .mec-owl-carousel").owlCarousel( { autoplay: true, autoplayTimeout: settings.autoplay, loop: true, items: 1, responsiveClass: true, responsive: { 0: { items: 1, }, 960: { items: 1, }, 1200: { items: 1, } }, dots: false, nav: true, autoplayHoverPause: true, navText: ["", " "], }); } }; }(jQuery)); // MEC COUNTDOWN MODULE (function($) { $.fn.mecCountDown = function(options, callBack) { // Default Options var settings = $.extend( { // These are the defaults. date: null, format: null }, options); var callback = callBack; var selector = $(this); startCountdown(); var interval = setInterval(startCountdown, 1000); function startCountdown() { var eventDate = Date.parse(settings.date) / 1000; var currentDate = Math.floor($.now() / 1000); if(eventDate <= currentDate) { callback.call(this); clearInterval(interval); } var seconds = eventDate - currentDate; var days = Math.floor(seconds / (60 * 60 * 24)); seconds -= days * 60 * 60 * 24; var hours = Math.floor(seconds / (60 * 60)); seconds -= hours * 60 * 60; var minutes = Math.floor(seconds / 60); seconds -= minutes * 60; if(days == 1) selector.find(".mec-timeRefDays").text(mecdata.day); else selector.find(".mec-timeRefDays").text(mecdata.days); if(hours == 1) selector.find(".mec-timeRefHours").text(mecdata.hour); else selector.find(".mec-timeRefHours").text(mecdata.hours); if(minutes == 1) selector.find(".mec-timeRefMinutes").text(mecdata.minute); else selector.find(".mec-timeRefMinutes").text(mecdata.minutes); if(seconds == 1) selector.find(".mec-timeRefSeconds").text(mecdata.second); else selector.find(".mec-timeRefSeconds").text(mecdata.seconds); if(settings.format === "on") { days = (String(days).length >= 2) ? days : "0" + days; hours = (String(hours).length >= 2) ? hours : "0" + hours; minutes = (String(minutes).length >= 2) ? minutes : "0" + minutes; seconds = (String(seconds).length >= 2) ? seconds : "0" + seconds; } if(!isNaN(eventDate)) { selector.find(".mec-days").text(days); selector.find(".mec-hours").text(hours); selector.find(".mec-minutes").text(minutes); selector.find(".mec-seconds").text(seconds); } else { clearInterval(interval); } } }; }(jQuery)); function mec_gateway_selected(gateway_id) { // Hide all gateway forms jQuery('.mec-book-form-gateway-checkout').addClass('mec-util-hidden'); // Show selected gateway form jQuery('#mec_book_form_gateway_checkout'+gateway_id).removeClass('mec-util-hidden'); } function mec_wrap_resize() { var $mec_wrap = jQuery('.mec-wrap'), mec_width = $mec_wrap.width(); if(mec_width < 959) { $mec_wrap.addClass('mec-sm959'); } else { $mec_wrap.removeClass('mec-sm959'); } } function get_parameter_by_name(name, url) { if(!url) { url = window.location.href; } name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if(!results) return null; if(!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } // TODO must be cleaned JS codes (function($) { $(document).ready(function() { // MEC WIDGET CAROUSEL $(".mec-widget .mec-event-grid-classic").addClass('mec-owl-carousel mec-owl-theme'); $(".mec-widget .mec-event-grid-classic").owlCarousel( { autoplay: true, autoplayTimeout: 3000, // Set AutoPlay to 3 seconds autoplayHoverPause: true, loop: true, dots: false, nav: true, navText: ["", " "], items: 1, autoHeight: true, responsiveClass: true, }); // add mec-sm959 class if mec-wrap div size < 959 mec_wrap_resize(); jQuery(window).bind('resize', function() { mec_wrap_resize(); }); // Fixed: social hover in iphone $('.mec-event-sharing-wrap').hover(function() { $(this).find('.mec-event-sharing').show(0); }, function() { $(this).find('.mec-event-sharing').hide(0); }); // Register Booking Smooth Scroll $('a[href="#mec-events-meta-group-booking"]').click(function() { if(location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if(target.length) { var scrollTopVal = target.offset().top - 30; $('html, body').animate( { scrollTop: scrollTopVal }, 600); return false; } } }); }); })(jQuery); // source --> https://www.centroaletti.com/wp-content/plugins/modern-events-calendar/assets/js/events.js?ver=5.5.5 jQuery(document).ready(function($) { // Image picker on terms menu $('.mec_upload_image_button').click(function(event) { event.preventDefault(); var frame; if(frame) { frame.open(); return; } frame = wp.media(); frame.on('select', function() { // Grab the selected attachment. var attachment = frame.state().get('selection').first(); $('#mec_thumbnail_img').html(''); $('#mec_thumbnail').val(attachment.attributes.url); $('.mec_remove_image_button').toggleClass('mec-util-hidden'); frame.close(); }); frame.open(); }); // Image remover on terms menu $('.mec_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_thumbnail_img').html(''); $('#mec_thumbnail').val(''); $('.mec_remove_image_button').toggleClass('mec-util-hidden'); }); // Image picker on add event menu for location $('.mec_location_upload_image_button').click(function(event) { event.preventDefault(); var frame; if(frame) { frame.open(); return; } frame = wp.media(); frame.on('select', function() { // Grab the selected attachment. var attachment = frame.state().get('selection').first(); $('#mec_location_thumbnail_img').html(''); $('#mec_location_thumbnail').val(attachment.attributes.url); $('.mec_location_remove_image_button').toggleClass('mec-util-hidden'); frame.close(); }); frame.open(); }); // Image remover on add event menu for location $('.mec_location_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_location_thumbnail_img').html(''); $('#mec_location_thumbnail').val(''); $('.mec_location_remove_image_button').toggleClass('mec-util-hidden'); }); // Image picker on add event menu for organizer $('.mec_organizer_upload_image_button').click(function(event) { event.preventDefault(); var frame; if(frame) { frame.open(); return; } frame = wp.media(); frame.on('select', function() { // Grab the selected attachment. var attachment = frame.state().get('selection').first(); $('#mec_organizer_thumbnail_img').html(''); $('#mec_organizer_thumbnail').val(attachment.attributes.url); $('.mec_organizer_remove_image_button').toggleClass('mec-util-hidden'); frame.close(); }); frame.open(); }); // Image remover on add event menu for organizer $('.mec_organizer_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_organizer_thumbnail_img').html(''); $('#mec_organizer_thumbnail').val(''); $('.mec_organizer_remove_image_button').toggleClass('mec-util-hidden'); }); // Image remover on frontend event submission menu $('#mec_fes_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_fes_thumbnail_img').html(''); $('#mec_fes_thumbnail').val(''); $('#mec_featured_image_file').val(''); $('#mec_fes_remove_image_button').addClass('mec-util-hidden'); }); // Location Image remover on frontend event submission menu $('#mec_fes_location_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_fes_location_thumbnail_img').html(''); $('#mec_fes_location_thumbnail').val(''); $('#mec_fes_location_thumbnail_file').val(''); $('#mec_fes_location_remove_image_button').addClass('mec-util-hidden'); }); // Organizer Image remover on frontend event submission menu $('#mec_fes_organizer_remove_image_button').click(function(event) { event.preventDefault(); $('#mec_fes_organizer_thumbnail_img').html(''); $('#mec_fes_organizer_thumbnail').val(''); $('#mec_fes_organizer_thumbnail_file').val(''); $('#mec_fes_organizer_remove_image_button').addClass('mec-util-hidden'); }); $('#mec_start_date').datepicker( { changeYear: true, changeMonth: true, dateFormat: 'yy-mm-dd', gotoCurrent: true, yearRange: 'c-3:c+5', }); $('#mec_end_date').datepicker( { changeYear: true, changeMonth: true, dateFormat: 'yy-mm-dd', gotoCurrent: true, yearRange: 'c-3:c+5', }); $('#mec_date_repeat_end_at_date').datepicker( { changeYear: true, changeMonth: true, dateFormat: 'yy-mm-dd', gotoCurrent: true, yearRange: 'c-3:c+5', }); $('.mec_date_picker').datepicker( { changeYear: true, changeMonth: true, dateFormat: 'yy-mm-dd', gotoCurrent: true, yearRange: 'c-3:c+5', }); $('#mec_location_id').on('change', function() { mec_location_toggle(); }); $('#mec_organizer_id').on('change', function() { mec_organizer_toggle(); }); mec_location_toggle(); mec_organizer_toggle() $('#mec_repeat').on('change', function() { mec_repeat_toggle(); }); mec_repeat_toggle(); $('#mec_repeat_type').on('change', function() { mec_repeat_type_toggle(); }); mec_repeat_type_toggle(); $('#mec_bookings_limit_unlimited').on('change', function() { mec_bookings_unlimited_toggle(); }); $('#mec_add_in_days').on('click', function() { var date = $('#mec_exceptions_in_days_date').val(); if(date === '') return false; var key = $('#mec_new_in_days_key').val(); var html = $('#mec_new_in_days_raw').html().replace(/:i:/g, key).replace(/:val:/g, date); $('#mec_in_days').append(html); $('#mec_new_in_days_key').val(parseInt(key)+1); }); $('#mec_add_not_in_days').on('click', function() { var date = $('#mec_exceptions_not_in_days_date').val(); if(date === '') return false; var key = $('#mec_new_not_in_days_key').val(); var html = $('#mec_new_not_in_days_raw').html().replace(/:i:/g, key).replace(/:val:/g, date); $('#mec_not_in_days').append(html); $('#mec_new_not_in_days_key').val(parseInt(key)+1); }); $('#mec_add_ticket_button').on('click', function() { var key = $('#mec_new_ticket_key').val(); var html = $('#mec_new_ticket_raw').html().replace(/:i:/g, key); $('#mec_tickets').append(html); $('#mec_new_ticket_key').val(parseInt(key)+1); }); $('#mec_add_hourly_schedule_button').on('click', function() { var key = $('#mec_new_hourly_schedule_key').val(); var html = $('#mec_new_hourly_schedule_raw').html().replace(/:i:/g, key); $('#mec_hourly_schedules').append(html); $('#mec_new_hourly_schedule_key').val(parseInt(key)+1); }); $('#mec_add_fee_button').on('click', function() { var key = $('#mec_new_fee_key').val(); var html = $('#mec_new_fee_raw').html().replace(/:i:/g, key); $('#mec_fees_list').append(html); $('#mec_new_fee_key').val(parseInt(key)+1); }); $('.mec-form-row.mec-available-color-row span').on('click', function() { $('.mec-form-row.mec-available-color-row span').removeClass('color-selected'); $(this).addClass('color-selected'); }); $('#mec_reg_form_field_types button').on('click', function() { var type = $(this).data('type'); var key = $('#mec_new_reg_field_key').val(); var html = $('#mec_reg_field_'+type).html().replace(/:i:/g, key); $('#mec_reg_form_fields').append(html); $('#mec_new_reg_field_key').val(parseInt(key)+1); // Set onclick listener for add option fields mec_reg_fields_option_listeners(); }); // Set onclick listener for add option fields mec_reg_fields_option_listeners(); }); function mec_location_toggle() { if(jQuery('#mec_location_id').val() != '0') jQuery('#mec_location_new_container').hide(); else jQuery('#mec_location_new_container').show(); } function mec_organizer_toggle() { if(jQuery('#mec_organizer_id').val() != '0') jQuery('#mec_organizer_new_container').hide(); else jQuery('#mec_organizer_new_container').show(); } function mec_repeat_toggle() { if(jQuery('#mec_repeat').is(':checked')) jQuery('.mec-form-repeating-event-row').show(); else jQuery('.mec-form-repeating-event-row').hide(); } function mec_repeat_type_toggle() { var repeat_type = jQuery('#mec_repeat_type').val(); if(repeat_type == 'certain_weekdays') { jQuery('#mec_repeat_interval_container').hide(); jQuery('#mec_repeat_certain_weekdays_container').show(); jQuery('#mec_exceptions_in_days_container').hide(); } else if(repeat_type == 'custom_days') { jQuery('#mec_repeat_interval_container').hide(); jQuery('#mec_repeat_certain_weekdays_container').hide(); jQuery('#mec_exceptions_in_days_container').show(); } else if(repeat_type != 'daily' && repeat_type != 'weekly') { jQuery('#mec_repeat_interval_container').hide(); jQuery('#mec_repeat_certain_weekdays_container').hide(); jQuery('#mec_exceptions_in_days_container').hide(); } else { jQuery('#mec_repeat_interval_container').show(); jQuery('#mec_repeat_certain_weekdays_container').hide(); jQuery('#mec_exceptions_in_days_container').hide(); } } function mec_in_days_remove(i) { jQuery('#mec_in_days_row'+i).remove(); } function mec_not_in_days_remove(i) { jQuery('#mec_not_in_days_row'+i).remove(); } function mec_bookings_unlimited_toggle() { jQuery('#mec_bookings_limit').toggleClass('mec-util-hidden'); } function mec_hourly_schedule_remove(i) { jQuery("#mec_hourly_schedule_row"+i).remove(); } function mec_ticket_remove(i) { jQuery("#mec_ticket_row"+i).remove(); } function mec_set_event_color(color) { try { jQuery("#mec_event_color").wpColorPicker('color', '#'+color); } catch(e) { jQuery("#mec_event_color").val(color); } } function mec_remove_fee(key) { jQuery("#mec_fee_row"+key).remove(); } function mec_reg_fields_option_listeners() { jQuery('button.mec-reg-field-add-option').on('click', function() { var field_id = jQuery(this).data('field-id'); var key = jQuery('#mec_new_reg_field_option_key_'+field_id).val(); var html = jQuery('#mec_reg_field_option').html().replace(/:i:/g, key).replace(/:fi:/g, field_id); jQuery('#mec_reg_fields_'+field_id+'_options_container').append(html); jQuery('#mec_new_reg_field_option_key_'+field_id).val(parseInt(key)+1); }); if(typeof jQuery.fn.sortable !== 'undefined') { jQuery("#mec_reg_form_fields").sortable( { handle: '.mec_reg_field_sort' }); jQuery(".mec_reg_fields_options_container").sortable( { handle: '.mec_reg_field_option_sort' }); } } function mec_reg_fields_option_remove(field_key, key) { jQuery("#mec_reg_fields_option_"+field_key+"_"+key).remove(); }; // source --> https://www.centroaletti.com/wp-content/plugins/modern-events-calendar/assets/packages/lity/lity.min.js?ver=5.5.5 /*! Lity - v2.1.0 - 2016-09-19 * http://sorgalla.com/lity/ * Copyright (c) 2015-2016 Jan Sorgalla; Licensed MIT */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){var b=A();return L&&a.length?(a.one(L,b.resolve),setTimeout(b.resolve,500)):b.resolve(),b.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(a){for(var b,c=decodeURI(a.split("#")[0]).split("&"),d={},e=0,f=c.length;e-1?"&":"?")+b.param(c)}function g(a,b){var c=a.indexOf("#");return-1===c?b:(c>0&&(a=a.substr(c)),b+a)}function h(a){return b('').append(a)}function i(a,c){var d=c.opener()&&c.opener().data("lity-desc")||"Image with no description",e=b(''+d+''),f=A(),g=function(){f.reject(h("Failed loading image"))};return e.on("load",function(){return 0===this.naturalWidth?g():void f.resolve(e)}).on("error",g),f.promise()}function j(a,c){var d,e,f;try{d=b(a)}catch(a){return!1}return!!d.length&&(e=b(''),f=d.hasClass("lity-hide"),c.element().one("lity:remove",function(){e.before(d).remove(),f&&!d.closest(".lity-content").length&&d.addClass("lity-hide")}),d.removeClass("lity-hide").after(e))}function k(a){var c=I.exec(a);return!!c&&n(g(a,f("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},e(c[5]||"")))))}function l(a){var c=J.exec(a);return!!c&&n(g(a,f("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},e(c[4]||"")))))}function m(a){var b=K.exec(a);return!!b&&n(g(a,f("https://www.google."+b[3]+"/maps?"+b[6],{output:b[6].indexOf("layer=c")>0?"svembed":"embed"})))}function n(a){return'
'; } else if (video.type === 'vimeo') { html = ''; } else if (video.type === 'vzaar') { html = ''; } $('
' + html + '
').insertAfter(item.find('.owl-video')); this._playing = item.addClass('owl-video-playing'); }; /** * Checks whether an video is currently in full screen mode or not. * @todo Bad style because looks like a readonly method but changes members. * @protected * @returns {Boolean} */ Video.prototype.isInFullScreen = function () { var element = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement; return element && $(element).parent().hasClass('owl-video-frame'); }; /** * Destroys the plugin. */ Video.prototype.destroy = function () { var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.Video = Video; })(window.Zepto || window.jQuery, window, document); /** * Animate Plugin * @version 2.1.0 * @author Bartosz Wojciechowski * @author David Deutsch * @license The MIT License (MIT) */ ; (function ($, window, document, undefined) { /** * Creates the animate plugin. * @class The Navigation Plugin * @param {Owl} scope - The Owl Carousel */ var Animate = function (scope) { this.core = scope; this.core.options = $.extend({}, Animate.Defaults, this.core.options); this.swapping = true; this.previous = undefined; this.next = undefined; this.handlers = { 'change.owl.carousel': $.proxy(function (e) { if (e.namespace && e.property.name == 'position') { this.previous = this.core.current(); this.next = e.property.value; } }, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function (e) { if (e.namespace) { this.swapping = e.type == 'translated'; } }, this), 'translate.owl.carousel': $.proxy(function (e) { if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) { this.swap(); } }, this) }; this.core.$element.on(this.handlers); }; /** * Default options. * @public */ Animate.Defaults = { animateOut: false, animateIn: false }; /** * Toggles the animation classes whenever an translations starts. * @protected * @returns {Boolean|undefined} */ Animate.prototype.swap = function () { if (this.core.settings.items !== 1) { return; } if (!$.support.animation || !$.support.transition) { return; } this.core.speed(0); var left, clear = $.proxy(this.clear, this), previous = this.core.$stage.children().eq(this.previous), next = this.core.$stage.children().eq(this.next), incoming = this.core.settings.animateIn, outgoing = this.core.settings.animateOut; if (this.core.current() === this.previous) { return; } if (outgoing) { left = this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.one($.support.animation.end, clear) .css({ 'left': left + 'px' }) .addClass('animated owl-animated-out') .addClass(outgoing); } if (incoming) { next.one($.support.animation.end, clear) .addClass('animated owl-animated-in') .addClass(incoming); } }; Animate.prototype.clear = function (e) { $(e.target).css({ 'left': '' }) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.onTransitionEnd(); }; /** * Destroys the plugin. * @public */ Animate.prototype.destroy = function () { var handler, property; for (handler in this.handlers) { this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.Animate = Animate; })(window.Zepto || window.jQuery, window, document); /** * Autoplay Plugin * @version 2.1.0 * @author Bartosz Wojciechowski * @author Artus Kolanowski * @author David Deutsch * @license The MIT License (MIT) */ ; (function ($, window, document, undefined) { /** * Creates the autoplay plugin. * @class The Autoplay Plugin * @param {Owl} scope - The Owl Carousel */ var Autoplay = function (carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * The autoplay timeout. * @type {Timeout} */ this._timeout = null; /** * Indicates whenever the autoplay is paused. * @type {Boolean} */ this._paused = false; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'changed.owl.carousel': $.proxy(function (e) { if (e.namespace && e.property.name === 'settings') { if (this._core.settings.autoplay) { this.play(); } else { this.stop(); } } else if (e.namespace && e.property.name === 'position') { //console.log('play?', e); if (this._core.settings.autoplay) { this._setAutoPlayInterval(); } } }, this), 'initialized.owl.carousel': $.proxy(function (e) { if (e.namespace && this._core.settings.autoplay) { this.play(); } }, this), 'play.owl.autoplay': $.proxy(function (e, t, s) { if (e.namespace) { this.play(t, s); } }, this), 'stop.owl.autoplay': $.proxy(function (e) { if (e.namespace) { this.stop(); } }, this), 'mouseover.owl.autoplay': $.proxy(function () { if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { this.pause(); } }, this), 'mouseleave.owl.autoplay': $.proxy(function () { if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { this.play(); } }, this), 'touchstart.owl.core': $.proxy(function () { if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { this.pause(); } }, this), 'touchend.owl.core': $.proxy(function () { if (this._core.settings.autoplayHoverPause) { this.play(); } }, this) }; // register event handlers this._core.$element.on(this._handlers); // set default options this._core.options = $.extend({}, Autoplay.Defaults, this._core.options); }; /** * Default options. * @public */ Autoplay.Defaults = { autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; /** * Starts the autoplay. * @public * @param {Number} [timeout] - The interval before the next animation starts. * @param {Number} [speed] - The animation speed for the animations. */ Autoplay.prototype.play = function (timeout, speed) { this._paused = false; if (this._core.is('rotating')) { return; } this._core.enter('rotating'); this._setAutoPlayInterval(); }; /** * Gets a new timeout * @private * @param {Number} [timeout] - The interval before the next animation starts. * @param {Number} [speed] - The animation speed for the animations. * @return {Timeout} */ Autoplay.prototype._getNextTimeout = function (timeout, speed) { if (this._timeout) { window.clearTimeout(this._timeout); } return window.setTimeout($.proxy(function () { if (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) { return; } this._core.next(speed || this._core.settings.autoplaySpeed); }, this), timeout || this._core.settings.autoplayTimeout); }; /** * Sets autoplay in motion. * @private */ Autoplay.prototype._setAutoPlayInterval = function () { this._timeout = this._getNextTimeout(); }; /** * Stops the autoplay. * @public */ Autoplay.prototype.stop = function () { if (!this._core.is('rotating')) { return; } window.clearTimeout(this._timeout); this._core.leave('rotating'); }; /** * Stops the autoplay. * @public */ Autoplay.prototype.pause = function () { if (!this._core.is('rotating')) { return; } this._paused = true; }; /** * Destroys the plugin. */ Autoplay.prototype.destroy = function () { var handler, property; this.stop(); for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay; })(window.Zepto || window.jQuery, window, document); /** * Navigation Plugin * @version 2.1.0 * @author Artus Kolanowski * @author David Deutsch * @license The MIT License (MIT) */ ; (function ($, window, document, undefined) { 'use strict'; /** * Creates the navigation plugin. * @class The Navigation Plugin * @param {Owl} carousel - The Owl Carousel. */ var Navigation = function (carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * Indicates whether the plugin is initialized or not. * @protected * @type {Boolean} */ this._initialized = false; /** * The current paging indexes. * @protected * @type {Array} */ this._pages = []; /** * All DOM elements of the user interface. * @protected * @type {Object} */ this._controls = {}; /** * Markup for an indicator. * @protected * @type {Array.} */ this._templates = []; /** * The carousel element. * @type {jQuery} */ this.$element = this._core.$element; /** * Overridden methods of the carousel. * @protected * @type {Object} */ this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'prepared.owl.carousel': $.proxy(function (e) { if (e.namespace && this._core.settings.dotsData) { this._templates.push('
' + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
'); } }, this), 'added.owl.carousel': $.proxy(function (e) { if (e.namespace && this._core.settings.dotsData) { this._templates.splice(e.position, 0, this._templates.pop()); } }, this), 'remove.owl.carousel': $.proxy(function (e) { if (e.namespace && this._core.settings.dotsData) { this._templates.splice(e.position, 1); } }, this), 'changed.owl.carousel': $.proxy(function (e) { if (e.namespace && e.property.name == 'position') { this.draw(); } }, this), 'initialized.owl.carousel': $.proxy(function (e) { if (e.namespace && !this._initialized) { this._core.trigger('initialize', null, 'navigation'); this.initialize(); this.update(); this.draw(); this._initialized = true; this._core.trigger('initialized', null, 'navigation'); } }, this), 'refreshed.owl.carousel': $.proxy(function (e) { if (e.namespace && this._initialized) { this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); } }, this) }; // set default options this._core.options = $.extend({}, Navigation.Defaults, this._core.options); // register event handlers this.$element.on(this._handlers); }; /** * Default options. * @public * @todo Rename `slideBy` to `navBy` */ Navigation.Defaults = { nav: false, navText: ['prev', 'next'], navSpeed: false, navElement: 'div', navContainer: false, navContainerClass: 'owl-nav', navClass: ['owl-prev', 'owl-next'], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotsData: false, dotsSpeed: false, dotsContainer: false }; /** * Initializes the layout of the plugin and extends the carousel. * @protected */ Navigation.prototype.initialize = function () { var override, settings = this._core.settings; // create DOM structure for relative navigation this._controls.$relative = (settings.navContainer ? $(settings.navContainer) : $('
').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); this._controls.$previous = $('<' + settings.navElement + '>') .addClass(settings.navClass[0]) .html(settings.navText[0]) .prependTo(this._controls.$relative) .on('click', $.proxy(function (e) { this.prev(settings.navSpeed); }, this)); this._controls.$next = $('<' + settings.navElement + '>') .addClass(settings.navClass[1]) .html(settings.navText[1]) .appendTo(this._controls.$relative) .on('click', $.proxy(function (e) { this.next(settings.navSpeed); }, this)); // create DOM structure for absolute navigation if (!settings.dotsData) { this._templates = [$('
') .addClass(settings.dotClass) .append($('')) .prop('outerHTML')]; } this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer) : $('
').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled'); this._controls.$absolute.on('click', 'div', $.proxy(function (e) { var index = $(e.target).parent().is(this._controls.$absolute) ? $(e.target).index() : $(e.target).parent().index(); e.preventDefault(); this.to(index, settings.dotsSpeed); }, this)); // override public methods of the carousel for (override in this._overrides) { this._core[override] = $.proxy(this[override], this); } }; /** * Destroys the plugin. * @protected */ Navigation.prototype.destroy = function () { var handler, control, property, override; for (handler in this._handlers) { this.$element.off(handler, this._handlers[handler]); } for (control in this._controls) { this._controls[control].remove(); } for (override in this.overides) { this._core[override] = this._overrides[override]; } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; /** * Updates the internal state. * @protected */ Navigation.prototype.update = function () { var i, j, k, lower = this._core.clones().length / 2, upper = lower + this._core.items().length, maximum = this._core.maximum(true), settings = this._core.settings, size = settings.center || settings.autoWidth || settings.dotsData ? 1 : settings.dotsEach || settings.items; if (settings.slideBy !== 'page') { settings.slideBy = Math.min(settings.slideBy, settings.items); } if (settings.dots || settings.slideBy == 'page') { this._pages = []; for (i = lower, j = 0, k = 0; i < upper; i++) { if (j >= size || j === 0) { this._pages.push({ start: Math.min(maximum, i - lower), end: i - lower + size - 1 }); if (Math.min(maximum, i - lower) === maximum) { break; } j = 0, ++k; } j += this._core.mergers(this._core.relative(i)); } } }; /** * Draws the user interface. * @todo The option `dotsData` wont work. * @protected */ Navigation.prototype.draw = function () { var difference, settings = this._core.settings, disabled = this._core.items().length <= settings.items, index = this._core.relative(this._core.current()), loop = settings.loop || settings.rewind; this._controls.$relative.toggleClass('disabled', !settings.nav || disabled); if (settings.nav) { this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true)); this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true)); } this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled); if (settings.dots) { difference = this._pages.length - this._controls.$absolute.children().length; if (settings.dotsData && difference !== 0) { this._controls.$absolute.html(this._templates.join('')); } else if (difference > 0) { this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0])); } else if (difference < 0) { this._controls.$absolute.children().slice(difference).remove(); } this._controls.$absolute.find('.active').removeClass('active'); this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active'); } }; /** * Extends event data. * @protected * @param {Event} event - The event object which gets thrown. */ Navigation.prototype.onTrigger = function (event) { var settings = this._core.settings; event.page = { index: $.inArray(this.current(), this._pages), count: this._pages.length, size: settings && (settings.center || settings.autoWidth || settings.dotsData ? 1 : settings.dotsEach || settings.items) }; }; /** * Gets the current page position of the carousel. * @protected * @returns {Number} */ Navigation.prototype.current = function () { var current = this._core.relative(this._core.current()); return $.grep(this._pages, $.proxy(function (page, index) { return page.start <= current && page.end >= current; }, this)).pop(); }; /** * Gets the current succesor/predecessor position. * @protected * @returns {Number} */ Navigation.prototype.getPosition = function (successor) { var position, length, settings = this._core.settings; if (settings.slideBy == 'page') { position = $.inArray(this.current(), this._pages); length = this._pages.length; successor ? ++position : --position; position = this._pages[((position % length) + length) % length].start; } else { position = this._core.relative(this._core.current()); length = this._core.items().length; successor ? position += settings.slideBy : position -= settings.slideBy; } return position; }; /** * Slides to the next item or page. * @public * @param {Number} [speed=false] - The time in milliseconds for the transition. */ Navigation.prototype.next = function (speed) { $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed); }; /** * Slides to the previous item or page. * @public * @param {Number} [speed=false] - The time in milliseconds for the transition. */ Navigation.prototype.prev = function (speed) { $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed); }; /** * Slides to the specified item or page. * @public * @param {Number} position - The position of the item or page. * @param {Number} [speed] - The time in milliseconds for the transition. * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not. */ Navigation.prototype.to = function (position, speed, standard) { var length; if (!standard && this._pages.length) { length = this._pages.length; $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed); } else { $.proxy(this._overrides.to, this._core)(position, speed); } }; $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation; })(window.Zepto || window.jQuery, window, document); /** * Hash Plugin * @version 2.1.0 * @author Artus Kolanowski * @author David Deutsch * @license The MIT License (MIT) */ ; (function ($, window, document, undefined) { 'use strict'; /** * Creates the hash plugin. * @class The Hash Plugin * @param {Owl} carousel - The Owl Carousel */ var Hash = function (carousel) { /** * Reference to the core. * @protected * @type {Owl} */ this._core = carousel; /** * Hash index for the items. * @protected * @type {Object} */ this._hashes = {}; /** * The carousel element. * @type {jQuery} */ this.$element = this._core.$element; /** * All event handlers. * @protected * @type {Object} */ this._handlers = { 'initialized.owl.carousel': $.proxy(function (e) { if (e.namespace && this._core.settings.startPosition === 'URLHash') { $(window).trigger('hashchange.owl.navigation'); } }, this), 'prepared.owl.carousel': $.proxy(function (e) { if (e.namespace) { var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash'); if (!hash) { return; } this._hashes[hash] = e.content; } }, this), 'changed.owl.carousel': $.proxy(function (e) { if (e.namespace && e.property.name === 'position') { var current = this._core.items(this._core.relative(this._core.current())), hash = $.map(this._hashes, function (item, hash) { return item === current ? hash : null; }).join(); if (!hash || window.location.hash.slice(1) === hash) { return; } window.location.hash = hash; } }, this) }; // set default options this._core.options = $.extend({}, Hash.Defaults, this._core.options); // register the event handlers this.$element.on(this._handlers); // register event listener for hash navigation $(window).on('hashchange.owl.navigation', $.proxy(function (e) { var hash = window.location.hash.substring(1), items = this._core.$stage.children(), position = this._hashes[hash] && items.index(this._hashes[hash]); if (position === undefined || position === this._core.current()) { return; } this._core.to(this._core.relative(position), false, true); }, this)); }; /** * Default options. * @public */ Hash.Defaults = { URLhashListener: false }; /** * Destroys the plugin. * @public */ Hash.prototype.destroy = function () { var handler, property; $(window).off('hashchange.owl.navigation'); for (handler in this._handlers) { this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)) { typeof this[property] != 'function' && (this[property] = null); } }; $.fn.owlCarousel.Constructor.Plugins.Hash = Hash; })(window.Zepto || window.jQuery, window, document); /** * Support Plugin * * @version 2.1.0 * @author Vivid Planet Software GmbH * @author Artus Kolanowski * @author David Deutsch * @license The MIT License (MIT) */ ; (function ($, window, document, undefined) { var style = $('').get(0).style, prefixes = 'Webkit Moz O ms'.split(' '), events = { transition: { end: { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd', transition: 'transitionend' } }, animation: { end: { WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'animationend', OAnimation: 'oAnimationEnd', animation: 'animationend' } } }, tests = { csstransforms: function () { return !!test('transform'); }, csstransforms3d: function () { return !!test('perspective'); }, csstransitions: function () { return !!test('transition'); }, cssanimations: function () { return !!test('animation'); } }; function test(property, prefixed) { var result = false, upper = property.charAt(0).toUpperCase() + property.slice(1); $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function (i, property) { if (style[property] !== undefined) { result = prefixed ? property : true; return false; } }); return result; } function prefixed(property) { return test(property, true); } if (tests.csstransitions()) { /* jshint -W053 */ $.support.transition = new String(prefixed('transition')) $.support.transition.end = events.transition.end[$.support.transition]; } if (tests.cssanimations()) { /* jshint -W053 */ $.support.animation = new String(prefixed('animation')) $.support.animation.end = events.animation.end[$.support.animation]; } if (tests.csstransforms()) { /* jshint -W053 */ $.support.transform = new String(prefixed('transform')); $.support.transform3d = tests.csstransforms3d(); } })(window.Zepto || window.jQuery, window, document); // source --> https://www.centroaletti.com/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4 /*! * jQuery UI Widget 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/jQuery.widget/ */ !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(d){var s,i=0,a=Array.prototype.slice;return d.cleanData=(s=d.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)try{(e=d._data(i,"events"))&&e.remove&&d(i).triggerHandler("remove")}catch(t){}s(t)}),d.widget=function(t,i,e){var n,s,o,r,a={},u=t.split(".")[0];return t=t.split(".")[1],e||(e=i,i=d.Widget),d.expr[":"][(n=u+"-"+t).toLowerCase()]=function(t){return!!d.data(t,n)},d[u]=d[u]||{},s=d[u][t],o=d[u][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},d.extend(o,s,{version:e.version,_proto:d.extend({},e),_childConstructors:[]}),(r=new i).options=d.widget.extend({},r.options),d.each(e,function(e,n){function s(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}d.isFunction(n)?a[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:a[e]=n}),o.prototype=d.widget.extend(r,{widgetEventPrefix:s&&r.widgetEventPrefix||t},a,{constructor:o,namespace:u,widgetName:t,widgetFullName:n}),s?(d.each(s._childConstructors,function(t,e){var i=e.prototype;d.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),d.widget.bridge(t,o),o},d.widget.extend=function(t){for(var e,i,n=a.call(arguments,1),s=0,o=n.length;s",options:{disabled:!1,create:null},_createWidget:function(t,e){e=d(e||this.defaultElement||this)[0],this.element=d(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=d(),this.hoverable=d(),this.focusable=d(),e!==this&&(d.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=d(e.style?e.ownerDocument:e.document||e),this.window=d(this.document[0].defaultView||this.document[0].parentWindow)),this.options=d.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:d.noop,_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(d.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:d.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return d.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=d.widget.extend({},this.options[t]),s=0;s https://www.centroaletti.com/wp-includes/js/jquery/ui/button.min.js?ver=1.11.4 /*! * jQuery UI Button 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/button/ */ !function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(o){function n(){var t=o(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)}function a(t){var e=t.name,i=t.form,s=o([]);return e&&(e=e.replace(/'/g,"\\'"),s=i?o(i).find("[name='"+e+"'][type=radio]"):o("[name='"+e+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),s}var u,r="ui-button ui-widget ui-state-default ui-corner-all",l="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only";return o.widget("ui.button",{version:"1.11.4",defaultElement:"
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); */ /** Tether ( This bootstrap require script ) */ !function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),o={};for(var n in e)o[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=i(r);o.top+=s.top,o.bottom+=s.top,o.left+=s.left,o.right+=s.left}}return o}function r(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function s(){A&&document.body.removeChild(A),A=null}function a(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n=i(t),r=P();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function f(t){return t.offsetParent||document.documentElement}function l(){if(M)return M;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");h(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return M={width:i,height:i}}function h(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=c(t).replace(o," ");g(t,n)}}function u(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{d(t,e);var o=c(t)+(" "+e);g(t,o)}}function p(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function g(t,e){t.setAttribute("class",e)}function m(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&p(t,o)&&d(t,o)}),e.forEach(function(e){p(t,e)||u(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function C(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function O(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=a(e),n=o,i=getComputedStyle(e);if(e=[n.left,n.top,o.width+n.left,o.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}G.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var E=function(){function t(t,e){for(var o=0;o1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&b()-t<10||(null!=o&&(clearTimeout(o),o=null),t=b(),X(),e=b()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var F={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},N={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=F[e.left]),"auto"===n&&(n=H[e.top]),{left:o,top:n}},V=function(t){var e=t.left,o=t.top;return"undefined"!=typeof N[t.left]&&(e=N[t.left]),"undefined"!=typeof N[t.top]&&(o=N[t.top]),{left:e,top:o}},R=function(t){var e=t.split(" "),o=z(e,2),n=o[0],i=o[1];return{top:n,left:i}},q=R,I=function(t){function e(t){var o=this;n(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),D.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return v(e,t),E(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=h(n,t);var i=this.options,s=i.element,a=i.target,f=i.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),u(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&u(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=q(this.options.targetAttachment),this.attachment=q(this.options.attachment),this.offset=R(this.options.offset),this.targetOffset=R(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return a(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=a(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>s&&this.target===document.body&&(f=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-s);return e.top=l*(s-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),D.forEach(function(e,o){e===t&&D.splice(o,1)}),0===D.length&&s()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),k(function(){"undefined"!=typeof o._addAttachClasses&&(m(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&m(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return a(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var s=this.lastSize;i=s.width,r=s.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=C(V(this.attachment),{width:i,height:r}),p=C(V(o),d),c=C(this.offset,{width:i,height:r}),g=C(this.targetOffset,d);u=w(u,c),p=w(p,g);for(var m=h.left+p.left-u.left,v=h.top+p.top-u.top,y=0;yA.documentElement.clientHeight&&(S=this.cache("scrollbar-size",l),E.viewport.bottom-=S.height),T.innerWidth>A.documentElement.clientWidth&&(S=this.cache("scrollbar-size",l),E.viewport.right-=S.width),(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position))&&(E.page.bottom=A.body.scrollHeight-v-r,E.page.right=A.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return f(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return a(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-i.width+r.right,o.bottom=A.body.scrollHeight-o.top-i.height+r.bottom,E.page.top>=o.top+r.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+r.left&&E.page.right>=o.right){var s=e.scrollTop,l=e.scrollLeft;E.offset={top:E.page.top-o.top+s-r.top,left:E.page.left-o.left+l-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),e&&_(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s=0){var c=a.split(" "),m=z(c,2);d=m[0],h=m[1]}else h=d=a;var b=O(e,r);("target"===d||"both"===d)&&(ob[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&ob[3]&&o-(s-u)>=b[1]&&(o-=s-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+s>b[3]?(o-=u,v.top="top",o-=s,y.top="bottom"):"bottom"===y.top&&ob[3]&&"top"===y.top?(o-=s,y.top="bottom"):ob[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(nb[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):nb[3]&&"top"===y.top&&(o-=s,y.top="bottom")),("element"===h||"both"===h)&&(nb[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],C=[];o=0?(o=b[1],w.push("top")):C.push("top")),o+s>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-s,w.push("bottom")):C.push("bottom")),n=0?(n=b[0],w.push("left")):C.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):C.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),g.push(t),w.forEach(function(e){g.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),g.push(t),C.forEach(function(e){g.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),k(function(){e.options.addTargetClasses!==!1&&m(e.target,g,c),m(e.element,g,c)}),{top:o,left:n}}});var Y=x.Utils,a=Y.getBounds,m=Y.updateClasses,k=Y.defer;x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return a(e.element)}),r=i.height,s=i.width,f=this.getTargetBounds(),l=o+r,h=n+s,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&d.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&d.push(t)});var u=[],p=[],c=["left","top","right","bottom"];return u.push(this.getClass("abutted")),c.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),k(function(){e.options.addTargetClasses!==!1&&m(e.target,p,u),m(e.element,p,u)}),!0}});var z=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=z(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),$}); /*! * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;nthis._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(m.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?p.NEXT:p.PREVIOUS;this._slide(o,this._items[e])}},h.prototype.dispose=function(){t(this._element).off(l),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},h.prototype._getConfig=function(n){return n=t.extend({},_,n),r.typeCheckConfig(e,n,g),n},h.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(m.KEYDOWN,function(t){return e._keydown(t)}),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(m.MOUSEENTER,function(t){return e.pause(t)}).on(m.MOUSELEAVE,function(t){return e.cycle(t)})},h.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case d:t.preventDefault(),this.prev();break;case f:t.preventDefault(),this.next();break;default:return}},h.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(v.ITEM)),this._items.indexOf(e)},h.prototype._getItemByDirection=function(t,e){var n=t===p.NEXT,i=t===p.PREVIOUS,o=this._getItemIndex(e),r=this._items.length-1,s=i&&0===o||n&&o===r;if(s&&!this._config.wrap)return e;var a=t===p.PREVIOUS?-1:1,l=(o+a)%this._items.length;return l===-1?this._items[this._items.length-1]:this._items[l]},h.prototype._triggerSlideEvent=function(e,n){var i=t.Event(m.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},h.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(v.ACTIVE).removeClass(E.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(E.ACTIVE)}},h.prototype._slide=function(e,n){var i=this,o=t(this._element).find(v.ACTIVE_ITEM)[0],s=n||o&&this._getItemByDirection(e,o),a=Boolean(this._interval),l=void 0,h=void 0,c=void 0;if(e===p.NEXT?(l=E.LEFT,h=E.NEXT,c=p.LEFT):(l=E.RIGHT,h=E.PREV,c=p.RIGHT),s&&t(s).hasClass(E.ACTIVE))return void(this._isSliding=!1);var d=this._triggerSlideEvent(s,c);if(!d.isDefaultPrevented()&&o&&s){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s);var f=t.Event(m.SLID,{relatedTarget:s,direction:c});r.supportsTransitionEnd()&&t(this._element).hasClass(E.SLIDE)?(t(s).addClass(h),r.reflow(s),t(o).addClass(l),t(s).addClass(l),t(o).one(r.TRANSITION_END,function(){t(s).removeClass(l+" "+h).addClass(E.ACTIVE),t(o).removeClass(E.ACTIVE+" "+h+" "+l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(f)},0)}).emulateTransitionEnd(u)):(t(o).removeClass(E.ACTIVE),t(s).addClass(E.ACTIVE),this._isSliding=!1,t(this._element).trigger(f)),a&&this.cycle()}},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o=t.extend({},_,t(this).data());"object"===("undefined"==typeof e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new h(this,o),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(void 0===n[r])throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},h._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(E.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),h._jQueryInterface.call(t(i),o),s&&t(i).data(a).to(s),e.preventDefault()}}},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return _}}]),h}();return t(document).on(m.CLICK_DATA_API,v.DATA_SLIDE,T._dataApiClickHandler),t(window).on(m.LOAD_DATA_API,function(){t(v.DATA_RIDE).each(function(){var e=t(this);T._jQueryInterface.call(e,e.data())})}),t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=c,T._jQueryInterface},T}(jQuery),function(t){var e="collapse",s="4.0.0-alpha.6",a="bs.collapse",l="."+a,h=".data-api",c=t.fn[e],u=600,d={toggle:!0,parent:""},f={toggle:"boolean",parent:"string"},_={SHOW:"show"+l,SHOWN:"shown"+l,HIDE:"hide"+l,HIDDEN:"hidden"+l,CLICK_DATA_API:"click"+l+h},g={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},E=function(){function l(e,i){n(this,l),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],'+('[data-toggle="collapse"][data-target="#'+e.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return l.prototype.toggle=function(){t(this._element).hasClass(g.SHOW)?this.hide():this.show()},l.prototype.show=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!t(this._element).hasClass(g.SHOW)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(this._parent).find(m.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a),i&&i._isTransitioning))){var o=t.Event(_.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(l._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var s=this._getDimension();t(this._element).removeClass(g.COLLAPSE).addClass(g.COLLAPSING),this._element.style[s]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(g.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).addClass(g.SHOW),e._element.style[s]="",e.setTransitioning(!1),t(e._element).trigger(_.SHOWN)};if(!r.supportsTransitionEnd())return void h();var c=s[0].toUpperCase()+s.slice(1),d="scroll"+c;t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(u),this._element.style[s]=this._element[d]+"px"}}}},l.prototype.hide=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(t(this._element).hasClass(g.SHOW)){var n=t.Event(_.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),o=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[o]+"px",r.reflow(this._element),t(this._element).addClass(g.COLLAPSING).removeClass(g.COLLAPSE).removeClass(g.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(g.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var s=function(){e.setTransitioning(!1),t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).trigger(_.HIDDEN)};return this._element.style[i]="",r.supportsTransitionEnd()?void t(this._element).one(r.TRANSITION_END,s).emulateTransitionEnd(u):void s()}}},l.prototype.setTransitioning=function(t){this._isTransitioning=t},l.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},l.prototype._getConfig=function(n){return n=t.extend({},d,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,f),n},l.prototype._getDimension=function(){var e=t(this._element).hasClass(p.WIDTH);return e?p.WIDTH:p.HEIGHT},l.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(l._getTargetFromElement(n),[n])}),n},l.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(g.SHOW);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(g.COLLAPSED,!i).attr("aria-expanded",i)}},l._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},l._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(a),r=t.extend({},d,n.data(),"object"===("undefined"==typeof e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new l(this,r),n.data(a,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e]()}})},o(l,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}}]),l}();return t(document).on(_.CLICK_DATA_API,m.DATA_TOGGLE,function(e){e.preventDefault();var n=E._getTargetFromElement(this),i=t(n).data(a),o=i?"toggle":t(this).data();E._jQueryInterface.call(t(n),o)}),t.fn[e]=E._jQueryInterface,t.fn[e].Constructor=E,t.fn[e].noConflict=function(){return t.fn[e]=c,E._jQueryInterface},E}(jQuery),function(t){var e="dropdown",i="4.0.0-alpha.6",s="bs.dropdown",a="."+s,l=".data-api",h=t.fn[e],c=27,u=38,d=40,f=3,_={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+l,FOCUSIN_DATA_API:"focusin"+a+l,KEYDOWN_DATA_API:"keydown"+a+l},g={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},p={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},m=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(g.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(g.SHOW);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(p.NAVBAR_NAV).length){var o=document.createElement("div");o.className=g.BACKDROP,t(o).insertBefore(this),t(o).on("click",e._clearMenus)}var r={relatedTarget:this},s=t.Event(_.SHOW,r);return t(n).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),t(n).toggleClass(g.SHOW),t(n).trigger(t.Event(_.SHOWN,r)),!1)},e.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(_.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(s);if(i||(i=new e(this),t(this).data(s,i)),"string"==typeof n){if(void 0===i[n])throw new Error('No method named "'+n+'"');i[n].call(this)}})},e._clearMenus=function(n){if(!n||n.which!==f){var i=t(p.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var o=t.makeArray(t(p.DATA_TOGGLE)),r=0;r0&&a--,n.which===d&&adocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},h.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},h.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth=n){var i=this._targets[this._targets.length-1];return void(this._activeTarget!==i&&this._activate(i))}if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){var r=this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t "+g.NAV_LINKS).addClass(_.ACTIVE),t(this._scrollElement).trigger(f.ACTIVATE,{relatedTarget:e})},h.prototype._clear=function(){t(this._selector).filter(g.ACTIVE).removeClass(_.ACTIVE)},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e; if(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return u}}]),h}();return t(window).on(f.LOAD_DATA_API,function(){for(var e=t.makeArray(t(g.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);m._jQueryInterface.call(i,i.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=c,m._jQueryInterface},m}(jQuery),function(t){var e="tab",i="4.0.0-alpha.6",s="bs.tab",a="."+s,l=".data-api",h=t.fn[e],c=150,u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+l},d={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},f={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},_=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(d.ACTIVE)||t(this._element).hasClass(d.DISABLED))){var n=void 0,i=void 0,o=t(this._element).closest(f.LIST)[0],s=r.getSelectorFromElement(this._element);o&&(i=t.makeArray(t(o).find(f.ACTIVE)),i=i[i.length-1]);var a=t.Event(u.HIDE,{relatedTarget:this._element}),l=t.Event(u.SHOW,{relatedTarget:i});if(i&&t(i).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=t(s)[0]),this._activate(this._element,o);var h=function(){var n=t.Event(u.HIDDEN,{relatedTarget:e._element}),o=t.Event(u.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},e.prototype.dispose=function(){t.removeClass(this._element,s),this._element=null},e.prototype._activate=function(e,n,i){var o=this,s=t(n).find(f.ACTIVE_CHILD)[0],a=i&&r.supportsTransitionEnd()&&(s&&t(s).hasClass(d.FADE)||Boolean(t(n).find(f.FADE_CHILD)[0])),l=function(){return o._transitionComplete(e,s,a,i)};s&&a?t(s).one(r.TRANSITION_END,l).emulateTransitionEnd(c):l(),s&&t(s).removeClass(d.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(d.ACTIVE);var s=t(n.parentNode).find(f.DROPDOWN_ACTIVE_CHILD)[0];s&&t(s).removeClass(d.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(d.SHOW)):t(e).removeClass(d.FADE),e.parentNode&&t(e.parentNode).hasClass(d.DROPDOWN_MENU)){var a=t(e).closest(f.DROPDOWN)[0];a&&t(a).find(f.DROPDOWN_TOGGLE).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);if(o||(o=new e(this),i.data(s,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(e){e.preventDefault(),_._jQueryInterface.call(t(this),"show")}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=h,_._jQueryInterface},_}(jQuery),function(t){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",s="4.0.0-alpha.6",a="bs.tooltip",l="."+a,h=t.fn[e],c=150,u="bs-tether",d={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},f={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},_={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},g={SHOW:"show",OUT:"out"},p={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},m={FADE:"fade",SHOW:"show"},E={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},v={element:!1,enabled:!1},T={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},I=function(){function h(t,e){n(this,h),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return h.prototype.enable=function(){this._isEnabled=!0},h.prototype.disable=function(){this._isEnabled=!1},h.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},h.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(m.SHOW))return void this._leave(null,this);this._enter(null,this)}},h.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},h.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(m.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(a),c=this.config.container===!1?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:l,element:o,target:this.element,classes:v,classPrefix:u,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),r.reflow(o),this._tether.position(),t(o).addClass(m.SHOW);var d=function(){var n=e._hoverState;e._hoverState=null,e._isTransitioning=!1,t(e.element).trigger(e.constructor.Event.SHOWN),n===g.OUT&&e._leave(null,e)};if(r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE))return this._isTransitioning=!0,void t(this.tip).one(r.TRANSITION_END,d).emulateTransitionEnd(h._TRANSITION_DURATION);d()}},h.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var s=function(){n._hoverState!==g.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n._isTransitioning=!1,n.cleanupTether(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(m.SHOW),this._activeTrigger[T.CLICK]=!1,this._activeTrigger[T.FOCUS]=!1,this._activeTrigger[T.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE)?(this._isTransitioning=!0,t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(c)):s(),this._hoverState="")},h.prototype.isWithContent=function(){return Boolean(this.getTitle())},h.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},h.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(E.TOOLTIP_INNER),this.getTitle()),e.removeClass(m.FADE+" "+m.SHOW),this.cleanupTether()},h.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===("undefined"==typeof n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},h.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},h.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},h.prototype._getAttachment=function(t){return _[t.toUpperCase()]},h.prototype._setListeners=function(){var e=this,n=this.config.trigger.split(" ");n.forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==T.MANUAL){var i=n===T.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===T.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},h.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},h.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T.FOCUS:T.HOVER]=!0),t(n.getTipElement()).hasClass(m.SHOW)||n._hoverState===g.SHOW?void(n._hoverState=g.SHOW):(clearTimeout(n._timeout),n._hoverState=g.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===g.SHOW&&n.show()},n.config.delay.show)):void n.show())},h.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T.FOCUS:T.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=g.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===g.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},h.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},h.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},h.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return f}}]),h}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=h,I._jQueryInterface},I}(jQuery));(function(r){var a="popover",l="4.0.0-alpha.6",h="bs.popover",c="."+h,u=r.fn[a],d=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:''}),f=r.extend({},s.DefaultType,{content:"(string|element|function)"}),_={FADE:"fade",SHOW:"show"},g={TITLE:".popover-title",CONTENT:".popover-content"},p={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,INSERTED:"inserted"+c,CLICK:"click"+c,FOCUSIN:"focusin"+c,FOCUSOUT:"focusout"+c,MOUSEENTER:"mouseenter"+c,MOUSELEAVE:"mouseleave"+c},m=function(s){function u(){return n(this,u),t(this,s.apply(this,arguments))}return e(u,s),u.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},u.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},u.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(g.TITLE),this.getTitle()),this.setElementContent(t.find(g.CONTENT),this._getContent()),t.removeClass(_.FADE+" "+_.SHOW),this.cleanupTether()},u.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},u._jQueryInterface=function(t){return this.each(function(){var e=r(this).data(h),n="object"===("undefined"==typeof t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new u(this,n),r(this).data(h,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},o(u,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return c}},{key:"DefaultType",get:function(){return f}}]),u}(s);return r.fn[a]=m._jQueryInterface,r.fn[a].Constructor=m,r.fn[a].noConflict=function(){return r.fn[a]=u,m._jQueryInterface},m})(jQuery)}(); */ /*! * Jasny Bootstrap v3.1.0 (http://jasny.github.com/bootstrap) * Copyright 2011-2014 Arnold Daniels. * Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE) */ +function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.state=null,this.placement=null,this.options.recalc&&(this.calcClone(),a(window).on("resize",a.proxy(this.recalc,this))),this.options.autohide&&a(document).on("click",a.proxy(this.autohide,this)),this.options.toggle&&this.toggle(),this.options.disablescrolling&&(this.options.disableScrolling=this.options.disablescrolling,delete this.options.disablescrolling)};b.DEFAULTS={toggle:!0,placement:"auto",autohide:!0,recalc:!0,disableScrolling:!0,modal:!1},b.prototype.offset=function(){switch(this.placement){case"left":case"right":return this.$element.outerWidth();case"top":case"bottom":return this.$element.outerHeight()}},b.prototype.calcPlacement=function(){function e(a,b){if(d.css(b)==="auto")return a;if(d.css(a)==="auto")return b;var c=parseInt(d.css(a),10),e=parseInt(d.css(b),10);return c>e?b:a}if(this.options.placement!=="auto"){this.placement=this.options.placement;return}this.$element.hasClass("in")||this.$element.css("visiblity","hidden !important").addClass("in");var b=a(window).width()/this.$element.width(),c=a(window).height()/this.$element.height(),d=this.$element;this.placement=b>=c?e("left","right"):e("top","bottom"),this.$element.css("visibility")==="hidden !important"&&this.$element.removeClass("in").css("visiblity","")},b.prototype.opposite=function(a){switch(a){case"top":return"bottom";case"left":return"right";case"bottom":return"top";case"right":return"left"}},b.prototype.getCanvasElements=function(){var b=this.options.canvas?a(this.options.canvas):this.$element,c=b.find("*").filter(function(){return a(this).css("position")==="fixed"}).not(this.options.exclude);return b.add(c)},b.prototype.slide=function(b,c,d){if(!a.support.transition){var e={};return e[this.placement]="+="+c,b.animate(e,350,d)}var f=this.placement,g=this.opposite(f);b.each(function(){a(this).css(f)!=="auto"&&a(this).css(f,(parseInt(a(this).css(f),10)||0)+c),a(this).css(g)!=="auto"&&a(this).css(g,(parseInt(a(this).css(g),10)||0)-c)}),this.$element.one(a.support.transition.end,d).emulateTransitionEnd(350)},b.prototype.disableScrolling=function(){var b=a("body").width(),c="padding-"+this.opposite(this.placement);a("body").data("offcanvas-style")===undefined&&a("body").data("offcanvas-style",a("body").attr("style")||""),a("body").css("overflow","hidden");if(a("body").width()>b){var d=parseInt(a("body").css(c),10)+a("body").width()-b;setTimeout(function(){a("body").css(c,d)},1)}a("body").on("touchmove.bs",function(a){a.preventDefault()})},b.prototype.enableScrolling=function(){a("body").off("touchmove.bs")},b.prototype.show=function(){if(this.state)return;var b=a.Event("show.bs.offcanvas");this.$element.trigger(b);if(b.isDefaultPrevented())return;this.state="slide-in",this.calcPlacement();var c=this.getCanvasElements(),d=this.placement,e=this.opposite(d),f=this.offset();c.index(this.$element)!==-1&&(a(this.$element).data("offcanvas-style",a(this.$element).attr("style")||""),this.$element.css(d,-1*f),this.$element.css(d)),c.addClass("canvas-sliding").each(function(){a(this).data("offcanvas-style")===undefined&&a(this).data("offcanvas-style",a(this).attr("style")||""),a(this).css("position")==="static"&&a(this).css("position","relative"),(a(this).css(d)==="auto"||a(this).css(d)==="0px")&&(a(this).css(e)==="auto"||a(this).css(e)==="0px")&&a(this).css(d,0)}),this.options.disableScrolling&&this.disableScrolling(),this.options.modal&&this.toggleBackdrop();var g=function(){if(this.state!="slide-in")return;this.state="slid",c.removeClass("canvas-sliding").addClass("canvas-slid"),this.$element.trigger("shown.bs.offcanvas")};setTimeout(a.proxy(function(){this.$element.addClass("in"),this.slide(c,f,a.proxy(g,this))},this),1)},b.prototype.hide=function(b){if(this.state!=="slid")return;var c=a.Event("hide.bs.offcanvas");this.$element.trigger(c);if(c.isDefaultPrevented())return;this.state="slide-out";var d=a(".canvas-slid"),e=this.placement,f=-1*this.offset(),g=function(){if(this.state!="slide-out")return;this.state=null,this.placement=null,this.$element.removeClass("in"),d.removeClass("canvas-sliding"),d.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")}),this.$element.trigger("hidden.bs.offcanvas")};this.options.disableScrolling&&this.enableScrolling(),this.options.modal&&this.toggleBackdrop(),d.removeClass("canvas-slid").addClass("canvas-sliding"),setTimeout(a.proxy(function(){this.slide(d,f,a.proxy(g,this))},this),1)},b.prototype.toggle=function(){if(this.state==="slide-in"||this.state==="slide-out")return;this[this.state==="slid"?"hide":"show"]()},b.prototype.toggleBackdrop=function(b){b=b||a.noop;if(this.state=="slide-in"){var c=a.support.transition;this.$backdrop=a('