// source --> https://oldsite.uoi.gr/wp-content/plugins/events-manager/includes/js/events-manager.js?ver=7.2.3.1 
jQuery(document).ready( function($){

	// backcompat changes 6.x to 5.x
	if( $('#recurrence-frequency').length > 0  ){
		$('#recurrence-frequency').addClass('em-recurrence-frequency');
		$('.event-form-when .interval-desc').each( function(){
			this.classList.add(this.id);
		});
		$('.event-form-when .alternate-selector').each( function(){
			this.classList.add('em-' + this.id);
		});
		$('#recurrence-interval').addClass('em-recurrence-interval');
	}
	$('#em-wrapper').addClass('em');

	// Add keyboard accessibility for em-icon button spans
	$(document).on('keydown', 'span.em-icon[role="button"]', function(e){
		if( e.key === 'Enter' || e.keyCode === 13 ){
			e.preventDefault();
			$(this).trigger('click');
		}
	});

	/* Time Entry - legacy @deprecated */
	$('#start-time').each(function(i, el){
		$(el).addClass('em-time-input em-time-start').next('#end-time').addClass('em-time-input em-time-end').parent().addClass('em-time-range');
	});

	/*
	 * ADMIN AREA AND PUBLIC FORMS (Still polishing this section up, note that form ids and classes may change accordingly)
	 */
	//Events List
	//Approve/Reject Links
	$('.events-table').on('click', '.em-event-delete', function(){
		if( !confirm("Are you sure you want to delete?") ){ return false; }
		window.location.href = this.href;
	});
	//Forms
	$('#event-form #event-image-delete, #location-form #location-image-delete').on('click', function(){
		var el = $(this);
		if( el.is(':checked') ){
			el.closest('.event-form-image, .location-form-image').find('#event-image-img, #location-image-img').hide();
		}else{
			el.closest('.event-form-image, .location-form-image').find('#event-image-img, #location-image-img').show();
		}
	});

	//Manual Booking
	$(document).on('click', 'a.em-booking-button', function(e){
		e.preventDefault();
		var button = $(this);
		if( button.text() != EM.bb_booked && $(this).text() != EM.bb_booking){
			button.text(EM.bb_booking);
			var button_data = button.attr('id').split('_');
			$.ajax({
				url: EM.ajaxurl,
				dataType: 'jsonp',
				data: {
					event_id : button_data[1],
					_wpnonce : button_data[2],
					action : 'booking_add_one'
				},
				success : function(response, statusText, xhr, $form) {
					if(response.result){
						button.text(EM.bb_booked);
						button.addClass('disabled');
					}else{
						button.text(EM.bb_error);
					}
					if(response.message != '') alert(response.message);
					$(document).triggerHandler('em_booking_button_response', [response, button]);
				},
				error : function(){ button.text(EM.bb_error); }
			});
		}
		return false;
	});
	$(document).on('click', 'a.em-cancel-button', function(e){
		e.preventDefault();
		var button = $(this);
		if( button.text() != EM.bb_cancelled && button.text() != EM.bb_canceling){
			button.text(EM.bb_canceling);
			// old method is splitting id with _ and second/third items are id and nonce, otherwise supply it all via data attributes
			var button_data = button.attr('id').split('_');
			let button_ajax = {};
			if( button_data.length < 3 || !('booking_id' in button[0].dataset) ){
				// legacy support
				button_ajax = {
					booking_id : button_data[1],
					_wpnonce : button_data[2],
					action : 'booking_cancel',
				};
			}
			let ajax_data = Object.assign( button_ajax, button[0].dataset);
			$.ajax({
				url: EM.ajaxurl,
				dataType: 'jsonp',
				data: ajax_data,
				success : function(response, statusText, xhr, $form) {
					if(response.result){
						button.text(EM.bb_cancelled);
						button.addClass('disabled');
					}else{
						button.text(EM.bb_cancel_error);
					}
				},
				error : function(){ button.text(EM.bb_cancel_error); }
			});
		}
		return false;
	});
	$(document).on('click', 'a.em-booking-button-action', function(e){
		e.preventDefault();
		var button = $(this);
		var button_data = {
			_wpnonce : button.attr('data-nonce'),
			action : button.attr('data-action'),
		}
		if( button.attr('data-event-id') ) button_data.event_id =  button.attr('data-event-id');
		if( button.attr('data-booking-id') ) button_data.booking_id =  button.attr('data-booking-id');
		if( button.text() != EM.bb_booked && $(this).text() != EM.bb_booking){
			if( button.attr('data-loading') ){
				button.text(button.attr('data-loading'));
			}else{
				button.text(EM.bb_booking);
			}
			$.ajax({
				url: EM.ajaxurl,
				dataType: 'jsonp',
				data: button_data,
				success : function(response, statusText, xhr, $form) {
					if(response.result){
						if( button.attr('data-success') ){
							button.text(button.attr('data-success'));
						}else{
							button.text(EM.bb_booked);
						}
						button.addClass('disabled');
					}else{
						if( button.attr('data-error') ){
							button.text(button.attr('data-error'));
						}else{
							button.text(EM.bb_error);
						}
					}
					if(response.message != '') alert(response.message);
					$(document).triggerHandler('em_booking_button_action_response', [response, button]);
				},
				error : function(){
					if( button.attr('data-error') ){
						button.text(button.attr('data-error'));
					}else{
						button.text(EM.bb_error);
					}
				}
			});
		}
		return false;
	});

	//Datepicker - legacy
	var load_ui_css; //load jquery ui css?
	if( $('.em-date-single, .em-date-range, #em-date-start').length > 0 ){
		load_ui_css = true;
	}
	if( load_ui_css ) em_load_jquery_css();

	//previously in em-admin.php
	$('#em-wrapper input.select-all').on('change', function(){
		if($(this).is(':checked')){
			$('input.row-selector').prop('checked', true);
			$('input.select-all').prop('checked', true);
		}else{
			$('input.row-selector').prop('checked', false);
			$('input.select-all').prop('checked', false);
		}
	});

	/* Load any maps */
	if( $('.em-location-map').length > 0 || $('.em-locations-map').length > 0 || $('#em-map').length > 0 || $('.em-search-geo').length > 0 ){
		em_maps_load();
	}

	/* Location Type Selection */
	$('.em-location-types .em-location-types-select').on('change', function(){
		let el = $(this);
		if( el.val() == 0 ){
			$('.em-location-type').hide();
		}else{
			let location_type = el.find('option:selected').data('display-class');
			$('.em-location-type').hide();
			$('.em-location-type.'+location_type).show();
			if( location_type != 'em-location-type-place' ){
				jQuery('#em-location-reset a').trigger('click');
			}
		}
		if( el.data('active') !== '' && el.val() !== el.data('active') ){
			$('.em-location-type-delete-active-alert').hide();
			$('.em-location-type-delete-active-alert').show();
		}else{
			$('.em-location-type-delete-active-alert').hide();
		}
	}).trigger('change');

	//Finally, add autocomplete here
	if( jQuery( 'div.em-location-data [name="location_name"]' ).length > 0 ){
		$('div.em-location-data [name="location_name"]').em_selectize({
			plugins: ["restore_on_backspace"],
			valueField: "id",
			labelField: "label",
			searchField: "label",
			create:true,
			createOnBlur: true,
			maxItems:1,
			persist: false,
			addPrecedence : true,
			selectOnTab : true,
			diacritics : true,
			render: {
				item: function (item, escape) {
					return "<div>" + escape(item.label) + "</div>";
				},
				option: function (item, escape) {
					let meta = '';
					if( typeof(item.address) !== 'undefined' ) {
						if (item.address !== '' && item.town !== '') {
							meta = escape(item.address) + ', ' + escape(item.town);
						} else if (item.address !== '') {
							meta = escape(item.address);
						} else if (item.town !== '') {
							meta = escape(item.town);
						}
					}
					return  '<div class="em-locations-autocomplete-item">' +
						'<div class="em-locations-autocomplete-label">' + escape(item.label) + '</div>' +
						'<div style="font-size:11px; text-decoration:italic;">' + meta + '</div>' +
						'</div>';

				},
			},
			load: function (query, callback) {
				if (!query.length) return callback();
				$.ajax({
					url: EM.locationajaxurl,
					data: {
						q : query,
						method : 'selectize'
					},
					dataType : 'json',
					type: "POST",
					error: function () {
						callback();
					},
					success: function ( data ) {
						callback( data );
					},
				});
			},
			onItemAdd : function (value, data) {
				this.clearCache();
				var option = this.options[value];
				if( value === option.label ){
					jQuery('input#location-address').focus();
					return;
				}
				jQuery("input#location-name" ).val(option.value);
				jQuery('input#location-address').val(option.address);
				jQuery('input#location-town').val(option.town);
				jQuery('input#location-state').val(option.state);
				jQuery('input#location-region').val(option.region);
				jQuery('input#location-postcode').val(option.postcode);
				jQuery('input#location-latitude').val(option.latitude);
				jQuery('input#location-longitude').val(option.longitude);
				if( typeof(option.country) === 'undefined' || option.country === '' ){
					jQuery('select#location-country option:selected').removeAttr('selected');
				}else{
					jQuery('select#location-country option[value="'+option.country+'"]').attr('selected', 'selected');
				}
				jQuery("input#location-id" ).val(option.id).trigger('change');
				jQuery('div.em-location-data input, div.em-location-data select').prop('readonly', true).css('opacity', '0.5');
				jQuery('#em-location-reset').show();
				jQuery('#em-location-search-tip').hide();
				// selectize stuff
				this.disable();
				this.$control.blur();
				jQuery('div.em-location-data [class^="em-selectize"]').each( function(){
					if( 'selectize' in this ) {
						this.selectize.disable();
					}
				})
				// trigger hook
				jQuery(document).triggerHandler('em_locations_autocomplete_selected', [event, option]);
			}
		});
		jQuery('#em-location-reset a').on('click', function(){
			jQuery('div.em-location-data input, div.em-location-data select').each( function(){
				this.style.removeProperty('opacity')
				this.readOnly = false;
				if( this.type == 'text' ) this.value = '';
			});
			jQuery('div.em-location-data option:selected').removeAttr('selected');
			jQuery('input#location-id').val('');
			jQuery('#em-location-reset').hide();
			jQuery('#em-location-search-tip').show();
			jQuery('#em-map').hide();
			jQuery('#em-map-404').show();
			if(typeof(marker) !== 'undefined'){
				marker.setPosition(new google.maps.LatLng(0, 0));
				infoWindow.close();
				marker.setDraggable(true);
			}
			// clear selectize autocompleter values, re-enable any selectize ddms
			let $selectize = $("div.em-location-data input#location-name")[0].selectize;
			$selectize.enable();
			$selectize.clear(true);
			$selectize.clearOptions();
			jQuery('div.em-location-data select.em-selectize').each( function(){
				if( 'selectize' in this ){
					this.selectize.enable();
					this.selectize.clear(true);
				}
			});
			// return true
			return false;
		});
		if( jQuery('input#location-id').val() != '0' && jQuery('input#location-id').val() != '' ){
			jQuery('div.em-location-data input, div.em-location-data select').each( function(){
				this.style.setProperty('opacity','0.5', 'important')
				this.readOnly = true;
			});
			jQuery('#em-location-reset').show();
			jQuery('#em-location-search-tip').hide();
			jQuery('div.em-location-data select.em-selectize, div.em-location-data input.em-selectize-autocomplete').each( function(){
				if( 'selectize' in this ) this.selectize.disable();
			});
		}
	}

	// Add click handler for recurrence conversion links
	document.querySelectorAll( '.em-convert-recurrence-link' ).forEach( link => {
		link.addEventListener( 'click', function ( e ) {
			if ( !confirm( EM.convert_recurring_warning ) ) {
				e.preventDefault();
				return false;
			}
			let nonce = this.getAttribute( 'data-nonce' );
			if ( nonce ) {
				this.href = this.href.replace( 'nonce=x', 'nonce=' + nonce );
			}
		} );
	} );

	// trigger selectize loader
	em_setup_ui_elements(document);

	/* Done! */
	$(document).triggerHandler('em_javascript_loaded');
});

/**
 * Sets up external UI libraries and adds them to elements within the supplied container. This can be a jQuery or DOM element, subfunctions will either handle accordingly or this function will ensure it's the right one to pass on..
 * @param jQuery|DOMElement container
 */
function em_setup_ui_elements ( $container ) {
	let container = ( $container instanceof jQuery ) ? $container[0] : $container;
	// Selectize
	em_setup_selectize( $container );
	// Tippy
	em_setup_tippy( $container );
	// Moment JS
	em_setup_moment_times( $container );
	// Date & Time Pickers
	if( container.querySelector('.em-datepicker') ){
		em_setup_datepicker( container );
	}
	if( container.querySelector(".em-time-input") ){
		em_setup_timepicker( container );
	}
	// Phone numbers
	em_setup_phone_inputs( container );
	// let other things hook in
	document.dispatchEvent( new CustomEvent( 'em_setup_ui_elements', { detail: { container : container } } ) );
}

/**
 * Unsetup containers with UI elements, primarily useful if intending on duplicating an element which would require re-setup.
 * @param $container
 */
function em_unsetup_ui_elements( $container ) {
	let container = $container instanceof jQuery ? $container[0] : $container;
	em_unsetup_selectize( container );
	em_unsetup_tippy( container );
	em_unsetup_datepicker( container );
	em_unsetup_timepicker( container );
	em_unsetup_phone_inputs( container );
	// let other things hook in
	document.dispatchEvent( new CustomEvent( 'em_unsetup_ui_elements', { detail: { container : container } } ) );
}

/* Local JS Timezone related placeholders */
/* Moment JS Timzeone PH */
function em_setup_moment_times( container_element ) {
	container = jQuery(container_element);
	if( window.moment ){
		var replace_specials = function( day, string ){
			// replace things not supported by moment
			string = string.replace(/##T/g, Intl.DateTimeFormat().resolvedOptions().timeZone);
			string = string.replace(/#T/g, "GMT"+day.format('Z'));
			string = string.replace(/###t/g, day.utcOffset()*-60);
			string = string.replace(/##t/g, day.isDST());
			string = string.replace(/#t/g, day.daysInMonth());
			return string;
		};
		container.find('.em-date-momentjs').each( function(){
			// Start Date
			var el = jQuery(this);
			var day_start = moment.unix(el.data('date-start'));
			var date_start_string = replace_specials(day_start, day_start.format(el.data('date-format')));
			if( el.data('date-start') !== el.data('date-end') ){
				// End Date
				var day_end = moment.unix(el.data('date-end'));
				var day_end_string = replace_specials(day_start, day_end.format(el.data('date-format')));
				// Output
				var date_string = date_start_string + el.data('date-separator') + day_end_string;
			}else{
				var date_string = date_start_string;
			}
			el.text(date_string);
		});
		var get_date_string = function(ts, format){
			let date = new Date(ts * 1000);
			let minutes = date.getMinutes();
			if( format == 24 ){
				let hours = date.getHours();
				hours = hours < 10 ? '0' + hours : hours;
				minutes = minutes < 10 ? '0' + minutes : minutes;
				return hours + ':' + minutes;
			}else{
				let hours = date.getHours() % 12;
				let ampm = hours >= 12 ? 'PM' : 'AM';
				if( hours === 0 ) hours = 12; // the hour '0' should be '12'
				minutes = minutes < 10 ? '0'+minutes : minutes;
				return hours + ':' + minutes + ' ' + ampm;
			}
		}
		container.find('.em-time-localjs').each( function(){
			var el = jQuery(this);
			var strTime = get_date_string( el.data('time'), el.data('time-format') );
			if( el.data('time-end') ){
				var separator = el.data('time-separator') ? el.data('time-separator') : ' - ';
				strTime = strTime + separator + get_date_string( el.data('time-end'), el.data('time-format') );
			}
			el.text(strTime);
		});
	}
};

function em_load_jquery_css( wrapper = false ){
	if( EM.ui_css && jQuery('link#jquery-ui-em-css').length == 0 ){
		var script = document.createElement("link");
		script.id = 'jquery-ui-em-css';
		script.rel = "stylesheet";
		script.href = EM.ui_css;
		document.body.appendChild(script);
		if( wrapper ){
			em_setup_jquery_ui_wrapper();
		}
	}
}

function em_setup_jquery_ui_wrapper(){
	if( jQuery('#em-jquery-ui').length === 0 ){
		jQuery('body').append('<div id="em-jquery-ui" class="em">');
	}
}

/* Useful function for adding the em_ajax flag to a url, regardless of querystring format */
var em_ajaxify = function(url){
	if ( url.search('em_ajax=0') != -1){
		url = url.replace('em_ajax=0','em_ajax=1');
	}else if( url.search(/\?/) != -1 ){
		url = url + "&em_ajax=1";
	}else{
		url = url + "?em_ajax=1";
	}
	return url;
};

// load externals after DOM load, supplied by EM.assets, only if selector matches
var em_setup_scripts = function( $container = false ) {
	let container = $container || document;
	if( EM && 'assets' in EM ) {
		let baseURL = EM.url + '/includes/external/';
		for ( const [selector, assets] of Object.entries(EM.assets) ) {
			// load scripts if one element exists for selector
			if ( container.querySelector(selector) ) {
				if ('css' in assets) {
					// Iterate through assets.css object and add stylesheet to head
					for (const [id, value] of Object.entries(assets.css)) {
						// Check if the stylesheet with the given ID already exists
						if (!document.getElementById( id + '-css' )) {
							// Create a new link element for the stylesheet
							const link = document.createElement('link');
							link.id = id + '-css';
							link.rel = 'stylesheet';
							link.href = value.match(/^http/) ? value : baseURL + value;

							// Append the stylesheet to the document head
							document.head.appendChild(link);
						}
					}
				}
				if ('js' in assets) {
					// add a tracking of all assets to load, and execute loaded hooks after all assets are loaded and in order of dependence
					let loaded = {};
					let loadedListener = function( id ) {
						loaded[id] = false;
						if ( Object.entries( loaded ).length === Object.entries( assets.js ).length ) {
							// all items for this asset loaded, so we go through all the entries and fire their events
							for ( id of Object.keys( loaded ) ) {
								loadAsset( id )
							}
						}
					};
					let loadAsset = function( id ) {
						if ( !loaded[id] ) {
							let asset = assets.js[id];
							if ( typeof asset === 'object' && 'event' in asset ) {
								if ( asset?.requires) {
									loadAsset( asset.requires );
								}
								document.dispatchEvent( new CustomEvent( asset.event, {
									detail: {
										container: container,
									}
								} ) );
							}
							loaded[id] = true;
						}
					};
					// Iterate through assets.js object and add script to head
					for ( const [ id, value ] of Object.entries(assets.js)) {
						// Check if the script with the given ID already exists
						if ( !document.getElementById( id + '-js' ) ) {
							// Create a new script element for the JavaScript file
							const script = document.createElement('script');
							script.id = id + '-js';
							script.async = true;
							if ( typeof value === 'object' ) {
								// add locale data
								if ( 'locale' in value && value.locale ) {
									script.dataset.locale = value.locale;
								}
								script.src = value.url.match(/^http/g) ? value.url : baseURL + value.url;
							} else {
								script.src = value.match(/^http/g) ? value : baseURL + value;
							}
							// listen for loads so we execute the real onload hooks once all files are loaded (or errorred out)
							script.onload = () => loadedListener(id);
							script.onerror = () => loadedListener(id);
							// Append the script to the document head
							document.head.appendChild(script);
						}
					}
				}
			}
		}
	}
}
document.addEventListener('DOMContentLoaded', () => em_setup_scripts( document ));

// WP List Tables front-end stuff
const setupListTable = function( listTable ) {
	// handle checks of multiple items using shift
	const checkboxes = listTable.querySelectorAll( 'tbody .check-column input[type="checkbox"]' );
	const listTableForm = listTable.querySelector('form.em-list-table-form');
	let lastChecked;

	//Pagination link clicks
	listTable.querySelectorAll('.tablenav-pages a').forEach( el => {
		el.addEventListener('click', function ( e ) {
			e.preventDefault();
			//get page no from url, change page, submit form
			let match = el.href.match(/#[0-9]+/);
			if ( match != null && match.length > 0 ) {
				let pno = match[0].replace('#', '');
				listTableForm.querySelector('input[name=pno]').val(pno);
			} else {
				// new way
				let url = new URL(el.href);
				if ( url.searchParams.has('paged') ) {
					listTableForm.querySelectorAll('input[name=pno], input[name=paged]').forEach( el => el.value = url.searchParams.get('paged') );
				} else {
					listTableForm.querySelectorAll('input[name=pno], input[name=paged]').forEach( el => el.value = 1 );
				}
			}
			listTableForm.requestSubmit();
			return false;
		});
	});
	// Pagination - Input page number
	listTable.querySelectorAll('.tablenav-pages input[name=paged]').forEach( function ( input ){
		input.addEventListener('change', function (e) {
			e.preventDefault();
			let last = listTableForm.querySelector('.tablenav-pages a.last-page');
			if ( last ) {
				// check val isn't more than last page
				let url = new URL(last.href);
				if ( url.searchParams.has('paged') ) {
					let lastPage = parseInt(url.searchParams.get('paged'));
					if ( parseInt(input.value) > lastPage ) {
						input.value = lastPage;
					}
				}
			} else {
				// make sure it's less than current page, we're on last page already
				let lastPage = listTableForm.querySelector('input[name=pno]');
				if (lastPage && lastPage.value && parseInt(input.value) > parseInt(lastPage.value)) {
					input.value = lastPage.value;
					e.preventDefault();
					return false;
				}
			}
			listTableForm.querySelectorAll('input[name=pno]').forEach( el => el.value = input.value );
			listTableForm.requestSubmit();
			return false;
		});
	});

	// handle checkboxes
	listTable.addEventListener('click', function(e){
		// handle selecting all checkboxes
		if( e.target.matches('.manage-column.column-cb input') ){
			listTable.querySelectorAll('.check-column input').forEach( function( checkbox ){
				checkbox.checked = e.target.checked;
				checkbox.closest('tr').classList.toggle('selected', e.target.checked);
				// enable/disable bulk actions filter
				listTable.querySelector('.tablenav .bulkactions-input').querySelectorAll('input,select,button').forEach( function(el){
					e.target.checked ? el.removeAttribute('disabled') : el.setAttribute('disabled', true);
					e.target.checked ? el.classList.remove('disabled') : el.classList.add('disabled', true);
				});
			});
		} else if ( e.target.matches('tbody .check-column input[type="checkbox"]') ) {
			// handle multiple checks
			let inBetween = false;
			if ( e.shiftKey ) {
				checkboxes.forEach(checkbox => {
					if ( checkbox === e.target || checkbox === lastChecked ) {
						inBetween = !inBetween;
					}
					if ( inBetween || checkbox === lastChecked ) {
						checkbox.checked = lastChecked.checked;
					}
					checkbox.closest('tr').classList.toggle('selected', checkbox.checked);
				});
			} else {
				e.target.closest('tr').classList.toggle('selected', e.target.checked);
			}
			// enable/disable bulk actions filter
			let somethingSelected = e.target.checked || listTable.querySelectorAll( 'tbody .check-column input[type="checkbox"]:checked' ).length > 0;
			listTable.querySelector('.tablenav .bulkactions-input').querySelectorAll('input,select,button').forEach( function(el){
				somethingSelected ? el.removeAttribute('disabled') : el.setAttribute('disabled', true);
				somethingSelected ? el.classList.remove('disabled') : el.classList.add('disabled', true);
			});
			lastChecked = e.target;
		} else if ( e.target.closest('tbody td.column-primary') ) {
			// handle row expand/collapse
			if ( e.target.matches('a[href],button:not(.toggle-row)') ) return true; // allow links to pass
			e.preventDefault();
			let rowExpandTrigger = e.target.closest('td.column-primary');
			let row = rowExpandTrigger.closest('tr');
			if( row.classList.contains('expanded') ) {
				row.classList.remove('expanded');
				row.classList.add('collapsed');
				rowExpandTrigger.querySelector('button.toggle-row').classList.remove('expanded');
			} else {
				row.classList.add('expanded');
				row.classList.remove('collapsed');
				rowExpandTrigger.querySelector('button.toggle-row').classList.add('expanded');
			}
		}
	});
	// disable filter since no checkboxes initially selected
	listTable.querySelectorAll('.tablenav .bulkactions-input').forEach( (el) => {
		el.querySelectorAll('input,select,button').forEach(function (el) {
			el.setAttribute('disabled', true);
			el.classList.add('disabled', true);
		})
	});

	// Sorting by headers
	listTable.querySelector('thead').addEventListener('click', function( e ) {
		// get th element
		let th = e.target.tagName.toLowerCase() === 'th' ? e.target : e.target.closest('th');
		if( th && (th.classList.contains('sorted') || th.classList.contains('sortable')) ) {
			e.preventDefault();
			// add args to form and submit it
			let params = ( new URL( th.querySelector('a').href) ).searchParams;
			if ( params.get('orderby') ) {
				listTableForm.querySelector('input[name="orderby"]').value = params.get('orderby');
				let order = params.get('order') ? params.get('order') : 'asc';
				listTableForm.querySelector('input[name="order"]').value = order;
				listTableForm.requestSubmit();
			}
		}
	});

	// show/hide filters trigger
	let filterTrigger = listTable.querySelector('button.filters-trigger');
	if( filterTrigger ) {
		filterTrigger.addEventListener('click', function(e){
			e.preventDefault();
			if( filterTrigger.classList.contains('hidden') ) {
				listTable.querySelectorAll('div.actions.filters').forEach( filter => filter.classList.remove('hidden') );
				filterTrigger.classList.remove('hidden');
				filterTrigger.setAttribute('aria-label', filterTrigger.dataset.labelHide);
				if( '_tippy' in filterTrigger ){
					filterTrigger._tippy.setContent( filterTrigger.dataset.labelHide );
				}
			} else {
				listTable.querySelectorAll('div.actions.filters').forEach( filter => filter.classList.add('hidden') );
				filterTrigger.classList.add('hidden');
				filterTrigger.setAttribute('aria-label', filterTrigger.dataset.labelShow);
				if( '_tippy' in filterTrigger ){
					filterTrigger._tippy.setContent( filterTrigger.dataset.labelShow );
				}
			}
		});
		listTable.addEventListener('em_resize', function(){
			if( listTable.classList.contains('size-small') ) {
				filterTrigger.classList.remove('hidden'); // force hide click
				filterTrigger.click();
			}
		});
	}

	// EXPAND/COLLAPSE - RESPONSIVE
	// handle expand/collapse in responsive mode when clicking the expand/collapse (all)
	let expandTrigger = listTable.querySelector('button.small-expand-trigger');
	if( expandTrigger ) {
		// detect click and add expand class to table, expanded class to trigger
		expandTrigger.addEventListener('click', function(e){
			e.preventDefault();
			if( expandTrigger.classList.contains('expanded') ) {
				listTable.querySelectorAll('tbody tr.expanded, tbody button.toggle-row.expanded').forEach( el => el.classList.remove('expanded') );
				listTable.classList.remove('expanded');
				expandTrigger.classList.remove('expanded');
			} else {
				listTable.querySelectorAll('tbody tr, tbody button.toggle-row').forEach( el => {
					el.classList.add('expanded');
					el.classList.remove('collapsed');
				});
				listTable.classList.add('expanded');
				expandTrigger.classList.add('expanded');
			}
		});
	}

	// handle filters when pressing enter, submitting a search
	listTable.querySelectorAll('.tablenav .actions input[type="text"]').forEach( function (input) {
		input.addEventListener('keypress', function (e) {
			let keycode = (e.keyCode ? e.keyCode : e.which);
			if (keycode === 13) {
				e.preventDefault();
				listTableForm.requestSubmit();
			}
		});
	});

	// handle size breakpoints
	let breakpoints = {
		'xsmall' : 465,
		'small' : 640,
		'medium' : 930,
		'large' : false,
	}
	// submissions
	EM_ResizeObserver( breakpoints, [ listTable ] );

	//Widgets and filter submissions
	listTableForm.addEventListener('submit', function (e) {
		e.preventDefault();
		//append loading spinner
		listTable.classList.add('em-working');
		let loadingDiv = document.createElement('div');
		loadingDiv.id = 'em-loading';
		listTable.append(loadingDiv);
		listTable.querySelectorAll('.em-list-table-error-notice').forEach( el => el.remove() );
		//ajax call
		fetch( EM.ajaxurl, { method: 'POST', body: new FormData(listTableForm) } ).then( function( response ) {
			if ( response.ok ) {
				return response.text();
			} else {
				throw new Error('Network Response ' + response.status);
			}
		}).then( function( data ) {
			if ( !data ) {
				throw new Error('Empty string received');
			}
			if (!listTable.classList.contains('frontend')) {
				// remove modals as they are supplied again on the backend
				listTableForm.querySelectorAll('.em-list-table-trigger').forEach(function ( trigger ) {
					let modal = document.querySelector(trigger.rel);
					if( modal ) {
						modal.remove();
					}
				});
			}
			// get new data as DOM object
			let wrapper = document.createElement('div');
			wrapper.innerHTML = data;
			let newListTable = wrapper.firstElementChild;
			// replace old table with new table
			listTable.replaceWith( newListTable );
			// fire hook - note that form and data should not be used! This is for backward compatibility with an old jQuery hook being fired. Expect future consequences if you use them, obtain everything from listTable or prevListTable!
			document.dispatchEvent( new CustomEvent('em_list_table_filtered', { detail: { prevListTable: listTable, listTable: newListTable, form: newListTable.firstElementChild, data: data } }) );
		}).catch( function( error ) {
			let div = document.createElement('div');
			div.innerHTML = '<p>There was an unexpected error retrieving table data with error <code>' + error.message + '</code>, please try again or contact an administrator.</p>';
			div.setAttribute('class', 'em-warning error em-list-table-error-notice');
			listTable.querySelector('.table-wrap').before(div);
			loadingDiv.remove();
			listTable.classList.remove('em-working');
		});
		return false;
	});

	//Settings & Export Modal

	/**
	 * Handle trigger of settings and export modals.
	 */
	listTable.querySelectorAll('.em-list-table-trigger').forEach( trigger => {
		trigger.addEventListener('click', function (e) {
			e.preventDefault();
			let modal = document.querySelector( trigger.getAttribute('rel') );
			openModal(modal);
		});
	});

	/**
	 * Handle submission of settings forms, by copying over hidden input values such as cols and limit to main form.
	 */
	listTable.querySelectorAll('.em-list-table-settings form').forEach( form => {
		form.addEventListener('submit', function (e) {
			e.preventDefault();
			//we know we'll deal with cols, so wipe hidden value from main
			let modal = form.closest('.em-modal');
			let match = listTableForm.querySelector("[name=cols]");
			match.value = '';
			let tableCols = form.querySelectorAll('.em-list-table-cols-selected .item');
			tableCols.forEach( function (item_match) {
				if (!item_match.classList.contains('hidden')) {
					if (match.value !== '') {
						match.value = match.value + ',' + item_match.getAttribute('data-value');
					} else {
						match.value = item_match.getAttribute('data-value');
					}
				}
			});
			// sync row count
			let limit = form.querySelector('select[name="limit"]');
			if( limit ) {
				listTableForm.querySelector('[name="limit"]').value = limit.value;
			}
			// sync custom inputs
			form.querySelectorAll('[data-setting]').forEach( function( input ) {
				listTableForm.querySelectorAll('[name="'+input.name+'"]').forEach( el => el.remove() );
				let persisted = input.cloneNode(true);
				persisted.classList.add('hidden')
				listTableForm.appendChild( persisted );
			});
			closeModal(modal);
			// send events out
			modal.dispatchEvent( new CustomEvent('submitted') );
			listTable.dispatchEvent( new CustomEvent( 'em_list_table_settings_submitted', {
				detail: {
					listTableForm: listTableForm,
					form: form,
					modal: modal
				},
				bubbles: true
			}) );
			// submit main form
			listTableForm.requestSubmit();
		});
	});

	/**
	 * Handle submission of export forms, by copying over filters and hidden inputs with the data-persist attribute from main list table form.
	 */
	listTable.querySelectorAll('.em-list-table-export > form').forEach( function( exportForm ) {
		exportForm.addEventListener('submit', function(e) {
			var formFilters = this.querySelector('.em-list-table-filters');
			if ( formFilters ) {
				// get all filter inputs in main list table form and copy over so export inherits all filters to output right results
				let filters = listTableForm.querySelectorAll('.em-list-table-filters [name]');
				formFilters.innerHTML = ''; // Empty the filters, none to copy over
				if( filters ) {
					filters.forEach( function( filter ) {
						formFilters.appendChild( filter.cloneNode(true) );
					});
				}
				let peristentData = listTableForm.querySelectorAll('[data-persist]');
				if( peristentData ) {
					peristentData.forEach( function( filter ) {
						formFilters.appendChild( filter.cloneNode(true) );
					});
				}
			}
		});
	});

	// sortables
	listTable.querySelectorAll(".em-list-table-cols-sortable").forEach( function(sortable) {
		Sortable.create( sortable );
	});

	// add trigger
	document.dispatchEvent( new CustomEvent('em_list_table_setup', { detail: { listTable: listTable, listTableForm: listTableForm } }) );

	// add extra listeners that we might want to block such as in bulk actions and row actions

	/* ----------------- Row/Bulk Action Handlers ----------------- */

	const actionMessages = JSON.parse( listTableForm.dataset.actionMessages );
	let isBulkAction = false;

	listTable.addEventListener('click', function( e ) {
		if( e.target.matches('a[data-row_action]') ) {
			e.preventDefault();
			let el = e.target;
			let tr = el.closest('tr');

			if( !isBulkAction ) {
				let confirmation = []
				// check if we need to confirm something specific
				if ( el.dataset.confirmation && el.dataset.confirmation in actionMessages ) {
					confirmation.push( actionMessages[el.dataset.confirmation] );
				}
				// check context of action and warn then propagate if upstream
				if ( el.dataset.row_action in actionMessages ) {
					confirmation.push( actionMessages[el.dataset.row_action] );
				}

				if ( confirmation.length > 0 ) {
					if ( !confirm( confirmation.join("\n\n") ) ) {
						return false;
					}
				}
			}

			// close dropdown if applicable
			let dropdown = el.closest('[data-tippy-root], .em-tooltip-ddm-content');
			if ( dropdown ) {
				if ( '_tippy' in dropdown ) {
					dropdown._tippy.hide();
				}
			}

			// handle upstream rows, add a loading class to them so they don't get double-tapped, no checks necessary here since we have clicked a single row item
			if( el.dataset.upstream ) {
				// block any same upstream_id row so it's loading already pending refresh
				listTable.querySelectorAll('tr[data-id="' + tr.dataset.id + '"]').forEach( tr => tr.classList.add('loading') );
			}

			// prep and fetch/refresh
			let formData = new FormData( listTableForm );
			for( const [key, value] of Object.entries(el.dataset) ) {
				formData.set(key, value);
			}
			formData.set('view', listTable.dataset.view);
			formData.set('action', listTable.dataset.basename + '_row');
			listTableRowAction( tr, formData );

			return false; // stop propagation
		}
	});

	// Action links (approve/reject etc.) - circumvent if a warning is required
	listTable.addEventListener( 'click', function( e ) {
		if( e.target.matches('a[data-row_action]') ) {
			e.preventDefault();
		}
	});

	listTable.querySelectorAll('button.em-list-table-bulk-action').forEach( function( button ) {
		button.addEventListener('click', function (e) {
			e.preventDefault(); // override default
			let actionSelector = listTableForm.querySelector('select.bulk-action-selector');
			let action = actionSelector.options[actionSelector.selectedIndex];
			
			// check if we need to confirm
			if ( action.dataset.confirm ) {
				if ( !confirm( action.dataset.confirm ) ) {
					isBulkAction = false; // just in case
					return false;
				}
			}

			isBulkAction = true;
			// find all checked items and perform action on them if the action actually exists for that row (e.g. you can't re-approve an approved booking)
			let rows = listTableForm.querySelectorAll('tbody .check-column input:checked');
			rows.forEach( function ( checkbox ) {
				let actionTrigger = checkbox.parentElement.querySelector('[data-row_action="' + action.value + '"]');
				// check if sibling has the relevant action
				if( actionTrigger ) {
					let tr = checkbox.closest('tr');
					if ( actionTrigger.dataset.upstream ) {
						// check if not already in an upstream process, proceed if not
						if ( !tr.classList.contains('loading') ) { // if loading, already in upstream from another row
							// trigger the first booking id row in this table, it'll handle upstream stuff
							actionTrigger.click();
						}
					} else {
						// regular action, just click it
						actionTrigger.click();
					}
				}
			});
			isBulkAction = false;
		});
	});


	// add a listener to refresh related booking rows if upstream
	listTable.addEventListener('em_list_table_row_action_complete', function(e){
		if ( e.detail.upstream ) {
			// find any rows other than the current one and trigger a refresh
			let currentRow = e.detail.currentRow;
			let formData = e.detail.formData;
			if( formData.get('row_action') === 'delete' ) {
				let feedback = currentRow.querySelector('.column-primary span.em-icon-trash.em-tooltip');
				if ( feedback ) {
					listTable.querySelectorAll('tr[data-id="' + formData.get('row_id') + '"]').forEach( function( tr ) {
						// apply to all rows of same booking_id except the one we just updated
						if ( tr !== currentRow ) {
							let td = tr.querySelector('.column-primary');
							td.prepend(feedback.cloneNode(true));
							em_setup_tippy(td);
						}
						tr.classList.remove('faded-out');
						tr.classList.remove('loading');
					});
				}
			} else if( formData.get('row_action') !== 'refresh' ) {
				let feedback = currentRow.querySelector('.column-primary span.em-icon.em-tooltip').getAttribute('aria-label');
				formData.set('row_action', 'refresh'); // this is a special action that just refreshes the row
				formData.set('feedback', feedback);
				listTable.querySelectorAll('tr[data-id="' + formData.get('row_id') + '"]').forEach( function( tr ) {
					// apply to all rows of same booking_id except the one we just updated
					if( tr !== currentRow ) {
						listTableRowAction(tr, formData);
						// delete current booking_id and reset isUpstreamAction if we're done
						delete isUpstreamAction[e.detail.booking_id];
						if (Object.keys(isUpstreamAction).length) {
							isUpstreamAction = false;
						}
					}
				});
			}
		}
	});

	// setup rows with actions if there are any
	listTable.querySelectorAll('td.column-actions a').forEach( (action) => {
		action.classList.add('em-tooltip');
		action.setAttribute('aria-label', action.innerText);
	});
}

let listTableRowAction = function( tr, formData, upstream = false ){
	let listTable = tr.closest('.em-list-table');
	tr.classList.add('loading');
	formData.set('row_id', tr.dataset.id );
	fetch( EM.ajaxurl, { method: 'post', body : formData } ).then( function( response ) {
		return response.text();
	}).then( function( html ) {
		tr.classList.add('faded-out');
		if ( formData.get('row_action') === 'delete' ) {
			// the text provided is the icon, nothing else
			tr.querySelectorAll('th.check-column input[type="checkbox"], .em-list-table-actions').forEach( el => el.remove() );
			let td = tr.querySelector('.column-primary');
			let wrapper = document.createElement('div');
			wrapper.innerHTML = html;
			let icon = wrapper.firstElementChild;
			em_setup_tippy(wrapper); // no actions to set up
			td.prepend(icon);
		} else {
			tr.innerHTML = html
			setupListTableExtras(tr);
		}
		tr.classList.remove('faded-out');
		tr.classList.remove('loading');
		listTable.dispatchEvent( new CustomEvent('em_list_table_row_action_complete', { detail: { currentRow: tr, formData: formData, upstream: upstream } } ) );
	});
}

const setupListTableExtras = function( listTable ) {
	// setup rows with actions if there are any
	listTable.querySelectorAll('td.column-actions a').forEach( (action) => {
		action.classList.add('em-tooltip');
		action.setAttribute('aria-label', action.innerText);
	});
	// remove tooltips within tooltips in cell tooltips
	listTable.querySelectorAll('td .em-list-table-col-tooltip .em-list-table-col-tooltip').forEach( (subtip) => {
		subtip.querySelectorAll('.em-tooltip').forEach( el => el.remove() );
		subtip.querySelectorAll('.em-tooltip-content').forEach( el => el.classList.remove('hidden') );
	});
	// set up tippy, selectize etc.
	em_setup_tippy( listTable );
	em_setup_selectize( listTable );
}

document.addEventListener('em_list_table_filtered', function(e){
	setupListTable( e.detail.listTable );
	// re-setup tippy, selectize etc.
	setupListTableExtras( e.detail.listTable );
});

// init
document.addEventListener('DOMContentLoaded', function() {
	// add back-compat stuff
	document.querySelectorAll('.em_obj div.tablenav').forEach( function( tablenav ){
		let em_obj = tablenav.closest('.em_obj');
		em_obj.classList.add('em-list-table','legacy', 'frontend');
		em_obj.querySelector('& > form').classList.add('em-list-table-form');
	});
	// find tables
	document.querySelectorAll('.em-list-table').forEach( listTable => setupListTable(listTable) );
});

// add extra setup to bookings list table
document.addEventListener('em_list_table_setup'  , function(e){
	let listTable = e.detail.listTable;
	let listTableForm = e.detail.listTableForm;
	if( listTable.classList.contains('em-bookings-table') ) {

		// handle submitting the settings modal form with booking-speficic extras
		listTable.addEventListener('em_list_table_settings_submitted', function(e){
			let form = e.detail.form;
			let listTableForm = e.detail.listTableForm;
			// get the views ddm and sync it to the table filter
			let views_select = form.querySelector('select[name="view"]');
			if ( views_select ) {
				let view_radio = listTableForm.querySelector('[name="view"][value="' + views_select.value + '"]');
				if( view_radio ) {
					view_radio.checked = true; // this doesn't trigger an event as we don't want that
				}
				let view_option = listTableForm.querySelector('button.em-bookings-table-view-option[data-view]');
				if ( view_option ) {
					view_option.setAttribute('data-view', views_select.value);
					view_option.innerText = views_select.options[views_select.selectedIndex].innerText;
				}
			}
		});

		// setup views dropdown to switch between different booking table views
		let views_ddm_options = {
			theme : 'light-border',
			allowHTML : true,
			interactive : true,
			trigger : 'manual',
			placement : 'bottom',
			zIndex : 1000000,
			touch: true,
		};
		let tooltip_vars = { theme : 'light-border', appendTo : 'parent', touch : false, };

		// TODO unify this with the search view dropdown JS to remove redundant code
		listTable.querySelectorAll('.em-bookings-table-views-trigger').forEach( function( trigger ){
			tooltip_vars.content = trigger.parentElement.getAttribute('aria-label');
			let views_tooltip = tippy(trigger.parentElement, tooltip_vars);
			let views_content = trigger.parentElement.querySelector('.em-bookings-table-views-options');
			let views_content_parent = views_content.parentElement;
			let tippy_content = document.createElement('div');
			views_ddm_options.content = tippy_content;
			let views_ddm = tippy(trigger, views_ddm_options);
			views_ddm.setProps({
				onShow(instance){
					views_tooltip.disable();
					tippy_content.append(views_content);
				},
				onShown(instance){ // keyboard support
					views_content.querySelector('input:checked').focus();
				},
				onHidden(instance){
					views_tooltip.enable();
					if( views_content.parentElement !== views_content_parent ) {
						views_content_parent.append(views_content);
					}
				}
			});
			let tippy_listener = function(e){
				if( e.type === 'keydown' && !(e.which === 13 || e.which === 40) ) return false;
				e.preventDefault();
				e.stopPropagation();
				trigger._tippy.show();
				views_tooltip.hide();
			}
			trigger.addEventListener('click', tippy_listener);
			trigger.addEventListener('keydown', tippy_listener);
			trigger.firstElementChild.addEventListener('focus', function(e){
				views_ddm.hide();
				views_tooltip.enable();
				views_tooltip.show();
			});
			trigger.firstElementChild.addEventListener('blur', function(){
				views_tooltip.hide();
			});

			// TODO Remove this dependence on jQuery. Copied it from the search.js file, but it seems that even a vanilla document.addEventListener('blur') isn't intercepting these blur/focus events.
			let $ = jQuery;
			$views = $(listTable).find('.em-bookings-table-views');
			$views.on('focus blur', '.em-bookings-table-views-options input', function(){
				if( document.activeElement === this ){
					this.parentElement.classList.add('focused');
				}else{
					this.parentElement.classList.remove('focused');
				}
			});

			$views.on('keydown click', '.em-bookings-table-views-options input', function( e ){
				// get relevant vars
				if( e.type === 'keydown' && e.which !== 13 ){
					if ( [37, 38, 39, 40].indexOf(e.which) !== -1 ) {
						if (e.which === 38) {
							if (this.parentElement.previousElementSibling) {
								this.parentElement.previousElementSibling.focus();
							}
						} else if (e.which === 40) {
							if (this.parentElement.nextElementSibling) {
								this.parentElement.nextElementSibling.focus();
							}
						}
						return false;
					} else if ( e.which === 9 ) {
						// focus out
						views_ddm.hide();
					}
					return true;
				}
				this.checked = true;
				let input = $(this);
				// mark label selected
				input.closest('fieldset').find('label').removeClass('checked');
				input.parent().addClass('checked');
				// get other reference elements we need
				let views_wrapper = $(this).closest('.em-bookings-table-views');
				let view_type = this.value;
				let trigger = views_wrapper.children('.em-bookings-table-views-trigger');
				let trigger_option = trigger.children('.em-search-view-option');
				// change view, if different
				if( view_type !== trigger_option.attr('data-view') ){
					trigger_option.attr('data-view', this.value).text(this.parentElement.innerText);
					// remove cols value if it's just a switch in view, so we get default cols (if there is one)
					listTableForm.querySelector('input[name="cols"][type="hidden"]').value = '';
					// set the view type and trigger a form submit
					listTableForm.requestSubmit();
				}
				views_ddm.hide();
			});
		});
	}
});

// backcompat for em_bookings_filtered jQuery trigger
document.addEventListener('em_list_table_filtered', function( e ){
	if( e.detail.listTable.classList.contains('em-bookings-table') && window.jQuery ) {
		jQuery(document).triggerHandler('em_bookings_filtered', [jQuery(e.detail.data), e.detail.listTable, jQuery(e.detail.form)]); // backwards compatibility
	}
})

function em_setup_datepicker( container ){
	wrap = jQuery(container);

	//apply datepickers - jQuery UI (backcompat)
	let dateDivs = wrap.find('.em-date-single, .em-date-range');
	if( dateDivs.length > 0 ){
		//default picker vals
		var datepicker_vals = {
			dateFormat: "yy-mm-dd",
			changeMonth: true,
			changeYear: true,
			firstDay : EM.firstDay,
			yearRange:'c-100:c+15',
			beforeShow : function( el, inst ){
				em_setup_jquery_ui_wrapper();
				inst.dpDiv.appendTo('#em-jquery-ui');
			}
		};
		if( EM.dateFormat ) datepicker_vals.dateFormat = EM.dateFormat;
		if( EM.yearRange ) datepicker_vals.yearRange = EM.yearRange;
		jQuery(document).triggerHandler('em_datepicker', datepicker_vals);
		//apply datepickers to elements
		dateDivs.find('input.em-date-input-loc').each(function(i,dateInput){
			//init the datepicker
			var dateInput = jQuery(dateInput);
			var dateValue = dateInput.nextAll('input.em-date-input').first();
			var dateValue_value = dateValue.val();
			dateInput.datepicker(datepicker_vals);
			dateInput.datepicker('option', 'altField', dateValue);
			//now set the value
			if( dateValue_value ){
				var this_date_formatted = jQuery.datepicker.formatDate( EM.dateFormat, jQuery.datepicker.parseDate('yy-mm-dd', dateValue_value) );
				dateInput.val(this_date_formatted);
				dateValue.val(dateValue_value);
			}
			//add logic for texts
			dateInput.on('change', function(){
				if( jQuery(this).val() == '' ){
					jQuery(this).nextAll('.em-date-input').first().val('');
				}
			});
		});
		//deal with date ranges
		dateDivs.filter('.em-date-range').find('input.em-date-input-loc[type="text"]').each(function(i,dateInput){
			//finally, apply start/end logic to this field
			dateInput = jQuery(dateInput);
			if( dateInput.hasClass('em-date-start') ){
				dateInput.datepicker('option','onSelect', function( selectedDate ) {
					//get corresponding end date input, we expect ranges to be contained in .em-date-range with a start/end input element
					var startDate = jQuery(this);
					var endDate = startDate.parents('.em-date-range').find('.em-date-end').first();
					var startValue = startDate.nextAll('input.em-date-input').first().val();
					var endValue = endDate.nextAll('input.em-date-input').first().val();
					startDate.trigger('em_datepicker_change');
					if( startValue > endValue && endValue != '' ){
						endDate.datepicker( "setDate" , selectedDate );
						endDate.trigger('change').trigger('em_datepicker_change');
					}
					endDate.datepicker( "option", 'minDate', selectedDate );
				});
			}else if( dateInput.hasClass('em-date-end') ){
				var startInput = dateInput.parents('.em-date-range').find('.em-date-start').first();
				if( startInput.val() != '' ){
					dateInput.datepicker('option', 'minDate', startInput.val());
				}
			}
		});
	}

	// datpicker - new format
	let datePickerDivs = wrap.find('.em-datepicker, .em-datepicker-range');
	if( datePickerDivs.length > 0 ){
		// wrappers and locale
		let datepicker_wrapper = jQuery('#em-flatpickr');
		if( datepicker_wrapper.length === 0 ){
			datepicker_wrapper = jQuery('<div class="em pixelbones em-flatpickr" id="em-flatpickr"></div>').appendTo('body');
		}
		// locale
		if( 'locale' in EM.datepicker ){
			flatpickr.localize(flatpickr.l10ns[EM.datepicker.locale]);
			flatpickr.l10ns.default.firstDayOfWeek = EM.firstDay;
		}
		//default picker vals
		let datepicker_onChanging;
		let datepicker_options = {
			appendTo : datepicker_wrapper[0],
			dateFormat: "Y-m-d",
			disableMoble : "true",
			allowInput : true,
			onChange : [function( selectedDates, dateStr, instance ){
				if ( datepicker_onChanging !== selectedDates) {
					let wrapper = jQuery(instance.input).closest('.em-datepicker');
					let data_wrapper = wrapper.find('.em-datepicker-data');
					let inputs = data_wrapper.find('input');
					let dateFormat = function(d) {
						let month = '' + (d.getMonth() + 1),
							day = '' + d.getDate(),
							year = d.getFullYear();
						if (month.length < 2) month = '0' + month;
						if (day.length < 2) day = '0' + day;
						return [year, month, day].join('-');
					}
					if ( selectedDates.length === 0 ){
						if ( instance.config.mode === 'single' && wrapper.hasClass('em-datepicker-until') ) {
							let input = instance.input.classList.contains('em-date-input-start') ? inputs[0] : inputs[1];
							input.setAttribute('value', '');
							if ( inputs.filter(input => input.value !== '').length === 0 ) {
								wrapper.removeClass('has-value');
							}
						} else {
							wrapper.removeClass('has-value');
							inputs.attr('value', '');
							if( instance.config.mode === 'multiple' ) {
								// empty pill selection
								let datesEl = instance.input.closest('.em-datepicker').querySelector('.em-datepicker-dates');
								if (datesEl) {
									datesEl.querySelectorAll('.item:not(.clear-all)').forEach( el => el.remove() );
									datesEl.classList.remove('has-value');
								}
							}
						}
					} else {
						wrapper.addClass('has-value');
						if ( instance.config.mode === 'range' && selectedDates[1] !== undefined ) {
							// deal with end date
							inputs[0].setAttribute('value', dateFormat(selectedDates[0]));
							inputs[1].setAttribute('value', dateFormat(selectedDates[1]));
						} else if ( instance.config.mode === 'single' && wrapper.hasClass('em-datepicker-until') ){
							if( instance.input.classList.contains('em-date-input-start') ){
								inputs[0].setAttribute('value', dateFormat(selectedDates[0]));
								// set min-date of other datepicker
								let fp;
								if( wrapper.attr('data-until-id') ){
									let fp_inputData = jQuery('#' + wrapper.attr('data-until-id') + ' .em-date-input-end');
									fp = fp_inputData[0]._flatpickr;
								}else {
									fp = wrapper.find('.em-date-input-end')[0]._flatpickr;
								}
								if( fp.selectedDates[0] !== undefined && fp.selectedDates[0] < selectedDates[0] ){
									fp.setDate(selectedDates[0], false);
									inputs[1].setAttribute('value', dateFormat(fp.selectedDates[0]));
								}
								fp.set('minDate', selectedDates[0]);
							}else{
								inputs[1].setAttribute('value', dateFormat(selectedDates[0]));
							}
						} else if ( instance.config.mode === 'multiple' ){
							inputs[0].setAttribute('value', dateStr);
							// Sort the selected dates chronologically
							selectedDates.sort(function(a, b) { return a - b; });
							// Build pill selection for multiple dates
							let datesEl = instance.input.closest('.em-datepicker').querySelector('.em-datepicker-dates');
							datesEl.classList.add('has-value');
							if ( datesEl ) {
								// Remove existing date pills but preserve the clear-all button
								datesEl.querySelectorAll('.item:not(.clear-all)').forEach(el => el.remove());
	
								// Sort dates chronologically
								selectedDates.sort((a, b) => a - b);
	
								// Group sequential dates into ranges
								let groups = [], currentGroup = [];
								selectedDates.forEach((date, i) => {
									if (currentGroup.length === 0) {
										currentGroup.push(date);
									} else {
										let lastDate = currentGroup[currentGroup.length - 1];
										let diffDays = (date - lastDate) / (1000 * 3600 * 24);
										if (diffDays === 1) {
											currentGroup.push(date);
										} else {
											groups.push(currentGroup);
											currentGroup = [date];
										}
									}
									if (i === selectedDates.length - 1) groups.push(currentGroup);
								});
	
								// Insert pills and maintain date values
								groups.forEach(group => {
									let div = document.createElement('div');
									div.className = 'item';
									let formattedDates = group.map(date => instance.formatDate(date, 'Y-m-d'));
									div.dataset.date = formattedDates.join(',');
									let startText = instance.formatDate(group[0], instance.config.altFormat);
									let endText = instance.formatDate(group[group.length - 1], instance.config.altFormat);
									div.innerHTML = `<span>${group.length > 1 ? startText + ' - ' + endText : startText}</span><a href="#" class="remove" tabindex="-1" title="Remove">×</a>`;
									datesEl.insertBefore(div, datesEl.querySelector('.clear-all'));
								});
							}
						} else {
							inputs[0].setAttribute('value', dateFormat(selectedDates[0]));
						}
					}
					inputs.trigger('change');
					let current_date = data_wrapper.attr('date-value');
					data_wrapper.attr('data-value', inputs.toArray().map(input => input.value).filter(value => value !== '').join(','));
					if( current_date === dateStr ) data_wrapper.trigger('change');
					wrapper[0].dispatchEvent( new CustomEvent('datepicker-onChange', { detail: { selectedDates : selectedDates, dateStr: dateStr, instance: instance } }) );
				}
				datepicker_onChanging = null; // reset regardless, since it's to prevent onClose firing this twice
			}],
			onClose : function( selectedDates, dateStr, instance ){
				// deal with single date choice and clicking out
				if( instance.config.mode === 'range' && selectedDates[1] !== undefined ){
					if(selectedDates.length === 1){
						instance.setDate([selectedDates[0],selectedDates[0]], true); // wouldn't have been triggered with a single date selection
					}
				} else {
					// trigger an onChange
					datepicker_options.onChange[0](selectedDates, dateStr, instance);
					datepicker_onChanging = selectedDates; // set flag to prevent onChange firing twice
				}
			},
			locale : {},
		};
		if( EM.datepicker.format !== datepicker_options.dateFormat ){
			datepicker_options.altFormat = EM.datepicker.format;
			datepicker_options.altInput = true;
		}
		jQuery(document).triggerHandler('em_datepicker_options', datepicker_options);
		//apply datepickers to elements
		datePickerDivs.each( function(i,datePickerDiv) {
			// hide fallback fields, show range or single
			datePickerDiv = jQuery(datePickerDiv);
			datePickerDiv.find('.em-datepicker-data').addClass('hidden');
			let isRange = datePickerDiv.hasClass('em-datepicker-range');
			let altOptions = {};
			if( datePickerDiv.attr('data-datepicker') ){
				altOptions = JSON.parse(datePickerDiv.attr('data-datepicker'));
				if( typeof altOptions !== 'object' ){
					altOptions = {};
				}
			}
			let otherOptions = {};
			if( datePickerDiv.find('script.datepicker-options').length > 0 ){
				otherOptions = JSON.parse( datePickerDiv.find('script.datepicker-options').text() );
				if( typeof altOptions !== 'object' ){
					otherOptions = {};
				}
			}
			let options = Object.assign({}, datepicker_options, altOptions, otherOptions); // clone, mainly shallow concern for 'mode'
			options.mode = isRange ? 'range' : 'single';
			if ( datePickerDiv.hasClass('em-datepicker-multiple') ) {
				options.mode = 'multiple';
			}
			if( isRange && 'onClose' in options ){
				options.onClose = [function( selectedDates, dateStr, instance ){
					if(selectedDates.length === 1){ // deal with single date choice and clicking out
						instance.setDate([selectedDates[0],selectedDates[0]], true);
					}
				}];
			}
			if( datePickerDiv.attr('data-separator') ) options.locale.rangeSeparator = datePickerDiv.attr('data-separator');
			if( datePickerDiv.attr('data-format') ) options.altFormat = datePickerDiv.attr('data-format');
			let FPs = datePickerDiv.find('.em-date-input');
			//if ( FPs.hasClass(flatpickr-input) ) return; // already initialized
			if ( FPs[0].tagName.toLowerCase() === 'input' ) {
				FPs.attr('type', 'text');
			} else {
				options.wrap = true;
				FPs.find('input[type="hidden"]').attr('type', 'text');
			}
			FPs.flatpickr(options);
		});
		em_setup_datepicker_dates( datePickerDivs );
		// fire trigger
		jQuery(document).triggerHandler('em_flatpickr_loaded', [wrap]);
		container.dispatchEvent( new CustomEvent('em_datepicker_loaded', { bubbles: true, detail: { container: wrap, datepickers: datePickerDivs } } ) );
	}
}

function em_setup_datepicker_dates( container ) {
	let datePickerContainer = jQuery(container);
	let datePickerDivs = datePickerContainer.first().hasClass('em-datepicker') ? datePickerContainer : datePickerContainer.find('.em-datepicker, .em-datepicker-range') ;
	// add values to elements, done once all datepickers instantiated so we don't get errors with date range els in separate divs
	datePickerDivs.each( function(i,datePickerDiv) {
		datePickerDiv = jQuery(datePickerDiv);
		let FPs = datePickerDiv.find('.em-date-input');
		//if ( FPs.hasClass(flatpickr-input) ) return;
		let inputs = datePickerDiv.find('.em-datepicker-data input');
		inputs.attr('type', 'hidden'); // hide so not tabbable
		if( datePickerDiv.hasClass('em-datepicker-until') ){
			let start_fp = FPs.filter('.em-date-input-start')[0]._flatpickr;
			let end_fp;
			if( datePickerDiv.attr('data-until-id') ){
				end_fp = jQuery('#' + datePickerDiv.attr('data-until-id') + ' .em-date-input-end')[0]._flatpickr;
			}else{
				end_fp = FPs.filter('.em-date-input-end')[0]._flatpickr;
				if( inputs[1] && inputs[1].value ) {
					end_fp.setDate(inputs[1].value, false, 'Y-m-d');
				}
			}
			if( inputs[0] && inputs[0].value ){
				start_fp.setDate(inputs[0].value, false, 'Y-m-d');
				end_fp.set('minDate', inputs[0].value);
			}
			start_fp._inputData = inputs[0] ? [inputs[0]] : [];
			end_fp._inputData = inputs[1] ? [inputs[1]] : [];
		}else if( datePickerDiv.hasClass('em-datepicker-multiple') ){
			// handle multiple pre-loaded dates
			if( inputs[0] && inputs[0].value ){
				let datesArray = inputs[0].value.split(',');
				FPs[0]._flatpickr.setDate(datesArray, true, 'Y-m-d');
			}
			FPs[0]._flatpickr._inputData = [ inputs[0] ];
		}else{
			let dates = [];
			FPs[0]._flatpickr._inputData = [];
			inputs.each( function( i, input ){
				if( input.value ){
					dates.push(input.value);
					FPs[0]._flatpickr._inputData.push(input);
				}
			});
			FPs[0]._flatpickr.setDate(dates, false, 'Y-m-d');
		}
	});
}

/**
 * Deregister the datepicker
 * @param wrap
 */
function em_unsetup_datepicker( wrap ) {
	wrap.querySelectorAll(".em-datepicker .em-date-input.flatpickr-input").forEach( function( el ){
		if( '_flatpickr' in el ){
			el._flatpickr.destroy();
		}
	});
}

/**
 * Handle the remove button for each date selection pill
 */
document.addEventListener('click', function(e) {
	if ( !e.target.closest('.em-datepicker-dates .item:not(.clear-all) .remove') ) return;

	e.preventDefault();
	const pill = e.target.closest('.item');
	const datesContainer = pill.closest('.em-datepicker-dates');
	const datepickerContainer = datesContainer.closest('.em-datepicker');
	const dateInput = datepickerContainer.querySelector('.em-date-input');

	// Remove pill
	pill.remove();

	// Rebuild dates array from remaining pills
	const newDates = [];
	datesContainer.querySelectorAll('.item:not(.clear-all)').forEach(item => {
		const dates = item.dataset.date.split(',');
		dates.forEach(date => newDates.push(date));
	});

	// Update Flatpickr instance
	const fp = datepickerContainer.querySelector('.em-date-input')._flatpickr;
	if (fp) fp.setDate(newDates, true, 'Y-m-d');

	// Update hidden input
	const altInput = datepickerContainer.querySelector('.em-datepicker-data input');
	if (altInput) {
		altInput.value = newDates.join(',');
		altInput.dispatchEvent(new Event('change'));
	}
});

/**
 * Handle the Clear All button
 */
document.addEventListener('click', function(e) {
	if ( !e.target.closest('.em-datepicker-dates .clear-all') ) return;

	e.preventDefault();
	const datesContainer = e.target.closest('.em-datepicker-dates');
	const datepickerContainer = datesContainer.closest('.em-datepicker');
	const fp = datepickerContainer.querySelector('.em-date-input')._flatpickr;

	// Remove all pills
	datesContainer.querySelectorAll('.item:not(.clear-all)').forEach( item => item.remove() );

	// Clear Flatpickr instance
	if (fp) fp.clear();

	// Update hidden input
	const altInput = datepickerContainer.querySelector('.em-datepicker-data input');
	if (altInput) {
		altInput.value = '';
		altInput.dispatchEvent(new Event('change'));
	}
});



function em_setup_timepicker( container ){
	wrap = jQuery(container);
	var timepicker_options = {
		step:15
	}
	timepicker_options.timeFormat = EM.show24hours == 1 ? 'G:i':'g:i A';
	jQuery(document).triggerHandler('em_timepicker_options', timepicker_options);
	wrap.find(".em-time-input").em_timepicker(timepicker_options).each( function(i, el){
		this.dataset.seconds = this.value ? jQuery(this).em_timepicker('getSecondsFromMidnight') : '';
	});

	/**
	 * A function that retargets an the change event to the .em-time-range enclosing div whilst maintinaing the originally triggered target.
	 * This is done because the em_timepicker short-circuits the bubbling.
	 *
	 * @param {Event} e - The original event to be retargeted.
	 */
	let retargetEvent = function(e) {
		e.stopPropagation();
		const customEvent = new CustomEvent('change', {
			bubbles: true,
			cancelable: true,
			detail: { target: e.target }
		});

		// Override the target getter to return the original element
		Object.defineProperty(customEvent, 'target', {
			configurable: true,
			get: () => e.target,
		});
		e.target.closest('.em-time-range').dispatchEvent( customEvent );
	};

	// Keep the duration between the two inputs.
	wrap.find(".em-time-range input.em-time-start").each( function(i, el){
		var time = jQuery(el);
		time.data('oldTime', time.em_timepicker('getSecondsFromMidnight'));
	}).on('change', function( e ) {
		var start = jQuery(this);
		var wrapper = start.closest('.em-time-range');
		var end = wrapper.find('.em-time-end').first();
		if ( end.val() ) { // Only update when second input has a value.
			// Calculate duration.
			var oldTime = start.data('oldTime');
			var duration = (end.em_timepicker('getSecondsFromMidnight') - oldTime) * 1000;
			var time = start.em_timepicker('getSecondsFromMidnight');
			if(  this.value && end.em_timepicker('getSecondsFromMidnight') >= oldTime ){
				// Calculate and update the time in the second input.
				end.em_timepicker('setTime', new Date(start.em_timepicker('getTime').getTime() + duration));
			}
			start.data('oldTime', time);
		}
		if ( start.val() || end.val() ) {
			wrapper.find('.em-time-all-day').prop('checked', false).prop('indeterminate', false);
		}
		this.dataset.seconds = start.val() ? start.em_timepicker('getSecondsFromMidnight') : '';
		retargetEvent(e);
	});
	// Validate.
	container.querySelectorAll('.em-time-range').forEach( el => el.addEventListener('change', function (e) {
		if ( e.target.matches('input.em-time-end') ) {
			let end = jQuery(e.target);
			e.target.dataset.seconds = end.val() ? end.em_timepicker('getSecondsFromMidnight') : '';
			let start = end.prevAll('.em-time-start');
			let wrapper = e.target.closest('.event-form-when, .em-time-range');
			let start_date_element = wrapper.querySelector('.em-date-end');
			let end_date_element = wrapper.querySelector('.em-date-start');
			let start_date = start_date_element ? start_date_element.value : '';
			let end_date = end_date_element ? end_date_element.value : '';
			if ( start.val() ) {
				let hasError = start.em_timepicker('getTime') > end.em_timepicker('getTime') && (!end_date || start_date === end_date);
				e.target.classList.toggle('error', hasError);
			}
			if (end_date_element) {
				wrapper.querySelectorAll('.em-time-all-day').forEach(function (checkbox) {
					checkbox.checked = false;
					checkbox.indeterminate = false;
				});
			}
		} else if ( e.target.matches('.em-date-end') ) {
			jQuery(e.target.closest('.event-form-when')).find('.em-time-end').trigger('change');
		} else if ( e.target.matches('input.em-time-all-day') ) {
			e.currentTarget.querySelectorAll('.em-time-input').forEach(function (input) {
				input.readOnly = e.target.checked;
			});
			if ( e.target.checked ) {
				// set 12am and 11:59pm for start/end times
				e.currentTarget.querySelectorAll('.em-time-start').forEach( el => jQuery(el).em_timepicker('setTime', new Date('2000-01-01 00:00:00') ) );
				e.currentTarget.querySelectorAll('.em-time-end').forEach( el => jQuery(el).em_timepicker('setTime', new Date('2000-01-01 23:59:59') ) );
			}
		}
	}) );
	// listen to and dispatch the event
	wrap.find(".em-time-range input.em-time-end").on('change', retargetEvent );
}

function em_unsetup_timepicker( container ) {
	jQuery(container).find('.em-time-range input.em-time-end, .em-time-range input.em-time-start').unbind(['click','focus','change']); //clear all timepickers - consequently, also other click/blur/change events, recreate the further down
}

let em_close_other_selectized = function(){
	// find all other selectized items and close them
	let control = this.classList.contains('selectize-control') ? this.closest('.em-selectize.selectize-control') : this;
	document.querySelectorAll('.em-selectize.dropdown-active').forEach( function( el ){
		if( el !== control && 'selectize' in el.previousElementSibling) {
			el.previousElementSibling.selectize.close();
		}
	});
}

document.addEventListener('events_manager_js_loaded', function(){
	EM_Selectize.define('multidropdown', function( options ) {
		if( !this.$input.hasClass('multidropdown') ) return;
		let s = this;
		let s_setup = s.setup;
		let s_refreshOptions = s.refreshOptions;
		let s_open = s.open;
		let s_close = s.close;
		let placeholder;
		let placeholder_text
		let placeholder_default;
		let placeholder_label;
		let counter;
		let isClosing = false;
		this.changeFunction = function() {
			let items = s.getValue();
			let selected_text = this.$input.attr('data-selected-text') ? this.$input.attr('data-selected-text') : '%d Selected';
			counter.children('span.selected-text').text(selected_text.replace('%d', items.length));
			if( items.length > 0 ) {
				counter.removeClass('hidden');
				placeholder_text.text( placeholder_label );
				s.$control_input.attr('placeholder', s.$input.attr('placeholder'));
			} else {
				counter.addClass('hidden');
				placeholder_text.text( placeholder_default );
			}
		}
		this.setup = function() {
			s_setup.apply(s);
			s.isDropdownClosingPlaceholder = false;
			// add section to top of selection to show the dropdown text
			placeholder = jQuery('<div class="em-selectize-placeholder"></div>').prependTo(s.$wrapper);
			let clear_text = this.$input.attr('data-clear-text') ? this.$input.attr('data-clear-text') : 'Clear Selection';
			counter = jQuery('<span class="placeholder-count hidden"><a href="#" class="remove" tabindex="-1">X</a><span class="selected-text"></span><span class="clear-selection">' + clear_text + '</span></div>').prependTo(placeholder);
			placeholder_text = jQuery('<span class="placeholder-text"></span>').appendTo(placeholder);
			placeholder_default = s.$input.attr('data-default') ? s.$input.attr('data-default') : s.$input.attr('placeholder');
			placeholder_label = s.$input.attr('data-label') ? s.$input.attr('data-label') : s.$input.attr('placeholder');
			placeholder_text.text( placeholder_default );
			s.$dropdown.prepend(s.$control_input.parent());
			s.on('dropdown_close', function() {
				s.$wrapper.removeClass('dropdown-active');
			});
			s.on('dropdown_open', function() {
				s.$wrapper.addClass('dropdown-active');
				s.$control_input.val('');
			});
			s.on('change', this.changeFunction);
			placeholder.on('focus blur click', function (e) {
				// only if we're clicking on the placeholder
				if( this.matches('.em-selectize-placeholder') ) {
					if ( !s.isOpen && e.type !== 'blur' ){
						s.open();
					} else if ( s.isOpen && e.type !== 'focus' ) {
						s.close();
					}
				}
			}).on('focus blur click mousedown mouseup', function( e ){
				if( this.matches('.em-selectize-placeholder') ) {
					// stope selectize doing anything to our own open/close actions
					e.stopPropagation();
					e.preventDefault();
					if( e.type === 'click' ) {
						em_close_other_selectized.call( this.closest('.selectize-control') );
						if ( s.isOpen && s.$control_input.val() && !this.matches('.placeholder-count') && !this.closest('.placeholder-count') ) {
							isClosing = true;
							s.close();
						}
					} else {
						isClosing = false;
					}
					return false;
				}
			});
			counter.on( 'click' , function( e ){
				e.preventDefault();
				e.stopPropagation();
				s.clear();
				if( s.isOpen ) s.refreshOptions();
			});
			this.changeFunction();
		}

		// prevent dropdown from closing when no options are found, because the search input shows within the dropdown in multidropdown
		this.refreshOptions = function ( ...args ) {
			s_refreshOptions.apply(s, args);
			if ( !this.hasOptions && this.lastQuery ) {
				// intervene on closing only if not in a closing process caused by our own listeners
				if( isClosing === false ) {
					this.$wrapper.addClass("dropdown-active");
					s.isOpen = true;
				}
				this.$wrapper.addClass("no-options");
				isClosing = false;
			} else {
				this.$wrapper.removeClass("no-options");
			}
		};
	});
});

function em_setup_selectize( container_element ){
	container = jQuery(container_element); // in case we were given a dom object

	container.find('.em-selectize.selectize-control').on( 'click', em_close_other_selectized );

	let optionRender = function (item, escape) {
		let html = '<div class="option"';
		if( 'data' in item ){
			// any key/value object pairs wrapped in a 'data' key within JSON object in the data-data attribute is added automatically as a data-key="value" attribute
			Object.entries(item.data).forEach( function( item_data ){
				html += ' data-'+ escape(item_data[0]) + '="'+ escape(item_data[1]) +'"';
			});
		}
		html +=	'>';
		if( this.$input.hasClass('checkboxes') ){
			html += item.text.replace(/^(\s+)?/i, '$1<span></span> ');
		}else{
			html += item.text;
		}
		html += '</div>';
		return html;
	};

	// Selectize General
	container.find('select:not([multiple]).em-selectize, .em-selectize select:not([multiple])').em_selectize({
		selectOnTab : false,
		render: {
			option: optionRender,
		},
	}).on('change', ( e ) => {
		e.target.selectize?.$input[0].parentElement.dispatchEvent( new CustomEvent('change', { bubbles: true, cancelable: true, detail : { target: e.target, selectize: e.target.selectize } }) )
	});
	container.find('select[multiple].em-selectize, .em-selectize select[multiple]').em_selectize({
		selectOnTab : false,
		hideSelected : false,
		plugins: ["remove_button", 'click2deselect','multidropdown'],
		diacritics : true,
		render: {
			item: function (item, escape) {
				return '<div class="item"><span>' + item.text.replace(/^\s+/i, '') + '</span></div>';
			},
			option : optionRender,
			optgroup : function (item, escape) {
				let html = '<div class="optgroup" data-group="' + escape(item.label) + '"';
				if( 'data' in item ){
					// any key/value object pairs wrapped in a 'data' key within JSON object in the data-data attribute is added automatically as a data-key="value" attribute
					Object.entries(item.data).forEach( function( item_data ){
						html += ' data-'+ escape(item_data[0]) + '="'+ escape(item_data[1]) +'"';
					});
				}
				html +=	'>';
				return html + item.html + '</div>';
			}

		},
	}).on('change', ( e ) => {
		e.target.selectize?.$input[0].parentElement.dispatchEvent( new CustomEvent('change', { bubbles: true, cancelable: true, detail : { target: e.target, selectize: e.target.selectize } }) )
	});
	container.find('.em-selectize:not(.always-open)').each( function(){
		if( 'selectize' in this ){
			let s = this.selectize;
			this.selectize.$wrapper.on('keydown', function(e) {
				if( e.keyCode === 9 ) {
					s.blur();
				}
			});
		}
	});
	container.find('.em-selectize.always-open').each( function(){
		//extra behaviour for selectize "always open mode"
		if( 'selectize' in this ){
			let s = this.selectize;
			s.open();
			s.advanceSelection = function(){}; // remove odd item shuffling
			s.setActiveItem = function(){}; // remove odd item shuffling
			// add event listener to fix remove button issues due to above hacks
			this.selectize.$control.on('click', '.remove', function(e) {
				if ( s.isLocked  ) return;
				var $item = jQuery(e.currentTarget).parent();
				s.removeItem($item.attr('data-value'));
				s.refreshOptions();
				return false;
			});
		}
	});

	// Sortables - selectize and sorting columns, usually in list tables
	container.find('.em-list-table-modal .em-list-table-cols').each( function(){
		let parent = jQuery(this);
		let sortables = jQuery(this).find('.em-list-table-cols-sortable');
		parent.find('.em-selectize.always-open').each( function() {
			//extra behaviour for selectize column picker
			if ('selectize' in this) {
				let selectize = this.selectize;
				// add event listener to fix remove button issues due to above hacks
				selectize.on('item_add', function (value, item) {
					let col = item.clone();
					let option  = selectize.getOption(value);
					let type = option.attr('data-type');
					col.appendTo(sortables);
					col.attr('data-type', type);
					if( option.attr('data-header') ) {
						col.children('span:first-child').text( option.attr('data-header') );
					}
					jQuery('<input type="hidden" name="cols[' + value + ']" value="1">').appendTo(col);
				});
				selectize.on('item_remove', function (value) {
					parent.find('.item[data-value="'+ value +'"]').remove();
				});
				parent.on('click', '.em-list-table-cols-selected .item .remove', function(){
					let value = this.parentElement.getAttribute('data-value');
					selectize.removeItem(value, true);
				});
			}
		});
	});
}

function em_unsetup_selectize( container ) {
	container.querySelectorAll('.em-selectize').forEach( function( el ) {
		//extra behaviour for selectize "always open mode"
		if ( 'selectize' in el ) {
			el.selectize.destroy();
		}
	});
}

function em_setup_tippy( container_element ){
	let container = jQuery(container_element);
	var tooltip_vars = {
		theme : 'light-border',
		appendTo : 'parent',
		content(reference) {
			if( reference.dataset.content ){
				try {
					let content = container[0].querySelector(reference.dataset.content);
					if (content) {
						content.classList.remove('hidden');
						return content;
					}
				} catch ( error ) {
					console.log('Invlid tooltip selector in %o : %o', reference, error);
				}
			};
			return reference.getAttribute('aria-label') ?? reference.title ?? '';
		},
		'touch' : ['hold', 300],
		allowHTML : true,
	};
	jQuery(document).trigger('em-tippy-vars',[tooltip_vars, container]);
	container.find('.em-tooltip').each( ( i, tooltip ) => tippy( tooltip, tooltip_vars ) );
	// Set up Tippy DDMs
	let tippy_ddm_options = {
		theme : 'light-border',
		arrow : false,
		allowHTML : true,
		interactive : true,
		trigger : 'manual',
		placement : 'bottom',
		zIndex : 1000000,
		touch : true,
	};
	jQuery(document).trigger('em-tippy-ddm-vars',[tippy_ddm_options, container]);
	container.find('.em-tooltip-ddm').each( function(){
		let ddm_content, ddm_content_sibling;
		if( this.getAttribute('data-content') ){
			ddm_content = document.getElementById(this.getAttribute('data-content'))
			ddm_content_sibling = ddm_content.previousElementSibling;
		}else{
			ddm_content = this.nextElementSibling;
			ddm_content_sibling = ddm_content.previousElementSibling;
		}
		let tippy_content = document.createElement('div');
		// allow for custom width
		let button_width = this.getAttribute('data-button-width');
		if( button_width ){
			if( button_width == 'match' ){
				tippy_ddm_options.maxWidth = this.clientWidth;
				ddm_content.style.width = this.clientWidth + 'px';
			}else{
				tippy_ddm_options.maxWidth = this.getAttribute('data-button-width');
			}
		}
		tippy_ddm_options.content = tippy_content;
		let tippy_ddm = tippy(this, tippy_ddm_options);
		tippy_ddm.props.distance = 50;
		tippy_ddm.setProps({
			onShow(instance){
				if( instance.reference.getAttribute('data-tooltip-class') ) {
					instance.popper.classList.add( instance.reference.getAttribute('data-tooltip-class') );
				}
				instance.popper.classList.add( 'em-tooltip-ddm-display' );
				tippy_content.append(ddm_content);
				ddm_content.classList.remove('em-tooltip-ddm-content');
			},
			onShown(instance){ // keyboard support
				ddm_content.firstElementChild.focus();
			},
			onHidden(instance){
				if( ddm_content.previousElementSibling !== ddm_content_sibling ) {
					ddm_content_sibling.after(ddm_content);
					ddm_content.classList.add('em-tooltip-ddm-content');
				}
			},
		});
		let tippy_listener = function(e){
			if( e.type === 'keydown' && !(e.which === 13 || e.which === 40) ) return false;
			e.preventDefault();
			e.stopPropagation();
			this._tippy.show();
		}
		this.addEventListener('click', tippy_listener);
		this.addEventListener('keydown', tippy_listener);
		tippy_content.addEventListener('blur', function(){
			tippy_content.hide();
		});
		tippy_content.addEventListener('mouseover', function(){
			ddm_content.firstElementChild.blur();
		});
	});
}

function em_unsetup_tippy( container ) {
	container.querySelectorAll('.em-tooltip-ddm').forEach( function( el ){
		if ( '_tippy' in el ) {
			el._tippy.destroy();
		}
	});
}

/*
 * MAP FUNCTIONS
 */
var em_maps_loaded = false;
var maps = {};
var maps_markers = {};
var maps_infoWindows = {};
var content
//loads maps script if not already loaded and executes EM maps script
function em_maps_load(){
	if( !em_maps_loaded ){
		if ( jQuery('script#google-maps').length == 0 && ( typeof google !== 'object' || typeof google.maps !== 'object' ) ){
			let script = document.createElement("script");
			script.type = "text/javascript";
			script.id = "google-maps";
			script.async = true;
			let proto = (EM.is_ssl) ? 'https:' : 'http:';
			if( typeof EM.google_maps_api !== 'undefined' ){
				script.src = proto + '//maps.google.com/maps/api/js?loading=async&v=quarterly&libraries=places&callback=em_maps&key='+EM.google_maps_api;
			}else{
				script.src = proto + '//maps.google.com/maps/api/js?loading=async&v=quarterly&libraries=places&callback=em_maps';
			}
			document.body.appendChild(script);
		}else if( typeof google === 'object' && typeof google.maps === 'object' && !em_maps_loaded ){
			em_maps();
		}else if( jQuery('script#google-maps').length > 0 ){
			jQuery(window).load(function(){ if( !em_maps_loaded ) em_maps(); }); //google isn't loaded so wait for page to load resources
		}
	}
}
jQuery(document).on('em_view_loaded_map', function( e, view, form ){
	if( !em_maps_loaded ){
		em_maps_load();
	}else{
		let map = view.find('div.em-locations-map');
		em_maps_load_locations( map[0] );
	}
});
//re-usable function to load global location maps
async function em_maps_load_locations( element ){
	const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");
	let el = element;
	let map_id = el.getAttribute('id').replace('em-locations-map-','');
	let em_data;
	if ( document.getElementById('em-locations-map-coords-'+map_id) ) {
		em_data = JSON.parse( document.getElementById('em-locations-map-coords-'+map_id).text );
	} else {
		let coords_data = el.parentElement.querySelector('.em-locations-map-coords');
		if ( coords_data ) {
			em_data = JSON.parse( coords_data.text );
		} else {
			em_data = {};
		}
	}
	jQuery.getJSON(document.URL, em_data , function( data ) {
		if( data.length > 0 ){
			//define default options and allow option for extension via event triggers
			let map_options = {
				mapTypeId: google.maps.MapTypeId.ROADMAP,
				mapId: 'em-locations-map-' + map_id
			};
			if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; }
			else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
			jQuery(document).triggerHandler('em_maps_locations_map_options', map_options);
			let marker_options = {};
			jQuery(document).triggerHandler('em_maps_location_marker_options', marker_options);

			maps[map_id] = new google.maps.Map(el, map_options);
			maps_markers[map_id] = [];

			let bounds = new google.maps.LatLngBounds();

			jQuery.map( data, function( location, i ){
				if( !(location.location_latitude == 0 && location.location_longitude == 0) ){
					let latitude = parseFloat( location.location_latitude );
					let longitude = parseFloat( location.location_longitude );
					let location_position = new google.maps.LatLng( latitude, longitude );
					//extend the default marker options
					jQuery.extend(marker_options, {
						position: location_position,
						map: maps[map_id]
					})
					let marker = new AdvancedMarkerElement(marker_options);
					maps_markers[map_id] = marker;
					em_map_InfoWindow ( location.location_name, location.location_balloon, marker );
					//extend bounds
					bounds.extend(new google.maps.LatLng(latitude,longitude))
				}
			});
			// Zoom in to the bounds
			maps[map_id].fitBounds(bounds);

			//Call a hook if exists
			if( jQuery ) {
				jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], data, map_id, maps_markers[map_id]]);
			}
			document.dispatchEvent( new CustomEvent('em_maps_locations_hook', {
				detail: {
					map : maps[map_id],
					data : data,
					id : map_id,
					markers : maps_markers[map_id],
					el : el,
				},
				cancellable : true,
			}));
		} else {
			el.firstElementChild.innerHTML = 'No locations found';
			if( jQuery ) {
				jQuery(document).triggerHandler('em_maps_locations_hook_not_found', [ jQuery(el) ]);
			}
			document.dispatchEvent( new CustomEvent('em_maps_locations_hook_not_found', {
				detail: {
					id : map_id,
					el : el
				},
				cancellable : true,
			}));
		}
	});
}
async function em_maps_load_location(el){
	el = jQuery(el);
	const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");
	let mapId = el.attr('id');
	let map_id = mapId.replace('em-location-map-','');
	let map_title = el.attr('title');
	let em_LatLng = new google.maps.LatLng( jQuery('#em-location-map-coords-'+map_id+' .lat').text(), jQuery('#em-location-map-coords-'+map_id+' .lng').text());
	//extend map and markers via event triggers
	let map_options = {
		zoom: 14,
		center: em_LatLng,
		mapTypeId: google.maps.MapTypeId.ROADMAP,
		mapTypeControl: false,
		gestureHandling: 'cooperative',
		mapId: mapId,
	};
	if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; }
	else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
	jQuery(document).triggerHandler('em_maps_location_map_options', map_options);
	maps[map_id] = new google.maps.Map( document.getElementById('em-location-map-'+map_id), map_options);
	let marker_options = {
		position: em_LatLng,
		map: maps[map_id],
		title: map_title,
	};
	jQuery(document).triggerHandler('em_maps_location_marker_options', marker_options);
	let marker = new AdvancedMarkerElement(marker_options);
	maps_markers[map_id] = marker;
	let content = jQuery('#em-location-map-info-'+map_id + ' .em-map-balloon-content').get(0);
	em_map_InfoWindow( map_title, content, marker, true );

	//JS Hook for handling map after instantiation
	//Example hook, which you can add elsewhere in your theme's JS - jQuery(document).on('em_maps_location_hook', function(){ alert('hi');} );
	jQuery(document).triggerHandler('em_maps_location_hook', [maps[map_id], infoWindow, maps_markers[map_id], map_id]);
	//map resize listener
	jQuery(window).on('resize', function(e) {
		google.maps.event.trigger(maps[map_id], "resize");
		maps[map_id].setCenter(maps_markers[map_id].position);
		maps[map_id].panBy(40,-70);
	});
}
jQuery(document).on('em_search_ajax', function(e, vars, wrapper){
	if( em_maps_loaded ){
		wrapper.find('div.em-location-map').each( function(index, el){ em_maps_load_location(el); } );
		wrapper.find('div.em-locations-map').each( function(index, el){ em_maps_load_locations(el); });
	}
});
//Load single maps (each map is treated as a seperate map).
async function em_maps() {
	/**
	 * InfoWindow object - Location info bubble on map, showing the current map
	 */
	let infoWindow;
	//Find all the maps on this page and load them
	jQuery('div.em-location-map').each( function(index, el){ em_maps_load_location(el); } );
	jQuery('div.em-locations-map').each( function(index, el){ em_maps_load_locations(el); } );

	//Location stuff - only needed if inputs for location exist
	if( jQuery('select#location-select-id, input#location-address').length > 0 ){
		const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");
		let map
		let marker;

		// refresh map with current location info
		let refresh_map_location = function(){
			let location_latitude = jQuery('#location-latitude').val();
			let location_longitude = jQuery('#location-longitude').val();
			let hasCoords = location_latitude != 0 || location_longitude != 0;
			if( hasCoords ){
				let position = new google.maps.LatLng(location_latitude, location_longitude); //the location coords
				marker.position = position;
				let mapTitle = (jQuery('input#location-name').length > 0) ? jQuery('input#location-name').val():jQuery('input#title').val();
				mapTitle = em_esc_attr(mapTitle);
				marker.title = mapTitle ;
				marker.gmpDraggable = true;
				jQuery('#em-map').show();
				jQuery('#em-map-404').hide();
				google.maps.event.trigger(map, 'resize');
				map.setCenter(position);
				map.panBy(40,-55);
				infoWindow?.close();
				infoWindow = em_map_InfoWindow( mapTitle, em_esc_attr(jQuery('#location-address').val()) + '<br>' + em_esc_attr(jQuery('#location-town').val()), marker, true );
				jQuery(document).triggerHandler('em_maps_location_hook', [map, infoWindow, marker, 0]);
			} else {
				jQuery('#em-map').hide();
				jQuery('#em-map-404').show();
			}
		};

		// Add listeners for changes to address or location ID

		// get or refresh the map by location id
		let get_map_by_id = function(id){
			if(jQuery('#em-map').length > 0){
				jQuery('#em-map-404 .em-loading-maps').show();
				jQuery.getJSON(document.URL,{ em_ajax_action:'get_location', id:id }, function(data){
					let hasCoords = data.location_latitude != 0 && data.location_longitude != 0;
					if( hasCoords ){
						loc_latlng = new google.maps.LatLng(data.location_latitude, data.location_longitude);
						marker.position = loc_latlng;
						marker.title = data.location_name;
						marker.gmpDraggable = false;
						jQuery('#em-map').show();
						jQuery('#em-map-404').hide();
						jQuery('#em-map-404 .em-loading-maps').hide();
						map.setCenter(loc_latlng);
						map.panBy(40,-55);
						infoWindow?.close();
						infoWindow = em_map_InfoWindow( data.location_name, data.location_balloon, marker, true );
						google.maps.event.trigger(map, 'resize');
						jQuery(document).triggerHandler('em_maps_location_hook', [map, infoWindow, marker, 0]);
					}else{
						jQuery('#em-map').hide();
						jQuery('#em-map-404').show();
						jQuery('#em-map-404 .em-loading-maps').hide();
					}
				});
			}
		};
		jQuery('#location-select-id, input#location-id').on('change', function() { get_map_by_id( jQuery(this).val() ); } );

		// detect changes to address fields and build a coordinate from geocoding
		jQuery('#location-name, #location-town, #location-address, #location-state, #location-postcode, #location-country').on('change', function(){
			//build address
			if( jQuery(this).prop('readonly') === true ) return;
			let addresses = [ jQuery('#location-address').val(), jQuery('#location-town').val(), jQuery('#location-state').val(), jQuery('#location-postcode').val() ];
			let address = '';
			jQuery.each( addresses, function(i, val){
				if( val != '' ){
					address = ( address == '' ) ? address+val:address+', '+val;
				}
			});
			if( address == '' ){ //in case only name is entered, no address
				jQuery('#em-map').hide();
				jQuery('#em-map-404').show();
				return false;
			}
			//do country last, as it's using the text version
			if( jQuery('#location-country option:selected').val() != 0 ){
				address = ( address == '' ) ? address+jQuery('#location-country option:selected').text():address+', '+jQuery('#location-country option:selected').text();
			}
			//add working indcator whilst we search
			jQuery('#em-map-404 .em-loading-maps').show();
			//search!
			if( address != '' && jQuery('#em-map').length > 0 ){
				let geocoder = new google.maps.Geocoder();
				geocoder.geocode( { 'address': address }, function(results, status) {
					if (status == google.maps.GeocoderStatus.OK) {
						jQuery('#location-latitude').val(results[0].geometry.location.lat());
						jQuery('#location-longitude').val(results[0].geometry.location.lng());
					}
					refresh_map_location();
				});
			}
		});
		
		// Check if we are on a location editing page, and if address was previously entered, if so we check location coords
		let location_latitude = jQuery('#location-latitude').val();
		let location_longitude = jQuery('#location-longitude').val();
		let hasCoords = location_latitude != 0 || location_longitude != 0;
		if ( !hasCoords  ) {
			// check if there's any address items that were added previously
			if ( document.getElementById('location-address')?.value != '' && (document.getElementById('location-address')?.value != '' || document.getElementById('location-town')?.value != '' || document.getElementById('location-state')?.value != '' || document.getElementById('location-postcode')?.value != '' ) ) {
				// trigger a change so we reload the address and coords
				jQuery('#location-address').trigger('change');
				if ( 'google_maps_resave_location' in EM ) {
					alert(EM.google_maps_resave_location);
				}
			}
		}

		// Load map initially
		if(jQuery('#em-map').length > 0){
			let em_LatLng = new google.maps.LatLng(0, 0);
			let map_options = {
				zoom: 14,
				center: em_LatLng,
				mapTypeId: google.maps.MapTypeId.ROADMAP,
				mapTypeControl: false,
				gestureHandling: 'cooperative',
				mapId: 'em-map',
			};
			if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
			map = new google.maps.Map( document.getElementById('em-map'), map_options);
			marker = new AdvancedMarkerElement({
				position: em_LatLng,
				map: map,
				gmpDraggable: true,
			});
			google.maps.event.addListener(marker, 'dragend', function() {
				let position = marker.position;
				jQuery('#location-latitude').val(position.lat);
				jQuery('#location-longitude').val(position.lng);
				map.setCenter(position);
				map.panBy(40,-55);
			});
			if( jQuery('#location-select-id').length > 0 ){
				jQuery('#location-select-id').trigger('change');
			}else{
				refresh_map_location();
			}
			jQuery(document).triggerHandler('em_map_loaded', [map, infoWindow, marker]);
		}
		//map resize listener
		jQuery(window).on('resize', function(e) {
			google.maps.event.trigger(map, "resize");
			map.setCenter(marker.position);
			map.panBy(40,-55);
		});
	}
	em_maps_loaded = true; //maps have been loaded
	jQuery(document).triggerHandler('em_maps_loaded');
}

function em_map_InfoWindow( title, content, marker, open = false ) {
	let title_content = document.createElement("div");
	let map_id = marker.map.mapId.replace(/em-location-maps?-/,'');
	title_content.className = "em-map-balloon-title";
	title_content.innerHTML = title;
	if ( typeof content === 'string' ) {
		let wrapper = document.createElement("div");
		wrapper.innerHTML = content;
		content = wrapper;
	}
	// wrap content in div with class if not already done
	content.classList.add('em-map-balloon-content');
	let infoWindow = new google.maps.InfoWindow( {
		content: content,
		headerContent: title_content,
	} );
	infoWindow.addListener('domready', function() {
		marker.map.panBy(40,-70);
	});
	if ( !( map_id in maps_infoWindows ) ) {
		maps_infoWindows[ map_id ] = [];
	}
	maps_infoWindows[ map_id ].push( infoWindow );
	let open_options = {
		shouldFocus: false,
		anchor: marker,
		map: marker.map,
	};
	marker.addListener("gmp-click", () => {
		maps_infoWindows[ map_id ]?.forEach( ( infoWindow ) => infoWindow.close() );
		infoWindow.open( open_options );
	});
	if ( open ) {
		maps_infoWindows[ map_id ]?.forEach( ( infoWindow ) => infoWindow.close() );
		infoWindow.open( open_options );
	}
	return infoWindow;
}

/**
 * @deprecated use em_map_infowindow instead
 * @param marker
 * @param message
 * @param map
 */
function em_map_infobox(marker, message, map) {
	let iw = new google.maps.InfoWindow({ content: message });
	google.maps.event.addListener(marker, 'click', function() {
		if( infoWindow ) infoWindow.close();
		infoWindow = iw;
		iw.open(map,marker);
	});
}

function em_esc_attr( str ){
	if( typeof str !== 'string' ) return '';
	return str.replace(/</gi,'&lt;').replace(/>/gi,'&gt;');
}

// Modal Open/Close
let openModal = function( modal, onOpen = null ){
	modal = jQuery(modal);
	modal.appendTo(document.body);
	setTimeout( function(){
		modal.addClass('active').find('.em-modal-popup').addClass('active');
		jQuery(document).triggerHandler('em_modal_open', [modal]);
		document.dispatchEvent( new CustomEvent('em_modal_open', { detail: { modal: modal } }) );
		if( typeof onOpen === 'function' ){
			setTimeout( onOpen, 200); // timeout allows css transition
		}
	}, 100); // timeout allows css transition
};
let closeModal = function( modal, onClose = null ){
	modal = jQuery(modal);
	modal.removeClass('active').find('.em-modal-popup').removeClass('active');
	setTimeout( function(){
		if( modal.attr('data-parent') ){
			let wrapper = jQuery('#' + modal.attr('data-parent') );
			if( wrapper.length ) {
				modal.appendTo(wrapper);
			}
		}
		modal[0].dispatchEvent( new CustomEvent('em_modal_close', { bubbles: true, detail: { modal: modal } } ) );
		if( typeof onClose === 'function' ){
			onClose();
		}
	}, 500); // timeout allows css transition
}
jQuery(document).on('click', '.em-modal .em-close-modal', function(e){
	let modal = jQuery(this).closest('.em-modal');
	if( !modal.attr('data-prevent-close') ) {
		closeModal(modal);
	}
});
jQuery(document).on('click', '.em-modal', function(e){
	var target = jQuery(e.target);
	if( target.hasClass('em-modal') ) {
		let modal = jQuery(this);
		if( !modal.attr('data-prevent-close') ){
			closeModal(modal);
		}
	}
});

function EM_Alert( content ){
	// find the alert modal, create if not
	let modal = document.getElementById('em-alert-modal');
	if( modal === null ){
		modal = document.createElement('div');
		modal.setAttribute('class', "em pixelbones em-modal");
		modal.id = 'em-alert-modal';
		modal.innerHTML = '<div class="em-modal-popup"><header><a class="em-close-modal"></a><div class="em-modal-title">&nbsp;</div></header><div class="em-modal-content" id="em-alert-modal-content"></div></div>';
		document.body.append(modal);
	}
	document.getElementById('em-alert-modal-content').innerHTML = content;
	openModal(modal);
};

//Events Search
jQuery(document).ready( function($){
	// handle the views tip/ddm
	let views_ddm_options = {
		theme : 'light-border',
		allowHTML : true,
		interactive : true,
		trigger : 'manual',
		placement : 'bottom',
		zIndex : 1000000,
		touch: true,
	};
	$(document).trigger('em-search-views-trigger-vars',[views_ddm_options]);
	let tooltip_vars = { theme : 'light-border', appendTo : 'parent', touch : false, };
	$(document).trigger('em-tippy-vars',[tooltip_vars]);

	// sync main search texts to advanced search
	let search_forms = $('.em-search:not(.em-search-advanced)');
	search_forms.each( function(){
		/*
		 * Important references we'll reuse in scope
		 */
		let search = $(this);
		let search_id = search.attr('id').replace('em-search-', '');
		let search_form = search.find('.em-search-form').first();
		let search_advanced = search.find('.em-search-advanced'); // there should only be one anyway

		/*
		 * Counter functions
		 */
		const update_input_count = function( input, qty = 1 ){
			let el = jQuery(input);
			let total = qty > 0 ? qty : null;
			el.attr('data-advanced-total-input', total);
			update_search_totals();
		};

		const update_search_totals = function( applied = false ){
			// set everything to 0, recount
			search.find('span.total-count').remove();
			// find all fields with total attributes and sum them up
			let total = 0;
			search_advanced.find('[data-advanced-total-input]').each( function(){
				let total_input = this.getAttribute('data-advanced-total-input');
				total += Math.abs( total_input );
			});
			search.attr('data-advanced-total', total);
			update_trigger_count( applied );
			// find all sections with totals and display them (added above)
			search_advanced.find('.em-search-advanced-section').each( function(){
				let section = $(this);
				let section_total = 0;
				section.attr('data-advanced-total', 0);
				// go through all set qtys and calculate
				section.find('[data-advanced-total-input]').each( function(){
					let total_input = this.getAttribute('data-advanced-total-input');
					section_total += Math.abs( total_input );
				});
				section.attr('data-advanced-total', section_total);
				update_section_count(section);
			});
			// update triggers, search, clear button etc.
			if( total > 0 || !search.attr('data-advanced-previous-total') || total != search.attr('data-advanced-previous-total') ){
				update_submit_buttons( true );
			}
			update_clear_button_count();
		}

		const update_trigger_count = function( applied = false ){
			let triggers = jQuery('.em-search-advanced-trigger[data-search-advanced-id="em-search-advanced-'+ search_id +'"]'); // search like this ato apply to external triggers
			triggers.find('span.total-count').remove();
			let total = search.attr('data-advanced-total');
			if( total > 0 ){
				let trigger_count = jQuery('<span class="total-count">'+ total + '</span>').appendTo(triggers);
				if( !applied ){
					trigger_count.addClass('tentative');
				}
			}
		};

		const update_submit_buttons = function( enabled = false ){
			// update the clear link
			let submit_button = search_advanced.find('button[type="submit"]');
			let main_submit_button = search.find('.em-search-main-bar button[type="submit"]');
			let submit_buttons = submit_button.add( main_submit_button ); // merge together to apply chanegs
			if( enabled ){
				submit_buttons.removeClass('disabled').attr('aria-disabled', 'false');
			}else{
				submit_buttons.addClass('disabled').attr('aria-disabled', 'true');
			}
		};

		const update_section_count = function( section ){
			let section_total = section.attr('data-advanced-total');
			section.find('header span.total-count').remove();
			if( section_total > 0 ){
				$('<span class="total-count">'+ section_total +'</span>').appendTo( section.find('header') );
			}
		};

		const update_clear_button_count = function(){
			// update the clear link
			let clear_link = search_advanced.find('button[type="reset"]');
			if( !clear_link.attr('data-placeholder') ){
				clear_link.attr('data-placeholder', clear_link.text());
			}
			let total = search.attr('data-advanced-total');
			if( total > 0 ){
				clear_link.text( clear_link.attr('data-placeholder') + ' (' + total + ')' ).prop('disabled', false);
				clear_link.removeClass('disabled').attr('aria-disabled', 'false');
			}else{
				clear_link.text( clear_link.attr('data-placeholder') );
				clear_link.addClass('disabled').attr('aria-disabled', 'true');
			}
		};

		/*
		 * Triggers
		 */
		search.find('.em-search-views-trigger').each( function(){
			tooltip_vars.content = this.parentElement.getAttribute('aria-label');
			let views_tooltip = tippy(this.parentElement, tooltip_vars);
			let views_content = this.parentElement.querySelector('.em-search-views-options');
			let views_content_parent = views_content.parentElement;
			let tippy_content = document.createElement('div');
			views_ddm_options.content = tippy_content;
			let views_ddm = tippy(this, views_ddm_options);
			views_ddm.setProps({
				onShow(instance){
					views_tooltip.disable();
					tippy_content.append(views_content);
				},
				onShown(instance){ // keyboard support
					views_content.querySelector('input:checked').focus();
				},
				onHidden(instance){
					views_tooltip.enable();
					if( views_content.parentElement !== views_content_parent ) {
						views_content_parent.append(views_content);
					}
				}
			});
			let tippy_listener = function(e){
				if( e.type === 'keydown' && !(e.which === 13 || e.which === 40) ) return false;
				e.preventDefault();
				e.stopPropagation();
				this._tippy.show();
				views_tooltip.hide();
			}
			this.addEventListener('click', tippy_listener);
			this.addEventListener('keydown', tippy_listener);
			this.firstElementChild.addEventListener('focus', function(e){
				views_ddm.hide();
				views_tooltip.enable();
				views_tooltip.show();
			});
			this.firstElementChild.addEventListener('blur', function(){
				views_tooltip.hide();
			});

			search.on('focus blur', '.em-search-views-options input', function(){
				if( document.activeElement === this ){
					this.parentElement.classList.add('focused');
				}else{
					this.parentElement.classList.remove('focused');
				}
			});

			search[0].addEventListener('change', function(){
				update_submit_buttons(true);
			});

			search.on('keydown click', '.em-search-views-options input', function( e ){
				// get relevant vars
				if( e.type === 'keydown' && e.which !== 13 ){
					if ( [37, 38, 39, 40].indexOf(e.which) !== -1 ) {
						if (e.which === 38) {
							if (this.parentElement.previousElementSibling) {
								this.parentElement.previousElementSibling.focus();
							}
						} else if (e.which === 40) {
							if (this.parentElement.nextElementSibling) {
								this.parentElement.nextElementSibling.focus();
							}
						}
						return false;
					} else if ( e.which === 9 ) {
						// focus out
						views_ddm.hide();
					}
					return true;
				}
				this.checked = true;
				let input = $(this);
				// mark label selected
				input.closest('fieldset').find('label').removeClass('checked');
				input.parent().addClass('checked');
				// get other reference elements we need
				let views_wrapper = $(this).closest('.em-search-views');
				let view_type = this.value;
				let trigger = views_wrapper.children('.em-search-views-trigger');
				let trigger_option = trigger.children('.em-search-view-option');
				// change view, if different
				if( view_type !== trigger_option.attr('data-view') ){
					trigger_option.attr('data-view', this.value).text(this.parentElement.innerText);
					// remove custom search vals from current view so it's not used into another view
					$('#em-view-'+search_id).find('#em-view-custom-data-search-'+search_id).remove();
					// trigger custom event in case form disabled due to no search vals
					search_form.find('button[type="submit"]').focus();
					search_form.trigger('forcesubmit');
				}
				views_ddm.hide();
			});
		});

		search.find('.em-search-sort-trigger').each( function(){
			tooltip_vars.content = this.parentElement.getAttribute('aria-label');
			let views_tooltip = tippy(this.parentElement, tooltip_vars);
			search.on('keydown click', '.em-search-sort-option', function( e ){
				// get other reference elements we need
				let order = this.dataset.sort === 'ASC' ? 'DESC' : 'ASC';
				this.setAttribute('data-sort', order);
				this.parentElement.querySelector('input[name="order"]').value = order;
				// trigger custom event in case form disabled due to no search vals
				search_form.find('button[type="submit"]').focus();
				search_form.trigger('forcesubmit');
			});
		});

		// add trigger logic for advanced popup modal
		let search_advanced_trigger_click = function( e ){
			if( search.hasClass('advanced-mode-inline') ){
				// inline
				if( !search_advanced.hasClass('visible') ){
					search_advanced.slideDown().addClass('visible');
					if( '_tippy' in this ){
						this._tippy.setContent(this.getAttribute('data-label-hide'));
					}
				}else{
					search_advanced.slideUp().removeClass('visible');
					if( '_tippy' in this ){
						this._tippy.setContent(this.getAttribute('data-label-show'));
					}
				}
			}else{
				// wrap modal popup element in a form, so taht it's 'accessible' with keyboard
				if( !search_advanced.hasClass('active') ) {
					let form_wrapper = $('<form action="" method="post" class="em-search-advanced-form" id="em-search-form-advanced-' + search_id + '"></form>');
					form_wrapper.appendTo(search_advanced);
					search_advanced.find('.em-modal-popup').appendTo(form_wrapper);
					// open modal
					let button = this;
					openModal(search_advanced, function () {
						// Do this instead
						button.blur();
						search_advanced.find('input.em-search-text').focus();
					});
				}
			}
		};
		search.on('click', 'button.em-search-advanced-trigger:not([data-search-advanced-id],[data-parent-trigger])', search_advanced_trigger_click);
		search_form.on('search_advanced_trigger', search_advanced_trigger_click);

		search_advanced.on('em_modal_close', function(){
			search_advanced.find('.em-modal-popup').appendTo(search_advanced);
			search_advanced.children('form').remove();
			let trigger = search.find('button.em-search-advanced-trigger').focus();
			if( trigger.length > 0 && '_tippy' in trigger[0] ){
				trigger[0]._tippy.hide();
			}
		});

		// add header toggle logic to expand/collapse sections - add directly to elements since they move around the DOM due to modal
		search_advanced.find('.em-search-advanced-section > header').on('click', function(){
			let header = $(this);
			let section = header.closest('section');
			let content = header.siblings('.em-search-section-content');
			if( section.hasClass('active') ){
				content.slideUp();
				section.removeClass('active');
			}else{
				content.slideDown();
				section.addClass('active');
			}
		});

		/*
		 *  Advanced Search Field Listeners - Main Search Form
		 */

		let search_form_advanced_calculate_totals_inputs = function( input ){
			// for textboxes we only need to add or remove 1 advanced
			let el = $(input);
			let qty = el.val() !== '' ? 1:0;
			update_input_count( el, qty );
		};

		// These are for the main search bar, syncing information back into the advanced form
		search.on('change input', '.em-search-main-bar input.em-search-text', function( e ){
			// sync advanced input field with same text
			let advanced_search_input = search_advanced.find('input.em-search-text');
			if ( advanced_search_input.length === 0 ) {
				search_form_advanced_calculate_totals_inputs(this);
			} else {
				advanced_search_input.val( this.value );
				// recalculate totals from here
				search_form_advanced_calculate_totals_inputs(advanced_search_input[0]);
			}
			// any change without advanced form should show the search form still
			update_submit_buttons( true);
		});
		search.on('change', '.em-search-main-bar input.em-search-geo-coords', function(){
			let el = $(this);
			let advanced_geo = search_advanced.find('div.em-search-geo');
			// copy over value and class names
			let advanced_geo_coords = advanced_geo.find('input.em-search-geo-coords');
			if( advanced_geo_coords.length > 0 ) {
				advanced_geo_coords.val(el.val()).attr('class', el.attr('class'));
				let geo_text = el.siblings('input.em-search-geo').first();
				advanced_geo.find('input.em-search-geo').val(geo_text.val()).attr('class', geo_text.attr('class'));
				// calculate totals from here
				search_form_advanced_calculate_totals_inputs(advanced_geo_coords);
			} else {
				// calculate totals from here
				search_form_advanced_calculate_totals_inputs(this);
			}
		});
		search.find('.em-search-main-bar .em-datepicker input.em-search-scope.flatpickr-input').each( function(){
			if( !('_flatpickr' in this) ) return;
			this._flatpickr.config.onClose.push( function( selectedDates, dateStr, instance ) {
				// any change without advanced form should show the search form
				let advanced_datepicker = search_advanced.find('.em-datepicker input.em-search-scope.flatpickr-input');
				if( advanced_datepicker.length === 0 ) {
					// update counter
					let qty = dateStr ? 1:0;
					update_input_count(instance.input, qty);
				} else {
					// update advanced search form datepicker values, trigger a close for it to handle the rest
					advanced_datepicker[0]._flatpickr.setDate( selectedDates, true );
					advanced_datepicker[0]._flatpickr.close();
				}
			});
		});

		search.find('select.em-selectize').each(function () {
			if( 'selectize' in this ) {
				this.selectize.on('change', function () {
					search_advanced_selectize_change(this);
				});
			}
		});

		/*
		 *  Advanced Search Field Listeners - Advanced Search Form
		 */

		// regular text advanced or hidden inputs that represent another ui
		search_advanced.on('change input', 'input.em-search-text', function( e ){
			if( e.type === 'change' ){
				// copy over place info on change only, not on each keystroke
				search.find('.em-search-main input.em-search-text').val( this.value );
			}
			search_form_advanced_calculate_totals_inputs(this);
		});
		search_advanced.on('change', 'input.em-search-geo-coords', function( e ){
			search_form_advanced_calculate_totals_inputs(this);
			//update values in main search
			let el = $(this);
			let main = search.find('.em-search-main div.em-search-geo');
			if( main.length > 0 ){
				// copy over value and class names
				main.find('input.em-search-geo-coords').val( el.val() ).attr('class', el.attr('class'));
				let geo_text = el.siblings('input.em-search-geo');
				main.find('input.em-search-geo').val(geo_text.val()).attr('class', geo_text.attr('class'));
			}
		});
		search_advanced.on('clear_search', function(){
			let text = $(this).find('input.em-search-text');
			if( text.length === 0 ) {
				// select geo from main if it exists, so we keep counts synced
				text = search.find('input.em-search-text');
			}
			text.val('').attr('value', null).trigger('change'); // value attr removed as well due to compat issues in Chrome (possibly more)
		});
		/* Not sure we should be calculating this... since it's always set to something.
		search_advanced.on('change', 'select.em-search-geo-unit, select.em-search-geo-distance', function( e ){
			// combine both values into parent, if value set then it's a toggle
			let el = jQuery(this);
			let qty = el.val() ? 1 : null;
			el.closest('.em-search-geo-units').attr('data-advanced-total-input', qty);
			update_search_totals();
		});
		 */
		search_advanced.on('change', 'input[type="checkbox"]', function( e ){
			let el = $(this);
			let qty = el.prop('checked') ? 1:0;
			update_input_count( el, qty );
		});
		search_advanced.on('calculate_totals', function(){
			search_advanced.find('input.em-search-text, input.em-search-geo-coords').each( function(){
				search_form_advanced_calculate_totals_inputs(this);
			});
			search_advanced.find('input[type="checkbox"]').trigger('change');
		});
		search_advanced.on('clear_search', function(){
			let geo = $(this).find('input.em-search-geo');
			if( geo.length === 0 ) {
				// select geo from main if it exists, so we keep counts synced
				geo = search.find('input.em-search-geo');
			}
			geo.removeClass('off').removeClass('on').val('');
			geo.siblings('input.em-search-geo-coords').val('').trigger('change');
			search_advanced.find('input[type="checkbox"]').prop("checked", false).trigger('change').prop("checked", false); // set checked after trigger because something seems to be checking during event
		});

		// datepicker advanced logic
		search_advanced.find('.em-datepicker input.em-search-scope.flatpickr-input').each( function(){
			if( !('_flatpickr' in this) ) return;
			this._flatpickr.config.onClose.push( function( selectedDates, dateStr, instance ) {
				// check previous value against current value, no change, no go
				let previous_value = instance.input.getAttribute('data-previous-value');
				if( previous_value !== dateStr ){
					// update counter
					let qty = dateStr ? 1:0;
					update_input_count(instance.input, qty);
					// update main search form datepicker values
					let main_datepicker = search.find('.em-search-main-bar .em-datepicker input.em-search-scope.flatpickr-input');
					if( main_datepicker.length > 0 ) {
						main_datepicker[0]._flatpickr.setDate(selectedDates, true);
					}
					// set for next time
					instance.input.setAttribute('data-previous-value', dateStr);
				}
			});
		});
		search_advanced.on('calculate_totals', function(){
			search_advanced.find('.em-datepicker input.em-search-scope.flatpickr-input').first().each( function(){
				let qty = this._flatpickr.selectedDates.length > 0 ? 1 : 0;
				update_input_count(this, qty);
			});
		});
		search_advanced.on('clear_search', function(){
			let datepickers = search_advanced.find('.em-datepicker input.em-search-scope.flatpickr-input');
			if( datepickers.length === 0 ) {
				// find datepickers on main form so syncing is sent up
				datepickers = search.find('.em-datepicker input.em-search-scope.flatpickr-input');
			}
			datepickers.each(function () {
				this._flatpickr.clear();
				update_input_count(this, 0);
			});
		});
		// clear the date total for calendars, before anything is done
		let scope_calendar_check = function(){
			search.find('.em-datepicker input.em-search-scope.flatpickr-input').each( function(){
				if( search.attr('data-view') == 'calendar' ){
					this.setAttribute('data-advanced-total-input', 0);
					this._flatpickr.input.disabled = true;
				}else{
					this._flatpickr.input.disabled = false;
					let qty = this._flatpickr.selectedDates.length > 0 ? 1 : 0;
					this.setAttribute('data-advanced-total-input', qty);
				}
			});
		};
		$(document).on('em_search_loaded', scope_calendar_check);
		scope_calendar_check();

		// selectize advanced
		let search_advanced_selectize_change = function( selectize ){
			let qty = selectize.items.length;
			// handle 'all' default values
			if( qty == 1 && !selectize.items[0] ){
				qty = 0;
			}
			if ( selectize.$input.closest('.em-search-advanced').length === 0 ) {
				// sync advanced input field with same text
				let classSearch = '.' + selectize.$input.attr('class').replaceAll(' ', '.').trim();
				let advanced_search_input = search_advanced.find( classSearch );
				if ( advanced_search_input.length > 0 ) {
					// copy over values
					advanced_search_input[0].selectize.setValue( selectize.items );
					// recalculate totals from here
					search_advanced_selectize_change(advanced_search_input[0].selectize);
				}
			}
			update_input_count( selectize.$input, qty );
		};

		search_advanced.find('select.em-selectize').each(function () {
			if( 'selectize' in this ) {
				this.selectize.on('change', function () {
					search_advanced_selectize_change(this);
				});
			}
		});
		search_advanced.on('calculate_totals', function(){
			$(this).find('select.em-selectize').each( function(){
				search_advanced_selectize_change(this.selectize);
			});
		});
		search_advanced.on('clear_search', function(){
			let clearSearch = function(){
				this.selectize.clear();
				this.selectize.refreshItems();
				this.selectize.refreshOptions(false);
				this.selectize.blur();
			};
			search_advanced.find('select.em-selectize').each( clearSearch );
			search.find('.em-search-main-bar select.em-selectize').each( clearSearch );
		});

		// location-specific stuff for dropdowns (powered by selectize)
		let locations_selectize_load_complete = function(){
			if( 'selectize' in this ) {
				this.selectize.settings.placeholder = this.selectize.settings.original_placeholder;
				this.selectize.updatePlaceholder();
				// get options from select again
				let options = [];
				this.selectize.$input.find('option').each( function(){
					let value = this.value !== null ? this.value : this.innerHTML;
					options.push({ value : value, text: this.innerHTML});
				});
				this.selectize.addOption(options);
				this.selectize.refreshOptions(false);
			}
		};
		let locations_selectize_load_start = function(){
			if( 'selectize' in this ){
				this.selectize.clearOptions();
				if( !('original_placeholder' in this.selectize.settings) ) this.selectize.settings.original_placeholder = this.selectize.settings.placeholder;
				this.selectize.settings.placeholder = EM.txt_loading;
				this.selectize.updatePlaceholder();
			}
		};
		$('.em-search-advanced select[name=country], .em-search select[name=country]').on('change', function(){
			var el = $(this);
			let wrapper = el.closest('.em-search-location');
			wrapper.find('select[name=state]').html('<option value="">'+EM.txt_loading+'</option>');
			wrapper.find('select[name=region]').html('<option value="">'+EM.txt_loading+'</option>');
			wrapper.find('select[name=town]').html('<option value="">'+EM.txt_loading+'</option>');
			wrapper.find('select[name=state], select[name=region], select[name=town]').each( locations_selectize_load_start );
			if( el.val() != '' ){
				wrapper.find('.em-search-location-meta').slideDown();
				var data = {
					action : 'search_states',
					country : el.val(),
					return_html : true,
				};
				wrapper.find('select[name=state]').load( EM.ajaxurl, data, locations_selectize_load_complete );
				data.action = 'search_regions';
				wrapper.find('select[name=region]').load( EM.ajaxurl, data, locations_selectize_load_complete );
				data.action = 'search_towns';
				wrapper.find('select[name=town]').load( EM.ajaxurl, data, locations_selectize_load_complete );
			}else{
				wrapper.find('.em-search-location-meta').slideUp();
			}
		});
		$('.em-search-advanced select[name=region], .em-search select[name=region]').on('change', function(){
			var el = $(this);
			let wrapper = el.closest('.em-search-location');
			wrapper.find('select[name=state]').html('<option value="">'+EM.txt_loading+'</option>');
			wrapper.find('select[name=town]').html('<option value="">'+EM.txt_loading+'</option>');
			wrapper.find('select[name=state], select[name=town]').each( locations_selectize_load_start );
			var data = {
				action : 'search_states',
				region : el.val(),
				country : wrapper.find('select[name=country]').val(),
				return_html : true
			};
			wrapper.find('select[name=state]').load( EM.ajaxurl, data, locations_selectize_load_complete );
			data.action = 'search_towns';
			wrapper.find('select[name=town]').load( EM.ajaxurl, data, locations_selectize_load_complete );
		});
		$('.em-search-advanced select[name=state], .em-search select[name=state]').on('change', function(){
			var el = $(this);
			let wrapper = el.closest('.em-search-location');
			wrapper.find('select[name=town]').html('<option value="">'+EM.txt_loading+'</option>').each( locations_selectize_load_start );
			var data = {
				action : 'search_towns',
				state : el.val(),
				region : wrapper.find('select[name=region]').val(),
				country : wrapper.find('select[name=country]').val(),
				return_html : true
			};
			wrapper.find('select[name=town]').load( EM.ajaxurl, data, locations_selectize_load_complete );
		});

		/*
		 *  Clear & Search Actions
		 */
		// handle clear link for advanced
		search_advanced.on( 'click', 'button[type="reset"]', function(){
			// clear text search advanced, run clear hook for other parts to hook into
			if( search.attr('data-advanced-total') == 0 ) return;
			// search text and geo search
			search_advanced.find('input.em-search-text, input.em-search-geo').val('').attr('data-advanced-total-input', null).trigger('change');
			// other implementations hook here and do what you need
			search.trigger('clear_search');
			search_advanced.trigger('clear_search');
			// remove counters, set data counters to 0, hide section and submit form without search settings
			update_search_totals(true); // in theory, this is 0 and removes everything
			if( search_advanced.hasClass('em-modal') ) {
				search_advanced_trigger_click();
			}
			search_advanced.append('<input name="clear_search" type="hidden" value="1">');
			search_advanced.find('button[type="submit"]').trigger('forceclick');
			update_clear_button_count();
		}).each( function(){
			search_advanced.trigger('calculate_totals');
			update_search_totals(true);
		});
		const on_update_trigger_count = function(e, applied = true){
			update_trigger_count( applied );
		};
		search.on('update_trigger_count', on_update_trigger_count);
		search_advanced.on('update_trigger_count', on_update_trigger_count);

		// handle submission for advanced
		search_advanced.on( 'click forceclick', 'button[type="submit"]', function(e){
			e.preventDefault();
			if( this.classList.contains('disabled') && e.type !== 'forceclick' ) return false;
			// close attach back to search form
			if( search_advanced.hasClass('em-modal') ) {
				closeModal(search_advanced, function () {
					// submit for search
					search_form.submit();
				});
			}else{
				search_form.submit();
			}
			return false; // we handled it
		});

		search.on('submit forcesubmit', '.em-search-form', function(e){
			if ( search.hasClass('no-ajax') ) {
				return true;
			}
			e.preventDefault();
			let form = $(this);
			let submit_buttons = form.find('button[type="submit"]');
			if( e.type !== 'forcesubmit' && submit_buttons.hasClass('disabled') ) return false;
			let wrapper = form.closest('.em-search');
			if( wrapper.hasClass('em-search-legacy') ){
				em_submit_legacy_search_form(form);
			}else{
				let view = $('#em-view-'+search_id);
				let view_type = form.find('[name="view"]:checked, [name="view"][type="hidden"], .em-search-view-option-hidden').val();
				if( Array.isArray(view_type) ) view_type = view_type.shift();
				// copy over custom view information, remove it further down
				let custom_view_data = view.find('#em-view-custom-data-search-'+search_id).clone();
				let custom_view_data_container = $('<div class="em-view-custom-data"></div>');
				custom_view_data.children().appendTo(custom_view_data_container);
				custom_view_data.remove();
				custom_view_data_container.appendTo(form);
				// add loading stuff
				view.append('<div class="em-loading"></div>');
				submit_buttons.each( function(){
					if( EM.txt_searching !== this.innerHTML ) {
						this.setAttribute('data-button-text', this.innerHTML);
						this.innerHTML = EM.txt_searching;
					}
				});
				var vars = form.serialize();
				$.ajax( EM.ajaxurl, {
					type : 'POST',
					dataType : 'html',
					data : vars,
					success : function(responseText){
						submit_buttons.each( function(){
							this.innerHTML = this.getAttribute('data-button-text');
						});
						view = EM_View_Updater( view, responseText );
						// update view definitions
						view.attr('data-view', view_type);
						search.attr('data-view', view_type);
						search_advanced.attr('data-view', view_type);
						jQuery(document).triggerHandler('em_view_loaded_'+view_type, [view, form, e]);
						jQuery(document).triggerHandler('em_search_loaded', [view, form, e]); // ajax has loaded new results
						jQuery(document).triggerHandler('em_search_result', [vars, view, e]); // legacy for backcompat, use the above
						wrapper.find('.count.tentative').removeClass('tentative');
						// deactivate submit button until changes are made again
						submit_buttons.addClass('disabled').attr('aria-disabled', 'true');
						// update search totals
						update_search_totals(true);
						search.attr('data-advanced-previous-total', search.attr('data-advanced-total')); // so we know if filters were used in previous search
						update_submit_buttons(false);
						custom_view_data_container.remove(); // remove data so it's reloaded again later
						search.find('input[name="clear_search"]').remove();
					}
				});
			}
			return false;
		});

		// observe resizing
		EM_ResizeObserver( EM.search.breakpoints, [search[0]]);
	});

	// handle external triggers, e.g. a calendar shortcut for a hidden search form
	$(document).on('click', '.em-search-advanced-trigger[data-search-advanced-id], .em-search-advanced-trigger[data-parent-trigger]', function(){
		if( this.getAttribute('data-search-advanced-id') ){
			// trigger the search form by parent
			let search_advanced_form = document.getElementById( this.getAttribute('data-search-advanced-id') );
			if( search_advanced_form ){
				let search_form = search_advanced_form.closest('form.em-search-form');
				if( search_form ){
					search_form.dispatchEvent( new CustomEvent('search_advanced_trigger') );
					return;
				}
			}
		} else if( this.getAttribute('data-parent-trigger') ) {
			let trigger = document.getElementById(this.getAttribute('data-parent-trigger'));
			if ( trigger ) {
				trigger.click();
				return;
			}
		}
		console.log('Cannot locate a valid advanced search form trigger for %o', this);
	});

	$(document).on('click', '.em-view-container .em-ajax.em-pagination a.page-numbers', function(e){
		let a = $(this);
		let view = a.closest('.em-view-container');
		let href = a.attr('href');
		//add data-em-ajax att if it exists
		let data = a.closest('.em-pagination').attr('data-em-ajax');
		if( data ){
			href += href.includes('?') ? '&' : '?';
			href += data;
		}
		// build querystring from url
		let url_params = new URL(href, window.location.origin).searchParams;
		if( view.attr('data-view') ) {
			url_params.set('view', view.attr('data-view'));
		}
		// start ajax
		view.append('<div class="loading" id="em-loading"></div>');
		$.ajax( EM.ajaxurl, {
			type : 'POST',
			dataType : 'html',
			data : url_params.toString(),
			success : function(responseText) {
				view = EM_View_Updater( view, responseText );
				view.find('.em-pagination').each( function(){
					paginationObserver.observe(this);
				});
				jQuery(document).triggerHandler('em_page_loaded', [view]);
				view[0].scrollIntoView({ behavior: "smooth" });
			}
		});
		e.preventDefault();
		return false;
	});

	const paginationObserver = new ResizeObserver( function( entries ){
		for (let entry of entries) {
			let el = entry.target;
			if( !el.classList.contains('observing') ) {
				el.classList.add('observing'); // prevent endless loop on resizing within this check
				// check if any pagination parts are overflowing
				let overflowing = false;
				el.classList.remove('overflowing');
				for ( const item of el.querySelectorAll('.not-current')) {
					if( item.scrollHeight > item.clientHeight || item.scrollWidth > item.clientWidth ){
						overflowing = true;
						break; // break if one has overflown
					}
				};
				// add or remove overflow classes
				if( overflowing ){
					el.classList.add('overflowing')
				}
				el.classList.remove('observing');
			}
		}
	});
	$('.em-pagination').each( function(){
		paginationObserver.observe(this);
	});

	/* START Legacy */
	// deprecated - hide/show the advanced search advanced link - relevant for old template overrides
	$(document).on('click change', '.em-search-legacy .em-toggle', function(e){
		e.preventDefault();
		//show or hide advanced search, hidden by default
		var el = $(this);
		var rel = el.attr('rel').split(':');
		if( el.hasClass('show-search') ){
			if( rel.length > 1 ){ el.closest(rel[1]).find(rel[0]).slideUp(); }
			else{ $(rel[0]).slideUp(); }
			el.find('.show, .show-advanced').show();
			el.find('.hide, .hide-advanced').hide();
			el.removeClass('show-search');
		}else{
			if( rel.length > 1 ){ el.closest(rel[1]).find(rel[0]).slideDown(); }
			else{ $(rel[0]).slideDown(); }
			el.find('.show, .show-advanced').hide();
			el.find('.hide, .hide-advanced').show();
			el.addClass('show-search');
		}
	});
	// handle search form submission
	let em_submit_legacy_search_form = function( form ){
		if( this.em_search && this.em_search.value == EM.txt_search){ this.em_search.value = ''; }
		var results_wrapper = form.closest('.em-search-wrapper').find('.em-search-ajax');
		if( results_wrapper.length == 0 ) results_wrapper = $('.em-search-ajax');
		if( results_wrapper.length > 0 ){
			results_wrapper.append('<div class="loading" id="em-loading"></div>');
			var submitButton = form.find('.em-search-submit button');
			submitButton.attr('data-button-text', submitButton.val()).val(EM.txt_searching);
			var img = submitButton.children('img');
			if( img.length > 0 ) img.attr('src', img.attr('src').replace('search-mag.png', 'search-loading.gif'));
			var vars = form.serialize();
			$.ajax( EM.ajaxurl, {
				type : 'POST',
				dataType : 'html',
				data : vars,
				success : function(responseText){
					submitButton.val(submitButton.attr('data-button-text'));
					if( img.length > 0 ) img.attr('src', img.attr('src').replace('search-loading.gif', 'search-mag.png'));
					results_wrapper.replaceWith(responseText);
					if( form.find('input[name=em_search]').val() == '' ){ form.find('input[name=em_search]').val(EM.txt_search); }
					//reload results_wrapper
					results_wrapper = form.closest('.em-search-wrapper').find('.em-search-ajax');
					if( results_wrapper.length == 0 ) results_wrapper = $('.em-search-ajax');
					jQuery(document).triggerHandler('em_search_ajax', [vars, results_wrapper, e]); //ajax has loaded new results
				}
			});
			e.preventDefault();
			return false;
		}
	};
	if( $('.em-search-ajax').length > 0 ){
		$(document).on('click', '.em-search-ajax a.page-numbers', function(e){
			var a = $(this);
			var data = a.closest('.em-pagination').attr('data-em-ajax');
			var wrapper = a.closest('.em-search-ajax');
			var wrapper_parent = wrapper.parent();
			var qvars = a.attr('href').split('?');
			var vars = qvars[1];
			//add data-em-ajax att if it exists
			if( data != '' ){
				vars = vars != '' ? vars+'&'+data : data;
			}
			vars += '&legacy=1';
			wrapper.append('<div class="loading" id="em-loading"></div>');
			$.ajax( EM.ajaxurl, {
				type : 'POST',
				dataType : 'html',
				data : vars,
				success : function(responseText) {
					wrapper.replaceWith(responseText);
					wrapper = wrapper_parent.find('.em-search-ajax');
					jQuery(document).triggerHandler('em_search_ajax', [vars, wrapper, e]); //ajax has loaded new results
				}
			});
			e.preventDefault();
			return false;
		});
	}
	/* END Legacy */
});

/*
* CALENDAR
*/
jQuery(document).ready( function($){

	const em_calendar_init = function( calendar ){
		calendar = $(calendar);
		if( !calendar.attr('id') || !calendar.attr('id').match(/^em-calendar-[0-9]+$/) ){
			calendar.attr('id', 'em-calendar-' + Math.floor(Math.random() * 10000)); // retroactively add id to old templates
		}
		calendar.find('a').off("click");
		calendar.on('click', 'a.em-calnav, a.em-calnav-today', function(e){
			e.preventDefault();
			const el = $(this);
			if( el.attr('href') === '') return; // do nothing if disabled or no link provided
			el.closest('.em-calendar').prepend('<div class="loading" id="em-loading"></div>');
			let url = el.attr('href');
			const view_id = el.closest('[data-view-id]').data('view-id');
			const custom_data = $('form#em-view-custom-data-calendar-'+ view_id);
			let form_data = new FormData();
			if( custom_data.length > 0 ){
				form_data = new FormData(custom_data[0]);
				let $URL = new URL(url, window.location.origin);
				let url_params = $URL.searchParams;
				for (const [key, value] of url_params.entries()) {
					if( key === 'mo' ) {
						form_data.set('month', value);
					} else if ( key === 'yr' ) {
						form_data.set('year', value);
					} else {
						form_data.set(key, value);
					}
				}
				// remove mo and yr from URL
				$URL.searchParams.delete('mo');
				$URL.searchParams.delete('yr');
				url = $URL.toString();
			}
			if ( calendar.attr('data-timezone') ) {
				form_data.set('calendar_timezone', calendar.attr('data-timezone') );
			}
			form_data.set('id', view_id);
			form_data.set('ajaxCalendar', 1); // AJAX trigger
			form_data.set('em_ajax', 1); // AJAX trigger
			// check advanced trigger
			if( calendar.hasClass('with-advanced') ){
				form_data.set('has_advanced_trigger', 1);
			}
			$.ajax({
				url: url,
				data: form_data,
				processData: false,
				contentType: false,
				method: 'POST',
				success: function( data ){
					let view = EM_View_Updater( calendar, data );
					if( view.hasClass('em-view-container') ){
						calendar = view.find('.em-calendar');
					}else{
						calendar = view;
					}
					calendar[0].dispatchEvent( new CustomEvent( 'em_calendar_load', { bubbles: true } ) );
				},
				dataType: 'html'
			});
		} );
		calendar[0].addEventListener('reload', () => {
			calendar_trigger_ajax( calendar, calendar.attr('data-year'), calendar.attr('data-month') );
		});
		let calendar_trigger_ajax = function( calendar, year, month ){
			let link = calendar.find('.em-calnav-next');
			let url = new URL(link.attr('href'), window.location.origin);
			url.searchParams.set('mo', month);
			url.searchParams.set('yr', year);
			link.attr('href', url.toString()).trigger('click');
		};
		let calendar_resize_monthpicker = function( instance, text ){
			let span = $('<span class="marker">'+ text +'</span>');
			span.insertAfter(instance);
			let width = span.width() + 40;
			span.remove();
			instance.style.setProperty('width', width+'px', 'important');
		}
		let calendar_month_init = function(){
			let month_form = calendar.find('.month form');
			calendar.find('.event-style-pill .em-cal-event').on('click', function( e ){
				e.preventDefault();
				if( !(calendar.hasClass('preview-tooltips') && calendar.data('preview-tooltips-trigger')) && !(calendar.hasClass('preview-modal')) ) {
					let link = this.getAttribute('data-event-url');
					if (link !== null) {
						window.location.href = link;
					}
				}
				// select this date, all others no
				e.target.closest('.em-cal-body').querySelectorAll('.em-cal-day-date').forEach( calDate => calDate.classList.remove('selected') );
				e.target.closest('.em-cal-day').querySelector('.em-cal-day-date')?.classList.add('selected');
			});
			if( month_form.length > 0 ){
				month_form.find('input[type="submit"]').hide();
				let select = $('<select style="display:none;visibility:hidden;"></select>').appendTo(month_form);
				let option = $('<option></option>').appendTo(select);
				let current_datetime = calendar.find('select[name="month"]').val() + calendar.find('select[name="year"]').val();
				let month = calendar.find('select[name="month"]');
				let year = calendar.find('select[name="year"]');
				let monthpicker = calendar.find('.em-month-picker');
				let month_value = monthpicker.data('month-value');
				monthpicker.prop('type', 'text').prop('value', month_value);
				calendar_resize_monthpicker( monthpicker[0], month_value );
				let monthpicker_wrapper = $('#em-flatpickr');
				if( monthpicker_wrapper.length === 0 ) {
					monthpicker_wrapper = $('<div class="em pixelbones" id="em-flatpickr"></div>').appendTo('body');
				}
				let minDate = null;
				if( calendar.data('scope') === 'future' ){
					minDate = new Date();
					minDate.setMonth(minDate.getMonth()-1);
				}
				// locale
				if( 'locale' in EM.datepicker ){
					flatpickr.localize(flatpickr.l10ns[EM.datepicker.locale]);
					flatpickr.l10ns.default.firstDayOfWeek = EM.firstDay;
				}
				let fp = monthpicker.flatpickr({
					appendTo : monthpicker_wrapper[0],
					dateFormat : EM?.calendar?.month_format,
					minDate : minDate,
					disableMobile: "true",
					plugins: [
						new monthSelectPlugin({
							shorthand: true,
							dateFormat: EM?.calendar?.month_format || 'F Y',
							altFormat: EM?.calendar?.month_format || 'F Y',
						})
					],
					onChange: function(selectedDates, dateStr, instance) {
						calendar_resize_monthpicker( instance.input, dateStr );
						calendar_trigger_ajax( calendar, selectedDates[0].getFullYear(), selectedDates[0].getMonth()+1);
					},
				});
				// this bit fixes issues if the supplied text value has a mismatch with the real text value due to localization differences between WP and flatpickr
				let month_real_value = monthpicker.val() + '-01';
				fp.setDate( new Date( month_real_value ) );
				// add classes to month picker
				monthpicker.addClass('select-toggle');
			}
			if( calendar.hasClass('preview-tooltips') ){
				let tooltip_vars = {
					theme : 'light-border',
					allowHTML : true,
					interactive : true,
					trigger : 'mouseenter focus click',
					content(reference) {
						return document.createElement('div');
					},
					onShow( instance ){
						const id = instance.reference.getAttribute('data-event-id');
						const template = calendar.find('section.em-cal-events-content .em-cal-event-content[data-event-id="'+id+'"]');
						instance.props.content.append(template.first().clone()[0]);
					},
					onHide( instance ){
						instance.props.content.innerHTML = '';
					}
				};
				if( calendar.data('preview-tooltips-trigger') ) {
					tooltip_vars.trigger = calendar.data('preview-tooltips-trigger');
				}
				$(document).trigger('em-tippy-cal-event-vars',[tooltip_vars]);
				tippy(calendar.find('.em-cal-event').toArray(), tooltip_vars);
			}else if( calendar.hasClass('preview-modal') ){
				// Modal
				calendar.find('.em-cal-event').on('click', function( e ){
					const id = this.getAttribute('data-event-id');
					const modal = calendar.find('section.em-cal-events-content .em-cal-event-content[data-event-id="'+id+'"]');
					modal.attr('data-calendar-id', calendar.attr('id'));
					openModal(modal);
					// select this date, all others no
					e.target.closest('.em-cal-body').querySelectorAll('.em-cal-day-date').forEach( calDate => calDate.classList.remove('selected') );
					e.target.closest('.em-cal-day').querySelector('.em-cal-day-date')?.classList.add('selected');
				});
			}
			// responsive mobile view for date clicks
			if( calendar.hasClass('responsive-dateclick-modal') ){
				calendar.find('.eventful .em-cal-day-date, .eventful-post .em-cal-day-date, .eventful-pre .em-cal-day-date').on('click', function( e ){
					//if( calendar.hasClass('size-small') || calendar.hasClass('size-medium') ){
					e.preventDefault();
					const id = this.getAttribute('data-timestamp');
					const modal = calendar.find('.em-cal-date-content[data-calendar-date="'+id+'"], .em-cal-date-content[data-timestamp="'+id+'"]');
					modal.attr('data-calendar-id', calendar.attr('id'));
					openModal(modal);
					// select this date, all others no
					e.target.closest('.em-cal-body').querySelectorAll('.em-cal-day-date').forEach( calDate => calDate.classList.remove('selected') );
					e.target.closest('.em-cal-day').querySelector('.em-cal-day-date')?.classList.add('selected');
				});
			}
			// observe resizing if not fixed
			if( !calendar.hasClass('size-fixed') ){
				EM_ResizeObserver( EM.calendar.breakpoints, [calendar[0], calendar[0]]);
			}
			// even aspect, because aspect ratio can screw up widths vs row template heights
			let calendar_body = calendar.find('.em-cal-body');
			if( calendar_body.hasClass('even-aspect') ) {
				let ro_function = function (el) {
					let width = el.firstElementChild.getBoundingClientRect().width;
					if (width > 0) {
						el.style.setProperty('--grid-auto-rows', 'minmax(' + width + 'px, auto)');
					}
				}
				let ro = new ResizeObserver(function (entries) {
					for (let entry of entries) {
						ro_function(entry.target);
					}
				});
				ro.observe(calendar_body[0]);
				ro_function(calendar_body[0]);
			}

			// figure out colors
			calendar.find('.date-day-colors').each( function(){
				let colors = JSON.parse(this.getAttribute('data-colors'));
				let day = $(this).siblings('.em-cal-day-date.colored');
				let sides = {
					1 : { 1 : '--date-border-color', 'class' : 'one' },
					2 : { 1 : '--date-border-color-top', 2 : '--date-border-color-bottom', 'class' : 'two' },
					3 : { 1 : '--date-border-color-top', 2 : '--date-border-color-right', 3 : '--date-border-color-bottom', 'class' : 'three' },
					4 : { 1 : '--date-border-color-top', 2 : '--date-border-color-right', 3 : '--date-border-color-bottom', 4 : '--date-border-color-left', 'class' : 'four' },
				};
				for (let i = 0; i < colors.length; i += 4) {
					const ring_colors = colors.slice(i, i + 4);
					// add a ring
					let outer_ring = day.children().first();
					let new_ring = $('<div class="ring"></div>').prependTo(day);
					outer_ring.appendTo(new_ring);
					new_ring.addClass( sides[ring_colors.length].class );
					for ( let it = 0; it < ring_colors.length; it++ ){
						new_ring.css(sides[ring_colors.length][it+1], ring_colors[it]);
					}
				}
			});

			if( calendar.hasClass('with-advanced') ){
				const trigger = calendar.find('.em-search-advanced-trigger');
				const search_advanced = $('#'+trigger.attr('data-search-advanced-id'));
				search_advanced.triggerHandler('update_trigger_count');
			}
		}
		calendar_month_init();
		$(document).triggerHandler('em_calendar_loaded', [calendar]);
	};
	$('.em-calendar').each( function(){
		let calendar = $(this);
		em_calendar_init( calendar );
	});
	$(document).on('em_calendar_load', '.em-calendar', function(){
		em_calendar_init( this );
	});
	$(document).on('em_view_loaded_calendar', function( e, view, form ){
		let calendar;
		if( view.hasClass('em-calendar') ){
			calendar = view;
		}else {
			calendar = view.find('.em-calendar').first();
		}
		em_calendar_init( calendar );
	});
});

let EM_View_Updater = function( element, html ){
	let content = jQuery(html);
	let view = element.hasClass('em-view-container') ? element : element.parent('.em-view-container');
	if( view.length > 0 ){
		if( content.hasClass('em-view-container') ){
			view.replaceWith(content);
			view = content;
		}else{
			view.empty().append(content);
		}
	}else{
		// create a view if possible
		if( content.hasClass('em-view-container') ){
			element.replaceWith(content);
			view = content;
		}else if( content.attr('data-view-id') ){
			let view = jQuery('<div class="em em-view-container"></div>');
			let view_id = content.attr('data-view-id');
			view.attr('data-view-id', view_id);
			view.attr('id', 'em-view-'+ view_id);
			view.attr('data-view-type', content.attr('data-view-type'));
			view.append(content);
			element.replaceWith(view);
		}
	}
	em_setup_ui_elements( view[0] );
	return view;
}

/**
 * Resize watcher for EM elements. Supply an object (localized array) of name > breakpoint, in order of least to largest and it'll add size-{name} class name according to the breakpoint.
 * An object item with value false will represent any screensize, i.e. it should be the last value when all breakpoints aren't met.
 * @param breakpoints
 * @param elements
 * @constructor
 */
let EM_ResizeObserver = function( breakpoints, elements ){
	const ro = new ResizeObserver( function( entries ){
		for (let entry of entries) {
			let el = entry.target;
			if( !el.classList.contains('size-fixed') ) {
				for (const [name, breakpoint] of Object.entries(breakpoints)) {
					if (el.offsetWidth <= breakpoint || breakpoint === false) {
						for (let breakpoint_name of Object.keys(breakpoints)) {
							if (breakpoint_name !== name) el.classList.remove('size-' + breakpoint_name);
						}
						// add class and trigger event only once
						if(	!el.classList.contains('size-' + name) ) {
							el.classList.add('size-' + name);
							el.dispatchEvent( new CustomEvent('em_resize') );
						}
						break;
					}
				}
			}
		}
	});
	elements.forEach( function( el ){
		if( typeof el !== 'undefined' ){
			ro.observe(el);
		}
	});
	return ro;
};

// event list and event page (inc. some extra booking form logic) - todo/cleanup
jQuery(document).ready( function($){
	// Events List
	let breakpoints = {
		'small' : 600,
		'large' : false,
	}
	const events_ro = EM_ResizeObserver( breakpoints, $('.em-list').toArray() );
	$(document).on('em_page_loaded em_view_loaded_list em_view_loaded_list-grouped em_view_loaded_grid', function( e, view ){
		let new_elements = view.find('.em-list').each( function(){
			if( !this.classList.contains('size-fixed') ){
				events_ro.observe( this );
			}
		});
	});

	$(document).on('click', '.em-grid .em-item[data-href]', function(e){
		if( e.target.type !== 'a' ){
			window.location.href = this.getAttribute('data-href');
		}
	});

	// Single event area
	breakpoints = {
		'small' : 600,
		'medium' : 900,
		'large' : false,
	}
	const event_ro = EM_ResizeObserver( breakpoints, $('.em-item-single').toArray() );
	$(document).on('em_view_loaded', function( e, view ){
		let new_elements = view.find('.em-event-single').each( function(){
			if( !this.classList.contains('size-fixed') ){
				event_ro.observe( this );
			}
		});
	});
	// booking form area (WIP)
	$(document).on("click", ".em-event-booking-form .em-login-trigger a", function( e ){
		e.preventDefault();
		var parent = $(this).closest('.em-event-booking-form');
		parent.find('.em-login-trigger').hide();
		parent.find('.em-login-content').fadeIn();
		let login_form = parent.find('.em-login');
		login_form[0].scrollIntoView({
			behavior: 'smooth'
		});
		login_form.first().find('input[name="log"]').focus();

	});
	$(document).on("click", ".em-event-booking-form .em-login-cancel", function( e ){
		e.preventDefault();
		let parent = $(this).closest('.em-event-booking-form');
		parent.find('.em-login-content').hide();
		parent.find('.em-login-trigger').show();
	});
	EM_ResizeObserver( {'small': 500, 'large' : false}, $('.em-login').toArray());

});

// handle generic ajax submission forms vanilla style
document.addEventListener('DOMContentLoaded', function () {
	document.querySelectorAll('form.em-ajax-form').forEach( function(el){
		el.addEventListener('submit', function(e){
			e.preventDefault();
			let form = e.currentTarget;
			let formData =  new FormData(form);
			let button = form.querySelector('button[type="submit"]');
			let loader;

			if( form.classList.contains('no-overlay-spinner') ){
				form.classList.add('loading');
			}else{
				let loader = document.createElement('div');
				loader.id = 'em-loading';
				form.append(loader);
			}

			var request = new XMLHttpRequest();
			if( form.getAttribute('data-api-url') ){
				request.open('POST', form.getAttribute('data-api-url'), true);
				request.setRequestHeader('X-WP-Nonce', EM.api_nonce);
			}else{
				request.open('POST', EM.ajaxurl, true);
			}

			request.onload = function() {
				if( loader ) loader.remove();
				if (this.status >= 200 && this.status < 400) {
					// Success!
					try {
						let data = JSON.parse(this.response);
						let notice;
						if( !form.classList.contains('no-inline-notice') ){
							notice = form.querySelector('.em-notice');
							if( !notice ){
								notice = document.createElement('div');
								form.prepend(notice);
								if( formData.get('action') ){
									form.dispatchEvent( new CustomEvent( 'em_ajax_form_success_' + formData.get('action'), {
										detail : {
											form : form,
											notice : notice,
											response : data,
										}
									}) );
								}
							}
							notice.innerHTML = '';
							notice.setAttribute('class', 'em-notice');
						}
						if( data.result ){
							if( !form.classList.contains('no-inline-notice') ){
								notice.classList.add('em-notice-success');
								notice.innerHTML = data.message;
								form.replaceWith(notice);
							}else{
								form.classList.add('load-successful');
								form.classList.remove('loading');
								if( data.message ){
									EM_Alert(data.message);
								}
							}
						}else{
							if( !form.classList.contains('no-inline-notice') ){
								notice.classList.add('em-notice-error');
								notice.innerHTML = data.errors;
							}else{
								EM_Alert(data.errors);
							}
						}
					} catch(e) {
						alert( 'Error Encountered : ' + e);
					}
				} else {
					alert('Error encountered... please see debug logs or contact support.');
				}
				form.classList.remove('loading');
			};

			request.onerror = function() {
				alert('Connection error encountered... please see debug logs or contact support.');
			};

			request.send( formData );
			return false;
		});
	});
});

// phone numbers
let em_setup_phone_inputs = function( container ){};
let em_unsetup_phone_inputs = function( container ){};
if ( EM.phone ) {

	let getCountry = function() {
		var timezones = {
			"Africa/Abidjan": { c : ["CI", "BF", "GH", "GM", "GN", "ML", "MR", "SH", "SL", "SN", "TG"] },
			"Africa/Accra": { c : ["GH"] },
			"Africa/Addis_Ababa": { c : ["ET"] },
			"Africa/Algiers": { c : ["DZ"] },
			"Africa/Asmara": { c : ["ER"] },
			"Africa/Asmera": { c : ["ER"] },
			"Africa/Bamako": { c : ["ML"] },
			"Africa/Bangui": { c : ["CF"] },
			"Africa/Banjul": { c : ["GM"] },
			"Africa/Bissau": { c : ["GW"] },
			"Africa/Blantyre": { c : ["MW"] },
			"Africa/Brazzaville": { c : ["CG"] },
			"Africa/Bujumbura": { c : ["BI"] },
			"Africa/Cairo": { c : ["EG"] },
			"Africa/Casablanca": { c : ["MA"] },
			"Africa/Ceuta": { c : ["ES"] },
			"Africa/Conakry": { c : ["GN"] },
			"Africa/Dakar": { c : ["SN"] },
			"Africa/Dar_es_Salaam": { c : ["TZ"] },
			"Africa/Djibouti": { c : ["DJ"] },
			"Africa/Douala": { c : ["CM"] },
			"Africa/El_Aaiun": { c : ["EH"] },
			"Africa/Freetown": { c : ["SL"] },
			"Africa/Gaborone": { c : ["BW"] },
			"Africa/Harare": { c : ["ZW"] },
			"Africa/Johannesburg": { c : ["ZA", "LS", "SZ"] },
			"Africa/Juba": { c : ["SS"] },
			"Africa/Kampala": { c : ["UG"] },
			"Africa/Khartoum": { c : ["SD"] },
			"Africa/Kigali": { c : ["RW"] },
			"Africa/Kinshasa": { c : ["CD"] },
			"Africa/Lagos": { c : ["NG", "AO", "BJ", "CD", "CF", "CG", "CM", "GA", "GQ", "NE"] },
			"Africa/Libreville": { c : ["GA"] },
			"Africa/Lome": { c : ["TG"] },
			"Africa/Luanda": { c : ["AO"] },
			"Africa/Lubumbashi": { c : ["CD"] },
			"Africa/Lusaka": { c : ["ZM"] },
			"Africa/Malabo": { c : ["GQ"] },
			"Africa/Maputo": { c : ["MZ", "BI", "BW", "CD", "MW", "RW", "ZM", "ZW"] },
			"Africa/Maseru": { c : ["LS"] },
			"Africa/Mbabane": { c : ["SZ"] },
			"Africa/Mogadishu": { c : ["SO"] },
			"Africa/Monrovia": { c : ["LR"] },
			"Africa/Nairobi": { c : ["KE", "DJ", "ER", "ET", "KM", "MG", "SO", "TZ", "UG", "YT"] },
			"Africa/Ndjamena": { c : ["TD"] },
			"Africa/Niamey": { c : ["NE"] },
			"Africa/Nouakchott": { c : ["MR"] },
			"Africa/Ouagadougou": { c : ["BF"] },
			"Africa/Porto-Novo": { c : ["BJ"] },
			"Africa/Sao_Tome": { c : ["ST"] },
			"Africa/Timbuktu": { c : ["ML"] },
			"Africa/Tripoli": { c : ["LY"] },
			"Africa/Tunis": { c : ["TN"] },
			"Africa/Windhoek": { c : ["NA"] },
			"America/Adak": { c : ["US"] },
			"America/Anchorage": { c : ["US"] },
			"America/Anguilla": { c : ["AI"] },
			"America/Antigua": { c : ["AG"] },
			"America/Araguaina": { c : ["BR"] },
			"America/Argentina/Buenos_Aires": { c : ["AR"] },
			"America/Argentina/Catamarca": { c : ["AR"] },
			"America/Argentina/ComodRivadavia": { c : ["AR"] },
			"America/Argentina/Cordoba": { c : ["AR"] },
			"America/Argentina/Jujuy": { c : ["AR"] },
			"America/Argentina/La_Rioja": { c : ["AR"] },
			"America/Argentina/Mendoza": { c : ["AR"] },
			"America/Argentina/Rio_Gallegos": { c : ["AR"] },
			"America/Argentina/Salta": { c : ["AR"] },
			"America/Argentina/San_Juan": { c : ["AR"] },
			"America/Argentina/San_Luis": { c : ["AR"] },
			"America/Argentina/Tucuman": { c : ["AR"] },
			"America/Argentina/Ushuaia": { c : ["AR"] },
			"America/Aruba": { c : ["AW"] },
			"America/Asuncion": { c : ["PY"] },
			"America/Atikokan": { c : ["CA"] },
			"America/Atka": {},
			"America/Bahia": { c : ["BR"] },
			"America/Bahia_Banderas": { c : ["MX"] },
			"America/Barbados": { c : ["BB"] },
			"America/Belem": { c : ["BR"] },
			"America/Belize": { c : ["BZ"] },
			"America/Blanc-Sablon": { c : ["CA"] },
			"America/Boa_Vista": { c : ["BR"] },
			"America/Bogota": { c : ["CO"] },
			"America/Boise": { c : ["US"] },
			"America/Buenos_Aires": { c : ["AR"] },
			"America/Cambridge_Bay": { c : ["CA"] },
			"America/Campo_Grande": { c : ["BR"] },
			"America/Cancun": { c : ["MX"] },
			"America/Caracas": { c : ["VE"] },
			"America/Catamarca": {},
			"America/Cayenne": { c : ["GF"] },
			"America/Cayman": { c : ["KY"] },
			"America/Chicago": { c : ["US"] },
			"America/Chihuahua": { c : ["MX"] },
			"America/Coral_Harbour": { c : ["CA"] },
			"America/Cordoba": { c: ['AR'] },
			"America/Costa_Rica": { c : ["CR"] },
			"America/Creston": { c : ["CA"] },
			"America/Cuiaba": { c : ["BR"] },
			"America/Curacao": { c : ["CW"] },
			"America/Danmarkshavn": { c : ["GL"] },
			"America/Dawson": { c : ["CA"] },
			"America/Dawson_Creek": { c : ["CA"] },
			"America/Denver": { c : ["US"] },
			"America/Detroit": { c : ["US"] },
			"America/Dominica": { c : ["DM"] },
			"America/Edmonton": { c : ["CA"] },
			"America/Eirunepe": { c : ["BR"] },
			"America/El_Salvador": { c : ["SV"] },
			"America/Ensenada": {},
			"America/Fort_Nelson": { c : ["CA"] },
			"America/Fort_Wayne": {},
			"America/Fortaleza": { c : ["BR"] },
			"America/Glace_Bay": { c : ["CA"] },
			"America/Godthab": {},
			"America/Goose_Bay": { c : ["CA"] },
			"America/Grand_Turk": { c : ["TC"] },
			"America/Grenada": { c : ["GD"] },
			"America/Guadeloupe": { c : ["GP"] },
			"America/Guatemala": { c : ["GT"] },
			"America/Guayaquil": { c : ["EC"] },
			"America/Guyana": { c : ["GY"] },
			"America/Halifax": { c : ["CA"] },
			"America/Havana": { c : ["CU"] },
			"America/Hermosillo": { c : ["MX"] },
			"America/Indiana/Indianapolis": { c : ["US"] },
			"America/Indiana/Knox": { c : ["US"] },
			"America/Indiana/Marengo": { c : ["US"] },
			"America/Indiana/Petersburg": { c : ["US"] },
			"America/Indiana/Tell_City": { c : ["US"] },
			"America/Indiana/Vevay": { c : ["US"] },
			"America/Indiana/Vincennes": { c : ["US"] },
			"America/Indiana/Winamac": { c : ["US"] },
			"America/Indianapolis": {},
			"America/Inuvik": { c : ["CA"] },
			"America/Iqaluit": { c : ["CA"] },
			"America/Jamaica": { c : ["JM"] },
			"America/Jujuy": {},
			"America/Juneau": { c : ["US"] },
			"America/Kentucky/Louisville": { c : ["US"] },
			"America/Kentucky/Monticello": { c : ["US"] },
			"America/Knox_IN": {},
			"America/Kralendijk": { c : ["BQ"] },
			"America/La_Paz": { c : ["BO"] },
			"America/Lima": { c : ["PE"] },
			"America/Los_Angeles": { c : ["US"] },
			"America/Louisville": {},
			"America/Lower_Princes": { c : ["SX"] },
			"America/Maceio": { c : ["BR"] },
			"America/Managua": { c : ["NI"] },
			"America/Manaus": { c : ["BR"] },
			"America/Marigot": { c : ["MF"] },
			"America/Martinique": { c : ["MQ"] },
			"America/Matamoros": { c : ["MX"] },
			"America/Mazatlan": { c : ["MX"] },
			"America/Mendoza": {},
			"America/Menominee": { c : ["US"] },
			"America/Merida": { c : ["MX"] },
			"America/Metlakatla": { c : ["US"] },
			"America/Mexico_City": { c : ["MX"] },
			"America/Miquelon": { c : ["PM"] },
			"America/Moncton": { c : ["CA"] },
			"America/Monterrey": { c : ["MX"] },
			"America/Montevideo": { c : ["UY"] },
			"America/Montreal": { c : ["CA"] },
			"America/Montserrat": { c : ["MS"] },
			"America/Nassau": { c : ["BS"] },
			"America/New_York": { c : ["US"] },
			"America/Nipigon": { c : ["CA"] },
			"America/Nome": { c : ["US"] },
			"America/Noronha": { c : ["BR"] },
			"America/North_Dakota/Beulah": { c : ["US"] },
			"America/North_Dakota/Center": { c : ["US"] },
			"America/North_Dakota/New_Salem": { c : ["US"] },
			"America/Nuuk": { c : ["GL"] },
			"America/Ojinaga": { c : ["MX"] },
			"America/Panama": { c : ["PA", "CA", "KY"] },
			"America/Pangnirtung": { c : ["CA"] },
			"America/Paramaribo": { c : ["SR"] },
			"America/Phoenix": { c : ["US", "CA"] },
			"America/Port-au-Prince": { c : ["HT"] },
			"America/Port_of_Spain": { c : ["TT"] },
			"America/Porto_Acre": {},
			"America/Porto_Velho": { c : ["BR"] },
			"America/Puerto_Rico": { c : ["PR", "AG", "CA", "AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"] },
			"America/Punta_Arenas": { c : ["CL"] },
			"America/Rainy_River": { c : ["CA"] },
			"America/Rankin_Inlet": { c : ["CA"] },
			"America/Recife": { c : ["BR"] },
			"America/Regina": { c : ["CA"] },
			"America/Resolute": { c : ["CA"] },
			"America/Rio_Branco": { c : ["BR"] },
			"America/Rosario": {},
			"America/Santa_Isabel": {},
			"America/Santarem": { c : ["BR"] },
			"America/Santiago": { c : ["CL"] },
			"America/Santo_Domingo": { c : ["DO"] },
			"America/Sao_Paulo": { c : ["BR"] },
			"America/Scoresbysund": { c : ["GL"] },
			"America/Shiprock": {},
			"America/Sitka": { c : ["US"] },
			"America/St_Barthelemy": { c : ["BL"] },
			"America/St_Johns": { c : ["CA"] },
			"America/St_Kitts": { c : ["KN"] },
			"America/St_Lucia": { c : ["LC"] },
			"America/St_Thomas": { c : ["VI"] },
			"America/St_Vincent": { c : ["VC"] },
			"America/Swift_Current": { c : ["CA"] },
			"America/Tegucigalpa": { c : ["HN"] },
			"America/Thule": { c : ["GL"] },
			"America/Thunder_Bay": { c : ["CA"] },
			"America/Tijuana": { c : ["MX"] },
			"America/Toronto": { c : ["CA", "BS"] },
			"America/Tortola": { c : ["VG"] },
			"America/Vancouver": { c : ["CA"] },
			"America/Virgin": { c : ["VI"] },
			"America/Whitehorse": { c : ["CA"] },
			"America/Winnipeg": { c : ["CA"] },
			"America/Yakutat": { c : ["US"] },
			"America/Yellowknife": { c : ["CA"] },
			"Antarctica/Casey": { c : ["AQ"] },
			"Antarctica/Davis": { c : ["AQ"] },
			"Antarctica/DumontDUrville": { c : ["AQ"] },
			"Antarctica/Macquarie": { c : ["AU"] },
			"Antarctica/Mawson": { c : ["AQ"] },
			"Antarctica/McMurdo": { c : ["AQ"] },
			"Antarctica/Palmer": { c : ["AQ"] },
			"Antarctica/Rothera": { c : ["AQ"] },
			"Antarctica/South_Pole": { c : ["AQ"] },
			"Antarctica/Syowa": { c : ["AQ"] },
			"Antarctica/Troll": { c : ["AQ"] },
			"Antarctica/Vostok": { c : ["AQ"] },
			"Arctic/Longyearbyen": { c : ["SJ"] },
			"Asia/Aden": { c : ["YE"] },
			"Asia/Almaty": { c : ["KZ"] },
			"Asia/Amman": { c : ["JO"] },
			"Asia/Anadyr": { c : ["RU"] },
			"Asia/Aqtau": { c : ["KZ"] },
			"Asia/Aqtobe": { c : ["KZ"] },
			"Asia/Ashgabat": { c : ["TM"] },
			"Asia/Ashkhabad": {},
			"Asia/Atyrau": { c : ["KZ"] },
			"Asia/Baghdad": { c : ["IQ"] },
			"Asia/Bahrain": { c : ["BH"] },
			"Asia/Baku": { c : ["AZ"] },
			"Asia/Bangkok": { c : ["TH", "KH", "LA", "VN"] },
			"Asia/Barnaul": { c : ["RU"] },
			"Asia/Beirut": { c : ["LB"] },
			"Asia/Bishkek": { c : ["KG"] },
			"Asia/Brunei": { c : ["BN"] },
			"Asia/Calcutta": {},
			"Asia/Chita": { c : ["RU"] },
			"Asia/Choibalsan": { c : ["MN"] },
			"Asia/Chongqing": {},
			"Asia/Chungking": {},
			"Asia/Colombo": { c : ["LK"] },
			"Asia/Dacca": {},
			"Asia/Damascus": { c : ["SY"] },
			"Asia/Dhaka": { c : ["BD"] },
			"Asia/Dili": { c : ["TL"] },
			"Asia/Dubai": { c : ["AE", "OM"] },
			"Asia/Dushanbe": { c : ["TJ"] },
			"Asia/Famagusta": { c : ["CY"] },
			"Asia/Gaza": { c : ["PS"] },
			"Asia/Harbin": {},
			"Asia/Hebron": { c : ["PS"] },
			"Asia/Ho_Chi_Minh": { c : ["VN"] },
			"Asia/Hong_Kong": { c : ["HK"] },
			"Asia/Hovd": { c : ["MN"] },
			"Asia/Irkutsk": { c : ["RU"] },
			"Asia/Istanbul": {},
			"Asia/Jakarta": { c : ["ID"] },
			"Asia/Jayapura": { c : ["ID"] },
			"Asia/Jerusalem": { c : ["IL"] },
			"Asia/Kabul": { c : ["AF"] },
			"Asia/Kamchatka": { c : ["RU"] },
			"Asia/Karachi": { c : ["PK"] },
			"Asia/Kashgar": {},
			"Asia/Kathmandu": { c : ["NP"] },
			"Asia/Katmandu": {},
			"Asia/Khandyga": { c : ["RU"] },
			"Asia/Kolkata": { c : ["IN"] },
			"Asia/Krasnoyarsk": { c : ["RU"] },
			"Asia/Kuala_Lumpur": { c : ["MY"] },
			"Asia/Kuching": { c : ["MY"] },
			"Asia/Kuwait": { c : ["KW"] },
			"Asia/Macao": {},
			"Asia/Macau": { c : ["MO"] },
			"Asia/Magadan": { c : ["RU"] },
			"Asia/Makassar": { c : ["ID"] },
			"Asia/Manila": { c : ["PH"] },
			"Asia/Muscat": { c : ["OM"] },
			"Asia/Nicosia": { c : ["CY"] },
			"Asia/Novokuznetsk": { c : ["RU"] },
			"Asia/Novosibirsk": { c : ["RU"] },
			"Asia/Omsk": { c : ["RU"] },
			"Asia/Oral": { c : ["KZ"] },
			"Asia/Phnom_Penh": { c : ["KH"] },
			"Asia/Pontianak": { c : ["ID"] },
			"Asia/Pyongyang": { c : ["KP"] },
			"Asia/Qatar": { c : ["QA", "BH"] },
			"Asia/Qostanay": { c : ["KZ"] },
			"Asia/Qyzylorda": { c : ["KZ"] },
			"Asia/Rangoon": {},
			"Asia/Riyadh": { c : ["SA", "AQ", "KW", "YE"] },
			"Asia/Saigon": {},
			"Asia/Sakhalin": { c : ["RU"] },
			"Asia/Samarkand": { c : ["UZ"] },
			"Asia/Seoul": { c : ["KR"] },
			"Asia/Shanghai": { c : ["CN"] },
			"Asia/Singapore": { c : ["SG", "MY"] },
			"Asia/Srednekolymsk": { c : ["RU"] },
			"Asia/Taipei": { c : ["TW"] },
			"Asia/Tashkent": { c : ["UZ"] },
			"Asia/Tbilisi": { c : ["GE"] },
			"Asia/Tehran": { c : ["IR"] },
			"Asia/Tel_Aviv": {},
			"Asia/Thimbu": {},
			"Asia/Thimphu": { c : ["BT"] },
			"Asia/Tokyo": { c : ["JP"] },
			"Asia/Tomsk": { c : ["RU"] },
			"Asia/Ujung_Pandang": {},
			"Asia/Ulaanbaatar": { c : ["MN"] },
			"Asia/Ulan_Bator": {},
			"Asia/Urumqi": { c : ["CN"] },
			"Asia/Ust-Nera": { c : ["RU"] },
			"Asia/Vientiane": { c : ["LA"] },
			"Asia/Vladivostok": { c : ["RU"] },
			"Asia/Yakutsk": { c : ["RU"] },
			"Asia/Yangon": { c : ["MM"] },
			"Asia/Yekaterinburg": { c : ["RU"] },
			"Asia/Yerevan": { c : ["AM"] },
			"Atlantic/Azores": { c : ["PT"] },
			"Atlantic/Bermuda": { c : ["BM"] },
			"Atlantic/Canary": { c : ["ES"] },
			"Atlantic/Cape_Verde": { c : ["CV"] },
			"Atlantic/Faeroe": {},
			"Atlantic/Faroe": { c : ["FO"] },
			"Atlantic/Jan_Mayen": { c : ["SJ"] },
			"Atlantic/Madeira": { c : ["PT"] },
			"Atlantic/Reykjavik": { c : ["IS"] },
			"Atlantic/South_Georgia": { c : ["GS"] },
			"Atlantic/St_Helena": { c : ["SH"] },
			"Atlantic/Stanley": { c : ["FK"] },
			"Australia/ACT": {},
			"Australia/Adelaide": { c : ["AU"] },
			"Australia/Brisbane": { c : ["AU"] },
			"Australia/Broken_Hill": { c : ["AU"] },
			"Australia/Canberra": {},
			"Australia/Currie": {},
			"Australia/Darwin": { c : ["AU"] },
			"Australia/Eucla": { c : ["AU"] },
			"Australia/Hobart": { c : ["AU"] },
			"Australia/LHI": {},
			"Australia/Lindeman": { c : ["AU"] },
			"Australia/Lord_Howe": { c : ["AU"] },
			"Australia/Melbourne": { c : ["AU"] },
			"Australia/NSW": {},
			"Australia/North": {},
			"Australia/Perth": { c : ["AU"] },
			"Australia/Queensland": {},
			"Australia/South": {},
			"Australia/Sydney": { c : ["AU"] },
			"Australia/Tasmania": {},
			"Australia/Victoria": {},
			"Australia/West": {},
			"Australia/Yancowinna": {},
			"Brazil/Acre": {},
			"Brazil/DeNoronha": {},
			"Brazil/East": {},
			"Brazil/West": {},
			CET: { c : ["XK"] },
			CST6CDT: {},
			"Canada/Atlantic": {},
			"Canada/Central": {},
			"Canada/Eastern": { c : ["CA"] },
			"Canada/Mountain": {},
			"Canada/Newfoundland": {},
			"Canada/Pacific": {},
			"Canada/Saskatchewan": {},
			"Canada/Yukon": {},
			"Chile/Continental": {},
			"Chile/EasterIsland": {},
			Cuba: {},
			EET: {},
			EST: {},
			EST5EDT: {},
			Egypt: {},
			Eire: {},
			"Etc/GMT": { c : ["AC"] },
			"Etc/GMT+0": {},
			"Etc/GMT+1": {},
			"Etc/GMT+10": {},
			"Etc/GMT+11": {},
			"Etc/GMT+12": {},
			"Etc/GMT+2": {},
			"Etc/GMT+3": {},
			"Etc/GMT+4": {},
			"Etc/GMT+5": {},
			"Etc/GMT+6": {},
			"Etc/GMT+7": {},
			"Etc/GMT+8": {},
			"Etc/GMT+9": {},
			"Etc/GMT-0": {},
			"Etc/GMT-1": {},
			"Etc/GMT-10": {},
			"Etc/GMT-11": {},
			"Etc/GMT-12": {},
			"Etc/GMT-13": {},
			"Etc/GMT-14": {},
			"Etc/GMT-2": {},
			"Etc/GMT-3": {},
			"Etc/GMT-4": {},
			"Etc/GMT-5": {},
			"Etc/GMT-6": {},
			"Etc/GMT-7": {},
			"Etc/GMT-8": {},
			"Etc/GMT-9": {},
			"Etc/GMT0": {},
			"Etc/Greenwich": {},
			"Etc/UCT": {},
			"Etc/UTC": {},
			"Etc/Universal": {},
			"Etc/Zulu": {},
			"Europe/Amsterdam": { c : ["NL"] },
			"Europe/Andorra": { c : ["AD"] },
			"Europe/Astrakhan": { c : ["RU"] },
			"Europe/Athens": { c : ["GR"] },
			"Europe/Belfast": { c : ["GB"] },
			"Europe/Belgrade": { c : ["RS", "BA", "HR", "ME", "MK", "SI"] },
			"Europe/Berlin": { c : ["DE"] },
			"Europe/Bratislava": { c : ["SK"] },
			"Europe/Brussels": { c : ["BE"] },
			"Europe/Bucharest": { c : ["RO"] },
			"Europe/Budapest": { c : ["HU"] },
			"Europe/Busingen": { c : ["DE"] },
			"Europe/Chisinau": { c : ["MD"] },
			"Europe/Copenhagen": { c : ["DK"] },
			"Europe/Dublin": { c : ["IE"] },
			"Europe/Gibraltar": { c : ["GI"] },
			"Europe/Guernsey": { c : ["GG"] },
			"Europe/Helsinki": { c : ["FI", "AX"] },
			"Europe/Isle_of_Man": { c : ["IM"] },
			"Europe/Istanbul": { c : ["TR"] },
			"Europe/Jersey": { c : ["JE"] },
			"Europe/Kaliningrad": { c : ["RU"] },
			"Europe/Kiev": { c : ["UA"] },
			"Europe/Kirov": { c : ["RU"] },
			"Europe/Lisbon": { c : ["PT"] },
			"Europe/Ljubljana": { c : ["SI"] },
			"Europe/London": { c : ["GB", "GG", "IM", "JE"] },
			"Europe/Luxembourg": { c : ["LU"] },
			"Europe/Madrid": { c : ["ES"] },
			"Europe/Malta": { c : ["MT"] },
			"Europe/Mariehamn": { c : ["AX"] },
			"Europe/Minsk": { c : ["BY"] },
			"Europe/Monaco": { c : ["MC"] },
			"Europe/Moscow": { c : ["RU"] },
			"Europe/Nicosia": {},
			"Europe/Oslo": { c : ["NO", "SJ", "BV"] },
			"Europe/Paris": { c : ["FR"] },
			"Europe/Podgorica": { c : ["ME"] },
			"Europe/Prague": { c : ["CZ", "SK"] },
			"Europe/Riga": { c : ["LV"] },
			"Europe/Rome": { c : ["IT", "SM", "VA"] },
			"Europe/Samara": { c : ["RU"] },
			"Europe/San_Marino": { c : ["SM"] },
			"Europe/Sarajevo": { c : ["BA"] },
			"Europe/Saratov": { c : ["RU"] },
			"Europe/Simferopol": { c : ["RU", "UA"] },
			"Europe/Skopje": { c : ["MK"] },
			"Europe/Sofia": { c : ["BG"] },
			"Europe/Stockholm": { c : ["SE"] },
			"Europe/Tallinn": { c : ["EE"] },
			"Europe/Tirane": { c : ["AL"] },
			"Europe/Tiraspol": {},
			"Europe/Ulyanovsk": { c : ["RU"] },
			"Europe/Uzhgorod": { c : ["UA"] },
			"Europe/Vaduz": { c : ["LI"] },
			"Europe/Vatican": { c : ["VA"] },
			"Europe/Vienna": { c : ["AT"] },
			"Europe/Vilnius": { c : ["LT"] },
			"Europe/Volgograd": { c : ["RU"] },
			"Europe/Warsaw": { c : ["PL"] },
			"Europe/Zagreb": { c : ["HR"] },
			"Europe/Zaporozhye": { c : ["UA"] },
			"Europe/Zurich": { c : ["CH", "DE", "LI"] },
			Factory: {},
			GB: { c : ["GB"] },
			"GB-Eire": { c : ["GB"] },
			GMT: { c : ["AC"] },
			"GMT+0": {},
			"GMT-0": {},
			GMT0: {},
			Greenwich: {},
			HST: {},
			Hongkong: {},
			Iceland: {},
			"Indian/Antananarivo": { c : ["MG"] },
			"Indian/Chagos": { c : ["IO"] },
			"Indian/Christmas": { c : ["CX"] },
			"Indian/Cocos": { c : ["CC"] },
			"Indian/Comoro": { c : ["KM"] },
			"Indian/Kerguelen": { c : ["TF", "HM"] },
			"Indian/Mahe": { c : ["SC"] },
			"Indian/Maldives": { c : ["MV"] },
			"Indian/Mauritius": { c : ["MU"] },
			"Indian/Mayotte": { c : ["YT"] },
			"Indian/Reunion": { c : ["RE", "TF"] },
			Iran: {},
			Israel: {},
			Jamaica: {},
			Japan: {},
			Kwajalein: {},
			Libya: {},
			MET: {},
			MST: {},
			MST7MDT: {},
			"Mexico/BajaNorte": {},
			"Mexico/BajaSur": {},
			"Mexico/General": {},
			NZ: { c : ["NZ"] },
			"NZ-CHAT": {},
			Navajo: {},
			PRC: {},
			PST8PDT: {},
			"Pacific/Apia": { c : ["WS"] },
			"Pacific/Auckland": { c : ["NZ", "AQ"] },
			"Pacific/Bougainville": { c : ["PG"] },
			"Pacific/Chatham": { c : ["NZ"] },
			"Pacific/Chuuk": { c : ["FM"] },
			"Pacific/Easter": { c : ["CL"] },
			"Pacific/Efate": { c : ["VU"] },
			"Pacific/Enderbury": {},
			"Pacific/Fakaofo": { c : ["TK"] },
			"Pacific/Fiji": { c : ["FJ"] },
			"Pacific/Funafuti": { c : ["TV"] },
			"Pacific/Galapagos": { c : ["EC"] },
			"Pacific/Gambier": { c : ["PF"] },
			"Pacific/Guadalcanal": { c : ["SB"] },
			"Pacific/Guam": { c : ["GU", "MP"] },
			"Pacific/Honolulu": { c : ["US", "UM"] },
			"Pacific/Johnston": { c : ["UM"] },
			"Pacific/Kanton": { c : ["KI"] },
			"Pacific/Kiritimati": { c : ["KI"] },
			"Pacific/Kosrae": { c : ["FM"] },
			"Pacific/Kwajalein": { c : ["MH"] },
			"Pacific/Majuro": { c : ["MH"] },
			"Pacific/Marquesas": { c : ["PF"] },
			"Pacific/Midway": { c : ["UM"] },
			"Pacific/Nauru": { c : ["NR"] },
			"Pacific/Niue": { c : ["NU"] },
			"Pacific/Norfolk": { c : ["NF"] },
			"Pacific/Noumea": { c : ["NC"] },
			"Pacific/Pago_Pago": { c : ["AS", "UM"] },
			"Pacific/Palau": { c : ["PW"] },
			"Pacific/Pitcairn": { c : ["PN"] },
			"Pacific/Pohnpei": { c : ["FM"] },
			"Pacific/Ponape": {},
			"Pacific/Port_Moresby": { c : ["PG", "AQ"] },
			"Pacific/Rarotonga": { c : ["CK"] },
			"Pacific/Saipan": { c : ["MP"] },
			"Pacific/Samoa": { c : ["WS"] },
			"Pacific/Tahiti": { c : ["PF"] },
			"Pacific/Tarawa": { c : ["KI"] },
			"Pacific/Tongatapu": { c : ["TO"] },
			"Pacific/Truk": {},
			"Pacific/Wake": { c : ["UM"] },
			"Pacific/Wallis": { c : ["WF"] },
			"Pacific/Yap": {},
			Poland: {},
			Portugal: {},
			ROC: {},
			ROK: {},
			Singapore: { c : ["SG"] },
			Turkey: {},
			UCT: {},
			"US/Alaska": {},
			"US/Aleutian": {},
			"US/Arizona": { c : ["US"] },
			"US/Central": {},
			"US/East-Indiana": {},
			"US/Eastern": {},
			"US/Hawaii": { c : ["US"] },
			"US/Indiana-Starke": {},
			"US/Michigan": {},
			"US/Mountain": {},
			"US/Pacific": {},
			"US/Samoa": { c : ["WS"] },
			UTC: {},
			Universal: {},
			"W-SU": {},
			WET: {},
			Zulu: {
			}
		};

		const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;

		if (timezone === "" || !timezone) {
			return null;
		}

		return timezones[timezone].c[0];
	}

	let utilsScriptLoaded;

	em_setup_phone_inputs = async function ( container, overriding_options = {} ) {
		if ( !EM.phone ) return false;
		if( !utilsScriptLoaded ) {
			import( EM.url + '/includes/external/intl-tel-input/js/intlTelInputWithUtils.js' ).then( () => {
				utilsScriptLoaded = true;
				em_setup_phone_inputs( container );
			});
			return false;
		} // on initial load, we wait for scripts to load
		container.querySelectorAll('input.em-phone-intl[type="tel"]').forEach( function(input){
			// change name and allow a hidden field for submission
			let alt = document.createElement('input');
			let name = input.name;
			if( name ) {
				// check if there's an ending ] in the name if so modify the name within the last brackets
				let lastBracket = name.lastIndexOf(']');
				if( lastBracket > -1 ) {
					input.name = name.substring(0, lastBracket) + '_intl]';
				} else {
					input.name = name + '_intl';
				}
				alt.name = name;
			}
			input.classList.add('em-intl-tel');
			// copy all classes and remove ones we know we don't want
			alt.setAttribute('class', input.getAttribute('class') + ' em-intl-tel-full');
			alt.classList.remove('em-intl-tel');
			alt.type = 'hidden';
			if( input.id ) {
				alt.id = input.id + '-full'
			}
			alt.value = input.value;
			// add data-name to the full input if it exists, for use in dynamic input forms for JS submission within forms
			if( input.getAttribute('data-name') ) {
				alt.setAttribute('data-name', input.getAttribute('data-name'));
				input.removeAttribute('data-name');
			}
			input.after(alt);

			let default_options = Object.assign({
				autoPlaceholder: 'aggressive',
				separateDialCode : true,
			}, EM.phone.options);
			let options = Object.assign( default_options, overriding_options );

			if( EM.phone.detectJS || options.detectJS ) {
				let country = getCountry();
				if( country ) {
					options.initialCountry = country;
				} else if ( EM.phone.initialCountry ) {
					options.initialCountry = EM.phone.initialCountry;
				}
			}
			if( options.onlyCountries ) {
				if( Array.isArray(options.onlyCountries) && options.onlyCountries.length > 0 ) {
					// make sure initial country is not excluded
					if (!options.onlyCountries.includes(options.initialCountry && options.initialCountry)) {
						options.onlyCountries.push(options.initialCountry);
					}
				} else {
					options.onlyCountries = [];
				}
			}

			let iti = EM.intlTelInput( input, options);
			if ( !input?.checkVisibility() ) {
				// if the input is hidden, we need some trickery to correctly obtain the padding by adding a clone of the minimum into the array
				// intl-tel-input does this, but because it's not wrapped in an em element the padding isn't correctly styled via CSS
				let body = document.body;
				let container = document.createElement('div');
				container.style.visibility = "hidden";
				container.classList.add('em');
				body.appendChild( container );
				let containerClone = input.parentNode.cloneNode( false );
				container.appendChild( containerClone );
				let countryContainerClone = iti.ui.countryContainer.cloneNode();
				containerClone.appendChild( countryContainerClone );
				let selectedCountryClone = iti.ui.selectedCountry.cloneNode( true );
				countryContainerClone.appendChild( selectedCountryClone );
				let width = selectedCountryClone.offsetWidth + 12; // add extra padding
				input.style.setProperty('padding-left', width + 'px', 'important' );
				body.removeChild( container );
			}
			//iti.countryContainer.querySelector('button')?.setAttribute('data-nostyle', '');
			let pixels = parseInt( input.style.paddingLeft.replace('px', '') ); // pad this an extra px
			input.style.setProperty('padding-left', pixels + 'px', 'important' );

			// do some basic inline validation
			input.addEventListener('change', function( e ){
				alt.value = iti.getNumber();
				if ( input.value.trim() ) {
					let wrapper = input.closest('.iti')
					if ( iti.isValidNumber() ) {
						wrapper.classList.remove("invalid-number");
						if ( wrapper.nextElementSibling && wrapper.nextElementSibling.classList.contains('em-inline-error') ) {
							wrapper.nextElementSibling.remove();
						}
					} else {
						wrapper.classList.add("invalid-number");
						const errorCode = iti.getValidationError();
						let errorMsg;
						if( !(wrapper.nextElementSibling && wrapper.nextElementSibling.classList.contains('em-inline-error')) ) {
							// create a div em-form-error class name and append after input
							errorMsg = document.createElement('div');
							errorMsg.classList.add('em-inline-error');
							wrapper.after(errorMsg);
						} else {
							errorMsg = wrapper.nextElementSibling;
						}
						errorMsg.innerHTML = '<span class="em-icon"></span> ' + EM.phone.error;
						errorMsg.classList.remove("hide");
					}
				}
			});
			
			// trigger changes
			input.addEventListener('countrychange', function( e ){
				alt.value = iti.getNumber();
				// check input padding inline style and set it to important
				if( input.getAttribute('style') ) {
					let pixels = parseInt(input.style.paddingLeft.replace('px', '')); // pad this an extra px
					input.style.setProperty('padding-left', pixels + 'px', 'important' );
				}
			});

			input.addEventListener('open:countrydropdown', function( e ) {
				document.querySelectorAll('.iti.iti--container.iti--fullscreen-popup').forEach( function( el ) {
					if ( !el.closest('.em') ) {
						// wrap in an .em div
						let div = document.createElement('div');
						div.classList.add('em');
						el.parentNode.insertBefore(div, el);
						div.appendChild(el);
						el.querySelector('input.iti__search-input')?.focus();
					}
				});
			});

		});
	};

	em_unsetup_phone_inputs = function( container ) {
		container.querySelectorAll( 'input.em-phone-intl[type="tel"]' ).forEach( function(el){
			let iti = EM.intlTelInput?.getInstance(el);
			if ( iti ) {
				iti.destroy();
				// remove alt field as well and unset the _intl suffix, which may have a trailing ] so needs a preg
				el.name = el.name.replace(/_intl]$/, ']').replace(/_intl$/, '');
				el.parentElement.querySelector('input.em-intl-tel-full')?.remove();
			}
		});
	};
}

/*!
 * jquery-timepicker v1.13.16 - Copyright (c) 2020 Jon Thornton - https://www.jonthornton.com/jquery-timepicker/
 * Did a search/replace of timepicker to em_timepicker to prevent conflicts.
 */
(function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(obj){return typeof obj}}else{_typeof=function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable});keys.push.apply(keys,symbols)}return keys}function _objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}}return target}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _createForOfIteratorHelper(o){if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(o=_unsupportedIterableToArray(o))){var i=0;var F=function(){};return{s:F,n:function(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,normalCompletion=true,didErr=false,err;return{s:function(){it=o[Symbol.iterator]()},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}var ONE_DAY=86400;var roundingFunction=function roundingFunction(seconds,settings){if(seconds===null){return null}else if(typeof settings.step!=="number"){return seconds}else{var offset=seconds%(settings.step*60);var start=settings.minTime||0;offset-=start%(settings.step*60);if(offset>=settings.step*30){seconds+=settings.step*60-offset}else{seconds-=offset}return _moduloSeconds(seconds,settings)}};function _moduloSeconds(seconds,settings){if(seconds==ONE_DAY&&settings.show2400){return seconds}return seconds%ONE_DAY}var DEFAULT_SETTINGS={appendTo:"body",className:null,closeOnWindowScroll:false,disableTextInput:false,disableTimeRanges:[],disableTouchKeyboard:false,durationTime:null,forceRoundTime:false,lang:{},listWidth:null,maxTime:null,minTime:null,noneOption:false,orientation:"l",roundingFunction:roundingFunction,scrollDefault:null,selectOnBlur:false,show2400:false,showDuration:false,showOn:["click","focus"],showOnFocus:true,step:30,stopScrollPropagation:false,timeFormat:"g:ia",typeaheadHighlight:true,useSelect:false,wrapHours:true};var DEFAULT_LANG={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"};var Timepicker=function(){function Timepicker(targetEl){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Timepicker);this._handleFormatValue=this._handleFormatValue.bind(this);this._handleKeyUp=this._handleKeyUp.bind(this);this.targetEl=targetEl;var attrOptions=Timepicker.extractAttrOptions(targetEl,Object.keys(DEFAULT_SETTINGS));this.settings=this.parseSettings(_objectSpread2(_objectSpread2(_objectSpread2({},DEFAULT_SETTINGS),options),attrOptions))}_createClass(Timepicker,[{key:"hideMe",value:function hideMe(){if(this.settings.useSelect){this.targetEl.blur();return}if(!this.list||!Timepicker.isVisible(this.list)){return}if(this.settings.selectOnBlur){this._selectValue()}this.list.hide();var hideTimepickerEvent=new CustomEvent("hideTimepicker");this.targetEl.dispatchEvent(hideTimepickerEvent)}},{key:"_findRow",value:function _findRow(value){if(!value&&value!==0){return false}var out=false;var value=this.settings.roundingFunction(value,this.settings);if(!this.list){return false}this.list.find("li").each(function(i,obj){var parsed=Number.parseInt(obj.dataset.time);if(Number.isNaN(parsed)){return}if(parsed==value){out=obj;return false}});return out}},{key:"_hideKeyboard",value:function _hideKeyboard(){return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.settings.disableTouchKeyboard}},{key:"_setTimeValue",value:function _setTimeValue(value,source){if(this.targetEl.nodeName==="INPUT"){if(value!==null||this.targetEl.value!=""){this.targetEl.value=value}var tp=this;var settings=tp.settings;if(settings.useSelect&&source!="select"&&tp.list){tp.list.val(tp._roundAndFormatTime(tp.time2int(value)))}}var selectTimeEvent=new Event("selectTime");if(this.selectedValue!=value){this.selectedValue=value;var changeTimeEvent=new Event("changeTime");var changeEvent=new CustomEvent("change",{detail:"em_timepicker"});if(source=="select"){this.targetEl.dispatchEvent(selectTimeEvent);this.targetEl.dispatchEvent(changeTimeEvent);this.targetEl.dispatchEvent(changeEvent)}else if(["error","initial"].indexOf(source)==-1){this.targetEl.dispatchEvent(changeTimeEvent)}return true}else{if(["error","initial"].indexOf(source)==-1){this.targetEl.dispatchEvent(selectTimeEvent)}return false}}},{key:"_getTimeValue",value:function _getTimeValue(){if(this.targetEl.nodeName==="INPUT"){return this.targetEl.value}else{return this.selectedValue}}},{key:"_selectValue",value:function _selectValue(){var tp=this;var settings=tp.settings;var list=tp.list;var cursor=list.find(".ui-em_timepicker-selected");if(cursor.hasClass("ui-em_timepicker-disabled")){return false}if(!cursor.length){return true}var timeValue=cursor.get(0).dataset.time;if(timeValue){var parsedTimeValue=Number.parseInt(timeValue);if(!Number.isNaN(parsedTimeValue)){timeValue=parsedTimeValue}}if(timeValue!==null){if(typeof timeValue!="string"){timeValue=tp._int2time(timeValue)}tp._setTimeValue(timeValue,"select")}return true}},{key:"time2int",value:function time2int(timeString){if(timeString===""||timeString===null||timeString===undefined)return null;if(timeString instanceof Date){return timeString.getHours()*3600+timeString.getMinutes()*60+timeString.getSeconds()}if(typeof timeString!="string"){return timeString}timeString=timeString.toLowerCase().replace(/[\s\.]/g,"");if(timeString.slice(-1)=="a"||timeString.slice(-1)=="p"){timeString+="m"}var pattern=/^(([^0-9]*))?([0-9]?[0-9])(([0-5][0-9]))?(([0-5][0-9]))?(([^0-9]*))$/;var hasDelimetersMatch=timeString.match(/\W/);if(hasDelimetersMatch){pattern=/^(([^0-9]*))?([0-9]?[0-9])(\W+([0-5][0-9]?))?(\W+([0-5][0-9]))?(([^0-9]*))$/}var time=timeString.match(pattern);if(!time){return null}var hour=parseInt(time[3]*1,10);var ampm=time[2]||time[9];var hours=hour;var minutes=time[5]*1||0;var seconds=time[7]*1||0;if(!ampm&&time[3].length==2&&time[3][0]=="0"){ampm="am"}if(hour<=12&&ampm){ampm=ampm.trim();var isPm=ampm==this.settings.lang.pm||ampm==this.settings.lang.PM;if(hour==12){hours=isPm?12:0}else{hours=hour+(isPm?12:0)}}else{var t=hour*3600+minutes*60+seconds;if(t>=ONE_DAY+(this.settings.show2400?1:0)){if(this.settings.wrapHours===false){return null}hours=hour%24}}var timeInt=hours*3600+minutes*60+seconds;if(hour<12&&!ampm&&this.settings._twelveHourTime&&this.settings.scrollDefault){var delta=timeInt-this.settings.scrollDefault();if(delta<0&&delta>=ONE_DAY/-2){timeInt=(timeInt+ONE_DAY/2)%ONE_DAY}}return timeInt}},{key:"parseSettings",value:function parseSettings(settings){var _this=this;settings.lang=_objectSpread2(_objectSpread2({},DEFAULT_LANG),settings.lang);this.settings=settings;if(settings.minTime){settings.minTime=this.time2int(settings.minTime)}if(settings.maxTime){settings.maxTime=this.time2int(settings.maxTime)}if(settings.listWidth){settings.listWidth=this.time2int(settings.listWidth)}if(settings.durationTime&&typeof settings.durationTime!=="function"){settings.durationTime=this.time2int(settings.durationTime)}if(settings.scrollDefault=="now"){settings.scrollDefault=function(){return settings.roundingFunction(_this.time2int(new Date),settings)}}else if(settings.scrollDefault&&typeof settings.scrollDefault!="function"){var val=settings.scrollDefault;settings.scrollDefault=function(){return settings.roundingFunction(_this.time2int(val),settings)}}else if(settings.minTime){settings.scrollDefault=function(){return settings.roundingFunction(settings.minTime,settings)}}if(typeof settings.timeFormat==="string"&&settings.timeFormat.match(/[gh]/)){settings._twelveHourTime=true}if(settings.showOnFocus===false&&settings.showOn.indexOf("focus")!=-1){settings.showOn.splice(settings.showOn.indexOf("focus"),1)}if(!settings.disableTimeRanges){settings.disableTimeRanges=[]}if(settings.disableTimeRanges.length>0){for(var i in settings.disableTimeRanges){settings.disableTimeRanges[i]=[this.time2int(settings.disableTimeRanges[i][0]),this.time2int(settings.disableTimeRanges[i][1])]}settings.disableTimeRanges=settings.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var i=settings.disableTimeRanges.length-1;i>0;i--){if(settings.disableTimeRanges[i][0]<=settings.disableTimeRanges[i-1][1]){settings.disableTimeRanges[i-1]=[Math.min(settings.disableTimeRanges[i][0],settings.disableTimeRanges[i-1][0]),Math.max(settings.disableTimeRanges[i][1],settings.disableTimeRanges[i-1][1])];settings.disableTimeRanges.splice(i,1)}}}return settings}},{key:"_disableTextInputHandler",value:function _disableTextInputHandler(e){switch(e.keyCode){case 13:case 9:return;default:e.preventDefault()}}},{key:"_int2duration",value:function _int2duration(seconds,step){seconds=Math.abs(seconds);var minutes=Math.round(seconds/60),duration=[],hours,mins;if(minutes<60){duration=[minutes,this.settings.lang.mins]}else{hours=Math.floor(minutes/60);mins=minutes%60;if(step==30&&mins==30){hours+=this.settings.lang.decimal+5}duration.push(hours);duration.push(hours==1?this.settings.lang.hr:this.settings.lang.hrs);if(step!=30&&mins){duration.push(mins);duration.push(this.settings.lang.mins)}}return duration.join(" ")}},{key:"_roundAndFormatTime",value:function _roundAndFormatTime(seconds){seconds=this.settings.roundingFunction(seconds,this.settings);if(seconds!==null){return this._int2time(seconds)}}},{key:"_int2time",value:function _int2time(timeInt){if(typeof timeInt!="number"){return null}var seconds=parseInt(timeInt%60),minutes=parseInt(timeInt/60%60),hours=parseInt(timeInt/(60*60)%24);var time=new Date(1970,0,2,hours,minutes,seconds,0);if(isNaN(time.getTime())){return null}if(typeof this.settings.timeFormat==="function"){return this.settings.timeFormat(time)}var output="";var hour,code;for(var i=0;i<this.settings.timeFormat.length;i++){code=this.settings.timeFormat.charAt(i);switch(code){case"a":output+=time.getHours()>11?this.settings.lang.pm:this.settings.lang.am;break;case"A":output+=time.getHours()>11?this.settings.lang.PM:this.settings.lang.AM;break;case"g":hour=time.getHours()%12;output+=hour===0?"12":hour;break;case"G":hour=time.getHours();if(timeInt===ONE_DAY)hour=this.settings.show2400?24:0;output+=hour;break;case"h":hour=time.getHours()%12;if(hour!==0&&hour<10){hour="0"+hour}output+=hour===0?"12":hour;break;case"H":hour=time.getHours();if(timeInt===ONE_DAY)hour=this.settings.show2400?24:0;output+=hour>9?hour:"0"+hour;break;case"i":var minutes=time.getMinutes();output+=minutes>9?minutes:"0"+minutes;break;case"s":seconds=time.getSeconds();output+=seconds>9?seconds:"0"+seconds;break;case"\\":i++;output+=this.settings.timeFormat.charAt(i);break;default:output+=code}}return output}},{key:"_setSelected",value:function _setSelected(){var list=this.list;list.find("li").removeClass("ui-em_timepicker-selected");var timeValue=this.time2int(this._getTimeValue());if(timeValue===null){return}var selected=this._findRow(timeValue);if(selected){var selectedRect=selected.getBoundingClientRect();var listRect=list.get(0).getBoundingClientRect();var topDelta=selectedRect.top-listRect.top;if(topDelta+selectedRect.height>listRect.height||topDelta<0){var newScroll=list.scrollTop()+(selectedRect.top-listRect.top)-selectedRect.height;list.scrollTop(newScroll)}var parsed=Number.parseInt(selected.dataset.time);if(this.settings.forceRoundTime||parsed===timeValue){selected.classList.add("ui-em_timepicker-selected")}}}},{key:"_isFocused",value:function _isFocused(el){return el===document.activeElement}},{key:"_handleFormatValue",value:function _handleFormatValue(e){if(e&&e.detail=="em_timepicker"){return}this._formatValue(e)}},{key:"_formatValue",value:function _formatValue(e,origin){if(this.targetEl.value===""){this._setTimeValue(null,origin);return}if(this._isFocused(this.targetEl)&&(!e||e.type!="change")){return}var settings=this.settings;var seconds=this.time2int(this.targetEl.value);if(seconds===null){var timeFormatErrorEvent=new CustomEvent("timeFormatError");this.targetEl.dispatchEvent(timeFormatErrorEvent);return}var rangeError=false;if(settings.minTime!==null&&settings.maxTime!==null&&(seconds<settings.minTime||seconds>settings.maxTime)){rangeError=true}var _iterator=_createForOfIteratorHelper(settings.disableTimeRanges),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var range=_step.value;if(seconds>=range[0]&&seconds<range[1]){rangeError=true;break}}}catch(err){_iterator.e(err)}finally{_iterator.f()}if(settings.forceRoundTime){var roundSeconds=settings.roundingFunction(seconds,settings);if(roundSeconds!=seconds){seconds=roundSeconds;origin=null}}var prettyTime=this._int2time(seconds);if(rangeError){this._setTimeValue(prettyTime);var timeRangeErrorEvent=new CustomEvent("timeRangeError");this.targetEl.dispatchEvent(timeRangeErrorEvent)}else{this._setTimeValue(prettyTime,origin)}}},{key:"_generateNoneElement",value:function _generateNoneElement(optionValue,useSelect){var label,className,value;if(_typeof(optionValue)=="object"){label=optionValue.label;className=optionValue.className;value=optionValue.value}else if(typeof optionValue=="string"){label=optionValue;value=""}else{$.error("Invalid noneOption value")}var el;if(useSelect){el=document.createElement("option");el.value=value}else{el=document.createElement("li");el.dataset.time=String(value)}el.innerText=label;el.classList.add(className);return el}},{key:"_handleKeyUp",value:function _handleKeyUp(e){if(!this.list||!Timepicker.isVisible(this.list)||this.settings.disableTextInput){return true}if(e.type==="paste"||e.type==="cut"){setTimeout(function(){if(this.settings.typeaheadHighlight){this._setSelected()}else{this.list.hide()}},0);return}switch(e.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:if(this.settings.typeaheadHighlight){this._setSelected()}else{this.list.hide()}break}}}],[{key:"extractAttrOptions",value:function extractAttrOptions(element,keys){var output={};var _iterator2=_createForOfIteratorHelper(keys),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var key=_step2.value;if(key in element.dataset){output[key]=element.dataset[key]}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return output}},{key:"isVisible",value:function isVisible(elem){var el=elem[0];return el.offsetWidth>0&&el.offsetHeight>0}},{key:"hideAll",value:function hideAll(){var _iterator3=_createForOfIteratorHelper(document.getElementsByClassName("ui-em_timepicker-input")),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var el=_step3.value;var tp=el.em_timepickerObj;if(tp){tp.hideMe()}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}}]);return Timepicker}();(function(factory){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&exports&&(typeof module==="undefined"?"undefined":_typeof(module))==="object"&&module&&module.exports===exports){factory(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery)}})(function($){var _lang={};var methods={init:function init(options){return this.each(function(){var self=$(this);var tp=new Timepicker(this,options);var settings=tp.settings;_lang=settings.lang;this.em_timepickerObj=tp;self.addClass("ui-em_timepicker-input");if(settings.useSelect){_render(self)}else{self.prop("autocomplete","off");if(settings.showOn){for(var i in settings.showOn){self.on(settings.showOn[i]+".em_timepicker",methods.show)}}self.on("change.em_timepicker",tp._handleFormatValue);self.on("keydown.em_timepicker",_keydownhandler);self.on("keyup.em_timepicker",tp._handleKeyUp);if(settings.disableTextInput){self.on("keydown.em_timepicker",tp._disableTextInputHandler)}self.on("cut.em_timepicker",tp._handleKeyUp);self.on("paste.em_timepicker",tp._handleKeyUp);tp._formatValue(null,"initial")}})},show:function show(e){var self=$(this);var tp=self[0].em_timepickerObj;var settings=tp.settings;if(e){e.preventDefault()}if(settings.useSelect){tp.list.trigger("focus");return}if(tp._hideKeyboard()){self.trigger("blur")}var list=tp.list;if(self.prop("readonly")){return}if(!list||list.length===0||typeof settings.durationTime==="function"){_render(self);list=tp.list}if(Timepicker.isVisible(list)){return}if(self.is("input")){tp.selectedValue=self.val()}tp._setSelected();Timepicker.hideAll();if(typeof settings.listWidth=="number"){list.width(self.outerWidth()*settings.listWidth)}list.show();var listOffset={};if(settings.orientation.match(/r/)){listOffset.left=self.offset().left+self.outerWidth()-list.outerWidth()+parseInt(list.css("marginLeft").replace("px",""),10)}else if(settings.orientation.match(/l/)){listOffset.left=self.offset().left+parseInt(list.css("marginLeft").replace("px",""),10)}else if(settings.orientation.match(/c/)){listOffset.left=self.offset().left+(self.outerWidth()-list.outerWidth())/2+parseInt(list.css("marginLeft").replace("px",""),10)}var verticalOrientation;if(settings.orientation.match(/t/)){verticalOrientation="t"}else if(settings.orientation.match(/b/)){verticalOrientation="b"}else if(self.offset().top+self.outerHeight(true)+list.outerHeight()>$(window).height()+$(window).scrollTop()){verticalOrientation="t"}else{verticalOrientation="b"}if(verticalOrientation=="t"){list.addClass("ui-em_timepicker-positioned-top");listOffset.top=self.offset().top-list.outerHeight()+parseInt(list.css("marginTop").replace("px",""),10)}else{list.removeClass("ui-em_timepicker-positioned-top");listOffset.top=self.offset().top+self.outerHeight()+parseInt(list.css("marginTop").replace("px",""),10)}list.offset(listOffset);var selected=list.find(".ui-em_timepicker-selected");if(!selected.length){var timeInt=tp.time2int(tp._getTimeValue());if(timeInt!==null){selected=$(tp._findRow(timeInt))}else if(settings.scrollDefault){selected=$(tp._findRow(settings.scrollDefault()))}}if(!selected.length||selected.hasClass("ui-em_timepicker-disabled")){selected=list.find("li:not(.ui-em_timepicker-disabled):first")}if(selected&&selected.length){var topOffset=list.scrollTop()+selected.position().top-selected.outerHeight();list.scrollTop(topOffset)}else{list.scrollTop(0)}if(settings.stopScrollPropagation){$(document).on("wheel.ui-em_timepicker",".ui-em_timepicker-wrapper",function(e){e.preventDefault();var currentScroll=$(this).scrollTop();$(this).scrollTop(currentScroll+e.originalEvent.deltaY)})}$(document).on("mousedown.ui-em_timepicker",_closeHandler);$(window).on("resize.ui-em_timepicker",_closeHandler);if(settings.closeOnWindowScroll){$(document).on("scroll.ui-em_timepicker",_closeHandler)}self.trigger("showTimepicker");return this},hide:function hide(e){var tp=this[0].em_timepickerObj;if(tp){tp.hideMe()}Timepicker.hideAll();return this},option:function option(key,value){if(typeof key=="string"&&typeof value=="undefined"){var tp=this[0].em_timepickerObj;return tp.settings[key]}return this.each(function(){var self=$(this);var tp=self[0].em_timepickerObj;var settings=tp.settings;var list=tp.list;if(_typeof(key)=="object"){settings=$.extend(settings,key)}else if(typeof key=="string"){settings[key]=value}settings=tp.parseSettings(settings);tp.settings=settings;tp._formatValue({type:"change"},"initial");if(list){list.remove();tp.list=null}if(settings.useSelect){_render(self)}})},getSecondsFromMidnight:function getSecondsFromMidnight(){var tp=this[0].em_timepickerObj;return tp.time2int(tp._getTimeValue())},getTime:function getTime(relative_date){var tp=this[0].em_timepickerObj;var time_string=tp._getTimeValue();if(!time_string){return null}var offset=tp.time2int(time_string);if(offset===null){return null}if(!relative_date){relative_date=new Date}var time=new Date(relative_date);time.setHours(offset/3600);time.setMinutes(offset%3600/60);time.setSeconds(offset%60);time.setMilliseconds(0);return time},isVisible:function isVisible(){var tp=this[0].em_timepickerObj;return!!(tp&&tp.list&&Timepicker.isVisible(tp.list))},setTime:function setTime(value){var tp=this[0].em_timepickerObj;var settings=tp.settings;if(settings.forceRoundTime){var prettyTime=tp._roundAndFormatTime(tp.time2int(value))}else{var prettyTime=tp._int2time(tp.time2int(value))}if(value&&prettyTime===null&&settings.noneOption){prettyTime=value}tp._setTimeValue(prettyTime,"initial");tp._formatValue({type:"change"},"initial");if(tp&&tp.list){tp._setSelected()}return this},remove:function remove(){var self=this;if(!self.hasClass("ui-em_timepicker-input")){return}var tp=self[0].em_timepickerObj;var settings=tp.settings;self.removeAttr("autocomplete","off");self.removeClass("ui-em_timepicker-input");self.removeData("em_timepicker-obj");self.off(".em_timepicker");if(tp.list){tp.list.remove()}if(settings.useSelect){self.show()}tp.list=null;return this}};function _render(self){var tp=self[0].em_timepickerObj;var list=tp.list;var settings=tp.settings;if(list&&list.length){list.remove();tp.list=null}if(settings.useSelect){list=$("<select></select>",{class:"ui-em_timepicker-select"});if(self.attr("name")){list.attr("name","ui-em_timepicker-"+self.attr("name"))}var wrapped_list=list}else{list=$("<ul></ul>",{class:"ui-em_timepicker-list"});var wrapped_list=$("<div></div>",{class:"ui-em_timepicker-wrapper",tabindex:-1});wrapped_list.css({display:"none",position:"absolute"}).append(list)}if(settings.noneOption){if(settings.noneOption===true){settings.noneOption=settings.useSelect?"Time...":"None"}if($.isArray(settings.noneOption)){for(var i in settings.noneOption){if(parseInt(i,10)==i){var noneElement=tp._generateNoneElement(settings.noneOption[i],settings.useSelect);list.append(noneElement)}}}else{var noneElement=tp._generateNoneElement(settings.noneOption,settings.useSelect);list.append(noneElement)}}if(settings.className){wrapped_list.addClass(settings.className)}if((settings.minTime!==null||settings.durationTime!==null)&&settings.showDuration){var stepval=typeof settings.step=="function"?"function":settings.step;wrapped_list.addClass("ui-em_timepicker-with-duration");wrapped_list.addClass("ui-em_timepicker-step-"+settings.step)}var durStart=settings.minTime;if(typeof settings.durationTime==="function"){durStart=tp.time2int(settings.durationTime())}else if(settings.durationTime!==null){durStart=settings.durationTime}var start=settings.minTime!==null?settings.minTime:0;var end=settings.maxTime!==null?settings.maxTime:start+ONE_DAY-1;if(end<start){end+=ONE_DAY}if(end===ONE_DAY-1&&$.type(settings.timeFormat)==="string"&&settings.show2400){end=ONE_DAY}var dr=settings.disableTimeRanges;var drCur=0;var drLen=dr.length;var stepFunc=settings.step;if(typeof stepFunc!="function"){stepFunc=function stepFunc(){return settings.step}}for(var i=start,j=0;i<=end;j++,i+=stepFunc(j)*60){var timeInt=i;var timeString=tp._int2time(timeInt);if(settings.useSelect){var row=$("<option></option>",{value:timeString});row.text(timeString)}else{var row=$("<li></li>");row.addClass(timeInt%ONE_DAY<ONE_DAY/2?"ui-em_timepicker-am":"ui-em_timepicker-pm");row.attr("data-time",roundingFunction(timeInt,settings));row.text(timeString)}if((settings.minTime!==null||settings.durationTime!==null)&&settings.showDuration){var durationString=tp._int2duration(i-durStart,settings.step);if(settings.useSelect){row.text(row.text()+" ("+durationString+")")}else{var duration=$("<span></span>",{class:"ui-em_timepicker-duration"});duration.text(" ("+durationString+")");row.append(duration)}}if(drCur<drLen){if(timeInt>=dr[drCur][1]){drCur+=1}if(dr[drCur]&&timeInt>=dr[drCur][0]&&timeInt<dr[drCur][1]){if(settings.useSelect){row.prop("disabled",true)}else{row.addClass("ui-em_timepicker-disabled")}}}list.append(row)}wrapped_list.data("em_timepicker-input",self);tp.list=wrapped_list;if(settings.useSelect){if(self.val()){list.val(tp._roundAndFormatTime(tp.time2int(self.val())))}list.on("focus",function(){$(this).data("em_timepicker-input").trigger("showTimepicker")});list.on("blur",function(){$(this).data("em_timepicker-input").trigger("hideTimepicker")});list.on("change",function(){tp._setTimeValue($(this).val(),"select")});tp._setTimeValue(list.val(),"initial");self.hide().after(list)}else{var appendTo=settings.appendTo;if(typeof appendTo==="string"){appendTo=$(appendTo)}else if(typeof appendTo==="function"){appendTo=appendTo(self)}appendTo.append(wrapped_list);tp._setSelected();list.on("mousedown click","li",function(e){self.off("focus.em_timepicker");self.on("focus.em_timepicker-ie-hack",function(){self.off("focus.em_timepicker-ie-hack");self.on("focus.em_timepicker",methods.show)});if(!tp._hideKeyboard()){self[0].focus()}list.find("li").removeClass("ui-em_timepicker-selected");$(this).addClass("ui-em_timepicker-selected");if(tp._selectValue()){self.trigger("hideTimepicker");list.on("mouseup.em_timepicker click.em_timepicker","li",function(e){list.off("mouseup.em_timepicker click.em_timepicker");wrapped_list.hide()})}})}}function _closeHandler(e){if(e.target==window){return}var target=$(e.target);if(target.closest(".ui-em_timepicker-input").length||target.closest(".ui-em_timepicker-wrapper").length){return}Timepicker.hideAll();$(document).off(".ui-em_timepicker");$(window).off(".ui-em_timepicker")}function _keydownhandler(e){var self=$(this);var tp=self[0].em_timepickerObj;var list=tp.list;if(!list||!Timepicker.isVisible(list)){if(e.keyCode==40){methods.show.call(self.get(0));list=tp.list;if(!tp._hideKeyboard()){self.trigger("focus")}}else{return true}}switch(e.keyCode){case 13:if(tp._selectValue()){tp._formatValue({type:"change"});tp.hideMe()}e.preventDefault();return false;case 38:var selected=list.find(".ui-em_timepicker-selected");if(!selected.length){list.find("li").each(function(i,obj){if($(obj).position().top>0){selected=$(obj);return false}});selected.addClass("ui-em_timepicker-selected")}else if(!selected.is(":first-child")){selected.removeClass("ui-em_timepicker-selected");selected.prev().addClass("ui-em_timepicker-selected");if(selected.prev().position().top<selected.outerHeight()){list.scrollTop(list.scrollTop()-selected.outerHeight())}}return false;case 40:selected=list.find(".ui-em_timepicker-selected");if(selected.length===0){list.find("li").each(function(i,obj){if($(obj).position().top>0){selected=$(obj);return false}});selected.addClass("ui-em_timepicker-selected")}else if(!selected.is(":last-child")){selected.removeClass("ui-em_timepicker-selected");selected.next().addClass("ui-em_timepicker-selected");if(selected.next().position().top+2*selected.outerHeight()>list.outerHeight()){list.scrollTop(list.scrollTop()+selected.outerHeight())}}return false;case 27:list.find("li").removeClass("ui-em_timepicker-selected");tp.hideMe();break;case 9:tp.hideMe();break;default:return true}}$.fn.em_timepicker=function(method){if(!this.length)return this;if(methods[method]){if(!this.hasClass("ui-em_timepicker-input")){return this}return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(_typeof(method)==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist on jQuery.em_timepicker")}};$.fn.em_timepicker.defaults=DEFAULT_SETTINGS})})();

/*!
 * flatpickr v4.6.13,, @license MIT
 */
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=n()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var n,t=1,a=arguments.length;t<a;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function n(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var a=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],r=0,l=o.length;r<l;r++,i++)a[i]=o[r];return a}var t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],a={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o=function(e,n){return void 0===n&&(n=2),("000"+e).slice(-1*n)},r=function(e){return!0===e?1:0};function l(e,n){var t;return function(){var a=this,i=arguments;clearTimeout(t),t=setTimeout((function(){return e.apply(a,i)}),n)}}var c=function(e){return e instanceof Array?e:[e]};function s(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function d(e,n,t){var a=window.document.createElement(e);return n=n||"",t=t||"",a.className=n,void 0!==t&&(a.textContent=t),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,n){return n(e)?e:e.parentNode?f(e.parentNode,n):void 0}function m(e,n){var t=d("div","numInputWrapper"),a=d("input","numInput "+e),i=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var p=function(){},h=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},v={D:p,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*r(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:p,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:p,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},D={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},w={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[w.w(e,n,t)]},F:function(e,n,t){return h(w.n(e,n,t)-1,!1,n)},G:function(e,n,t){return o(w.h(e,n,t))},H:function(e){return o(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[r(e.getHours()>11)]},M:function(e,n){return h(e.getMonth(),!0,n)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},b=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,a){var i=a||r;return void 0===t.formatDate||c?n.split("").map((function(n,a,o){return w[n]&&"\\"!==o[a-1]?w[n](e,i,t):"\\"!==n?n:""})).join(""):t.formatDate(e,n,i)}},C=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o;return function(e,n,i,o){if(0===e||e){var l,c=o||r,s=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var d=n||(t||a).dateFormat,u=String(e).trim();if("today"===u)l=new Date,i=!0;else if(t&&t.parseDate)l=t.parseDate(e,d);else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else{for(var f=void 0,m=[],g=0,p=0,h="";g<d.length;g++){var w=d[g],b="\\"===w,C="\\"===d[g-1]||b;if(D[w]&&!C){h+=D[w];var M=new RegExp(h).exec(e);M&&(f=!0)&&m["Y"!==w?"push":"unshift"]({fn:v[w],val:M[++p]})}else b||(h+=".")}l=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),m.forEach((function(e){var n=e.fn,t=e.val;return l=n(l,t,c)||l})),l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===i&&l.setHours(0,0,0,0),l;t.errorHandler(new Error("Invalid date provided: "+s))}}};function M(e,n,t){return void 0===t&&(t=!0),!1!==t?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}var y=function(e,n,t){return 3600*e+60*n+t},x=864e5;function E(e){var n=e.defaultHour,t=e.defaultMinute,a=e.defaultSeconds;if(void 0!==e.minDate){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),r=e.minDate.getSeconds();n<i&&(n=i),n===i&&t<o&&(t=o),n===i&&t===o&&a<r&&(a=e.minDate.getSeconds())}if(void 0!==e.maxDate){var l=e.maxDate.getHours(),c=e.maxDate.getMinutes();(n=Math.min(n,l))===l&&(t=Math.min(c,t)),n===l&&t===c&&(a=e.maxDate.getSeconds())}return{hours:n,minutes:t,seconds:a}}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(n){n&&Object.keys(n).forEach((function(t){return e[t]=n[t]}))},i=0,o=n;i<o.length;i++){var r=o[i];a(r)}return e});function k(p,v){var w={config:e(e({},a),I.defaultConfig),l10n:i};function k(){var e;return(null===(e=w.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function T(e){return e.bind(w)}function S(){var e=w.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==w.calendarContainer&&(w.calendarContainer.style.visibility="hidden",w.calendarContainer.style.display="block"),void 0!==w.daysContainer){var n=(w.days.offsetWidth+1)*e.showMonths;w.daysContainer.style.width=n+"px",w.calendarContainer.style.width=n+(void 0!==w.weekWrapper?w.weekWrapper.offsetWidth:0)+"px",w.calendarContainer.style.removeProperty("visibility"),w.calendarContainer.style.removeProperty("display")}}))}function _(e){if(0===w.selectedDates.length){var n=void 0===w.config.minDate||M(new Date,w.config.minDate)>=0?new Date:new Date(w.config.minDate.getTime()),t=E(w.config);n.setHours(t.hours,t.minutes,t.seconds,n.getMilliseconds()),w.selectedDates=[n],w.latestSelectedDateObj=n}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var n="keydown"===e.type,t=g(e),a=t;void 0!==w.amPM&&t===w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]);var i=parseFloat(a.getAttribute("min")),l=parseFloat(a.getAttribute("max")),c=parseFloat(a.getAttribute("step")),s=parseInt(a.value,10),d=e.delta||(n?38===e.which?1:-1:0),u=s+c*d;if(void 0!==a.value&&2===a.value.length){var f=a===w.hourElement,m=a===w.minuteElement;u<i?(u=l+u+r(!f)+(r(f)&&r(!w.amPM)),m&&L(void 0,-1,w.hourElement)):u>l&&(u=a===w.hourElement?u-l-r(!w.amPM):i,m&&L(void 0,1,w.hourElement)),w.amPM&&f&&(1===c?u+s===23:Math.abs(u-s)>c)&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]),a.value=o(u)}}(e);var a=w._input.value;O(),ye(),w._input.value!==a&&w._debouncedChange()}function O(){if(void 0!==w.hourElement&&void 0!==w.minuteElement){var e,n,t=(parseInt(w.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(w.minuteElement.value,10)||0)%60,i=void 0!==w.secondElement?(parseInt(w.secondElement.value,10)||0)%60:0;void 0!==w.amPM&&(e=t,n=w.amPM.textContent,t=e%12+12*r(n===w.l10n.amPM[1]));var o=void 0!==w.config.minTime||w.config.minDate&&w.minDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.minDate,!0),l=void 0!==w.config.maxTime||w.config.maxDate&&w.maxDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.maxDate,!0);if(void 0!==w.config.maxTime&&void 0!==w.config.minTime&&w.config.minTime>w.config.maxTime){var c=y(w.config.minTime.getHours(),w.config.minTime.getMinutes(),w.config.minTime.getSeconds()),s=y(w.config.maxTime.getHours(),w.config.maxTime.getMinutes(),w.config.maxTime.getSeconds()),d=y(t,a,i);if(d>s&&d<c){var u=function(e){var n=Math.floor(e/3600),t=(e-3600*n)/60;return[n,t,e-3600*n-60*t]}(c);t=u[0],a=u[1],i=u[2]}}else{if(l){var f=void 0!==w.config.maxTime?w.config.maxTime:w.config.maxDate;(t=Math.min(t,f.getHours()))===f.getHours()&&(a=Math.min(a,f.getMinutes())),a===f.getMinutes()&&(i=Math.min(i,f.getSeconds()))}if(o){var m=void 0!==w.config.minTime?w.config.minTime:w.config.minDate;(t=Math.max(t,m.getHours()))===m.getHours()&&a<m.getMinutes()&&(a=m.getMinutes()),a===m.getMinutes()&&(i=Math.max(i,m.getSeconds()))}}A(t,a,i)}}function F(e){var n=e||w.latestSelectedDateObj;n&&n instanceof Date&&A(n.getHours(),n.getMinutes(),n.getSeconds())}function A(e,n,t){void 0!==w.latestSelectedDateObj&&w.latestSelectedDateObj.setHours(e%24,n,t||0,0),w.hourElement&&w.minuteElement&&!w.isMobile&&(w.hourElement.value=o(w.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),w.minuteElement.value=o(n),void 0!==w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(e>=12)]),void 0!==w.secondElement&&(w.secondElement.value=o(t)))}function N(e){var n=g(e),t=parseInt(n.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&ee(t)}function P(e,n,t,a){return n instanceof Array?n.forEach((function(n){return P(e,n,t,a)})):e instanceof Array?e.forEach((function(e){return P(e,n,t,a)})):(e.addEventListener(n,t,a),void w._handlers.push({remove:function(){return e.removeEventListener(n,t,a)}}))}function Y(){De("onChange")}function j(e,n){var t=void 0!==e?w.parseDate(e):w.latestSelectedDateObj||(w.config.minDate&&w.config.minDate>w.now?w.config.minDate:w.config.maxDate&&w.config.maxDate<w.now?w.config.maxDate:w.now),a=w.currentYear,i=w.currentMonth;try{void 0!==t&&(w.currentYear=t.getFullYear(),w.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,w.config.errorHandler(e)}n&&w.currentYear!==a&&(De("onYearChange"),q()),!n||w.currentYear===a&&w.currentMonth===i||De("onMonthChange"),w.redraw()}function H(e){var n=g(e);~n.className.indexOf("arrow")&&L(e,n.classList.contains("arrowUp")?1:-1)}function L(e,n,t){var a=e&&g(e),i=t||a&&a.parentNode&&a.parentNode.firstChild,o=we("increment");o.delta=n,i&&i.dispatchEvent(o)}function R(e,n,t,a){var i=ne(n,!0),o=d("span",e,n.getDate().toString());return o.dateObj=n,o.$i=a,o.setAttribute("aria-label",w.formatDate(n,w.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===M(n,w.now)&&(w.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,be(n)&&(o.classList.add("selected"),w.selectedDateElem=o,"range"===w.config.mode&&(s(o,"startRange",w.selectedDates[0]&&0===M(n,w.selectedDates[0],!0)),s(o,"endRange",w.selectedDates[1]&&0===M(n,w.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===w.config.mode&&function(e){return!("range"!==w.config.mode||w.selectedDates.length<2)&&(M(e,w.selectedDates[0])>=0&&M(e,w.selectedDates[1])<=0)}(n)&&!be(n)&&o.classList.add("inRange"),w.weekNumbers&&1===w.config.showMonths&&"prevMonthDay"!==e&&a%7==6&&w.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+w.config.getWeek(n)+"</span>"),De("onDayCreate",o),o}function W(e){e.focus(),"range"===w.config.mode&&oe(e)}function B(e){for(var n=e>0?0:w.config.showMonths-1,t=e>0?w.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=w.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&ne(c.dateObj))return c}}function J(e,n){var t=k(),a=te(t||document.body),i=void 0!==e?e:a?t:void 0!==w.selectedDateElem&&te(w.selectedDateElem)?w.selectedDateElem:void 0!==w.todayDateElem&&te(w.todayDateElem)?w.todayDateElem:B(n>0?1:-1);void 0===i?w._input.focus():a?function(e,n){for(var t=-1===e.className.indexOf("Month")?e.dateObj.getMonth():w.currentMonth,a=n>0?w.config.showMonths:-1,i=n>0?1:-1,o=t-w.currentMonth;o!=a;o+=i)for(var r=w.daysContainer.children[o],l=t-w.currentMonth===o?e.$i+n:n<0?r.children.length-1:0,c=r.children.length,s=l;s>=0&&s<c&&s!=(n>0?c:-1);s+=i){var d=r.children[s];if(-1===d.className.indexOf("hidden")&&ne(d.dateObj)&&Math.abs(e.$i-s)>=Math.abs(n))return W(d)}w.changeMonth(i),J(B(i),0)}(i,n):W(i)}function K(e,n){for(var t=(new Date(e,n,1).getDay()-w.l10n.firstDayOfWeek+7)%7,a=w.utils.getDaysInMonth((n-1+12)%12,e),i=w.utils.getDaysInMonth(n,e),o=window.document.createDocumentFragment(),r=w.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-t,u=0;s<=a;s++,u++)o.appendChild(R("flatpickr-day "+l,new Date(e,n-1,s),0,u));for(s=1;s<=i;s++,u++)o.appendChild(R("flatpickr-day",new Date(e,n,s),0,u));for(var f=i+1;f<=42-t&&(1===w.config.showMonths||u%7!=0);f++,u++)o.appendChild(R("flatpickr-day "+c,new Date(e,n+1,f%i),0,u));var m=d("div","dayContainer");return m.appendChild(o),m}function U(){if(void 0!==w.daysContainer){u(w.daysContainer),w.weekNumbers&&u(w.weekNumbers);for(var e=document.createDocumentFragment(),n=0;n<w.config.showMonths;n++){var t=new Date(w.currentYear,w.currentMonth,1);t.setMonth(w.currentMonth+n),e.appendChild(K(t.getFullYear(),t.getMonth()))}w.daysContainer.appendChild(e),w.days=w.daysContainer.firstChild,"range"===w.config.mode&&1===w.selectedDates.length&&oe()}}function q(){if(!(w.config.showMonths>1||"dropdown"!==w.config.monthSelectorType)){var e=function(e){return!(void 0!==w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&e<w.config.minDate.getMonth())&&!(void 0!==w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()&&e>w.config.maxDate.getMonth())};w.monthsDropdownContainer.tabIndex=-1,w.monthsDropdownContainer.innerHTML="";for(var n=0;n<12;n++)if(e(n)){var t=d("option","flatpickr-monthDropdown-month");t.value=new Date(w.currentYear,n).getMonth().toString(),t.textContent=h(n,w.config.shorthandCurrentMonth,w.l10n),t.tabIndex=-1,w.currentMonth===n&&(t.selected=!0),w.monthsDropdownContainer.appendChild(t)}}}function $(){var e,n=d("div","flatpickr-month"),t=window.document.createDocumentFragment();w.config.showMonths>1||"static"===w.config.monthSelectorType?e=d("span","cur-month"):(w.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),w.monthsDropdownContainer.setAttribute("aria-label",w.l10n.monthAriaLabel),P(w.monthsDropdownContainer,"change",(function(e){var n=g(e),t=parseInt(n.value,10);w.changeMonth(t-w.currentMonth),De("onMonthChange")})),q(),e=w.monthsDropdownContainer);var a=m("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",w.l10n.yearAriaLabel),w.config.minDate&&i.setAttribute("min",w.config.minDate.getFullYear().toString()),w.config.maxDate&&(i.setAttribute("max",w.config.maxDate.getFullYear().toString()),i.disabled=!!w.config.minDate&&w.config.minDate.getFullYear()===w.config.maxDate.getFullYear());var o=d("div","flatpickr-current-month");return o.appendChild(e),o.appendChild(a),t.appendChild(o),n.appendChild(t),{container:n,yearElement:i,monthElement:e}}function V(){u(w.monthNav),w.monthNav.appendChild(w.prevMonthNav),w.config.showMonths&&(w.yearElements=[],w.monthElements=[]);for(var e=w.config.showMonths;e--;){var n=$();w.yearElements.push(n.yearElement),w.monthElements.push(n.monthElement),w.monthNav.appendChild(n.container)}w.monthNav.appendChild(w.nextMonthNav)}function z(){w.weekdayContainer?u(w.weekdayContainer):w.weekdayContainer=d("div","flatpickr-weekdays");for(var e=w.config.showMonths;e--;){var n=d("div","flatpickr-weekdaycontainer");w.weekdayContainer.appendChild(n)}return G(),w.weekdayContainer}function G(){if(w.weekdayContainer){var e=w.l10n.firstDayOfWeek,t=n(w.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=n(t.splice(e,t.length),t.splice(0,e)));for(var a=w.config.showMonths;a--;)w.weekdayContainer.children[a].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function Z(e,n){void 0===n&&(n=!0);var t=n?e:e-w.currentMonth;t<0&&!0===w._hidePrevMonthArrow||t>0&&!0===w._hideNextMonthArrow||(w.currentMonth+=t,(w.currentMonth<0||w.currentMonth>11)&&(w.currentYear+=w.currentMonth>11?1:-1,w.currentMonth=(w.currentMonth+12)%12,De("onYearChange"),q()),U(),De("onMonthChange"),Ce())}function Q(e){return w.calendarContainer.contains(e)}function X(e){if(w.isOpen&&!w.config.inline){var n=g(e),t=Q(n),a=!(n===w.input||n===w.altInput||w.element.contains(n)||e.path&&e.path.indexOf&&(~e.path.indexOf(w.input)||~e.path.indexOf(w.altInput)))&&!t&&!Q(e.relatedTarget),i=!w.config.ignoredFocusElements.some((function(e){return e.contains(n)}));a&&i&&(w.config.allowInput&&w.setDate(w._input.value,!1,w.config.altInput?w.config.altFormat:w.config.dateFormat),void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement&&""!==w.input.value&&void 0!==w.input.value&&_(),w.close(),w.config&&"range"===w.config.mode&&1===w.selectedDates.length&&w.clear(!1))}}function ee(e){if(!(!e||w.config.minDate&&e<w.config.minDate.getFullYear()||w.config.maxDate&&e>w.config.maxDate.getFullYear())){var n=e,t=w.currentYear!==n;w.currentYear=n||w.currentYear,w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth=Math.min(w.config.maxDate.getMonth(),w.currentMonth):w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&(w.currentMonth=Math.max(w.config.minDate.getMonth(),w.currentMonth)),t&&(w.redraw(),De("onYearChange"),q())}}function ne(e,n){var t;void 0===n&&(n=!0);var a=w.parseDate(e,void 0,n);if(w.config.minDate&&a&&M(a,w.config.minDate,void 0!==n?n:!w.minDateHasTime)<0||w.config.maxDate&&a&&M(a,w.config.maxDate,void 0!==n?n:!w.maxDateHasTime)>0)return!1;if(!w.config.enable&&0===w.config.disable.length)return!0;if(void 0===a)return!1;for(var i=!!w.config.enable,o=null!==(t=w.config.enable)&&void 0!==t?t:w.config.disable,r=0,l=void 0;r<o.length;r++){if("function"==typeof(l=o[r])&&l(a))return i;if(l instanceof Date&&void 0!==a&&l.getTime()===a.getTime())return i;if("string"==typeof l){var c=w.parseDate(l,void 0,!0);return c&&c.getTime()===a.getTime()?i:!i}if("object"==typeof l&&void 0!==a&&l.from&&l.to&&a.getTime()>=l.from.getTime()&&a.getTime()<=l.to.getTime())return i}return!i}function te(e){return void 0!==w.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&w.daysContainer.contains(e))}function ae(e){var n=e.target===w._input,t=w._input.value.trimEnd()!==Me();!n||!t||e.relatedTarget&&Q(e.relatedTarget)||w.setDate(w._input.value,!0,e.target===w.altInput?w.config.altFormat:w.config.dateFormat)}function ie(e){var n=g(e),t=w.config.wrap?p.contains(n):n===w._input,a=w.config.allowInput,i=w.isOpen&&(!a||!t),o=w.config.inline&&t&&!a;if(13===e.keyCode&&t){if(a)return w.setDate(w._input.value,!0,n===w.altInput?w.config.altFormat:w.config.dateFormat),w.close(),n.blur();w.open()}else if(Q(n)||i||o){var r=!!w.timeContainer&&w.timeContainer.contains(n);switch(e.keyCode){case 13:r?(e.preventDefault(),_(),fe()):me(e);break;case 27:e.preventDefault(),fe();break;case 8:case 46:t&&!w.config.allowInput&&(e.preventDefault(),w.clear());break;case 37:case 39:if(r||t)w.hourElement&&w.hourElement.focus();else{e.preventDefault();var l=k();if(void 0!==w.daysContainer&&(!1===a||l&&te(l))){var c=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),Z(c),J(B(1),0)):J(void 0,c)}}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;w.daysContainer&&void 0!==n.$i||n===w.input||n===w.altInput?e.ctrlKey?(e.stopPropagation(),ee(w.currentYear-s),J(B(1),0)):r||J(void 0,7*s):n===w.currentYearElement?ee(w.currentYear-s):w.config.enableTime&&(!r&&w.hourElement&&w.hourElement.focus(),_(e),w._debouncedChange());break;case 9:if(r){var d=[w.hourElement,w.minuteElement,w.secondElement,w.amPM].concat(w.pluginElements).filter((function(e){return e})),u=d.indexOf(n);if(-1!==u){var f=d[u+(e.shiftKey?-1:1)];e.preventDefault(),(f||w._input).focus()}}else!w.config.noCalendar&&w.daysContainer&&w.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),w._input.focus())}}if(void 0!==w.amPM&&n===w.amPM)switch(e.key){case w.l10n.amPM[0].charAt(0):case w.l10n.amPM[0].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[0],O(),ye();break;case w.l10n.amPM[1].charAt(0):case w.l10n.amPM[1].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[1],O(),ye()}(t||Q(n))&&De("onKeyDown",e)}function oe(e,n){if(void 0===n&&(n="flatpickr-day"),1===w.selectedDates.length&&(!e||e.classList.contains(n)&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():w.days.firstElementChild.dateObj.getTime(),a=w.parseDate(w.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,w.selectedDates[0].getTime()),o=Math.max(t,w.selectedDates[0].getTime()),r=!1,l=0,c=0,s=i;s<o;s+=x)ne(new Date(s),!0)||(r=r||s>i&&s<o,s<a&&(!l||s>l)?l=s:s>a&&(!c||s<c)&&(c=s));Array.from(w.rContainer.querySelectorAll("*:nth-child(-n+"+w.config.showMonths+") > ."+n)).forEach((function(n){var i,o,s,d=n.dateObj.getTime(),u=l>0&&d<l||c>0&&d>c;if(u)return n.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){n.classList.remove(e)}));r&&!u||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){n.classList.remove(e)})),void 0!==e&&(e.classList.add(t<=w.selectedDates[0].getTime()?"startRange":"endRange"),a<t&&d===a?n.classList.add("startRange"):a>t&&d===a&&n.classList.add("endRange"),d>=l&&(0===c||d<=c)&&(o=a,s=t,(i=d)>Math.min(o,s)&&i<Math.max(o,s))&&n.classList.add("inRange")))}))}}function re(){!w.isOpen||w.config.static||w.config.inline||de()}function le(e){return function(n){var t=w.config["_"+e+"Date"]=w.parseDate(n,w.config.dateFormat),a=w.config["_"+("min"===e?"max":"min")+"Date"];void 0!==t&&(w["min"===e?"minDateHasTime":"maxDateHasTime"]=t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0),w.selectedDates&&(w.selectedDates=w.selectedDates.filter((function(e){return ne(e)})),w.selectedDates.length||"min"!==e||F(t),ye()),w.daysContainer&&(ue(),void 0!==t?w.currentYearElement[e]=t.getFullYear().toString():w.currentYearElement.removeAttribute(e),w.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear())}}function ce(){return w.config.wrap?p.querySelector("[data-input]"):p}function se(){"object"!=typeof w.config.locale&&void 0===I.l10ns[w.config.locale]&&w.config.errorHandler(new Error("flatpickr: invalid locale "+w.config.locale)),w.l10n=e(e({},I.l10ns.default),"object"==typeof w.config.locale?w.config.locale:"default"!==w.config.locale?I.l10ns[w.config.locale]:void 0),D.D="("+w.l10n.weekdays.shorthand.join("|")+")",D.l="("+w.l10n.weekdays.longhand.join("|")+")",D.M="("+w.l10n.months.shorthand.join("|")+")",D.F="("+w.l10n.months.longhand.join("|")+")",D.K="("+w.l10n.amPM[0]+"|"+w.l10n.amPM[1]+"|"+w.l10n.amPM[0].toLowerCase()+"|"+w.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(p.dataset||{}))).time_24hr&&void 0===I.defaultConfig.time_24hr&&(w.config.time_24hr=w.l10n.time_24hr),w.formatDate=b(w),w.parseDate=C({config:w.config,l10n:w.l10n})}function de(e){if("function"!=typeof w.config.position){if(void 0!==w.calendarContainer){De("onPreCalendarPosition");var n=e||w._positionElement,t=Array.prototype.reduce.call(w.calendarContainer.children,(function(e,n){return e+n.offsetHeight}),0),a=w.calendarContainer.offsetWidth,i=w.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,l=n.getBoundingClientRect(),c=window.innerHeight-l.bottom,d="above"===o||"below"!==o&&c<t&&l.top>t,u=window.pageYOffset+l.top+(d?-t-2:n.offsetHeight+2);if(s(w.calendarContainer,"arrowTop",!d),s(w.calendarContainer,"arrowBottom",d),!w.config.inline){var f=window.pageXOffset+l.left,m=!1,g=!1;"center"===r?(f-=(a-l.width)/2,m=!0):"right"===r&&(f-=a-l.width,g=!0),s(w.calendarContainer,"arrowLeft",!m&&!g),s(w.calendarContainer,"arrowCenter",m),s(w.calendarContainer,"arrowRight",g);var p=window.document.body.offsetWidth-(window.pageXOffset+l.right),h=f+a>window.document.body.offsetWidth,v=p+a>window.document.body.offsetWidth;if(s(w.calendarContainer,"rightMost",h),!w.config.static)if(w.calendarContainer.style.top=u+"px",h)if(v){var D=function(){for(var e=null,n=0;n<document.styleSheets.length;n++){var t=document.styleSheets[n];if(t.cssRules){try{t.cssRules}catch(e){continue}e=t;break}}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===D)return;var b=window.document.body.offsetWidth,C=Math.max(0,b/2-a/2),M=D.cssRules.length,y="{left:"+l.left+"px;right:auto;}";s(w.calendarContainer,"rightMost",!1),s(w.calendarContainer,"centerMost",!0),D.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+y,M),w.calendarContainer.style.left=C+"px",w.calendarContainer.style.right="auto"}else w.calendarContainer.style.left="auto",w.calendarContainer.style.right=p+"px";else w.calendarContainer.style.left=f+"px",w.calendarContainer.style.right="auto"}}}else w.config.position(w,e)}function ue(){w.config.noCalendar||w.isMobile||(q(),Ce(),U())}function fe(){w._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(w.close,0):w.close()}function me(e){e.preventDefault(),e.stopPropagation();var n=f(g(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==n){var t=n,a=w.latestSelectedDateObj=new Date(t.dateObj.getTime()),i=(a.getMonth()<w.currentMonth||a.getMonth()>w.currentMonth+w.config.showMonths-1)&&"range"!==w.config.mode;if(w.selectedDateElem=t,"single"===w.config.mode)w.selectedDates=[a];else if("multiple"===w.config.mode){var o=be(a);o?w.selectedDates.splice(parseInt(o),1):w.selectedDates.push(a)}else"range"===w.config.mode&&(2===w.selectedDates.length&&w.clear(!1,!1),w.latestSelectedDateObj=a,w.selectedDates.push(a),0!==M(a,w.selectedDates[0],!0)&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()})));if(O(),i){var r=w.currentYear!==a.getFullYear();w.currentYear=a.getFullYear(),w.currentMonth=a.getMonth(),r&&(De("onYearChange"),q()),De("onMonthChange")}if(Ce(),U(),ye(),i||"range"===w.config.mode||1!==w.config.showMonths?void 0!==w.selectedDateElem&&void 0===w.hourElement&&w.selectedDateElem&&w.selectedDateElem.focus():W(t),void 0!==w.hourElement&&void 0!==w.hourElement&&w.hourElement.focus(),w.config.closeOnSelect){var l="single"===w.config.mode&&!w.config.enableTime,c="range"===w.config.mode&&2===w.selectedDates.length&&!w.config.enableTime;(l||c)&&fe()}Y()}}w.parseDate=C({config:w.config,l10n:w.l10n}),w._handlers=[],w.pluginElements=[],w.loadedPlugins=[],w._bind=P,w._setHoursFromDate=F,w._positionCalendar=de,w.changeMonth=Z,w.changeYear=ee,w.clear=function(e,n){void 0===e&&(e=!0);void 0===n&&(n=!0);w.input.value="",void 0!==w.altInput&&(w.altInput.value="");void 0!==w.mobileInput&&(w.mobileInput.value="");w.selectedDates=[],w.latestSelectedDateObj=void 0,!0===n&&(w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth());if(!0===w.config.enableTime){var t=E(w.config),a=t.hours,i=t.minutes,o=t.seconds;A(a,i,o)}w.redraw(),e&&De("onChange")},w.close=function(){w.isOpen=!1,w.isMobile||(void 0!==w.calendarContainer&&w.calendarContainer.classList.remove("open"),void 0!==w._input&&w._input.classList.remove("active"));De("onClose")},w.onMouseOver=oe,w._createElement=d,w.createDay=R,w.destroy=function(){void 0!==w.config&&De("onDestroy");for(var e=w._handlers.length;e--;)w._handlers[e].remove();if(w._handlers=[],w.mobileInput)w.mobileInput.parentNode&&w.mobileInput.parentNode.removeChild(w.mobileInput),w.mobileInput=void 0;else if(w.calendarContainer&&w.calendarContainer.parentNode)if(w.config.static&&w.calendarContainer.parentNode){var n=w.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else w.calendarContainer.parentNode.removeChild(w.calendarContainer);w.altInput&&(w.input.type="text",w.altInput.parentNode&&w.altInput.parentNode.removeChild(w.altInput),delete w.altInput);w.input&&(w.input.type=w.input._type,w.input.classList.remove("flatpickr-input"),w.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete w[e]}catch(e){}}))},w.isEnabled=ne,w.jumpToDate=j,w.updateValue=ye,w.open=function(e,n){void 0===n&&(n=w._positionElement);if(!0===w.isMobile){if(e){e.preventDefault();var t=g(e);t&&t.blur()}return void 0!==w.mobileInput&&(w.mobileInput.focus(),w.mobileInput.click()),void De("onOpen")}if(w._input.disabled||w.config.inline)return;var a=w.isOpen;w.isOpen=!0,a||(w.calendarContainer.classList.add("open"),w._input.classList.add("active"),De("onOpen"),de(n));!0===w.config.enableTime&&!0===w.config.noCalendar&&(!1!==w.config.allowInput||void 0!==e&&w.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return w.hourElement.select()}),50))},w.redraw=ue,w.set=function(e,n){if(null!==e&&"object"==typeof e)for(var a in Object.assign(w.config,e),e)void 0!==ge[a]&&ge[a].forEach((function(e){return e()}));else w.config[e]=n,void 0!==ge[e]?ge[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(w.config[e]=c(n));w.redraw(),ye(!0)},w.setDate=function(e,n,t){void 0===n&&(n=!1);void 0===t&&(t=w.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return w.clear(n);pe(e,t),w.latestSelectedDateObj=w.selectedDates[w.selectedDates.length-1],w.redraw(),j(void 0,n),F(),0===w.selectedDates.length&&w.clear(!1);ye(n),n&&De("onChange")},w.toggle=function(e){if(!0===w.isOpen)return w.close();w.open(e)};var ge={locale:[se,G],showMonths:[V,S,z],minDate:[j],maxDate:[j],positionElement:[ve],clickOpens:[function(){!0===w.config.clickOpens?(P(w._input,"focus",w.open),P(w._input,"click",w.open)):(w._input.removeEventListener("focus",w.open),w._input.removeEventListener("click",w.open))}]};function pe(e,n){var t=[];if(e instanceof Array)t=e.map((function(e){return w.parseDate(e,n)}));else if(e instanceof Date||"number"==typeof e)t=[w.parseDate(e,n)];else if("string"==typeof e)switch(w.config.mode){case"single":case"time":t=[w.parseDate(e,n)];break;case"multiple":t=e.split(w.config.conjunction).map((function(e){return w.parseDate(e,n)}));break;case"range":t=e.split(w.l10n.rangeSeparator).map((function(e){return w.parseDate(e,n)}))}else w.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));w.selectedDates=w.config.allowInvalidPreload?t:t.filter((function(e){return e instanceof Date&&ne(e,!1)})),"range"===w.config.mode&&w.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()}))}function he(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?w.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:w.parseDate(e.from,void 0),to:w.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function ve(){w._positionElement=w.config.positionElement||w._input}function De(e,n){if(void 0!==w.config){var t=w.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a<t.length;a++)t[a](w.selectedDates,w.input.value,w,n);"onChange"===e&&(w.input.dispatchEvent(we("change")),w.input.dispatchEvent(we("input")))}}function we(e){var n=document.createEvent("Event");return n.initEvent(e,!0,!0),n}function be(e){for(var n=0;n<w.selectedDates.length;n++){var t=w.selectedDates[n];if(t instanceof Date&&0===M(t,e))return""+n}return!1}function Ce(){w.config.noCalendar||w.isMobile||!w.monthNav||(w.yearElements.forEach((function(e,n){var t=new Date(w.currentYear,w.currentMonth,1);t.setMonth(w.currentMonth+n),w.config.showMonths>1||"static"===w.config.monthSelectorType?w.monthElements[n].textContent=h(t.getMonth(),w.config.shorthandCurrentMonth,w.l10n)+" ":w.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()})),w._hidePrevMonthArrow=void 0!==w.config.minDate&&(w.currentYear===w.config.minDate.getFullYear()?w.currentMonth<=w.config.minDate.getMonth():w.currentYear<w.config.minDate.getFullYear()),w._hideNextMonthArrow=void 0!==w.config.maxDate&&(w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth+1>w.config.maxDate.getMonth():w.currentYear>w.config.maxDate.getFullYear()))}function Me(e){var n=e||(w.config.altInput?w.config.altFormat:w.config.dateFormat);return w.selectedDates.map((function(e){return w.formatDate(e,n)})).filter((function(e,n,t){return"range"!==w.config.mode||w.config.enableTime||t.indexOf(e)===n})).join("range"!==w.config.mode?w.config.conjunction:w.l10n.rangeSeparator)}function ye(e){void 0===e&&(e=!0),void 0!==w.mobileInput&&w.mobileFormatStr&&(w.mobileInput.value=void 0!==w.latestSelectedDateObj?w.formatDate(w.latestSelectedDateObj,w.mobileFormatStr):""),w.input.value=Me(w.config.dateFormat),void 0!==w.altInput&&(w.altInput.value=Me(w.config.altFormat)),!1!==e&&De("onValueUpdate")}function xe(e){var n=g(e),t=w.prevMonthNav.contains(n),a=w.nextMonthNav.contains(n);t||a?Z(t?-1:1):w.yearElements.indexOf(n)>=0?n.select():n.classList.contains("arrowUp")?w.changeYear(w.currentYear+1):n.classList.contains("arrowDown")&&w.changeYear(w.currentYear-1)}return function(){w.element=w.input=p,w.isOpen=!1,function(){var n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=e(e({},JSON.parse(JSON.stringify(p.dataset||{}))),v),o={};w.config.parseDate=i.parseDate,w.config.formatDate=i.formatDate,Object.defineProperty(w.config,"enable",{get:function(){return w.config._enable},set:function(e){w.config._enable=he(e)}}),Object.defineProperty(w.config,"disable",{get:function(){return w.config._disable},set:function(e){w.config._disable=he(e)}});var r="time"===i.mode;if(!i.dateFormat&&(i.enableTime||r)){var l=I.defaultConfig.dateFormat||a.dateFormat;o.dateFormat=i.noCalendar||r?"H:i"+(i.enableSeconds?":S":""):l+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||r)&&!i.altFormat){var s=I.defaultConfig.altFormat||a.altFormat;o.altFormat=i.noCalendar||r?"h:i"+(i.enableSeconds?":S K":" K"):s+" h:i"+(i.enableSeconds?":S":"")+" K"}Object.defineProperty(w.config,"minDate",{get:function(){return w.config._minDate},set:le("min")}),Object.defineProperty(w.config,"maxDate",{get:function(){return w.config._maxDate},set:le("max")});var d=function(e){return function(n){w.config["min"===e?"_minTime":"_maxTime"]=w.parseDate(n,"H:i:S")}};Object.defineProperty(w.config,"minTime",{get:function(){return w.config._minTime},set:d("min")}),Object.defineProperty(w.config,"maxTime",{get:function(){return w.config._maxTime},set:d("max")}),"time"===i.mode&&(w.config.noCalendar=!0,w.config.enableTime=!0);Object.assign(w.config,o,i);for(var u=0;u<n.length;u++)w.config[n[u]]=!0===w.config[n[u]]||"true"===w.config[n[u]];t.filter((function(e){return void 0!==w.config[e]})).forEach((function(e){w.config[e]=c(w.config[e]||[]).map(T)})),w.isMobile=!w.config.disableMobile&&!w.config.inline&&"single"===w.config.mode&&!w.config.disable.length&&!w.config.enable&&!w.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(u=0;u<w.config.plugins.length;u++){var f=w.config.plugins[u](w)||{};for(var m in f)t.indexOf(m)>-1?w.config[m]=c(f[m]).map(T).concat(w.config[m]):void 0===i[m]&&(w.config[m]=f[m])}i.altInputClass||(w.config.altInputClass=ce().className+" "+w.config.altInputClass);De("onParseConfig")}(),se(),function(){if(w.input=ce(),!w.input)return void w.config.errorHandler(new Error("Invalid input element specified"));w.input._type=w.input.type,w.input.type="text",w.input.classList.add("flatpickr-input"),w._input=w.input,w.config.altInput&&(w.altInput=d(w.input.nodeName,w.config.altInputClass),w._input=w.altInput,w.altInput.placeholder=w.input.placeholder,w.altInput.disabled=w.input.disabled,w.altInput.required=w.input.required,w.altInput.tabIndex=w.input.tabIndex,w.altInput.type="text",w.input.setAttribute("type","hidden"),!w.config.static&&w.input.parentNode&&w.input.parentNode.insertBefore(w.altInput,w.input.nextSibling));w.config.allowInput||w._input.setAttribute("readonly","readonly");ve()}(),function(){w.selectedDates=[],w.now=w.parseDate(w.config.now)||new Date;var e=w.config.defaultDate||("INPUT"!==w.input.nodeName&&"TEXTAREA"!==w.input.nodeName||!w.input.placeholder||w.input.value!==w.input.placeholder?w.input.value:null);e&&pe(e,w.config.dateFormat);w._initialDate=w.selectedDates.length>0?w.selectedDates[0]:w.config.minDate&&w.config.minDate.getTime()>w.now.getTime()?w.config.minDate:w.config.maxDate&&w.config.maxDate.getTime()<w.now.getTime()?w.config.maxDate:w.now,w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth(),w.selectedDates.length>0&&(w.latestSelectedDateObj=w.selectedDates[0]);void 0!==w.config.minTime&&(w.config.minTime=w.parseDate(w.config.minTime,"H:i"));void 0!==w.config.maxTime&&(w.config.maxTime=w.parseDate(w.config.maxTime,"H:i"));w.minDateHasTime=!!w.config.minDate&&(w.config.minDate.getHours()>0||w.config.minDate.getMinutes()>0||w.config.minDate.getSeconds()>0),w.maxDateHasTime=!!w.config.maxDate&&(w.config.maxDate.getHours()>0||w.config.maxDate.getMinutes()>0||w.config.maxDate.getSeconds()>0)}(),w.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=w.currentMonth),void 0===n&&(n=w.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:w.l10n.daysInMonth[e]}},w.isMobile||function(){var e=window.document.createDocumentFragment();if(w.calendarContainer=d("div","flatpickr-calendar"),w.calendarContainer.tabIndex=-1,!w.config.noCalendar){if(e.appendChild((w.monthNav=d("div","flatpickr-months"),w.yearElements=[],w.monthElements=[],w.prevMonthNav=d("span","flatpickr-prev-month"),w.prevMonthNav.innerHTML=w.config.prevArrow,w.nextMonthNav=d("span","flatpickr-next-month"),w.nextMonthNav.innerHTML=w.config.nextArrow,V(),Object.defineProperty(w,"_hidePrevMonthArrow",{get:function(){return w.__hidePrevMonthArrow},set:function(e){w.__hidePrevMonthArrow!==e&&(s(w.prevMonthNav,"flatpickr-disabled",e),w.__hidePrevMonthArrow=e)}}),Object.defineProperty(w,"_hideNextMonthArrow",{get:function(){return w.__hideNextMonthArrow},set:function(e){w.__hideNextMonthArrow!==e&&(s(w.nextMonthNav,"flatpickr-disabled",e),w.__hideNextMonthArrow=e)}}),w.currentYearElement=w.yearElements[0],Ce(),w.monthNav)),w.innerContainer=d("div","flatpickr-innerContainer"),w.config.weekNumbers){var n=function(){w.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",w.l10n.weekAbbreviation));var n=d("div","flatpickr-weeks");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,a=n.weekNumbers;w.innerContainer.appendChild(t),w.weekNumbers=a,w.weekWrapper=t}w.rContainer=d("div","flatpickr-rContainer"),w.rContainer.appendChild(z()),w.daysContainer||(w.daysContainer=d("div","flatpickr-days"),w.daysContainer.tabIndex=-1),U(),w.rContainer.appendChild(w.daysContainer),w.innerContainer.appendChild(w.rContainer),e.appendChild(w.innerContainer)}w.config.enableTime&&e.appendChild(function(){w.calendarContainer.classList.add("hasTime"),w.config.noCalendar&&w.calendarContainer.classList.add("noCalendar");var e=E(w.config);w.timeContainer=d("div","flatpickr-time"),w.timeContainer.tabIndex=-1;var n=d("span","flatpickr-time-separator",":"),t=m("flatpickr-hour",{"aria-label":w.l10n.hourAriaLabel});w.hourElement=t.getElementsByTagName("input")[0];var a=m("flatpickr-minute",{"aria-label":w.l10n.minuteAriaLabel});w.minuteElement=a.getElementsByTagName("input")[0],w.hourElement.tabIndex=w.minuteElement.tabIndex=-1,w.hourElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getHours():w.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),w.minuteElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getMinutes():e.minutes),w.hourElement.setAttribute("step",w.config.hourIncrement.toString()),w.minuteElement.setAttribute("step",w.config.minuteIncrement.toString()),w.hourElement.setAttribute("min",w.config.time_24hr?"0":"1"),w.hourElement.setAttribute("max",w.config.time_24hr?"23":"12"),w.hourElement.setAttribute("maxlength","2"),w.minuteElement.setAttribute("min","0"),w.minuteElement.setAttribute("max","59"),w.minuteElement.setAttribute("maxlength","2"),w.timeContainer.appendChild(t),w.timeContainer.appendChild(n),w.timeContainer.appendChild(a),w.config.time_24hr&&w.timeContainer.classList.add("time24hr");if(w.config.enableSeconds){w.timeContainer.classList.add("hasSeconds");var i=m("flatpickr-second");w.secondElement=i.getElementsByTagName("input")[0],w.secondElement.value=o(w.latestSelectedDateObj?w.latestSelectedDateObj.getSeconds():e.seconds),w.secondElement.setAttribute("step",w.minuteElement.getAttribute("step")),w.secondElement.setAttribute("min","0"),w.secondElement.setAttribute("max","59"),w.secondElement.setAttribute("maxlength","2"),w.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),w.timeContainer.appendChild(i)}w.config.time_24hr||(w.amPM=d("span","flatpickr-am-pm",w.l10n.amPM[r((w.latestSelectedDateObj?w.hourElement.value:w.config.defaultHour)>11)]),w.amPM.title=w.l10n.toggleTitle,w.amPM.tabIndex=-1,w.timeContainer.appendChild(w.amPM));return w.timeContainer}());s(w.calendarContainer,"rangeMode","range"===w.config.mode),s(w.calendarContainer,"animate",!0===w.config.animate),s(w.calendarContainer,"multiMonth",w.config.showMonths>1),w.calendarContainer.appendChild(e);var i=void 0!==w.config.appendTo&&void 0!==w.config.appendTo.nodeType;if((w.config.inline||w.config.static)&&(w.calendarContainer.classList.add(w.config.inline?"inline":"static"),w.config.inline&&(!i&&w.element.parentNode?w.element.parentNode.insertBefore(w.calendarContainer,w._input.nextSibling):void 0!==w.config.appendTo&&w.config.appendTo.appendChild(w.calendarContainer)),w.config.static)){var l=d("div","flatpickr-wrapper");w.element.parentNode&&w.element.parentNode.insertBefore(l,w.element),l.appendChild(w.element),w.altInput&&l.appendChild(w.altInput),l.appendChild(w.calendarContainer)}w.config.static||w.config.inline||(void 0!==w.config.appendTo?w.config.appendTo:window.document.body).appendChild(w.calendarContainer)}(),function(){w.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(w.element.querySelectorAll("[data-"+e+"]"),(function(n){return P(n,"click",w[e])}))}));if(w.isMobile)return void function(){var e=w.config.enableTime?w.config.noCalendar?"time":"datetime-local":"date";w.mobileInput=d("input",w.input.className+" flatpickr-mobile"),w.mobileInput.tabIndex=1,w.mobileInput.type=e,w.mobileInput.disabled=w.input.disabled,w.mobileInput.required=w.input.required,w.mobileInput.placeholder=w.input.placeholder,w.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",w.selectedDates.length>0&&(w.mobileInput.defaultValue=w.mobileInput.value=w.formatDate(w.selectedDates[0],w.mobileFormatStr));w.config.minDate&&(w.mobileInput.min=w.formatDate(w.config.minDate,"Y-m-d"));w.config.maxDate&&(w.mobileInput.max=w.formatDate(w.config.maxDate,"Y-m-d"));w.input.getAttribute("step")&&(w.mobileInput.step=String(w.input.getAttribute("step")));w.input.type="hidden",void 0!==w.altInput&&(w.altInput.type="hidden");try{w.input.parentNode&&w.input.parentNode.insertBefore(w.mobileInput,w.input.nextSibling)}catch(e){}P(w.mobileInput,"change",(function(e){w.setDate(g(e).value,!1,w.mobileFormatStr),De("onChange"),De("onClose")}))}();var e=l(re,50);w._debouncedChange=l(Y,300),w.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&P(w.daysContainer,"mouseover",(function(e){"range"===w.config.mode&&oe(g(e))}));P(w._input,"keydown",ie),void 0!==w.calendarContainer&&P(w.calendarContainer,"keydown",ie);w.config.inline||w.config.static||P(window,"resize",e);void 0!==window.ontouchstart?P(window.document,"touchstart",X):P(window.document,"mousedown",X);P(window.document,"focus",X,{capture:!0}),!0===w.config.clickOpens&&(P(w._input,"focus",w.open),P(w._input,"click",w.open));void 0!==w.daysContainer&&(P(w.monthNav,"click",xe),P(w.monthNav,["keyup","increment"],N),P(w.daysContainer,"click",me));if(void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement){var n=function(e){return g(e).select()};P(w.timeContainer,["increment"],_),P(w.timeContainer,"blur",_,{capture:!0}),P(w.timeContainer,"click",H),P([w.hourElement,w.minuteElement],["focus","click"],n),void 0!==w.secondElement&&P(w.secondElement,"focus",(function(){return w.secondElement&&w.secondElement.select()})),void 0!==w.amPM&&P(w.amPM,"click",(function(e){_(e)}))}w.config.allowInput&&P(w._input,"blur",ae)}(),(w.selectedDates.length||w.config.noCalendar)&&(w.config.enableTime&&F(w.config.noCalendar?w.latestSelectedDateObj:void 0),ye(!1)),S();var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!w.isMobile&&n&&de(),De("onReady")}(),w}function T(e,n){for(var t=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],i=0;i<t.length;i++){var o=t[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=k(o,n||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return T(this,e)},HTMLElement.prototype.flatpickr=function(e){return T([this],e)});var I=function(e,n){return"string"==typeof e?T(window.document.querySelectorAll(e),n):e instanceof Node?T([e],n):T(e,n)};return I.defaultConfig={},I.l10ns={en:e({},i),default:e({},i)},I.localize=function(n){I.l10ns.default=e(e({},I.l10ns.default),n)},I.setDefaults=function(n){I.defaultConfig=e(e({},I.defaultConfig),n)},I.parseDate=C({}),I.formatDate=b({}),I.compareDates=M,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return T(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=I),I}));
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,global.monthSelectPlugin=factory())})(this,function(){"use strict";var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};var monthToStr=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]};function clearNode(node){while(node.firstChild)node.removeChild(node.firstChild)}function getEventTarget(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error){return event.target}}var defaultConfig={shorthand:false,dateFormat:"F Y",altFormat:"F Y",theme:"light"};function monthSelectPlugin(pluginConfig){var config=__assign(__assign({},defaultConfig),pluginConfig);return function(fp){fp.config.dateFormat=config.dateFormat;fp.config.altFormat=config.altFormat;var self={monthsContainer:null};function clearUnnecessaryDOMElements(){if(!fp.rContainer)return;clearNode(fp.rContainer);for(var index=0;index<fp.monthElements.length;index++){var element=fp.monthElements[index];if(!element.parentNode)continue;element.parentNode.removeChild(element)}}function build(){if(!fp.rContainer)return;self.monthsContainer=fp._createElement("div","flatpickr-monthSelect-months");self.monthsContainer.tabIndex=-1;buildMonths();fp.rContainer.appendChild(self.monthsContainer);fp.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+config.theme)}function buildMonths(){if(!self.monthsContainer)return;clearNode(self.monthsContainer);var frag=document.createDocumentFragment();for(var i=0;i<12;i++){var month=fp.createDay("flatpickr-monthSelect-month",new Date(fp.currentYear,i),0,i);if(month.dateObj.getMonth()===(new Date).getMonth()&&month.dateObj.getFullYear()===(new Date).getFullYear())month.classList.add("today");month.textContent=monthToStr(i,config.shorthand,fp.l10n);month.addEventListener("click",selectMonth);frag.appendChild(month)}self.monthsContainer.appendChild(frag);if(fp.config.minDate&&fp.currentYear===fp.config.minDate.getFullYear())fp.prevMonthNav.classList.add("flatpickr-disabled");else fp.prevMonthNav.classList.remove("flatpickr-disabled");if(fp.config.maxDate&&fp.currentYear===fp.config.maxDate.getFullYear())fp.nextMonthNav.classList.add("flatpickr-disabled");else fp.nextMonthNav.classList.remove("flatpickr-disabled")}function bindEvents(){fp._bind(fp.prevMonthNav,"click",function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear-1);selectYear();buildMonths()});fp._bind(fp.nextMonthNav,"click",function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear+1);selectYear();buildMonths()});fp._bind(self.monthsContainer,"mouseover",function(e){if(fp.config.mode==="range")fp.onMouseOver(getEventTarget(e),"flatpickr-monthSelect-month")})}function setCurrentlySelected(){if(!fp.rContainer)return;if(!fp.selectedDates.length)return;var currentlySelected=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected");for(var index=0;index<currentlySelected.length;index++){currentlySelected[index].classList.remove("selected")}var targetMonth=fp.selectedDates[0].getMonth();var month=fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(targetMonth+1)+")");if(month){month.classList.add("selected")}}function selectYear(){var selectedDate=fp.selectedDates[0];if(selectedDate){selectedDate=new Date(selectedDate);selectedDate.setFullYear(fp.currentYear);if(fp.config.minDate&&selectedDate<fp.config.minDate){selectedDate=fp.config.minDate}if(fp.config.maxDate&&selectedDate>fp.config.maxDate){selectedDate=fp.config.maxDate}fp.currentYear=selectedDate.getFullYear()}fp.currentYearElement.value=String(fp.currentYear);if(fp.rContainer){var months=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month");months.forEach(function(month){month.dateObj.setFullYear(fp.currentYear);if(fp.config.minDate&&month.dateObj<fp.config.minDate||fp.config.maxDate&&month.dateObj>fp.config.maxDate){month.classList.add("flatpickr-disabled")}else{month.classList.remove("flatpickr-disabled")}})}setCurrentlySelected()}function selectMonth(e){e.preventDefault();e.stopPropagation();var eventTarget=getEventTarget(e);if(!(eventTarget instanceof Element))return;if(eventTarget.classList.contains("flatpickr-disabled"))return;if(eventTarget.classList.contains("notAllowed"))return;setMonth(eventTarget.dateObj);if(fp.config.closeOnSelect){var single=fp.config.mode==="single";var range=fp.config.mode==="range"&&fp.selectedDates.length===2;if(single||range)fp.close()}}function setMonth(date){var selectedDate=new Date(fp.currentYear,date.getMonth(),date.getDate());var selectedDates=[];switch(fp.config.mode){case"single":selectedDates=[selectedDate];break;case"multiple":selectedDates.push(selectedDate);break;case"range":if(fp.selectedDates.length===2){selectedDates=[selectedDate]}else{selectedDates=fp.selectedDates.concat([selectedDate]);selectedDates.sort(function(a,b){return a.getTime()-b.getTime()})}break}fp.setDate(selectedDates,true);setCurrentlySelected()}var shifts={37:-1,39:1,40:3,38:-3};function onKeyDown(_,__,___,e){var shouldMove=shifts[e.keyCode]!==undefined;if(!shouldMove&&e.keyCode!==13){return}if(!fp.rContainer||!self.monthsContainer)return;var currentlySelected=fp.rContainer.querySelector(".flatpickr-monthSelect-month.selected");var index=Array.prototype.indexOf.call(self.monthsContainer.children,document.activeElement);if(index===-1){var target=currentlySelected||self.monthsContainer.firstElementChild;target.focus();index=target.$i}if(shouldMove){self.monthsContainer.children[(12+index+shifts[e.keyCode])%12].focus()}else if(e.keyCode===13&&self.monthsContainer.contains(document.activeElement)){setMonth(document.activeElement.dateObj)}}function closeHook(){var _a;if(((_a=fp.config)===null||_a===void 0?void 0:_a.mode)==="range"&&fp.selectedDates.length===1)fp.clear(false);if(!fp.selectedDates.length)buildMonths()}function stubCurrentMonth(){config._stubbedCurrentMonth=fp._initialDate.getMonth();fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth}function unstubCurrentMonth(){if(!config._stubbedCurrentMonth)return;fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth;delete config._stubbedCurrentMonth}function destroyPluginInstance(){if(self.monthsContainer!==null){var months=self.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month");for(var index=0;index<months.length;index++){months[index].removeEventListener("click",selectMonth)}}}return{onParseConfig:function(){fp.config.enableTime=false},onValueUpdate:setCurrentlySelected,onKeyDown:onKeyDown,onReady:[stubCurrentMonth,clearUnnecessaryDOMElements,build,bindEvents,setCurrentlySelected,function(){fp.config.onClose.push(closeHook);fp.loadedPlugins.push("monthSelect")}],onDestroy:[unstubCurrentMonth,destroyPluginInstance,function(){fp.config.onClose=fp.config.onClose.filter(function(hook){return hook!==closeHook})}]}}}return monthSelectPlugin});

/*!
 * popperjs v2.11.5 - MIT License - https://github.com/popperjs/popper-core
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,i=1;if(r(e)&&t){var a=e.offsetHeight,f=e.offsetWidth;f>0&&(o=s(n.width)/f||1),a>0&&(i=s(n.height)/a||1)}return{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function c(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function p(e){return e?(e.nodeName||"").toLowerCase():null}function u(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function l(e){return f(u(e)).left+c(e).scrollLeft}function d(e){return t(e).getComputedStyle(e)}function h(e){var t=d(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function m(e,n,o){void 0===o&&(o=!1);var i,a,d=r(n),m=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),v=u(n),g=f(e,m),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(d||!d&&!o)&&(("body"!==p(n)||h(v))&&(y=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:c(i)),r(n)?((b=f(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):v&&(b.x=l(v))),{x:g.left+y.scrollLeft-b.x,y:g.top+y.scrollTop-b.y,width:g.width,height:g.height}}function v(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function g(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||u(e)}function y(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:r(e)&&h(e)?e:y(g(e))}function b(e,n){var r;void 0===n&&(n=[]);var o=y(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],h(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(b(g(s)))}function x(e){return["table","td","th"].indexOf(p(e))>=0}function w(e){return r(e)&&"fixed"!==d(e).position?e.offsetParent:null}function O(e){for(var n=t(e),i=w(e);i&&x(i)&&"static"===d(i).position;)i=w(i);return i&&("html"===p(i)||"body"===p(i)&&"static"===d(i).position)?n:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===d(e).position)return null;var n=g(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(p(n))<0;){var i=d(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var j="top",E="bottom",D="right",A="left",L="auto",P=[j,E,D,A],M="start",k="end",W="viewport",B="popper",H=P.reduce((function(e,t){return e.concat([t+"-"+M,t+"-"+k])}),[]),T=[].concat(P,[L]).reduce((function(e,t){return e.concat([t,t+"-"+M,t+"-"+k])}),[]),R=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function S(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function q(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function V(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function N(e,r){return r===W?V(function(e){var n=t(e),r=u(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;return o&&(i=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,f=o.offsetTop)),{width:i,height:a,x:s+l(e),y:f}}(e)):n(r)?function(e){var t=f(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(r):V(function(e){var t,n=u(e),r=c(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+l(e),p=-r.scrollTop;return"rtl"===d(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:p}}(u(e)))}function I(e,t,o){var s="clippingParents"===t?function(e){var t=b(g(e)),o=["absolute","fixed"].indexOf(d(e).position)>=0&&r(e)?O(e):e;return n(o)?t.filter((function(e){return n(e)&&q(e,o)&&"body"!==p(e)})):[]}(e):[].concat(t),f=[].concat(s,[o]),c=f[0],u=f.reduce((function(t,n){var r=N(e,n);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),N(e,c));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function _(e){return e.split("-")[1]}function F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function U(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?C(o):null,a=o?_(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case j:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case D:t={x:n.x+n.width,y:f};break;case A:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?F(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case M:t[c]=t[c]-(n[p]/2-r[p]/2);break;case k:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function X(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Y(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.boundary,s=void 0===a?"clippingParents":a,c=r.rootBoundary,p=void 0===c?W:c,l=r.elementContext,d=void 0===l?B:l,h=r.altBoundary,m=void 0!==h&&h,v=r.padding,g=void 0===v?0:v,y=z("number"!=typeof g?g:X(g,P)),b=d===B?"reference":B,x=e.rects.popper,w=e.elements[m?b:d],O=I(n(w)?w:w.contextElement||u(e.elements.popper),s,p),A=f(e.elements.reference),L=U({reference:A,element:x,strategy:"absolute",placement:i}),M=V(Object.assign({},x,L)),k=d===B?M:A,H={top:O.top-k.top+y.top,bottom:k.bottom-O.bottom+y.bottom,left:O.left-k.left+y.left,right:k.right-O.right+y.right},T=e.modifiersData.offset;if(d===B&&T){var R=T[i];Object.keys(H).forEach((function(e){var t=[D,E].indexOf(e)>=0?1:-1,n=[j,E].indexOf(e)>=0?"y":"x";H[e]+=R[n]*t}))}return H}var G={placement:"bottom",modifiers:[],strategy:"absolute"};function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function K(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?G:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},G,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?b(e):e.contextElement?b(e.contextElement):[],popper:b(t)};var s,p,d=function(e){var t=S(e);return R.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(J(t,n)){f.rects={reference:m(t,O(n),"fixed"===f.options.strategy),popper:v(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!J(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var Q={passive:!0};var Z={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,Q)})),f&&c.addEventListener("resize",r.update,Q),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,Q)})),f&&c.removeEventListener("resize",r.update,Q)}},data:{}};var $={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=U({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,l=e.adaptive,h=e.roundOffsets,m=e.isFixed,v=f.x,g=void 0===v?0:v,y=f.y,b=void 0===y?0:y,x="function"==typeof h?h({x:g,y:b}):{x:g,y:b};g=x.x,b=x.y;var w=f.hasOwnProperty("x"),L=f.hasOwnProperty("y"),P=A,M=j,W=window;if(l){var B=O(r),H="clientHeight",T="clientWidth";if(B===t(r)&&"static"!==d(B=u(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),B=B,i===j||(i===A||i===D)&&a===k)M=E,b-=(m&&B===W&&W.visualViewport?W.visualViewport.height:B[H])-o.height,b*=p?1:-1;if(i===A||(i===j||i===E)&&a===k)P=D,g-=(m&&B===W&&W.visualViewport?W.visualViewport.width:B[T])-o.width,g*=p?1:-1}var R,S=Object.assign({position:c},l&&ee),C=!0===h?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:s(t*r)/r||0,y:s(n*r)/r||0}}({x:g,y:b}):{x:g,y:b};return g=C.x,b=C.y,p?Object.assign({},S,((R={})[M]=L?"0":"",R[P]=w?"0":"",R.transform=(W.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=L?b+"px":"",n[P]=w?g+"px":"",n.transform="",n))}var ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:C(t.placement),variation:_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&p(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&p(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=T.reduce((function(e,n){return e[n]=function(e,t,n){var r=C(e),o=[A,j].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[A,D].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?T:f,p=_(r),u=p?s?H:H.filter((function(e){return _(e)===p})):P,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=Y(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[C(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var pe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,g=C(v),y=f||(g===v||!h?[ae(v)]:function(e){if(C(e)===L)return[];var t=ae(e);return[fe(e),t,fe(t)]}(v)),b=[v].concat(y).reduce((function(e,n){return e.concat(C(n)===L?ce(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,P=!0,k=b[0],W=0;W<b.length;W++){var B=b[W],H=C(B),T=_(B)===M,R=[j,E].indexOf(H)>=0,S=R?"width":"height",q=Y(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),V=R?T?D:A:T?E:j;x[S]>w[S]&&(V=ae(V));var N=ae(V),I=[];if(i&&I.push(q[H]<=0),s&&I.push(q[V]<=0,q[N]<=0),I.every((function(e){return e}))){k=B,P=!1;break}O.set(B,I)}if(P)for(var F=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},U=h?3:1;U>0;U--){if("break"===F(U))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ue(e,t,n){return i(e,a(t,n))}var le={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,g=n.tetherOffset,y=void 0===g?0:g,b=Y(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=C(t.placement),w=_(t.placement),L=!w,P=F(x),k="x"===P?"y":"x",W=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(W){if(s){var V,N="y"===P?j:A,I="y"===P?E:D,U="y"===P?"height":"width",z=W[P],X=z+b[N],G=z-b[I],J=m?-H[U]/2:0,K=w===M?B[U]:H[U],Q=w===M?-H[U]:-B[U],Z=t.elements.arrow,$=m&&Z?v(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[N],ne=ee[I],re=ue(0,B[U],$[U]),oe=L?B[U]/2-J-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=L?-B[U]/2+J+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&O(t.elements.arrow),se=ae?"y"===P?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(V=null==S?void 0:S[P])?V:0,ce=z+ie-fe,pe=ue(m?a(X,z+oe-fe-se):X,z,m?i(G,ce):G);W[P]=pe,q[P]=pe-z}if(c){var le,de="x"===P?j:A,he="x"===P?E:D,me=W[k],ve="y"===k?"height":"width",ge=me+b[de],ye=me-b[he],be=-1!==[j,A].indexOf(x),xe=null!=(le=null==S?void 0:S[k])?le:0,we=be?ge:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ye,je=m&&be?function(e,t,n){var r=ue(e,t,n);return r>n?n:r}(we,me,Oe):ue(m?we:ge,me,m?Oe:ye);W[k]=je,q[k]=je-me}t.modifiersData[r]=q}},requiresIfExists:["offset"]};var de={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=C(n.placement),f=F(s),c=[A,D].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:X(e,P))}(o.padding,n),u=v(i),l="y"===f?j:A,d="y"===f?E:D,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],g=O(i),y=g?"y"===f?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],L=y/2-u[c]/2+b,M=ue(x,L,w),k=f;n.modifiersData[r]=((t={})[k]=M,t.centerOffset=M-L,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&q(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function he(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function me(e){return[j,D,E,A].some((function(t){return e[t]>=0}))}var ve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Y(t,{elementContext:"reference"}),s=Y(t,{altBoundary:!0}),f=he(a,r),c=he(s,o,i),p=me(f),u=me(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},ge=K({defaultModifiers:[Z,$,ne,re]}),ye=[Z,$,ne,re,oe,pe,le,de,ve],be=K({defaultModifiers:ye});e.applyStyles=re,e.arrow=de,e.computeStyles=ne,e.createPopper=be,e.createPopperLite=ge,e.defaultModifiers=ye,e.detectOverflow=Y,e.eventListeners=Z,e.flip=pe,e.hide=ve,e.offset=oe,e.popperGenerator=K,e.popperOffsets=$,e.preventOverflow=le,Object.defineProperty(e,"__esModule",{value:!0})}));

/*!
 * tippy.js v6.3.7 - MIT License - https://github.com/atomiks/tippyjs
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=!!e&&!!window.msCrypto,r={passive:!0,capture:!0},o=function(){return document.body};function i(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return"function"==typeof t?t.apply(void 0,e):t}function u(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function p(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t){return t.split("-")[0]}function d(t){return[].slice.call(t)}function v(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function m(){return document.createElement("div")}function g(t){return["Element","Fragment"].some((function(e){return a(t,e)}))}function h(t){return a(t,"MouseEvent")}function b(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function y(t){return g(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function w(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function x(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function E(t){var e,n=c(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function O(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function C(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var T={isTouch:!1},A=0;function L(){T.isTouch||(T.isTouch=!0,window.performance&&document.addEventListener("mousemove",D))}function D(){var t=performance.now();t-A<20&&(T.isTouch=!1,document.removeEventListener("mousemove",D)),A=t}function k(){var t=document.activeElement;if(b(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var R=Object.assign({appendTo:o,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),P=Object.keys(R);function j(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=R[o])?r:i);return e}),{});return Object.assign({},t,e)}function M(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(j(Object.assign({},R,{plugins:e}))):P).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function V(t,e){t.innerHTML=e}function I(t){var e=m();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",g(t)?e.appendChild(t):V(e,t)),e}function S(t,e){g(e.content)?(V(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?V(t,e.content):t.textContent=e.content)}function B(t){var e=t.firstElementChild,n=d(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function N(t){var e=m(),n=m();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=m();function o(n,r){var o=B(e),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||S(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(I(r.arrow))):i.appendChild(I(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),S(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}N.$$tippy=!0;var H=1,U=[],_=[];function z(e,a){var p,g,b,y,A,L,D,k,P=M(e,Object.assign({},R,j(v(a)))),V=!1,I=!1,S=!1,N=!1,z=[],F=u(wt,P.interactiveDebounce),W=H++,X=(k=P.plugins).filter((function(t,e){return k.indexOf(t)===e})),Y={id:W,reference:e,popper:m(),popperInstance:null,props:P,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:X,clearDelayTimeouts:function(){clearTimeout(p),clearTimeout(g),cancelAnimationFrame(b)},setProps:function(t){if(Y.state.isDestroyed)return;at("onBeforeUpdate",[Y,t]),bt();var n=Y.props,r=M(e,Object.assign({},n,v(t),{ignoreAttributes:!0}));Y.props=r,ht(),n.interactiveDebounce!==r.interactiveDebounce&&(pt(),F=u(wt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");ut(),it(),J&&J(n,r);Y.popperInstance&&(Ct(),At().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));at("onAfterUpdate",[Y,t])},setContent:function(t){Y.setProps({content:t})},show:function(){var t=Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=T.isTouch&&!Y.props.touch,a=i(Y.props.duration,0,R.duration);if(t||e||n||r)return;if(et().hasAttribute("disabled"))return;if(at("onShow",[Y],!1),!1===Y.props.onShow(Y))return;Y.state.isVisible=!0,tt()&&($.style.visibility="visible");it(),dt(),Y.state.isMounted||($.style.transition="none");if(tt()){var u=rt(),p=u.box,c=u.content;w([p,c],0)}L=function(){var t;if(Y.state.isVisible&&!N){if(N=!0,$.offsetHeight,$.style.transition=Y.props.moveTransition,tt()&&Y.props.animation){var e=rt(),n=e.box,r=e.content;w([n,r],a),x([n,r],"visible")}st(),ut(),f(_,Y),null==(t=Y.popperInstance)||t.forceUpdate(),at("onMount",[Y]),Y.props.animation&&tt()&&function(t,e){mt(t,e)}(a,(function(){Y.state.isShown=!0,at("onShown",[Y])}))}},function(){var t,e=Y.props.appendTo,n=et();t=Y.props.interactive&&e===o||"parent"===e?n.parentNode:s(e,[n]);t.contains($)||t.appendChild($);Y.state.isMounted=!0,Ct()}()},hide:function(){var t=!Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=i(Y.props.duration,1,R.duration);if(t||e||n)return;if(at("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,N=!1,V=!1,tt()&&($.style.visibility="hidden");if(pt(),vt(),it(!0),tt()){var o=rt(),a=o.box,s=o.content;Y.props.animation&&(w([a,s],r),x([a,s],"hidden"))}st(),ut(),Y.props.animation?tt()&&function(t,e){mt(t,(function(){!Y.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(r,Y.unmount):Y.unmount()},hideWithInteractivity:function(t){nt().addEventListener("mousemove",F),f(U,F),F(t)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Tt(),At().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);_=_.filter((function(t){return t!==Y})),Y.state.isMounted=!1,at("onHidden",[Y])},destroy:function(){if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),bt(),delete e._tippy,Y.state.isDestroyed=!0,at("onDestroy",[Y])}};if(!P.render)return Y;var q=P.render(Y),$=q.popper,J=q.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+Y.id,Y.popper=$,e._tippy=Y,$._tippy=Y;var G=X.map((function(t){return t.fn(Y)})),K=e.hasAttribute("aria-expanded");return ht(),ut(),it(),at("onCreate",[Y]),P.showOnCreate&&Lt(),$.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&nt().addEventListener("mousemove",F)})),Y;function Q(){var t=Y.props.touch;return Array.isArray(t)?t:[t,0]}function Z(){return"hold"===Q()[0]}function tt(){var t;return!(null==(t=Y.props.render)||!t.$$tippy)}function et(){return D||e}function nt(){var t=et().parentNode;return t?E(t):document}function rt(){return B($)}function ot(t){return Y.state.isMounted&&!Y.state.isVisible||T.isTouch||y&&"focus"===y.type?0:i(Y.props.delay,t?0:1,R.delay)}function it(t){void 0===t&&(t=!1),$.style.pointerEvents=Y.props.interactive&&!t?"":"none",$.style.zIndex=""+Y.props.zIndex}function at(t,e,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(r=Y.props)[t].apply(r,e)}function st(){var t=Y.props.aria;if(t.content){var n="aria-"+t.content,r=$.id;c(Y.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(Y.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function ut(){!K&&Y.props.aria.expanded&&c(Y.props.triggerTarget||e).forEach((function(t){Y.props.interactive?t.setAttribute("aria-expanded",Y.state.isVisible&&t===et()?"true":"false"):t.removeAttribute("aria-expanded")}))}function pt(){nt().removeEventListener("mousemove",F),U=U.filter((function(t){return t!==F}))}function ct(t){if(!T.isTouch||!S&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!Y.props.interactive||!C($,n)){if(c(Y.props.triggerTarget||e).some((function(t){return C(t,n)}))){if(T.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else at("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(Y.clearDelayTimeouts(),Y.hide(),I=!0,setTimeout((function(){I=!1})),Y.state.isMounted||vt())}}}function ft(){S=!0}function lt(){S=!1}function dt(){var t=nt();t.addEventListener("mousedown",ct,!0),t.addEventListener("touchend",ct,r),t.addEventListener("touchstart",lt,r),t.addEventListener("touchmove",ft,r)}function vt(){var t=nt();t.removeEventListener("mousedown",ct,!0),t.removeEventListener("touchend",ct,r),t.removeEventListener("touchstart",lt,r),t.removeEventListener("touchmove",ft,r)}function mt(t,e){var n=rt().box;function r(t){t.target===n&&(O(n,"remove",r),e())}if(0===t)return e();O(n,"remove",A),O(n,"add",r),A=r}function gt(t,n,r){void 0===r&&(r=!1),c(Y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),z.push({node:e,eventType:t,handler:n,options:r})}))}function ht(){var t;Z()&&(gt("touchstart",yt,{passive:!0}),gt("touchend",xt,{passive:!0})),(t=Y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(gt(t,yt),t){case"mouseenter":gt("mouseleave",xt);break;case"focus":gt(n?"focusout":"blur",Et);break;case"focusin":gt("focusout",Et)}}))}function bt(){z.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),z=[]}function yt(t){var e,n=!1;if(Y.state.isEnabled&&!Ot(t)&&!I){var r="focus"===(null==(e=y)?void 0:e.type);y=t,D=t.currentTarget,ut(),!Y.state.isVisible&&h(t)&&U.forEach((function(e){return e(t)})),"click"===t.type&&(Y.props.trigger.indexOf("mouseenter")<0||V)&&!1!==Y.props.hideOnClick&&Y.state.isVisible?n=!0:Lt(t),"click"===t.type&&(V=!n),n&&!r&&Dt(t)}}function wt(t){var e=t.target,n=et().contains(e)||$.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=l(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+u>i,v=r-e.bottom-p>i,m=e.left-n+c>i,g=n-e.right-f>i;return d||v||m||g}))}(At().concat($).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:P}:null})).filter(Boolean),t)&&(pt(),Dt(t))}function xt(t){Ot(t)||Y.props.trigger.indexOf("click")>=0&&V||(Y.props.interactive?Y.hideWithInteractivity(t):Dt(t))}function Et(t){Y.props.trigger.indexOf("focusin")<0&&t.target!==et()||Y.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||Dt(t)}function Ot(t){return!!T.isTouch&&Z()!==t.type.indexOf("touch")>=0}function Ct(){Tt();var n=Y.props,r=n.popperOptions,o=n.placement,i=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,u=tt()?B($).arrow:null,p=a?{getBoundingClientRect:a,contextElement:a.contextElement||et()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(tt()){var n=rt().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];tt()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),Y.popperInstance=t.createPopper(p,$,Object.assign({},r,{placement:o,onFirstUpdate:L,modifiers:c}))}function Tt(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function At(){return d($.querySelectorAll("[data-tippy-root]"))}function Lt(t){Y.clearDelayTimeouts(),t&&at("onTrigger",[Y,t]),dt();var e=ot(!0),n=Q(),r=n[0],o=n[1];T.isTouch&&"hold"===r&&o&&(e=o),e?p=setTimeout((function(){Y.show()}),e):Y.show()}function Dt(t){if(Y.clearDelayTimeouts(),at("onUntrigger",[Y,t]),Y.state.isVisible){if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&V)){var e=ot(!1);e?g=setTimeout((function(){Y.state.isVisible&&Y.hide()}),e):b=requestAnimationFrame((function(){Y.hide()}))}}else vt()}}function F(t,e){void 0===e&&(e={});var n=R.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",L,r),window.addEventListener("blur",k);var o=Object.assign({},e,{plugins:n}),i=y(t).reduce((function(t,e){var n=e&&z(e,o);return n&&t.push(n),t}),[]);return g(t)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(t){Object.keys(t).forEach((function(e){R[e]=t[e]}))},F.currentInput=T;var W=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(null==(e=t.props.render)||!e.$$tippy)return{};var n=B(t.popper),r=n.box,o=n.content,i=t.props.animateFill?function(){var t=m();return t.className="tippy-backdrop",x([t],"hidden"),t}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));o.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,x([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&x([i],"hidden")}}}};var q={clientX:0,clientY:0},$=[];function J(t){var e=t.clientX,n=t.clientY;q={clientX:e,clientY:n}}var G={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=E(t.props.triggerTarget||e),r=!1,o=!1,i=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function p(){n.removeEventListener("mousemove",f)}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),o=t.props.followCursor,i=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=i-s.left,p=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=t.left+u,r=t.top+p);var s="horizontal"===o?t.top:r,c="vertical"===o?t.right:n,f="horizontal"===o?t.bottom:r,l="vertical"===o?t.left:n;return{width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}})}function l(){t.props.followCursor&&($.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",J)}(n))}function d(){0===($=$.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",J)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!t.state.isMounted||o||s()||u()):(p(),c()))},onMount:function(){t.props.followCursor&&!o&&(i&&(f(q),i=!1),s()||u())},onTrigger:function(t,e){h(e)&&(q={clientX:e.clientX,clientY:e.clientY}),o="focus"===e.type},onHidden:function(){t.props.followCursor&&(c(),p(),i=!0)}}}};var K={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;t.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),e!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===t,s=o.top,u=i.bottom,p=a?o.left:i.left,c=a?o.right:i.right;return{top:s,bottom:u,left:p,right:c,width:c-p,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(a.placement)}})),e=a.placement)}};function s(){var e;o||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,a),o=!0,t.setProps(e),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(e,n){if(h(n)){var o=d(t.reference.getClientRects()),i=o.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var Q={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var o=null,i=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Z(o,s)||u&&Z(i,u))&&t.popperInstance&&t.popperInstance.update(),o=s,i=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Z(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),F.setDefaultProps({plugins:[Y,G,K,Q],render:N}),F.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,o=t,i=[],a=[],s=e.overrides,u=[],f=!1;function l(){a=o.map((function(t){return c(t.props.triggerTarget||t.reference)})).reduce((function(t,e){return t.concat(e)}),[])}function d(){i=o.map((function(t){return t.reference}))}function v(t){o.forEach((function(e){t?e.enable():e.disable()}))}function g(t){return o.map((function(e){var n=e.setProps;return e.setProps=function(o){n(o),e.reference===r&&t.setProps(o)},function(){e.setProps=n}}))}function h(t,e){var n=a.indexOf(e);if(e!==r){r=e;var u=(s||[]).concat("content").reduce((function(t,e){return t[e]=o[n].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:"function"==typeof u.getReferenceClientRect?u.getReferenceClientRect:function(){var t;return null==(t=i[n])?void 0:t.getBoundingClientRect()}}))}}v(!1),d(),l();var b={fn:function(){return{onDestroy:function(){v(!0)},onHidden:function(){r=null},onClickOutside:function(t){t.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(t){t.props.showOnCreate&&!f&&(f=!0,h(t,i[0]))},onTrigger:function(t,e){h(t,e.currentTarget)}}}},y=F(m(),Object.assign({},p(e,["overrides"]),{plugins:[b].concat(e.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(t){if(w(),!r&&null==t)return h(y,i[0]);if(!r||null!=t){if("number"==typeof t)return i[t]&&h(y,i[t]);if(o.indexOf(t)>=0){var e=t.reference;return h(y,e)}return i.indexOf(t)>=0?h(y,t):void 0}},y.showNext=function(){var t=i[0];if(!r)return y.show(0);var e=i.indexOf(r);y.show(i[e+1]||t)},y.showPrevious=function(){var t=i[i.length-1];if(!r)return y.show(t);var e=i.indexOf(r),n=i[e-1]||t;y.show(n)};var x=y.setProps;return y.setProps=function(t){s=t.overrides||s,x(t)},y.setInstances=function(t){v(!0),u.forEach((function(t){return t()})),o=t,v(!1),d(),l(),u=g(y),y.setProps({triggerTarget:a})},u=g(y),y},F.delegate=function(t,e){var n=[],o=[],i=!1,a=e.target,s=p(e,["target"]),u=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},s,{showOnCreate:!0}),l=F(t,u);function d(t){if(t.target&&!i){var n=t.target.closest(a);if(n){var r=n.getAttribute("data-tippy-trigger")||e.trigger||R.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&r.indexOf(X[t.type])<0)){var s=F(n,f);s&&(o=o.concat(s))}}}}function v(t,e,r,o){void 0===o&&(o=!1),t.addEventListener(e,r,o),n.push({node:t,eventType:e,handler:r,options:o})}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&o.forEach((function(t){t.destroy()})),o=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),n=[],e()},t.enable=function(){a(),o.forEach((function(t){return t.enable()})),i=!1},t.disable=function(){s(),o.forEach((function(t){return t.disable()})),i=!0},function(t){var e=t.reference;v(e,"touchstart",d,r),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)})),l},F.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;_.forEach((function(t){var e=!1;if(n&&(e=b(n)?t.reference===n:t.popper===n.popper),!e){var o=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:o})}}))},F.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',F}));

/**
 * Selectize (v0.15.2)
 * https://selectize.dev
 */
(function(root,factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&typeof module.exports==="object"){module.exports=factory(require("jquery"))}else{root.EM_Selectize=factory(root.jQuery)}})(this,function($){"use strict";var highlight=function($element,pattern){if(typeof pattern==="string"&&!pattern.length)return;var regex=typeof pattern==="string"?new RegExp(pattern,"i"):pattern;var highlight=function(node){var skip=0;if(node.nodeType===3){var pos=node.data.search(regex);if(pos>=0&&node.data.length>0){var match=node.data.match(regex);var spannode=document.createElement("span");spannode.className="highlight";var middlebit=node.splitText(pos);var endbit=middlebit.splitText(match[0].length);var middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);middlebit.parentNode.replaceChild(spannode,middlebit);skip=1}}else if(node.nodeType===1&&node.childNodes&&!/(script|style)/i.test(node.tagName)&&(node.className!=="highlight"||node.tagName!=="SPAN")){for(var i=0;i<node.childNodes.length;++i){i+=highlight(node.childNodes[i])}}return skip};return $element.each(function(){highlight(this)})};$.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var parent=this.parentNode;parent.replaceChild(this.firstChild,this);parent.normalize()}).end()};var MicroEvent=function(){};MicroEvent.prototype={on:function(event,fct){this._events=this._events||{};this._events[event]=this._events[event]||[];this._events[event].push(fct)},off:function(event,fct){var n=arguments.length;if(n===0)return delete this._events;if(n===1)return delete this._events[event];this._events=this._events||{};if(event in this._events===false)return;this._events[event].splice(this._events[event].indexOf(fct),1)},trigger:function(event){const events=this._events=this._events||{};if(event in events===false)return;for(var i=0;i<events[event].length;i++){events[event][i].apply(this,Array.prototype.slice.call(arguments,1))}}};MicroEvent.mixin=function(destObject){var props=["on","off","trigger"];for(var i=0;i<props.length;i++){destObject.prototype[props[i]]=MicroEvent.prototype[props[i]]}};var MicroPlugin={};MicroPlugin.mixin=function(Interface){Interface.plugins={};Interface.prototype.initializePlugins=function(plugins){var i,n,key;var self=this;var queue=[];self.plugins={names:[],settings:{},requested:{},loaded:{}};if(utils.isArray(plugins)){for(i=0,n=plugins.length;i<n;i++){if(typeof plugins[i]==="string"){queue.push(plugins[i])}else{self.plugins.settings[plugins[i].name]=plugins[i].options;queue.push(plugins[i].name)}}}else if(plugins){for(key in plugins){if(plugins.hasOwnProperty(key)){self.plugins.settings[key]=plugins[key];queue.push(key)}}}while(queue.length){self.require(queue.shift())}};Interface.prototype.loadPlugin=function(name){var self=this;var plugins=self.plugins;var plugin=Interface.plugins[name];if(!Interface.plugins.hasOwnProperty(name)){throw new Error('Unable to find "'+name+'" plugin')}plugins.requested[name]=true;plugins.loaded[name]=plugin.fn.apply(self,[self.plugins.settings[name]||{}]);plugins.names.push(name)};Interface.prototype.require=function(name){var self=this;var plugins=self.plugins;if(!self.plugins.loaded.hasOwnProperty(name)){if(plugins.requested[name]){throw new Error('Plugin has circular dependency ("'+name+'")')}self.loadPlugin(name)}return plugins.loaded[name]};Interface.define=function(name,fn){Interface.plugins[name]={name:name,fn:fn}}};var utils={isArray:Array.isArray||function(vArg){return Object.prototype.toString.call(vArg)==="[object Array]"}};var Sifter=function(items,settings){this.items=items;this.settings=settings||{diacritics:true}};Sifter.prototype.tokenize=function(query,respect_word_boundaries){query=trim(String(query||"").toLowerCase());if(!query||!query.length)return[];var i,n,regex,letter;var tokens=[];var words=query.split(/ +/);for(i=0,n=words.length;i<n;i++){regex=escape_regex(words[i]);if(this.settings.diacritics){for(letter in DIACRITICS){if(DIACRITICS.hasOwnProperty(letter)){regex=regex.replace(new RegExp(letter,"g"),DIACRITICS[letter])}}}if(respect_word_boundaries)regex="\\b"+regex;tokens.push({string:words[i],regex:new RegExp(regex,"i")})}return tokens};Sifter.prototype.iterator=function(object,callback){var iterator;if(is_array(object)){iterator=Array.prototype.forEach||function(callback){for(var i=0,n=this.length;i<n;i++){callback(this[i],i,this)}}}else{iterator=function(callback){for(var key in this){if(this.hasOwnProperty(key)){callback(this[key],key,this)}}}}iterator.apply(object,[callback])};Sifter.prototype.getScoreFunction=function(search,options){var self,fields,tokens,token_count,nesting;self=this;search=self.prepareSearch(search,options);tokens=search.tokens;fields=search.options.fields;token_count=tokens.length;nesting=search.options.nesting;var scoreValue=function(value,token){var score,pos;if(!value)return 0;value=String(value||"");pos=value.search(token.regex);if(pos===-1)return 0;score=token.string.length/value.length;if(pos===0)score+=.5;return score};var scoreObject=function(){var field_count=fields.length;if(!field_count){return function(){return 0}}if(field_count===1){return function(token,data){return scoreValue(getattr(data,fields[0],nesting),token)}}return function(token,data){for(var i=0,sum=0;i<field_count;i++){sum+=scoreValue(getattr(data,fields[i],nesting),token)}return sum/field_count}}();if(!token_count){return function(){return 0}}if(token_count===1){return function(data){return scoreObject(tokens[0],data)}}if(search.options.conjunction==="and"){return function(data){var score;for(var i=0,sum=0;i<token_count;i++){score=scoreObject(tokens[i],data);if(score<=0)return 0;sum+=score}return sum/token_count}}else{return function(data){for(var i=0,sum=0;i<token_count;i++){sum+=scoreObject(tokens[i],data)}return sum/token_count}}};Sifter.prototype.getSortFunction=function(search,options){var i,n,self,field,fields,fields_count,multiplier,multipliers,get_field,implicit_score,sort;self=this;search=self.prepareSearch(search,options);sort=!search.query&&options.sort_empty||options.sort;get_field=function(name,result){if(name==="$score")return result.score;return getattr(self.items[result.id],name,options.nesting)};fields=[];if(sort){for(i=0,n=sort.length;i<n;i++){if(search.query||sort[i].field!=="$score"){fields.push(sort[i])}}}if(search.query){implicit_score=true;for(i=0,n=fields.length;i<n;i++){if(fields[i].field==="$score"){implicit_score=false;break}}if(implicit_score){fields.unshift({field:"$score",direction:"desc"})}}else{for(i=0,n=fields.length;i<n;i++){if(fields[i].field==="$score"){fields.splice(i,1);break}}}multipliers=[];for(i=0,n=fields.length;i<n;i++){multipliers.push(fields[i].direction==="desc"?-1:1)}fields_count=fields.length;if(!fields_count){return null}else if(fields_count===1){field=fields[0].field;multiplier=multipliers[0];return function(a,b){return multiplier*cmp(get_field(field,a),get_field(field,b))}}else{return function(a,b){var i,result,a_value,b_value,field;for(i=0;i<fields_count;i++){field=fields[i].field;result=multipliers[i]*cmp(get_field(field,a),get_field(field,b));if(result)return result}return 0}}};Sifter.prototype.prepareSearch=function(query,options){if(typeof query==="object")return query;options=extend({},options);var option_fields=options.fields;var option_sort=options.sort;var option_sort_empty=options.sort_empty;if(option_fields&&!is_array(option_fields))options.fields=[option_fields];if(option_sort&&!is_array(option_sort))options.sort=[option_sort];if(option_sort_empty&&!is_array(option_sort_empty))options.sort_empty=[option_sort_empty];return{options:options,query:String(query||"").toLowerCase(),tokens:this.tokenize(query,options.respect_word_boundaries),total:0,items:[]}};Sifter.prototype.search=function(query,options){var self=this,value,score,search,calculateScore;var fn_sort;var fn_score;search=this.prepareSearch(query,options);options=search.options;query=search.query;fn_score=options.score||self.getScoreFunction(search);if(query.length){self.iterator(self.items,function(item,id){score=fn_score(item);if(options.filter===false||score>0){search.items.push({score:score,id:id})}})}else{self.iterator(self.items,function(item,id){search.items.push({score:1,id:id})})}fn_sort=self.getSortFunction(search,options);if(fn_sort)search.items.sort(fn_sort);search.total=search.items.length;if(typeof options.limit==="number"){search.items=search.items.slice(0,options.limit)}return search};var cmp=function(a,b){if(typeof a==="number"&&typeof b==="number"){return a>b?1:a<b?-1:0}a=asciifold(String(a||""));b=asciifold(String(b||""));if(a>b)return 1;if(b>a)return-1;return 0};var extend=function(a,b){var i,n,k,object;for(i=1,n=arguments.length;i<n;i++){object=arguments[i];if(!object)continue;for(k in object){if(object.hasOwnProperty(k)){a[k]=object[k]}}}return a};var getattr=function(obj,name,nesting){if(!obj||!name)return;if(!nesting)return obj[name];var names=name.split(".");while(names.length&&(obj=obj[names.shift()]));return obj};var trim=function(str){return(str+"").replace(/^\s+|\s+$|/g,"")};var escape_regex=function(str){return(str+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")};var is_array=Array.isArray||typeof $!=="undefined"&&$.isArray||function(object){return Object.prototype.toString.call(object)==="[object Array]"};var DIACRITICS={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄＣｃ]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅＤｄð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇＥｅɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪＩｉ]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟＬｌ]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴＮｎŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"};var asciifold=function(){var i,n,k,chunk;var foreignletters="";var lookup={};for(k in DIACRITICS){if(DIACRITICS.hasOwnProperty(k)){chunk=DIACRITICS[k].substring(2,DIACRITICS[k].length-1);foreignletters+=chunk;for(i=0,n=chunk.length;i<n;i++){lookup[chunk.charAt(i)]=k}}}var regexp=new RegExp("["+foreignletters+"]","g");return function(str){return str.replace(regexp,function(foreignletter){return lookup[foreignletter]}).toLowerCase()}}();function uaDetect(platform,re){if(navigator.userAgentData){return platform===navigator.userAgentData.platform}return re.test(navigator.userAgent)}var IS_MAC=uaDetect("macOS",/Mac/);var KEY_A=65;var KEY_COMMA=188;var KEY_RETURN=13;var KEY_ESC=27;var KEY_LEFT=37;var KEY_UP=38;var KEY_P=80;var KEY_RIGHT=39;var KEY_DOWN=40;var KEY_N=78;var KEY_BACKSPACE=8;var KEY_DELETE=46;var KEY_SHIFT=16;var KEY_CMD=IS_MAC?91:17;var KEY_CTRL=IS_MAC?18:17;var KEY_TAB=9;var TAG_SELECT=1;var TAG_INPUT=2;var SUPPORTS_VALIDITY_API=!uaDetect("Android",/android/i)&&!!document.createElement("input").validity;var isset=function(object){return typeof object!=="undefined"};var hash_key=function(value){if(typeof value==="undefined"||value===null)return null;if(typeof value==="boolean")return value?"1":"0";return value+""};var escape_html=function(str){return(str+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};var escape_replace=function(str){return(str+"").replace(/\$/g,"$$$$")};var hook={};hook.before=function(self,method,fn){var original=self[method];self[method]=function(){fn.apply(self,arguments);return original.apply(self,arguments)}};hook.after=function(self,method,fn){var original=self[method];self[method]=function(){var result=original.apply(self,arguments);fn.apply(self,arguments);return result}};var once=function(fn){var called=false;return function(){if(called)return;called=true;fn.apply(this,arguments)}};var debounce=function(fn,delay){var timeout;return function(){var self=this;var args=arguments;window.clearTimeout(timeout);timeout=window.setTimeout(function(){fn.apply(self,args)},delay)}};var debounce_events=function(self,types,fn){var type;var trigger=self.trigger;var event_args={};self.trigger=function(){var type=arguments[0];if(types.indexOf(type)!==-1){event_args[type]=arguments}else{return trigger.apply(self,arguments)}};fn.apply(self,[]);self.trigger=trigger;for(type in event_args){if(event_args.hasOwnProperty(type)){trigger.apply(self,event_args[type])}}};var watchChildEvent=function($parent,event,selector,fn){$parent.on(event,selector,function(e){var child=e.target;while(child&&child.parentNode!==$parent[0]){child=child.parentNode}e.currentTarget=child;return fn.apply(this,[e])})};var getInputSelection=function(input){var result={};if(input===undefined){console.warn("WARN getInputSelection cannot locate input control");return result}if("selectionStart"in input){result.start=input.selectionStart;result.length=input.selectionEnd-result.start}else if(document.selection){input.focus();var sel=document.selection.createRange();var selLen=document.selection.createRange().text.length;sel.moveStart("character",-input.value.length);result.start=sel.text.length-selLen;result.length=selLen}return result};var transferStyles=function($from,$to,properties){var i,n,styles={};if(properties){for(i=0,n=properties.length;i<n;i++){styles[properties[i]]=$from.css(properties[i])}}else{styles=$from.css()}$to.css(styles)};var measureString=function(str,$parent){if(!str){return 0}if(!Selectize.$testInput){Selectize.$testInput=$("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"});$("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(Selectize.$testInput).appendTo("body")}Selectize.$testInput.text(str);transferStyles($parent,Selectize.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);return Selectize.$testInput.width()};var autoGrow=function($input){var currentWidth=null;var update=function(e,options){var value,keyCode,printable,width;var placeholder,placeholderWidth;var shift,character,selection;e=e||window.event||{};options=options||{};if(e.metaKey||e.altKey)return;if(!options.force&&$input.data("grow")===false)return;value=$input.val();if(e.type&&e.type.toLowerCase()==="keydown"){keyCode=e.keyCode;printable=keyCode>=48&&keyCode<=57||keyCode>=65&&keyCode<=90||keyCode>=96&&keyCode<=111||keyCode>=186&&keyCode<=222||keyCode===32;if(keyCode===KEY_DELETE||keyCode===KEY_BACKSPACE){selection=getInputSelection($input[0]);if(selection.length){value=value.substring(0,selection.start)+value.substring(selection.start+selection.length)}else if(keyCode===KEY_BACKSPACE&&selection.start){value=value.substring(0,selection.start-1)+value.substring(selection.start+1)}else if(keyCode===KEY_DELETE&&typeof selection.start!=="undefined"){value=value.substring(0,selection.start)+value.substring(selection.start+1)}}else if(printable){shift=e.shiftKey;character=String.fromCharCode(e.keyCode);if(shift)character=character.toUpperCase();else character=character.toLowerCase();value+=character}}placeholder=$input.attr("placeholder");if(placeholder){placeholderWidth=measureString(placeholder,$input)+4}else{placeholderWidth=0}width=Math.max(measureString(value,$input),placeholderWidth)+4;if(width!==currentWidth){currentWidth=width;$input.width(width);$input.triggerHandler("resize")}};$input.on("keydown keyup update blur",update);update()};var domToString=function(d){var tmp=document.createElement("div");tmp.appendChild(d.cloneNode(true));return tmp.innerHTML};var logError=function(message,options){if(!options)options={};var component="Selectize";console.error(component+": "+message);if(options.explanation){if(console.group)console.group();console.error(options.explanation);if(console.group)console.groupEnd()}};var isJSON=function(data){try{JSON.parse(str)}catch(e){return false}return true};var Selectize=function($input,settings){var key,i,n,dir,input,self=this;input=$input[0];input.selectize=self;var computedStyle=window.getComputedStyle&&window.getComputedStyle(input,null);dir=computedStyle?computedStyle.getPropertyValue("direction"):input.currentStyle&&input.currentStyle.direction;dir=dir||$input.parents("[dir]:first").attr("dir")||"";$.extend(self,{order:0,settings:settings,$input:$input,tabIndex:$input.attr("tabindex")||"",tagType:input.tagName.toLowerCase()==="select"?TAG_SELECT:TAG_INPUT,rtl:/rtl/i.test(dir),eventNS:".selectize"+ ++Selectize.count,highlightedValue:null,isBlurring:false,isOpen:false,isDisabled:false,isRequired:$input.is("[required]"),isInvalid:false,isLocked:false,isFocused:false,isInputHidden:false,isSetup:false,isShiftDown:false,isCmdDown:false,isCtrlDown:false,ignoreFocus:false,ignoreBlur:false,ignoreHover:false,hasOptions:false,currentResults:null,lastValue:"",lastValidValue:"",lastOpenTarget:false,caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:false,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:settings.loadThrottle===null?self.onSearchChange:debounce(self.onSearchChange,settings.loadThrottle)});self.sifter=new Sifter(this.options,{diacritics:settings.diacritics});if(self.settings.options){for(i=0,n=self.settings.options.length;i<n;i++){self.registerOption(self.settings.options[i])}delete self.settings.options}if(self.settings.optgroups){for(i=0,n=self.settings.optgroups.length;i<n;i++){self.registerOptionGroup(self.settings.optgroups[i])}delete self.settings.optgroups}self.settings.mode=self.settings.mode||(self.settings.maxItems===1?"single":"multi");if(typeof self.settings.hideSelected!=="boolean"){self.settings.hideSelected=self.settings.mode==="multi"}self.initializePlugins(self.settings.plugins);self.setupCallbacks();self.setupTemplates();self.setup()};MicroEvent.mixin(Selectize);MicroPlugin.mixin(Selectize);$.extend(Selectize.prototype,{setup:function(){var self=this;var settings=self.settings;var eventNS=self.eventNS;var $window=$(window);var $document=$(document);var $input=self.$input;var $wrapper;var $control;var $control_input;var $dropdown;var $dropdown_content;var $dropdown_parent;var inputMode;var timeout_blur;var timeout_focus;var classes;var classes_plugins;var inputId;inputMode=self.settings.mode;classes=$input.attr("class")||"";$wrapper=$("<div>").addClass(settings.wrapperClass).addClass(classes+" selectize-control").addClass(inputMode);$control=$("<div>").addClass(settings.inputClass+" selectize-input items").appendTo($wrapper);$control_input=$('<input type="select-one" autocomplete="new-password" autofill="no" />').appendTo($control).attr("tabindex",$input.is(":disabled")?"-1":self.tabIndex);$dropdown_parent=$(settings.dropdownParent||$wrapper);$dropdown=$("<div>").addClass(settings.dropdownClass).addClass(inputMode+" selectize-dropdown").hide().appendTo($dropdown_parent);$dropdown_content=$("<div>").addClass(settings.dropdownContentClass+" selectize-dropdown-content").attr("tabindex","-1").appendTo($dropdown);if(inputId=$input.attr("id")){$control_input.attr("id",inputId+"-selectized");$("label[for='"+inputId+"']").attr("for",inputId+"-selectized")}if(self.settings.copyClassesToDropdown){$dropdown.addClass(classes)}$wrapper.css({width:$input[0].style.width});if(self.plugins.names.length){classes_plugins="plugin-"+self.plugins.names.join(" plugin-");$wrapper.addClass(classes_plugins);$dropdown.addClass(classes_plugins)}if((settings.maxItems===null||settings.maxItems>1)&&self.tagType===TAG_SELECT){$input.attr("multiple","multiple")}if(self.settings.placeholder){$control_input.attr("placeholder",settings.placeholder)}if(!self.settings.search){$control_input.attr("readonly",true);$control_input.attr("inputmode","none");$control.css("cursor","pointer")}if(!self.settings.splitOn&&self.settings.delimiter){var delimiterEscaped=self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");self.settings.splitOn=new RegExp("\\s*"+delimiterEscaped+"+\\s*")}if($input.attr("autocorrect")){$control_input.attr("autocorrect",$input.attr("autocorrect"))}if($input.attr("autocapitalize")){$control_input.attr("autocapitalize",$input.attr("autocapitalize"))}if($input.is("input")){$control_input[0].type=$input[0].type}self.$wrapper=$wrapper;self.$control=$control;self.$control_input=$control_input;self.$dropdown=$dropdown;self.$dropdown_content=$dropdown_content;$dropdown.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",function(e){e.stopImmediatePropagation()});$dropdown.on("mouseenter","[data-selectable]",function(){return self.onOptionHover.apply(self,arguments)});$dropdown.on("mouseup click","[data-selectable]",function(){return self.onOptionSelect.apply(self,arguments)});watchChildEvent($control,"mouseup","*:not(input)",function(){return self.onItemSelect.apply(self,arguments)});autoGrow($control_input);$control.on({mousedown:function(){return self.onMouseDown.apply(self,arguments)},click:function(){return self.onClick.apply(self,arguments)}});$control_input.on({mousedown:function(e){if(self.$control_input.val()!==""||self.settings.openOnFocus){e.stopPropagation()}},keydown:function(){return self.onKeyDown.apply(self,arguments)},keypress:function(){return self.onKeyPress.apply(self,arguments)},input:function(){return self.onInput.apply(self,arguments)},resize:function(){self.positionDropdown.apply(self,[])},focus:function(){self.ignoreBlur=false;return self.onFocus.apply(self,arguments)},paste:function(){return self.onPaste.apply(self,arguments)}});$document.on("keydown"+eventNS,function(e){self.isCmdDown=e[IS_MAC?"metaKey":"ctrlKey"];self.isCtrlDown=e[IS_MAC?"altKey":"ctrlKey"];self.isShiftDown=e.shiftKey});$document.on("keyup"+eventNS,function(e){if(e.keyCode===KEY_CTRL)self.isCtrlDown=false;if(e.keyCode===KEY_SHIFT)self.isShiftDown=false;if(e.keyCode===KEY_CMD)self.isCmdDown=false});$document.on("mousedown"+eventNS,function(e){if(self.isFocused){if(e.target===self.$dropdown[0]||e.target.parentNode===self.$dropdown[0]){return false}if(!self.$dropdown.has(e.target).length&&e.target!==self.$control[0]){self.blur(e.target)}}});$window.on(["scroll"+eventNS,"resize"+eventNS].join(" "),function(){if(self.isOpen){self.positionDropdown.apply(self,arguments)}});$window.on("mousemove"+eventNS,function(){self.ignoreHover=self.settings.ignoreHover});var inputPlaceholder=$("<div></div>");var inputChildren=$input.children().detach();$input.replaceWith(inputPlaceholder);inputPlaceholder.replaceWith($input);this.revertSettings={$children:inputChildren,tabindex:$input.attr("tabindex")};$input.attr("tabindex",-1).hide().after(self.$wrapper);if(Array.isArray(settings.items)){self.lastValidValue=settings.items;self.setValue(settings.items);delete settings.items}if(SUPPORTS_VALIDITY_API){$input.on("invalid"+eventNS,function(e){e.preventDefault();self.isInvalid=true;self.refreshState()})}self.updateOriginalInput();self.refreshItems();self.refreshState();self.updatePlaceholder();self.isSetup=true;if($input.is(":disabled")){self.disable()}self.on("change",this.onChange);$input.data("selectize",self);$input.addClass("selectized");self.trigger("initialize");if(settings.preload===true){self.onSearchChange("")}},setupTemplates:function(){var self=this;var field_label=self.settings.labelField;var field_value=self.settings.valueField;var field_optgroup=self.settings.optgroupLabelField;var templates={optgroup:function(data){return'<div class="optgroup">'+data.html+"</div>"},optgroup_header:function(data,escape){return'<div class="optgroup-header">'+escape(data[field_optgroup])+"</div>"},option:function(data,escape){var classes=data.classes?" "+data.classes:"";classes+=data[field_value]===""?" selectize-dropdown-emptyoptionlabel":"";var styles=data.styles?' style="'+data.styles+'"':"";return"<div"+styles+' class="option'+classes+'">'+escape(data[field_label])+"</div>"},item:function(data,escape){return'<div class="item">'+escape(data[field_label])+"</div>"},option_create:function(data,escape){return'<div class="create">Add <strong>'+escape(data.input)+"</strong>&#x2026;</div>"}};self.settings.render=$.extend({},templates,self.settings.render)},setupCallbacks:function(){var key,fn,callbacks={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(key in callbacks){if(callbacks.hasOwnProperty(key)){fn=this.settings[callbacks[key]];if(fn)this.on(key,fn)}}},onClick:function(e){var self=this;if(self.isDropdownClosing){return}if(!self.isFocused||!self.isOpen){self.focus();e.preventDefault()}},onMouseDown:function(e){var self=this;var defaultPrevented=e.isDefaultPrevented();var $target=$(e.target);if(!self.isFocused){if(!defaultPrevented){window.setTimeout(function(){self.focus()},0)}}if(e.target!==self.$control_input[0]||self.$control_input.val()===""){if(self.settings.mode==="single"){self.isOpen?self.close():self.open()}else{if(!defaultPrevented){self.setActiveItem(null)}if(!self.settings.openOnFocus){if(self.isOpen&&e.target===self.lastOpenTarget){self.close();self.lastOpenTarget=false}else if(!self.isOpen){self.refreshOptions();self.open();self.lastOpenTarget=e.target}else{self.lastOpenTarget=e.target}}}return false}},onChange:function(){var self=this;if(self.getValue()!==""){self.lastValidValue=self.getValue()}this.$input.trigger("input");this.$input.trigger("change")},onPaste:function(e){var self=this;if(self.isFull()||self.isInputHidden||self.isLocked){e.preventDefault();return}if(self.settings.splitOn){setTimeout(function(){var pastedText=self.$control_input.val();if(!pastedText.match(self.settings.splitOn)){return}var splitInput=pastedText.trim().split(self.settings.splitOn);for(var i=0,n=splitInput.length;i<n;i++){self.createItem(splitInput[i])}},0)}},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var character=String.fromCharCode(e.keyCode||e.which);if(this.settings.create&&this.settings.mode==="multi"&&character===this.settings.delimiter){this.createItem();e.preventDefault();return false}},onKeyDown:function(e){var isInput=e.target===this.$control_input[0];var self=this;if(self.isLocked){if(e.keyCode!==KEY_TAB){e.preventDefault()}return}switch(e.keyCode){case KEY_A:if(self.isCmdDown){self.selectAll();return}break;case KEY_ESC:if(self.isOpen){e.preventDefault();e.stopPropagation();self.close()}return;case KEY_N:if(!e.ctrlKey||e.altKey)break;case KEY_DOWN:if(!self.isOpen&&self.hasOptions){self.open()}else if(self.$activeOption){self.ignoreHover=true;var $next=self.getAdjacentOption(self.$activeOption,1);if($next.length)self.setActiveOption($next,true,true)}e.preventDefault();return;case KEY_P:if(!e.ctrlKey||e.altKey)break;case KEY_UP:if(self.$activeOption){self.ignoreHover=true;var $prev=self.getAdjacentOption(self.$activeOption,-1);if($prev.length)self.setActiveOption($prev,true,true)}e.preventDefault();return;case KEY_RETURN:if(self.isOpen&&self.$activeOption){self.onOptionSelect({currentTarget:self.$activeOption});e.preventDefault()}return;case KEY_LEFT:self.advanceSelection(-1,e);return;case KEY_RIGHT:self.advanceSelection(1,e);return;case KEY_TAB:if(self.settings.selectOnTab&&self.isOpen&&self.$activeOption){self.onOptionSelect({currentTarget:self.$activeOption});if(!self.isFull()){e.preventDefault()}}if(self.settings.create&&self.createItem()&&self.settings.showAddOptionOnCreate){e.preventDefault()}return;case KEY_BACKSPACE:case KEY_DELETE:self.deleteSelection(e);return}if((self.isFull()||self.isInputHidden)&&!(IS_MAC?e.metaKey:e.ctrlKey)){e.preventDefault();return}},onInput:function(e){var self=this;var value=self.$control_input.val()||"";if(self.lastValue!==value){self.lastValue=value;self.onSearchChange(value);self.refreshOptions();self.trigger("type",value)}},onSearchChange:function(value){var self=this;var fn=self.settings.load;if(!fn)return;if(self.loadedSearches.hasOwnProperty(value))return;self.loadedSearches[value]=true;self.load(function(callback){fn.apply(self,[value,callback])})},onFocus:function(e){var self=this;var wasFocused=self.isFocused;if(self.isDisabled){self.blur();e&&e.preventDefault();return false}if(self.ignoreFocus)return;self.isFocused=true;if(self.settings.preload==="focus")self.onSearchChange("");if(!wasFocused)self.trigger("focus");if(!self.$activeItems.length){self.showInput();self.setActiveItem(null);self.refreshOptions(!!self.settings.openOnFocus)}self.refreshState()},onBlur:function(e,dest){var self=this;if(!self.isFocused)return;self.isFocused=false;if(self.ignoreFocus){return}var deactivate=function(){self.close();self.setTextboxValue("");self.setActiveItem(null);self.setActiveOption(null);self.setCaret(self.items.length);self.refreshState();dest&&dest.focus&&dest.focus();self.isBlurring=false;self.ignoreFocus=false;self.trigger("blur")};self.isBlurring=true;self.ignoreFocus=true;if(self.settings.create&&self.settings.createOnBlur){self.createItem(null,false,deactivate)}else{deactivate()}},onOptionHover:function(e){if(this.ignoreHover)return;this.setActiveOption(e.currentTarget,false)},onOptionSelect:function(e){var value,$target,$option,self=this;if(e.preventDefault){e.preventDefault();e.stopPropagation()}$target=$(e.currentTarget);if($target.hasClass("create")){self.createItem(null,function(){if(self.settings.closeAfterSelect){self.close()}})}else{value=$target.attr("data-value");if(typeof value!=="undefined"){self.lastQuery=null;self.setTextboxValue("");self.addItem(value);if(self.settings.closeAfterSelect){self.close()}else if(!self.settings.hideSelected&&e.type&&/mouse/.test(e.type)){self.setActiveOption(self.getOption(value))}}}},onItemSelect:function(e){var self=this;if(self.isLocked)return;if(self.settings.mode==="multi"){e.preventDefault();self.setActiveItem(e.currentTarget,e)}},load:function(fn){var self=this;var $wrapper=self.$wrapper.addClass(self.settings.loadingClass);self.loading++;fn.apply(self,[function(results){self.loading=Math.max(self.loading-1,0);if(results&&results.length){self.addOption(results);self.refreshOptions(self.isFocused&&!self.isInputHidden)}if(!self.loading){$wrapper.removeClass(self.settings.loadingClass)}self.trigger("load",results)}])},getTextboxValue:function(){var $input=this.$control_input;return $input.val()},setTextboxValue:function(value){var $input=this.$control_input;var changed=$input.val()!==value;if(changed){$input.val(value).triggerHandler("update");this.lastValue=value}},getValue:function(){if(this.tagType===TAG_SELECT&&this.$input.attr("multiple")){return this.items}else{return this.items.join(this.settings.delimiter)}},setValue:function(value,silent){const items=Array.isArray(value)?value:[value];if(items.join("")===this.items.join("")){return}var events=silent?[]:["change"];debounce_events(this,events,function(){this.clear(silent);this.addItems(value,silent)})},setMaxItems:function(value){if(value===0)value=null;this.settings.maxItems=value;this.settings.mode=this.settings.mode||(this.settings.maxItems===1?"single":"multi");this.refreshState()},setActiveItem:function($item,e){var self=this;var eventName;var i,idx,begin,end,item,swap;var $last;if(self.settings.mode==="single")return;$item=$($item);if(!$item.length){$(self.$activeItems).removeClass("active");self.$activeItems=[];if(self.isFocused){self.showInput()}return}eventName=e&&e.type.toLowerCase();if(eventName==="mousedown"&&self.isShiftDown&&self.$activeItems.length){$last=self.$control.children(".active:last");begin=Array.prototype.indexOf.apply(self.$control[0].childNodes,[$last[0]]);end=Array.prototype.indexOf.apply(self.$control[0].childNodes,[$item[0]]);if(begin>end){swap=begin;begin=end;end=swap}for(i=begin;i<=end;i++){item=self.$control[0].childNodes[i];if(self.$activeItems.indexOf(item)===-1){$(item).addClass("active");self.$activeItems.push(item)}}e.preventDefault()}else if(eventName==="mousedown"&&self.isCtrlDown||eventName==="keydown"&&this.isShiftDown){if($item.hasClass("active")){idx=self.$activeItems.indexOf($item[0]);self.$activeItems.splice(idx,1);$item.removeClass("active")}else{self.$activeItems.push($item.addClass("active")[0])}}else{$(self.$activeItems).removeClass("active");self.$activeItems=[$item.addClass("active")[0]]}self.hideInput();if(!this.isFocused){self.focus()}},setActiveOption:function($option,scroll,animate){var height_menu,height_item,y;var scroll_top,scroll_bottom;var self=this;if(self.$activeOption){self.$activeOption.removeClass("active");self.trigger("dropdown_item_deactivate",self.$activeOption.attr("data-value"))}self.$activeOption=null;$option=$($option);if(!$option.length)return;self.$activeOption=$option.addClass("active");if(self.isOpen)self.trigger("dropdown_item_activate",self.$activeOption.attr("data-value"));if(scroll||!isset(scroll)){height_menu=self.$dropdown_content.height();height_item=self.$activeOption.outerHeight(true);scroll=self.$dropdown_content.scrollTop()||0;y=self.$activeOption.offset().top-self.$dropdown_content.offset().top+scroll;scroll_top=y;scroll_bottom=y-height_menu+height_item;if(y+height_item>height_menu+scroll){self.$dropdown_content.stop().animate({scrollTop:scroll_bottom},animate?self.settings.scrollDuration:0)}else if(y<scroll){self.$dropdown_content.stop().animate({scrollTop:scroll_top},animate?self.settings.scrollDuration:0)}}},selectAll:function(){var self=this;if(self.settings.mode==="single")return;self.$activeItems=Array.prototype.slice.apply(self.$control.children(":not(input)").addClass("active"));if(self.$activeItems.length){self.hideInput();self.close()}self.focus()},hideInput:function(){var self=this;self.setTextboxValue("");self.$control_input.css({opacity:0,position:"absolute",left:self.rtl?1e4:0});self.isInputHidden=true},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0});this.isInputHidden=false},focus:function(){var self=this;if(self.isDisabled)return self;self.ignoreFocus=true;self.$control_input[0].focus();window.setTimeout(function(){self.ignoreFocus=false;self.onFocus()},0);return self},blur:function(dest){this.$control_input[0].blur();this.onBlur(null,dest);return this},getScoreFunction:function(query){return this.sifter.getScoreFunction(query,this.getSearchOptions())},getSearchOptions:function(){var settings=this.settings;var sort=settings.sortField;if(typeof sort==="string"){sort=[{field:sort}]}return{fields:settings.searchField,conjunction:settings.searchConjunction,sort:sort,nesting:settings.nesting,filter:settings.filter,respect_word_boundaries:settings.respect_word_boundaries}},search:function(query){var i,value,score,result,calculateScore;var self=this;var settings=self.settings;var options=this.getSearchOptions();if(settings.score){calculateScore=self.settings.score.apply(this,[query]);if(typeof calculateScore!=="function"){throw new Error('Selectize "score" setting must be a function that returns a function')}}if(query!==self.lastQuery){if(settings.normalize)query=query.normalize("NFD").replace(/[\u0300-\u036f]/g,"");self.lastQuery=query;result=self.sifter.search(query,$.extend(options,{score:calculateScore}));self.currentResults=result}else{result=$.extend(true,{},self.currentResults)}if(settings.hideSelected){for(i=result.items.length-1;i>=0;i--){if(self.items.indexOf(hash_key(result.items[i].id))!==-1){result.items.splice(i,1)}}}return result},refreshOptions:function(triggerDropdown){var i,j,k,n,groups,groups_order,option,option_html,optgroup,optgroups,html,html_children,has_create_option;var $active,$active_before,$create;if(typeof triggerDropdown==="undefined"){triggerDropdown=true}var self=this;var query=self.$control_input.val().trim();var results=self.search(query);var $dropdown_content=self.$dropdown_content;var active_before=self.$activeOption&&hash_key(self.$activeOption.attr("data-value"));n=results.items.length;if(typeof self.settings.maxOptions==="number"){n=Math.min(n,self.settings.maxOptions)}groups={};groups_order=[];for(i=0;i<n;i++){option=self.options[results.items[i].id];option_html=self.render("option",option);optgroup=option[self.settings.optgroupField]||"";optgroups=Array.isArray(optgroup)?optgroup:[optgroup];for(j=0,k=optgroups&&optgroups.length;j<k;j++){optgroup=optgroups[j];if(!self.optgroups.hasOwnProperty(optgroup)&&typeof self.settings.optionGroupRegister==="function"){var regGroup;if(regGroup=self.settings.optionGroupRegister.apply(self,[optgroup])){self.registerOptionGroup(regGroup)}}if(!self.optgroups.hasOwnProperty(optgroup)){optgroup=""}if(!groups.hasOwnProperty(optgroup)){groups[optgroup]=document.createDocumentFragment();groups_order.push(optgroup)}groups[optgroup].appendChild(option_html)}}if(this.settings.lockOptgroupOrder){groups_order.sort(function(a,b){var a_order=self.optgroups[a]&&self.optgroups[a].$order||0;var b_order=self.optgroups[b]&&self.optgroups[b].$order||0;return a_order-b_order})}html=document.createDocumentFragment();for(i=0,n=groups_order.length;i<n;i++){optgroup=groups_order[i];if(self.optgroups.hasOwnProperty(optgroup)&&groups[optgroup].childNodes.length){html_children=document.createDocumentFragment();html_children.appendChild(self.render("optgroup_header",self.optgroups[optgroup]));html_children.appendChild(groups[optgroup]);html.appendChild(self.render("optgroup",$.extend({},self.optgroups[optgroup],{html:domToString(html_children),dom:html_children})))}else{html.appendChild(groups[optgroup])}}$dropdown_content.html(html);if(self.settings.highlight){$dropdown_content.removeHighlight();if(results.query.length&&results.tokens.length){for(i=0,n=results.tokens.length;i<n;i++){highlight($dropdown_content,results.tokens[i].regex)}}}if(!self.settings.hideSelected){self.$dropdown.find(".selected").removeClass("selected");for(i=0,n=self.items.length;i<n;i++){self.getOption(self.items[i]).addClass("selected")}}if(self.settings.dropdownSize.sizeType!=="auto"&&self.isOpen){self.setupDropdownHeight()}has_create_option=self.canCreate(query);if(has_create_option){if(self.settings.showAddOptionOnCreate){$dropdown_content.prepend(self.render("option_create",{input:query}));$create=$($dropdown_content[0].childNodes[0])}}self.hasOptions=results.items.length>0||has_create_option&&self.settings.showAddOptionOnCreate||self.settings.setFirstOptionActive;if(self.hasOptions){if(results.items.length>0){$active_before=active_before&&self.getOption(active_before);if(results.query!==""&&self.settings.setFirstOptionActive){$active=$dropdown_content.find("[data-selectable]:first")}else if(results.query!==""&&$active_before&&$active_before.length){$active=$active_before}else if(self.settings.mode==="single"&&self.items.length){$active=self.getOption(self.items[0])}if(!$active||!$active.length){if($create&&!self.settings.addPrecedence){$active=self.getAdjacentOption($create,1)}else{$active=$dropdown_content.find("[data-selectable]:first")}}}else{$active=$create}self.setActiveOption($active);if(triggerDropdown&&!self.isOpen){self.open()}}else{self.setActiveOption(null);if(triggerDropdown&&self.isOpen){self.close()}}},addOption:function(data){var i,n,value,self=this;if(Array.isArray(data)){for(i=0,n=data.length;i<n;i++){self.addOption(data[i])}return}if(value=self.registerOption(data)){self.userOptions[value]=true;self.lastQuery=null;self.trigger("option_add",value,data)}},registerOption:function(data){var key=hash_key(data[this.settings.valueField]);if(typeof key==="undefined"||key===null||this.options.hasOwnProperty(key))return false;data.$order=data.$order||++this.order;this.options[key]=data;return key},registerOptionGroup:function(data){var key=hash_key(data[this.settings.optgroupValueField]);if(!key)return false;data.$order=data.$order||++this.order;this.optgroups[key]=data;return key},addOptionGroup:function(id,data){data[this.settings.optgroupValueField]=id;if(id=this.registerOptionGroup(data)){this.trigger("optgroup_add",id,data)}},removeOptionGroup:function(id){if(this.optgroups.hasOwnProperty(id)){delete this.optgroups[id];this.renderCache={};this.trigger("optgroup_remove",id)}},clearOptionGroups:function(){this.optgroups={};this.renderCache={};this.trigger("optgroup_clear")},updateOption:function(value,data){var self=this;var $item,$item_new;var value_new,index_item,cache_items,cache_options,order_old;value=hash_key(value);value_new=hash_key(data[self.settings.valueField]);if(value===null)return;if(!self.options.hasOwnProperty(value))return;if(typeof value_new!=="string")throw new Error("Value must be set in option data");order_old=self.options[value].$order;if(value_new!==value){delete self.options[value];index_item=self.items.indexOf(value);if(index_item!==-1){self.items.splice(index_item,1,value_new)}}data.$order=data.$order||order_old;self.options[value_new]=data;cache_items=self.renderCache["item"];cache_options=self.renderCache["option"];if(cache_items){delete cache_items[value];delete cache_items[value_new]}if(cache_options){delete cache_options[value];delete cache_options[value_new]}if(self.items.indexOf(value_new)!==-1){$item=self.getItem(value);$item_new=$(self.render("item",data));if($item.hasClass("active"))$item_new.addClass("active");$item.replaceWith($item_new)}self.lastQuery=null;if(self.isOpen){self.refreshOptions(false)}},removeOption:function(value,silent){var self=this;value=hash_key(value);var cache_items=self.renderCache["item"];var cache_options=self.renderCache["option"];if(cache_items)delete cache_items[value];if(cache_options)delete cache_options[value];delete self.userOptions[value];delete self.options[value];self.lastQuery=null;self.trigger("option_remove",value);self.removeItem(value,silent)},clearOptions:function(silent){var self=this;self.loadedSearches={};self.userOptions={};self.renderCache={};var options=self.options;$.each(self.options,function(key,value){if(self.items.indexOf(key)==-1){delete options[key]}});self.options=self.sifter.items=options;self.lastQuery=null;self.trigger("option_clear");self.clear(silent)},getOption:function(value){return this.getElementWithValue(value,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var $options=this.$dropdown.find("[data-selectable]");return $options.length>0?$options.eq(0):$()},getAdjacentOption:function($option,direction){var $options=this.$dropdown.find("[data-selectable]");var index=$options.index($option)+direction;return index>=0&&index<$options.length?$options.eq(index):$()},getElementWithValue:function(value,$els){value=hash_key(value);if(typeof value!=="undefined"&&value!==null){for(var i=0,n=$els.length;i<n;i++){if($els[i].getAttribute("data-value")===value){return $($els[i])}}}return $()},getElementWithTextContent:function(textContent,ignoreCase,$els){textContent=hash_key(textContent);if(typeof textContent!=="undefined"&&textContent!==null){for(var i=0,n=$els.length;i<n;i++){var eleTextContent=$els[i].textContent;if(ignoreCase==true){eleTextContent=eleTextContent!==null?eleTextContent.toLowerCase():null;textContent=textContent.toLowerCase()}if(eleTextContent===textContent){return $($els[i])}}}return $()},getItem:function(value){return this.getElementWithValue(value,this.$control.children())},getFirstItemMatchedByTextContent:function(textContent,ignoreCase){ignoreCase=ignoreCase!==null&&ignoreCase===true?true:false;return this.getElementWithTextContent(textContent,ignoreCase,this.$dropdown_content.find("[data-selectable]"))},addItems:function(values,silent){this.buffer=document.createDocumentFragment();var childNodes=this.$control[0].childNodes;for(var i=0;i<childNodes.length;i++){this.buffer.appendChild(childNodes[i])}var items=Array.isArray(values)?values:[values];for(var i=0,n=items.length;i<n;i++){this.isPending=i<n-1;this.addItem(items[i],silent)}var control=this.$control[0];control.insertBefore(this.buffer,control.firstChild);this.buffer=null},addItem:function(value,silent){var events=silent?[]:["change"];debounce_events(this,events,function(){var $item,$option,$options;var self=this;var inputMode=self.settings.mode;var i,active,value_next,wasFull;value=hash_key(value);if(self.items.indexOf(value)!==-1){if(inputMode==="single")self.close();return}if(!self.options.hasOwnProperty(value))return;if(inputMode==="single")self.clear(silent);if(inputMode==="multi"&&self.isFull())return;$item=$(self.render("item",self.options[value]));wasFull=self.isFull();self.items.splice(self.caretPos,0,value);self.insertAtCaret($item);if(!self.isPending||!wasFull&&self.isFull()){self.refreshState()}if(self.isSetup){$options=self.$dropdown_content.find("[data-selectable]");if(!self.isPending){$option=self.getOption(value);value_next=self.getAdjacentOption($option,1).attr("data-value");self.refreshOptions(self.isFocused&&inputMode!=="single");if(value_next){self.setActiveOption(self.getOption(value_next))}}if(!$options.length||self.isFull()){self.close()}else if(!self.isPending){self.positionDropdown()}self.updatePlaceholder();self.trigger("item_add",value,$item);if(!self.isPending){self.updateOriginalInput({silent:silent})}}})},removeItem:function(value,silent){var self=this;var $item,i,idx;$item=value instanceof $?value:self.getItem(value);value=hash_key($item.attr("data-value"));i=self.items.indexOf(value);if(i!==-1){self.trigger("item_before_remove",value,$item);$item.remove();if($item.hasClass("active")){$item.removeClass("active");idx=self.$activeItems.indexOf($item[0]);self.$activeItems.splice(idx,1);$item.removeClass("active")}self.items.splice(i,1);self.lastQuery=null;if(!self.settings.persist&&self.userOptions.hasOwnProperty(value)){self.removeOption(value,silent)}if(i<self.caretPos){self.setCaret(self.caretPos-1)}self.refreshState();self.updatePlaceholder();self.updateOriginalInput({silent:silent});self.positionDropdown();self.trigger("item_remove",value,$item)}},createItem:function(input,triggerDropdown){var self=this;var caret=self.caretPos;input=input||(self.$control_input.val()||"").trim();var callback=arguments[arguments.length-1];if(typeof callback!=="function")callback=function(){};if(typeof triggerDropdown!=="boolean"){triggerDropdown=true}if(!self.canCreate(input)){callback();return false}self.lock();var setup=typeof self.settings.create==="function"?this.settings.create:function(input){var data={};data[self.settings.labelField]=input;var key=input;if(self.settings.formatValueToKey&&typeof self.settings.formatValueToKey==="function"){key=self.settings.formatValueToKey.apply(this,[key]);if(key===null||typeof key==="undefined"||typeof key==="object"||typeof key==="function"){throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.')}}data[self.settings.valueField]=key;return data};var create=once(function(data){self.unlock();if(!data||typeof data!=="object")return callback();var value=hash_key(data[self.settings.valueField]);if(typeof value!=="string")return callback();self.setTextboxValue("");self.addOption(data);self.setCaret(caret);self.addItem(value);self.refreshOptions(triggerDropdown&&self.settings.mode!=="single");callback(data)});var output=setup.apply(this,[input,create]);if(typeof output!=="undefined"){create(output)}return true},refreshItems:function(silent){this.lastQuery=null;if(this.isSetup){this.addItem(this.items,silent)}this.refreshState();this.updateOriginalInput({silent:silent})},refreshState:function(){this.refreshValidityState();this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return false;var invalid=!this.items.length;this.isInvalid=invalid;this.$control_input.prop("required",invalid);this.$input.prop("required",!invalid)},refreshClasses:function(){var self=this;var isFull=self.isFull();var isLocked=self.isLocked;self.$wrapper.toggleClass("rtl",self.rtl);self.$control.toggleClass("focus",self.isFocused).toggleClass("disabled",self.isDisabled).toggleClass("required",self.isRequired).toggleClass("invalid",self.isInvalid).toggleClass("locked",isLocked).toggleClass("full",isFull).toggleClass("not-full",!isFull).toggleClass("input-active",self.isFocused&&!self.isInputHidden).toggleClass("dropdown-active",self.isOpen).toggleClass("has-options",!$.isEmptyObject(self.options)).toggleClass("has-items",self.items.length>0);self.$control_input.data("grow",!isFull&&!isLocked)},isFull:function(){return this.settings.maxItems!==null&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(opts){var i,n,existing,fresh,old,$options,label,value,values,self=this;opts=opts||{};if(self.tagType===TAG_SELECT){$options=self.$input.find("option");existing=[];fresh=[];old=[];values=[];$options.get().forEach(function(option){existing.push(option.value)});self.items.forEach(function(item){label=self.options[item][self.settings.labelField]||"";values.push(item);if(existing.indexOf(item)!=-1){return}fresh.push('<option value="'+escape_html(item)+'" selected="selected">'+escape_html(label)+"</option>")});old=existing.filter(function(value){return values.indexOf(value)<0}).map(function(value){return'option[value="'+value+'"]'});if(existing.length-old.length+fresh.length===0&&!self.$input.attr("multiple")){fresh.push('<option value="" selected="selected"></option>')}self.$input.find(old.join(", ")).remove();self.$input.append(fresh.join(""))}else{self.$input.val(self.getValue());self.$input.attr("value",self.$input.val())}if(self.isSetup){if(!opts.silent){self.trigger("change",self.$input.val())}}},updatePlaceholder:function(){if(!this.settings.placeholder)return;var $input=this.$control_input;if(this.items.length){$input.removeAttr("placeholder")}else{$input.attr("placeholder",this.settings.placeholder)}$input.triggerHandler("update",{force:true})},open:function(){var self=this;if(self.isLocked||self.isOpen||self.settings.mode==="multi"&&self.isFull())return;self.focus();self.isOpen=true;self.refreshState();self.$dropdown.css({visibility:"hidden",display:"block"});self.setupDropdownHeight();self.positionDropdown();self.$dropdown.css({visibility:"visible"});self.trigger("dropdown_open",self.$dropdown)},close:function(){var self=this;var trigger=self.isOpen;if(self.settings.mode==="single"&&self.items.length){self.hideInput();if(self.isBlurring){self.$control_input[0].blur()}}self.isOpen=false;self.$dropdown.hide();self.setActiveOption(null);self.refreshState();if(trigger)self.trigger("dropdown_close",self.$dropdown)},positionDropdown:function(){var $control=this.$control;var offset=this.settings.dropdownParent==="body"?$control.offset():$control.position();offset.top+=$control.outerHeight(true);var w=$control[0].getBoundingClientRect().width;if(this.settings.minWidth&&this.settings.minWidth>w){w=this.settings.minWidth}this.$dropdown.css({width:w,top:offset.top,left:offset.left})},setupDropdownHeight:function(){if(typeof this.settings.dropdownSize==="object"&&this.settings.dropdownSize.sizeType!=="auto"){var height=this.settings.dropdownSize.sizeValue;if(this.settings.dropdownSize.sizeType==="numberItems"){var $items=this.$dropdown_content.find("*").not(".optgroup, .highlight").not(this.settings.ignoreOnDropwdownHeight);var totalHeight=0;var marginTop=0;var marginBottom=0;var separatorHeight=0;for(var i=0;i<height;i++){var $item=$($items[i]);if($item.length===0){break}totalHeight+=$item.outerHeight(true);if(typeof $item.data("selectable")=="undefined"){if($item.hasClass("optgroup-header")){var styles=window.getComputedStyle($item.parent()[0],":before");if(styles){marginTop=styles.marginTop?Number(styles.marginTop.replace(/\W*(\w)\w*/g,"$1")):0;marginBottom=styles.marginBottom?Number(styles.marginBottom.replace(/\W*(\w)\w*/g,"$1")):0;separatorHeight=styles.borderTopWidth?Number(styles.borderTopWidth.replace(/\W*(\w)\w*/g,"$1")):0}}height++}}var paddingTop=this.$dropdown_content.css("padding-top")?Number(this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1")):0;var paddingBottom=this.$dropdown_content.css("padding-bottom")?Number(this.$dropdown_content.css("padding-bottom").replace(/\W*(\w)\w*/g,"$1")):0;height=totalHeight+paddingTop+paddingBottom+marginTop+marginBottom+separatorHeight+"px"}else if(this.settings.dropdownSize.sizeType!=="fixedHeight"){console.warn('Selectize.js - Value of "sizeType" must be "fixedHeight" or "numberItems');return}this.$dropdown_content.css({height:height,maxHeight:"none"})}},clear:function(silent){var self=this;if(!self.items.length)return;self.$control.children(":not(input)").remove();self.items=[];self.lastQuery=null;self.setCaret(0);self.setActiveItem(null);self.updatePlaceholder();self.updateOriginalInput({silent:silent});self.refreshState();self.showInput();self.trigger("clear")},insertAtCaret:function($el){var caret=Math.min(this.caretPos,this.items.length);var el=$el[0];var target=this.buffer||this.$control[0];if(caret===0){target.insertBefore(el,target.firstChild)}else{target.insertBefore(el,target.childNodes[caret])}this.setCaret(caret+1)},deleteSelection:function(e){var i,n,direction,selection,values,caret,option_select,$option_select,$tail;var self=this;direction=e&&e.keyCode===KEY_BACKSPACE?-1:1;selection=getInputSelection(self.$control_input[0]);if(self.$activeOption&&!self.settings.hideSelected){if(typeof self.settings.deselectBehavior==="string"&&self.settings.deselectBehavior==="top"){option_select=self.getFirstOption().attr("data-value")}else{option_select=self.getAdjacentOption(self.$activeOption,-1).attr("data-value")}}values=[];if(self.$activeItems.length){$tail=self.$control.children(".active:"+(direction>0?"last":"first"));caret=self.$control.children(":not(input)").index($tail);if(direction>0){caret++}for(i=0,n=self.$activeItems.length;i<n;i++){values.push($(self.$activeItems[i]).attr("data-value"))}if(e){e.preventDefault();e.stopPropagation()}}else if((self.isFocused||self.settings.mode==="single")&&self.items.length){if(direction<0&&selection.start===0&&selection.length===0){values.push(self.items[self.caretPos-1])}else if(direction>0&&selection.start===self.$control_input.val().length){values.push(self.items[self.caretPos])}}if(!values.length||typeof self.settings.onDelete==="function"&&self.settings.onDelete.apply(self,[values])===false){return false}if(typeof caret!=="undefined"){self.setCaret(caret)}while(values.length){self.removeItem(values.pop())}self.showInput();self.positionDropdown();self.refreshOptions(true);if(option_select){$option_select=self.getOption(option_select);if($option_select.length){self.setActiveOption($option_select)}}return true},advanceSelection:function(direction,e){var tail,selection,idx,valueLength,cursorAtEdge,$tail;var self=this;if(direction===0)return;if(self.rtl)direction*=-1;tail=direction>0?"last":"first";selection=getInputSelection(self.$control_input[0]);if(self.isFocused&&!self.isInputHidden){valueLength=self.$control_input.val().length;cursorAtEdge=direction<0?selection.start===0&&selection.length===0:selection.start===valueLength;if(cursorAtEdge&&!valueLength){self.advanceCaret(direction,e)}}else{$tail=self.$control.children(".active:"+tail);if($tail.length){idx=self.$control.children(":not(input)").index($tail);self.setActiveItem(null);self.setCaret(direction>0?idx+1:idx)}}},advanceCaret:function(direction,e){var self=this,fn,$adj;if(direction===0)return;fn=direction>0?"next":"prev";if(self.isShiftDown){$adj=self.$control_input[fn]();if($adj.length){self.hideInput();self.setActiveItem($adj);e&&e.preventDefault()}}else{self.setCaret(self.caretPos+direction)}},setCaret:function(i){var self=this;if(self.settings.mode==="single"){i=self.items.length}else{i=Math.max(0,Math.min(self.items.length,i))}if(!self.isPending){var j,n,fn,$children,$child;$children=self.$control.children(":not(input)");for(j=0,n=$children.length;j<n;j++){$child=$($children[j]).detach();if(j<i){self.$control_input.before($child)}else{self.$control.append($child)}}}self.caretPos=i},lock:function(){this.close();this.isLocked=true;this.refreshState()},unlock:function(){this.isLocked=false;this.refreshState()},disable:function(){var self=this;self.$input.prop("disabled",true);self.$control_input.prop("disabled",true).prop("tabindex",-1);self.isDisabled=true;self.lock()},enable:function(){var self=this;self.$input.prop("disabled",false);self.$control_input.prop("disabled",false).prop("tabindex",self.tabIndex);self.isDisabled=false;self.unlock()},destroy:function(){var self=this;var eventNS=self.eventNS;var revertSettings=self.revertSettings;self.trigger("destroy");self.off();self.$wrapper.remove();self.$dropdown.remove();self.$input.html("").append(revertSettings.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:revertSettings.tabindex}).show();self.$control_input.removeData("grow");self.$input.removeData("selectize");if(--Selectize.count==0&&Selectize.$testInput){Selectize.$testInput.remove();Selectize.$testInput=undefined}$(window).off(eventNS);$(document).off(eventNS);$(document.body).off(eventNS);delete self.$input[0].selectize},render:function(templateName,data){var value,id,label;var html="";var cache=false;var self=this;var regex_tag=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;if(templateName==="option"||templateName==="item"){value=hash_key(data[self.settings.valueField]);cache=!!value}if(cache){if(!isset(self.renderCache[templateName])){self.renderCache[templateName]={}}if(self.renderCache[templateName].hasOwnProperty(value)){return self.renderCache[templateName][value]}}html=$(self.settings.render[templateName].apply(this,[data,escape_html]));if(templateName==="option"||templateName==="option_create"){if(!data[self.settings.disabledField]){html.attr("data-selectable","")}}else if(templateName==="optgroup"){id=data[self.settings.optgroupValueField]||"";html.attr("data-group",id);if(data[self.settings.disabledField]){html.attr("data-disabled","")}}if(templateName==="option"||templateName==="item"){html.attr("data-value",value||"")}if(cache){self.renderCache[templateName][value]=html[0]}return html[0]},clearCache:function(templateName){var self=this;if(typeof templateName==="undefined"){self.renderCache={}}else{delete self.renderCache[templateName]}},canCreate:function(input){var self=this;if(!self.settings.create)return false;var filter=self.settings.createFilter;return input.length&&(typeof filter!=="function"||filter.apply(self,[input]))&&(typeof filter!=="string"||new RegExp(filter).test(input))&&(!(filter instanceof RegExp)||filter.test(input))}});Selectize.count=0;Selectize.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:true,diacritics:true,create:false,showAddOptionOnCreate:true,createOnBlur:false,createFilter:null,highlight:true,openOnFocus:true,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:false,selectOnTab:true,preload:false,allowEmptyOption:false,showEmptyOptionInDropdown:false,emptyOptionLabel:"--",setFirstOptionActive:false,closeAfterSelect:false,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:false,sortField:"$order",searchField:["text"],searchConjunction:"and",respect_word_boundaries:true,mode:null,wrapperClass:"",inputClass:"",dropdownClass:"",dropdownContentClass:"",dropdownParent:null,copyClassesToDropdown:true,dropdownSize:{sizeType:"auto",sizeValue:"auto"},normalize:false,ignoreOnDropwdownHeight:"img, i",search:true,render:{}};$.fn.em_selectize=function(settings_user){var defaults=$.fn.em_selectize.defaults;var settings=$.extend({},defaults,settings_user);var attr_data=settings.dataAttr;var field_label=settings.labelField;var field_value=settings.valueField;var field_disabled=settings.disabledField;var field_optgroup=settings.optgroupField;var field_optgroup_label=settings.optgroupLabelField;var field_optgroup_value=settings.optgroupValueField;var init_textbox=function($input,settings_element){var i,n,values,option;var data_raw=$input.attr(attr_data);if(!data_raw){var value=($input.val()||"").trim();if(!settings.allowEmptyOption&&!value.length)return;values=value.split(settings.delimiter);for(i=0,n=values.length;i<n;i++){option={};option[field_label]=values[i];option[field_value]=values[i];settings_element.options.push(option)}settings_element.items=values}else{settings_element.options=JSON.parse(data_raw);for(i=0,n=settings_element.options.length;i<n;i++){settings_element.items.push(settings_element.options[i][field_value])}}};var init_select=function($input,settings_element){var i,n,tagName,$children,order=0;var options=settings_element.options;var optionsMap={};var readData=function($el){var data=attr_data&&$el.attr(attr_data);var allData=$el.data();var obj={};if(typeof data==="string"&&data.length){if(isJSON(data)){Object.assign(obj,JSON.parse(data))}else{obj[data]=data}}Object.assign(obj,allData);return obj||null};var addOption=function($option,group){$option=$($option);var value=hash_key($option.val());if(!value&&!settings.allowEmptyOption)return;if(optionsMap.hasOwnProperty(value)){if(group){var arr=optionsMap[value][field_optgroup];if(!arr){optionsMap[value][field_optgroup]=group}else if(!Array.isArray(arr)){optionsMap[value][field_optgroup]=[arr,group]}else{arr.push(group)}}return}var option=readData($option)||{};option[field_label]=option[field_label]||$option.text();option[field_value]=option[field_value]||value;option[field_disabled]=option[field_disabled]||$option.prop("disabled");option[field_optgroup]=option[field_optgroup]||group;option.styles=$option.attr("style")||"";option.classes=$option.attr("class")||"";optionsMap[value]=option;options.push(option);if($option.is(":selected")){settings_element.items.push(value)}};var addGroup=function($optgroup){var i,n,id,optgroup,$options;$optgroup=$($optgroup);id=$optgroup.attr("label");if(id){optgroup=readData($optgroup)||{};optgroup[field_optgroup_label]=id;optgroup[field_optgroup_value]=id;optgroup[field_disabled]=$optgroup.prop("disabled");settings_element.optgroups.push(optgroup)}$options=$("option",$optgroup);for(i=0,n=$options.length;i<n;i++){addOption($options[i],id)}};settings_element.maxItems=$input.attr("multiple")?null:1;$children=$input.children();for(i=0,n=$children.length;i<n;i++){tagName=$children[i].tagName.toLowerCase();if(tagName==="optgroup"){addGroup($children[i])}else if(tagName==="option"){addOption($children[i])}}};return this.each(function(){if(this.selectize)return;var instance;var $input=$(this);var tag_name=this.tagName.toLowerCase();var placeholder=$input.attr("placeholder")||$input.attr("data-placeholder");if(!placeholder&&!settings.allowEmptyOption){placeholder=$input.children('option[value=""]').text()}if(settings.allowEmptyOption&&settings.showEmptyOptionInDropdown&&!$input.children('option[value=""]').length){var input_html=$input.html();var label=escape_html(settings.emptyOptionLabel||"--");$input.html('<option value="">'+label+"</option>"+input_html)}var settings_element={placeholder:placeholder,options:[],optgroups:[],items:[]};if(tag_name==="select"){init_select($input,settings_element)}else{init_textbox($input,settings_element)}instance=new Selectize($input,$.extend(true,{},defaults,settings_element,settings_user));instance.settings_user=settings_user})};$.fn.em_selectize.defaults=Selectize.defaults;$.fn.em_selectize.support={validity:SUPPORTS_VALIDITY_API};Selectize.define("auto_position",function(){var self=this;const POSITION={top:"top",bottom:"bottom"};self.positionDropdown=function(){return function(){const $control=this.$control;const offset=this.settings.dropdownParent==="body"?$control.offset():$control.position();offset.top+=$control.outerHeight(true);const dropdownHeight=this.$dropdown.prop("scrollHeight")+5;const controlPosTop=this.$control.get(0).getBoundingClientRect().top;const wrapperHeight=this.$wrapper.height();const position=controlPosTop+dropdownHeight+wrapperHeight>window.innerHeight?POSITION.top:POSITION.bottom;const styles={width:$control.outerWidth(),left:offset.left};if(position===POSITION.top){const styleToAdd={bottom:offset.top,top:"unset"};if(this.settings.dropdownParent==="body"){styleToAdd.top=offset.top-this.$dropdown.outerHeight(true)-$control.outerHeight(true);styleToAdd.bottom="unset"}Object.assign(styles,styleToAdd);this.$dropdown.addClass("selectize-position-top");this.$control.addClass("selectize-position-top")}else{Object.assign(styles,{top:offset.top,bottom:"unset"});this.$dropdown.removeClass("selectize-position-top");this.$control.removeClass("selectize-position-top")}this.$dropdown.css(styles)}}()});Selectize.define("auto_select_on_type",function(options){var self=this;self.onBlur=function(){var originalBlur=self.onBlur;return function(e){var $matchedItem=self.getFirstItemMatchedByTextContent(self.lastValue,true);if(typeof $matchedItem.attr("data-value")!=="undefined"&&self.getValue()!==$matchedItem.attr("data-value")){self.setValue($matchedItem.attr("data-value"))}return originalBlur.apply(this,arguments)}}()});Selectize.define("autofill_disable",function(options){var self=this;self.setup=function(){var original=self.setup;return function(){original.apply(self,arguments);self.$control_input.attr({autocomplete:"new-password",autofill:"no"})}}()});Selectize.define("clear_button",function(options){var self=this;options=$.extend({title:"Clear",className:"clear",label:"×",html:function(data){return'<a class="'+data.className+'" title="'+data.title+'"> '+data.label+"</a>"}},options);self.setup=function(){var original=self.setup;return function(){original.apply(self,arguments);self.$button_clear=$(options.html(options));if(self.settings.mode==="single")self.$wrapper.addClass("single");self.$wrapper.append(self.$button_clear);if(self.getValue()===""||self.getValue().length===0){self.$wrapper.find("."+options.className).css("display","none")}self.on("change",function(){if(self.getValue()===""||self.getValue().length===0){self.$wrapper.find("."+options.className).css("display","none")}else{self.$wrapper.find("."+options.className).css("display","")}});self.$wrapper.on("click","."+options.className,function(e){e.preventDefault();e.stopImmediatePropagation();e.stopPropagation();if(self.isLocked)return;self.clear();self.$wrapper.find("."+options.className).css("display","none")})}}()});Selectize.define("drag_drop",function(options){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if(this.settings.mode!=="multi")return;var self=this;self.lock=function(){var original=self.lock;return function(){var sortable=self.$control.data("sortable");if(sortable)sortable.disable();return original.apply(self,arguments)}}();self.unlock=function(){var original=self.unlock;return function(){var sortable=self.$control.data("sortable");if(sortable)sortable.enable();return original.apply(self,arguments)}}();self.setup=function(){var original=self.setup;return function(){original.apply(this,arguments);var $control=self.$control.sortable({items:"[data-value]",forcePlaceholderSize:true,disabled:self.isLocked,start:function(e,ui){ui.placeholder.css("width",ui.helper.css("width"));$control.addClass("dragging")},stop:function(){$control.removeClass("dragging");var active=self.$activeItems?self.$activeItems.slice():null;var values=[];$control.children("[data-value]").each(function(){values.push($(this).attr("data-value"))});self.isFocused=false;self.setValue(values);self.isFocused=true;self.setActiveItem(active);self.positionDropdown()}})}}()});Selectize.define("dropdown_header",function(options){var self=this;options=$.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(data){return'<div class="'+data.headerClass+'">'+'<div class="'+data.titleRowClass+'">'+'<span class="'+data.labelClass+'">'+data.title+"</span>"+'<a href="javascript:void(0)" class="'+data.closeClass+'">&#xd7;</a>'+"</div>"+"</div>"}},options);self.setup=function(){var original=self.setup;return function(){original.apply(self,arguments);self.$dropdown_header=$(options.html(options));self.$dropdown.prepend(self.$dropdown_header);self.$dropdown_header.find("."+options.closeClass).on("click",function(){self.close()})}}()});Selectize.define("optgroup_columns",function(options){var self=this;options=$.extend({equalizeWidth:true,equalizeHeight:true},options);this.getAdjacentOption=function($option,direction){var $options=$option.closest("[data-group]").find("[data-selectable]");var index=$options.index($option)+direction;return index>=0&&index<$options.length?$options.eq(index):$()};this.onKeyDown=function(){var original=self.onKeyDown;return function(e){var index,$option,$options,$optgroup;if(this.isOpen&&(e.keyCode===KEY_LEFT||e.keyCode===KEY_RIGHT)){self.ignoreHover=true;$optgroup=this.$activeOption.closest("[data-group]");index=$optgroup.find("[data-selectable]").index(this.$activeOption);if(e.keyCode===KEY_LEFT){$optgroup=$optgroup.prev("[data-group]")}else{$optgroup=$optgroup.next("[data-group]")}$options=$optgroup.find("[data-selectable]");$option=$options.eq(Math.min($options.length-1,index));if($option.length){this.setActiveOption($option)}return}return original.apply(this,arguments)}}();var getScrollbarWidth=function(){var div;var width=getScrollbarWidth.width;var doc=document;if(typeof width==="undefined"){div=doc.createElement("div");div.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';div=div.firstChild;doc.body.appendChild(div);width=getScrollbarWidth.width=div.offsetWidth-div.clientWidth;doc.body.removeChild(div)}return width};var equalizeSizes=function(){var i,n,height_max,width,width_last,width_parent,$optgroups;$optgroups=$("[data-group]",self.$dropdown_content);n=$optgroups.length;if(!n||!self.$dropdown_content.width())return;if(options.equalizeHeight){height_max=0;for(i=0;i<n;i++){height_max=Math.max(height_max,$optgroups.eq(i).height())}$optgroups.css({height:height_max})}if(options.equalizeWidth){width_parent=self.$dropdown_content.innerWidth()-getScrollbarWidth();width=Math.round(width_parent/n);$optgroups.css({width:width});if(n>1){width_last=width_parent-width*(n-1);$optgroups.eq(n-1).css({width:width_last})}}};if(options.equalizeHeight||options.equalizeWidth){hook.after(this,"positionDropdown",equalizeSizes);hook.after(this,"refreshOptions",equalizeSizes)}});Selectize.define("remove_button",function(options){if(this.settings.mode==="single")return;options=$.extend({label:"&#xd7;",title:"Remove",className:"remove",append:true},options);var multiClose=function(thisRef,options){var self=thisRef;var html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+"</a>";var append=function(html_container,html_element){var pos=html_container.search(/(<\/[^>]+>\s*)$/);return html_container.substring(0,pos)+html_element+html_container.substring(pos)};thisRef.setup=function(){var original=self.setup;return function(){if(options.append){var render_item=self.settings.render.item;self.settings.render.item=function(data){return append(render_item.apply(thisRef,arguments),html)}}original.apply(thisRef,arguments);thisRef.$control.on("click","."+options.className,function(e){e.preventDefault();if(self.isLocked)return;var $item=$(e.currentTarget).parent();self.setActiveItem($item);if(self.deleteSelection()){self.setCaret(self.items.length)}return false})}}()};multiClose(this,options)});Selectize.define("restore_on_backspace",function(options){var self=this;options.text=options.text||function(option){return option[this.settings.labelField]};this.onKeyDown=function(){var original=self.onKeyDown;return function(e){var index,option;if(e.keyCode===KEY_BACKSPACE&&this.$control_input.val()===""&&!this.$activeItems.length){index=this.caretPos-1;if(index>=0&&index<this.items.length){option=this.options[this.items[index]];if(this.deleteSelection(e)){this.setTextboxValue(options.text.apply(this,[option]));this.refreshOptions(true)}e.preventDefault();return}}return original.apply(this,arguments)}}()});Selectize.define("select_on_focus",function(options){var self=this;self.on("focus",function(){var originalFocus=self.onFocus;return function(e){var value=self.getItem(self.getValue()).text();self.clear();self.setTextboxValue(value);self.$control_input.select();setTimeout(function(){if(self.settings.selectOnTab){self.setActiveOption(self.getFirstItemMatchedByTextContent(value))}self.settings.score=null},0);return originalFocus.apply(this,arguments)}}());self.onBlur=function(){var originalBlur=self.onBlur;return function(e){if(self.getValue()===""&&self.lastValidValue!==self.getValue()){self.setValue(self.lastValidValue)}setTimeout(function(){self.settings.score=function(){return function(){return 1}}},0);return originalBlur.apply(this,arguments)}}();self.settings.score=function(){return function(){return 1}}});Selectize.define("tag_limit",function(options){const self=this;options.tagLimit=options.tagLimit;this.onBlur=function(e){const original=self.onBlur;return function(e){original.apply(this,e);if(!e)return;const $control=this.$control;const $items=$control.find(".item");const limit=options.tagLimit;if(limit===undefined||$items.length<=limit)return;$items.toArray().forEach(function(item,index){if(index<limit)return;$(item).hide()});$control.append("<span><b>"+($items.length-limit)+"</b></span>")}}();this.onFocus=function(e){const original=self.onFocus;return function(e){original.apply(this,e);if(!e)return;const $control=this.$control;const $items=$control.find(".item");$items.show();$control.find("span").remove()}}()});return Selectize});
/*!
 * selectize click2deselect (custom)
 */
/* Selectize deselect function */
EM_Selectize.define("click2deselect",function(options){var self=this;var setup=self.setup;this.setup=function(){setup.apply(self,arguments);let just_added;self.$dropdown.each(function(){this.addEventListener("click",function(e){let target=e.target.matches(".selected[data-selectable]")?e.target:e.target.closest(".selected[data-selectable]");if(target!==null){let value=target.getAttribute("data-value");if(value!==just_added){self.removeItem(value);self.refreshItems();self.refreshOptions()}}just_added=false;return false})});self.on("item_remove",function(value){self.getOption(value).removeClass("selected")});self.on("item_add",function(value){just_added=value})}});

/*! Sortable 1.15.2 - MIT | git://github.com/SortableJS/Sortable.git */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function I(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,n;e=o,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}function o(t){return(o="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})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,o=arguments[e];for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var n,o=function(t,e){if(null==t)return{};for(var n,o={},i=Object.keys(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n]);return o}function r(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var y=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),w=t(/Edge/i),s=t(/firefox/i),u=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),n=t(/iP(ad|od|hone)/i),c=t(/chrome/i)&&t(/android/i),d={capture:!1,passive:!1};function h(t,e,n){t.addEventListener(e,n,!y&&d)}function f(t,e,n){t.removeEventListener(e,n,!y&&d)}function p(t,e){if(e&&(">"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&p(t,e)||o&&t===n)return t}while(t!==n&&(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode))}var i;return null}var g,m=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(m," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(m," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function b(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function O(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d=t!==window&&t.parentNode&&t!==O()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth);if((e||n)&&t!==window&&(i=i||t.parentNode,!y))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);return o&&t!==window&&(o=(e=v(i||t))&&e.a,t=e&&e.d,e&&(s=(a/=t)+(u/=t),c=(l/=o)+(d/=o))),{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=M(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===O())break;o=M(o,!1)}return!1}function B(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Ft.ghost&&(o||a[r]!==Ft.dragged)&&P(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function F(t,e){for(var n=t.lastElementChild;n&&(n===Ft.ghost||"none"===R(n,"display")||e&&!p(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ft.clone||e&&!p(t,e)||n++;return n}function E(t){var e=0,n=0,o=O();if(t)do{var i=v(t),r=i.a,i=i.d}while(e+=t.scrollLeft*r,n+=t.scrollTop*i,t!==o&&(t=t.parentNode));return[e,n]}function M(t,e){if(!t||!t.getBoundingClientRect)return O();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return O();if(o||e)return n;o=!0}}}while(n=n.parentNode);return O()}function D(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function S(e,n){return function(){var t;g||(1===(t=arguments).length?e.call(this,t[0]):e.apply(this,t),g=setTimeout(function(){g=void 0},n))}}function H(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function _(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function C(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function T(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}function L(n,o,i){var r={};return Array.from(n.children).forEach(function(t){var e;P(t,o.draggable,n,!1)&&!t.animated&&t!==i&&(e=X(t),r.left=Math.min(null!==(t=r.left)&&void 0!==t?t:1/0,e.left),r.top=Math.min(null!==(t=r.top)&&void 0!==t?t:1/0,e.top),r.right=Math.max(null!==(t=r.right)&&void 0!==t?t:-1/0,e.right),r.bottom=Math.max(null!==(t=r.bottom)&&void 0!==t?t:-1/0,e.bottom))}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var K="Sortable"+(new Date).getTime();function x(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){var e,n;"none"!==R(t,"display")&&t!==Ft.ghost&&(o.push({target:t,rect:X(t)}),e=I({},o[o.length-1].rect),!t.thisAnimationDuration||(n=v(t,!0))&&(e.top-=n.f,e.left-=n.e),t.fromRect=e)})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=v(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&D(r,i)&&!D(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(t=l,s=r,r=a,a=c.options,e=Math.sqrt(Math.pow(s.top-t.top,2)+Math.pow(s.left-t.left,2))/Math.sqrt(Math.pow(s.top-r.top,2)+Math.pow(s.left-r.left,2))*a.animation),D(i,o)||(n.prevFromRect=o,n.prevToRect=i,e=e||c.options.animation,c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){var i,r;o&&(R(t,"transition",""),R(t,"transform",""),i=(r=v(this.el))&&r.a,r=r&&r.d,i=(e.left-n.left)/(i||1),r=(e.top-n.top)/(r||1),t.animatingX=!!i,t.animatingY=!!r,R(t,"transform","translate3d("+i+"px,"+r+"px,0)"),this.forRepaintDummy=t.offsetWidth,R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o))}}}var A=[],N={initializeByDefault:!0},W={mount:function(e){for(var t in N)!N.hasOwnProperty(t)||t in e||(e[t]=N[t]);A.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),A.push(e)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";A.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(n,o,i,t){for(var e in A.forEach(function(t){var e=t.pluginName;(n.options[e]||t.initializeByDefault)&&((t=new t(n,o,n.options)).sortable=n,t.options=n.options,n[e]=t,a(i,t.defaults))}),n.options){var r;n.options.hasOwnProperty(e)&&(void 0!==(r=this.modifyOption(n,e,n.options[e]))&&(n.options[e]=r))}},getEventProperties:function(e,n){var o={};return A.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return A.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function z(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,f=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[K]){var g,m=e.options,t="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||y||w?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var v,b=I(I({},p),W.getEventProperties(o,e));for(v in b)g[v]=b[v];n&&n.dispatchEvent(g),m[t]&&m[t].call(e,g)}}function G(t,e){var n=(o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,o=i(o,U);W.pluginEvent.bind(Ft)(t,e,I({dragEl:V,parentEl:Z,ghostEl:$,rootEl:Q,nextEl:J,lastDownEl:tt,cloneEl:et,cloneHidden:nt,dragStarted:gt,putSortable:st,activeSortable:Ft.active,originalEvent:n,oldIndex:ot,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:at,hideGhostForTarget:Rt,unhideGhostForTarget:Xt,cloneNowHidden:function(){nt=!0},cloneNowShown:function(){nt=!1},dispatchSortableEvent:function(t){q({sortable:e,name:t,originalEvent:n})}},o))}var U=["evt"];function q(t){z(I({putSortable:st,cloneEl:et,targetEl:V,rootEl:Q,oldIndex:ot,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:at},t))}var V,Z,$,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,mt,vt,bt,yt,wt=!1,Et=!1,Dt=[],St=!1,_t=!1,Ct=[],Tt=!1,xt=[],Ot="undefined"!=typeof document,Mt=n,At=w||y?"cssFloat":"float",Nt=Ot&&!c&&!n&&"draggable"in document.createElement("div"),It=function(){if(Ot){if(y)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=B(t,0,e),r=B(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,t=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){e="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==e?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[At]||r&&"none"===n[At]&&o<s+t)?"vertical":"horizontal"},kt=function(t){function l(r,a){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==r&&(a||i))return!0;if(null==r||!1===r)return!1;if(a&&"clone"===r)return r;if("function"==typeof r)return l(r(t,e,n,o),a)(t,e,n,o);e=(a?t:e).options.group.name;return!0===r||"string"==typeof r&&r===e||r.join&&-1<r.indexOf(e)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=l(n.pull,!0),e.checkPut=l(n.put),e.revertClone=n.revertClone,t.group=e},Rt=function(){!It&&$&&R($,"display","none")},Xt=function(){!It&&$&&R($,"display","")};Ot&&!c&&document.addEventListener("click",function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1},!0);function Yt(t){if(V){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Dt.some(function(t){var e=t[K].options.emptyInsertThreshold;if(e&&!F(t)){var n=X(t),o=i>=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function Bt(t){V&&V.parentNode[K]._isOutsideThisEl(t.target)}function Ft(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ft.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(n in W.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in kt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Nt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,x())}function jt(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Ht(t){t.draggable=!1}function Lt(){Tt=!1}function Kt(t){return setTimeout(t,0)}function Wt(t){return clearTimeout(t)}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(mt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){xt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&xt.push(o)}}(o),!V&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||tt===l)){if(ot=j(l),rt=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return q({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),G("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return q({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),G("filter",n,{evt:e}),!0}))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!V&&n.parentNode===r&&(o=X(n),Q=r,Z=(V=n).parentNode,J=V.nextSibling,tt=n,lt=a.group,ct={target:Ft.dragged=V,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ct.clientX-o.left,pt=ct.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,V.style["will-change"]="all",o=function(){G("delayEnded",i,{evt:t}),Ft.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(t,e),q({sortable:i,name:"choose",originalEvent:t}),k(V,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){b(V,t.trim(),Ht)}),h(l,"dragover",Yt),h(l,"mousemove",Yt),h(l,"touchmove",Yt),h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),G("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():Ft.eventCanceled?this._onDrop():(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Ht(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;f(t,"mouseup",this._disableDelayedDrag),f(t,"touchend",this._disableDelayedDrag),f(t,"touchcancel",this._disableDelayedDrag),f(t,"mousemove",this._delayedDragTouchMoveHandler),f(t,"touchmove",this._delayedDragTouchMoveHandler),f(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(V,"dragend",this),h(Q,"dragstart",this._onDragStart));try{document.selection?Kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;wt=!1,Q&&V?(G("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Bt),n=this.options,t||k(V,n.dragClass,!1),k(V,n.ghostClass,!0),Ft.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Rt();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY))!==e;)e=t;if(V.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Xt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=$&&v($,!0),a=$&&r&&r.a,l=$&&r&&r.d,e=Mt&&yt&&E(yt),a=(i.clientX-ct.clientX+o.x)/(a||1)+(e?e[0]-Ct[0]:0)/(a||1),l=(i.clientY-ct.clientY+o.y)/(l||1)+(e?e[1]-Ct[1]:0)/(l||1);if(!Ft.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}$&&(r?(r.e+=a-(dt||0),r.f+=l-(ht||0)):r={a:1,b:0,c:0,d:1,e:a,f:l},r="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")"),R($,"webkitTransform",r),R($,"mozTransform",r),R($,"msTransform",r),R($,"transform",r),dt=a,ht=l,ut=i),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!$){var t=this.options.fallbackOnBody?document.body:Q,e=X(V,!0,Mt,!0,t),n=this.options;if(Mt){for(yt=t;"static"===R(yt,"position")&&"none"===R(yt,"transform")&&yt!==document;)yt=yt.parentNode;yt!==document.body&&yt!==document.documentElement?(yt===document&&(yt=O()),e.top+=yt.scrollTop,e.left+=yt.scrollLeft):yt=O(),Ct=E(yt)}k($=V.cloneNode(!0),n.ghostClass,!1),k($,n.fallbackClass,!0),k($,n.dragClass,!0),R($,"transition",""),R($,"transform",""),R($,"box-sizing","border-box"),R($,"margin",0),R($,"top",e.top),R($,"left",e.left),R($,"width",e.width),R($,"height",e.height),R($,"opacity","0.8"),R($,"position",Mt?"absolute":"fixed"),R($,"zIndex","100000"),R($,"pointerEvents","none"),Ft.ghost=$,t.appendChild($),R($,"transform-origin",ft/parseInt($.style.width)*100+"% "+pt/parseInt($.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;G("dragStart",this,{evt:t}),Ft.eventCanceled?this._onDrop():(G("setupClone",this),Ft.eventCanceled||((et=_(V)).removeAttribute("id"),et.draggable=!1,et.style["will-change"]="",this._hideClone(),k(et,this.options.chosenClass,!1),Ft.clone=et),n.cloneId=Kt(function(){G("clone",n),Ft.eventCanceled||(n.options.removeCloneOnHide||Q.insertBefore(et,V),n._hideClone(),q({sortable:n,name:"clone"}))}),e||k(V,i.dragClass,!0),e?(Et=!0,n._loopId=setInterval(n._emulateDragOver,50)):(f(document,"mouseup",n._onDrop),f(document,"touchend",n._onDrop),f(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,V)),h(document,"drop",n),R(V,"transform","translateZ(0)")),wt=!0,n._dragStartId=Kt(n._dragStarted.bind(n,e,t)),h(document,"selectstart",n),gt=!0,u&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,t,e,a=this.el,l=n.target,s=this.options,c=s.group,u=Ft.active,d=lt===c,h=s.sort,f=st||u,p=this,g=!1;if(!Tt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),l=P(l,s.draggable,a,!0),O("dragOver"),Ft.eventCanceled)return g;if(V.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return A(!1);if(Et=!1,u&&!s.disabled&&(d?h||(i=Z!==Q):st===this||(this.lastPutMode=lt.checkPull(this,u,V,n))&&c.checkPut(this,u,V,n))){if(r="vertical"===this._getDirection(n,l),o=X(V),O("dragOverValid"),Ft.eventCanceled)return g;if(i)return Z=Q,M(),this._hideClone(),O("revert"),Ft.eventCanceled||(J?Q.insertBefore(V,J):Q.appendChild(V)),A(!0);var m=F(a,s.draggable);if(m&&(S=n,c=r,x=X(F((D=this).el,D.options.draggable)),D=L(D.el,D.options,$),!(c?S.clientX>D.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>D.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,$),e?t.clientX<_.left-10||t.clientY<C.top&&t.clientX<C.right:t.clientY<_.top-10||t.clientY<C.bottom&&t.clientX<C.left)){var v=B(a,0,s,!0);if(v===V)return A(!1);if(E=X(l=v),!1!==jt(Q,a,V,o,l,E,n,!1))return M(),a.insertBefore(V,v),Z=a,N(),A(!0)}else if(l.parentNode===a){var b,y,w,E=X(l),D=V.parentNode!==a,S=(S=V.animated&&V.toRect||o,x=l.animated&&l.toRect||E,_=(e=r)?S.left:S.top,t=e?S.right:S.bottom,C=e?S.width:S.height,v=e?x.left:x.top,S=e?x.right:x.bottom,x=e?x.width:x.height,!(_===v||t===S||_+C/2===v+x/2)),_=r?"top":"left",C=Y(l,"top","top")||Y(V,"top","top"),v=C?C.scrollTop:void 0;if(mt!==l&&(y=E[_],St=!1,_t=!S&&s.invertSwap||D),0!==(b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,t=o?n.top:n.left,o=o?n.bottom:n.right,n=!1;if(!a)if(l&&bt<c*i){if(St=!St&&(1===vt?t+c*r/2<s:s<o-c*r/2)?!0:St)n=!0;else if(1===vt?s<t+bt:o-bt<s)return-vt}else if(t+c*(1-i)/2<s&&s<o-c*(1-i)/2)return function(t){return j(V)<j(t)?1:-1}(e);if((n=n||a)&&(s<t+c*r/2||o-c*r/2<s))return t+c/2<s?1:-1;return 0}(n,l,E,r,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,_t,mt===l)))for(var T=j(V);(w=Z.children[T-=b])&&("none"===R(w,"display")||w===$););if(0===b||w===l)return A(!1);vt=b;var x=(mt=l).nextElementSibling,D=!1,S=jt(Q,a,V,o,l,E,n,D=1===b);if(!1!==S)return 1!==S&&-1!==S||(D=1===S),Tt=!0,setTimeout(Lt,30),M(),D&&!x?a.appendChild(V):l.parentNode.insertBefore(V,D?x:l),C&&H(C,0,v-C.scrollTop),Z=V.parentNode,void 0===y||_t||(bt=Math.abs(y-X(l)[_])),N(),A(!0)}}else{if(m===V)return A(!1);if((l=m&&a===n.target?m:l)&&(E=X(l)),!1!==jt(Q,a,V,o,l,E,n,!!l))return M(),m&&m.nextSibling?a.insertBefore(V,m.nextSibling):a.appendChild(V),Z=a,N(),A(!0)}if(a.contains(V))return A(!1)}return!1}function O(t,e){G(t,p,I({evt:n,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:o,targetRect:E,canSort:h,fromSortable:f,target:l,completed:A,onMove:function(t,e){return jt(Q,a,V,o,t,X(t),n,e)},changed:N},e))}function M(){O("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(t){return O("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(p),p!==f&&(k(V,(st||u).options.ghostClass,!1),k(V,s.ghostClass,!0)),st!==p&&p!==Ft.active?st=p:p===Ft.active&&st&&(st=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll(function(){O("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===V&&!V.animated||l===a&&!l.animated)&&(mt=null),s.dragoverBubble||n.rootEl||l===document||(V.parentNode[K]._isOutsideThisEl(n.target),t||Yt(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),g=!0}function N(){it=j(V),at=j(V,s.draggable),q({sortable:p,name:"change",toEl:a,newIndex:it,newDraggableIndex:at,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Yt),f(document,"mousemove",Yt),f(document,"touchmove",Yt)},_offUpEvents:function(){var t=this.el.ownerDocument;f(t,"mouseup",this._onDrop),f(t,"touchend",this._onDrop),f(t,"pointerup",this._onDrop),f(t,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;it=j(V),at=j(V,n.draggable),G("drop",this,{evt:t}),Z=V&&V.parentNode,it=j(V),at=j(V,n.draggable),Ft.eventCanceled||(St=_t=wt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wt(this.cloneId),Wt(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&R(document.body,"user-select",""),R(V,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),$&&$.parentNode&&$.parentNode.removeChild($),(Q===Z||st&&"clone"!==st.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),V&&(this.nativeDraggable&&f(V,"dragend",this),Ht(V),V.style["will-change"]="",gt&&!wt&&k(V,(st||this).options.ghostClass,!1),k(V,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==Z?(0<=it&&(q({rootEl:Z,name:"add",toEl:Z,fromEl:Q,originalEvent:t}),q({sortable:this,name:"remove",toEl:Z,originalEvent:t}),q({rootEl:Z,name:"sort",toEl:Z,fromEl:Q,originalEvent:t}),q({sortable:this,name:"sort",toEl:Z,originalEvent:t})),st&&st.save()):it!==ot&&0<=it&&(q({sortable:this,name:"update",toEl:Z,originalEvent:t}),q({sortable:this,name:"sort",toEl:Z,originalEvent:t})),Ft.active&&(null!=it&&-1!==it||(it=ot,at=rt),q({sortable:this,name:"end",toEl:Z,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){G("nulling",this),Q=V=Z=$=J=et=tt=nt=ct=ut=gt=it=at=ot=rt=mt=vt=st=lt=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,xt.forEach(function(t){t.checked=!0}),xt.length=dt=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":V&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||function(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;for(;n--;)o+=e.charCodeAt(n);return o.toString(36)}(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(t,e){e=o.children[e];P(e,this.options.draggable,o,!1)&&(n[t]=e)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=W.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&kt(n)},destroy:function(){G("destroy",this);var t=this.el;t[K]=null,f(t,"mousedown",this._onTapStart),f(t,"touchstart",this._onTapStart),f(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(t,"dragover",this),f(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Dt.splice(Dt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){nt||(G("hideClone",this),Ft.eventCanceled||(R(et,"display","none"),this.options.removeCloneOnHide&&et.parentNode&&et.parentNode.removeChild(et),nt=!0))},_showClone:function(t){"clone"===t.lastPutMode?nt&&(G("showClone",this),Ft.eventCanceled||(V.parentNode!=Q||this.options.group.revertClone?J?Q.insertBefore(et,J):Q.appendChild(et):Q.insertBefore(et,V),this.options.group.revertClone&&this.animate(V,et),R(et,"display",""),nt=!1)):this._hideClone()}},Ot&&h(document,"touchmove",function(t){(Ft.active||wt)&&t.cancelable&&t.preventDefault()}),Ft.utils={on:h,off:f,css:R,find:b,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:S,closest:P,toggleClass:k,clone:_,index:j,nextTick:Kt,cancelNextTick:Wt,detectDirection:Pt,getChild:B},Ft.get=function(t){return t[K]},Ft.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(e=e[0].constructor===Array?e[0]:e).forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ft.utils=I(I({},Ft.utils),t.utils)),W.mount(t)})},Ft.create=function(t,e){return new Ft(t,e)};var zt,Gt,Ut,qt,Vt,Zt,$t=[],Qt=!(Ft.version="1.15.2");function Jt(){$t.forEach(function(t){clearInterval(t.pid)}),$t=[]}function te(){clearInterval(Zt)}var ee,ne=S(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=O(),u=!1;Gt!==e&&(Gt=e,Jt(),zt=t.scroll,i=t.scrollFn,!0===zt&&(zt=M(e,!0)));var d=0,h=zt;do{var f=h,p=X(f),g=p.top,m=p.bottom,v=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,C=R(f),T=f.scrollLeft,p=f.scrollTop,D=f===c?(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY)),T=E&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(v-r)<=l&&!!T),p=D&&(Math.abs(m-a)<=l&&p+w<_)-(Math.abs(g-a)<=l&&!!p);if(!$t[d])for(var x=0;x<=d;x++)$t[x]||($t[x]={});$t[d].vx==T&&$t[d].vy==p&&$t[d].el===f||($t[d].el=f,$t[d].vx=T,$t[d].vy=p,clearInterval($t[d].pid),0==T&&0==p||(u=!0,$t[d].pid=setInterval(function(){o&&0===this.layer&&Ft.active._onTouchMove(Vt);var t=$t[this.layer].vy?$t[this.layer].vy*s:0,e=$t[this.layer].vx?$t[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Ft.dragged.parentNode[K],e,t,n,Vt,$t[this.layer].el)||H($t[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=M(h,!1)));Qt=u}},30),c=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,t=t.unhideGhostForTarget;e&&(i=n||i,a(),e=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,e=document.elementFromPoint(e.clientX,e.clientY),t(),i&&!i.el.contains(e)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n})))};function oe(){}function ie(){}oe.prototype={startIndex:null,dragStart:function(t){t=t.oldDraggableIndex;this.startIndex=t},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();t=B(this.sortable.el,this.startIndex,this.options);t?this.sortable.el.insertBefore(e,t):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:c},a(oe,{pluginName:"revertOnSpill"}),ie.prototype={onSpill:function(t){var e=t.dragEl,t=t.putSortable||this.sortable;t.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),t.animateAll()},drop:c},a(ie,{pluginName:"removeOnSpill"});var re,ae,le,se,ce,ue=[],de=[],he=!1,fe=!1,pe=!1;function ge(n,o){de.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)})}function me(){ue.forEach(function(t){t!==le&&t.parentNode&&t.parentNode.removeChild(t)})}return Ft.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){t=t.originalEvent;this.sortable.nativeDraggable?h(document,"dragover",this._handleAutoScroll):this.options.supportPointer?h(document,"pointermove",this._handleFallbackAutoScroll):t.touches?h(document,"touchmove",this._handleFallbackAutoScroll):h(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){t=t.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),te(),Jt(),clearTimeout(g),g=void 0},nulling:function(){Vt=Gt=zt=Qt=Zt=Ut=qt=null,$t.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o,i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(r,a);Vt=e,n||this.options.forceAutoScrollFallback||w||y||u?(ne(e,this.options,t,n),o=M(t,!0),!Qt||Zt&&r===Ut&&a===qt||(Zt&&te(),Zt=setInterval(function(){var t=M(document.elementFromPoint(r,a),!0);t!==o&&(o=t,Jt()),ne(e,i.options,t,n)},10),Ut=r,qt=a)):this.options.bubbleScroll&&M(t,!0)!==O()?ne(e,this.options,M(t,!1),!1):Jt()}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),Ft.mount(ie,oe),Ft.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){t=t.dragEl;ee=t},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;i.options.swap&&(t=this.sortable.el,i=this.options,n&&n!==t&&(t=ee,ee=!1!==o(n)?(k(n,i.swapClass,!0),n):null,t&&t!==ee&&k(t,i.swapClass,!1)),r(),e(!0),a())},drop:function(t){var e,n,o=t.activeSortable,i=t.putSortable,r=t.dragEl,a=i||this.sortable,l=this.options;ee&&k(ee,l.swapClass,!1),ee&&(l.swap||i&&i.options.swap)&&r!==ee&&(a.captureAnimationState(),a!==o&&o.captureAnimationState(),n=ee,t=(e=r).parentNode,l=n.parentNode,t&&l&&!t.isEqualNode(n)&&!l.isEqualNode(e)&&(i=j(e),r=j(n),t.isEqualNode(l)&&i<r&&r++,t.insertBefore(n,t.children[i]),l.insertBefore(e,l.children[r])),a.animateAll(),a!==o&&o.animateAll())},nulling:function(){ee=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ee}}})}),Ft.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.avoidImplicitDeselect||(o.options.supportPointer?h(document,"pointerup",this._deselectMultiDrag):(h(document,"mouseup",this._deselectMultiDrag),h(document,"touchend",this._deselectMultiDrag))),h(document,"keydown",this._checkKeyDown),h(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,e){var n="";ue.length&&ae===o?ue.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){t=t.dragEl;le=t},delayEnded:function(){this.isMultiDrag=~ue.indexOf(le)},setupClone:function(t){var e=t.sortable,t=t.cancel;if(this.isMultiDrag){for(var n=0;n<ue.length;n++)de.push(_(ue[n])),de[n].sortableIndex=ue[n].sortableIndex,de[n].draggable=!1,de[n].style["will-change"]="",k(de[n],this.options.selectedClass,!1),ue[n]===le&&k(de[n],this.options.chosenClass,!1);e._hideClone(),t()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,t=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ue.length&&ae===e&&(ge(!0,n),o("clone"),t()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,t=t.cancel;this.isMultiDrag&&(ge(!1,n),de.forEach(function(t){R(t,"display","")}),e(),ce=!1,t())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),t=t.cancel;this.isMultiDrag&&(de.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),ce=!0,t())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ae&&ae.multiDrag._deselectMultiDrag(),ue.forEach(function(t){t.sortableIndex=j(t)}),ue=ue.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),pe=!0},dragStarted:function(t){var e,n=this,t=t.sortable;this.isMultiDrag&&(this.options.sort&&(t.captureAnimationState(),this.options.animation&&(ue.forEach(function(t){t!==le&&R(t,"position","absolute")}),e=X(le,!1,!0,!0),ue.forEach(function(t){t!==le&&C(t,e)}),he=fe=!0)),t.animateAll(function(){he=fe=!1,n.options.animation&&ue.forEach(function(t){T(t)}),n.options.sort&&me()}))},dragOver:function(t){var e=t.target,n=t.completed,t=t.cancel;fe&&~ue.indexOf(e)&&(n(!1),t())},revert:function(t){var n,o,e=t.fromSortable,i=t.rootEl,r=t.sortable,a=t.dragRect;1<ue.length&&(ue.forEach(function(t){r.addAnimationState({target:t,rect:fe?X(t):a}),T(t),t.fromRect=a,e.removeAnimationState(t)}),fe=!1,n=!this.options.removeCloneOnHide,o=i,ue.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)}))},dragOverCompleted:function(t){var e,n=t.sortable,o=t.isOwner,i=t.insertion,r=t.activeSortable,a=t.parentEl,l=t.putSortable,t=this.options;i&&(o&&r._hideClone(),he=!1,t.animation&&1<ue.length&&(fe||!o&&!r.options.sort&&!l)&&(e=X(le,!1,!0,!0),ue.forEach(function(t){t!==le&&(C(t,e),a.appendChild(t))}),fe=!0),o||(fe||me(),1<ue.length?(o=ce,r._showClone(n),r.options.animation&&!ce&&o&&de.forEach(function(t){r.addAnimationState({target:t,rect:se}),t.fromRect=se,t.thisAnimationDuration=null})):r._showClone(n)))},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,t=t.activeSortable;ue.forEach(function(t){t.thisAnimationDuration=null}),t.options.animation&&!n&&t.multiDrag.isMultiDrag&&(se=a({},e),e=v(le,!0),se.top-=e.f,se.left-=e.e)},dragOverAnimationComplete:function(){fe&&(fe=!1,me())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c,u,d,h=this.options,f=o.children;if(!pe)if(h.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(le,h.selectedClass,!~ue.indexOf(le)),~ue.indexOf(le))ue.splice(ue.indexOf(le),1),re=null,z({sortable:i,rootEl:n,name:"deselect",targetEl:le,originalEvent:e});else{if(ue.push(le),z({sortable:i,rootEl:n,name:"select",targetEl:le,originalEvent:e}),e.shiftKey&&re&&i.el.contains(re)){var p=j(re),t=j(le);if(~p&&~t&&p!==t)for(var g,m=p<t?(g=p,t):(g=t,p+1);g<m;g++)~ue.indexOf(f[g])||(k(f[g],h.selectedClass,!0),ue.push(f[g]),z({sortable:i,rootEl:n,name:"select",targetEl:f[g],originalEvent:e}))}else re=le;ae=s}pe&&this.isMultiDrag&&(fe=!1,(o[K].options.sort||o!==n)&&1<ue.length&&(c=X(le),u=j(le,":not(."+this.options.selectedClass+")"),!he&&h.animation&&(le.thisAnimationDuration=null),s.captureAnimationState(),he||(h.animation&&(le.fromRect=c,ue.forEach(function(t){var e;t.thisAnimationDuration=null,t!==le&&(e=fe?X(t):c,t.fromRect=e,s.addAnimationState({target:t,rect:e}))})),me(),ue.forEach(function(t){f[u]?o.insertBefore(t,f[u]):o.appendChild(t),u++}),a===j(le)&&(d=!1,ue.forEach(function(t){t.sortableIndex!==j(t)&&(d=!0)}),d&&(r("update"),r("sort")))),ue.forEach(function(t){T(t)}),s.animateAll()),ae=s),(n===o||l&&"clone"!==l.lastPutMode)&&de.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=pe=!1,de.length=0},destroyGlobal:function(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==pe&&pe||ae!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;ue.length;){var e=ue[0];k(e,this.options.selectedClass,!1),ue.shift(),z({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[K];e&&e.options.multiDrag&&!~ue.indexOf(t)&&(ae&&ae!==e&&(ae.multiDrag._deselectMultiDrag(),ae=e),k(t,e.options.selectedClass,!0),ue.push(t))},deselect:function(t){var e=t.parentNode[K],n=ue.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),ue.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return ue.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=fe&&t!==le?-1:fe?j(t,":not(."+n.options.selectedClass+")"):j(t),i.push({multiDragElement:t,index:e})}),{items:r(ue),clones:[].concat(de),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),Ft});

// final JS calls after everything has been loaded
document.dispatchEvent( new CustomEvent('events_manager_js_loaded') );
//# sourceMappingURL=events-manager.js.map;
// source --> https://oldsite.uoi.gr/wp-content/plugins/revslider/public/assets/js/rbtools.min.js?ver=6.6.20 
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=jQuery},function(t,e,n){n(2),n(6),t.exports=n(4)},function(t,e,n){var r,i,o,s;
/*!
 * @fileOverview TouchSwipe - jQuery Plugin @version 1.6.18 / SANDBOXED VERSION FOR TP
 * @author Matt Bryson http://www.github.com/mattbryson
 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
 * @see http://labs.rampinteractive.co.uk/touchSwipe/
 * @see http://plugins.jquery.com/project/touchSwipe
 * @license
 * Copyright (c) 2010-2015 Matt Bryson
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 */s=function(t){"use strict";var e="left",n="right",r="up",i="down",o="none",s="doubletap",a="longtap",u="horizontal",l="vertical",h="all",c="move",f="end",p="cancel",d="ontouchstart"in window,g=window.navigator.msPointerEnabled&&!window.PointerEvent&&!d,D=(window.PointerEvent||window.navigator.msPointerEnabled)&&!d,m="TouchSwipe";function v(v,_){_=t.extend({},_);var y=d||D||!_.fallbackToMouseEvents,x=y?D?g?"MSPointerDown":"pointerdown":"touchstart":"mousedown",w=y?D?g?"MSPointerMove":"pointermove":"touchmove":"mousemove",C=y?D?g?"MSPointerUp":"pointerup":"touchend":"mouseup",F=y?D?"mouseleave":null:"mouseleave",E=D?g?"MSPointerCancel":"pointercancel":"touchcancel",b=0,T=null,M=null,A=0,P=0,S=0,O=1,k=0,B=0,L=null,N=t(v),R="start",X=0,Y={},I=0,z=0,H=0,W=0,V=0,j=null,U=null;try{N.on(x,q),N.on(E,Q)}catch(v){t.error("events not supported "+x+","+E+" on jQuery.swipe")}function q(o){if(!0!==N.data(m+"_intouch")&&!(0<t(o.target).closest(_.excludedElements,N).length)){var s=o.originalEvent?o.originalEvent:o;if(!s.pointerType||"mouse"!=s.pointerType||0!=_.fallbackToMouseEvents){var a,u,l=s.touches,c=l?l[0]:s;return R="start",l?X=l.length:!1!==_.preventDefaultEvents&&o.preventDefault(),B=M=T=null,O=1,k=S=P=A=b=0,(u={})[e]=yt(e),u[n]=yt(n),u.up=yt(r),u[i]=yt(i),L=u,dt(),mt(0,c),!l||X===_.fingers||_.fingers===h||st()?(I=Ft(),2==X&&(mt(1,l[1]),P=S=wt(Y[0].start,Y[1].start)),(_.swipeStatus||_.pinchStatus)&&(a=tt(s,R))):a=!1,!1===a?(tt(s,R=p),a):(_.hold&&(U=setTimeout(t.proxy((function(){N.trigger("hold",[s.target]),_.hold&&(a=_.hold.call(N,s,s.target))}),this),_.longTapThreshold)),Dt(!0),null)}}}function G(s){var a=s.originalEvent?s.originalEvent:s;if(R!==f&&R!==p&&!gt()){var d,g,D,m,v,y,x,w=a.touches,C=vt(w?w[0]:a);if(z=Ft(),w&&(X=w.length),_.hold&&clearTimeout(U),R=c,2==X&&(0==P?(mt(1,w[1]),P=S=wt(Y[0].start,Y[1].start)):(vt(w[1]),S=wt(Y[0].end,Y[1].end),Y[0].end,Y[1].end,B=O<1?"out":"in"),O=(S/P*1).toFixed(2),k=Math.abs(P-S)),X===_.fingers||_.fingers===h||!w||st()){if(T=Ct(C.start,C.end),function(t,s){if(!1!==_.preventDefaultEvents)if(_.allowPageScroll===o)t.preventDefault();else{var a="auto"===_.allowPageScroll;switch(s){case e:(_.swipeLeft&&a||!a&&_.allowPageScroll!=u)&&t.preventDefault();break;case n:(_.swipeRight&&a||!a&&_.allowPageScroll!=u)&&t.preventDefault();break;case r:(_.swipeUp&&a||!a&&_.allowPageScroll!=l)&&t.preventDefault();break;case i:(_.swipeDown&&a||!a&&_.allowPageScroll!=l)&&t.preventDefault()}}}(s,M=Ct(C.last,C.end)),y=C.start,x=C.end,b=Math.round(Math.sqrt(Math.pow(x.x-y.x,2)+Math.pow(x.y-y.y,2))),A=xt(),function(t,e){t!=o&&(e=Math.max(e,_t(t)),L[t].distance=e)}(T,b),d=tt(a,R),!_.triggerOnTouchEnd||_.triggerOnTouchLeave){var F=!0;_.triggerOnTouchLeave&&(D={left:(v=(m=t(m=this)).offset()).left,right:v.left+m.outerWidth(),top:v.top,bottom:v.top+m.outerHeight()},F=(g=C.end).x>D.left&&g.x<D.right&&g.y>D.top&&g.y<D.bottom),!_.triggerOnTouchEnd&&F?R=J(c):_.triggerOnTouchLeave&&!F&&(R=J(f)),R!=p&&R!=f||tt(a,R)}}else tt(a,R=p);!1===d&&tt(a,R=p)}}function K(t){var e,n=t.originalEvent?t.originalEvent:t,r=n.touches;if(r){if(r.length&&!gt())return e=n,H=Ft(),W=e.touches.length+1,!0;if(r.length&&gt())return!0}return gt()&&(X=W),z=Ft(),A=xt(),rt()||!nt()?tt(n,R=p):_.triggerOnTouchEnd||!1===_.triggerOnTouchEnd&&R===c?(!1!==_.preventDefaultEvents&&!1!==t.cancelable&&t.preventDefault(),tt(n,R=f)):!_.triggerOnTouchEnd&&ct()?et(n,R=f,"tap"):R===c&&tt(n,R=p),Dt(!1),null}function Q(){S=P=I=z=X=0,O=1,dt(),Dt(!1)}function Z(t){var e=t.originalEvent?t.originalEvent:t;_.triggerOnTouchLeave&&tt(e,R=J(f))}function $(){N.off(x,q),N.off(E,Q),N.off(w,G),N.off(C,K),F&&N.off(F,Z),Dt(!1)}function J(t){var e=t,n=it(),r=nt(),i=rt();return!n||i?e=p:!r||t!=c||_.triggerOnTouchEnd&&!_.triggerOnTouchLeave?!r&&t==f&&_.triggerOnTouchLeave&&(e=p):e=f,e}function tt(t,e){var n,r=t.touches;return(at()&&ut()||ut())&&(n=et(t,e,"swipe")),(ot()&&st()||st())&&!1!==n&&(n=et(t,e,"pinch")),pt()&&ft()&&!1!==n?n=et(t,e,s):A>_.longTapThreshold&&b<10&&_.longTap&&!1!==n?n=et(t,e,a):1!==X&&d||!(isNaN(b)||b<_.threshold)||!ct()||!1===n||(n=et(t,e,"tap")),e===p&&Q(),e===f&&(r&&r.length||Q()),n}function et(o,u,l){var h;if("swipe"==l){if(N.trigger("swipeStatus",[u,T||null,b||0,A||0,X,Y,M]),_.swipeStatus&&!1===(h=_.swipeStatus.call(N,o,u,T||null,b||0,A||0,X,Y,M)))return!1;if(u==f&&at()){if(clearTimeout(j),clearTimeout(U),N.trigger("swipe",[T,b,A,X,Y,M]),_.swipe&&!1===(h=_.swipe.call(N,o,T,b,A,X,Y,M)))return!1;switch(T){case e:N.trigger("swipeLeft",[T,b,A,X,Y,M]),_.swipeLeft&&(h=_.swipeLeft.call(N,o,T,b,A,X,Y,M));break;case n:N.trigger("swipeRight",[T,b,A,X,Y,M]),_.swipeRight&&(h=_.swipeRight.call(N,o,T,b,A,X,Y,M));break;case r:N.trigger("swipeUp",[T,b,A,X,Y,M]),_.swipeUp&&(h=_.swipeUp.call(N,o,T,b,A,X,Y,M));break;case i:N.trigger("swipeDown",[T,b,A,X,Y,M]),_.swipeDown&&(h=_.swipeDown.call(N,o,T,b,A,X,Y,M))}}}if("pinch"==l){if(N.trigger("pinchStatus",[u,B||null,k||0,A||0,X,O,Y]),_.pinchStatus&&!1===(h=_.pinchStatus.call(N,o,u,B||null,k||0,A||0,X,O,Y)))return!1;if(u==f&&ot())switch(B){case"in":N.trigger("pinchIn",[B||null,k||0,A||0,X,O,Y]),_.pinchIn&&(h=_.pinchIn.call(N,o,B||null,k||0,A||0,X,O,Y));break;case"out":N.trigger("pinchOut",[B||null,k||0,A||0,X,O,Y]),_.pinchOut&&(h=_.pinchOut.call(N,o,B||null,k||0,A||0,X,O,Y))}}return"tap"==l?u!==p&&u!==f||(clearTimeout(j),clearTimeout(U),ft()&&!pt()?(V=Ft(),j=setTimeout(t.proxy((function(){V=null,N.trigger("tap",[o.target]),_.tap&&(h=_.tap.call(N,o,o.target))}),this),_.doubleTapThreshold)):(V=null,N.trigger("tap",[o.target]),_.tap&&(h=_.tap.call(N,o,o.target)))):l==s?u!==p&&u!==f||(clearTimeout(j),clearTimeout(U),V=null,N.trigger("doubletap",[o.target]),_.doubleTap&&(h=_.doubleTap.call(N,o,o.target))):l==a&&(u!==p&&u!==f||(clearTimeout(j),V=null,N.trigger("longtap",[o.target]),_.longTap&&(h=_.longTap.call(N,o,o.target)))),h}function nt(){var t=!0;return null!==_.threshold&&(t=b>=_.threshold),t}function rt(){var t=!1;return null!==_.cancelThreshold&&null!==T&&(t=_t(T)-b>=_.cancelThreshold),t}function it(){return!(_.maxTimeThreshold&&A>=_.maxTimeThreshold)}function ot(){var t=lt(),e=ht(),n=null===_.pinchThreshold||k>=_.pinchThreshold;return t&&e&&n}function st(){return _.pinchStatus||_.pinchIn||_.pinchOut}function at(){var t=it(),e=nt(),n=lt(),r=ht();return!rt()&&r&&n&&e&&t}function ut(){return _.swipe||_.swipeStatus||_.swipeLeft||_.swipeRight||_.swipeUp||_.swipeDown}function lt(){return X===_.fingers||_.fingers===h||!d}function ht(){return 0!==Y[0].end.x}function ct(){return _.tap}function ft(){return!!_.doubleTap}function pt(){if(null==V)return!1;var t=Ft();return ft()&&t-V<=_.doubleTapThreshold}function dt(){W=H=0}function gt(){var t=!1;return H&&Ft()-H<=_.fingerReleaseThreshold&&(t=!0),t}function Dt(t){N&&(!0===t?(N.on(w,G),N.on(C,K),F&&N.on(F,Z)):(N.off(w,G,!1),N.off(C,K,!1),F&&N.off(F,Z,!1)),N.data(m+"_intouch",!0===t))}function mt(t,e){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=e.pageX||e.clientX,n.start.y=n.last.y=n.end.y=e.pageY||e.clientY,Y[t]=n}function vt(t){var e=void 0!==t.identifier?t.identifier:0,n=Y[e]||null;return null===n&&(n=mt(e,t)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=t.pageX||t.clientX,n.end.y=t.pageY||t.clientY,n}function _t(t){if(L[t])return L[t].distance}function yt(t){return{direction:t,distance:0}}function xt(){return z-I}function wt(t,e){var n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+r*r))}function Ct(t,s){if(u=s,(a=t).x==u.x&&a.y==u.y)return o;var a,u,l,h,c,f,p,d,g=(h=s,c=(l=t).x-h.x,f=h.y-l.y,p=Math.atan2(f,c),(d=Math.round(180*p/Math.PI))<0&&(d=360-Math.abs(d)),d);return g<=45&&0<=g||g<=360&&315<=g?e:135<=g&&g<=225?n:45<g&&g<135?i:r}function Ft(){return(new Date).getTime()}this.enable=function(){return this.disable(),N.on(x,q),N.on(E,Q),N},this.disable=function(){return $(),N},this.destroy=function(){$(),N.data(m,null),N=null},this.option=function(e,n){if("object"==typeof e)_=t.extend(_,e);else if(void 0!==_[e]){if(void 0===n)return _[e];_[e]=n}else{if(!e)return _;t.error("Option "+e+" does not exist on jQuery.swipe.options")}return null}}t.fn.rsswipe=function(e){var n=t(this),r=n.data(m);if(r&&"string"==typeof e){if(r[e])return r[e].apply(r,Array.prototype.slice.call(arguments,1));t.error("Method "+e+" does not exist on jQuery.rsswipe")}else if(r&&"object"==typeof e)r.option.apply(r,arguments);else if(!(r||"object"!=typeof e&&e))return function(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=o),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e=e||{},e=t.extend({},t.fn.rsswipe.defaults,e),this.each((function(){var n=t(this),r=n.data(m);r||(r=new v(this,e),n.data(m,r))}))}.apply(this,arguments);return n},t.fn.rsswipe.version="1.6.18",t.fn.rsswipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0},t.fn.rsswipe.phases={PHASE_START:"start",PHASE_MOVE:c,PHASE_END:f,PHASE_CANCEL:p},t.fn.rsswipe.directions={LEFT:e,RIGHT:n,UP:r,DOWN:i,IN:"in",OUT:"out"},t.fn.rsswipe.pageScroll={NONE:o,HORIZONTAL:u,VERTICAL:l,AUTO:"auto"},t.fn.rsswipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:h}},n(3).jQuery?(i=[n(0)],void 0===(o="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=o)):t.exports?s(n(0)):s(jQuery)},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e){var n;(n=jQuery).waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]},n.expr.pseudos.uncached=function(t){var e=document.createElement("img");return e.src=t.src,n(t).is('img[src!=""]')&&!e.complete},n.fn.waitForImages=function(t,e,r){if(n.isPlainObject(t)&&(e=t.each,r=t.waitForAll,t=t.finished),t=t||n.noop,e=e||n.noop,r=!!r,!n.isFunction(t)||!n.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each((function(){var i=n(this),o=[];if(r){var s=n.waitForImages.hasImageProperties||[],a=/url\((['"]?)(.*?)\1\)/g;i.find("*").each((function(){var t=n(this);t.is("img:uncached")&&o.push({src:t.attr("src"),element:t[0]}),n.each(s,(function(e,n){var r,i=t.css(n);if(!i)return!0;for(;r=a.exec(i);)o.push({src:r[2],element:t[0]})}))}))}else i.find("img:uncached").each((function(){o.push({src:this.src,element:this})}));var u=o.length,l=0;0==u&&t.call(i[0]),n.each(o,(function(r,o){var s=new Image;n(s).bind("load error",(function(n){if(l++,e.call(o.element,l,u,"load"==n.type),l==u)return t.call(i[0]),!1})),s.src=o.src}))}))}},,function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}
/*!
 * GSAP 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/n.r(e);var o,s,a,u,l,h,c,f,p,d,g,D,m,v={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_={duration:.5,overwrite:!1,delay:0},y=1e8,x=2*Math.PI,w=x/4,C=0,F=Math.sqrt,E=Math.cos,b=Math.sin,T=function(t){return"string"==typeof t},M=function(t){return"function"==typeof t},A=function(t){return"number"==typeof t},P=function(t){return void 0===t},S=function(t){return"object"==typeof t},O=function(t){return!1!==t},k=function(){return"undefined"!=typeof window},B=function(t){return M(t)||T(t)},L="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},N=Array.isArray,R=/(?:-?\.?\d|\.)+/gi,X=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Y=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,I=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,z=/[+-]=-?[.\d]+/,H=/[^,'"\[\]\s]+/gi,W=/[\d.+\-=]+(?:e[-+]\d*)*/i,V={},j={},U=function(t){return(j=mt(t,V))&&nn},q=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},G=function(t,e){return!e&&console.warn(t)},K=function(t,e){return t&&(V[t]=e)&&j&&(j[t]=e)||V},Q=function(){return 0},Z={},$=[],J={},tt={},et={},nt=30,rt=[],it="",ot=function(t){var e,n,r=t[0];if(S(r)||M(r)||(t=[t]),!(e=(r._gsap||{}).harness)){for(n=rt.length;n--&&!rt[n].targetTest(r););e=rt[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new be(t[n],e)))||t.splice(n,1);return t},st=function(t){return t._gsap||ot(Ut(t))[0]._gsap},at=function(t,e,n){return(n=t[e])&&M(n)?t[e]():P(n)&&t.getAttribute&&t.getAttribute(e)||n},ut=function(t,e){return(t=t.split(",")).forEach(e)||t},lt=function(t){return Math.round(1e5*t)/1e5||0},ht=function(t){return Math.round(1e7*t)/1e7||0},ct=function(t,e){for(var n=e.length,r=0;t.indexOf(e[r])<0&&++r<n;);return r<n},ft=function(){var t,e,n=$.length,r=$.slice(0);for(J={},$.length=0,t=0;t<n;t++)(e=r[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},pt=function(t,e,n,r){$.length&&ft(),t.render(e,n,r),$.length&&ft()},dt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(H).length<2?e:T(t)?t.trim():t},gt=function(t){return t},Dt=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},mt=function(t,e){for(var n in e)t[n]=e[n];return t},vt=function t(e,n){for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(e[r]=S(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},_t=function(t,e){var n,r={};for(n in t)n in e||(r[n]=t[n]);return r},yt=function(t){var e,n=t.parent||s,r=t.keyframes?(e=N(t.keyframes),function(t,n){for(var r in n)r in t||"duration"===r&&e||"ease"===r||(t[r]=n[r])}):Dt;if(O(t.inherit))for(;n;)r(t,n.vars.defaults),n=n.parent||n._dp;return t},xt=function(t,e,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var i=e._prev,o=e._next;i?i._next=o:t[n]===e&&(t[n]=o),o?o._prev=i:t[r]===e&&(t[r]=i),e._next=e._prev=e.parent=null},wt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove(t),t._act=0},Ct=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},Ft=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Et=function(t){return t._repeat?bt(t._tTime,t=t.duration()+t._rDelay)*t:0},bt=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},Tt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Mt=function(t){return t._end=ht(t._start+(t._tDur/Math.abs(t._ts||t._rts||1e-8)||0))},At=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=ht(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Mt(t),n._dirty||Ct(n,t)),t},Pt=function(t,e){var n;if((e._time||e._initted&&!e._dur)&&(n=Tt(t.rawTime(),e),(!e._dur||zt(0,e.totalDuration(),n)-e._tTime>1e-8)&&e.render(n,!0)),Ct(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-1e-8}},St=function(t,e,n,r){return e.parent&&wt(e),e._start=ht((A(n)?n:n||t!==s?Xt(t,n,e):t._time)+e._delay),e._end=ht(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),function(t,e,n,r,i){void 0===n&&(n="_first"),void 0===r&&(r="_last");var o,s=t[r];if(i)for(o=e[i];s&&s[i]>o;)s=s._prev;s?(e._next=s._next,s._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[r]=e,e._prev=s,e.parent=e._dp=t}(t,e,"_first","_last",t._sort?"_start":0),Bt(e)||(t._recent=e),r||Pt(t,e),t},Ot=function(t,e){return(V.ScrollTrigger||q("scrollTrigger",e))&&V.ScrollTrigger.create(e,t)},kt=function(t,e,n,r){return ke(t,e),t._initted?!n&&t._pt&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&c!==pe.frame?($.push(t),t._lazy=[e,r],1):void 0:1},Bt=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},Lt=function(t,e,n,r){var i=t._repeat,o=ht(e)||0,s=t._tTime/t._tDur;return s&&!r&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:ht(o*(i+1)+t._rDelay*i):o,s>0&&!r?At(t,t._tTime=t._tDur*s):t.parent&&Mt(t),n||Ct(t.parent,t),t},Nt=function(t){return t instanceof Me?Ct(t):Lt(t,t._dur)},Rt={_start:0,endTime:Q,totalDuration:Q},Xt=function t(e,n,r){var i,o,s,a=e.labels,u=e._recent||Rt,l=e.duration()>=y?u.endTime(!1):e._dur;return T(n)&&(isNaN(n)||n in a)?(o=n.charAt(0),s="%"===n.substr(-1),i=n.indexOf("="),"<"===o||">"===o?(i>=0&&(n=n.replace(/=/,"")),("<"===o?u._start:u.endTime(u._repeat>=0))+(parseFloat(n.substr(1))||0)*(s?(i<0?u:r).totalDuration()/100:1)):i<0?(n in a||(a[n]=l),a[n]):(o=parseFloat(n.charAt(i-1)+n.substr(i+1)),s&&r&&(o=o/100*(N(r)?r[0]:r).totalDuration()),i>1?t(e,n.substr(0,i-1),r)+o:l+o)):null==n?l:+n},Yt=function(t,e,n){var r,i,o=A(e[1]),s=(o?2:1)+(t<2?0:1),a=e[s];if(o&&(a.duration=e[1]),a.parent=n,t){for(r=a,i=n;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=O(i.vars.inherit)&&i.parent;a.immediateRender=O(r.immediateRender),t<2?a.runBackwards=1:a.startAt=e[s-1]}return new Xe(e[0],a,e[s+1])},It=function(t,e){return t||0===t?e(t):e},zt=function(t,e,n){return n<t?t:n>e?e:n},Ht=function(t,e){return T(t)&&(e=W.exec(t))?t.substr(e.index+e[0].length):""},Wt=[].slice,Vt=function(t,e){return t&&S(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&S(t[0]))&&!t.nodeType&&t!==a},jt=function(t,e,n){return void 0===n&&(n=[]),t.forEach((function(t){var r;return T(t)&&!e||Vt(t,1)?(r=n).push.apply(r,Ut(t)):n.push(t)}))||n},Ut=function(t,e,n){return!T(t)||n||!u&&de()?N(t)?jt(t,n):Vt(t)?Wt.call(t,0):t?[t]:[]:Wt.call((e||l).querySelectorAll(t),0)},qt=function(t){return t.sort((function(){return.5-Math.random()}))},Gt=function(t){if(M(t))return t;var e=S(t)?t:{each:t},n=xe(e.ease),r=e.from||0,i=parseFloat(e.base)||0,o={},s=r>0&&r<1,a=isNaN(r)||s,u=e.axis,l=r,h=r;return T(r)?l=h={center:.5,edges:.5,end:1}[r]||0:!s&&a&&(l=r[0],h=r[1]),function(t,s,c){var f,p,d,g,D,m,v,_,x,w=(c||e).length,C=o[w];if(!C){if(!(x="auto"===e.grid?0:(e.grid||[1,y])[1])){for(v=-y;v<(v=c[x++].getBoundingClientRect().left)&&x<w;);x--}for(C=o[w]=[],f=a?Math.min(x,w)*l-.5:r%x,p=x===y?0:a?w*h/x-.5:r/x|0,v=0,_=y,m=0;m<w;m++)d=m%x-f,g=p-(m/x|0),C[m]=D=u?Math.abs("y"===u?g:d):F(d*d+g*g),D>v&&(v=D),D<_&&(_=D);"random"===r&&qt(C),C.max=v-_,C.min=_,C.v=w=(parseFloat(e.amount)||parseFloat(e.each)*(x>w?w-1:u?"y"===u?w/x:x:Math.max(x,w/x))||0)*("edges"===r?-1:1),C.b=w<0?i-w:i,C.u=Ht(e.amount||e.each)||0,n=n&&w<0?_e(n):n}return w=(C[t]-C.min)/C.max||0,ht(C.b+(n?n(w):w)*C.v)+C.u}},Kt=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var r=Math.round(parseFloat(n)/t)*t*e;return(r-r%1)/e+(A(n)?0:Ht(n))}},Qt=function(t,e){var n,r,i=N(t);return!i&&S(t)&&(n=i=t.radius||y,t.values?(t=Ut(t.values),(r=!A(t[0]))&&(n*=n)):t=Kt(t.increment)),It(e,i?M(t)?function(e){return r=t(e),Math.abs(r-e)<=n?r:e}:function(e){for(var i,o,s=parseFloat(r?e.x:e),a=parseFloat(r?e.y:0),u=y,l=0,h=t.length;h--;)(i=r?(i=t[h].x-s)*i+(o=t[h].y-a)*o:Math.abs(t[h]-s))<u&&(u=i,l=h);return l=!n||u<=n?t[l]:e,r||l===e||A(e)?l:l+Ht(e)}:Kt(t))},Zt=function(t,e,n,r){return It(N(t)?!e:!0===n?!!(n=0):!r,(function(){return N(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+.99*n))/n)*n*r)/r}))},$t=function(t,e,n){return It(n,(function(n){return t[~~e(n)]}))},Jt=function(t){for(var e,n,r,i,o=0,s="";~(e=t.indexOf("random(",o));)r=t.indexOf(")",e),i="["===t.charAt(e+7),n=t.substr(e+7,r-e-7).match(i?H:R),s+=t.substr(o,e-o)+Zt(i?n:+n[0],i?0:+n[1],+n[2]||1e-5),o=r+1;return s+t.substr(o,t.length-o)},te=function(t,e,n,r,i){var o=e-t,s=r-n;return It(i,(function(e){return n+((e-t)/o*s||0)}))},ee=function(t,e,n){var r,i,o,s=t.labels,a=y;for(r in s)(i=s[r]-e)<0==!!n&&i&&a>(i=Math.abs(i))&&(o=r,a=i);return o},ne=function(t,e,n){var r,i,o=t.vars,s=o[e];if(s)return r=o[e+"Params"],i=o.callbackScope||t,n&&$.length&&ft(),r?s.apply(i,r):s.call(i)},re=function(t){return wt(t),t.scrollTrigger&&t.scrollTrigger.kill(!1),t.progress()<1&&ne(t,"onInterrupt"),t},ie=function(t){var e=(t=!t.name&&t.default||t).name,n=M(t),r=e&&!n&&t.init?function(){this._props=[]}:t,i={init:Q,render:qe,add:Se,kill:Ke,modifier:Ge,rawVars:0},o={targetTest:0,get:0,getSetter:We,aliases:{},register:0};if(de(),t!==r){if(tt[e])return;Dt(r,Dt(_t(t,i),o)),mt(r.prototype,mt(i,_t(t,o))),tt[r.prop=e]=r,t.targetTest&&(rt.push(r),Z[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}K(e,r),t.register&&t.register(nn,r,$e)},oe={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},se=function(t,e,n){return 255*(6*(t+=t<0?1:t>1?-1:0)<1?e+(n-e)*t*6:t<.5?n:3*t<2?e+(n-e)*(2/3-t)*6:e)+.5|0},ae=function(t,e,n){var r,i,o,s,a,u,l,h,c,f,p=t?A(t)?[t>>16,t>>8&255,255&t]:0:oe.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),oe[t])p=oe[t];else if("#"===t.charAt(0)){if(t.length<6&&(r=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+r+r+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&255,255&p,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t]}else if("hsl"===t.substr(0,3))if(p=f=t.match(R),e){if(~t.indexOf("="))return p=t.match(X),n&&p.length<4&&(p[3]=1),p}else s=+p[0]%360/360,a=+p[1]/100,r=2*(u=+p[2]/100)-(i=u<=.5?u*(a+1):u+a-u*a),p.length>3&&(p[3]*=1),p[0]=se(s+1/3,r,i),p[1]=se(s,r,i),p[2]=se(s-1/3,r,i);else p=t.match(R)||oe.transparent;p=p.map(Number)}return e&&!f&&(r=p[0]/255,i=p[1]/255,o=p[2]/255,u=((l=Math.max(r,i,o))+(h=Math.min(r,i,o)))/2,l===h?s=a=0:(c=l-h,a=u>.5?c/(2-l-h):c/(l+h),s=l===r?(i-o)/c+(i<o?6:0):l===i?(o-r)/c+2:(r-i)/c+4,s*=60),p[0]=~~(s+.5),p[1]=~~(100*a+.5),p[2]=~~(100*u+.5)),n&&p.length<4&&(p[3]=1),p},ue=function(t){var e=[],n=[],r=-1;return t.split(he).forEach((function(t){var i=t.match(Y)||[];e.push.apply(e,i),n.push(r+=i.length+1)})),e.c=n,e},le=function(t,e,n){var r,i,o,s,a="",u=(t+a).match(he),l=e?"hsla(":"rgba(",h=0;if(!u)return t;if(u=u.map((function(t){return(t=ae(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),n&&(o=ue(t),(r=n.c).join(a)!==o.c.join(a)))for(s=(i=t.replace(he,"1").split(Y)).length-1;h<s;h++)a+=i[h]+(~r.indexOf(h)?u.shift()||l+"0,0,0,0)":(o.length?o:u.length?u:n).shift());if(!i)for(s=(i=t.split(he)).length-1;h<s;h++)a+=i[h]+u[h];return a+i[s]},he=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in oe)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),ce=/hsl[a]?\(/,fe=function(t){var e,n=t.join(" ");if(he.lastIndex=0,he.test(n))return e=ce.test(n),t[1]=le(t[1],e),t[0]=le(t[0],e,ue(t[1])),!0},pe=function(){var t,e,n,r,i,o,s=Date.now,c=500,f=33,d=s(),g=d,D=1e3/240,m=D,v=[],_=function n(a){var u,l,h,p,_=s()-g,y=!0===a;if(_>c&&(d+=_-f),((u=(h=(g+=_)-d)-m)>0||y)&&(p=++r.frame,i=h-1e3*r.time,r.time=h/=1e3,m+=u+(u>=D?4:D-u),l=1),y||(t=e(n)),l)for(o=0;o<v.length;o++)v[o](h,i,p,a)};return r={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(t){return i/(1e3/(t||60))},wake:function(){h&&(!u&&k()&&(a=u=window,l=a.document||{},V.gsap=nn,(a.gsapVersions||(a.gsapVersions=[])).push(nn.version),U(j||a.GreenSockGlobals||!a.gsap&&a||{}),n=a.requestAnimationFrame),t&&r.sleep(),e=n||function(t){return setTimeout(t,m-1e3*r.time+1|0)},p=1,_(2))},sleep:function(){(n?a.cancelAnimationFrame:clearTimeout)(t),p=0,e=Q},lagSmoothing:function(t,e){c=t||1/1e-8,f=Math.min(e,c,0)},fps:function(t){D=1e3/(t||240),m=1e3*r.time+D},add:function(t){v.indexOf(t)<0&&v.push(t),de()},remove:function(t,e){~(e=v.indexOf(t))&&v.splice(e,1)&&o>=e&&o--},_listeners:v}}(),de=function(){return!p&&pe.wake()},ge={},De=/^[\d.\-M][\d.\-,\s]/,me=/["']/g,ve=function(t){for(var e,n,r,i={},o=t.substr(1,t.length-3).split(":"),s=o[0],a=1,u=o.length;a<u;a++)n=o[a],e=a!==u-1?n.lastIndexOf(","):n.length,r=n.substr(0,e),i[s]=isNaN(r)?r.replace(me,"").trim():+r,s=n.substr(e+1).trim();return i},_e=function(t){return function(e){return 1-t(1-e)}},ye=function t(e,n){for(var r,i=e._first;i;)i instanceof Me?t(i,n):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===n||(i.timeline?t(i.timeline,n):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=n)),i=i._next},xe=function(t,e){return t&&(M(t)?t:ge[t]||function(t){var e,n,r,i,o=(t+"").split("("),s=ge[o[0]];return s&&o.length>1&&s.config?s.config.apply(null,~t.indexOf("{")?[ve(o[1])]:(e=t,n=e.indexOf("(")+1,r=e.indexOf(")"),i=e.indexOf("(",n),e.substring(n,~i&&i<r?e.indexOf(")",r+1):r)).split(",").map(dt)):ge._CE&&De.test(t)?ge._CE("",t):s}(t))||e},we=function(t,e,n,r){void 0===n&&(n=function(t){return 1-e(1-t)}),void 0===r&&(r=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var i,o={easeIn:e,easeOut:n,easeInOut:r};return ut(t,(function(t){for(var e in ge[t]=V[t]=o,ge[i=t.toLowerCase()]=n,o)ge[i+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=ge[t+"."+e]=o[e]})),o},Ce=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Fe=function t(e,n,r){var i=n>=1?n:1,o=(r||(e?.3:.45))/(n<1?n:1),s=o/x*(Math.asin(1/i)||0),a=function(t){return 1===t?1:i*Math.pow(2,-10*t)*b((t-s)*o)+1},u="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Ce(a);return o=x/o,u.config=function(n,r){return t(e,n,r)},u},Ee=function t(e,n){void 0===n&&(n=1.70158);var r=function(t){return t?--t*t*((n+1)*t+n)+1:0},i="out"===e?r:"in"===e?function(t){return 1-r(1-t)}:Ce(r);return i.config=function(n){return t(e,n)},i};ut("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var n=e<5?e+1:e;we(t+",Power"+(n-1),e?function(t){return Math.pow(t,n)}:function(t){return t},(function(t){return 1-Math.pow(1-t,n)}),(function(t){return t<.5?Math.pow(2*t,n)/2:1-Math.pow(2*(1-t),n)/2}))})),ge.Linear.easeNone=ge.none=ge.Linear.easeIn,we("Elastic",Fe("in"),Fe("out"),Fe()),d=7.5625,D=1/(g=2.75),we("Bounce",(function(t){return 1-m(1-t)}),m=function(t){return t<D?d*t*t:t<.7272727272727273?d*Math.pow(t-1.5/g,2)+.75:t<.9090909090909092?d*(t-=2.25/g)*t+.9375:d*Math.pow(t-2.625/g,2)+.984375}),we("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),we("Circ",(function(t){return-(F(1-t*t)-1)})),we("Sine",(function(t){return 1===t?1:1-E(t*w)})),we("Back",Ee("in"),Ee("out"),Ee()),ge.SteppedEase=ge.steps=V.SteppedEase={config:function(t,e){void 0===t&&(t=1);var n=1/t,r=t+(e?0:1),i=e?1:0;return function(t){return((r*zt(0,1-1e-8,t)|0)+i)*n}}},_.ease=ge["quad.out"],ut("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return it+=t+","+t+"Params,"}));var be=function(t,e){this.id=C++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:at,this.set=e?e.getSetter:We},Te=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Lt(this,+t.duration,1,1),this.data=t.data,p||pe.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,Lt(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(de(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(At(this,t),!n._dp||n.parent||Pt(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&St(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&1e-8===Math.abs(this._zTime)||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),pt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Et(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Et(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(t,e){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*n,e):this._repeat?bt(this._tTime,n)+1:1},e.timeScale=function(t){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var e=this.parent&&this._ts?Tt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,Ft(this.totalTime(zt(-this._delay,this._tDur,e),!0)),Mt(this),this},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(de(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&1e-8!==Math.abs(this._zTime)&&(this._tTime-=1e-8)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&St(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(O(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Tt(e.rawTime(t),this):this._tTime:this._tTime},e.globalTime=function(t){for(var e=this,n=arguments.length?t:e.rawTime();e;)n=e._start+n/(e._ts||1),e=e._dp;return n},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,Nt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,Nt(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Xt(this,t),O(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,O(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,n=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=n&&t<this.endTime(!0)-1e-8))},e.eventCallback=function(t,e,n){var r=this.vars;return arguments.length>1?(e?(r[t]=e,n&&(r[t+"Params"]=n),"onUpdate"===t&&(this._onUpdate=e)):delete r[t],this):r[t]},e.then=function(t){var e=this;return new Promise((function(n){var r=M(t)?t:gt,i=function(){var t=e.then;e.then=null,M(r)&&(r=r(e))&&(r.then||r===e)&&(e.then=t),n(r),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?i():e._prom=i}))},e.kill=function(){re(this)},t}();Dt(Te.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Me=function(t){function e(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=O(e.sortChildren),s&&St(e.parent||s,r(i),n),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&Ot(r(i),e.scrollTrigger),i}i(e,t);var n=e.prototype;return n.to=function(t,e,n){return Yt(0,arguments,this),this},n.from=function(t,e,n){return Yt(1,arguments,this),this},n.fromTo=function(t,e,n,r){return Yt(2,arguments,this),this},n.set=function(t,e,n){return e.duration=0,e.parent=this,yt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new Xe(t,e,Xt(this,n),1),this},n.call=function(t,e,n){return St(this,Xe.delayedCall(0,t,e),n)},n.staggerTo=function(t,e,n,r,i,o,s){return n.duration=e,n.stagger=n.stagger||r,n.onComplete=o,n.onCompleteParams=s,n.parent=this,new Xe(t,n,Xt(this,i)),this},n.staggerFrom=function(t,e,n,r,i,o,s){return n.runBackwards=1,yt(n).immediateRender=O(n.immediateRender),this.staggerTo(t,e,n,r,i,o,s)},n.staggerFromTo=function(t,e,n,r,i,o,s,a){return r.startAt=n,yt(r).immediateRender=O(r.immediateRender),this.staggerTo(t,e,r,i,o,s,a)},n.render=function(t,e,n){var r,i,o,a,u,l,h,c,f,p,d,g,D=this._time,m=this._dirty?this.totalDuration():this._tDur,v=this._dur,_=t<=0?0:ht(t),y=this._zTime<0!=t<0&&(this._initted||!v);if(this!==s&&_>m&&t>=0&&(_=m),_!==this._tTime||n||y){if(D!==this._time&&v&&(_+=this._time-D,t+=this._time-D),r=_,f=this._start,l=!(c=this._ts),y&&(v||(D=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(d=this._yoyo,u=v+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*u+t,e,n);if(r=ht(_%u),_===m?(a=this._repeat,r=v):((a=~~(_/u))&&a===_/u&&(r=v,a--),r>v&&(r=v)),p=bt(this._tTime,u),!D&&this._tTime&&p!==a&&(p=a),d&&1&a&&(r=v-r,g=1),a!==p&&!this._lock){var x=d&&1&p,w=x===(d&&1&a);if(a<p&&(x=!x),D=x?0:v,this._lock=1,this.render(D||(g?0:ht(a*u)),e,!v)._lock=0,this._tTime=_,!e&&this.parent&&ne(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1),D&&D!==this._time||l!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,m=this._tDur,w&&(this._lock=2,D=x?v:-1e-4,this.render(D,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!l)return this;ye(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function(t,e,n){var r;if(n>e)for(r=t._first;r&&r._start<=n;){if("isPause"===r.data&&r._start>e)return r;r=r._next}else for(r=t._last;r&&r._start>=n;){if("isPause"===r.data&&r._start<e)return r;r=r._prev}}(this,ht(D),ht(r)))&&(_-=r-(r=h._start)),this._tTime=_,this._time=r,this._act=!c,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,D=0),!D&&r&&!e&&(ne(this,"onStart"),this._tTime!==_))return this;if(r>=D&&t>=0)for(i=this._first;i;){if(o=i._next,(i._act||r>=i._start)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(r-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(r-i._start)*i._ts,e,n),r!==this._time||!this._ts&&!l){h=0,o&&(_+=this._zTime=-1e-8);break}}i=o}else{i=this._last;for(var C=t<0?t:r;i;){if(o=i._prev,(i._act||C<=i._end)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(C-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(C-i._start)*i._ts,e,n),r!==this._time||!this._ts&&!l){h=0,o&&(_+=this._zTime=C?-1e-8:1e-8);break}}i=o}}if(h&&!e&&(this.pause(),h.render(r>=D?0:-1e-8)._zTime=r>=D?1:-1,this._ts))return this._start=f,Mt(this),this.render(t,e,n);this._onUpdate&&!e&&ne(this,"onUpdate",!0),(_===m&&m>=this.totalDuration()||!_&&D)&&(f!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||((t||!v)&&(_===m&&this._ts>0||!_&&this._ts<0)&&wt(this,1),e||t<0&&!D||!_&&!D&&m||(ne(this,_===m&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(_<m&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(t,e){var n=this;if(A(e)||(e=Xt(this,e,t)),!(t instanceof Te)){if(N(t))return t.forEach((function(t){return n.add(t,e)})),this;if(T(t))return this.addLabel(t,e);if(!M(t))return this;t=Xe.delayedCall(0,t)}return this!==t?St(this,t,e):this},n.getChildren=function(t,e,n,r){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===r&&(r=-y);for(var i=[],o=this._first;o;)o._start>=r&&(o instanceof Xe?e&&i.push(o):(n&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,n)))),o=o._next;return i},n.getById=function(t){for(var e=this.getChildren(1,1,1),n=e.length;n--;)if(e[n].vars.id===t)return e[n]},n.remove=function(t){return T(t)?this.removeLabel(t):M(t)?this.killTweensOf(t):(xt(this,t),t===this._recent&&(this._recent=this._last),Ct(this))},n.totalTime=function(e,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ht(pe.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,n),this._forcing=0,this):this._tTime},n.addLabel=function(t,e){return this.labels[t]=Xt(this,e),this},n.removeLabel=function(t){return delete this.labels[t],this},n.addPause=function(t,e,n){var r=Xe.delayedCall(0,e||Q,n);return r.data="isPause",this._hasPause=1,St(this,r,Xt(this,t))},n.removePause=function(t){var e=this._first;for(t=Xt(this,t);e;)e._start===t&&"isPause"===e.data&&wt(e),e=e._next},n.killTweensOf=function(t,e,n){for(var r=this.getTweensOf(t,n),i=r.length;i--;)Ae!==r[i]&&r[i].kill(t,e);return this},n.getTweensOf=function(t,e){for(var n,r=[],i=Ut(t),o=this._first,s=A(e);o;)o instanceof Xe?ct(o._targets,i)&&(s?(!Ae||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&r.push(o):(n=o.getTweensOf(i,e)).length&&r.push.apply(r,n),o=o._next;return r},n.tweenTo=function(t,e){e=e||{};var n,r=this,i=Xt(r,t),o=e,s=o.startAt,a=o.onStart,u=o.onStartParams,l=o.immediateRender,h=Xe.to(r,Dt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:e.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale())||1e-8,onStart:function(){if(r.pause(),!n){var t=e.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale());h._dur!==t&&Lt(h,t,0,1).render(h._time,!0,!0),n=1}a&&a.apply(h,u||[])}},e));return l?h.render(0):h},n.tweenFromTo=function(t,e,n){return this.tweenTo(e,Dt({startAt:{time:Xt(this,t)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(t){return void 0===t&&(t=this._time),ee(this,Xt(this,t))},n.previousLabel=function(t){return void 0===t&&(t=this._time),ee(this,Xt(this,t),1)},n.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+1e-8)},n.shiftChildren=function(t,e,n){void 0===n&&(n=0);for(var r,i=this._first,o=this.labels;i;)i._start>=n&&(i._start+=t,i._end+=t),i=i._next;if(e)for(r in o)o[r]>=n&&(o[r]+=t);return Ct(this)},n.invalidate=function(){var e=this._first;for(this._lock=0;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},n.clear=function(t){void 0===t&&(t=!0);for(var e,n=this._first;n;)e=n._next,this.remove(n),n=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Ct(this)},n.totalDuration=function(t){var e,n,r,i=0,o=this,a=o._last,u=y;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(r=o.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(n=a._start)>u&&o._sort&&a._ts&&!o._lock?(o._lock=1,St(o,a,n-a._delay,1)._lock=0):u=n,n<0&&a._ts&&(i-=n,(!r&&!o._dp||r&&r.smoothChildTiming)&&(o._start+=n/o._ts,o._time-=n,o._tTime-=n),o.shiftChildren(-n,!1,-Infinity),u=0),a._end>i&&a._ts&&(i=a._end),a=e;Lt(o,o===s&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(t){if(s._ts&&(pt(s,Tt(t,s)),c=pe.frame),pe.frame>=nt){nt+=v.autoSleep||120;var e=s._first;if((!e||!e._ts)&&v.autoSleep&&pe._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||pe.sleep()}}},e}(Te);Dt(Me.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ae,Pe=function(t,e,n,r,i,o,s){var a,u,l,h,c,f,p,d,g=new $e(this._pt,t,e,0,1,Ue,null,i),D=0,m=0;for(g.b=n,g.e=r,n+="",(p=~(r+="").indexOf("random("))&&(r=Jt(r)),o&&(o(d=[n,r],t,e),n=d[0],r=d[1]),u=n.match(I)||[];a=I.exec(r);)h=a[0],c=r.substring(D,a.index),l?l=(l+1)%5:"rgba("===c.substr(-5)&&(l=1),h!==u[m++]&&(f=parseFloat(u[m-1])||0,g._pt={_next:g._pt,p:c||1===m?c:",",s:f,c:"="===h.charAt(1)?parseFloat(h.substr(2))*("-"===h.charAt(0)?-1:1):parseFloat(h)-f,m:l&&l<4?Math.round:0},D=I.lastIndex);return g.c=D<r.length?r.substring(D,r.length):"",g.fp=s,(z.test(r)||p)&&(g.e=0),this._pt=g,g},Se=function(t,e,n,r,i,o,s,a,u){M(r)&&(r=r(i||0,t,o));var l,h=t[e],c="get"!==n?n:M(h)?u?t[e.indexOf("set")||!M(t["get"+e.substr(3)])?e:"get"+e.substr(3)](u):t[e]():h,f=M(h)?u?ze:Ie:Ye;if(T(r)&&(~r.indexOf("random(")&&(r=Jt(r)),"="===r.charAt(1)&&((l=parseFloat(c)+parseFloat(r.substr(2))*("-"===r.charAt(0)?-1:1)+(Ht(c)||0))||0===l)&&(r=l)),c!==r)return isNaN(c*r)||""===r?(!h&&!(e in t)&&q(e,r),Pe.call(this,t,e,c,r,f,a||v.stringFilter,u)):(l=new $e(this._pt,t,e,+c||0,r-(c||0),"boolean"==typeof h?je:Ve,0,f),u&&(l.fp=u),s&&l.modifier(s,this,t),this._pt=l)},Oe=function(t,e,n,r,i,o){var s,a,u,l;if(tt[t]&&!1!==(s=new tt[t]).init(i,s.rawVars?e[t]:function(t,e,n,r,i){if(M(t)&&(t=Le(t,i,e,n,r)),!S(t)||t.style&&t.nodeType||N(t)||L(t))return T(t)?Le(t,i,e,n,r):t;var o,s={};for(o in t)s[o]=Le(t[o],i,e,n,r);return s}(e[t],r,i,o,n),n,r,o)&&(n._pt=a=new $e(n._pt,i,t,0,1,s.render,s,0,s.priority),n!==f))for(u=n._ptLookup[n._targets.indexOf(i)],l=s._props.length;l--;)u[s._props[l]]=a;return s},ke=function t(e,n){var r,i,a,u,l,h,c,f,p,d,g,D,m,v=e.vars,x=v.ease,w=v.startAt,C=v.immediateRender,F=v.lazy,E=v.onUpdate,b=v.onUpdateParams,T=v.callbackScope,M=v.runBackwards,A=v.yoyoEase,P=v.keyframes,S=v.autoRevert,k=e._dur,B=e._startAt,L=e._targets,N=e.parent,R=N&&"nested"===N.data?N.parent._targets:L,X="auto"===e._overwrite&&!o,Y=e.timeline;if(Y&&(!P||!x)&&(x="none"),e._ease=xe(x,_.ease),e._yEase=A?_e(xe(!0===A?x:A,_.ease)):0,A&&e._yoyo&&!e._repeat&&(A=e._yEase,e._yEase=e._ease,e._ease=A),e._from=!Y&&!!v.runBackwards,!Y||P&&!v.stagger){if(D=(f=L[0]?st(L[0]).harness:0)&&v[f.prop],r=_t(v,Z),B&&wt(B.render(-1,!0)),w)if(wt(e._startAt=Xe.set(L,Dt({data:"isStart",overwrite:!1,parent:N,immediateRender:!0,lazy:O(F),startAt:null,delay:0,onUpdate:E,onUpdateParams:b,callbackScope:T,stagger:0},w))),n<0&&!C&&!S&&e._startAt.render(-1,!0),C){if(n>0&&!S&&(e._startAt=0),k&&n<=0)return void(n&&(e._zTime=n))}else!1===S&&(e._startAt=0);else if(M&&k)if(B)!S&&(e._startAt=0);else if(n&&(C=!1),a=Dt({overwrite:!1,data:"isFromStart",lazy:C&&O(F),immediateRender:C,stagger:0,parent:N},r),D&&(a[f.prop]=D),wt(e._startAt=Xe.set(L,a)),n<0&&e._startAt.render(-1,!0),e._zTime=n,C){if(!n)return}else t(e._startAt,1e-8);for(e._pt=0,F=k&&O(F)||F&&!k,i=0;i<L.length;i++){if(c=(l=L[i])._gsap||ot(L)[i]._gsap,e._ptLookup[i]=d={},J[c.id]&&$.length&&ft(),g=R===L?i:R.indexOf(l),f&&!1!==(p=new f).init(l,D||r,e,g,R)&&(e._pt=u=new $e(e._pt,l,p.name,0,1,p.render,p,0,p.priority),p._props.forEach((function(t){d[t]=u})),p.priority&&(h=1)),!f||D)for(a in r)tt[a]&&(p=Oe(a,r,e,g,l,R))?p.priority&&(h=1):d[a]=u=Se.call(e,l,a,"get",r[a],g,R,0,v.stringFilter);e._op&&e._op[i]&&e.kill(l,e._op[i]),X&&e._pt&&(Ae=e,s.killTweensOf(l,d,e.globalTime(n)),m=!e.parent,Ae=0),e._pt&&F&&(J[c.id]=1)}h&&Ze(e),e._onInit&&e._onInit(e)}e._onUpdate=E,e._initted=(!e._op||e._pt)&&!m,P&&n<=0&&Y.render(y,!0,!0)},Be=function(t,e,n,r){var i,o,s=e.ease||r||"power1.inOut";if(N(e))o=n[t]||(n[t]=[]),e.forEach((function(t,n){return o.push({t:n/(e.length-1)*100,v:t,e:s})}));else for(i in e)o=n[i]||(n[i]=[]),"ease"===i||o.push({t:parseFloat(t),v:e[i],e:s})},Le=function(t,e,n,r,i){return M(t)?t.call(e,n,r,i):T(t)&&~t.indexOf("random(")?Jt(t):t},Ne=it+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",Re={};ut(Ne+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return Re[t]=1}));var Xe=function(t){function e(e,n,i,a){var u;"number"==typeof n&&(i.duration=n,n=i,i=null);var l,h,c,f,p,d,g,D,m=(u=t.call(this,a?n:yt(n))||this).vars,_=m.duration,y=m.delay,x=m.immediateRender,w=m.stagger,C=m.overwrite,F=m.keyframes,E=m.defaults,b=m.scrollTrigger,T=m.yoyoEase,M=n.parent||s,P=(N(e)||L(e)?A(e[0]):"length"in n)?[e]:Ut(e);if(u._targets=P.length?ot(P):G("GSAP target "+e+" not found. https://greensock.com",!v.nullTargetWarn)||[],u._ptLookup=[],u._overwrite=C,F||w||B(_)||B(y)){if(n=u.vars,(l=u.timeline=new Me({data:"nested",defaults:E||{}})).kill(),l.parent=l._dp=r(u),l._start=0,w||B(_)||B(y)){if(f=P.length,g=w&&Gt(w),S(w))for(p in w)~Ne.indexOf(p)&&(D||(D={}),D[p]=w[p]);for(h=0;h<f;h++)(c=_t(n,Re)).stagger=0,T&&(c.yoyoEase=T),D&&mt(c,D),d=P[h],c.duration=+Le(_,r(u),h,d,P),c.delay=(+Le(y,r(u),h,d,P)||0)-u._delay,!w&&1===f&&c.delay&&(u._delay=y=c.delay,u._start+=y,c.delay=0),l.to(d,c,g?g(h,d,P):0),l._ease=ge.none;l.duration()?_=y=0:u.timeline=0}else if(F){yt(Dt(l.vars.defaults,{ease:"none"})),l._ease=xe(F.ease||n.ease||"none");var k,R,X,Y=0;if(N(F))F.forEach((function(t){return l.to(P,t,">")}));else{for(p in c={},F)"ease"===p||"easeEach"===p||Be(p,F[p],c,F.easeEach);for(p in c)for(k=c[p].sort((function(t,e){return t.t-e.t})),Y=0,h=0;h<k.length;h++)(X={ease:(R=k[h]).e,duration:(R.t-(h?k[h-1].t:0))/100*_})[p]=R.v,l.to(P,X,Y),Y+=X.duration;l.duration()<_&&l.to({},{duration:_-l.duration()})}}_||u.duration(_=l.duration())}else u.timeline=0;return!0!==C||o||(Ae=r(u),s.killTweensOf(P),Ae=0),St(M,r(u),i),n.reversed&&u.reverse(),n.paused&&u.paused(!0),(x||!_&&!F&&u._start===ht(M._time)&&O(x)&&function t(e){return!e||e._ts&&t(e.parent)}(r(u))&&"nested"!==M.data)&&(u._tTime=-1e-8,u.render(Math.max(0,-y))),b&&Ot(r(u),b),u}i(e,t);var n=e.prototype;return n.render=function(t,e,n){var r,i,o,s,a,u,l,h,c,f=this._time,p=this._tDur,d=this._dur,g=t>p-1e-8&&t>=0?p:t<1e-8?0:t;if(d){if(g!==this._tTime||!t||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=t<0){if(r=g,h=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*s+t,e,n);if(r=ht(g%s),g===p?(o=this._repeat,r=d):((o=~~(g/s))&&o===g/s&&(r=d,o--),r>d&&(r=d)),(u=this._yoyo&&1&o)&&(c=this._yEase,r=d-r),a=bt(this._tTime,s),r===f&&!n&&this._initted)return this;o!==a&&(h&&this._yEase&&ye(h,u),!this.vars.repeatRefresh||u||this._lock||(this._lock=n=1,this.render(ht(s*o),!0).invalidate()._lock=0))}if(!this._initted){if(kt(this,t<0?t:r,n,e))return this._tTime=0,this;if(d!==this._dur)return this.render(t,e,n)}if(this._tTime=g,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(c||this._ease)(r/d),this._from&&(this.ratio=l=1-l),r&&!f&&!e&&(ne(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(l,i.d),i=i._next;h&&h.render(t<0?t:!r&&u?-1e-8:h._dur*h._ease(r/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(t<0&&this._startAt&&this._startAt.render(t,!0,n),ne(this,"onUpdate")),this._repeat&&o!==a&&this.vars.onRepeat&&!e&&this.parent&&ne(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(t<0&&this._startAt&&!this._onUpdate&&this._startAt.render(t,!0,!0),(t||!d)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&wt(this,1),e||t<0&&!f||!g&&!f||(ne(this,g===p?"onComplete":"onReverseComplete",!0),this._prom&&!(g<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,n,r){var i,o,s,a=t.ratio,u=e<0||!e&&(!t._start&&function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))}(t)&&(t._initted||!Bt(t))||(t._ts<0||t._dp._ts<0)&&!Bt(t))?0:1,l=t._rDelay,h=0;if(l&&t._repeat&&(h=zt(0,t._tDur,e),o=bt(h,l),t._yoyo&&1&o&&(u=1-u),o!==bt(t._tTime,l)&&(a=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==a||r||1e-8===t._zTime||!e&&t._zTime){if(!t._initted&&kt(t,e,r,n))return;for(s=t._zTime,t._zTime=e||(n?1e-8:0),n||(n=e&&!s),t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=h,i=t._pt;i;)i.r(u,i.d),i=i._next;t._startAt&&e<0&&t._startAt.render(e,!0,!0),t._onUpdate&&!n&&ne(t,"onUpdate"),h&&t._repeat&&!n&&t.parent&&ne(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&wt(t,1),n||(ne(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),t.prototype.invalidate.call(this)},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?re(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Ae&&!0!==Ae.vars.overwrite)._first||re(this),this.parent&&n!==this.timeline.totalDuration()&&Lt(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,o,s,a,u,l,h=this._targets,c=t?Ut(t):h,f=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,r=n===e.length;r&&n--&&t[n]===e[n];);return n<0}(h,c))return"all"===e&&(this._pt=0),re(this);for(r=this._op=this._op||[],"all"!==e&&(T(e)&&(a={},ut(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var n,r,i,o,s=t[0]?st(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(r in n=mt({},e),a)if(r in n)for(i=(o=a[r].split(",")).length;i--;)n[o[i]]=n[r];return n}(h,e)),l=h.length;l--;)if(~c.indexOf(h[l]))for(a in i=f[l],"all"===e?(r[l]=e,s=i,o={}):(o=r[l]=r[l]||{},s=e),s)(u=i&&i[a])&&("kill"in u.d&&!0!==u.d.kill(a)||xt(this,u,"_pt"),delete i[a]),"all"!==o&&(o[a]=1);return this._initted&&!this._pt&&p&&re(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return Yt(1,arguments)},e.delayedCall=function(t,n,r,i){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},e.fromTo=function(t,e,n){return Yt(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return s.killTweensOf(t,e,n)},e}(Te);Dt(Xe.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ut("staggerTo,staggerFrom,staggerFromTo",(function(t){Xe[t]=function(){var e=new Me,n=Wt.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var Ye=function(t,e,n){return t[e]=n},Ie=function(t,e,n){return t[e](n)},ze=function(t,e,n,r){return t[e](r.fp,n)},He=function(t,e,n){return t.setAttribute(e,n)},We=function(t,e){return M(t[e])?Ie:P(t[e])&&t.setAttribute?He:Ye},Ve=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},je=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Ue=function(t,e){var n=e._pt,r="";if(!t&&e.b)r=e.b;else if(1===t&&e.e)r=e.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+r,n=n._next;r+=e.c}e.set(e.t,e.p,r,e)},qe=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Ge=function(t,e,n,r){for(var i,o=this._pt;o;)i=o._next,o.p===r&&o.modifier(t,e,n),o=i},Ke=function(t){for(var e,n,r=this._pt;r;)n=r._next,r.p===t&&!r.op||r.op===t?xt(this,r,"_pt"):r.dep||(e=1),r=n;return!e},Qe=function(t,e,n,r){r.mSet(t,e,r.m.call(r.tween,n,r.mt),r)},Ze=function(t){for(var e,n,r,i,o=t._pt;o;){for(e=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:i)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:i=o,o=e}t._pt=r},$e=function(){function t(t,e,n,r,i,o,s,a,u){this.t=e,this.s=r,this.c=i,this.p=n,this.r=o||Ve,this.d=s||this,this.set=a||Ye,this.pr=u||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=Qe,this.m=t,this.mt=n,this.tween=e},t}();ut(it+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return Z[t]=1})),V.TweenMax=V.TweenLite=Xe,V.TimelineLite=V.TimelineMax=Me,s=new Me({sortChildren:!1,defaults:_,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),v.stringFilter=fe;var Je={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){return ie(t)}))},timeline:function(t){return new Me(t)},getTweensOf:function(t,e){return s.getTweensOf(t,e)},getProperty:function(t,e,n,r){T(t)&&(t=Ut(t)[0]);var i=st(t||{}).get,o=n?gt:dt;return"native"===n&&(n=""),t?e?o((tt[e]&&tt[e].get||i)(t,e,n,r)):function(e,n,r){return o((tt[e]&&tt[e].get||i)(t,e,n,r))}:t},quickSetter:function(t,e,n){if((t=Ut(t)).length>1){var r=t.map((function(t){return nn.quickSetter(t,e,n)})),i=r.length;return function(t){for(var e=i;e--;)r[e](t)}}t=t[0]||{};var o=tt[e],s=st(t),a=s.harness&&(s.harness.aliases||{})[e]||e,u=o?function(e){var r=new o;f._pt=0,r.init(t,n?e+n:e,f,0,[t]),r.render(1,r),f._pt&&qe(1,f)}:s.set(t,a);return o?u:function(e){return u(t,a,n?e+n:e,s,1)}},isTweening:function(t){return s.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=xe(t.ease,_.ease)),vt(_,t||{})},config:function(t){return vt(v,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,r=t.plugins,i=t.defaults,o=t.extendTimeline;(r||"").split(",").forEach((function(t){return t&&!tt[t]&&!V[t]&&G(e+" effect requires "+t+" plugin.")})),et[e]=function(t,e,r){return n(Ut(t),Dt(e||{},i),r)},o&&(Me.prototype[e]=function(t,n,r){return this.add(et[e](t,S(n)?n:(r=n)&&{},this),r)})},registerEase:function(t,e){ge[t]=xe(e)},parseEase:function(t,e){return arguments.length?xe(t,e):ge},getById:function(t){return s.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,r,i=new Me(t);for(i.smoothChildTiming=O(t.smoothChildTiming),s.remove(i),i._dp=0,i._time=i._tTime=s._time,n=s._first;n;)r=n._next,!e&&!n._dur&&n instanceof Xe&&n.vars.onComplete===n._targets[0]||St(i,n,n._start-n._delay),n=r;return St(s,i,0),i},utils:{wrap:function t(e,n,r){var i=n-e;return N(e)?$t(e,t(0,e.length),n):It(r,(function(t){return(i+(t-e)%i)%i+e}))},wrapYoyo:function t(e,n,r){var i=n-e,o=2*i;return N(e)?$t(e,t(0,e.length-1),n):It(r,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},distribute:Gt,random:Zt,snap:Qt,normalize:function(t,e,n){return te(t,e,0,1,n)},getUnit:Ht,clamp:function(t,e,n){return It(n,(function(n){return zt(t,e,n)}))},splitColor:ae,toArray:Ut,selector:function(t){return t=Ut(t)[0]||G("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return Ut(e,n.querySelectorAll?n:n===t?G("Invalid scope")||l.createElement("div"):t)}},mapRange:te,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(n){return t(parseFloat(n))+(e||Ht(n))}},interpolate:function t(e,n,r,i){var o=isNaN(e+n)?0:function(t){return(1-t)*e+t*n};if(!o){var s,a,u,l,h,c=T(e),f={};if(!0===r&&(i=1)&&(r=null),c)e={p:e},n={p:n};else if(N(e)&&!N(n)){for(u=[],l=e.length,h=l-2,a=1;a<l;a++)u.push(t(e[a-1],e[a]));l--,o=function(t){t*=l;var e=Math.min(h,~~t);return u[e](t-e)},r=n}else i||(e=mt(N(e)?[]:{},e));if(!u){for(s in n)Se.call(f,e,s,"get",n[s]);o=function(t){return qe(t,f)||(c?e.p:e)}}}return It(r,o)},shuffle:qt},install:U,effects:et,ticker:pe,updateRoot:Me.updateRoot,plugins:tt,globalTimeline:s,core:{PropTween:$e,globals:K,Tween:Xe,Timeline:Me,Animation:Te,getCache:st,_removeLinkedListItem:xt,suppressOverwrites:function(t){return o=t}}};ut("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Je[t]=Xe[t]})),pe.add(Me.updateRoot),f=Je.to({},{duration:0});var tn=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},en=function(t,e){return{name:t,rawVars:1,init:function(t,n,r){r._onInit=function(t){var r,i;if(T(n)&&(r={},ut(n,(function(t){return r[t]=1})),n=r),e){for(i in r={},n)r[i]=e(n[i]);n=r}!function(t,e){var n,r,i,o=t._targets;for(n in e)for(r=o.length;r--;)(i=t._ptLookup[r][n])&&(i=i.d)&&(i._pt&&(i=tn(i,n)),i&&i.modifier&&i.modifier(e[n],t,o[r],n))}(t,n)}}}},nn=Je.registerPlugin({name:"attr",init:function(t,e,n,r,i){var o,s;for(o in e)(s=this.add(t,"setAttribute",(t.getAttribute(o)||0)+"",e[o],r,i,0,0,o))&&(s.op=o),this._props.push(o)}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n])}},en("roundProps",Kt),en("modifiers"),en("snap",Qt))||Je;Xe.version=Me.version=nn.version="3.9.1",h=1,k()&&de();ge.Power0,ge.Power1,ge.Power2,ge.Power3,ge.Power4,ge.Linear,ge.Quad,ge.Cubic,ge.Quart,ge.Quint,ge.Strong,ge.Elastic,ge.Back,ge.SteppedEase,ge.Bounce,ge.Sine,ge.Expo,ge.Circ;
/*!
 * CSSPlugin 3.9.1
 * https://greensock.com
 *
 * Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/var rn,on,sn,an,un,ln,hn,cn={},fn=180/Math.PI,pn=Math.PI/180,dn=Math.atan2,gn=/([A-Z])/g,Dn=/(?:left|right|width|margin|padding|x)/i,mn=/[\s,\(]\S/,vn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_n=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},yn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},xn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},wn=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Cn=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Fn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},En=function(t,e,n){return t.style[e]=n},bn=function(t,e,n){return t.style.setProperty(e,n)},Tn=function(t,e,n){return t._gsap[e]=n},Mn=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},An=function(t,e,n,r,i){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(i,o)},Pn=function(t,e,n,r,i){var o=t._gsap;o[e]=n,o.renderTransform(i,o)},Sn="transform",On=Sn+"Origin",kn=function(t,e){var n=on.createElementNS?on.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):on.createElement(t);return n.style?n:on.createElement(t)},Bn=function t(e,n,r){var i=getComputedStyle(e);return i[n]||i.getPropertyValue(n.replace(gn,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&t(e,Nn(n)||n,1)||""},Ln="O,Moz,ms,Ms,Webkit".split(","),Nn=function(t,e,n){var r=(e||un).style,i=5;if(t in r&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);i--&&!(Ln[i]+t in r););return i<0?null:(3===i?"ms":i>=0?Ln[i]:"")+t},Rn=function(){"undefined"!=typeof window&&window.document&&(rn=window,on=rn.document,sn=on.documentElement,un=kn("div")||{style:{}},kn("div"),Sn=Nn(Sn),On=Sn+"Origin",un.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",hn=!!Nn("perspective"),an=1)},Xn=function t(e){var n,r=kn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,s=this.style.cssText;if(sn.appendChild(r),r.appendChild(this),this.style.display="block",e)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),sn.removeChild(r),this.style.cssText=s,n},Yn=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},In=function(t){var e;try{e=t.getBBox()}catch(n){e=Xn.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Xn||(e=Xn.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+Yn(t,["x","cx","x1"])||0,y:+Yn(t,["y","cy","y1"])||0,width:0,height:0}},zn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!In(t))},Hn=function(t,e){if(e){var n=t.style;e in cn&&e!==On&&(e=Sn),n.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty(e.replace(gn,"-$1").toLowerCase())):n.removeAttribute(e)}},Wn=function(t,e,n,r,i,o){var s=new $e(t._pt,e,n,0,1,o?Fn:Cn);return t._pt=s,s.b=r,s.e=i,t._props.push(n),s},Vn={deg:1,rad:1,turn:1},jn=function t(e,n,r,i){var o,s,a,u,l=parseFloat(r)||0,h=(r+"").trim().substr((l+"").length)||"px",c=un.style,f=Dn.test(n),p="svg"===e.tagName.toLowerCase(),d=(p?"client":"offset")+(f?"Width":"Height"),g="px"===i,D="%"===i;return i===h||!l||Vn[i]||Vn[h]?l:("px"!==h&&!g&&(l=t(e,n,r,"px")),u=e.getCTM&&zn(e),!D&&"%"!==h||!cn[n]&&!~n.indexOf("adius")?(c[f?"width":"height"]=100+(g?h:i),s=~n.indexOf("adius")||"em"===i&&e.appendChild&&!p?e:e.parentNode,u&&(s=(e.ownerSVGElement||{}).parentNode),s&&s!==on&&s.appendChild||(s=on.body),(a=s._gsap)&&D&&a.width&&f&&a.time===pe.time?lt(l/a.width*100):((D||"%"===h)&&(c.position=Bn(e,"position")),s===e&&(c.position="static"),s.appendChild(un),o=un[d],s.removeChild(un),c.position="absolute",f&&D&&((a=st(s)).time=pe.time,a.width=s[d]),lt(g?o*l/100:o&&l?100/o*l:0))):(o=u?e.getBBox()[f?"width":"height"]:e[d],lt(D?l/o*100:l/100*o)))},Un=function(t,e,n,r){var i;return an||Rn(),e in vn&&"transform"!==e&&~(e=vn[e]).indexOf(",")&&(e=e.split(",")[0]),cn[e]&&"transform"!==e?(i=rr(t,r),i="transformOrigin"!==e?i[e]:i.svg?i.origin:ir(Bn(t,On))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=Qn[e]&&Qn[e](t,e,n)||Bn(t,e)||at(t,e)||("opacity"===e?1:0)),n&&!~(i+"").trim().indexOf(" ")?jn(t,e,i,n)+n:i},qn=function(t,e,n,r){if(!n||"none"===n){var i=Nn(e,t,1),o=i&&Bn(t,i,1);o&&o!==n?(e=i,n=o):"borderColor"===e&&(n=Bn(t,"borderTopColor"))}var s,a,u,l,h,c,f,p,d,g,D,m,_=new $e(this._pt,t.style,e,0,1,Ue),y=0,x=0;if(_.b=n,_.e=r,n+="","auto"===(r+="")&&(t.style[e]=r,r=Bn(t,e)||r,t.style[e]=n),fe(s=[n,r]),r=s[1],u=(n=s[0]).match(Y)||[],(r.match(Y)||[]).length){for(;a=Y.exec(r);)f=a[0],d=r.substring(y,a.index),h?h=(h+1)%5:"rgba("!==d.substr(-5)&&"hsla("!==d.substr(-5)||(h=1),f!==(c=u[x++]||"")&&(l=parseFloat(c)||0,D=c.substr((l+"").length),(m="="===f.charAt(1)?+(f.charAt(0)+"1"):0)&&(f=f.substr(2)),p=parseFloat(f),g=f.substr((p+"").length),y=Y.lastIndex-g.length,g||(g=g||v.units[e]||D,y===r.length&&(r+=g,_.e+=g)),D!==g&&(l=jn(t,e,c,g)||0),_._pt={_next:_._pt,p:d||1===x?d:",",s:l,c:m?m*p:p-l,m:h&&h<4||"zIndex"===e?Math.round:0});_.c=y<r.length?r.substring(y,r.length):""}else _.r="display"===e&&"none"===r?Fn:Cn;return z.test(r)&&(_.e=0),this._pt=_,_},Gn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Kn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n,r,i,o=e.t,s=o.style,a=e.u,u=o._gsap;if("all"===a||!0===a)s.cssText="",r=1;else for(i=(a=a.split(",")).length;--i>-1;)n=a[i],cn[n]&&(r=1,n="transformOrigin"===n?On:Sn),Hn(o,n);r&&(Hn(o,Sn),u&&(u.svg&&o.removeAttribute("transform"),rr(o,1),u.uncache=1))}},Qn={clearProps:function(t,e,n,r,i){if("isFromStart"!==i.data){var o=t._pt=new $e(t._pt,e,n,0,0,Kn);return o.u=r,o.pr=-10,o.tween=i,t._props.push(n),1}}},Zn=[1,0,0,1,0,0],$n={},Jn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},tr=function(t){var e=Bn(t,Sn);return Jn(e)?Zn:e.substr(7).match(X).map(lt)},er=function(t,e){var n,r,i,o,s=t._gsap||st(t),a=t.style,u=tr(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?Zn:u:(u!==Zn||t.offsetParent||t===sn||s.svg||(i=a.display,a.display="block",(n=t.parentNode)&&t.offsetParent||(o=1,r=t.nextSibling,sn.appendChild(t)),u=tr(t),i?a.display=i:Hn(t,"display"),o&&(r?n.insertBefore(t,r):n?n.appendChild(t):sn.removeChild(t))),e&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},nr=function(t,e,n,r,i,o){var s,a,u,l=t._gsap,h=i||er(t,!0),c=l.xOrigin||0,f=l.yOrigin||0,p=l.xOffset||0,d=l.yOffset||0,g=h[0],D=h[1],m=h[2],v=h[3],_=h[4],y=h[5],x=e.split(" "),w=parseFloat(x[0])||0,C=parseFloat(x[1])||0;n?h!==Zn&&(a=g*v-D*m)&&(u=w*(-D/a)+C*(g/a)-(g*y-D*_)/a,w=w*(v/a)+C*(-m/a)+(m*y-v*_)/a,C=u):(w=(s=In(t)).x+(~x[0].indexOf("%")?w/100*s.width:w),C=s.y+(~(x[1]||x[0]).indexOf("%")?C/100*s.height:C)),r||!1!==r&&l.smooth?(_=w-c,y=C-f,l.xOffset=p+(_*g+y*m)-_,l.yOffset=d+(_*D+y*v)-y):l.xOffset=l.yOffset=0,l.xOrigin=w,l.yOrigin=C,l.smooth=!!r,l.origin=e,l.originIsAbsolute=!!n,t.style[On]="0px 0px",o&&(Wn(o,l,"xOrigin",c,w),Wn(o,l,"yOrigin",f,C),Wn(o,l,"xOffset",p,l.xOffset),Wn(o,l,"yOffset",d,l.yOffset)),t.setAttribute("data-svg-origin",w+" "+C)},rr=function(t,e){var n=t._gsap||new be(t);if("x"in n&&!e&&!n.uncache)return n;var r,i,o,s,a,u,l,h,c,f,p,d,g,D,m,_,y,x,w,C,F,E,b,T,M,A,P,S,O,k,B,L,N=t.style,R=n.scaleX<0,X=Bn(t,On)||"0";return r=i=o=u=l=h=c=f=p=0,s=a=1,n.svg=!(!t.getCTM||!zn(t)),D=er(t,n.svg),n.svg&&(T=(!n.uncache||"0px 0px"===X)&&!e&&t.getAttribute("data-svg-origin"),nr(t,T||X,!!T||n.originIsAbsolute,!1!==n.smooth,D)),d=n.xOrigin||0,g=n.yOrigin||0,D!==Zn&&(x=D[0],w=D[1],C=D[2],F=D[3],r=E=D[4],i=b=D[5],6===D.length?(s=Math.sqrt(x*x+w*w),a=Math.sqrt(F*F+C*C),u=x||w?dn(w,x)*fn:0,(c=C||F?dn(C,F)*fn+u:0)&&(a*=Math.abs(Math.cos(c*pn))),n.svg&&(r-=d-(d*x+g*C),i-=g-(d*w+g*F))):(L=D[6],k=D[7],P=D[8],S=D[9],O=D[10],B=D[11],r=D[12],i=D[13],o=D[14],l=(m=dn(L,O))*fn,m&&(T=E*(_=Math.cos(-m))+P*(y=Math.sin(-m)),M=b*_+S*y,A=L*_+O*y,P=E*-y+P*_,S=b*-y+S*_,O=L*-y+O*_,B=k*-y+B*_,E=T,b=M,L=A),h=(m=dn(-C,O))*fn,m&&(_=Math.cos(-m),B=F*(y=Math.sin(-m))+B*_,x=T=x*_-P*y,w=M=w*_-S*y,C=A=C*_-O*y),u=(m=dn(w,x))*fn,m&&(T=x*(_=Math.cos(m))+w*(y=Math.sin(m)),M=E*_+b*y,w=w*_-x*y,b=b*_-E*y,x=T,E=M),l&&Math.abs(l)+Math.abs(u)>359.9&&(l=u=0,h=180-h),s=lt(Math.sqrt(x*x+w*w+C*C)),a=lt(Math.sqrt(b*b+L*L)),m=dn(E,b),c=Math.abs(m)>2e-4?m*fn:0,p=B?1/(B<0?-B:B):0),n.svg&&(T=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Jn(Bn(t,Sn)),T&&t.setAttribute("transform",T))),Math.abs(c)>90&&Math.abs(c)<270&&(R?(s*=-1,c+=u<=0?180:-180,u+=u<=0?180:-180):(a*=-1,c+=c<=0?180:-180)),n.x=r-((n.xPercent=r&&(n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-r)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+"px",n.y=i-((n.yPercent=i&&(n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+"px",n.z=o+"px",n.scaleX=lt(s),n.scaleY=lt(a),n.rotation=lt(u)+"deg",n.rotationX=lt(l)+"deg",n.rotationY=lt(h)+"deg",n.skewX=c+"deg",n.skewY=f+"deg",n.transformPerspective=p+"px",(n.zOrigin=parseFloat(X.split(" ")[2])||0)&&(N[On]=ir(X)),n.xOffset=n.yOffset=0,n.force3D=v.force3D,n.renderTransform=n.svg?ur:hn?ar:sr,n.uncache=0,n},ir=function(t){return(t=t.split(" "))[0]+" "+t[1]},or=function(t,e,n){var r=Ht(e);return lt(parseFloat(e)+parseFloat(jn(t,"x",n+"px",r)))+r},sr=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,ar(t,e)},ar=function(t,e){var n=e||this,r=n.xPercent,i=n.yPercent,o=n.x,s=n.y,a=n.z,u=n.rotation,l=n.rotationY,h=n.rotationX,c=n.skewX,f=n.skewY,p=n.scaleX,d=n.scaleY,g=n.transformPerspective,D=n.force3D,m=n.target,v=n.zOrigin,_="",y="auto"===D&&t&&1!==t||!0===D;if(v&&("0deg"!==h||"0deg"!==l)){var x,w=parseFloat(l)*pn,C=Math.sin(w),F=Math.cos(w);w=parseFloat(h)*pn,x=Math.cos(w),o=or(m,o,C*x*-v),s=or(m,s,-Math.sin(w)*-v),a=or(m,a,F*x*-v+v)}"0px"!==g&&(_+="perspective("+g+") "),(r||i)&&(_+="translate("+r+"%, "+i+"%) "),(y||"0px"!==o||"0px"!==s||"0px"!==a)&&(_+="0px"!==a||y?"translate3d("+o+", "+s+", "+a+") ":"translate("+o+", "+s+") "),"0deg"!==u&&(_+="rotate("+u+") "),"0deg"!==l&&(_+="rotateY("+l+") "),"0deg"!==h&&(_+="rotateX("+h+") "),"0deg"===c&&"0deg"===f||(_+="skew("+c+", "+f+") "),1===p&&1===d||(_+="scale("+p+", "+d+") "),m.style[Sn]=_||"translate(0, 0)"},ur=function(t,e){var n,r,i,o,s,a=e||this,u=a.xPercent,l=a.yPercent,h=a.x,c=a.y,f=a.rotation,p=a.skewX,d=a.skewY,g=a.scaleX,D=a.scaleY,m=a.target,v=a.xOrigin,_=a.yOrigin,y=a.xOffset,x=a.yOffset,w=a.forceCSS,C=parseFloat(h),F=parseFloat(c);f=parseFloat(f),p=parseFloat(p),(d=parseFloat(d))&&(p+=d=parseFloat(d),f+=d),f||p?(f*=pn,p*=pn,n=Math.cos(f)*g,r=Math.sin(f)*g,i=Math.sin(f-p)*-D,o=Math.cos(f-p)*D,p&&(d*=pn,s=Math.tan(p-d),i*=s=Math.sqrt(1+s*s),o*=s,d&&(s=Math.tan(d),n*=s=Math.sqrt(1+s*s),r*=s)),n=lt(n),r=lt(r),i=lt(i),o=lt(o)):(n=g,o=D,r=i=0),(C&&!~(h+"").indexOf("px")||F&&!~(c+"").indexOf("px"))&&(C=jn(m,"x",h,"px"),F=jn(m,"y",c,"px")),(v||_||y||x)&&(C=lt(C+v-(v*n+_*i)+y),F=lt(F+_-(v*r+_*o)+x)),(u||l)&&(s=m.getBBox(),C=lt(C+u/100*s.width),F=lt(F+l/100*s.height)),s="matrix("+n+","+r+","+i+","+o+","+C+","+F+")",m.setAttribute("transform",s),w&&(m.style[Sn]=s)},lr=function(t,e,n,r,i,o){var s,a,u=T(i),l=parseFloat(i)*(u&&~i.indexOf("rad")?fn:1),h=o?l*o:l-r,c=r+h+"deg";return u&&("short"===(s=i.split("_")[1])&&(h%=360)!==h%180&&(h+=h<0?360:-360),"cw"===s&&h<0?h=(h+36e9)%360-360*~~(h/360):"ccw"===s&&h>0&&(h=(h-36e9)%360-360*~~(h/360))),t._pt=a=new $e(t._pt,e,n,r,h,yn),a.e=c,a.u="deg",t._props.push(n),a},hr=function(t,e){for(var n in e)t[n]=e[n];return t},cr=function(t,e,n){var r,i,o,s,a,u,l,h=hr({},n._gsap),c=n.style;for(i in h.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),c[Sn]=e,r=rr(n,1),Hn(n,Sn),n.setAttribute("transform",o)):(o=getComputedStyle(n)[Sn],c[Sn]=e,r=rr(n,1),c[Sn]=o),cn)(o=h[i])!==(s=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(a=Ht(o)!==(l=Ht(s))?jn(n,i,o,l):parseFloat(o),u=parseFloat(s),t._pt=new $e(t._pt,r,i,a,u-a,_n),t._pt.u=l||0,t._props.push(i));hr(r,h)};ut("padding,margin,Width,Radius",(function(t,e){var n="Top",r="Right",i="Bottom",o="Left",s=(e<3?[n,r,i,o]:[n+o,n+r,i+r,i+o]).map((function(n){return e<2?t+n:"border"+n+t}));Qn[e>1?"border"+t:t]=function(t,e,n,r,i){var o,a;if(arguments.length<4)return o=s.map((function(e){return Un(t,e,n)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(r+"").split(" "),a={},s.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,i)}}));var fr,pr,dr={name:"css",register:Rn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,r,i){var o,s,a,u,l,h,c,f,p,d,g,D,m,_,y,x,w,C,F,E=this._props,b=t.style,M=n.vars.startAt;for(c in an||Rn(),e)if("autoRound"!==c&&(s=e[c],!tt[c]||!Oe(c,e,n,r,t,i)))if(l=typeof s,h=Qn[c],"function"===l&&(l=typeof(s=s.call(n,r,t,i))),"string"===l&&~s.indexOf("random(")&&(s=Jt(s)),h)h(this,t,c,s,n)&&(y=1);else if("--"===c.substr(0,2))o=(getComputedStyle(t).getPropertyValue(c)+"").trim(),s+="",he.lastIndex=0,he.test(o)||(f=Ht(o),p=Ht(s)),p?f!==p&&(o=jn(t,c,o,p)+p):f&&(s+=f),this.add(b,"setProperty",o,s,r,i,0,0,c),E.push(c);else if("undefined"!==l){if(M&&c in M?(o="function"==typeof M[c]?M[c].call(n,r,t,i):M[c],T(o)&&~o.indexOf("random(")&&(o=Jt(o)),Ht(o+"")||(o+=v.units[c]||Ht(Un(t,c))||""),"="===(o+"").charAt(1)&&(o=Un(t,c))):o=Un(t,c),u=parseFloat(o),(d="string"===l&&"="===s.charAt(1)?+(s.charAt(0)+"1"):0)&&(s=s.substr(2)),a=parseFloat(s),c in vn&&("autoAlpha"===c&&(1===u&&"hidden"===Un(t,"visibility")&&a&&(u=0),Wn(this,b,"visibility",u?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==c&&"transform"!==c&&~(c=vn[c]).indexOf(",")&&(c=c.split(",")[0])),g=c in cn)if(D||((m=t._gsap).renderTransform&&!e.parseTransform||rr(t,e.parseTransform),_=!1!==e.smoothOrigin&&m.smooth,(D=this._pt=new $e(this._pt,b,Sn,0,1,m.renderTransform,m,0,-1)).dep=1),"scale"===c)this._pt=new $e(this._pt,m,"scaleY",m.scaleY,(d?d*a:a-m.scaleY)||0),E.push("scaleY",c),c+="X";else{if("transformOrigin"===c){w=void 0,C=void 0,F=void 0,w=(x=s).split(" "),C=w[0],F=w[1]||"50%","top"!==C&&"bottom"!==C&&"left"!==F&&"right"!==F||(x=C,C=F,F=x),w[0]=Gn[C]||C,w[1]=Gn[F]||F,s=w.join(" "),m.svg?nr(t,s,0,_,0,this):((p=parseFloat(s.split(" ")[2])||0)!==m.zOrigin&&Wn(this,m,"zOrigin",m.zOrigin,p),Wn(this,b,c,ir(o),ir(s)));continue}if("svgOrigin"===c){nr(t,s,1,_,0,this);continue}if(c in $n){lr(this,m,c,u,s,d);continue}if("smoothOrigin"===c){Wn(this,m,"smooth",m.smooth,s);continue}if("force3D"===c){m[c]=s;continue}if("transform"===c){cr(this,s,t);continue}}else c in b||(c=Nn(c)||c);if(g||(a||0===a)&&(u||0===u)&&!mn.test(s)&&c in b)a||(a=0),(f=(o+"").substr((u+"").length))!==(p=Ht(s)||(c in v.units?v.units[c]:f))&&(u=jn(t,c,o,p)),this._pt=new $e(this._pt,g?m:b,c,u,d?d*a:a-u,g||"px"!==p&&"zIndex"!==c||!1===e.autoRound?_n:wn),this._pt.u=p||0,f!==p&&"%"!==p&&(this._pt.b=o,this._pt.r=xn);else if(c in b)qn.call(this,t,c,o,s);else{if(!(c in t)){q(c,s);continue}this.add(t,c,o||t[c],s,r,i)}E.push(c)}y&&Ze(this)},get:Un,aliases:vn,getSetter:function(t,e,n){var r=vn[e];return r&&r.indexOf(",")<0&&(e=r),e in cn&&e!==On&&(t._gsap.x||Un(t,"x"))?n&&ln===n?"scale"===e?Mn:Tn:(ln=n||{})&&("scale"===e?An:Pn):t.style&&!P(t.style[e])?En:~e.indexOf("-")?bn:We(t,e)},core:{_removeProperty:Hn,_getMatrix:er}};nn.utils.checkPrefix=Nn,pr=ut("x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+(fr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){cn[t]=1})),ut(fr,(function(t){v.units[t]="deg",$n[t]=1})),vn[pr[13]]="x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+fr,ut("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");vn[e[1]]=pr[e[0]]})),ut("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){v.units[t]="px"})),nn.registerPlugin(dr);var gr,Dr,mr,vr=nn.registerPlugin(dr)||nn,_r=vr.core.Tween,yr=function(){return gr||"undefined"!=typeof window&&(gr=window.gsap)&&gr.registerPlugin&&gr},xr=function(t){gr=yr(),(mr=gr&&gr.parseEase("_CE"))?(Dr=1,gr.parseEase("bounce").config=function(t){return"object"==typeof t?Cr("",t):Cr("bounce("+t+")",{strength:+t})}):t&&console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)")},wr=function(t){var e,n=t.length,r=1/t[n-2];for(e=2;e<n;e+=2)t[e]=~~(t[e]*r*1e3)/1e3;t[n-2]=1},Cr=function(t,e){Dr||xr(1),e=e||{};var n,r,i,o,s,a,u,l=Math.min(.999,e.strength||.7),h=l,c=(e.squash||0)/100,f=c,p=1/.03,d=.2,g=1,D=.1,m=[0,0,.07,0,.1,1,.1,1],v=[0,0,0,0,.1,0,.1,0];for(s=0;s<200&&(a=D+(d*=h*((h+1)/2)),o=1-(g*=l*l),r=(i=D+.49*d)+.8*(i-(n=D+g/p)),c&&(D+=c,n+=c,i+=c,r+=c,a+=c,u=c/f,v.push(D-c,0,D-c,u,D-c/2,u,D,u,D,0,D,0,D,-.6*u,D+(a-D)/6,0,a,0),m.push(D-c,1,D,1,D,1),c*=l*l),m.push(D,1,n,o,i,o,r,o,a,1,a,1),l*=.95,p=g/(a-r),D=a,!(o>.999));s++);if(e.endAtStart&&"false"!==e.endAtStart){if(i=-.1,m.unshift(i,1,i,1,-.07,0),f)for(i-=c=2.5*f,m.unshift(i,1,i,1,i,1),v.splice(0,6),v.unshift(i,0,i,0,i,1,i+c/2,1,i+c,1,i+c,0,i+c,0,i+c,-.6,i+c+.033,0),s=0;s<v.length;s+=2)v[s]-=i;for(s=0;s<m.length;s+=2)m[s]-=i,m[s+1]=1-m[s+1]}return c&&(wr(v),v[2]="C"+v[2],mr(e.squashID||t+"-squash","M"+v.join(","))),wr(m),m[2]="C"+m[2],mr(t,"M"+m.join(","))},Fr=function(){function t(t,e){this.ease=Cr(t,e)}return t.create=function(t,e){return Cr(t,e)},t.register=function(t){gr=t,xr()},t}();
/*!
 * CustomBounce 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/yr()&&gr.registerPlugin(Fr),Fr.version="3.9.1";
/*!
 * paths 3.9.1
 * https://greensock.com
 *
 * Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var Er=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,br=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Tr=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,Mr=/(^[#\.][a-z]|[a-y][a-z])/i,Ar=Math.PI/180,Pr=180/Math.PI,Sr=Math.sin,Or=Math.cos,kr=Math.abs,Br=Math.sqrt,Lr=Math.atan2,Nr=function(t){return"string"==typeof t},Rr=function(t){return"number"==typeof t},Xr={},Yr={},Ir=function(t){return Math.round((t+1e8)%1*1e5)/1e5||(t<0?0:1)},zr=function(t){return Math.round(1e5*t)/1e5||0},Hr=function(t){return Math.round(1e10*t)/1e10||0},Wr=function(t,e,n,r){var i=t[e],o=1===r?6:ei(i,n,r);if(o&&o+n+2<i.length)return t.splice(e,0,i.slice(0,n+o+2)),i.splice(0,n+o),1},Vr=function(t,e,n){var r=t.length,i=~~(n*r);if(t[i]>e)for(;--i&&t[i]>e;);else for(;t[++i]<e&&i<r;);return i<r?i:r-1},jr=function(t,e){return e.totalLength=t.totalLength,t.samples?(e.samples=t.samples.slice(0),e.lookup=t.lookup.slice(0),e.minLength=t.minLength,e.resolution=t.resolution):t.totalPoints&&(e.totalPoints=t.totalPoints),e},Ur=function(t,e){var n=t.length,r=t[n-1]||[],i=r.length;n&&e[0]===r[i-2]&&e[1]===r[i-1]&&(e=r.concat(e.slice(2)),n--),t[n]=e};function qr(t){var e,n=(t=Nr(t)&&Mr.test(t)&&document.querySelector(t)||t).getAttribute?t:0;return n&&(t=t.getAttribute("d"))?(n._gsPath||(n._gsPath={}),(e=n._gsPath[t])&&!e._dirty?e:n._gsPath[t]=si(t)):t?Nr(t)?si(t):Rr(t[0])?[t]:t:console.warn("Expecting a <path> element or an SVG path data string")}function Gr(t){var e,n=0;for(t.reverse();n<t.length;n+=2)e=t[n],t[n]=t[n+1],t[n+1]=e;t.reversed=!t.reversed}var Kr={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"};function Qr(t,e){var n,r,i,o,s,a,u,l,h,c,f,p,d,g,D,m,v,_,y,x,w,C,F=t.tagName.toLowerCase(),E=.552284749831;return"path"!==F&&t.getBBox?(a=function(t,e){var n,r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=[].slice.call(t.attributes),o=i.length;for(e=","+e+",";--o>-1;)n=i[o].nodeName.toLowerCase(),e.indexOf(","+n+",")<0&&r.setAttributeNS(null,n,i[o].nodeValue);return r}(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),C=function(t,e){for(var n=e?e.split(","):[],r={},i=n.length;--i>-1;)r[n[i]]=+t.getAttribute(n[i])||0;return r}(t,Kr[F]),"rect"===F?(o=C.rx,s=C.ry||o,r=C.x,i=C.y,c=C.width-2*o,f=C.height-2*s,n=o||s?"M"+(m=(g=(d=r+o)+c)+o)+","+(_=i+s)+" V"+(y=_+f)+" C"+[m,x=y+s*E,D=g+o*E,w=y+s,g,w,g-(g-d)/3,w,d+(g-d)/3,w,d,w,p=r+o*(1-E),w,r,x,r,y,r,y-(y-_)/3,r,_+(y-_)/3,r,_,r,v=i+s*(1-E),p,i,d,i,d+(g-d)/3,i,g-(g-d)/3,i,g,i,D,i,m,v,m,_].join(",")+"z":"M"+(r+c)+","+i+" v"+f+" h"+-c+" v"+-f+" h"+c+"z"):"circle"===F||"ellipse"===F?("circle"===F?l=(o=s=C.r)*E:(o=C.rx,l=(s=C.ry)*E),n="M"+((r=C.cx)+o)+","+(i=C.cy)+" C"+[r+o,i+l,r+(u=o*E),i+s,r,i+s,r-u,i+s,r-o,i+l,r-o,i,r-o,i-l,r-u,i-s,r,i-s,r+u,i-s,r+o,i-l,r+o,i].join(",")+"z"):"line"===F?n="M"+C.x1+","+C.y1+" L"+C.x2+","+C.y2:"polyline"!==F&&"polygon"!==F||(n="M"+(r=(h=(t.getAttribute("points")+"").match(br)||[]).shift())+","+(i=h.shift())+" L"+h.join(","),"polygon"===F&&(n+=","+r+","+i+"z")),a.setAttribute("d",li(a._gsRawPath=si(n))),e&&t.parentNode&&(t.parentNode.insertBefore(a,t),t.parentNode.removeChild(t)),a):t}function Zr(t,e,n){var r,i=t[e],o=t[e+2],s=t[e+4];return i+=(o-i)*n,i+=((o+=(s-o)*n)-i)*n,r=o+(s+(t[e+6]-s)*n-o)*n-i,i=t[e+1],i+=((o=t[e+3])-i)*n,i+=((o+=((s=t[e+5])-o)*n)-i)*n,zr(Lr(o+(s+(t[e+7]-s)*n-o)*n-i,r)*Pr)}function $r(t,e,n){n=void 0===n?1:Hr(n)||0,e=Hr(e)||0;var r=Math.max(0,~~(kr(n-e)-1e-8)),i=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=jr(t[n],t[n].slice(0));return jr(t,e)}(t);if(e>n&&(e=1-e,n=1-n,function(t,e){var n=t.length;for(e||t.reverse();n--;)t[n].reversed||Gr(t[n])}(i),i.totalLength=0),e<0||n<0){var o=Math.abs(~~Math.min(e,n))+1;e+=o,n+=o}i.totalLength||ti(i);var s,a,u,l,h,c,f,p,d=n>1,g=ni(i,e,Xr,!0),D=ni(i,n,Yr),m=D.segment,v=g.segment,_=D.segIndex,y=g.segIndex,x=D.i,w=g.i,C=y===_,F=x===w&&C;if(d||r){for(s=_<y||C&&x<w||F&&D.t<g.t,Wr(i,y,w,g.t)&&(y++,s||(_++,F?(D.t=(D.t-g.t)/(1-g.t),x=0):C&&(x-=w))),Math.abs(1-(n-e))<1e-5?_=y-1:!D.t&&_?_--:Wr(i,_,x,D.t)&&s&&y++,1===g.t&&(y=(y+1)%i.length),h=[],f=1+(c=i.length)*r,p=y,f+=(c-y+_)%c,l=0;l<f;l++)Ur(h,i[p++%c]);i=h}else if(u=1===D.t?6:ei(m,x,D.t),e!==n)for(a=ei(v,w,F?g.t/D.t:g.t),C&&(u+=a),m.splice(x+u+2),(a||w)&&v.splice(0,w+a),l=i.length;l--;)(l<y||l>_)&&i.splice(l,1);else m.angle=Zr(m,x+u,0),g=m[x+=u],D=m[x+1],m.length=m.totalLength=0,m.totalPoints=i.totalPoints=8,m.push(g,D,g,D,g,D,g,D);return i.totalLength=0,i}function Jr(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var r,i,o,s,a,u,l,h,c,f,p,d,g,D,m,v,_,y=~~t.resolution||12,x=1/y,w=n?e+6*n+1:t.length,C=t[e],F=t[e+1],E=e?e/6*y:0,b=t.samples,T=t.lookup,M=(e?t.minLength:1e8)||1e8,A=b[E+n*y-1],P=e?b[E-1]:0;for(b.length=T.length=0,i=e+2;i<w;i+=6){if(o=t[i+4]-C,s=t[i+2]-C,a=t[i]-C,h=t[i+5]-F,c=t[i+3]-F,f=t[i+1]-F,u=l=p=d=0,kr(o)<.01&&kr(h)<.01&&kr(a)+kr(f)<.01)t.length>8&&(t.splice(i,6),i-=6,w-=6);else for(r=1;r<=y;r++)u=l-(l=((D=x*r)*D*o+3*(g=1-D)*(D*s+g*a))*D),p=d-(d=(D*D*h+3*g*(D*c+g*f))*D),(v=Br(p*p+u*u))<M&&(M=v),P+=v,b[E++]=P;C+=o,F+=h}if(A)for(A-=P;E<b.length;E++)b[E]+=A;if(b.length&&M){if(t.totalLength=_=b[b.length-1]||0,t.minLength=M,_/M<9999)for(v=m=0,r=0;r<_;r+=M)T[v++]=b[m]<r?++m:m}else t.totalLength=b[0]=0;return e?P-b[e/2-1]:P}function ti(t,e){var n,r,i;for(i=n=r=0;i<t.length;i++)t[i].resolution=~~e||12,r+=t[i].length,n+=Jr(t[i]);return t.totalPoints=r,t.totalLength=n,t}function ei(t,e,n){if(n<=0||n>=1)return 0;var r=t[e],i=t[e+1],o=t[e+2],s=t[e+3],a=t[e+4],u=t[e+5],l=r+(o-r)*n,h=o+(a-o)*n,c=i+(s-i)*n,f=s+(u-s)*n,p=l+(h-l)*n,d=c+(f-c)*n,g=a+(t[e+6]-a)*n,D=u+(t[e+7]-u)*n;return h+=(g-h)*n,f+=(D-f)*n,t.splice(e+2,4,zr(l),zr(c),zr(p),zr(d),zr(p+(h-p)*n),zr(d+(f-d)*n),zr(h),zr(f),zr(g),zr(D)),t.samples&&t.samples.splice(e/6*t.resolution|0,0,0,0,0,0,0,0),6}function ni(t,e,n,r){n=n||{},t.totalLength||ti(t),(e<0||e>1)&&(e=Ir(e));var i,o,s,a,u,l,h,c=0,f=t[0];if(e)if(1===e)h=1,l=(f=t[c=t.length-1]).length-8;else{if(t.length>1){for(s=t.totalLength*e,u=l=0;(u+=t[l++].totalLength)<s;)c=l;e=(s-(a=u-(f=t[c]).totalLength))/(u-a)||0}i=f.samples,o=f.resolution,s=f.totalLength*e,a=(l=f.lookup.length?f.lookup[~~(s/f.minLength)]||0:Vr(i,s,e))?i[l-1]:0,(u=i[l])<s&&(a=u,u=i[++l]),h=1/o*((s-a)/(u-a)+l%o),l=6*~~(l/o),r&&1===h&&(l+6<f.length?(l+=6,h=0):c+1<t.length&&(l=h=0,f=t[++c]))}else h=l=c=0,f=t[0];return n.t=h,n.i=l,n.path=t,n.segment=f,n.segIndex=c,n}function ri(t,e,n,r){var i,o,s,a,u,l,h,c,f,p=t[0],d=r||{};if((e<0||e>1)&&(e=Ir(e)),t.length>1){for(s=t.totalLength*e,u=l=0;(u+=t[l++].totalLength)<s;)p=t[l];e=(s-(a=u-p.totalLength))/(u-a)||0}return i=p.samples,o=p.resolution,s=p.totalLength*e,a=(l=p.lookup.length?p.lookup[e<1?~~(s/p.minLength):p.lookup.length-1]||0:Vr(i,s,e))?i[l-1]:0,(u=i[l])<s&&(a=u,u=i[++l]),f=1-(h=1/o*((s-a)/(u-a)+l%o)||0),c=p[l=6*~~(l/o)],d.x=zr((h*h*(p[l+6]-c)+3*f*(h*(p[l+4]-c)+f*(p[l+2]-c)))*h+c),d.y=zr((h*h*(p[l+7]-(c=p[l+1]))+3*f*(h*(p[l+5]-c)+f*(p[l+3]-c)))*h+c),n&&(d.angle=p.totalLength?Zr(p,l,h>=1?1-1e-9:h||1e-9):p.angle||0),d}function ii(t,e,n,r,i,o,s){for(var a,u,l,h,c,f=t.length;--f>-1;)for(u=(a=t[f]).length,l=0;l<u;l+=2)h=a[l],c=a[l+1],a[l]=h*e+c*r+o,a[l+1]=h*n+c*i+s;return t._dirty=1,t}function oi(t,e,n,r,i,o,s,a,u){if(t!==a||e!==u){n=kr(n),r=kr(r);var l=i%360*Ar,h=Or(l),c=Sr(l),f=Math.PI,p=2*f,d=(t-a)/2,g=(e-u)/2,D=h*d+c*g,m=-c*d+h*g,v=D*D,_=m*m,y=v/(n*n)+_/(r*r);y>1&&(n=Br(y)*n,r=Br(y)*r);var x=n*n,w=r*r,C=(x*w-x*_-w*v)/(x*_+w*v);C<0&&(C=0);var F=(o===s?-1:1)*Br(C),E=F*(n*m/r),b=F*(-r*D/n),T=(t+a)/2+(h*E-c*b),M=(e+u)/2+(c*E+h*b),A=(D-E)/n,P=(m-b)/r,S=(-D-E)/n,O=(-m-b)/r,k=A*A+P*P,B=(P<0?-1:1)*Math.acos(A/Br(k)),L=(A*O-P*S<0?-1:1)*Math.acos((A*S+P*O)/Br(k*(S*S+O*O)));isNaN(L)&&(L=f),!s&&L>0?L-=p:s&&L<0&&(L+=p),B%=p,L%=p;var N,R=Math.ceil(kr(L)/(p/4)),X=[],Y=L/R,I=4/3*Sr(Y/2)/(1+Or(Y/2)),z=h*n,H=c*n,W=c*-r,V=h*r;for(N=0;N<R;N++)D=Or(i=B+N*Y),m=Sr(i),A=Or(i+=Y),P=Sr(i),X.push(D-I*m,m+I*D,A+I*P,P-I*A,A,P);for(N=0;N<X.length;N+=2)D=X[N],m=X[N+1],X[N]=D*z+m*W+T,X[N+1]=D*H+m*V+M;return X[N-2]=a,X[N-1]=u,X}}function si(t){var e,n,r,i,o,s,a,u,l,h,c,f,p,d,g,D=(t+"").replace(Tr,(function(t){var e=+t;return e<1e-4&&e>-1e-4?0:e})).match(Er)||[],m=[],v=0,_=0,y=D.length,x=0,w="ERROR: malformed path: "+t,C=function(t,e,n,r){h=(n-t)/3,c=(r-e)/3,a.push(t+h,e+c,n-h,r-c,n,r)};if(!t||!isNaN(D[0])||isNaN(D[1]))return console.log(w),m;for(e=0;e<y;e++)if(p=o,isNaN(D[e])?s=(o=D[e].toUpperCase())!==D[e]:e--,r=+D[e+1],i=+D[e+2],s&&(r+=v,i+=_),e||(u=r,l=i),"M"===o)a&&(a.length<8?m.length-=1:x+=a.length),v=u=r,_=l=i,a=[r,i],m.push(a),e+=2,o="L";else if("C"===o)a||(a=[0,0]),s||(v=_=0),a.push(r,i,v+1*D[e+3],_+1*D[e+4],v+=1*D[e+5],_+=1*D[e+6]),e+=6;else if("S"===o)h=v,c=_,"C"!==p&&"S"!==p||(h+=v-a[a.length-4],c+=_-a[a.length-3]),s||(v=_=0),a.push(h,c,r,i,v+=1*D[e+3],_+=1*D[e+4]),e+=4;else if("Q"===o)h=v+2/3*(r-v),c=_+2/3*(i-_),s||(v=_=0),v+=1*D[e+3],_+=1*D[e+4],a.push(h,c,v+2/3*(r-v),_+2/3*(i-_),v,_),e+=4;else if("T"===o)h=v-a[a.length-4],c=_-a[a.length-3],a.push(v+h,_+c,r+2/3*(v+1.5*h-r),i+2/3*(_+1.5*c-i),v=r,_=i),e+=2;else if("H"===o)C(v,_,v=r,_),e+=1;else if("V"===o)C(v,_,v,_=r+(s?_-v:0)),e+=1;else if("L"===o||"Z"===o)"Z"===o&&(r=u,i=l,a.closed=!0),("L"===o||kr(v-r)>.5||kr(_-i)>.5)&&(C(v,_,r,i),"L"===o&&(e+=2)),v=r,_=i;else if("A"===o){if(d=D[e+4],g=D[e+5],h=D[e+6],c=D[e+7],n=7,d.length>1&&(d.length<3?(c=h,h=g,n--):(c=g,h=d.substr(2),n-=2),g=d.charAt(1),d=d.charAt(0)),f=oi(v,_,+D[e+1],+D[e+2],+D[e+3],+d,+g,(s?v:0)+1*h,(s?_:0)+1*c),e+=n,f)for(n=0;n<f.length;n++)a.push(f[n]);v=a[a.length-2],_=a[a.length-1]}else console.log(w);return(e=a.length)<6?(m.pop(),e=0):a[0]===a[e-2]&&a[1]===a[e-1]&&(a.closed=!0),m.totalPoints=x+e,m}function ai(t,e){void 0===e&&(e=1);for(var n=t[0],r=0,i=[n,r],o=2;o<t.length;o+=2)i.push(n,r,t[o],r=(t[o]-n)*e/2,n=t[o],-r);return i}function ui(t,e,n){kr(t[0]-t[2])<1e-4&&kr(t[1]-t[3])<1e-4&&(t=t.slice(2));var r,i,o,s,a,u,l,h,c,f,p,d,g,D,m=t.length-2,v=+t[0],_=+t[1],y=+t[2],x=+t[3],w=[v,_,v,_],C=y-v,F=x-_,E=Math.abs(t[m]-v)<.001&&Math.abs(t[m+1]-_)<.001;for(isNaN(n)&&(n=Math.PI/10),E&&(t.push(y,x),y=v,x=_,v=t[m-2],_=t[m-1],t.unshift(v,_),m+=4),e=e||0===e?+e:1,a=2;a<m;a+=2)r=v,i=_,v=y,_=x,y=+t[a+2],x=+t[a+3],v===y&&_===x||(d=(u=C)*u+(h=F)*h,g=(C=y-v)*C+(F=x-_)*F,D=(l=y-r)*l+(c=x-i)*c,p=(o=Math.acos((d+g-D)/Br(4*d*g)))/Math.PI*e,f=Br(d)*p,p*=Br(g),v===r&&_===i||(o>n?(s=Lr(c,l),w.push(zr(v-Or(s)*f),zr(_-Sr(s)*f),zr(v),zr(_),zr(v+Or(s)*p),zr(_+Sr(s)*p))):(s=Lr(h,u),w.push(zr(v-Or(s)*f),zr(_-Sr(s)*f)),s=Lr(F,C),w.push(zr(v),zr(_),zr(v+Or(s)*p),zr(_+Sr(s)*p)))));return v!==y||_!==x||w.length<4?w.push(zr(y),zr(x),zr(y),zr(x)):w.length-=2,E&&(w.splice(0,6),w.length=w.length-6),w}function li(t){Rr(t[0])&&(t=[t]);var e,n,r,i,o="",s=t.length;for(n=0;n<s;n++){for(i=t[n],o+="M"+zr(i[0])+","+zr(i[1])+" C",e=i.length,r=2;r<e;r++)o+=zr(i[r++])+","+zr(i[r++])+" "+zr(i[r++])+","+zr(i[r++])+" "+zr(i[r++])+","+zr(i[r])+" ";i.closed&&(o+="z")}return o}
/*!
 * CustomEase 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/var hi,ci,fi=function(){return hi||"undefined"!=typeof window&&(hi=window.gsap)&&hi.registerPlugin&&hi},pi=function(){(hi=fi())?(hi.registerEase("_CE",vi.create),ci=1):console.warn("Please gsap.registerPlugin(CustomEase)")},di=function(t){return~~(1e3*t+(t<0?-.5:.5))/1e3},gi=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,Di=/[cLlsSaAhHvVtTqQ]/g,mi=function t(e,n,r,i,o,s,a,u,l,h,c){var f,p=(e+r)/2,d=(n+i)/2,g=(r+o)/2,D=(i+s)/2,m=(o+a)/2,v=(s+u)/2,_=(p+g)/2,y=(d+D)/2,x=(g+m)/2,w=(D+v)/2,C=(_+x)/2,F=(y+w)/2,E=a-e,b=u-n,T=Math.abs((r-a)*b-(i-u)*E),M=Math.abs((o-a)*b-(s-u)*E);return h||(h=[{x:e,y:n},{x:a,y:u}],c=1),h.splice(c||h.length-1,0,{x:C,y:F}),(T+M)*(T+M)>l*(E*E+b*b)&&(f=h.length,t(e,n,p,d,_,y,C,F,l,h,c),t(C,F,x,w,m,v,a,u,l,h,c+1+(h.length-f))),h},vi=function(){function t(t,e,n){ci||pi(),this.id=t,this.setData(e,n)}var e=t.prototype;return e.setData=function(t,e){e=e||{};var n,r,i,o,s,a,u,l,h,c=(t=t||"0,0,1,1").match(gi),f=1,p=[],d=[],g=e.precision||1,D=g<=1;if(this.data=t,(Di.test(t)||~t.indexOf("M")&&t.indexOf("C")<0)&&(c=si(t)[0]),4===(n=c.length))c.unshift(0,0),c.push(1,1),n=8;else if((n-2)%6)throw"Invalid CustomEase";for(0==+c[0]&&1==+c[n-2]||function(t,e,n){n||0===n||(n=Math.max(+t[t.length-1],+t[1]));var r,i=-1*+t[0],o=-n,s=t.length,a=1/(+t[s-2]+i),u=-e||(Math.abs(+t[s-1]-+t[1])<.01*(+t[s-2]-+t[0])?function(t){var e,n=t.length,r=1e20;for(e=1;e<n;e+=6)+t[e]<r&&(r=+t[e]);return r}(t)+o:+t[s-1]+o);for(u=u?1/u:-a,r=0;r<s;r+=2)t[r]=(+t[r]+i)*a,t[r+1]=(+t[r+1]+o)*u}(c,e.height,e.originY),this.segment=c,o=2;o<n;o+=6)r={x:+c[o-2],y:+c[o-1]},i={x:+c[o+4],y:+c[o+5]},p.push(r,i),mi(r.x,r.y,+c[o],+c[o+1],+c[o+2],+c[o+3],i.x,i.y,1/(2e5*g),p,p.length-1);for(n=p.length,o=0;o<n;o++)u=p[o],l=p[o-1]||u,(u.x>l.x||l.y!==u.y&&l.x===u.x||u===l)&&u.x<=1?(l.cx=u.x-l.x,l.cy=u.y-l.y,l.n=u,l.nx=u.x,D&&o>1&&Math.abs(l.cy/l.cx-p[o-2].cy/p[o-2].cx)>2&&(D=0),l.cx<f&&(l.cx?f=l.cx:(l.cx=.001,o===n-1&&(l.x-=.001,f=Math.min(f,.001),D=0)))):(p.splice(o--,1),n--);if(s=1/(n=1/f+1|0),a=0,u=p[0],D){for(o=0;o<n;o++)h=o*s,u.nx<h&&(u=p[++a]),r=u.y+(h-u.x)/u.cx*u.cy,d[o]={x:h,cx:s,y:r,cy:0,nx:9},o&&(d[o-1].cy=r-d[o-1].y);d[n-1].cy=p[p.length-1].y-r}else{for(o=0;o<n;o++)u.nx<o*s&&(u=p[++a]),d[o]=u;a<p.length-1&&(d[o-1]=p[p.length-2])}return this.ease=function(t){var e=d[t*n|0]||d[n-1];return e.nx<t&&(e=e.n),e.y+(t-e.x)/e.cx*e.cy},this.ease.custom=this,this.id&&hi&&hi.registerEase(this.id,this.ease),this},e.getSVGData=function(e){return t.getSVGData(this,e)},t.create=function(e,n,r){return new t(e,n,r).ease},t.register=function(t){hi=t,pi()},t.get=function(t){return hi.parseEase(t)},t.getSVGData=function(e,n){var r,i,o,s,a,u,l,h,c,f,p=(n=n||{}).width||100,d=n.height||100,g=n.x||0,D=(n.y||0)+d,m=hi.utils.toArray(n.path)[0];if(n.invert&&(d=-d,D=0),"string"==typeof e&&(e=hi.parseEase(e)),e.custom&&(e=e.custom),e instanceof t)r=li(ii([e.segment],p,0,0,-d,g,D));else{for(r=[g,D],s=1/(l=Math.max(5,200*(n.precision||1))),h=5/(l+=2),c=di(g+s*p),i=((f=di(D+e(s)*-d))-D)/(c-g),o=2;o<l;o++)a=di(g+o*s*p),u=di(D+e(o*s)*-d),(Math.abs((u-f)/(a-c)-i)>h||o===l-1)&&(r.push(c,f),i=(u-f)/(a-c)),c=a,f=u;r="M"+r.join(",")}return m&&m.setAttribute("d",r),r},t}();fi()&&hi.registerPlugin(vi),vi.version="3.9.1";
/*!
 * CustomWiggle 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var _i,yi,xi,wi=function(){return _i||"undefined"!=typeof window&&(_i=window.gsap)&&_i.registerPlugin&&_i},Ci={easeOut:"M0,1,C0.7,1,0.6,0,1,0",easeInOut:"M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0",anticipate:"M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1",uniform:"M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0"},Fi=function(t){return t},Ei=function(t){if(!yi)if(_i=wi(),xi=_i&&_i.parseEase("_CE")){for(var e in Ci)Ci[e]=xi("",Ci[e]);yi=1,Ti("wiggle").config=function(t){return"object"==typeof t?Ti("",t):Ti("wiggle("+t+")",{wiggles:+t})}}else t&&console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)")},bi=function(t,e){return"function"!=typeof t&&(t=_i.parseEase(t)||xi("",t)),t.custom||!e?t:function(e){return 1-t(e)}},Ti=function(t,e){yi||Ei(1);var n,r,i,o,s,a,u,l,h,c=0|((e=e||{}).wiggles||10),f=1/c,p=f/2,d="anticipate"===e.type,g=Ci[e.type]||Ci.easeOut,D=Fi;if(d&&(D=g,g=Ci.easeOut),e.timingEase&&(D=bi(e.timingEase)),e.amplitudeEase&&(g=bi(e.amplitudeEase,!0)),l=[0,0,(a=D(p))/4,0,a/2,u=d?-g(p):g(p),a,u],"random"===e.type){for(l.length=4,n=D(f),r=2*Math.random()-1,h=2;h<c;h++)p=n,u=r,n=D(f*h),r=2*Math.random()-1,i=Math.atan2(r-l[l.length-3],n-l[l.length-4]),o=Math.cos(i)*f,s=Math.sin(i)*f,l.push(p-o,u-s,p,u,p+o,u+s);l.push(n,0,1,0)}else{for(h=1;h<c;h++)l.push(D(p+f/2),u),p+=f,u=(u>0?-1:1)*g(h*f),a=D(p),l.push(D(p-f/2),u,a,u);l.push(D(p+f/4),u,D(p+f/4),0,1,0)}for(h=l.length;--h>-1;)l[h]=~~(1e3*l[h])/1e3;return l[2]="C"+l[2],xi(t,"M"+l.join(","))},Mi=function(){function t(t,e){this.ease=Ti(t,e)}return t.create=function(t,e){return Ti(t,e)},t.register=function(t){_i=t,Ei()},t}();wi()&&_i.registerPlugin(Mi),Mi.version="3.9.1";
/*!
 * DrawSVGPlugin 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var Ai,Pi,Si,Oi,ki,Bi=function(){return"undefined"!=typeof window},Li=function(){return Ai||Bi()&&(Ai=window.gsap)&&Ai.registerPlugin&&Ai},Ni=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,Ri={rect:["width","height"],circle:["r","r"],ellipse:["rx","ry"],line:["x2","y2"]},Xi=function(t){return Math.round(1e4*t)/1e4},Yi=function(t){return parseFloat(t)||0},Ii=function(t,e){var n=Yi(t);return~t.indexOf("%")?n/100*e:n},zi=function(t,e){return Yi(t.getAttribute(e))},Hi=Math.sqrt,Wi=function(t,e,n,r,i,o){return Hi(Math.pow((Yi(n)-Yi(t))*i,2)+Math.pow((Yi(r)-Yi(e))*o,2))},Vi=function(t){return console.warn(t)},ji=function(t){return"non-scaling-stroke"===t.getAttribute("vector-effect")},Ui=function(t){if(!(t=Pi(t)[0]))return 0;var e,n,r,i,o,s,a,u=t.tagName.toLowerCase(),l=t.style,h=1,c=1;ji(t)&&(c=t.getScreenCTM(),h=Hi(c.a*c.a+c.b*c.b),c=Hi(c.d*c.d+c.c*c.c));try{n=t.getBBox()}catch(t){Vi("Some browsers won't measure invisible elements (like display:none or masks inside defs).")}var f=n||{x:0,y:0,width:0,height:0},p=f.x,d=f.y,g=f.width,D=f.height;if(n&&(g||D)||!Ri[u]||(g=zi(t,Ri[u][0]),D=zi(t,Ri[u][1]),"rect"!==u&&"line"!==u&&(g*=2,D*=2),"line"===u&&(p=zi(t,"x1"),d=zi(t,"y1"),g=Math.abs(g-p),D=Math.abs(D-d))),"path"===u)i=l.strokeDasharray,l.strokeDasharray="none",e=t.getTotalLength()||0,h!==c&&Vi("Warning: <path> length cannot be measured when vector-effect is non-scaling-stroke and the element isn't proportionally scaled."),e*=(h+c)/2,l.strokeDasharray=i;else if("rect"===u)e=2*g*h+2*D*c;else if("line"===u)e=Wi(p,d,p+g,d+D,h,c);else if("polyline"===u||"polygon"===u)for(r=t.getAttribute("points").match(Ni)||[],"polygon"===u&&r.push(r[0],r[1]),e=0,o=2;o<r.length;o+=2)e+=Wi(r[o-2],r[o-1],r[o],r[o+1],h,c)||0;else"circle"!==u&&"ellipse"!==u||(s=g/2*h,a=D/2*c,e=Math.PI*(3*(s+a)-Hi((3*s+a)*(s+3*a))));return e||0},qi=function(t,e){if(!(t=Pi(t)[0]))return[0,0];e||(e=Ui(t)+1);var n=Si.getComputedStyle(t),r=n.strokeDasharray||"",i=Yi(n.strokeDashoffset),o=r.indexOf(",");return o<0&&(o=r.indexOf(" ")),(r=o<0?e:Yi(r.substr(0,o)))>e&&(r=e),[-i||0,r-i||0]},Gi=function(){Bi()&&(document,Si=window,ki=Ai=Li(),Pi=Ai.utils.toArray,Oi=-1!==((Si.navigator||{}).userAgent||"").indexOf("Edge"))},Ki={version:"3.9.1",name:"drawSVG",register:function(t){Ai=t,Gi()},init:function(t,e,n,r,i){if(!t.getBBox)return!1;ki||Gi();var o,s,a,u=Ui(t);return this._style=t.style,this._target=t,e+""=="true"?e="0 100%":e?-1===(e+"").indexOf(" ")&&(e="0 "+e):e="0 0",s=function(t,e,n){var r,i,o=t.indexOf(" ");return o<0?(r=void 0!==n?n+"":t,i=t):(r=t.substr(0,o),i=t.substr(o+1)),(r=Ii(r,e))>(i=Ii(i,e))?[i,r]:[r,i]}(e,u,(o=qi(t,u))[0]),this._length=Xi(u),this._dash=Xi(o[1]-o[0]),this._offset=Xi(-o[0]),this._dashPT=this.add(this,"_dash",this._dash,Xi(s[1]-s[0])),this._offsetPT=this.add(this,"_offset",this._offset,Xi(-s[0])),Oi&&(a=Si.getComputedStyle(t)).strokeLinecap!==a.strokeLinejoin&&(s=Yi(a.strokeMiterlimit),this.add(t.style,"strokeMiterlimit",s,s+.01)),this._live=ji(t)||~(e+"").indexOf("live"),this._nowrap=~(e+"").indexOf("nowrap"),this._props.push("drawSVG"),1},render:function(t,e){var n,r,i,o,s=e._pt,a=e._style;if(s){for(e._live&&(n=Ui(e._target))!==e._length&&(r=n/e._length,e._length=n,e._offsetPT&&(e._offsetPT.s*=r,e._offsetPT.c*=r),e._dashPT?(e._dashPT.s*=r,e._dashPT.c*=r):e._dash*=r);s;)s.r(t,s.d),s=s._next;i=e._dash||t&&1!==t&&1e-4||0,n=e._length-i+.1,o=e._offset,i&&o&&i+Math.abs(o%e._length)>e._length-.2&&(o+=o<0?.1:-.1)&&(n+=.1),a.strokeDashoffset=i?o:o+.001,a.strokeDasharray=n<.2?"none":i?i+"px,"+(e._nowrap?999999:n)+"px":"0px, 999999px"}},getLength:Ui,getPosition:qi};Li()&&Ai.registerPlugin(Ki);
/*!
 * matrix 3.9.1
 * https://greensock.com
 *
 * Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var Qi,Zi,$i,Ji,to,eo,no,ro,io,oo="transform",so=oo+"Origin",ao=function(t){var e=t.ownerDocument||t;!(oo in t.style)&&"msTransform"in t.style&&(so=(oo="msTransform")+"Origin");for(;e.parentNode&&(e=e.parentNode););if(Zi=window,no=new go,e){Qi=e,$i=e.documentElement,Ji=e.body,(ro=Qi.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var n=e.createElement("div"),r=e.createElement("div");Ji.appendChild(n),n.appendChild(r),n.style.position="static",n.style[oo]="translate3d(0,0,1px)",io=r.offsetParent!==n,Ji.removeChild(n)}return e},uo=[],lo=[],ho=function(t){return t.ownerSVGElement||("svg"===(t.tagName+"").toLowerCase()?t:null)},co=function t(e,n){if(e.parentNode&&(Qi||ao(e))){var r=ho(e),i=r?r.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o=r?n?"rect":"g":"div",s=2!==n?0:100,a=3===n?100:0,u="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",l=Qi.createElementNS?Qi.createElementNS(i.replace(/^https/,"http"),o):Qi.createElement(o);return n&&(r?(eo||(eo=t(e)),l.setAttribute("width",.01),l.setAttribute("height",.01),l.setAttribute("transform","translate("+s+","+a+")"),eo.appendChild(l)):(to||((to=t(e)).style.cssText=u),l.style.cssText=u+"width:0.1px;height:0.1px;top:"+a+"px;left:"+s+"px",to.appendChild(l))),l}throw"Need document and parent."},fo=function(t,e){var n,r,i,o,s,a,u=ho(t),l=t===u,h=u?uo:lo,c=t.parentNode;if(t===Zi)return t;if(h.length||h.push(co(t,1),co(t,2),co(t,3)),n=u?eo:to,u)l?(o=-(i=function(t){var e,n=t.getCTM();return n||(e=t.style[oo],t.style[oo]="none",t.appendChild(ro),n=ro.getCTM(),t.removeChild(ro),e?t.style[oo]=e:t.style.removeProperty(oo.replace(/([A-Z])/g,"-$1").toLowerCase())),n||no.clone()}(t)).e/i.a,s=-i.f/i.d,r=no):(i=t.getBBox(),o=(r=(r=t.transform?t.transform.baseVal:{}).numberOfItems?r.numberOfItems>1?function(t){for(var e=new go,n=0;n<t.numberOfItems;n++)e.multiply(t.getItem(n).matrix);return e}(r):r.getItem(0).matrix:no).a*i.x+r.c*i.y,s=r.b*i.x+r.d*i.y),e&&"g"===t.tagName.toLowerCase()&&(o=s=0),(l?u:c).appendChild(n),n.setAttribute("transform","matrix("+r.a+","+r.b+","+r.c+","+r.d+","+(r.e+o)+","+(r.f+s)+")");else{if(o=s=0,io)for(r=t.offsetParent,i=t;i&&(i=i.parentNode)&&i!==r&&i.parentNode;)(Zi.getComputedStyle(i)[oo]+"").length>4&&(o=i.offsetLeft,s=i.offsetTop,i=0);if("absolute"!==(a=Zi.getComputedStyle(t)).position&&"fixed"!==a.position)for(r=t.offsetParent;c&&c!==r;)o+=c.scrollLeft||0,s+=c.scrollTop||0,c=c.parentNode;(i=n.style).top=t.offsetTop-s+"px",i.left=t.offsetLeft-o+"px",i[oo]=a[oo],i[so]=a[so],i.position="fixed"===a.position?"fixed":"absolute",t.parentNode.appendChild(n)}return n},po=function(t,e,n,r,i,o,s){return t.a=e,t.b=n,t.c=r,t.d=i,t.e=o,t.f=s,t},go=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),po(this,t,e,n,r,i,o)}var e=t.prototype;return e.inverse=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,o=this.f,s=t*r-e*n||1e-10;return po(this,r/s,-e/s,-n/s,t/s,(n*o-r*i)/s,-(t*o-e*i)/s)},e.multiply=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=this.e,s=this.f,a=t.a,u=t.c,l=t.b,h=t.d,c=t.e,f=t.f;return po(this,a*e+l*r,a*n+l*i,u*e+h*r,u*n+h*i,o+c*e+f*r,s+c*n+f*i)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=this.e,s=this.f;return e===t.a&&n===t.b&&r===t.c&&i===t.d&&o===t.e&&s===t.f},e.apply=function(t,e){void 0===e&&(e={});var n=t.x,r=t.y,i=this.a,o=this.b,s=this.c,a=this.d,u=this.e,l=this.f;return e.x=n*i+r*s+u||0,e.y=n*o+r*a+l||0,e},t}();function Do(t,e,n,r){if(!t||!t.parentNode||(Qi||ao(t)).documentElement===t)return new go;var i=function(t){for(var e,n;t&&t!==Ji;)(n=t._gsap)&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=ho(t)?uo:lo,s=fo(t,n),a=o[0].getBoundingClientRect(),u=o[1].getBoundingClientRect(),l=o[2].getBoundingClientRect(),h=s.parentNode,c=!r&&function t(e){return"fixed"===Zi.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),f=new go((u.left-a.left)/100,(u.top-a.top)/100,(l.left-a.left)/100,(l.top-a.top)/100,a.left+(c?0:Zi.pageXOffset||Qi.scrollLeft||$i.scrollLeft||Ji.scrollLeft||0),a.top+(c?0:Zi.pageYOffset||Qi.scrollTop||$i.scrollTop||Ji.scrollTop||0));if(h.removeChild(s),i)for(a=i.length;a--;)(u=i[a]).scaleX=u.scaleY=0,u.renderTransform(1,u);return e?f.inverse():f}
/*!
 * MotionPathPlugin 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/var mo,vo,_o,yo,xo="x,translateX,left,marginLeft,xPercent".split(","),wo="y,translateY,top,marginTop,yPercent".split(","),Co=Math.PI/180,Fo=function(t,e,n,r){for(var i=e.length,o=2===r?0:r,s=0;s<i;s++)t[o]=parseFloat(e[s][n]),2===r&&(t[o+1]=0),o+=2;return t},Eo=function(t,e,n){return parseFloat(t._gsap.get(t,e,n||"px"))||0},bo=function(t){var e,n=t[0],r=t[1];for(e=2;e<t.length;e+=2)n=t[e]+=n,r=t[e+1]+=r},To=function(t,e,n,r,i,o,s,a,u){"cubic"===s.type?e=[e]:(!1!==s.fromCurrent&&e.unshift(Eo(n,r,a),i?Eo(n,i,u):0),s.relative&&bo(e),e=[(i?ui:ai)(e,s.curviness)]);return e=o(Oo(e,n,s)),ko(t,n,r,e,"x",a),i&&ko(t,n,i,e,"y",u),ti(e,s.resolution||(0===s.curviness?20:12))},Mo=function(t){return t},Ao=/[-+\.]*\d+\.?(?:e-|e\+)?\d*/g,Po=function(t,e,n){var r,i=Do(t),o=0,s=0;return"svg"===(t.tagName+"").toLowerCase()?(r=t.viewBox.baseVal).width||(r={width:+t.getAttribute("width"),height:+t.getAttribute("height")}):r=e&&t.getBBox&&t.getBBox(),e&&"auto"!==e&&(o=e.push?e[0]*(r?r.width:t.offsetWidth||0):e.x,s=e.push?e[1]*(r?r.height:t.offsetHeight||0):e.y),n.apply(o||s?i.apply({x:o,y:s}):{x:i.e,y:i.f})},So=function(t,e,n,r){var i,o=Do(t.parentNode,!0,!0),s=o.clone().multiply(Do(e)),a=Po(t,n,o),u=Po(e,r,o),l=u.x,h=u.y;return s.e=s.f=0,"auto"===r&&e.getTotalLength&&"path"===e.tagName.toLowerCase()&&(i=e.getAttribute("d").match(Ao)||[],l+=(i=s.apply({x:+i[0],y:+i[1]})).x,h+=i.y),(i||e.getBBox&&t.getBBox&&e.ownerSVGElement===t.ownerSVGElement)&&(l-=(i=s.apply(e.getBBox())).x,h-=i.y),s.e=l-a.x,s.f=h-a.y,s},Oo=function(t,e,n){var r,i,o,s=n.align,a=n.matrix,u=n.offsetX,l=n.offsetY,h=n.alignOrigin,c=t[0][0],f=t[0][1],p=Eo(e,"x"),d=Eo(e,"y");return t&&t.length?(s&&("self"===s||(r=yo(s)[0]||e)===e?ii(t,1,0,0,1,p-c,d-f):(h&&!1!==h[2]?mo.set(e,{transformOrigin:100*h[0]+"% "+100*h[1]+"%"}):h=[Eo(e,"xPercent")/-100,Eo(e,"yPercent")/-100],o=(i=So(e,r,h,"auto")).apply({x:c,y:f}),ii(t,i.a,i.b,i.c,i.d,p+i.e-(o.x-i.e),d+i.f-(o.y-i.f)))),a?ii(t,a.a,a.b,a.c,a.d,a.e,a.f):(u||l)&&ii(t,1,0,0,1,u||0,l||0),t):qr("M0,0L0,0")},ko=function(t,e,n,r,i,o){var s=e._gsap,a=s.harness,u=a&&a.aliases&&a.aliases[n],l=u&&u.indexOf(",")<0?u:n,h=t._pt=new vo(t._pt,e,l,0,0,Mo,0,s.set(e,l,t));h.u=_o(s.get(e,l,o))||0,h.path=r,h.pp=i,t._props.push(l)},Bo={version:"3.9.1",name:"motionPath",register:function(t,e,n){_o=(mo=t).utils.getUnit,yo=mo.utils.toArray,vo=n},init:function(t,e){if(!mo)return console.warn("Please gsap.registerPlugin(MotionPathPlugin)"),!1;"object"==typeof e&&!e.style&&e.path||(e={path:e});var n,r,i,o,s=[],a=e,u=a.path,l=a.autoRotate,h=a.unitX,c=a.unitY,f=a.x,p=a.y,d=u[0],g=(i=e.start,o="end"in e?e.end:1,function(t){return i||1!==o?$r(t,i,o):t});if(this.rawPaths=s,this.target=t,(this.rotate=l||0===l)&&(this.rOffset=parseFloat(l)||0,this.radians=!!e.useRadians,this.rProp=e.rotation||"rotation",this.rSet=t._gsap.set(t,this.rProp,this),this.ru=_o(t._gsap.get(t,this.rProp))||0),Array.isArray(u)&&!("closed"in u)&&"number"!=typeof d){for(r in d)!f&&~xo.indexOf(r)?f=r:!p&&~wo.indexOf(r)&&(p=r);for(r in f&&p?s.push(To(this,Fo(Fo([],u,f,0),u,p,1),t,f,p,g,e,h||_o(u[0][f]),c||_o(u[0][p]))):f=p=0,d)r!==f&&r!==p&&s.push(To(this,Fo([],u,r,2),t,r,0,g,e,_o(u[0][r])))}else ti(n=g(Oo(qr(e.path),t,e)),e.resolution),s.push(n),ko(this,t,e.x||"x",n,"x",e.unitX||"px"),ko(this,t,e.y||"y",n,"y",e.unitY||"px")},render:function(t,e){var n=e.rawPaths,r=n.length,i=e._pt;for(t>1?t=1:t<0&&(t=0);r--;)ri(n[r],t,!r&&e.rotate,n[r]);for(;i;)i.set(i.t,i.p,i.path[i.pp]+i.u,i.d,t),i=i._next;e.rotate&&e.rSet(e.target,e.rProp,n[0].angle*(e.radians?Co:1)+e.rOffset+e.ru,e,t)},getLength:function(t){return ti(qr(t)).totalLength},sliceRawPath:$r,getRawPath:qr,pointsToSegment:ui,stringToRawPath:si,rawPathToString:li,transformRawPath:ii,getGlobalMatrix:Do,getPositionOnPath:ri,cacheRawPathMeasurements:ti,convertToPath:function(t,e){return yo(t).map((function(t){return Qr(t,!1!==e)}))},convertCoordinates:function(t,e,n){var r=Do(e,!0,!0).multiply(Do(t));return n?r.apply(n):r},getAlignMatrix:So,getRelativePosition:function(t,e,n,r){var i=So(t,e,n,r);return{x:i.e,y:i.f}},arrayToRawPath:function(t,e){var n=Fo(Fo([],t,(e=e||{}).x||"x",0),t,e.y||"y",1);return e.relative&&bo(n),["cubic"===e.type?n:ui(n,e.curviness)]}};(mo||"undefined"!=typeof window&&(mo=window.gsap)&&mo.registerPlugin&&mo)&&mo.registerPlugin(Bo);
/*!
 * ScrollToPlugin 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var Lo,No,Ro,Xo,Yo,Io,zo,Ho=function(){return"undefined"!=typeof window},Wo=function(){return Lo||Ho()&&(Lo=window.gsap)&&Lo.registerPlugin&&Lo},Vo=function(t){return"string"==typeof t},jo=function(t){return"function"==typeof t},Uo=function(t,e){var n="x"===e?"Width":"Height",r="scroll"+n,i="client"+n;return t===Ro||t===Xo||t===Yo?Math.max(Xo[r],Yo[r])-(Ro["inner"+n]||Xo[i]||Yo[i]):t[r]-t["offset"+n]},qo=function(t,e){var n="scroll"+("x"===e?"Left":"Top");return t===Ro&&(null!=t.pageXOffset?n="page"+e.toUpperCase()+"Offset":t=null!=Xo[n]?Xo:Yo),function(){return t[n]}},Go=function(t,e){if(!(t=Io(t)[0])||!t.getBoundingClientRect)return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0};var n=t.getBoundingClientRect(),r=!e||e===Ro||e===Yo,i=r?{top:Xo.clientTop-(Ro.pageYOffset||Xo.scrollTop||Yo.scrollTop||0),left:Xo.clientLeft-(Ro.pageXOffset||Xo.scrollLeft||Yo.scrollLeft||0)}:e.getBoundingClientRect(),o={x:n.left-i.left,y:n.top-i.top};return!r&&e&&(o.x+=qo(e,"x")(),o.y+=qo(e,"y")()),o},Ko=function(t,e,n,r,i){return isNaN(t)||"object"==typeof t?Vo(t)&&"="===t.charAt(1)?parseFloat(t.substr(2))*("-"===t.charAt(0)?-1:1)+r-i:"max"===t?Uo(e,n)-i:Math.min(Uo(e,n),Go(t,e)[n]-i):parseFloat(t)-i},Qo=function(){Lo=Wo(),Ho()&&Lo&&document.body&&(Ro=window,Yo=document.body,Xo=document.documentElement,Io=Lo.utils.toArray,Lo.config({autoKillThreshold:7}),zo=Lo.config(),No=1)},Zo={version:"3.9.1",name:"scrollTo",rawVars:1,register:function(t){Lo=t,Qo()},init:function(t,e,n,r,i){No||Qo();var o=Lo.getProperty(t,"scrollSnapType");this.isWin=t===Ro,this.target=t,this.tween=n,e=function(t,e,n,r){if(jo(t)&&(t=t(e,n,r)),"object"!=typeof t)return Vo(t)&&"max"!==t&&"="!==t.charAt(1)?{x:t,y:t}:{y:t};if(t.nodeType)return{y:t,x:t};var i,o={};for(i in t)o[i]="onAutoKill"!==i&&jo(t[i])?t[i](e,n,r):t[i];return o}(e,r,t,i),this.vars=e,this.autoKill=!!e.autoKill,this.getX=qo(t,"x"),this.getY=qo(t,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),o&&"none"!==o&&(this.snap=1,this.snapInline=t.style.scrollSnapType,t.style.scrollSnapType="none"),null!=e.x?(this.add(this,"x",this.x,Ko(e.x,t,"x",this.x,e.offsetX||0),r,i),this._props.push("scrollTo_x")):this.skipX=1,null!=e.y?(this.add(this,"y",this.y,Ko(e.y,t,"y",this.y,e.offsetY||0),r,i),this._props.push("scrollTo_y")):this.skipY=1},render:function(t,e){for(var n,r,i,o,s,a=e._pt,u=e.target,l=e.tween,h=e.autoKill,c=e.xPrev,f=e.yPrev,p=e.isWin,d=e.snap,g=e.snapInline;a;)a.r(t,a.d),a=a._next;n=p||!e.skipX?e.getX():c,i=(r=p||!e.skipY?e.getY():f)-f,o=n-c,s=zo.autoKillThreshold,e.x<0&&(e.x=0),e.y<0&&(e.y=0),h&&(!e.skipX&&(o>s||o<-s)&&n<Uo(u,"x")&&(e.skipX=1),!e.skipY&&(i>s||i<-s)&&r<Uo(u,"y")&&(e.skipY=1),e.skipX&&e.skipY&&(l.kill(),e.vars.onAutoKill&&e.vars.onAutoKill.apply(l,e.vars.onAutoKillParams||[]))),p?Ro.scrollTo(e.skipX?n:e.x,e.skipY?r:e.y):(e.skipY||(u.scrollTop=e.y),e.skipX||(u.scrollLeft=e.x)),!d||1!==t&&0!==t||(r=u.scrollTop,n=u.scrollLeft,g?u.style.scrollSnapType=g:u.style.removeProperty("scroll-snap-type"),u.scrollTop=r+1,u.scrollLeft=n+1,u.scrollTop=r,u.scrollLeft=n),e.xPrev=e.x,e.yPrev=e.y},kill:function(t){var e="scrollTo"===t;(e||"scrollTo_x"===t)&&(this.skipX=1),(e||"scrollTo_y"===t)&&(this.skipY=1)}};Zo.max=Uo,Zo.getOffset=Go,Zo.buildGetter=qo,Wo()&&Lo.registerPlugin(Zo);
/*!
 * Draggable 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
 */
var $o,Jo,ts,es,ns,rs,is,os,ss,as,us,ls,hs,cs,fs,ps,ds,gs,Ds,ms,vs,_s=function(){return"undefined"!=typeof window},ys=function(){return $o||_s()&&($o=window.gsap)&&$o.registerPlugin&&$o},xs=function(t){return"function"==typeof t},ws=function(t){return"object"==typeof t},Cs=function(t){return void 0===t},Fs=function(){return!1},Es="transform",bs="transformOrigin",Ts=function(t){return Math.round(1e4*t)/1e4},Ms=Array.isArray,As=function(t,e){var n=ts.createElementNS?ts.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):ts.createElement(t);return n.style?n:ts.createElement(t)},Ps=180/Math.PI,Ss=new go,Os=Date.now||function(){return(new Date).getTime()},ks=[],Bs={},Ls=0,Ns=/^(?:a|input|textarea|button|select)$/i,Rs=0,Xs={},Ys={},Is=function(t,e){var n,r={};for(n in t)r[n]=e?t[n]*e:t[n];return r},zs=function t(e,n){for(var r,i=e.length;i--;)n?e[i].style.touchAction=n:e[i].style.removeProperty("touch-action"),(r=e[i].children)&&r.length&&t(r,n)},Hs=function(){return ks.forEach((function(t){return t()}))},Ws=function(){return!ks.length&&$o.ticker.remove(Hs)},Vs=function(t){for(var e=ks.length;e--;)ks[e]===t&&ks.splice(e,1);$o.to(Ws,{overwrite:!0,delay:15,duration:0,onComplete:Ws,data:"_draggable"})},js=function(t,e,n,r){if(t.addEventListener){var i=hs[e];r=r||(us?{passive:!1}:null),t.addEventListener(i||e,n,r),i&&e!==i&&t.addEventListener(e,n,r)}},Us=function(t,e,n){if(t.removeEventListener){var r=hs[e];t.removeEventListener(r||e,n),r&&e!==r&&t.removeEventListener(e,n)}},qs=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},Gs=function t(e){fs=e.touches&&cs<e.touches.length,Us(e.target,"touchend",t)},Ks=function(t){fs=t.touches&&cs<t.touches.length,js(t.target,"touchend",Gs)},Qs=function(t){return Jo.pageYOffset||t.scrollTop||t.documentElement.scrollTop||t.body.scrollTop||0},Zs=function(t){return Jo.pageXOffset||t.scrollLeft||t.documentElement.scrollLeft||t.body.scrollLeft||0},$s=function t(e,n){js(e,"scroll",n),ta(e.parentNode)||t(e.parentNode,n)},Js=function t(e,n){Us(e,"scroll",n),ta(e.parentNode)||t(e.parentNode,n)},ta=function(t){return!(t&&t!==es&&9!==t.nodeType&&t!==ts.body&&t!==Jo&&t.nodeType&&t.parentNode)},ea=function(t,e){var n="x"===e?"Width":"Height",r="scroll"+n,i="client"+n;return Math.max(0,ta(t)?Math.max(es[r],ns[r])-(Jo["inner"+n]||es[i]||ns[i]):t[r]-t[i])},na=function t(e,n){var r=ea(e,"x"),i=ea(e,"y");ta(e)?e=Ys:t(e.parentNode,n),e._gsMaxScrollX=r,e._gsMaxScrollY=i,n||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)},ra=function(t,e,n){var r=t.style;r&&(Cs(r[e])&&(e=ss(e,t)||e),null==n?r.removeProperty&&r.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):r[e]=n)},ia=function(t){return Jo.getComputedStyle(t instanceof Element?t:t.host||(t.parentNode||{}).host||t)},oa={},sa=function(t){if(t===Jo)return oa.left=oa.top=0,oa.width=oa.right=es.clientWidth||t.innerWidth||ns.clientWidth||0,oa.height=oa.bottom=(t.innerHeight||0)-20<es.clientHeight?es.clientHeight:t.innerHeight||ns.clientHeight||0,oa;var e=t.ownerDocument||ts,n=Cs(t.pageX)?t.nodeType||Cs(t.left)||Cs(t.top)?as(t)[0].getBoundingClientRect():t:{left:t.pageX-Zs(e),top:t.pageY-Qs(e),right:t.pageX-Zs(e)+1,bottom:t.pageY-Qs(e)+1};return Cs(n.right)&&!Cs(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):Cs(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},aa=function(t,e,n){var r,i=t.vars,o=i[n],s=t._listeners[e];return xs(o)&&(r=o.apply(i.callbackScope||t,i[n+"Params"]||[t.pointerEvent])),s&&!1===t.dispatchEvent(e)&&(r=!1),r},ua=function(t,e){var n,r,i,o=as(t)[0];return o.nodeType||o===Jo?ha(o,e):Cs(t.left)?{left:r=t.min||t.minX||t.minRotation||0,top:n=t.min||t.minY||0,width:(t.max||t.maxX||t.maxRotation||0)-r,height:(t.max||t.maxY||0)-n}:(i={x:0,y:0},{left:t.left-i.x,top:t.top-i.y,width:t.width,height:t.height})},la={},ha=function(t,e){e=as(e)[0];var n,r,i,o,s,a,u,l,h,c,f,p,d,g,D=t.getBBox&&t.ownerSVGElement,m=t.ownerDocument||ts;if(t===Jo)i=Qs(m),r=(n=Zs(m))+(m.documentElement.clientWidth||t.innerWidth||m.body.clientWidth||0),o=i+((t.innerHeight||0)-20<m.documentElement.clientHeight?m.documentElement.clientHeight:t.innerHeight||m.body.clientHeight||0);else{if(e===Jo||Cs(e))return t.getBoundingClientRect();n=i=0,D?(f=(c=t.getBBox()).width,p=c.height):(t.viewBox&&(c=t.viewBox.baseVal)&&(n=c.x||0,i=c.y||0,f=c.width,p=c.height),f||(c="border-box"===(d=ia(t)).boxSizing,f=(parseFloat(d.width)||t.clientWidth||0)+(c?0:parseFloat(d.borderLeftWidth)+parseFloat(d.borderRightWidth)),p=(parseFloat(d.height)||t.clientHeight||0)+(c?0:parseFloat(d.borderTopWidth)+parseFloat(d.borderBottomWidth)))),r=f,o=p}return t===e?{left:n,top:i,width:r-n,height:o-i}:(a=(s=Do(e,!0).multiply(Do(t))).apply({x:n,y:i}),u=s.apply({x:r,y:i}),l=s.apply({x:r,y:o}),h=s.apply({x:n,y:o}),n=Math.min(a.x,u.x,l.x,h.x),i=Math.min(a.y,u.y,l.y,h.y),{left:n+((g=e.parentNode||{}).scrollLeft||0),top:i+(g.scrollTop||0),width:Math.max(a.x,u.x,l.x,h.x)-n,height:Math.max(a.y,u.y,l.y,h.y)-i})},ca=function(t,e,n,r,i,o){var s,a,u,l={};if(e)if(1!==i&&e instanceof Array){if(l.end=s=[],u=e.length,ws(e[0]))for(a=0;a<u;a++)s[a]=Is(e[a],i);else for(a=0;a<u;a++)s[a]=e[a]*i;n+=1.1,r-=1.1}else xs(e)?l.end=function(n){var r,o,s=e.call(t,n);if(1!==i)if(ws(s)){for(o in r={},s)r[o]=s[o]*i;s=r}else s*=i;return s}:l.end=e;return(n||0===n)&&(l.max=n),(r||0===r)&&(l.min=r),o&&(l.velocity=0),l},fa=function t(e){var n;return!(!e||!e.getAttribute||e===ns)&&(!("true"!==(n=e.getAttribute("data-clickable"))&&("false"===n||!e.onclick&&!Ns.test(e.nodeName+"")&&"true"!==e.getAttribute("contentEditable")))||t(e.parentNode))},pa=function(t,e){for(var n,r=t.length;r--;)(n=t[r]).ondragstart=n.onselectstart=e?null:Fs,$o.set(n,{lazy:!0,userSelect:e?"text":"none"})},da=function(t,e){t=$o.utils.toArray(t)[0],e=e||{};var n,r,i,o,s,a,u=document.createElement("div"),l=u.style,h=t.firstChild,c=0,f=0,p=t.scrollTop,d=t.scrollLeft,g=t.scrollWidth,D=t.scrollHeight,m=0,v=0,_=0;ms&&!1!==e.force3D?(s="translate3d(",a="px,0px)"):Es&&(s="translate(",a="px)"),this.scrollTop=function(t,e){if(!arguments.length)return-this.top();this.top(-t,e)},this.scrollLeft=function(t,e){if(!arguments.length)return-this.left();this.left(-t,e)},this.left=function(n,r){if(!arguments.length)return-(t.scrollLeft+f);var i=t.scrollLeft-d,o=f;if((i>2||i<-2)&&!r)return d=t.scrollLeft,$o.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-d),void(e.onKill&&e.onKill());(n=-n)<0?(f=n-.5|0,n=0):n>v?(f=n-v|0,n=v):f=0,(f||o)&&(this._skip||(l[Es]=s+-f+"px,"+-c+a),f+m>=0&&(l.paddingRight=f+m+"px")),t.scrollLeft=0|n,d=t.scrollLeft},this.top=function(n,r){if(!arguments.length)return-(t.scrollTop+c);var i=t.scrollTop-p,o=c;if((i>2||i<-2)&&!r)return p=t.scrollTop,$o.killTweensOf(this,{top:1,scrollTop:1}),this.top(-p),void(e.onKill&&e.onKill());(n=-n)<0?(c=n-.5|0,n=0):n>_?(c=n-_|0,n=_):c=0,(c||o)&&(this._skip||(l[Es]=s+-f+"px,"+-c+a)),t.scrollTop=0|n,p=t.scrollTop},this.maxScrollTop=function(){return _},this.maxScrollLeft=function(){return v},this.disable=function(){for(h=u.firstChild;h;)o=h.nextSibling,t.appendChild(h),h=o;t===u.parentNode&&t.removeChild(u)},this.enable=function(){if((h=t.firstChild)!==u){for(;h;)o=h.nextSibling,u.appendChild(h),h=o;t.appendChild(u),this.calibrate()}},this.calibrate=function(e){var o,s,a,h=t.clientWidth===n;p=t.scrollTop,d=t.scrollLeft,h&&t.clientHeight===r&&u.offsetHeight===i&&g===t.scrollWidth&&D===t.scrollHeight&&!e||((c||f)&&(s=this.left(),a=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),o=ia(t),h&&!e||(l.display="block",l.width="auto",l.paddingRight="0px",(m=Math.max(0,t.scrollWidth-t.clientWidth))&&(m+=parseFloat(o.paddingLeft)+(vs?parseFloat(o.paddingRight):0))),l.display="inline-block",l.position="relative",l.overflow="visible",l.verticalAlign="top",l.boxSizing="content-box",l.width="100%",l.paddingRight=m+"px",vs&&(l.paddingBottom=o.paddingBottom),n=t.clientWidth,r=t.clientHeight,g=t.scrollWidth,D=t.scrollHeight,v=t.scrollWidth-n,_=t.scrollHeight-r,i=u.offsetHeight,l.display="block",(s||a)&&(this.left(s),this.top(a)))},this.content=u,this.element=t,this._skip=!1,this.enable()},ga=function(t){if(_s()&&document.body){var e=window&&window.navigator;Jo=window,ts=document,es=ts.documentElement,ns=ts.body,rs=As("div"),Ds=!!window.PointerEvent,(is=As("div")).style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",gs="grab"===is.style.cursor?"grab":"move",ps=e&&-1!==e.userAgent.toLowerCase().indexOf("android"),ls="ontouchstart"in es&&"orientation"in Jo||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),r=As("div"),i=As("div"),o=i.style,s=ns,o.display="inline-block",o.position="relative",r.style.cssText=i.innerHTML="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",r.appendChild(i),s.appendChild(r),n=i.offsetHeight+18>r.scrollHeight,s.removeChild(r),vs=n,hs=function(t){for(var e=t.split(","),n=(("onpointerdown"in rs?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in rs?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":t).split(",")),r={},i=4;--i>-1;)r[e[i]]=n[i],r[n[i]]=e[i];try{es.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){us=1}}))}catch(t){}return r}("touchstart,touchmove,touchend,touchcancel"),js(ts,"touchcancel",Fs),js(Jo,"touchmove",Fs),ns&&ns.addEventListener("touchstart",Fs),js(ts,"contextmenu",(function(){for(var t in Bs)Bs[t].isPressed&&Bs[t].endDrag()})),$o=os=ys()}var n,r,i,o,s;$o?(ds=$o.plugins.inertia,ss=$o.utils.checkPrefix,Es=ss(Es),bs=ss(bs),as=$o.utils.toArray,ms=!!ss("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},Da=function(t){var e,n;function r(e,n){var i;i=t.call(this)||this,os||ga(1),e=as(e)[0],ds||(ds=$o.plugins.inertia),i.vars=n=Is(n||{}),i.target=e,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(n.dragResistance)||0,i.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,i.lockAxis=n.lockAxis,i.autoScroll=n.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!n.allowEventDefault,$o.getProperty(e,"x");var o,s,a,u,l,h,c,f,p,d,g,D,m,v,_,y,x,w,C,F,E,b,T,M,A,P,S,O,k,B,L,N,R=(n.type||"x,y").toLowerCase(),X=~R.indexOf("x")||~R.indexOf("y"),Y=-1!==R.indexOf("rotation"),I=Y?"rotation":X?"x":"left",z=X?"y":"top",H=!(!~R.indexOf("x")&&!~R.indexOf("left")&&"scroll"!==R),W=!(!~R.indexOf("y")&&!~R.indexOf("top")&&"scroll"!==R),V=n.minimumMovement||2,j=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i),U=as(n.trigger||n.handle||e),q={},G=0,K=!1,Q=n.autoScrollMarginTop||40,Z=n.autoScrollMarginRight||40,$=n.autoScrollMarginBottom||40,J=n.autoScrollMarginLeft||40,tt=n.clickableTest||fa,et=0,nt=e._gsap||$o.core.getCache(e),rt=function t(e){return"fixed"===ia(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(e),it=function(t,n){return parseFloat(nt.get(e,t,n))},ot=e.ownerDocument||ts,st=function(t){return qs(t),t.stopImmediatePropagation&&t.stopImmediatePropagation(),!1},at=function t(n){if(j.autoScroll&&j.isDragging&&(K||x)){var r,i,o,a,u,l,h,c,p=e,d=15*j.autoScroll;for(K=!1,Ys.scrollTop=null!=Jo.pageYOffset?Jo.pageYOffset:null!=ot.documentElement.scrollTop?ot.documentElement.scrollTop:ot.body.scrollTop,Ys.scrollLeft=null!=Jo.pageXOffset?Jo.pageXOffset:null!=ot.documentElement.scrollLeft?ot.documentElement.scrollLeft:ot.body.scrollLeft,a=j.pointerX-Ys.scrollLeft,u=j.pointerY-Ys.scrollTop;p&&!i;)r=(i=ta(p.parentNode))?Ys:p.parentNode,o=i?{bottom:Math.max(es.clientHeight,Jo.innerHeight||0),right:Math.max(es.clientWidth,Jo.innerWidth||0),left:0,top:0}:r.getBoundingClientRect(),l=h=0,W&&((c=r._gsMaxScrollY-r.scrollTop)<0?h=c:u>o.bottom-$&&c?(K=!0,h=Math.min(c,d*(1-Math.max(0,o.bottom-u)/$)|0)):u<o.top+Q&&r.scrollTop&&(K=!0,h=-Math.min(r.scrollTop,d*(1-Math.max(0,u-o.top)/Q)|0)),h&&(r.scrollTop+=h)),H&&((c=r._gsMaxScrollX-r.scrollLeft)<0?l=c:a>o.right-Z&&c?(K=!0,l=Math.min(c,d*(1-Math.max(0,o.right-a)/Z)|0)):a<o.left+J&&r.scrollLeft&&(K=!0,l=-Math.min(r.scrollLeft,d*(1-Math.max(0,a-o.left)/J)|0)),l&&(r.scrollLeft+=l)),i&&(l||h)&&(Jo.scrollTo(r.scrollLeft,r.scrollTop),yt(j.pointerX+l,j.pointerY+h)),p=r}if(x){var g=j.x,D=j.y;Y?(j.deltaX=g-parseFloat(nt.rotation),j.rotation=g,nt.rotation=g+"deg",nt.renderTransform(1,nt)):s?(W&&(j.deltaY=D-s.top(),s.top(D)),H&&(j.deltaX=g-s.left(),s.left(g))):X?(W&&(j.deltaY=D-parseFloat(nt.y),nt.y=D+"px"),H&&(j.deltaX=g-parseFloat(nt.x),nt.x=g+"px"),nt.renderTransform(1,nt)):(W&&(j.deltaY=D-parseFloat(e.style.top||0),e.style.top=D+"px"),H&&(j.deltaX=g-parseFloat(e.style.left||0),e.style.left=g+"px")),!f||n||O||(O=!0,!1===aa(j,"drag","onDrag")&&(H&&(j.x-=j.deltaX),W&&(j.y-=j.deltaY),t(!0)),O=!1)}x=!1},ut=function(t,n){var r,i,o=j.x,a=j.y;e._gsap||(nt=$o.core.getCache(e)),nt.uncache&&$o.getProperty(e,"x"),X?(j.x=parseFloat(nt.x),j.y=parseFloat(nt.y)):Y?j.x=j.rotation=parseFloat(nt.rotation):s?(j.y=s.top(),j.x=s.left()):(j.y=parseFloat(e.style.top||(i=ia(e))&&i.top)||0,j.x=parseFloat(e.style.left||(i||{}).left)||0),(C||F||E)&&!n&&(j.isDragging||j.isThrowing)&&(E&&(Xs.x=j.x,Xs.y=j.y,(r=E(Xs)).x!==j.x&&(j.x=r.x,x=!0),r.y!==j.y&&(j.y=r.y,x=!0)),C&&(r=C(j.x))!==j.x&&(j.x=r,Y&&(j.rotation=r),x=!0),F&&((r=F(j.y))!==j.y&&(j.y=r),x=!0)),x&&at(!0),t||(j.deltaX=j.x-o,j.deltaY=j.y-a,aa(j,"throwupdate","onThrowUpdate"))},lt=function(t,e,n,r){return null==e&&(e=-1e20),null==n&&(n=1e20),xs(t)?function(i){var o=j.isPressed?1-j.edgeResistance:1;return t.call(j,i>n?n+(i-n)*o:i<e?e+(i-e)*o:i)*r}:Ms(t)?function(r){for(var i,o,s=t.length,a=0,u=1e20;--s>-1;)(o=(i=t[s])-r)<0&&(o=-o),o<u&&i>=e&&i<=n&&(a=s,u=o);return t[a]}:isNaN(t)?function(t){return t}:function(){return t*r}},ht=function(){var t,r,i,o;c=!1,s?(s.calibrate(),j.minX=g=-s.maxScrollLeft(),j.minY=m=-s.maxScrollTop(),j.maxX=d=j.maxY=D=0,c=!0):n.bounds&&(t=ua(n.bounds,e.parentNode),Y?(j.minX=g=t.left,j.maxX=d=t.left+t.width,j.minY=m=j.maxY=D=0):Cs(n.bounds.maxX)&&Cs(n.bounds.maxY)?(r=ua(e,e.parentNode),j.minX=g=Math.round(it(I,"px")+t.left-r.left),j.minY=m=Math.round(it(z,"px")+t.top-r.top),j.maxX=d=Math.round(g+(t.width-r.width)),j.maxY=D=Math.round(m+(t.height-r.height))):(t=n.bounds,j.minX=g=t.minX,j.minY=m=t.minY,j.maxX=d=t.maxX,j.maxY=D=t.maxY),g>d&&(j.minX=d,j.maxX=d=g,g=j.minX),m>D&&(j.minY=D,j.maxY=D=m,m=j.minY),Y&&(j.minRotation=g,j.maxRotation=d),c=!0),n.liveSnap&&(i=!0===n.liveSnap?n.snap||{}:n.liveSnap,o=Ms(i)||xs(i),Y?(C=lt(o?i:i.rotation,g,d,1),F=null):i.points?E=function(t,e,n,r,i,o,s){return o=o&&o<1e20?o*o:1e20,xs(t)?function(a){var u,l,h,c=j.isPressed?1-j.edgeResistance:1,f=a.x,p=a.y;return a.x=f=f>n?n+(f-n)*c:f<e?e+(f-e)*c:f,a.y=p=p>i?i+(p-i)*c:p<r?r+(p-r)*c:p,(u=t.call(j,a))!==a&&(a.x=u.x,a.y=u.y),1!==s&&(a.x*=s,a.y*=s),o<1e20&&(l=a.x-f)*l+(h=a.y-p)*h>o&&(a.x=f,a.y=p),a}:Ms(t)?function(e){for(var n,r,i,s,a=t.length,u=0,l=1e20;--a>-1;)(s=(n=(i=t[a]).x-e.x)*n+(r=i.y-e.y)*r)<l&&(u=a,l=s);return l<=o?t[u]:e}:function(t){return t}}(o?i:i.points,g,d,m,D,i.radius,s?-1:1):(H&&(C=lt(o?i:i.x||i.left||i.scrollLeft,g,d,s?-1:1)),W&&(F=lt(o?i:i.y||i.top||i.scrollTop,m,D,s?-1:1))))},ct=function(){j.isThrowing=!1,aa(j,"throwcomplete","onThrowComplete")},ft=function(){j.isThrowing=!1},pt=function(t,r){var i,o,a,u;t&&ds?(!0===t&&(i=n.snap||n.liveSnap||{},o=Ms(i)||xs(i),t={resistance:(n.throwResistance||n.resistance||1e3)/(Y?10:1)},Y?t.rotation=ca(j,o?i:i.rotation,d,g,1,r):(H&&(t[I]=ca(j,o?i:i.points||i.x||i.left,d,g,s?-1:1,r||"x"===j.lockedAxis)),W&&(t[z]=ca(j,o?i:i.points||i.y||i.top,D,m,s?-1:1,r||"y"===j.lockedAxis)),(i.points||Ms(i)&&ws(i[0]))&&(t.linkedProps=I+","+z,t.radius=i.radius))),j.isThrowing=!0,u=isNaN(n.overshootTolerance)?1===n.edgeResistance?0:1-j.edgeResistance+.2:n.overshootTolerance,t.duration||(t.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?0===u||ws(t)&&t.resistance>1e3?0:.5:n.minDuration,overshoot:u}),j.tween=a=$o.to(s||e,{inertia:t,data:"_draggable",onComplete:ct,onInterrupt:ft,onUpdate:n.fastMode?aa:ut,onUpdateParams:n.fastMode?[j,"onthrowupdate","onThrowUpdate"]:i&&i.radius?[!1,!0]:[]}),n.fastMode||(s&&(s._skip=!0),a.render(1e9,!0,!0),ut(!0,!0),j.endX=j.x,j.endY=j.y,Y&&(j.endRotation=j.x),a.play(0),ut(!0,!0),s&&(s._skip=!1))):c&&j.applyBounds()},dt=function(t){var n,r=M;M=Do(e.parentNode,!0),t&&j.isPressed&&!M.equals(r||new go)&&(n=r.inverse().apply({x:a,y:u}),M.apply(n,n),a=n.x,u=n.y),M.equals(Ss)&&(M=null)},gt=function(){var t,n,r,i=1-j.edgeResistance,o=rt?Zs(ot):0,f=rt?Qs(ot):0;dt(!1),la.x=j.pointerX-o,la.y=j.pointerY-f,M&&M.apply(la,la),a=la.x,u=la.y,x&&(yt(j.pointerX,j.pointerY),at(!0)),N=Do(e),s?(ht(),h=s.top(),l=s.left()):(Dt()?(ut(!0,!0),ht()):j.applyBounds(),Y?(t=e.ownerSVGElement?[nt.xOrigin-e.getBBox().x,nt.yOrigin-e.getBBox().y]:(ia(e)[bs]||"0 0").split(" "),y=j.rotationOrigin=Do(e).apply({x:parseFloat(t[0])||0,y:parseFloat(t[1])||0}),ut(!0,!0),n=j.pointerX-y.x-o,r=y.y-j.pointerY+f,l=j.x,h=j.y=Math.atan2(r,n)*Ps):(h=it(z,"px"),l=it(I,"px"))),c&&i&&(l>d?l=d+(l-d)/i:l<g&&(l=g-(g-l)/i),Y||(h>D?h=D+(h-D)/i:h<m&&(h=m-(m-h)/i))),j.startX=l=Ts(l),j.startY=h=Ts(h)},Dt=function(){return j.tween&&j.tween.isActive()},mt=function(){!is.parentNode||Dt()||j.isDragging||is.parentNode.removeChild(is)},vt=function(t,i){var l;if(!o||j.isPressed||!t||!("mousedown"!==t.type&&"pointerdown"!==t.type||i)&&Os()-et<30&&hs[j.pointerEvent.type])L&&t&&o&&qs(t);else{if(A=Dt(),j.pointerEvent=t,hs[t.type]?(T=~t.type.indexOf("touch")?t.currentTarget||t.target:ot,js(T,"touchend",xt),js(T,"touchmove",_t),js(T,"touchcancel",xt),js(ot,"touchstart",Ks)):(T=null,js(ot,"mousemove",_t)),S=null,Ds&&T||(js(ot,"mouseup",xt),t&&t.target&&js(t.target,"mouseup",xt)),b=tt.call(j,t.target)&&!1===n.dragClickables&&!i)return js(t.target,"change",xt),aa(j,"pressInit","onPressInit"),aa(j,"press","onPress"),pa(U,!0),void(L=!1);var h;if(P=!(!T||H===W||!1===j.vars.allowNativeTouchScrolling||j.vars.allowContextMenu&&t&&(t.ctrlKey||t.which>2))&&(H?"y":"x"),(L=!P&&!j.allowEventDefault)&&(qs(t),js(Jo,"touchforcechange",qs)),t.changedTouches?(t=v=t.changedTouches[0],_=t.identifier):t.pointerId?_=t.pointerId:v=_=null,cs++,h=at,ks.push(h),1===ks.length&&$o.ticker.add(Hs),u=j.pointerY=t.pageY,a=j.pointerX=t.pageX,aa(j,"pressInit","onPressInit"),(P||j.autoScroll)&&na(e.parentNode),!e.parentNode||!j.autoScroll||s||Y||!e.parentNode._gsMaxScrollX||is.parentNode||e.getBBox||(is.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(is)),gt(),j.tween&&j.tween.kill(),j.isThrowing=!1,$o.killTweensOf(s||e,q,!0),s&&$o.killTweensOf(e,{scrollTo:1},!0),j.tween=j.lockedAxis=null,(n.zIndexBoost||!Y&&!s&&!1!==n.zIndexBoost)&&(e.style.zIndex=r.zIndex++),j.isPressed=!0,f=!(!n.onDrag&&!j._listeners.drag),p=!(!n.onMove&&!j._listeners.move),!1!==n.cursor||n.activeCursor)for(l=U.length;--l>-1;)$o.set(U[l],{cursor:n.activeCursor||n.cursor||("grab"===gs?"grabbing":gs)});aa(j,"press","onPress")}},_t=function(t){var n,r,i,s,l,h,c=t;if(o&&!fs&&j.isPressed&&t){if(j.pointerEvent=t,n=t.changedTouches){if((t=n[0])!==v&&t.identifier!==_){for(s=n.length;--s>-1&&(t=n[s]).identifier!==_&&t.target!==e;);if(s<0)return}}else if(t.pointerId&&_&&t.pointerId!==_)return;T&&P&&!S&&(la.x=t.pageX-(rt?Zs(ot):0),la.y=t.pageY-(rt?Qs(ot):0),M&&M.apply(la,la),r=la.x,i=la.y,((l=Math.abs(r-a))!==(h=Math.abs(i-u))&&(l>V||h>V)||ps&&P===S)&&(S=l>h&&H?"x":"y",P&&S!==P&&js(Jo,"touchforcechange",qs),!1!==j.vars.lockAxisOnTouchScroll&&H&&W&&(j.lockedAxis="x"===S?"y":"x",xs(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,c)),ps&&P===S))?xt(c):(j.allowEventDefault||P&&(!S||P===S)||!1===c.cancelable?L&&(L=!1):(qs(c),L=!0),j.autoScroll&&(K=!0),yt(t.pageX,t.pageY,p))}else L&&t&&o&&qs(t)},yt=function(t,e,n){var r,i,o,s,f,p,v=1-j.dragResistance,_=1-j.edgeResistance,w=j.pointerX,b=j.pointerY,T=h,A=j.x,P=j.y,S=j.endX,O=j.endY,k=j.endRotation,B=x;j.pointerX=t,j.pointerY=e,rt&&(t-=Zs(ot),e-=Qs(ot)),Y?(s=Math.atan2(y.y-e,t-y.x)*Ps,(f=j.y-s)>180?(h-=360,j.y=s):f<-180&&(h+=360,j.y=s),j.x!==l||Math.abs(h-s)>V?(j.y=s,o=l+(h-s)*v):o=l):(M&&(p=t*M.a+e*M.c+M.e,e=t*M.b+e*M.d+M.f,t=p),(i=e-u)<V&&i>-V&&(i=0),(r=t-a)<V&&r>-V&&(r=0),(j.lockAxis||j.lockedAxis)&&(r||i)&&((p=j.lockedAxis)||(j.lockedAxis=p=H&&Math.abs(r)>Math.abs(i)?"y":W?"x":null,p&&xs(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,j.pointerEvent)),"y"===p?i=0:"x"===p&&(r=0)),o=Ts(l+r*v),s=Ts(h+i*v)),(C||F||E)&&(j.x!==o||j.y!==s&&!Y)&&(E&&(Xs.x=o,Xs.y=s,p=E(Xs),o=Ts(p.x),s=Ts(p.y)),C&&(o=Ts(C(o))),F&&(s=Ts(F(s)))),c&&(o>d?o=d+Math.round((o-d)*_):o<g&&(o=g+Math.round((o-g)*_)),Y||(s>D?s=Math.round(D+(s-D)*_):s<m&&(s=Math.round(m+(s-m)*_)))),(j.x!==o||j.y!==s&&!Y)&&(Y?(j.endRotation=j.x=j.endX=o,x=!0):(W&&(j.y=j.endY=s,x=!0),H&&(j.x=j.endX=o,x=!0)),n&&!1===aa(j,"move","onMove")?(j.pointerX=w,j.pointerY=b,h=T,j.x=A,j.y=P,j.endX=S,j.endY=O,j.endRotation=k,x=B):!j.isDragging&&j.isPressed&&(j.isDragging=!0,aa(j,"dragstart","onDragStart")))},xt=function t(r,i){if(o&&j.isPressed&&(!r||null==_||i||!(r.pointerId&&r.pointerId!==_&&r.target!==e||r.changedTouches&&!function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0}(r.changedTouches,_)))){j.isPressed=!1;var s,a,u,l,h,c=r,f=j.isDragging,p=j.vars.allowContextMenu&&r&&(r.ctrlKey||r.which>2),d=$o.delayedCall(.001,mt);if(T?(Us(T,"touchend",t),Us(T,"touchmove",_t),Us(T,"touchcancel",t),Us(ot,"touchstart",Ks)):Us(ot,"mousemove",_t),Us(Jo,"touchforcechange",qs),Ds&&T||(Us(ot,"mouseup",t),r&&r.target&&Us(r.target,"mouseup",t)),x=!1,f&&(G=Rs=Os(),j.isDragging=!1),b&&!p)return r&&(Us(r.target,"change",t),j.pointerEvent=c),pa(U,!1),aa(j,"release","onRelease"),aa(j,"click","onClick"),void(b=!1);for(Vs(at),a=U.length;--a>-1;)ra(U[a],"cursor",n.cursor||(!1!==n.cursor?gs:null));if(cs--,r){if((s=r.changedTouches)&&(r=s[0])!==v&&r.identifier!==_){for(a=s.length;--a>-1&&(r=s[a]).identifier!==_&&r.target!==e;);if(a<0)return}j.pointerEvent=c,j.pointerX=r.pageX,j.pointerY=r.pageY}return p&&c?(qs(c),L=!0,aa(j,"release","onRelease")):c&&!f?(L=!1,A&&(n.snap||n.bounds)&&pt(n.inertia||n.throwProps),aa(j,"release","onRelease"),ps&&"touchmove"===c.type||-1!==c.type.indexOf("cancel")||(aa(j,"click","onClick"),Os()-et<300&&aa(j,"doubleclick","onDoubleClick"),l=c.target||e,et=Os(),h=function(){et===k||!j.enabled()||j.isPressed||c.defaultPrevented||(l.click?l.click():ot.createEvent&&((u=ot.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,Jo,1,j.pointerEvent.screenX,j.pointerEvent.screenY,j.pointerX,j.pointerY,!1,!1,!1,!1,0,null),l.dispatchEvent(u)))},ps||c.defaultPrevented||$o.delayedCall(.05,h))):(pt(n.inertia||n.throwProps),j.allowEventDefault||!c||!1===n.dragClickables&&tt.call(j,c.target)||!f||P&&(!S||P!==S)||!1===c.cancelable?L=!1:(L=!0,qs(c)),aa(j,"release","onRelease")),Dt()&&d.duration(j.tween.duration()),f&&aa(j,"dragend","onDragEnd"),!0}L&&r&&o&&qs(r)},wt=function(t){if(t&&j.isDragging&&!s){var n=t.target||e.parentNode,r=n.scrollLeft-n._gsScrollX,i=n.scrollTop-n._gsScrollY;(r||i)&&(M?(a-=r*M.a+i*M.c,u-=i*M.d+r*M.b):(a-=r,u-=i),n._gsScrollX+=r,n._gsScrollY+=i,yt(j.pointerX,j.pointerY))}},Ct=function(t){var e=Os(),n=e-et<100,r=e-G<50,i=n&&k===et,o=j.pointerEvent&&j.pointerEvent.defaultPrevented,s=n&&B===et,a=t.isTrusted||null==t.isTrusted&&n&&i;if((i||r&&!1!==j.vars.suppressClickOnDrag)&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),n&&(!j.pointerEvent||!j.pointerEvent.defaultPrevented)&&(!i||a&&!s))return a&&i&&(B=et),void(k=et);(j.isPressed||r||n)&&(a&&t.detail&&n&&!o||qs(t)),n||r||(t&&t.target&&(j.pointerEvent=t),aa(j,"click","onClick"))},Ft=function(t){return M?{x:t.x*M.a+t.y*M.c+M.e,y:t.x*M.b+t.y*M.d+M.f}:{x:t.x,y:t.y}};return(w=r.get(e))&&w.kill(),i.startDrag=function(t,n){var r,i,o,s;vt(t||j.pointerEvent,!0),n&&!j.hitTest(t||j.pointerEvent)&&(r=sa(t||j.pointerEvent),i=sa(e),o=Ft({x:r.left+r.width/2,y:r.top+r.height/2}),s=Ft({x:i.left+i.width/2,y:i.top+i.height/2}),a-=o.x-s.x,u-=o.y-s.y),j.isDragging||(j.isDragging=!0,aa(j,"dragstart","onDragStart"))},i.drag=_t,i.endDrag=function(t){return xt(t||j.pointerEvent,!0)},i.timeSinceDrag=function(){return j.isDragging?0:(Os()-G)/1e3},i.timeSinceClick=function(){return(Os()-et)/1e3},i.hitTest=function(t,e){return r.hitTest(j.target,t,e)},i.getDirection=function(t,n){var r,i,o,s,a,u,c="velocity"===t&&ds?t:ws(t)&&!Y?"element":"start";return"element"===c&&(a=sa(j.target),u=sa(t)),r="start"===c?j.x-l:"velocity"===c?ds.getVelocity(e,I):a.left+a.width/2-(u.left+u.width/2),Y?r<0?"counter-clockwise":"clockwise":(n=n||2,i="start"===c?j.y-h:"velocity"===c?ds.getVelocity(e,z):a.top+a.height/2-(u.top+u.height/2),s=(o=Math.abs(r/i))<1/n?"":r<0?"left":"right",o<n&&(""!==s&&(s+="-"),s+=i<0?"up":"down"),s)},i.applyBounds=function(t,r){var i,o,s,a,u,l;if(t&&n.bounds!==t)return n.bounds=t,j.update(!0,r);if(ut(!0),ht(),c&&!Dt()){if(i=j.x,o=j.y,i>d?i=d:i<g&&(i=g),o>D?o=D:o<m&&(o=m),(j.x!==i||j.y!==o)&&(s=!0,j.x=j.endX=i,Y?j.endRotation=i:j.y=j.endY=o,x=!0,at(!0),j.autoScroll&&!j.isDragging))for(na(e.parentNode),a=e,Ys.scrollTop=null!=Jo.pageYOffset?Jo.pageYOffset:null!=ot.documentElement.scrollTop?ot.documentElement.scrollTop:ot.body.scrollTop,Ys.scrollLeft=null!=Jo.pageXOffset?Jo.pageXOffset:null!=ot.documentElement.scrollLeft?ot.documentElement.scrollLeft:ot.body.scrollLeft;a&&!l;)u=(l=ta(a.parentNode))?Ys:a.parentNode,W&&u.scrollTop>u._gsMaxScrollY&&(u.scrollTop=u._gsMaxScrollY),H&&u.scrollLeft>u._gsMaxScrollX&&(u.scrollLeft=u._gsMaxScrollX),a=u;j.isThrowing&&(s||j.endX>d||j.endX<g||j.endY>D||j.endY<m)&&pt(n.inertia||n.throwProps,s)}return j},i.update=function(t,n,r){if(n&&j.isPressed){var i=Do(e),o=N.apply({x:j.x-l,y:j.y-h}),s=Do(e.parentNode,!0);s.apply({x:i.e-o.x,y:i.f-o.y},o),j.x-=o.x-s.e,j.y-=o.y-s.f,at(!0),gt()}var a=j.x,u=j.y;return dt(!n),t?j.applyBounds():(x&&r&&at(!0),ut(!0)),n&&(yt(j.pointerX,j.pointerY),x&&at(!0)),j.isPressed&&!n&&(H&&Math.abs(a-j.x)>.01||W&&Math.abs(u-j.y)>.01&&!Y)&&gt(),j.autoScroll&&(na(e.parentNode,j.isDragging),K=j.isDragging,at(!0),Js(e,wt),$s(e,wt)),j},i.enable=function(t){var r,i,a,u={lazy:!0};if(!1!==n.cursor&&(u.cursor=n.cursor||gs),$o.utils.checkPrefix("touchCallout")&&(u.touchCallout="none"),"soft"!==t){for(zs(U,H===W?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":H?"pan-y":"pan-x"),i=U.length;--i>-1;)a=U[i],Ds||js(a,"mousedown",vt),js(a,"touchstart",vt),js(a,"click",Ct,!0),$o.set(a,u),a.getBBox&&a.ownerSVGElement&&$o.set(a.ownerSVGElement,{touchAction:H===W?"none":n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":H?"pan-y":"pan-x"}),n.allowContextMenu||js(a,"contextmenu",st);pa(U,!1)}return $s(e,wt),o=!0,ds&&"soft"!==t&&ds.track(s||e,X?"x,y":Y?"rotation":"top,left"),e._gsDragID=r="d"+Ls++,Bs[r]=j,s&&(s.enable(),s.element._gsDragID=r),(n.bounds||Y)&&gt(),n.bounds&&j.applyBounds(),j},i.disable=function(t){for(var n,r=j.isDragging,i=U.length;--i>-1;)ra(U[i],"cursor",null);if("soft"!==t){for(zs(U,null),i=U.length;--i>-1;)n=U[i],ra(n,"touchCallout",null),Us(n,"mousedown",vt),Us(n,"touchstart",vt),Us(n,"click",Ct),Us(n,"contextmenu",st);pa(U,!0),T&&(Us(T,"touchcancel",xt),Us(T,"touchend",xt),Us(T,"touchmove",_t)),Us(ot,"mouseup",xt),Us(ot,"mousemove",_t)}return Js(e,wt),o=!1,ds&&"soft"!==t&&ds.untrack(s||e,X?"x,y":Y?"rotation":"top,left"),s&&s.disable(),Vs(at),j.isDragging=j.isPressed=b=!1,r&&aa(j,"dragend","onDragEnd"),j},i.enabled=function(t,e){return arguments.length?t?j.enable(e):j.disable(e):o},i.kill=function(){return j.isThrowing=!1,j.tween&&j.tween.kill(),j.disable(),$o.set(U,{clearProps:"userSelect"}),delete Bs[e._gsDragID],j},~R.indexOf("scroll")&&(s=i.scrollProxy=new da(e,function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t}({onKill:function(){j.isPressed&&xt(null)}},n)),e.style.overflowY=W&&!ls?"auto":"hidden",e.style.overflowX=H&&!ls?"auto":"hidden",e=s.content),Y?q.rotation=1:(H&&(q[I]=1),W&&(q[z]=1)),nt.force3D=!("force3D"in n)||n.force3D,i.enable(),i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.register=function(t){$o=t,ga()},r.create=function(t,e){return os||ga(!0),as(t).map((function(t){return new r(t,e)}))},r.get=function(t){return Bs[(as(t)[0]||{})._gsDragID]},r.timeSinceDrag=function(){return(Os()-Rs)/1e3},r.hitTest=function(t,e,n){if(t===e)return!1;var r,i,o,s=sa(t),a=sa(e),u=s.top,l=s.left,h=s.right,c=s.bottom,f=s.width,p=s.height,d=a.left>h||a.right<l||a.top>c||a.bottom<u;return d||!n?!d:(o=-1!==(n+"").indexOf("%"),n=parseFloat(n)||0,(r={left:Math.max(l,a.left),top:Math.max(u,a.top)}).width=Math.min(h,a.right)-r.left,r.height=Math.min(c,a.bottom)-r.top,!(r.width<0||r.height<0)&&(o?(n*=.01,(i=r.width*r.height)>=f*p*n||i>=a.width*a.height*n):r.width>n&&r.height>n))},r}(function(){function t(t){this._listeners={},this.target=t||this}var e=t.prototype;return e.addEventListener=function(t,e){var n=this._listeners[t]||(this._listeners[t]=[]);~n.indexOf(e)||n.push(e)},e.removeEventListener=function(t,e){var n=this._listeners[t],r=n&&n.indexOf(e)||-1;r>-1&&n.splice(r,1)},e.dispatchEvent=function(t){var e,n=this;return(this._listeners[t]||[]).forEach((function(r){return!1===r.call(n,{type:t,target:n.target})&&(e=!1)})),e},t}());!function(t,e){for(var n in e)n in t||(t[n]=e[n])}(Da.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),Da.zIndex=1e3,Da.version="3.9.1",ys()&&$o.registerPlugin(Da);
/*!
 * VelocityTracker: 3.9.1
 * https://greensock.com
 *
 * Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var ma,va,_a,ya,xa,wa,Ca,Fa,Ea=function(){return ma||"undefined"!=typeof window&&(ma=window.gsap)},ba={},Ta=function(t){return Fa(t).id},Ma=function(t){return ba[Ta("string"==typeof t?_a(t)[0]:t)]},Aa=function(t){var e,n=xa;if(t-Ca>=.05)for(Ca,Ca=t;n;)((e=n.g(n.t,n.p))!==n.v1||t-n.t1>.2)&&(n.v2=n.v1,n.v1=e,n.t2=n.t1,n.t1=t),n=n._next},Pa={deg:360,rad:2*Math.PI},Sa=function(){(ma=Ea())&&(_a=ma.utils.toArray,ya=ma.utils.getUnit,Fa=ma.core.getCache,wa=ma.ticker,va=1)},Oa=function(t,e,n,r){this.t=t,this.p=e,this.g=t._gsap.get,this.rCap=Pa[n||ya(this.g(t,e))],this.v1=this.v2=0,this.t1=this.t2=wa.time,r&&(this._next=r,r._prev=this)},ka=function(){function t(t,e){va||Sa(),this.target=_a(t)[0],ba[Ta(this.target)]=this,this._props={},e&&this.add(e)}t.register=function(t){ma=t,Sa()};var e=t.prototype;return e.get=function(t,e){var n,r,i,o=this._props[t]||console.warn("Not tracking "+t+" velocity.");return n=parseFloat(e?o.v1:o.g(o.t,o.p))-parseFloat(o.v2),(r=o.rCap)&&(n%=r)!==n%(r/2)&&(n=n<0?n+r:n-r),i=n/((e?o.t1:wa.time)-o.t2),Math.round(1e4*i)/1e4},e.getAll=function(){var t,e={},n=this._props;for(t in n)e[t]=this.get(t);return e},e.isTracking=function(t){return t in this._props},e.add=function(t,e){t in this._props||(xa||(wa.add(Aa),Ca=wa.time),xa=this._props[t]=new Oa(this.target,t,e,xa))},e.remove=function(t){var e,n,r=this._props[t];r&&(e=r._prev,n=r._next,e&&(e._next=n),n?n._prev=e:xa===r&&(wa.remove(Aa),xa=0),delete this._props[t])},e.kill=function(t){for(var e in this._props)this.remove(e);t||delete ba[Ta(this.target)]},t.track=function(e,n,r){va||Sa();for(var i,o,s=[],a=_a(e),u=n.split(","),l=(r||"").split(","),h=a.length;h--;){for(i=Ma(a[h])||new t(a[h]),o=u.length;o--;)i.add(u[o],l[o]||l[0]);s.push(i)}return s},t.untrack=function(t,e){var n=(e||"").split(",");_a(t).forEach((function(t){var e=Ma(t);e&&(n.length?n.forEach((function(t){return e.remove(t)})):e.kill(1))}))},t.isTracking=function(t,e){var n=Ma(t);return n&&n.isTracking(e)},t.getVelocity=function(t,e){var n=Ma(t);return n&&n.isTracking(e)?n.get(e):console.warn("Not tracking velocity of "+e)},t}();ka.getByTarget=Ma,Ea()&&ma.registerPlugin(ka);
/*!
 * InertiaPlugin 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var Ba,La,Na,Ra,Xa,Ya,Ia,za,Ha,Wa,Va,ja,Ua=ka.getByTarget,qa=function(){return Ba||"undefined"!=typeof window&&(Ba=window.gsap)&&Ba.registerPlugin&&Ba},Ga=function(t){return"number"==typeof t},Ka=function(t){return"object"==typeof t},Qa=function(t){return"function"==typeof t},Za=Array.isArray,$a=function(t){return t},Ja=function(t,e,n){for(var r in e)r in t||r===n||(t[r]=e[r]);return t},tu=function t(e){var n,r,i={};for(n in e)i[n]=Ka(r=e[n])&&!Za(r)?t(r):r;return i},eu=function(t,e,n,r,i){var o,s,a,u,l=e.length,h=0,c=1e10;if(Ka(t)){for(;l--;){for(a in o=e[l],s=0,t)s+=(u=o[a]-t[a])*u;s<c&&(h=l,c=s)}if((i||1e10)<1e10&&i<Math.sqrt(c))return t}else for(;l--;)(s=(o=e[l])-t)<0&&(s=-s),s<c&&o>=r&&o<=n&&(h=l,c=s);return e[h]},nu=function(t,e,n,r,i,o,s){if("auto"===t.end)return t;var a,u,l=t.end;if(n=isNaN(n)?1e10:n,r=isNaN(r)?-1e10:r,Ka(e)){if(a=e.calculated?e:(Qa(l)?l(e,s):eu(e,l,n,r,o))||e,!e.calculated){for(u in a)e[u]=a[u];e.calculated=!0}a=a[i]}else a=Qa(l)?l(e,s):Za(l)?eu(e,l,n,r,o):parseFloat(l);return a>n?a=n:a<r&&(a=r),{max:a,min:a,unitFactor:t.unitFactor}},ru=function(t,e,n){return isNaN(t[e])?n:+t[e]},iu=function(t,e){return.05*e*t/Wa},ou=function(t,e,n){return Math.abs((e-t)*Wa/n/.05)},su={resistance:1,checkpoint:1,preventOvershoot:1,linkedProps:1,radius:1,duration:1},au=function(t,e,n,r){if(e.linkedProps){var i,o,s,a,u,l,h=e.linkedProps.split(","),c={};for(i=0;i<h.length;i++)(s=e[o=h[i]])&&(a=Ga(s.velocity)?s.velocity:(u=u||Ua(t))&&u.isTracking(o)?u.get(o):0,l=Math.abs(a/ru(s,"resistance",r)),c[o]=parseFloat(n(t,o))+iu(a,l));return c}},uu=function(){(Ba=qa())&&(Na=Ba.parseEase,Ra=Ba.utils.toArray,Ia=Ba.utils.getUnit,Ha=Ba.core.getCache,Va=Ba.utils.clamp,Xa=Na("power3"),Wa=Xa(.05),za=Ba.core.PropTween,Ba.config({resistance:100,unitFactors:{time:1e3,totalTime:1e3,progress:1e3,totalProgress:1e3}}),Ya=Ba.config(),Ba.registerPlugin(ka),La=1)},lu={version:"3.9.1",name:"inertia",register:function(t){Ba=t,uu()},init:function(t,e,n,r,i){La||uu();var o=Ua(t);if("auto"===e){if(!o)return void console.warn("No inertia tracking on "+t+". InertiaPlugin.track(target) first.");e=o.getAll()}this.target=t,this.tween=n,ja=e;var s,a,u,l,h,c,f,p,d,g=t._gsap,D=g.get,m=e.duration,v=Ka(m),_=e.preventOvershoot||v&&0===m.overshoot,y=ru(e,"resistance",Ya.resistance),x=Ga(m)?m:function(t,e,n,r,i,o){if(void 0===n&&(n=10),void 0===r&&(r=.2),void 0===i&&(i=1),void 0===o&&(o=0),"string"==typeof t&&(t=Ra(t)[0]),!t)return 0;var s,a,u,l,h,c,f,p,d,g,D=0,m=1e10,v=e.inertia||e,_=Ha(t).get,y=ru(v,"resistance",Ya.resistance);for(s in g=au(t,v,_,y),v)su[s]||(a=v[s],Ka(a)||((p=p||Ua(t))&&p.isTracking(s)?a=Ga(a)?{velocity:a}:{velocity:p.get(s)}:(l=+a||0,u=Math.abs(l/y))),Ka(a)&&(l=Ga(a.velocity)?a.velocity:(p=p||Ua(t))&&p.isTracking(s)?p.get(s):0,u=Va(r,n,Math.abs(l/ru(a,"resistance",y))),c=(h=parseFloat(_(t,s))||0)+iu(l,u),"end"in a&&(a=nu(a,g&&s in g?g:c,a.max,a.min,s,v.radius,l),o&&(ja===e&&(ja=v=tu(e)),v[s]=Ja(a,v[s],"end"))),"max"in a&&c>+a.max+1e-10?(d=a.unitFactor||Ya.unitFactors[s]||1,(f=h>a.max&&a.min!==a.max||l*d>-15&&l*d<45?r+.1*(n-r):ou(h,a.max,l))+i<m&&(m=f+i)):"min"in a&&c<+a.min-1e-10&&(d=a.unitFactor||Ya.unitFactors[s]||1,(f=h<a.min&&a.min!==a.max||l*d>-45&&l*d<15?r+.1*(n-r):ou(h,a.min,l))+i<m&&(m=f+i)),f>D&&(D=f)),u>D&&(D=u));return D>m&&(D=m),D>n?n:D<r?r:D}(t,e,v&&m.max||10,v&&m.min||.2,v&&"overshoot"in m?+m.overshoot:_?0:1,!0);for(s in e=ja,ja=0,d=au(t,e,D,y),e)su[s]||(a=e[s],Qa(a)&&(a=a(r,t,i)),Ga(a)?h=a:Ka(a)&&!isNaN(a.velocity)?h=+a.velocity:o&&o.isTracking(s)?h=o.get(s):console.warn("ERROR: No velocity was defined for "+t+" property: "+s),c=iu(h,x),p=0,u=D(t,s),l=Ia(u),u=parseFloat(u),Ka(a)&&(f=u+c,"end"in a&&(a=nu(a,d&&s in d?d:f,a.max,a.min,s,e.radius,h)),"max"in a&&+a.max<f?_||a.preventOvershoot?c=a.max-u:p=a.max-u-c:"min"in a&&+a.min>f&&(_||a.preventOvershoot?c=a.min-u:p=a.min-u-c)),this._props.push(s),this._pt=new za(this._pt,t,s,u,0,$a,0,g.set(t,s,this)),this._pt.u=l||0,this._pt.c1=c,this._pt.c2=p);return n.duration(x),1},render:function(t,e){var n,r=e._pt;for(t=Xa(e.tween._time/e.tween._dur);r;)r.set(r.t,r.p,(n=r.s+r.c1*t+r.c2*t*t,Math.round(1e4*n)/1e4+r.u),r.d,t),r=r._next}};"track,untrack,isTracking,getVelocity,getByTarget".split(",").forEach((function(t){return lu[t]=ka[t]})),qa()&&Ba.registerPlugin(lu);
/*!
 * strings: 3.9.1
 * https://greensock.com
 *
 * Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var hu=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;
/*!
 * SplitText: 3.9.1
 * https://greensock.com
 *
 * @license Copyright 2008-2021, GreenSock. All rights reserved.
 * Subject to the terms at https://greensock.com/standard-license or for
 * Club GreenSock members, the agreement issued with that membership.
 * @author: Jack Doyle, jack@greensock.com
*/
var cu,fu,pu,du,gu=/(?:\r|\n|\t\t)/g,Du=/(?:\s\s+)/g,mu=function(t){return fu.getComputedStyle(t)},vu=Array.isArray,_u=[].slice,yu=function(t,e){var n;return vu(t)?t:"string"==(n=typeof t)&&!e&&t?_u.call(cu.querySelectorAll(t),0):t&&"object"===n&&"length"in t?_u.call(t,0):t?[t]:[]},xu=function(t){return"absolute"===t.position||!0===t.absolute},wu=function(t,e){for(var n,r=e.length;--r>-1;)if(n=e[r],t.substr(0,n.length)===n)return n.length},Cu=function(t,e){void 0===t&&(t="");var n=~t.indexOf("++"),r=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+" style='position:relative;display:inline-block;'"+(t?" class='"+t+(n?r++:"")+"'>":">")}},Fu=function t(e,n,r){var i=e.nodeType;if(1===i||9===i||11===i)for(e=e.firstChild;e;e=e.nextSibling)t(e,n,r);else 3!==i&&4!==i||(e.nodeValue=e.nodeValue.split(n).join(r))},Eu=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},bu=function(t,e,n){for(var r;t&&t!==e;){if(r=t._next||t.nextSibling)return r.textContent.charAt(0)===n;t=t.parentNode||t._parent}},Tu=function t(e){var n,r,i=yu(e.childNodes),o=i.length;for(n=0;n<o;n++)(r=i[n])._isSplit?t(r):n&&r.previousSibling&&3===r.previousSibling.nodeType?(r.previousSibling.nodeValue+=3===r.nodeType?r.nodeValue:r.firstChild.nodeValue,e.removeChild(r)):3!==r.nodeType&&(e.insertBefore(r.firstChild,r),e.removeChild(r))},Mu=function(t,e){return parseFloat(e[t])||0},Au=function(t,e,n,r,i,o,s){var a,u,l,h,c,f,p,d,g,D,m,v,_=mu(t),y=Mu("paddingLeft",_),x=-999,w=Mu("borderBottomWidth",_)+Mu("borderTopWidth",_),C=Mu("borderLeftWidth",_)+Mu("borderRightWidth",_),F=Mu("paddingTop",_)+Mu("paddingBottom",_),E=Mu("paddingLeft",_)+Mu("paddingRight",_),b=Mu("fontSize",_)*(e.lineThreshold||.2),T=_.textAlign,M=[],A=[],P=[],S=e.wordDelimiter||" ",O=e.tag?e.tag:e.span?"span":"div",k=e.type||e.split||"chars,words,lines",B=i&&~k.indexOf("lines")?[]:null,L=~k.indexOf("words"),N=~k.indexOf("chars"),R=xu(e),X=e.linesClass,Y=~(X||"").indexOf("++"),I=[],z="flex"===_.display,H=t.style.display;for(Y&&(X=X.split("++").join("")),z&&(t.style.display="block"),l=(u=t.getElementsByTagName("*")).length,c=[],a=0;a<l;a++)c[a]=u[a];if(B||R)for(a=0;a<l;a++)((f=(h=c[a]).parentNode===t)||R||N&&!L)&&(v=h.offsetTop,B&&f&&Math.abs(v-x)>b&&("BR"!==h.nodeName||0===a)&&(p=[],B.push(p),x=v),R&&(h._x=h.offsetLeft,h._y=v,h._w=h.offsetWidth,h._h=h.offsetHeight),B&&((h._isSplit&&f||!N&&f||L&&f||!L&&h.parentNode.parentNode===t&&!h.parentNode._isSplit)&&(p.push(h),h._x-=y,bu(h,t,S)&&(h._wordEnd=!0)),"BR"===h.nodeName&&(h.nextSibling&&"BR"===h.nextSibling.nodeName||0===a)&&B.push([])));for(a=0;a<l;a++)if(f=(h=c[a]).parentNode===t,"BR"!==h.nodeName)if(R&&(g=h.style,L||f||(h._x+=h.parentNode._x,h._y+=h.parentNode._y),g.left=h._x+"px",g.top=h._y+"px",g.position="absolute",g.display="block",g.width=h._w+1+"px",g.height=h._h+"px"),!L&&N)if(h._isSplit)for(h._next=u=h.nextSibling,h.parentNode.appendChild(h);u&&3===u.nodeType&&" "===u.textContent;)h._next=u.nextSibling,h.parentNode.appendChild(u),u=u.nextSibling;else h.parentNode._isSplit?(h._parent=h.parentNode,!h.previousSibling&&h.firstChild&&(h.firstChild._isFirst=!0),h.nextSibling&&" "===h.nextSibling.textContent&&!h.nextSibling.nextSibling&&I.push(h.nextSibling),h._next=h.nextSibling&&h.nextSibling._isFirst?null:h.nextSibling,h.parentNode.removeChild(h),c.splice(a--,1),l--):f||(v=!h.nextSibling&&bu(h.parentNode,t,S),h.parentNode._parent&&h.parentNode._parent.appendChild(h),v&&h.parentNode.appendChild(cu.createTextNode(" ")),"span"===O&&(h.style.display="inline"),M.push(h));else h.parentNode._isSplit&&!h._isSplit&&""!==h.innerHTML?A.push(h):N&&!h._isSplit&&("span"===O&&(h.style.display="inline"),M.push(h));else B||R?(h.parentNode&&h.parentNode.removeChild(h),c.splice(a--,1),l--):L||t.appendChild(h);for(a=I.length;--a>-1;)I[a].parentNode.removeChild(I[a]);if(B){for(R&&(D=cu.createElement(O),t.appendChild(D),m=D.offsetWidth+"px",v=D.offsetParent===t?0:t.offsetLeft,t.removeChild(D)),g=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(d=" "===S&&(!R||!L&&!N),a=0;a<B.length;a++){for(p=B[a],(D=cu.createElement(O)).style.cssText="display:block;text-align:"+T+";position:"+(R?"absolute;":"relative;"),X&&(D.className=X+(Y?a+1:"")),P.push(D),l=p.length,u=0;u<l;u++)"BR"!==p[u].nodeName&&(h=p[u],D.appendChild(h),d&&h._wordEnd&&D.appendChild(cu.createTextNode(" ")),R&&(0===u&&(D.style.top=h._y+"px",D.style.left=y+v+"px"),h.style.top="0px",v&&(h.style.left=h._x-v+"px")));0===l?D.innerHTML="&nbsp;":L||N||(Tu(D),Fu(D,String.fromCharCode(160)," ")),R&&(D.style.width=m,D.style.height=h._h+"px"),t.appendChild(D)}t.style.cssText=g}R&&(s>t.clientHeight&&(t.style.height=s-F+"px",t.clientHeight<s&&(t.style.height=s+w+"px")),o>t.clientWidth&&(t.style.width=o-E+"px",t.clientWidth<o&&(t.style.width=o+C+"px"))),z&&(H?t.style.display=H:t.style.removeProperty("display")),Eu(n,M),L&&Eu(r,A),Eu(i,P)},Pu=function(t,e,n,r){var i,o,s,a,u,l,h,c,f=e.tag?e.tag:e.span?"span":"div",p=~(e.type||e.split||"chars,words,lines").indexOf("chars"),d=xu(e),g=e.wordDelimiter||" ",D=" "!==g?"":d?"&#173; ":" ",m="</"+f+">",v=1,_=e.specialChars?"function"==typeof e.specialChars?e.specialChars:wu:null,y=cu.createElement("div"),x=t.parentNode;for(x.insertBefore(y,t),y.textContent=t.nodeValue,x.removeChild(t),h=-1!==(i=function t(e){var n=e.nodeType,r="";if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=t(e)}else if(3===n||4===n)return e.nodeValue;return r}(t=y)).indexOf("<"),!1!==e.reduceWhiteSpace&&(i=i.replace(Du," ").replace(gu,"")),h&&(i=i.split("<").join("{{LT}}")),u=i.length,o=(" "===i.charAt(0)?D:"")+n(),s=0;s<u;s++)if(l=i.charAt(s),_&&(c=_(i.substr(s),e.specialChars)))l=i.substr(s,c||1),o+=p&&" "!==l?r()+l+"</"+f+">":l,s+=c-1;else if(l===g&&i.charAt(s-1)!==g&&s){for(o+=v?m:"",v=0;i.charAt(s+1)===g;)o+=D,s++;s===u-1?o+=D:")"!==i.charAt(s+1)&&(o+=D+n(),v=1)}else"{"===l&&"{{LT}}"===i.substr(s,6)?(o+=p?r()+"{{LT}}</"+f+">":"{{LT}}",s+=5):l.charCodeAt(0)>=55296&&l.charCodeAt(0)<=56319||i.charCodeAt(s+1)>=65024&&i.charCodeAt(s+1)<=65039?(a=((i.substr(s,12).split(hu)||[])[1]||"").length||2,o+=p&&" "!==l?r()+i.substr(s,a)+"</"+f+">":i.substr(s,a),s+=a-1):o+=p&&" "!==l?r()+l+"</"+f+">":l;t.outerHTML=o+(v?m:""),h&&Fu(x,"{{LT}}","<")},Su=function t(e,n,r,i){var o,s,a=yu(e.childNodes),u=a.length,l=xu(n);if(3!==e.nodeType||u>1){for(n.absolute=!1,o=0;o<u;o++)(s=a[o])._next=s._isFirst=s._parent=s._wordEnd=null,(3!==s.nodeType||/\S+/.test(s.nodeValue))&&(l&&3!==s.nodeType&&"inline"===mu(s).display&&(s.style.display="inline-block",s.style.position="relative"),s._isSplit=!0,t(s,n,r,i));return n.absolute=l,void(e._isSplit=!0)}Pu(e,n,r,i)},Ou=function(){function t(t,e){pu||(cu=document,fu=window,pu=1),this.elements=yu(t),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=e||{},this.split(e)}var e=t.prototype;return e.split=function(t){this.isSplit&&this.revert(),this.vars=t=t||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var e,n,r,i=this.elements.length,o=t.tag?t.tag:t.span?"span":"div",s=Cu(t.wordsClass,o),a=Cu(t.charsClass,o);--i>-1;)r=this.elements[i],this._originals[i]=r.innerHTML,e=r.clientHeight,n=r.clientWidth,Su(r,t,s,a),Au(r,t,this.chars,this.words,this.lines,n,e);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},e.revert=function(){var t=this._originals;if(!t)throw"revert() call wasn't scoped properly.";return this.elements.forEach((function(e,n){return e.innerHTML=t[n]})),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},t.create=function(e,n){return new t(e,n)},t}();Ou.version="3.9.1",vr.registerPlugin(Xe,_r,Me,Me,Fr,vi,Mi,Ki,Bo,Zo,dr,Da,lu);var ku=du=window.punchgs=window.tpGS={};for(var Bu in ku.gsap=vr,ku.TweenLite=Xe,ku.TweenMax=_r,ku.TimelineLite=Me,ku.TimelineMax=Me,ku.CustomBounce=Fr,ku.CustomEase=vi,ku.CustomWiggle=Mi,ku.DrawSVGPlugin=Ki,ku.MotionPathPlugin=Bo,ku.ScrollToPlugin=Zo,ku.CSSPlugin=dr,ku.draggable=Da,ku.inertia=lu,
/*! Map SplitText to tpGS TPGSSPLITTEXT */
ku.SplitText=Ou,ku.RAD2DEG=180/Math.PI,ku.DEG2RAD=Math.PI/180,
/*! REGISTER MOTION PATH (BEZIER) */
ku.gsap.registerPlugin(ku.MotionPathPlugin),ku.gsap.config({nullTargetWarn:!1}),
/*!FallBack for old and new Eases*/
ku.eases=ku.gsap.parseEase(),ku.eases)ku.eases.hasOwnProperty(Bu)&&void 0===ku[Bu]&&(ku[Bu]=ku.eases[Bu])
/*! FallBack for Essential Grid */;void 0!==du&&void 0!==du.TweenLite&&void 0===du.TweenLite.lagSmoothing&&(du.TweenLite.lagSmoothing=function(){});var Lu=[];function Nu(t,e,n){var r=document.createElement("canvas"),i=r.getContext("2d");if(r.width=100,r.height=200,0===t.length)i.fillStyle=n;else{for(var o=i.createLinearGradient(0,0,100,0),s=0;s<t.length;s++)o.addColorStop(t[s].stop/100,t[s].color);i.fillStyle=o}i.fillRect(0,0,100,200);var a=i.getImageData(0,0,100,2).data,u="";for(s=0;s<e.length;s++){var l=Math.ceil(e[s]),h=4*(0!==l?l-1:l);u+="rgba("+a[h]+","+a[h+1]+","+a[h+2]+","+a[h+3]/255+")",u+=" "+l+(e.length-1===s?"%":"%,")}return r.remove(),u}function Ru(t,e,n,r){for(var i="",o=ku.gsap.utils.mapRange(0,r.length-1,0,t.length-1),s=0;s<r.length;s++){var a=Math.round(o(s));i+=t[a].color,i+=" "+t[a].stop+(r.length-1===s?"%":"%,")}return i}function Xu(t){var e=/rgb([\s\S]*?)%/g,n=[],r=[],i=[];do{(s=e.exec(t))&&n.push(s[0])}while(s);for(var o=0;o<n.length;o++){var s=n[o],a=(t=/rgb([\s\S]*?)\)/.exec(s),/\)([\s\S]*?)%/.exec(s));t[0]&&(t=t[0]),a[1]&&(a=a[1]),i.push(parseFloat(a)),r.push({color:t,stop:parseFloat(a)})}return 0===r.length&&(r.push({color:t,stop:0}),i.push(0),r.push({color:t,stop:100}),i.push(100)),{points:r,stops:i}}ku.getSSGColors=function(t,e,n){if(n=void 0===n?"fading":n,-1===t.indexOf("gradient")&&-1===e.indexOf("gradient"))return{from:t,to:e};for(var r={from:t,to:e},i=0;i<Lu.length;i++){if(Lu[i].from===t&&Lu[i].to===e&&Lu[i].type===n)return{from:Lu[i].rFrom,to:Lu[i].rTo};if(Lu[i].from===e&&Lu[i].to===t&&Lu[i].type===n)return{from:Lu[i].rTo,to:Lu[i].rFrom}}var o=Xu(t),s=Xu(e);if(o.stops.length===s.stops.length&&-1!==t.indexOf("gradient")&&-1!==e.indexOf("gradient"))return{from:t,to:e};var a,u,l=o.stops;for(i=0;i<s.stops.length;i++)-1===l.indexOf(s.stops[i])&&l.push(s.stops[i]);if(l.sort((function(t,e){return t-e})),-1!==t.indexOf("gradient(")){var h=-1!==t.indexOf("deg,")?t.indexOf("deg,")+4:-1!==t.indexOf("at center,")?t.indexOf("at center,")+10:t.indexOf("gradient(")+9;a=t.substring(0,h),-1===e.indexOf("gradient(")&&(u=t.substring(0,h))}if(-1!==e.indexOf("gradient(")){h=-1!==e.indexOf("deg,")?e.indexOf("deg,")+4:-1!==e.indexOf("at center,")?e.indexOf("at center,")+10:e.indexOf("gradient(")+9;u=e.substring(0,h),-1===t.indexOf("gradient(")&&(a=e.substring(0,h))}return"fading"===n?(o.stops.length,s.stops.length,a+=Nu(o.points,l,t),u+=Nu(s.points,l,e)):"sliding"===n&&(o.stops.length>s.stops.length?u+=Ru(s.points,l,e,o.points):a+=Ru(o.points,l,t,s.points)),a+=")",u+=")","sliding"===n&&(o.stops.length>s.stops.length?a=t:u=e),r.rFrom=a,r.rTo=u,r.tyep=n,Lu.push(r),{from:a,to:u}}}]);
window.RS_MODULES = window.RS_MODULES || {};
window.RS_MODULES.tpGS = {loaded:true, version:"6.6.1"};
if (window.RS_MODULES.checkMinimal) window.RS_MODULES.checkMinimal();
// source --> https://oldsite.uoi.gr/wp-content/plugins/revslider/public/assets/js/rs6.min.js?ver=6.6.20 
!function(T,C){"use strict";function A(){T("body").data("rs-fullScreenMode",!T("body").data("rs-fullScreenMode")),T("body").data("rs-fullScreenMode")&&setTimeout(function(){D.window.trigger("resize")},200)}function P(e,t){return T(0==t?e:(1==t?e:(2==t?e:(3==t?e:(4==t?e:e.parentNode).parentNode).parentNode).parentNode).parentNode)}function r(e,t,i){if(D[t]!==C){D[t].syncload--;var a,r=D.gA(e,"reference");for(a in D[t].loadqueue)D[t].loadqueue.hasOwnProperty(a)&&"loaded"!==D[t].loadqueue[a].progress&&r==D[t].loadqueue[a].src&&(D[t].loadqueue[a].img=e,D[t].loadqueue[a].progress=i,D[t].loadqueue[a].width=e.naturalWidth,D[t].loadqueue[a].height=e.naturalHeight);m(t)}}function t(e){function t(){e!==C&&D!==C&&D[e]!==C&&(0==T("body").find(D[e].c).length||null===D[e]||null===D[e].c||D[e].c===C||0===D[e].length?(E(e),clearInterval(D[e].cdint)):(D[e].c.trigger("revolution.slide.slideatend"),1==D[e].c.data("conthoverchanged")&&(D[e].conthover=D[e].c.data("conthover"),D[e].c.data("conthoverchanged",0)),D.callingNewSlide(e,1,!0)))}var i=tpGS.gsap.timeline({paused:!0}),a="reset"===D[e].progressBar.reset||D[e].progressBar.notnew===C?0:.2,r=(r="slide"===D[e].progressBar.basedon?0:D[e].pr_processing_key!==C?D[e].pr_processing_key:D[e].pr_active_key)===C?0:r;if("horizontal"===D[e].progressBar.style){if(i.add(tpGS.gsap.to(D[e].progressCBarInner[r],a,{scaleX:0,transformOrigin:"right"===D[e].progressBar.horizontal?"100% 50%":"0% 50%"})),i.add(tpGS.gsap.to(D[e].progressCBarInner[r],D[e].duration/1e3,{transformOrigin:"right"===D[e].progressBar.horizontal?"100% 50%":"0% 50%",force3D:"auto",scaleX:1,onComplete:t,delay:.5,ease:D[e].progressBar.ease})),"module"===D[e].progressBar.basedon)for(var o=0;o<D[e].slideamount;o++)o!==r&&i.add(tpGS.gsap.set(D[e].progressCBarInner[o],{scaleX:o<r?1:0,transformOrigin:"right"===D[e].progressBar.horizontal?"100% 50%":"0% 50%"}),0)}else if("vertical"===D[e].progressBar.style){if(D[e].progressCBarInner[r]!==C&&i.add(tpGS.gsap.to(D[e].progressCBarInner[r],a,{scaleY:0,transformOrigin:"bottom"===D[e].progressBar.vertical?"50% 100%":"50% 0%"})),D[e].progressCBarInner[r]!==C&&i.add(tpGS.gsap.to(D[e].progressCBarInner[r],D[e].duration/1e3,{transformOrigin:"bottom"===D[e].progressBar.vertical?"50% 100%":"50% 0%",force3D:"auto",scaleY:1,onComplete:t,delay:.5,ease:D[e].progressBar.ease})),"module"===D[e].progressBar.basedon)for(o=0;o<D[e].slideamount;o++)o!==r&&D[e].progressCBarInner[o]!==C&&i.add(tpGS.gsap.set(D[e].progressCBarInner[o],{scaleY:o<r?1:0,transformOrigin:"botton"===D[e].progressBar.vertical?"50% 100%":"50% 0%"}),0)}else{var s="slide"===D[e].progressBar.basedon?0:Math.max(0,360/D[e].slideamount*r),n="slide"===D[e].progressBar.basedon?360:360/D[e].slideamount*(r+1);"ccw"===D[e].progressBar.style&&"slide"!==D[e].progressBar.basedon&&(s=360-n,n=360-360/D[e].slideamount*r),i.add(tpGS.gsap.to(D[e].progressBar,a,{degree:"cw"===D[e].progressBar.style?s:n,onUpdate:function(){S(e)}})),i.add(tpGS.gsap.to(D[e].progressBar,D[e].duration/1e3,{degree:"cw"===D[e].progressBar.style?n:s,onUpdate:function(){S(e)},onComplete:t,delay:.5,ease:D[e].progressBar.ease}))}return D[e].progressBar.notnew=!0,i}function i(){T(".rev_redraw_on_blurfocus").each(function(){var e=this.id;if(D[e]==C||D[e].c==C||0===D[e].c.length)return!1;1!=D[e].windowfocused&&(D[e].windowfocused=!0,tpGS.gsap.delayedCall(.1,function(){D[e].fallbacks.nextSlideOnWindowFocus&&D[e].c.revnext(),D[e].c.revredraw(),"playing"==D[e].lastsliderstatus&&D[e].c.revresume(),D[e].c.trigger("revolution.slide.tabfocused")}))})}function a(){document.hasFocus()||T(".rev_redraw_on_blurfocus").each(function(e){var t=this.id;D[t].windowfocused=!1,D[t].lastsliderstatus=D[t].sliderstatus,D[t].c.revpause(),D[t].c.trigger("revolution.slide.tabblured")})}var e,o="Slider Revolution 6.6.19",D=(window.RSANYID=window.RSANYID===C?[]:window.RSANYID,window.RSANYID_sliderID=window.RSANYID_sliderID===C?[]:window.RSANYID_sliderID,T.fn.revolution=T.fn.revolution||{},T.fn.revolution),D=(T.fn.revolutionInit=function(a){return this.each(function(){D.ISM=D.ISM||D.is_mobile();for(var e=document.getElementsByClassName("rs-p-wp-fix");e[0];)e[0].parentNode.removeChild(e[0]);this.id!==C?(D[t]={anyid:[]},this.id=D.revCheckIDS(t,this,!0)):this.id="rs_module_"+Math.round(1e7*Math.random());var t=this.id,i=D.clone(a);D[t]=U(a),D[t].ignoreHeightChange=D.ISM&&"fullscreen"===D[t].sliderLayout&&D[t].ignoreHeightChange,D[t].option_export=i,D[t].anyid=[],D[t]._Lshortcuts={},D[t].computedStyle={},D[t].c=T(this),D[t].cpar=D[t].c.parent(),D[t].canvas=D[t].c.find("rs-slides"),D[t].caches={calcResponsiveLayersList:[],contWidthManager:{},middleHeights:{}},D[t].sbgs={},window.RSBrowser=window.RSBrowser===C?D.get_browser():window.RSBrowser,D.setIsIOS(),D.setIsChrome8889(),D.useBackdrop===C&&D.checkBackdrop(),D[t].noDetach=D[t].BUG_ie_clipPath="Edge"===window.RSBrowser||"IE"===window.RSBrowser,D.getByTag=s(),D[t].indexhelper=0,D[t].fullScreenOffsetResult=0,D[t].level=0,D[t].rtl=T("body").hasClass("rtl")||"rtl"==document.dir,D[t]._L=D[t]._L===C?{}:D[t]._L,D[t].emptyObject="{}",D[t].dimensionReCheck={},D.globalListener===C&&D.pageHandler(t),D[t].stopAfterLoops!=C&&-1<D[t].stopAfterLoops?D[t].looptogo=D[t].stopAfterLoops:D[t].looptogo="disabled",window.T=D[t],D[t].BUG_safari_clipPath="Safari"===D.get_browser()&&"12"<D.get_browser_version(),D[t].minHeight="fullwidth"!==D[t].sliderLayout&&"carousel"!==D[t].sliderType&&D[t].minHeight!=C&&""!==D[t].minHeight?parseInt(D[t].minHeight,0):0,D[t].minHeight=D[t].minHeight===C?0:D[t].minHeight,D[t].isEdge="Edge"===D.get_browser(),n(t),D.updateVisibleArea(t),V(t),D.mesuredScrollBarDone||D.mesureScrollBar(),window.requestAnimationFrame(function(){var e;"fullscreen"===D[t].sliderLayout&&0!==(e=D.getFullscreenOffsets(t))&&D[t].cpar.height(D.getWinH(t)-e),D[t].cpar[0].style.visibility="visible"}),"hero"==D[t].sliderType&&D[t].c.find("rs-slide").each(function(e){0<e&&T(this).remove()}),D[t].navigation.use="hero"!==D[t].sliderType&&("carousel"==D[t].sliderType||D[t].navigation.keyboardNavigation||"on"==D[t].navigation.mouseScrollNavigation||"carousel"==D[t].navigation.mouseScrollNavigation||D[t].navigation.touch.touchenabled||D[t].navigation.arrows.enable||D[t].navigation.bullets.enable||D[t].navigation.thumbnails.enable||D[t].navigation.tabs.enable),D[t].c.find("rs-bgvideo").each(function(){"RS-BGVIDEO"!==this.tagName||this.id!==C&&""!==this.id||(this.id="rs-bg-video-"+Math.round(1e6*Math.random()))}),tpGS.force3D="auto",!0===D[t].modal.useAsModal&&-1===D.RS_prioList.indexOf(t)&&(D.RS_toInit[t]=!1,D.RS_prioList.push(t)),D.RS_killedlist!==C&&-1!==D.RS_killedlist.indexOf(t)&&(D.RS_toInit[t]=!1,D.RS_prioList.push(t)),!0===D.RS_prioListFirstInit&&!0!==D[t].modal.useAsModal&&-1===D.RS_prioList.indexOf(t)&&(D.RS_toInit[t]=!1,D.RS_prioList.push(t)),D.initNextRevslider(t)})},window.RS_F),s=(T.fn.extend({getRSJASONOptions:function(e){console.log(JSON.stringify(D[e].option_export))},getRSVersion:function(e){var t,i,a=window.SliderRevolutionVersion;if(!e){for(var r in t=i="---------------------------------------------------------\n",t+="    Currently Loaded Slider Revolution & SR Modules :\n"+i,a)a.hasOwnProperty(r)&&(t+=a[r].alias+": "+a[r].ver+"\n");t+=i}return e?a:t},revremoveslide:function(i){return this.each(function(){var e,t=this.id;i<0||i>D[t].slideamount||D[t]&&0<D[t].slides.length&&(0<i||i<=D[t].slides.length)&&(e=D.gA(D[t].slides[i],"key"),D[t].slideamount=D[t].slideamount-1,D[t].realslideamount=D[t].realslideamount-1,l("rs-bullet",e,t),l("rs-tab",e,t),l("rs-thumb",e,t),T(D[t].slides[i]).remove(),D[t].thumbs=I(D[t].thumbs,i),D.updateNavIndexes&&D.updateNavIndexes(t),i<=D[t].pr_active_key)&&(D[t].pr_active_key=D[t].pr_active_key-1)})},revaddcallback:function(e){return this.each(function(){D[this.id]&&(D[this.id].callBackArray===C&&(D[this.id].callBackArray=[]),D[this.id].callBackArray.push(e))})},revgetparallaxproc:function(){if(D[this[0].id])return D[this[0].id].scrollproc},revdebugmode:function(){},revscroll:function(t){return this.each(function(){var e=T(this);T("body,html").animate({scrollTop:e.offset().top+e.height()-t+"px"},{duration:400})})},revredraw:function(){return this.each(function(){G(this.id,C,!0)})},revGoToFrame:function(e){var t;e.layerid!=C&&e.frame!=C&&this!=C&&null!=this&&(e.moduleid=this[0].id,e.targetlayer=T("#"+e.layerid),e.targetlayer!=C)&&0!=e.targetlayer.length&&(t={layer:e.targetlayer,frame:e.frame,mode:"trigger",id:e.moduleid},!0===e.children&&(t.updateChildren=!0,t.fastforward=!0),D.renderLayerAnimation)&&D.renderLayerAnimation(t)},revkill:function(){return this.each(function(){if(this!=C&&null!=this){var e=this.id,t=(D[e].c.data("conthover",1),D[e].c.data("conthoverchanged",1),D[e].c.trigger("revolution.slide.onpause"),D[e].tonpause=!0,D[e].c.trigger("stoptimer"),D[e].sliderisrunning=!1,"updateContainerSizes."+D[e].c.attr("id"));D.window.off(t),tpGS.gsap.killTweensOf(D[e].c.find("*"),!1),tpGS.gsap.killTweensOf(D[e].c,!1),D[e].c.off("hover, mouseover, mouseenter,mouseleave, resize"),D[e].c.find("*").each(function(){var e=T(this);e.off("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),e.data("mySplitText",null),e.data("ctl",null),e.data("tween")!=C&&e.data("tween").kill(),e.data("pztl")!=C&&e.data("pztl").kill(),e.data("timeline_out")!=C&&e.data("timeline_out").kill(),e.data("timeline")!=C&&e.data("timeline").kill(),e.remove(),e.empty()}),tpGS.gsap.killTweensOf(D[e].c.find("*"),!1),tpGS.gsap.killTweensOf(D[e].c,!1),D[e].progressC.remove();try{D[e].c.closest(".rev_slider_wrapper").detach()}catch(e){}try{D[e].c.closest("rs-fullwidth-wrap").remove()}catch(e){}try{D[e].c.closest("rs-module-wrap").remove()}catch(e){}try{D[e].c.remove()}catch(e){}D[e].cpar.detach(),D[e].c.html(""),D[e].c=null,window[D[e].revapi]=C,delete D[e],delete D.RS_swapList[e],delete D.slidersToScroll[e],delete D.RS_toInit[e],D.nextSlider==e&&delete D.nextSlider,D.RS_prioList.splice(D.RS_prioList.indexOf(e),1),D.RS_killedlist=D.RS_killedlist===C?[]:D.RS_killedlist,-1===D.RS_killedlist.indexOf(e)&&D.RS_killedlist.push(e)}})},revpause:function(){return this.each(function(){var e=T(this);e!=C&&0<e.length&&0<T("body").find("#"+e.attr("id")).length&&(e.data("conthover",1),e.data("conthoverchanged",1),e.trigger("revolution.slide.onpause"),D[this.id].tonpause=!0,e.trigger("stoptimer"))})},revresume:function(){return this.each(function(){var e;D[this.id]!==C&&((e=T(this)).data("conthover",0),e.data("conthoverchanged",1),e.trigger("revolution.slide.onresume"),D[this.id].tonpause=!1,e.trigger("starttimer"))})},revmodal:function(e){var t=this instanceof T?this[0]:this,i=t.id;D[t.id]!==C&&D.revModal(i,e)},revstart:function(){var e=this instanceof T?this[0]:this;return D[e.id]===C?(console.log("Slider is Not Existing"),!1):D[e.id].sliderisrunning||!0===D[e.id].initEnded?(console.log("Slider Is Running Already"),!1):(D[e.id].c=T(e),D[e.id].canvas=D[e.id].c.find("rs-slides"),g(e.id),!0)},revnext:function(){return this.each(function(){D[this.id]!==C&&D.callingNewSlide(this.id,1,"carousel"===D[this.id].sliderType)})},revprev:function(){return this.each(function(){D[this.id]!==C&&D.callingNewSlide(this.id,-1,"carousel"===D[this.id].sliderType)})},revmaxslide:function(){return T(this).find("rs-slide").length},revcurrentslide:function(){if(D[T(this)[0].id]!==C)return parseInt(D[T(this)[0].id].pr_active_key,0)+1},revlastslide:function(){return T(this).find("rs-slide").length},revshowslide:function(e){return this.each(function(){D[this.id]!==C&&e!==C&&D.callingNewSlide(this.id,"to"+(e-1))})},revcallslidewithid:function(e){return this.each(function(){D[this.id]!==C&&D.callingNewSlide(this.id,e,"carousel"===D[this.id].sliderType)})}}),D=T.fn.revolution,T.extend(!0,D,{isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},trim:function(e){return e!==C&&null!==e&&"string"==typeof e?e.trim():e},setCookie:function(e,t,i){var a=new Date,i=(a.setTime(a.getTime()+60*i*60*1e3),"expires="+a.toUTCString());document.cookie=e+"="+t+";"+i+";path=/"},getCookie:function(e){for(var t=e+"=",i=document.cookie.split(";"),a=0;a<i.length;a++){for(var r=i[a];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}return""},mesureScrollBar:function(){D.mesuredScrollBarDone=!0,requestAnimationFrame(function(){var e=document.createElement("div");e.className="RSscrollbar-measure",document.body.appendChild(e),D.mesuredScrollbarWidth=e.offsetWidth-e.clientWidth,document.body.removeChild(e)})},mobileTimedHeightCheck:function(){requestAnimationFrame(function(){D.mobileTimedHeightCheck()}),D.mobileHeights.now=Date.now(),D.mobileHeights.elapsed=D.mobileHeights.now-D.mobileHeights.then,D.mobileHeights.elapsed>D.mobileHeights.fpsInterval&&(D.mobileHeights.then=D.mobileHeights.now-D.mobileHeights.elapsed%D.mobileHeights.fpsInterval,D.getWindowDimension())},pageHandler:function(e){D.globalListener=!0,D.window=T(window),D.document=T(document),D.RS_toInit={},D.RS_prioList=[],D.RS_swapping=[],D.RS_swapList={},window.isSafari11===C&&(window.isSafari11=D.isSafari11(),document.body.classList.add("rs-safari")),D.ISM?(window.addEventListener("orientationchange",function(){D.getWindowDimension(!1,!0),setTimeout(function(){D.getWindowDimension(!0,!0)},400)}),window.addEventListener("resize",D.getWindowDimension),tpGS.gsap.delayedCall(3,function(){window.removeEventListener("resize",D.getWindowDimension)}),D.mobileHeights={fpsInterval:500,then:Date.now()},D[e].ignoreHeightChange||D.mobileHeights.checking||(D.mobileHeights.checking=!0,D.mobileTimedHeightCheck())):window.addEventListener("resize",D.getWindowDimension),D.getWindowDimension(!1),D.stickySupported=!1,"IE"!==window.RSBrowser&&(D.stickySupported=!0),D.checkParrentOverflows(e);var t,i=D.getByTag(document,"RS-MODULE");for(t in i)i.hasOwnProperty(t)&&(D.RS_toInit[i[t].id]=!1,D.RS_prioList.push(i[t].id));D.nextSlider=e,D.RS_prioListFirstInit=!0,D.document.one("click",function(){D.clickedOnce=!0}),document.addEventListener("visibilitychange",N),D.hasNavClickListener===C&&(D.document.on(D.is_mobile()?"touchstart":"mouseenter",".tparrows, .tp-bullets, .tp-bullet, .tp-tab, .tp-thumb, .tp-thumbs, .tp-tabs, .tp-rightarrow, .tp-leftarrow",function(e){this.classList.add("rs-touchhover")}),D.document.on(D.is_mobile()?"touchend":"mouseleave",".tparrows, .tp-bullets, .tp-bullet, .tp-tab, .tp-thumb, .tp-tabs,  .tp-rightarrow, .tp-leftarrow",function(e){var t=this;requestAnimationFrame(function(){t.classList.remove("rs-touchhover")})}),D.hasNavClickListener=!0)},destroyCanvas:function(e){e&&(e.width=e.height=0,e.remove())},checkParrentOverflows:function(i){window.requestAnimationFrame(function(){for(var e,t=D[i].cpar[0];t.parentNode&&!1!==D.stickySupported;)"RS-MODULE-WRAP"!==t.tagName&&"RS-FULLWIDTH-WRAP"!==t.tagName&&"RS-MODULE-WRAP"!==t.tagName&&-1===t.className.indexOf("wp-block-themepunch-revslider")&&(e=window.getComputedStyle(t),D.stickySupported="hidden"!==e.overflow&&"hidden"!==e.overflowX&&"hidden"!==e.overflowY),t=t.parentNode})},observeRemoved:function(t){new MutationObserver(function(e){try{document.body.contains(e[0].target)||D[t].c.revkill()}catch(e){}}).observe(D[t].cpar[0],{childList:!0})},initNextRevslider:function(e){D.RS_prioList[0]===e&&!1===D.RS_toInit[e]?(D.RS_toInit[e]="waiting",p(e),setTimeout(function(){D.initNextRevslider(e)},19)):D.RS_prioList[0]===e&&"waiting"===D.RS_toInit[e]?setTimeout(function(){D.initNextRevslider(e)},19):D.RS_prioList[0]===e&&!0===D.RS_toInit[e]?(D.RS_prioList.shift(),0!==D.RS_prioList.length&&setTimeout(function(){D.initNextRevslider(e)},19)):D.RS_prioList[0]!==e&&!1===D.RS_toInit[e]?setTimeout(function(){D.initNextRevslider(e)},19):0===D.RS_prioList.length&&!0===D.RS_toInit[e]&&p(e)},scrollTicker:function(e){1!=D.scrollTickerAdded&&(D.slidersToScroll=[],D.scrollTickerAdded=!0,D.ISM?(tpGS.gsap.ticker.fps(150),tpGS.gsap.ticker.add(function(){D.generalObserver()})):document.addEventListener("scroll",function(e){D.scrollRaF===C&&(D.scrollRaF=requestAnimationFrame(D.generalObserver.bind(this,!0)))},{passive:!0})),D.slidersToScroll.push(e),D.generalObserver(D.ISM)},generalObserver:function(e,t){for(var i in D.scrollRaF&&(D.scrollRaF=cancelAnimationFrame(D.scrollRaF)),D.lastwindowheight=D.lastwindowheight||D.winH,D.scrollY=window.scrollY,D.slidersToScroll)D.slidersToScroll.hasOwnProperty(i)&&D.scrollHandling(D.slidersToScroll[i],e,C,t)},wrapObserver:{targets:[],init:function(a){var r=0,o=0,s=e.bind(D.wrapObserver);function e(){if(o++,requestAnimationFrame(s),!(o-r<30)){r=o;for(var e,t,i=0;i<D.wrapObserver.targets.length;i++)D.wrapObserver.targets.hasOwnProperty(i)&&(t=(e=D.wrapObserver.targets[i]).elem.getBoundingClientRect(),e.lw===t.width&&e.lh===t.height||0===t.width||(e.callback&&(e.callback.pause(),e.callback.kill(),e.callback=null),e.callback=tpGS.gsap.to({},{duration:.2,onComplete:a.bind(window,e.elem,e.id)})),e.lw=t.width,e.lh=t.height)}}e()},observe:function(e,t){var i;""!==(e=e.getBoundingClientRect?e:e[0].getBoundingClientRect?e[0]:"")&&(i=e.getBoundingClientRect(),D.wrapObserver.targets.push({elem:e,id:t,lw:i.width,lh:i.height}))}},enterViewPort:function(i,e){!0!==D[i].started?(D[i].started=!0,D.lazyLoadAllSlides(i),D[i].c.trigger("revolution.slide.firstrun"),setTimeout(function(){y(i),"hero"!==D[i].sliderType&&D.manageNavigation&&D[i].navigation.use&&!0===D[i].navigation.createNavigationDone&&D.manageNavigation(i),1<D[i].slideamount&&x(i),setTimeout(function(){D[i]!==C&&(D[i].revolutionSlideOnLoaded=!0,D[i].c.trigger("revolution.slide.onloaded"),D.calcScrollToId())},50)},D[i].startDelay),D[i].startDelay=0,window.requestAnimationFrame(function(){u(i)})):(D[i].waitForCountDown&&(x(i),D[i].waitForCountDown=!1),"playing"!=D[i].sliderlaststatus&&D[i].sliderlaststatus!=C||D[i].c.trigger("starttimer"),D[i].lastplayedvideos!=C&&0<D[i].lastplayedvideos.length&&T.each(D[i].lastplayedvideos,function(e,t){D.playVideo(t,i)}))},leaveViewPort:function(i){D[i].sliderlaststatus=D[i].sliderstatus,D[i].c.trigger("stoptimer"),D[i].playingvideos!=C&&0<D[i].playingvideos.length&&(D[i].lastplayedvideos=T.extend(!0,[],D[i].playingvideos),D[i].playingvideos)&&T.each(D[i].playingvideos,function(e,t){D[i].leaveViewPortBasedStop=!0,D.stopVideo&&D.stopVideo(t,i)})},scrollHandling:function(e,t,i,a){var r,o;D[e]!==C&&(r=(D[e].topc!==C?D[e].topc:0===D[e].canv.height?D[e].cpar:D[e].c)[0].getBoundingClientRect(),o=D.ISM?window.innerHeight:D.lastwindowheight,r.hheight=(0===r.height?0===D[e].canv.height?D[e].module:D[e].canv:r).height,D[e].scrollproc=r.top<0||r.hheight>o&&r.top<o?r.top/r.hheight:r.bottom>o?(r.bottom-o)/r.hheight:0,o=Math.max(0,1-Math.abs(D[e].scrollproc)),D[e].viewPort.enable&&("%"===D[e].viewPort.vaType[D[e].level]&&(D[e].viewPort.visible_area[D[e].level]<=o||0<o&&o<=1&&D[e].sbtimeline.fixed)||"px"===D[e].viewPort.vaType[D[e].level]&&(r.top<=0&&r.bottom>=D.lastwindowheight||0<=r.top&&r.bottom<=D.lastwindowheight||0<=r.top&&r.top<D.lastwindowheight-D[e].viewPort.visible_area[D[e].level]||r.bottom>=D[e].viewPort.visible_area[D[e].level]&&r.bottom<D.lastwindowheight)?D[e].inviewport||(D[e].inviewport=!0,D.enterViewPort(e,!0),D[e].c.trigger("enterviewport")):D[e].inviewport&&(D[e].inviewport=!1,D.leaveViewPort(e),D[e].c.trigger("leftviewport"))),D[e].inviewport?(D.callBackHandling&&D.callBackHandling(e,"parallax","start"),requestAnimationFrame(function(){"fullscreen"===D[e].sliderLayout&&D.getFullscreenOffsets(e)}),D.parallaxProcesses(e,r,a,i),D.callBackHandling&&D.callBackHandling(e,"parallax","end")):!0!==D.stickySupported&&!1!==D[e].fixedScrollOnState&&(D[e].topc.removeClass("rs-fixedscrollon"),tpGS.gsap.set(D[e].cpar,{top:0,y:0}),D[e].fixedScrollOnState=!1))},clone:function(e,t){return t===C&&e===C?{}:function e(t,i){var a,r=Array.isArray(t)?[]:{};for(a in t)t.hasOwnProperty(a)&&(t[a]!==C&&"object"==typeof t[a]&&i?r[a]=e(t[a],!0):t[a]!==C&&(r[a]=t[a]));return r}(e,t)},closest:function(e,t){return e&&(t(e)?e:D.closest(e.parentNode,t))},closestNode:function(e,t){return D.closest(e,function(e){return e.nodeName===t})},closestClass:function(e,t){return D.closest(e,function(e){return 0<=(" "+e.className+" ").indexOf(" "+t+" ")})},getWinH:function(e){return D[e].ignoreHeightChange?D.mobileWinH:D.winH},getWindowDimension:function(e,t){!1===e?(D.rAfScrollbar="skip",D.winWAll=D.ISM&&window.visualViewport?document.documentElement.clientWidth:window.innerWidth,D.winWSbar=document.documentElement.clientWidth,D.ISM?(D.zoom=t?1:D.winWSbar/D.winWAll,D.winW=1!==D.zoom?D.winWSbar*D.zoom:Math.min(D.winWAll,D.winWSbar),D.winH=1!==D.zoom?window.innerHeight*D.zoom:window.innerHeight,t&&window.visualViewport&&(D.winH*=window.visualViewport.scale,D.winWAll*=window.visualViewport.scale),D.scrollBarWidth=0):(D.isModalOpen&&D.openModalId!==C&&D[D.openModalId]!==C&&D[D.openModalId].canv.height>D.winH?D.scrollBarWidth=D.mesuredScrollbarWidth:D.scrollBarWidth=D.winWAll-D.winWSbar,D.winW=Math.min(D.winWAll,D.winWSbar),D.winH=window.innerHeight),D.ISM&&125<D.winH&&(D.lastwindowheight!==C&&Math.abs(D.lastwindowheight-D.winH)<125?D.mobileWinH=D.lastwindowheight:D.mobileWinH=D.winH)):clearTimeout(D.windowDimenstionDelay),D.windowDimenstionDelay=setTimeout(function(){D.rAfScrollbar=C,D.winWAll=D.ISM&&window.visualViewport?document.documentElement.clientWidth:window.innerWidth,D.winWSbar=document.documentElement.clientWidth,D.ISM?(D.zoom=t?1:D.winWSbar/D.winWAll,D.RS_px_ratio=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth,D.winW=1!==D.zoom?D.winWSbar*D.zoom:Math.min(D.winWAll,D.winWSbar),D.winH=1!==D.zoom?window.innerHeight*D.zoom:window.innerHeight,t&&window.visualViewport&&(D.winH*=window.visualViewport.scale,D.winWAll*=window.visualViewport.scale),D.scrollBarWidth=0,t&&tpGS.gsap.delayedCall(.1,function(){D.getWindowDimension()})):(D.isModalOpen&&D.openModalId!==C&&D[D.openModalId]!==C&&D[D.openModalId].canv.height>D.winH?D.scrollBarWidth=D.mesuredScrollbarWidth:D.scrollBarWidth=D.winWAll-D.winWSbar,D.winW=Math.min(D.winWAll,D.winWSbar),D.winH=window.innerHeight),D.ISM&&125<D.winH&&(D.lastwindowheight!==C&&Math.abs(D.lastwindowheight-D.winH)<125?D.mobileWinH=D.lastwindowheight:D.mobileWinH=D.winH),!1!==e&&D.document.trigger("updateContainerSizes")},100)},aC:function(e,t){e&&(e.classList&&e.classList.add?e.classList.add(""+t):T(e).addClass(t))},rC:function(e,t){e&&(e.classList&&e.classList.remove?e.classList.remove(""+t):T(e).removeClass(t))},sA:function(e,t,i){e&&e.setAttribute&&e.setAttribute("data-"+t,i)},gA:function(e,t,i){return e===C?C:e.hasAttribute&&e.hasAttribute("data-"+t)&&e.getAttribute("data-"+t)!==C&&null!==e.getAttribute("data-"+t)?e.getAttribute("data-"+t):i!==C?i:C},rA:function(e,t){e&&e.removeAttribute&&e.removeAttribute("data-"+t)},iWA:function(e,t){return D[e].justifyCarousel?"static"===t?D[e].carousel.wrapwidth:D[e].carousel.slide_widths[t!==C?t:D[e].carousel.focused]:D[e].gridwidth[D[e].level]},iHE:function(e,t){return D[e].useFullScreenHeight?D[e].canv.height:Math.max(D[e].currentRowsHeight,D[e].gridheight[D[e].level])},updateFixedScrollTimes:function(e){!0===D[e].sbtimeline.set&&!0===D[e].sbtimeline.fixed&&"auto"!==D[e].sliderLayout&&(D[e].sbtimeline.rest=D[e].duration-D[e].sbtimeline.fixEnd,D[e].sbtimeline.time=D[e].duration-(D[e].sbtimeline.fixStart+D[e].sbtimeline.rest),D[e].sbtimeline.extended=D[e].sbtimeline.time/10)},addSafariFix:function(e){!0===window.isSafari11&&!0!==D[e].safari3dFix&&(D[e].safari3dFix=!0,D[e].c[0].className+=" safarifix")},openModalAPI:function(o,s,e,n,l,d){window.RS_60_MODALS!==C&&-1!=T.inArray(o,window.RS_60_MODALS)||window.RS_60_MODAL_API_CALLS!==C&&-1!=T.inArray(o,window.RS_60_MODAL_API_CALLS)?0<=T.inArray(o,window.RS_60_MODALS)&&T.fn.revolution.document.trigger("RS_OPENMODAL_"+o,s):(window.RS_60_MODAL_API_CALLS=window.RS_60_MODAL_API_CALLS||[],window.RS_60_MODAL_API_CALLS.push(o),(d=d===C?{}:d).alias===C&&(d.alias=o),n&&D.showModalCover(l,d,"show"),T.ajax({type:"post",url:e,dataType:"json",data:{action:"revslider_ajax_call_front",client_action:"get_slider_html",alias:o,usage:"modal"},success:function(e,t,i){if(null!==e&&1==e.success){if(l=l==C?e.htmlid:l,e.waiting!==C)for(var a in e.waiting)-1==T.inArray(e.waiting[a],RS_MODULES.waiting)&&(RS_MODULES.waiting.push(e.waiting[a]),window.RS_MODULES.minimal=!1);if(e.toload!==C){var r="";for(a in(RS_MODULES=RS_MODULES||{}).requestedScripts=[],e.toload)!e.toload.hasOwnProperty(a)||RS_MODULES!=C&&RS_MODULES[a]!=C&&!0===RS_MODULES[a].loaded||-1===T.inArray(a,RS_MODULES.requestedScripts)&&(RS_MODULES.requestedScripts.push(a),r+=e.toload[a]);""!==r&&T("body").append(r)}RS_MODULES!==C&&RS_MODULES.modules[e.htmlid]!=C||T("body").append(e.data),n&&D.showModalCover(l,d,"hide"),D[o]!==C&&D[o].openModalApiListener?T.fn.revolution.document.trigger("RS_OPENMODAL_"+o,s):T(document).on("RS_MODALOPENLISTENER_"+o,function(e){T.fn.revolution.document.trigger("RS_OPENMODAL_"+o,s)})}else n&&D.showModalCover(l,d,"hide")},error:function(e){n&&D.showModalCover(l,d,"hide"),console.log("Modal Can not be Loaded"),console.log(e)}}))},showModalCover:function(e,t,i){switch(i){case"show":var a;t.spin!==C&&"off"!==t.spin&&(a=D.buildSpinner(e,"spinner"+t.spin,t.spinc,"modalspinner")),t.bg!==C&&!1!==t.bg&&"false"!==t.bg&&"transparent"!==t.bg?(r=T('<rs-modal-cover data-alias="'+t.alias+'" data-rid="'+e+'" id="'+e+'_modal_bg" style="display:none;opacity:0;background:'+t.bg+'"></rs-modal-cover>'),T("body").append(r),t.speed=parseFloat(t.speed),t.speed=200<t.speed?t.speed/1e3:t.speed,t.speed=Math.max(Math.min(3,t.speed),.3),tpGS.gsap.to(r,t.speed,{display:"block",opacity:1,ease:"power3.inOut"}),D.isModalOpen=!0,a!==C&&r.append(a)):a!==C&&D[e].c.append(a);break;case"hide":var r;(r=T('rs-modal-cover[data-alias="'+t.alias+'"] .modalspinner'))!==C&&0<r.length?r.remove():e!==C&&D[e].c.find(".modalspinner").remove()}},revModal:function(i,e){if(i!==C&&D[i]!==C&&"clicked"!==D[i].modal.closeProtection)if(!0===D[i].modal.closeProtection)D[i].modal.closeProtection,setTimeout(function(){D[i].modal.closeProtection=!1,D.revModal(i,e)},750);else switch(D[i].modal.lastModalCall=e.mode,e.mode){case"show":!0!==D[i].modal.isLive&&!0!==D.anyModalclosing&&(D.document.trigger("RS_MODALOPENED"),D[i].modal.isLive=!0,e.slide=e.slide===C?"to0":e.slide,D[i].modal.bodyclass!==C&&0<=D[i].modal.bodyclass.length&&document.body.classList.add(D[i].modal.bodyclass),D[i].modal.bg.attr("data-rid",i),tpGS.gsap.to(D[i].modal.bg,D[i].modal.coverSpeed,{display:"block",opacity:1,ease:"power3.inOut"}),tpGS.gsap.set(D[i].modal.c,{display:"auto"===D[i].sliderLayout?"inline-block":"block",opacity:0}),D[i].cpar.removeClass("hideallscrollbars"),tpGS.gsap.set(D[i].cpar,{display:"block",opacity:1}),t={a:0},D.isModalOpen=!0,D[i].clearModalBG=!0,"carousel"===D[i].sliderType&&D[i].pr_active_bg!==C&&0<D[i].pr_active_bg.length&&tpGS.gsap.to(D[i].pr_active_bg,.5,{opacity:1}),tpGS.gsap.fromTo(t,D[i].modal.coverSpeed/5,{a:0},{a:10,ease:"power3.inOut",onComplete:function(){D.openModalId=i,D[i].sliderisrunning?("to0"!==e.slide&&(D[i].startedWithOtherSlide=!0),D.callingNewSlide(i,e.slide)):("to0"!==e.slide&&(D[i].startWithSlideKey=e.slide),g(i))}}),setTimeout(function(){tpGS.gsap.fromTo([D[i].modal.c],.01,{opacity:0},{opacity:1,delay:D[i].modal.coverSpeed/4,ease:"power3.inOut",onComplete:function(){}}),window.overscrollhistory=document.body.style.overflow,D[i].modal.allowPageScroll||(document.body.style.overflow="hidden"),"fullscreen"===D[i].sliderLayout&&D.getWindowDimension()},250),"fullscreen"!==D[i].sliderLayout)&&D.getWindowDimension();break;case"close":!0!==D.anyModalclosing&&(D.anyModalclosing=!0,D.openModalId=C,z(i),document.body.style.overflow=window.overscrollhistory,D[i].cpar.addClass("hideallscrollbars"),D[i].c.trigger("stoptimer"),D[i].modal.bodyclass!==C&&0<=D[i].modal.bodyclass.length&&document.body.classList.remove(D[i].modal.bodyclass),tpGS.gsap.to(D[i].modal.bg,D[i].modal.coverSpeed,{display:"none",opacity:0,ease:"power3.inOut"}),tpGS.gsap.to(D[i].modal.c,D[i].modal.coverSpeed/6.5,{display:"none",delay:D[i].modal.coverSpeed/4,opacity:0,onComplete:function(){tpGS.gsap.set(D[i].cpar,{display:"none",opacity:0}),D.document.trigger("revolution.all.resize"),D.document.trigger("revolution.modal.close",[D[i].modal]),D.getWindowDimension(),D.isModalOpen=!1}}),D[i].modal.closeProtection=!0,clearTimeout(D[i].modal.closeTimer),D[i].modal.closeTimer=setTimeout(function(){D.anyModalclosing=!1,D[i].modal.isLive=!1,D[i].modal.closeProtection=!1},Math.max(750,1020*D[i].modal.coverSpeed)));break;case"init":if(window.RS_60_MODALS=window.RS_60_MODALS===C?[]:window.RS_60_MODALS,-1===T.inArray(D[i].modal.alias,window.RS_60_MODALS)&&window.RS_60_MODALS.push(D[i].modal.alias),D[i].modal.listener===C&&(D[i].modal.c=T("#"+i+"_modal"),!1!==D[i].modal.cover&&"false"!==D[i].modal.cover||(D[i].modal.coverColor="transparent"),D[i].modal.bg=T('rs-modal-cover[data-alias="'+D[i].modal.alias+'"]'),D[i].modal.bg===C||0===D[i].modal.bg.length?(D[i].modal.bg=T('<rs-modal-cover style="display:none;opacity:0;background:'+D[i].modal.coverColor+'" data-rid="'+i+'" id="'+i+'_modal_bg"></rs-modal-cover>'),("auto"===D[i].sliderLayout&&D[i].modal.cover?T("body"):D[i].modal.c).append(D[i].modal.bg)):D[i].modal.bg.attr("data-rid",i),D[i].modal.c[0].className+="rs-modal-"+D[i].sliderLayout,D[i].modal.calibration={left:"auto"===D[i].sliderLayout?"center"===D[i].modal.horizontal?"50%":"left"===D[i].modal.horizontal?"0px":"auto":"0px",right:"auto"===D[i].sliderLayout&&("center"===D[i].modal.horizontal||"left"===D[i].modal.horizontal)?"auto":"0px",top:"auto"===D[i].sliderLayout||"fullwidth"===D[i].sliderLayout?"middle"===D[i].modal.vertical?"50%":"top"===D[i].modal.vertical?"0px":"auto":"0px",bottom:!("auto"!==D[i].sliderLayout&&"fullwidth"!==D[i].sliderLayout||"middle"!==D[i].modal.vertical&&"top"!==D[i].modal.vertical)?"auto":"0px",y:("auto"===D[i].sliderLayout||"fullwidth"===D[i].sliderLayout)&&"middle"===D[i].modal.vertical?"-50%":0,x:"auto"===D[i].sliderLayout&&"center"===D[i].modal.horizontal?"-50%":0},"-50%"===D[i].modal.calibration.y&&(D[i].modal.calibration.filter="blur(0px)"),tpGS.gsap.set(D[i].modal.c,"auto"===D[i].sliderLayout||"fullscreen"===D[i].sliderLayout?T.extend(!0,D[i].modal.calibration,{opacity:0,display:"none"}):{opacity:0,display:"none"}),"fullwidth"===D[i].sliderLayout&&tpGS.gsap.set(D[i].modal.c.find("rs-module-wrap"),D[i].modal.calibration),D.document.on("RS_OPENMODAL_"+D[i].modal.alias,function(e,t){e!==C&&e.detail!==C&&e.detail.slide!==C&&t==C&&(t=e.detail.slide),D[i].initEnded=!0,D.revModal(i,{mode:"show",slide:t})}),D[D[i].modal.alias]=D[D[i].modal.alias]||{},D[D[i].modal.alias].openModalApiListener=!0,D.document.trigger("RS_MODALOPENLISTENER_"+D[i].modal.alias),D.document.on("click","rs-modal-cover",function(){D.revModal(D.gA(this,"rid"),{mode:"close"})}),D[i].modal.listener=!0,D[i].modal.trigger!==C)){var t,a,r=D[i].modal.trigger.split(";");for(t in D[i].modal.trigger={},r)if(r.hasOwnProperty(t))switch((a=r[t].split(":"))[0]){case"t":D[i].modal.trigger.time=parseInt(a[1],0);break;case"s":D[i].modal.trigger.scroll=a[1];break;case"so":D[i].modal.trigger.scrollo=parseInt(a[1],0);break;case"e":D[i].modal.trigger.event=a[1];break;case"ha":D[i].modal.trigger.hash=a[1];break;case"co":D[i].modal.trigger.cookie=a[1]}var o,s=!0;D[i].modal.trigger.cookie!==C?s="true"!==D.getCookie(D[i].modal.alias+"_modal_one_time"):"true"==D.getCookie(D[i].modal.alias+"_modal_one_time")&&D.setCookie(D[i].modal.alias+"_modal_one_time",!1,10),s&&(D[i].modal.trigger.time!==C&&0!==D[i].modal.trigger.time&&(D[i].modal.trigger.cookie!==C&&D.setCookie(D[i].modal.alias+"_modal_one_time",!0,D[i].modal.trigger.cookie),setTimeout(function(){D.document.trigger("RS_OPENMODAL_"+D[i].modal.alias)},D[i].modal.trigger.time)),D[i].modal.trigger.scrollo===C&&D[i].modal.trigger.scroll===C||(D[i].modal.trigger.scroll!==C&&T(D[i].modal.trigger.scroll)[0]!==C&&(D[i].modal.trigger.scroll=T(D[i].modal.trigger.scroll)[0]),o=function(){var e;D[i].modal.trigger.scroll!==C&&(e=(e="string"==typeof D[i].modal.trigger.scroll?document.getElementById(D[i].modal.trigger.scroll):"object"==typeof D[i].modal.trigger.scroll?D[i].modal.trigger.scroll:C)!==C&&null!==e?D[i].modal.trigger.scroll.getBoundingClientRect():C),(D[i].modal.trigger.scroll!==C&&e!==C&&Math.abs(e.top+(e.bottom-e.top)/2-D.getWinH(i)/2)<50||D[i].modal.trigger.scrollo!==C&&Math.abs(D[i].modal.trigger.scrollo-(D.scrollY!==C?D:window).scrollY)<100)&&(D.document.trigger("RS_OPENMODAL_"+D[i].modal.alias),D[i].modal.trigger.cookie!==C&&D.setCookie(D[i].modal.alias+"_modal_one_time",!0,D[i].modal.trigger.cookie),document.removeEventListener("scroll",o))},document.addEventListener("scroll",o,{id:i,passive:!0}))),D[i].modal.trigger.event!==C&&D.document.on(D[i].modal.trigger.event,function(){D.document.trigger("RS_OPENMODAL_"+D[i].modal.alias)}),"t"==D[i].modal.trigger.hash&&window.location.hash.substring(1)==D[i].modal.alias&&D.document.trigger("RS_OPENMODAL_"+D[i].modal.alias)}}},smartConvertDivs:function(e){var t="";if("string"==typeof e&&0<=e.indexOf("#")){var i,a=e.split(","),r=a.length-1;for(i in a)t="string"==typeof a[i]&&"#"===a[i][0]?t+a[i][1]/a[i][3]*100+"%"+(i<r?",":""):t+a[i]+(i<r?",":"")}else t=e;return t},revToResp:function(e,t,i,a){if((e=e===C?i:e)!==C){if(a=a===C?",":a,"boolean"!=typeof e&&("object"!=typeof e||Array.isArray(e))){try{e=e.replace(/[[\]]/g,"").replace(/\'/g,"").split(a)}catch(e){}for(e=Array.isArray(e)?e:[e];e.length<t;)e[e.length]=e[e.length-1]}return e}},loadImages:function(e,t,i,a){if(e!==C&&0!==e.length){var r,o=[];if(Array.isArray(e))for(var s in e)e.hasOwnProperty(s)&&e[s]!==C&&o.push(e[s]);else o.push(e);for(r in o)if(o.hasOwnProperty(r)){var n,l,d=o[r].querySelectorAll("img, rs-sbg, .rs-svg"),c=D[t].lazyOnBg?o[r].querySelectorAll("rs-bg-elem, rs-column, rs-layer"):[];for(s in d)d.hasOwnProperty(s)&&(d[s]!==C&&d[s].dataset!==C&&d[s].dataset.src!==C&&0<=d[s].dataset.src.indexOf("dummy.png")&&0<=d[s].src.indexOf("data")&&delete d[s].dataset.src,l=B(d[s],C,t),n=l!==C?l:D.gA(d[s],"svg_src")!=C?D.gA(d[s],"svg_src"):d[s].src===C?T(d[s]).data("src"):d[s].src,l=D.gA(d[s],"svg_src")!=C?"svg":"img",n!==C)&&D[t].loadqueue!==C&&0==D[t].loadqueue.filter(function(e){return e.src===n}).length&&D[t].loadqueue.push({src:n,img:d[s],index:s,starttoload:Date.now(),type:l||"img",prio:i,progress:d[s].complete&&n===d[s].src?"loaded":"prepared",static:a,width:d[s].complete&&n===d[s].src?d[s].width:C,height:d[s].complete&&n===d[s].src?d[s].height:C});for(s in c)c.hasOwnProperty(s)&&c[s]!==C&&c[s].dataset!==C&&c[s].dataset.bglazy!==C&&0<=c[s].style.backgroundImage.indexOf("dummy.png")&&(c[s].style.backgroundImage='url("'+c[s].dataset.bglazy+'")');c[s]!==C&&c[s].dataset!==C&&c[s].dataset.bglazy!==C&&0<=c[s].style.backgroundImage.indexOf("dummy.png")&&(c[s].style.backgroundImage='url("'+c[s].dataset.bglazy+'")')}!D[t].cparBgChecked&&D[t].cpar[0]!==C&&D[t].cpar[0].dataset!==C&&D[t].cpar[0].dataset.bglazy!==C&&0<=D[t].cpar[0].style.backgroundImage.indexOf("dummy.png")&&(D[t].cparBgChecked=!0,D[t].cpar[0].style.backgroundImage='url("'+D[t].cpar[0].dataset.bglazy+'")'),m(t)}},waitForCurrentImages:function(e,t,i){if(e!==C&&0!==e.length&&D[t]!==C){var a,r=!1,o=[];if(Array.isArray(e))for(var s in e)e.hasOwnProperty(s)&&e[s]!==C&&o.push(e[s]);else o.push(e);for(a in o)if(o.hasOwnProperty(a)){var n,l,d,c,p,g,u=o[a].querySelectorAll("img, rs-sbg, .rs-svg");for(s in u)!u.hasOwnProperty(s)||"length"===s||0<=u[s].className.indexOf("rs-pzimg")||(n=T(u[s]).data(),l=(l=B(u[s],C,t))!==C?l:D.gA(u[s],"svg_src")!=C?D.gA(u[s],"svg_src"):(u[s].src===C?n:u[s]).src,d=D.getLoadObj(t,l),D.sA(u[s],"src-rs-ref",l),n.loaded===C&&d!==C&&d.progress&&"loaded"==d.progress&&("img"==d.type?(u[s].src.slice(u[s].src.length-10)!==d.src.slice(d.src.length-10)&&(u[s].src=d.src),n.slidebgimage&&(-1==d.src.indexOf("images/transparent.png")&&-1==d.src.indexOf("assets/transparent.png")||n.bgcolor===C||n.bgcolor!==C&&"transparent"!==n.bgcolor&&(d.bgColor=!0,d.useBGColor=!0),D.sA(o[a],"owidth",d.width),D.sA(o[a],"oheight",d.height),p=D.getByTag(o[a],"RS-SBG-WRAP"),c=D.gA(o[a],"key"),D[t].sbgs[c].loadobj=d,0<p.length&&(D.sA(p[0],"owidth",d.width),D.sA(p[0],"oheight",d.height)),"carousel"===D[t].sliderType)&&(p=T(p),g=D.getSlideIndex(t,c),(D[t].carousel.justify&&D[t].carousel.slide_widths===C||D[t].carousel.slide_width===C)&&D.setCarouselDefaults(t,!0),p.data("panzoom")===C||D[t].panzoomTLs!==C&&D[t].panzoomTLs[g]!==C||D.startPanZoom(p,t,0,g,"prepare",c),D[t].sbgs[c].isHTML5&&!D[t].sbgs[c].videoisplaying&&(D[t].sbgs[c].video=D[t].sbgs[c].loadobj.img),o[a].getAttribute("data-iratio")!==C&&!o[a].getAttribute("data-iratio")&&d.img&&d.img.naturalWidth&&(o[a].setAttribute("data-iratio",d.img.naturalWidth/d.img.naturalHeight),D.setCarouselDefaults(t,"redraw",!0),!0===D[t].carousel.ocfirsttun)&&D.organiseCarousel(t,"right",!0,!1,!1),D.updateSlideBGs(t,c,D[t].sbgs[c]))):"svg"==d.type&&"loaded"==d.progress&&(u[s].innerHTML=d.innerHTML),n.loaded=!0),d&&d.progress&&d.progress.match(/inprogress|inload|prepared/g)&&(!d.error&&Date.now()-d.starttoload<15e3?r=!0:(d.progress="failed",d.reported_img||(d.reported_img=!0,console.log(l+"  Could not be loaded !")))),1!=D[t].youtubeapineeded||window.YT&&YT.Player!=C||(r=f("youtube",t)),1!=D[t].vimeoapineeded)||window.Vimeo||(r=f("vimeo",t))}T.each(D[t].loadqueue,function(e,t){!0===t.static&&("loaded"!=t.progress&&"done"!==t.progress||"failed"===t.progress)&&("failed"!=t.progress||t.reported?!t.error&&Date.now()-t.starttoload<5e3?r=!0:t.reported||(t.reported=v(t.src,t.error)):t.reported=v(t.src,t.error))}),r?tpGS.gsap.delayedCall(.02,D.waitForCurrentImages,[e,t,i]):i!==C&&tpGS.gsap.delayedCall(1e-4,i)}},updateVisibleArea:function(e){for(var t in D[e].viewPort.visible_area=D.revToResp(D[e].viewPort.visible_area,D[e].rle,"0px"),D[e].viewPort.vaType=new Array(4),D[e].viewPort.visible_area)D[e].viewPort.visible_area.hasOwnProperty(t)&&(!1===D[e].viewPort.local&&!0===D[e].viewPort.global?(D[e].viewPort.vaType[t]=0<=D[e].viewPort.globalDist.indexOf("%")?"%":"px",D[e].viewPort.visible_area[t]=parseInt(D[e].viewPort.globalDist)):(D.isNumeric(D[e].viewPort.visible_area[t])&&(D[e].viewPort.visible_area[t]+="%"),D[e].viewPort.visible_area[t]!==C&&(D[e].viewPort.vaType[t]=0<=D[e].viewPort.visible_area[t].indexOf("%")?"%":"px"),D[e].viewPort.visible_area[t]=parseInt(D[e].viewPort.visible_area[t],0)),D[e].viewPort.visible_area[t]="%"==D[e].viewPort.vaType[t]?D[e].viewPort.visible_area[t]/100:D[e].viewPort.visible_area[t])},observeFonts:function(e,t,i){i=i===C?0:i,D.fonts===C&&(D.fonts={},D.monoWidth=d("monospace"),D.sansWidth=d("sans-serif"),D.serifWidth=d("serif")),i++;var a=D.fonts[e];!0!==D.fonts[e]&&(D.fonts[e]=D.monoWidth!==d(e+",monospace")||D.sansWidth!==d(e+",sans-serif")||D.serifWidth!==d(e+",serif")),100===i||(!1===a||a===C)&&!0===D.fonts[e]?(d(e+",monospace",!0),d(e+",sans-serif",!0),d(e+",serif",!0),t()):setTimeout(function(){D.observeFonts(e,t,i)},19)},getversion:function(){return o},currentSlideIndex:function(e){return D[e].pr_active_key},iOSVersion:function(){return!!(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i))&&navigator.userAgent.match(/OS 4_\d like Mac OS X/i)},setIsIOS:function(){D.isiPhone=/iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,D.isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&void 0!==navigator.standalone},setIsChrome8889:function(){D.isChrome8889=D.isChrome8889===C?0<=navigator.userAgent.indexOf("Chrome/88")||0<=navigator.userAgent.indexOf("Chrome/89"):D.isChrome8889},isIE:function(){var e;return D.isIERes===C&&((e=T('<div style="display:none;"/>').appendTo(T("body"))).html("\x3c!--[if IE 8]><a>&nbsp;</a><![endif]--\x3e"),D.isIERes=e.find("a").length,e.remove()),D.isIERes},is_mobile:function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos","iPod","iPhone","iPad","Blackberry","BlackBerry"],t=!1;if(window.orientation!==C)t=!0;else for(var i in e)e.hasOwnProperty(i)&&(t=!!(t||1<navigator.userAgent.split(e[i]).length)||t);return t&&document.body&&-1===document.body.className.indexOf("rs-ISM")&&(document.body.className+=" rs-ISM"),t},is_android:function(){var e,t=["android","Android"],i=!1;for(e in t)t.hasOwnProperty(e)&&(i=!!(i||1<navigator.userAgent.split(t[e]).length)||i);return i},callBackHandling:function(e,i,a){D[e].callBackArray&&T.each(D[e].callBackArray,function(e,t){t&&t.inmodule&&t.inmodule===i&&t.atposition&&t.atposition===a&&t.callback&&t.callback.call()})},get_browser:function(){var e,t=navigator.userAgent,i=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(i[1])?(e=/\brv[ :]+(\d+)/g.exec(t)||[],"IE"):"Chrome"===i[1]&&null!=(e=t.match(/\b(OPR|Edge)\/(\d+)/))?e[1].replace("OPR","Opera"):(i=i[2]?[i[1],i[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&i.splice(1,1,e[1]),i[0])},get_browser_version:function(){var e=navigator.appName,t=navigator.userAgent,i=t.match(/(edge|opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return i&&null!=(t=t.match(/version\/([\.\d]+)/i))&&(i[2]=t[1]),(i=i?[i[1],i[2]]:[e,navigator.appVersion,"-?"])[1]},isFaceBook:function(){return D.isFaceBookApp==C&&(D.isFaceBookApp=navigator.userAgent||navigator.vendor||window.opera,D.isFaceBookApp=-1<D.isFaceBookApp.indexOf("FBAN")||-1<D.isFaceBookApp.indexOf("FBAV")),D.isFaceBookApp},isFirefox:function(e){return D[e].isFirefox=D[e].isFirefox===C?"Firefox"===D.get_browser():D[e].isFirefox,D.isFF=D[e].isFirefox,D[e].isFirefox},isSafari11:function(){return"safari"===D.trim(D.get_browser().toLowerCase())&&11<=parseFloat(D.get_browser_version())},isWebkit:function(){var e=/(webkit)[ \/]([\w.]+)/.exec(navigator.userAgent.toLowerCase());return e&&e[1]&&"webkit"===e[1]},isIE11:function(){return D.IE11=D.IE11===C?!!navigator.userAgent.match(/Trident.*rv\:11\./):D.IE11,D.IE11},checkBackdrop:function(){var e=document.createElement("div"),t=(e.style.cssText="-webkit-backdrop-filter: blur(2px)",0!=e.style.length),i=document.documentMode===C||9<document.documentMode;t&&i||(e.style.cssText="backdrop-filter: blur(2px)",t=0!=e.style.length),e=null,D.useBackdrop=t&&i},deepLink:function(e,t){if(t!==C){var i=parseInt(t.toString().replace(/^slide/,"").replace("-",""),10);if(isNaN(i))for(var a in D[e].slides)if(D[e].slides.hasOwnProperty(a)&&D.gA(D[e].slides[a],"deeplink")===t){i=parseInt(D.gA(D[e].slides[a],"originalindex"),10);break}return isNaN(i)||i<1||i>D[e].realslideamount?void 0:i}},getHorizontalOffset:function(e,t){var i=c(e,".outer-left"),e=c(e,".outer-right");return"left"==t?i:"right"==t?e:"all"==t?{left:i,right:e,both:i+e,inuse:i+e!=0}:i+e},getComingSlide:function(e,t){var i=D[e].pr_next_key!==C?D[e].pr_next_key:D[e].pr_processing_key!==C?D[e].pr_processing_key:D[e].pr_active_key,a=0,a=0;if(D[e].pr_active_slide!==C&&"true"==D.gA(D[e].pr_active_slide[0],"not_in_nav")&&(i=D[e].pr_lastshown_key),t!==C&&D.isNumeric(t)||t!==C&&t.match(/to/g))a=1===t||-1===t?parseInt(i,0)+t<0?D[e].slideamount-1:parseInt(i,0)+t>=D[e].slideamount?0:parseInt(i,0)+t:(t=D.isNumeric(t)?t:parseInt(t.split("to")[1],0))<0?0:t>D[e].slideamount-1?D[e].slideamount-1:t;else if(t)for(var r in D[e].slides)D[e].slides.hasOwnProperty(r)&&(a=D[e].slides&&D[e].slides[r]&&(D.gA(D[e].slides[r],"key")===t||D[e].slides[r].id===t)?r:a);return{nindex:a,aindex:i}},callingNewSlide:function(e,t,i,a){t=D.getComingSlide(e,t);D[e].pr_next_key=t.nindex,D[e].sdir=("bullet"===D[e].sc_indicator||D[e].pr_active_key!=D[e].slideamount-1||0!=D[e].pr_next_key)&&D[e].pr_next_key<D[e].pr_active_key?1:0,i&&D[e].carousel!==C&&(D[e].carousel.focused=D[e].pr_next_key),"carousel"===D[e].sliderType&&D[e].startedWithOtherSlide&&(D[e].carousel.focused=D[e].pr_next_key,delete D[e].startedWithOtherSlide),D[e].ctNavElement?D[e].ctNavElement=!1:D[e].c.trigger("revolution.nextslide.waiting"),(D[e].started&&t.aindex===D[e].pr_next_key&&t.aindex===D[e].pr_lastshown_key||D[e].pr_next_key!==t.aindex&&-1!=D[e].pr_next_key&&D[e].pr_lastshown_key!==C)&&y(e,i,a)},getLoadObj:function(e,t){e=D[e].loadqueue!==C&&D[e].loadqueue.filter(function(e){return e.src===t})[0];return e===C?{src:t}:e},getResponsiveLevel:function(e){var t=9999,i=0,a=0,r=0;if(D[e].responsiveLevels&&D[e].responsiveLevels.length)for(var o in D[e].responsiveLevels)D[e].responsiveLevels.hasOwnProperty(o)&&(D.winWAll<D[e].responsiveLevels[o]&&(0==i||i>parseInt(D[e].responsiveLevels[o]))&&(t=parseInt(D[e].responsiveLevels[o]),r=parseInt(o),i=parseInt(D[e].responsiveLevels[o])),D.winWAll>D[e].responsiveLevels[o])&&i<D[e].responsiveLevels[o]&&(i=parseInt(D[e].responsiveLevels[o]),a=parseInt(o));return i<t?a:r},getSizeMultpilicator:function(e,t,i){var a={h:0,w:0};return D[e].justifyCarousel?a.h=a.w=1:(a.w=i.width/D[e].gridwidth[D[e].level],a.h=i.height/D[e].gridheight[D[e].level],a.w=isNaN(a.w)?1:a.w,a.h=isNaN(a.h)?1:a.h,1==D[e].enableUpscaling?a.h=a.w:(a.w<a.h?a.h=a.w:a.w=a.h,(1<a.h||1<a.w)&&(a.w=1,a.h=1))),a},updateDims:function(t,e){var i,a=D[t].pr_processing_key||D[t].pr_active_key||0,r=D[t].pr_active_key||0,o=D[t].modal!==C&&D[t].modal.useAsModal,s=o?D.winWAll:D.winW,n=!1,l=(D[t].lastScrollBarWidth=D.scrollBarWidth,D[t].redraw=D[t].redraw===C?{}:D[t].redraw,D[t].module=D[t].module===C?{}:D[t].module,D[t].canv=D[t].canv===C?{}:D[t].canv,D[t].content=D[t].content===C?{}:D[t].content,D[t].drawUpdates={c:{},cpar:{},canv:{}},"carousel"==D[t].sliderType?D[t].module.margins={top:parseInt(D[t].carousel.padding_top||0,0),bottom:parseInt(D[t].carousel.padding_bottom||0,0)}:D[t].module.margins={top:0,bottom:0},D[t].module.paddings===C&&(D[t].module.paddings={top:parseInt(D[t].cpar.css("paddingTop"),0)||0,bottom:parseInt(D[t].cpar.css("paddingBottom"),0)||0}),D[t].blockSpacing!==C?(D[t].block={bottom:D[t].blockSpacing.bottom!==C?parseInt(D[t].blockSpacing.bottom[D[t].level],0):0,top:D[t].blockSpacing.top!==C?parseInt(D[t].blockSpacing.top[D[t].level],0):0,left:D[t].blockSpacing.left!==C?parseInt(D[t].blockSpacing.left[D[t].level],0):0,right:D[t].blockSpacing.right!==C?parseInt(D[t].blockSpacing.right[D[t].level],0):0},D[t].block.hor=D[t].block.left+D[t].block.right,D[t].block.ver=D[t].block.top+D[t].block.bottom):D[t].block===C&&(D[t].block={top:0,left:0,right:0,bottom:0,hor:0,ver:0}),D[t].blockSpacing!==C&&(i={paddingLeft:D[t].block.left,paddingRight:D[t].block.right,marginTop:D[t].block.top,marginBottom:D[t].block.bottom},l=JSON.stringify(i),i!==D[t].emptyObject)&&l!==D[t].caches.setsizeBLOCKOBJ&&(tpGS.gsap.set(D[t].blockSpacing.block,i),D[t].caches.setsizeBLOCKOBJ=l,n=!0),D[t].levelForced=D[t].level=D.getResponsiveLevel(t),D[t].rowHeights=D.getRowHeights(t),D[t].aratio=D[t].gridheight[D[t].level]/D[t].gridwidth[D[t].level],D[t].module.width="auto"===D[t].sliderLayout||1==D[t].disableForceFullWidth?D[t].cpar.width():s-D[t].block.hor,D[t].outNavDims=D.getOuterNavDimension(t),D[t].canv.width=D[t].module.width-D[t].outNavDims.horizontal-(o?D.scrollBarWidth:0),o&&"auto"===D[t].sliderLayout&&(D[t].canv.width=Math.min(D[t].gridwidth[D[t].level],s)),"fullscreen"===D[t].sliderLayout||D[t].infullscreenmode?(i=D.getWinH(t)-(!0===D[t].modal.useAsModal?0:D.getFullscreenOffsets(t)),D[t].canv.height=Math.max(D[t].rowHeights.cur,Math.max(i-D[t].outNavDims.vertical,D[t].minHeight)),"carousel"===D[t].sliderType&&"v"!==D[t].carousel.orientation&&(D[t].canv.height=D[t].canv.height-parseInt(D[t].carousel.padding_top)-parseInt(D[t].carousel.padding_bottom)),r!==a&&(D[t].currentSlideHeight=Math.max(D[t].rowHeights.last,Math.max(i-D[t].outNavDims.vertical,D[t].minHeight)),D[t].redraw.maxHeightOld=!0),D[t].drawUpdates.c.height="100%"):(D[t].canv.height=D[t].keepBPHeight?D[t].gridheight[D[t].level]:Math.round(D[t].canv.width*D[t].aratio),D[t].canv.height=D[t].autoHeight?D[t].canv.height:Math.min(D[t].canv.height,D[t].gridheight[D[t].level]),D[t].carousel.prevNextVisCalculated="carousel"==D[t].sliderType&&"v"==D[t].carousel.orientation?"%"==D[t].carousel.prevNextVisType?D[t].canv.height*D[t].carousel.prevNextVis:D[t].carousel.prevNextVis:0,D[t].canv.height=Math.max(Math.max(D[t].rowHeights.cur,D[t].canv.height),D[t].minHeight)+D[t].carousel.prevNextVisCalculated,"carousel"==D[t].sliderType&&"v"==D[t].carousel.orientation&&(D[t].canv.height=Math.min(D[t].canv.height,D.winH)),D[t].drawUpdates.c.height=D[t].canv.height),"fullscreen"!==D[t].sliderLayout&&"fullwidth"!==D[t].sliderLayout||(D[t].canv.width-=D[t].cpar.outerWidth()-D[t].cpar.width(),"fullscreen"===D[t].sliderLayout&&(D[t].canv.height-=D[t].cpar.outerHeight()-D[t].cpar.height())),D[t].module.height=D[t].canv.height,"fullwidth"!=D[t].sliderLayout||D[t].fixedOnTop||(D[t].drawUpdates.c.maxHeight=0!=D[t].maxHeight?Math.min(D[t].canv.height,D[t].maxHeight):D[t].canv.height),D[t].CM=D.getSizeMultpilicator(t,D[t].enableUpscaling,{width:D[t].canv.width,height:D[t].canv.height}),D[t].content.width=D[t].gridwidth[D[t].level]*D[t].CM.w,D[t].content.height=Math.round(Math.max(D[t].rowHeights.cur,D[t].gridheight[D[t].level]*D[t].CM.h)),D[t].module.margins.top+D[t].module.margins.bottom+("fullscreen"===D[t].sliderLayout?0:D[t].outNavDims.vertical)+D[t].canv.height+D[t].module.paddings.top+D[t].module.paddings.bottom),s=(D[t].drawUpdates.cpar.height=l,D[t].drawUpdates.cpar.width="auto"===D[t].sliderLayout?"auto":D[t].module.width,"auto"===D[t].sliderLayout||"fullscreen"===D[t].sliderLayout&&!0===D[t].disableForceFullWidth||D[t].rsFullWidthWrap===C?"fullscreen"==D[t].sliderLayout&&1==D[t].disableForceFullWidth&&(D[t].drawUpdates.cpar.left=0):D[t].drawUpdates.cpar.left=0-Math.ceil(D[t].rsFullWidthWrap.offset().left-(D[t].outNavDims.left+D[t].block.left)),D[t].sbtimeline.set&&D[t].sbtimeline.fixed?(D[t].sbtimeline.extended===C&&D.updateFixedScrollTimes(t),D[t].forcerHeight=2*l+D[t].sbtimeline.extended,D[t].sbtimeline.pullc&&D[t].rsFullWidthWrap!==C&&null!==D[t].rsFullWidthWrap[0]&&requestAnimationFrame(function(){var e=D[t].rsFullWidthWrapMarginBottom+-1*D[t].forcerHeight;D[t].rsFullWidthWrap[0].style.marginBottom=(isNaN(e)?D[t].rsFullWidthBottomMarginPush:D[t].rsFullWidthBottomMarginPush+e)+"px"}),D[t].rsFullWidthWrap!==C&&null!==D[t].rsFullWidthWrap[0]&&"fullscreen"==D[t].sliderLayout&&(D[t].rsFullWidthBottomMarginPush=D.getFullscreenOffsets(t),D[t].rsFullWidthWrap[0].style.marginBottom=D[t].rsFullWidthBottomMarginPush+"px")):D[t].forcerHeight=l,D[t].forcerHeight!==D[t].caches.setsizeForcerHeight&&D[t].forcer!==C&&(D[t].caches.setsizeForcerHeight=D[t].forcerHeight,D[t].redraw.forcer=n=!0),D[t].drawUpdates.c.width=D[t].canv.width,"auto"===D[t].sliderLayout&&(D[t].drawUpdates.c.left=D[t].outNavDims.left),D[t].drawUpdates.c!==D[t].emptyObject&&JSON.stringify(D[t].drawUpdates.c)!==D[t].caches.setsizeCOBJ&&(D[t].caches.setsizeCOBJ=JSON.stringify(D[t].drawUpdates.c),D[t].redraw.c=n=!0),D[t].drawUpdates.cpar!==D[t].emptyObject&&JSON.stringify(D[t].drawUpdates.cpar)!==D[t].caches.setsizeCPAROBJ&&(D[t].caches.setsizeCPAROBJ=JSON.stringify(D[t].drawUpdates.cpar),D[t].redraw.cpar=n=!0),o&&"auto"===D[t].sliderLayout&&D[t].caches.canWidth!==D[t].canv.width&&(D[t].caches.canWidth=D[t].canv.width,D[t].redraw.modalcanvas=n=!0),D[t].slayers&&0<D[t].slayers.length&&D[t].outNavDims.left!==D[t].caches.outNavDimsLeft&&"fullwidth"!=D[t].sliderLayout&&"fullscreen"!=D[t].sliderLayout&&(D[t].caches.outNavDimsLeft=D[t].outNavDims.left,D[t].redraw.slayers=!0),o&&D[t].modal.calibration!==C&&"middle"===D[t].modal.vertical&&(D[t].modal.calibration.top=D.getWinH(t)<l?"0%":"50%",D[t].modal.calibration.y=D.getWinH(t)<l?"0px":"-50%","fullwidth"===D[t].sliderLayout)&&(D[t].redraw.modulewrap=n=!0),D[t].gridOffsetWidth=(D[t].module.width-D[t].gridwidth[D[t].level])/2,D[t].gridOffsetHeight=(D[t].module.height-D[t].content.height)/2,D[t].caches.curRowsHeight=D[t].currentRowsHeight=D[t].rowHeights.cur,D[t].caches.moduleWidth=D[t].width=D[t].module.width,D[t].caches.moduleHeight=D[t].height=D[t].module.height,D[t].caches.canWidth=D[t].conw=D[t].canv.width,D[t].caches.canHeight=D[t].conh=D[t].canv.height,D[t].bw=D[t].CM.w,D[t].bh=D[t].CM.h,D[t].caches.outNavDimsLeft=D[t].outNavDims.left,window.requestAnimationFrame(function(){D[t].redraw.forcer&&tpGS.gsap.set(D[t].forcer,{height:D[t].forcerHeight}),D[t].redraw.c&&tpGS.gsap.set(D[t].c,D[t].drawUpdates.c),D[t].redraw.cpar&&tpGS.gsap.set(D[t].cpar,D[t].drawUpdates.cpar),D[t].redraw.modalcanvas&&D[t]!==C&&(D[t].modal!==C&&D[t].modal.c!==C&&tpGS.gsap.set(D[t].modal.c,{width:D[t].canv.width}),D[t].canvas!==C)&&tpGS.gsap.set(D[t].canvas,{width:D[t].canv.width}),D[t].redraw.maxHeightOld&&(D[t].slides[r].style.maxHeight=D[t].currentSlideHeight!==D[t].canv.height?D[t].currentSlideHeight+"px":"none"),D[t].redraw.slayers&&tpGS.gsap.set(D[t].slayers,{left:D[t].outNavDims.left}),D[t].redraw.modulewrap&&tpGS.gsap.set(D[t].modal.c.find("rs-module-wrap"),D[t].modal.calibration),!0!==D[t].navigation.initialised&&"prepared"===e&&("hero"!==D[t].sliderType&&D.createNavigation&&D[t].navigation.use&&!0!==D[t].navigation.createNavigationDone&&D.createNavigation(t),D.resizeThumbsTabs)&&D.resizeThumbsTabs&&D[t].navigation.use&&D.resizeThumbsTabs(t),D[t].rebuildProgressBar&&_(t),D.putRowsInPosition(t),D[t].redraw={}}),D[t].inviewport&&(D[t].heightInLayers!==C&&D[t].module.height!==D[t].heightInLayers||D[t].widthInLayers!==C&&D[t].module.width!==D[t].widthInLayers));return"ignore"!==e&&s&&(D[t].heightInLayers=C,D[t].widthInLayers=C,"carousel"!==D[t].sliderType&&(D[t].pr_next_key!==C?D.animateTheLayers({slide:D[t].pr_next_key,id:t,mode:"rebuild",caller:"swapSlideProgress_1"}):D[t].pr_processing_key!==C?D.animateTheLayers({slide:D[t].pr_processing_key,id:t,mode:"rebuild",caller:"swapSlideProgress_2"}):D[t].pr_active_key!==C&&D.animateTheLayers({slide:D[t].pr_active_key,id:t,mode:"rebuild",caller:"swapSlideProgress_3"})),n=!0),n&&"ignore"!==e&&D.requestLayerUpdates(t,"enterstage"),D[t].module.height!==D[t].module.lastHeight&&(D[t].module.lastHeight=D[t].module.height,window.requestAnimationFrame(function(){window.innerHeight!==screen.height&&Math.round(window.innerHeight*window.devicePixelRatio)!==screen.height&&G(t,C,!1)})),tpGS.gsap.delayedCall(.1,function(){D[t].lastScrollBarWidth!==D.scrollBarWidth?(D.updateDims(t,"ignore"),G(t)):D.isModalOpen||D.scrollBarWidth===window.innerWidth-document.documentElement.clientWidth||D.rAfScrollbar===C&&(D.rAfScrollbar=requestAnimationFrame(function(){D.rAfScrollbar=C,D.getWindowDimension(t,!1)}))}),n},putMiddleZoneInPosition:function(e,t){D[e].middleZones==C||D[e].middleZones[t]==C||D[e].rowMiddleHeights==C||D[e].rowMiddleHeights[t]==C||D[e].caches.middleHeights[t]===D[e].rowMiddleHeights[t]&&D[e].caches.lastModuleHeight===D[e].module.height||(tpGS.gsap.set(D[e].middleZones[t],{top:Math.round(D[e].module.height/2-D[e].rowMiddleHeights[t]/2)}),D[e].caches.middleHeights[t]=D[e].rowMiddleHeights[t])},putRowsInPosition:function(e){var t=D[e].activeRSSlide||0,i=D[e].pr_processing_key;D.putMiddleZoneInPosition(e,t),t!==i&&i!==C&&D.putMiddleZoneInPosition(e,i),D[e].smiddleZones==C||D[e].rowMiddleHeights==C||D[e].rowMiddleHeights.static==C||D[e].caches.middleHeights.static===D[e].rowMiddleHeights.static&&D[e].caches.lastModuleHeight===D[e].module.height||(tpGS.gsap.set(D[e].smiddleZones[0],{top:Math.round(D[e].module.height/2-D[e].rowMiddleHeights.static/2)}),D[e].caches.middleHeights.static=D[e].rowMiddleHeights.static),D[e].caches.lastModuleHeight=D[e].module.height},getSlideIndex:function(e,t){var i,a=!1;for(i in D[e].slides){if(!D[e].slides.hasOwnProperty(i)||!1!==a)continue;a=D.gA(D[e].slides[i],"key")===t?i:a}return!1===a?0:a},loadUpcomingContent:function(e){var t,i,a,r;"smart"==D[e].lazyType&&(t=[],a=(i=parseInt(D.getSlideIndex(e,D.gA(D[e].pr_next_slide[0],"key")),0))-1<0?D[e].realslideamount-1:i-1,r=i+1==D[e].realslideamount?0:i+1,a!==i&&t.push(D[e].slides[a]),r!==i&&t.push(D[e].slides[r]),0<t.length)&&(D.loadImages(t,e,2),D.waitForCurrentImages(t,e,function(){}))},lazyLoadAllSlides:function(e){if("all"==D[e].lazyType&&!0!==D[e].lazyLoad_AllDone&&(D[e].viewPort.enable&&D[e].inviewport||!D[e].viewPort.enable)){for(var t in D[e].slides)D[e].slides.hasOwnProperty(t)&&(D.loadImages(D[e].slides[t],e,t),D.waitForCurrentImages(D[e].slides[t],e,function(){}));D[e].lazyLoad_AllDone=!0}},getFullscreenOffsets:function(e){var t=0;if(D[e].fullScreenOffsetContainer!=C){var i,a=(""+D[e].fullScreenOffsetContainer).split(",");for(i in a)a.hasOwnProperty(i)&&(t+=T(a[i]).outerHeight(!0)||0)}return D[e].fullScreenOffset!=C&&(!D.isNumeric(D[e].fullScreenOffset)&&1<D[e].fullScreenOffset.split("%").length?t+=D.getWinH(e)*parseInt(D[e].fullScreenOffset,0)/100:D.isNumeric(parseInt(D[e].fullScreenOffset,0))&&(t+=parseInt(D[e].fullScreenOffset,0)||0)),D[e].fullScreenOffsetResult=t},unToggleState:function(e){if(e!==C)for(var t=0;t<e.length;t++)try{document.getElementById(e[t]).classList.remove("rs-tc-active")}catch(e){}},toggleState:function(e){if(e!==C)for(var t=0;t<e.length;t++)try{document.getElementById(e[t]).classList.add("rs-tc-active")}catch(e){}},swaptoggleState:function(e){if(e!=C&&0<e.length)for(var t=0;t<e.length;t++){var i=document.getElementById(e[t]);if(D.gA(i,"toggletimestamp")!==C&&(new Date).getTime()-D.gA(i,"toggletimestamp")<250)return;D.sA(i,"toggletimestamp",(new Date).getTime()),null!==i&&(0<=i.className.indexOf("rs-tc-active")?i.classList.remove("rs-tc-active"):i.classList.add("rs-tc-active"))}},lastToggleState:function(e){if(e!==C)for(var t=0;t<e.length;t++)var i=document.getElementById(e[t]),a=!0===a||null!==i&&0<=i.className.indexOf("rs-tc-active")||a;return a},revCheckIDS:function(e,t){var i,a,r;return D.gA(t,"idcheck")===C&&(i=t.id,(r=-1)!==(a=T.inArray(t.id,window.RSANYID))&&(r=T.inArray(t.id,D[e].anyid),window.RSANYID_sliderID[a]===e&&-1===r||(t.id=t.id+"_"+Math.round(9999*Math.random()),console.log("Warning - ID:"+i+" exists already. New Runtime ID:"+t.id),a=r=-1)),-1===r&&D[e].anyid.push(t.id),-1===a)&&(window.RSANYID.push(t.id),window.RSANYID_sliderID.push(e)),D.sA(t,"idcheck",!0),t.id},buildSpinner:function(e,t,i,a){if("off"!==t){a=a===C?"":a,i=i===C?"#ffffff":i;var r=parseInt(t.replace("spinner",""),10);if(isNaN(r)||r<6)var o='style="background-color:'+i+'"',s=a===C||3!==r&&4!=r?"":o,o=T("<rs-loader "+(a===C||1!==r&&2!=r?"":o)+' class="'+t+" "+a+'"><div '+s+' class="dot1"></div><div '+s+' class="dot2"></div><div '+s+' class="bounce1"></div><div '+s+' class="bounce2"></div><div '+s+' class="bounce3"></div></rs-loader>');else{for(var n,l='<div class="rs-spinner-inner"',d=(7===r?(-1!==i.search("#")?(n=i.replace("#",""),n="rgba("+parseInt(n.substring(0,2),16)+", "+parseInt(n.substring(2,4),16)+", "+parseInt(n.substring(4,6),16)+", "):-1!==i.search("rgb")&&2<(n=i.substring(i.indexOf("(")+1,i.lastIndexOf(")")).split(",")).length&&(n="rgba("+n[0].trim()+", "+n[1].trim()+", "+n[2].trim()+", "),n&&"string"==typeof n&&(l+=' style="border-top-color: '+n+"0.65); border-bottom-color: "+n+"0.15); border-left-color: "+n+"0.65); border-right-color: "+n+'0.15)"')):12===r&&(l+=' style="background:'+i+'"'),l+=">",[10,0,4,2,5,9,0,4,4,2][r-6]),c=0;c<d;c++)0<c&&(l+=" "),l+='<span style="background:'+i+'"></span>';o=T('<rs-loader class="'+t+" "+a+'">'+(l+="</div>")+"</div></rs-loader>")}return o}},addStaticLayerTo:function(e,t,i){var a;D[e].slayers.length<2?((a=document.createElement("rs-static-layers")).className="rs-stl-"+t,a.appendChild(i[0]),D[e].c[0].appendChild(a),D[e].slayers.push(a)):D[e].slayers[1].appendChild(i[0])}}),function(){return D.isIE11()?function(e,t){return e.querySelectorAll(t)}:function(e,t){return e.getElementsByTagName(t)}}),n=function(e){D[e].responsiveLevels=D.revToResp(D[e].responsiveLevels,D[e].rle),D[e].visibilityLevels=D.revToResp(D[e].visibilityLevels,D[e].rle),D[e].responsiveLevels[0]=9999,D[e].rle=D[e].responsiveLevels.length||1,D[e].gridwidth=D.revToResp(D[e].gridwidth,D[e].rle),D[e].gridheight=D.revToResp(D[e].gridheight,D[e].rle),D[e].editorheight!==C&&(D[e].editorheight=D.revToResp(D[e].editorheight,D[e].rle)),D.updateDims(e)},I=function(e,i){var a=[];return T.each(e,function(e,t){e!=i&&a.push(t)}),a},l=function(e,t,i){D[i].c.find(e).each(function(){var e=T(this);e.data("key")===t&&e.remove()})},d=function(e,t){if(D["rsfont_"+e]==C&&(D["rsfont_"+e]=document.createElement("span"),D["rsfont_"+e].innerHTML=Array(100).join("wi"),D["rsfont_"+e].style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;"),D["rsfont_"+e].style.fontFamily=e,document.body.appendChild(D["rsfont_"+e])),t===C)return D["rsfont_"+e].clientWidth;document.body.removeChild(D["rsfont_"+e])},c=function(e,t){var i=0;return e.find(t).each(function(){var e=T(this);!e.hasClass("tp-forcenotvisible")&&i<e.outerWidth()&&(i=e.outerWidth())}),i},p=function(e){if(e===C||D[e]===C||D[e].c===C)return!1;if(D[e].cpar!==C&&D[e].cpar.data("aimg")!=C&&("enabled"==D[e].cpar.data("aie8")&&D.isIE(8)||"enabled"==D[e].cpar.data("amobile")&&D.ISM))D[e].c.html('<img class="tp-slider-alternative-image" src="'+D[e].cpar.data("aimg")+'">');else{window._rs_firefox13=!1,window._rs_firefox=D.isFirefox(),window._rs_ie=window._rs_ie===C?!T.support.opacity:window._rs_ie,window._rs_ie9=window._rs_ie9===C?9==document.documentMode:window._rs_ie9;var t,i=T.fn.jquery.split("."),a=parseFloat(i[0]),r=parseFloat(i[1]),o=(1==a&&r<7&&D[e].c.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:'+i+" <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>"),1<a&&(window._rs_ie=!1),D[e].realslideamount=D[e].slideamount=0,D.getByTag(D[e].canvas[0],"RS-SLIDE")),s=[];for(t in D[e].notInNav=[],D[e].slides=[],o)o.hasOwnProperty(t)&&("on"==D.gA(o[t],"hsom")&&D.ISM?s.push(o[t]):(D.gA(o[t],"invisible")||1==D.gA(o[t],"invisible")?D[e].notInNav.push(o[t]):(D[e].slides.push(o[t]),D[e].slideamount++),D[e].realslideamount++,D.sA(o[t],"originalindex",D[e].realslideamount),D.sA(o[t],"origindex",D[e].realslideamount-1)));for(t in s)s.hasOwnProperty(t)&&s[t].remove();for(t in D[e].notInNav)D[e].notInNav.hasOwnProperty(t)&&(D.sA(D[e].notInNav[t],"not_in_nav",!0),D[e].canvas[0].appendChild(D[e].notInNav[t]));D[e].canvas.css({visibility:"visible"}),D[e].slayers=D[e].c.find("rs-static-layers"),D[e].slayers[0]&&D[e].slayers.className&&-1!==D[e].slayers[0].className.indexOf("rs-stl-visible")&&D[e].c.addClass("rs-stl-visible"),0<D[e].slayers.length&&D.sA(D[e].slayers[0],"key","staticlayers"),!0===D[e].modal.useAsModal&&(D[e].cpar.wrap('<rs-modal id="'+D[e].c[0].id+'_modal"></rs-modal>'),D[e].modal.c=T(D.closestNode(D[e].cpar[0],"RS-MODAL")),D[e].modal.c.appendTo(T("body")),D[e].modal!==C)&&D[e].modal.alias!==C&&D.revModal(e,{mode:"init"}),1==D[e].waitForInit||1==D[e].modal.useAsModal?(D.RS_toInit!==C&&(D.RS_toInit[e]=!0),D[e].c.trigger("revolution.slide.waitingforinit"),D[e].waitingForInit=!0):(window.requestAnimationFrame(function(){g(e)}),D[e].initEnded=!0)}},B=function(e,t,i){return D.gA(e,"lazyload")!==C?D.gA(e,"lazyload"):D[i].lazyloaddata!==C&&0<D[i].lazyloaddata.length&&D.gA(e,D[i].lazyloaddata)!==C?D.gA(e,D[i].lazyloaddata):D.gA(e,"lazy-src")!==C?D.gA(e,"lazy-src"):D.gA(e,"lazy-wpfc-original-src")!==C?D.gA(e,"lazy-wpfc-original-src"):D.gA(e,"lazy")!==C?D.gA(e,"lazy"):t},g=function(t){if(D[t]!==C){(D[t].sliderisrunning=!0)!==D[t].noDetach&&D[t].c.detach();var e=D[t].canvas.find("rs-slide:first-child");if(D[t].shuffle){for(var i=D.gA(e[0],"firstanim"),a=0;a<D[t].slideamount;a++)D[t].canvas.find("rs-slide:eq("+Math.round(Math.random()*D[t].slideamount)+")").prependTo(D[t].canvas);D.sA(D[t].canvas.find("rs-slide:first-child")[0],"firstanim",i)}D[t].slides=D.getByTag(D[t].canvas[0],"RS-SLIDE"),D[t].thumbs=new Array(D[t].slides.length),D[t].slots=1,D[t].firststart=1,D[t].loadqueue=[];var r,o=D[t].syncload=0,s="carousel"===D[t].sliderType&&D[t].carousel.border_radius!==C?parseInt(D[t].carousel.border_radius,0):0;for(r in"carousel"!==D[t].sliderType&&tpGS.gsap.set(D[t].slides,{display:"none"}),"carousel"!==D[t].sliderType&&tpGS.gsap.set(e,{display:"block"}),D[t].slides)if(D[t].slides.hasOwnProperty(r)&&"length"!==r){var n=D[t].slides[r],l=D.getByTag(n,"IMG")[0],d=(D.gA(n,"key")===C&&D.sA(n,"key","rs-"+Math.round(999999*Math.random())),{params:Array(12),id:D.gA(n,"key"),src:D.gA(n,"thumb")!==C?D.gA(n,"thumb"):B(l,l!==C?l.src:C,t)});D.gA(n,"title")===C&&D.sA(n,"title",""),D.gA(n,"description")===C&&D.sA(n,"description",""),d.params[0]={from:RegExp("\\{\\{title\\}\\}","g"),to:D.gA(n,"title")},d.params[1]={from:RegExp("\\{\\{description\\}\\}","g"),to:D.gA(n,"description")};for(var c=1;c<=10;c++)D.gA(n,"p"+c)!==C?d.params[c+1]={from:RegExp("\\{\\{param"+c+"\\}\\}","g"),to:D.gA(n,"p"+c)}:d.params[c+1]={from:RegExp("\\{\\{param"+c+"\\}\\}","g"),to:""};if(D[t].thumbs[o]=T.extend({},!0,d),0<s&&tpGS.gsap.set(n,{borderRadius:s+"px"}),D.gA(n,"link")!=C||D.gA(n,"linktoslide")!==C){var l=D.gA(n,"link"),l=l!==C?l:"slide",p="slide"!=l?"no":D.gA(n,"linktoslide"),g=D.gA(n,"seoz"),u=D.gA(n,"tag");if(p!=C&&"no"!=p&&"next"!=p&&"prev"!=p)for(var h in D[t].slides)D[t].slides.hasOwnProperty(h)&&parseInt(D.gA(D[t].slides[h],"origindex"),0)+1==D.gA(n,"linktoslide")&&(p=D.gA(D[t].slides[h],"key"));"slide"==l||"a"!=u?T(n).prepend('<rs-layer class="rs-layer slidelink" id="rs_slidelink_'+Math.round(1e5*Math.random())+'" data-zindex="'+("back"===g?0:"front"===g?95:g!==C?parseInt(g,0):100)+'" dataxy="x:c;y:c" data-dim="w:100%;h:100%" data-basealign="slide"'+("no"==p?"slide"==l||D.ISM?"":"  data-actions='o:click;a:simplelink;target:"+(D.gA(n,"target")||"_self")+";url:"+l+";'":"  data-actions='"+("scroll_under"===p?"o:click;a:scrollbelow;offset:100px;":"prev"===p?"o:click;a:jumptoslide;slide:prev;d:0.2;":"next"===p?"o:click;a:jumptoslide;slide:next;d:0.2;":"o:click;a:jumptoslide;slide:"+p+";d:0.2;")+"'")+" data-frame_1='e:power3.inOut;st:100;sp:100' data-frame_999='e:power3.inOut;o:0;st:w;sp:100'>"+(D.ISM?"<a "+("slide"!=l?("_blank"===D.gA(n,"target")?'rel="noopener" ':"")+'target="'+(D.gA(n,"target")||"_self")+'" href="'+l+'"':"")+"><span></span></a>":"")+"</rs-layer>"):T(n).prepend('<a class="rs-layer slidelink" id="rs_slidelink_'+Math.round(1e5*Math.random())+'" data-zindex="'+("back"===g?0:"front"===g?95:g!==C?parseInt(g,0):100)+'" dataxy="x:c;y:c" data-dim="w:100%;h:100%" data-basealign="slide" href="'+l+'" target="'+(D.gA(n,"target")||"_self")+'" rel="noopener" data-frame_1="e:power3.inOut;st:100;sp:100" data-frame_999="e:power3.inOut;o:0;st:w;sp:100"><span></span></a>')}o++}if(D[t].simplifyAll&&(D.isIE(8)||D.iOSVersion())&&(D[t].c.find(".rs-layer").each(function(){var e=T(this);e.removeClass("customin customout").addClass("fadein fadeout"),e.data("splitin",""),e.data("speed",400)}),D[t].c.find("rs-slide").each(function(){var e=T(this);e.data("transition","fade"),e.data("masterspeed",500),e.data("slotamount",1),(e.find(".rev-slidebg")||e.find(">img").first()).data("panzoom",null)})),window._rs_desktop=window._rs_desktop===C?!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i):window._rs_desktop,D[t].autoHeight="fullscreen"==D[t].sliderLayout||D[t].autoHeight,"fullwidth"!=D[t].sliderLayout||D[t].autoHeight||"carousel"===D[t].sliderType&&"v"===D[t].carousel.orientation||D[t].c.css({maxHeight:D[t].gridheight[D[t].level]+"px"}),"auto"==D[t].sliderLayout||null!==D.closestNode(D[t].c[0],"RS-FULLWIDTH-WRAP")||"fullscreen"===D[t].sliderLayout&&1==D[t].disableForceFullWidth?D[t].topc=D[t].cpar:(i=D[t].cpar[0].style.marginTop,e=D[t].cpar[0].style.marginBottom,D[t].rsFullWidthWrapMarginBottom=parseInt(e,0),D[t].rsFullWidthWrap=D[t].topc=T('<rs-fullwidth-wrap id="'+D[t].c[0].id+'_forcefullwidth" style="'+(i=i===C||""===i?"":"margin-top:"+i+";")+(e=e===C||""===e?"":"margin-bottom:"+e+";")+'"></rs-fullwidth-wrap>'),D[t].forcer=T('<rs-fw-forcer style="height:'+(D[t].forcerHeight===C?D[t].cpar.height():D[t].forcerHeight)+'px"></rs-fw-forcer>'),D[t].topc.append(D[t].forcer),D[t].topc.insertBefore(D[t].cpar),D[t].cpar.detach(),D[t].cpar.css({marginTop:"0px",marginBottom:"0px",position:"absolute"}),D[t].cpar.prependTo(D[t].topc)),D[t].forceOverflow?D[t].topc[0].classList.add("rs-forceoverflow"):"3D"===D[t].parallax.type&&D[t].topc[0].classList.add("rs-parallax-hidden-of"),"carousel"===D[t].sliderType&&!0!==D[t].overflowHidden&&D[t].c.css({overflow:"visible"}),0!==D[t].maxHeight&&tpGS.gsap.set([D[t].cpar,D[t].c,D[t].topc],{maxHeight:D[t].maxHeight+"px"}),D[t].fixedOnTop&&tpGS.gsap.set(D[t].blockSpacing!==C&&D[t].blockSpacing.block!==C?D[t].blockSpacing.block:D[t].topc,{position:"fixed",top:"0px",left:"0px",pointerEvents:"none",zIndex:5e3}),D[t].shadow!==C&&0<D[t].shadow&&D[t].cpar.addClass("tp-shadow"+D[t].shadow).append('<div class="tp-shadowcover" style="background-color:'+D[t].cpar.css("backgroundColor")+";background-image:"+D[t].cpar.css("backgroundImage")+'"></div>'),D.updateDims(t,"prepared"),D.observeWraps===C&&(D.observeWraps=new D.wrapObserver.init(function(e,t){G(t,C,!0)})),!D[t].c.hasClass("revslider-initialised")){D[t].c[0].classList.add("revslider-initialised"),D[t].c[0].id=D[t].c[0].id===C?"revslider-"+Math.round(1e3*Math.random()+5):D[t].c[0].id,D.revCheckIDS(t,D[t].c[0]),D[t].origcd=parseInt(D[t].duration,0),D[t].scrolleffect._L=[],D[t].sbas=D[t].sbas===C?{}:D[t].sbas,D[t].layers=D[t].layers||{},D[t].sortedLayers=D[t].sortedLayers||{};var m,v=D[t].c[0].querySelectorAll("rs-layer, rs-row, rs-column, rs-group,  rs-bgvideo, .rs-layer");for(m in v)if(v.hasOwnProperty(m)){!D.ISM&&v[m].classList.contains("iospermaccwait")&&v[m].remove();var f,y,w=T(v[m]),b=w.data();if(b.startclasses=v[m].className,b.startclasses=b.startclasses===C||null===b.startclasses?"":b.startclasses,b.animationonscroll=!!D[t].sbtimeline.set&&D[t].sbtimeline.layers,b.animationonscroll=!0===b.animationonscroll||"true"==b.animationonscroll,b.filteronscroll=!!D[t].scrolleffect.set&&D[t].scrolleffect.layers,b.pxundermask=0<=b.startclasses.indexOf("rs-pxmask")&&"off"!==D[t].parallax.type&&0<=b.startclasses.indexOf("rs-pxl-"),b.noPevents=0<=b.startclasses.indexOf("rs-noevents"),b.sba)for(var c in f=b.sba.split(";"))f.hasOwnProperty(c)&&("t"==(y=f[c].split(":"))[0]&&(b.animationonscroll=y[1],"false"==y[1])&&(b.animOnScrollForceDisable=!0),"e"==y[0]&&(b.filteronscroll=y[1]),"so"==y[0])&&(b.scrollBasedOffset=parseInt(y[1])/1e3);if("true"!=b.animationonscroll&&1!=b.animationonscroll||(b.startclasses+=" rs-sba",w[0].className+=" rs-sba"),0<=b.startclasses.indexOf("rs-layer-static")&&D.handleStaticLayers&&D.handleStaticLayers(w,t),"RS-BGVIDEO"!==w[0].tagName){if(w[0].classList.add("rs-layer"),"column"===b.type&&(b.columnwidth="33.33%",b.verticalalign="top",b.column!==C))for(var _ in f=b.column.split(";"))f.hasOwnProperty(_)&&("w"===(y=f[_].split(":"))[0]&&(b.columnwidth=y[1]),"a"===y[0])&&(b.verticalalign=y[1]);if("group"===b.type&&(b.verticalalign="top",b.column!==C))for(var _ in f=b.column.split(";"))f.hasOwnProperty(_)&&"a"===(y=f[_].split(":"))[0]&&(b.verticalalign=y[1]);var S=0<=b.startclasses.indexOf("slidelink")?"z-index:"+b.zindex+";width:100% !important;height:100% !important;":"",x="column"!==b.type&&"group"!==b.type?"":b.verticalalign===C?" vertical-align:top;":" vertical-align:"+b.verticalalign+";",k="row"===b.type||"column"===b.type||"r"===b.pos?"position:relative;":"position:absolute;",O="",R="row"===b.type?"rs-row-wrap":"column"===b.type?"rs-column-wrap":"group"===b.type?"rs-group-wrap":"rs-layer-wrap",L="",I="";b.noPevents;"row"===b.type||"column"===b.type||"group"===b.type?(w[0].classList.remove("tp-resizeme"),"column"===b.type&&(b.width="auto",w[0].group="row",tpGS.gsap.set(w,{width:"auto"}),b.filteronscroll=!1)):(L="display:"+("inline-block"===w[0].style.display?"inline-block":"block")+";",null!==D.closestNode(w[0],"RS-COLUMN")?(w[0].group="column",b.filteronscroll=!1):null!==D.closestNode(w[0],"RS-GROUP-WRAP")&&(w[0].group="group",b.filteronscroll=!1)),b.wrpcls!==C&&(O=O+" "+b.wrpcls),b.wrpid!==C&&(I='id="'+b.wrpid+'"'),b.thFixed=b.wrpcls!==C&&b.wrpcls.includes("th-fixed")||b.startclasses!==C&&b.startclasses.includes("ddd_mousebox"),b.reqWrp={loop:!(1!=D[t].rtl&&!b.thFixed&&b.loop_0===C&&b.loop_999===C),level:{m:0,lp:0,p:0}},b.perspFix=window.isSafari11&&(b.btrans!==C&&b.btrans.includes("iosfx:p")||"carousel"===D[t].sliderType&&!v[m].classList.contains("rs-mtrap")),b.reqWrp.mask=!!(b.perspFix||b.reqWrp.loop||1==D[t].rtl||b.pxundermask||b.thFixed||b.btrans!==C||b.frame_hover!==C&&b.frame_hover.includes("m:t")||b.clip!==C||b.sba!==C||b.frame_0_sfx!==C||b.frame_1_sfx!==C||b.frame_999_sfx!==C||b.frame_0_mask!==C||b.frame_1_mask!==C||b.frame_2_mask!==C||b.frame_3_mask!==C||b.frame_4_mask!==C||b.frame_999_mask!==C),b.reqWrp.level.m=b.pxundermask?2:b.reqWrp.mask?1:0,b.reqWrp.level.lp=b.reqWrp.level.m+(b.reqWrp.loop?1:0),b.reqWrp.level.p=b.reqWrp.level.lp+1,b.perspFix&&(S+="transform:perspective(600px);"),w.wrap("<"+R+" "+I+' class="rs-parallax-wrap '+O+'" style="'+x+" "+S+k+L+';pointer-events:none">'+(b.reqWrp.loop?'<rs-loop-wrap style="'+S+k+L+'">':"")+(b.reqWrp.mask?'<rs-mask-wrap style="'+S+k+L+'">':"")+(b.pxundermask?"<rs-px-mask></rs-px-mask>":"")+(b.reqWrp.mask?"</rs-mask-wrap>":"")+(b.reqWrp.loop?"</rs-loop-wrap>":"")+"</"+R+">"),!0!==b.filteronscroll&&"true"!=b.filteronscroll||D[t].scrolleffect._L.push(w.parent()),w[0].id=w[0].id===C?"layer-"+Math.round(999999999*Math.random()):w[0].id,D.revCheckIDS(t,w[0]),D[t]._Lshortcuts[w[0].id]={p:P(w[0],b.reqWrp.level.p),lp:P(w[0],b.reqWrp.level.lp),m:P(w[0],b.reqWrp.level.m)},"column"!==b.type||""==w[0].style.background&&""===w[0].style.backgroundColor&&""===w[0].style.backgroundImage&&b.border===C?b.cbgexists=!1:(D[t]._Lshortcuts[w[0].id].p.append('<rs-cbg-mask-wrap><rs-column-bg id="'+w[0].id+'_rs_cbg"></rs-column-bg></rs-cbg-mask-wrap>'),b.cbgexists=!0),"text"===b.type&&0<D.getByTag(w[0],"IFRAME").length&&(D[t].slideHasIframe=!0,w[0].classList.add("rs-ii-o")),D[t].BUG_safari_clipPath&&"true"!=b.animationonscroll&&1!=b.animationonscroll&&w[0].classList.add("rs-pelock"),w[0].dataset.staticz!==C&&"row"!==b.type&&"row"!==w[0].group&&"column"!==w[0].group&&D.addStaticLayerTo(t,w[0].dataset.staticz,D[t]._Lshortcuts[w[0].id].p)}D.gA(w[0],"actions")&&D.checkActions&&D.checkActions(w,t,D[t]),!D.checkVideoApis||window.rs_addedvim&&window.rs_addedyt||D[t].youtubeapineeded&&D[t].vimeoapineeded||D.checkVideoApis(w,t)}D.checkActions&&D.checkActions(C,t),D[t].c[0].addEventListener("mousedown",function(){var e;!0!==D[t].onceClicked&&(D[t].onceClicked=!0)!==D[t].onceVideoPlayed&&D[t].activeRSSlide!==C&&D[t].slides!==C&&D[t].slides[D[t].activeRSSlide]!==C&&(e=T(D[t].slides[D[t].activeRSSlide]).find("rs-bgvideo"))!==C&&null!==e&&0<e.length&&D.playVideo(e,t)}),D[t].c[0].addEventListener("mouseenter",function(){D[t].c.trigger("tp-mouseenter"),D[t].overcontainer=!0},{passive:!0}),D[t].c[0].addEventListener("mouseover",function(){D[t].c.trigger("tp-mouseover"),D[t].overcontainer=!0},{passive:!0}),D[t].c[0].addEventListener("mouseleave",function(){D[t].c.trigger("tp-mouseleft"),D[t].overcontainer=!1},{passive:!0}),D[t].c.find(".rs-layer video").each(function(e){var t=T(this);t.removeClass("video-js vjs-default-skin"),t.attr("preload",""),t.css({display:"none"})}),D[t].rs_static_layer=D.getByTag(D[t].c[0],"RS-STATIC-LAYERS"),D.preLoadAudio&&0<D[t].rs_static_layer.length&&D.preLoadAudio(T(D[t].rs_static_layer),t,1),0<D[t].rs_static_layer.length&&(D.loadImages(D[t].rs_static_layer[0],t,0,!0),D.waitForCurrentImages(D[t].rs_static_layer[0],t,function(){D[t]!==C&&D[t].c.find("rs-static-layers img").each(function(){this.src=D.getLoadObj(t,D.gA(this,"src")!=C?D.gA(this,"src"):this.src).src})})),D[t].rowzones=[],D[t].rowzonesHeights=[],D[t].topZones=[],D[t].middleZones=[],D[t].bottomZones=[],D[t].rowMiddleHeights={};var M,i=D.deepLink(t,F("#")[0]),e=(i!==C&&(D[t].startWithSlide=i,D[t].deepLinkListener=!0,window.addEventListener("hashchange",function(){var e;!0!==D[t].ignoreDeeplinkChange&&(e=D.deepLink(t,F("#")[0]))!==C&&D.callingNewSlide(t,e,!0),D[t].ignoreDeeplinkChange=!1})),D[t].loader=D.buildSpinner(t,D[t].spinner,D[t].spinnerclr),D[t].loaderVisible=!0,D[t].c.append(D[t].loader),H(t),("off"!==D[t].parallax.type||D[t].scrolleffect.set||D[t].sbtimeline.set)&&D.checkForParallax&&D.checkForParallax(t),D[t].fallbacks.disableFocusListener||"true"==D[t].fallbacks.disableFocusListener||!0===D[t].fallbacks.disableFocusListener||(D[t].c.addClass("rev_redraw_on_blurfocus"),j()),D[t].viewPort);for(c in"on"===D[t].navigation.mouseScrollNavigation&&(e.enable=!0),D[t].slides)D[t].slides.hasOwnProperty(c)&&(M=T(D[t].slides[c]),D[t].rowzones[c]=[],D[t].rowzonesHeights[c]=[],D[t].topZones[c]=[],D[t].middleZones[c]=[],D[t].bottomZones[c]=[],M.find("rs-zone").each(function(){D[t].rowzones[c].push(T(this)),0<=this.className.indexOf("rev_row_zone_top")&&D[t].topZones[c].push(this),0<=this.className.indexOf("rev_row_zone_middle")&&(D[t].middleZones[c].push(this),this.dataset.middle="true"),0<=this.className.indexOf("rev_row_zone_bottom")&&D[t].bottomZones[c].push(this)}));D.lazyLoadAllSlides(t),D[t].srowzones=[],D[t].smiddleZones=[],D[t].slayers&&D[t].slayers.find("rs-zone").each(function(){D[t].srowzones.push(T(this)),0<=this.className.indexOf("rev_row_zone_middle")&&(D[t].smiddleZones.push(this),this.dataset.middle="true")}),"carousel"===D[t].sliderType&&tpGS.gsap.set(D[t].canvas,{scale:1,perspective:1200,transformStyle:"flat",opacity:0}),D[t].c.prependTo(D[t].cpar),T("body").data("rs-fullScreenMode",!1),window.addEventListener("fullscreenchange",A,{passive:!0}),window.addEventListener("mozfullscreenchange",A,{passive:!0}),window.addEventListener("webkitfullscreenchange",A,{passive:!0}),D.document.on("updateContainerSizes."+D[t].c.attr("id"),function(){if(D[t]!==C)return D[t].c!=C&&void(D.updateDims(t,"ignore")&&window.requestAnimationFrame(function(){D.updateDims(t,"ignore"),D[t].fullScreenMode=D.checkfullscreenEnabled(t),D.lastwindowheight=D.getWinH(t),G(t)}))}),e.presize&&(D[t].pr_next_slide=T(D[t].slides[0]),D.loadImages(D[t].pr_next_slide[0],t,0,!0),D.waitForCurrentImages(D[t].pr_next_slide.find(".tp-layers"),t,function(){D.animateTheLayers&&D.animateTheLayers({slide:D[t].pr_next_key,id:t,mode:"preset",caller:"runSlider"})})),"off"==D[t].parallax.type&&!D[t].sbtimeline.set&&!0!==e.enable||D.scrollTicker(t),!0!==e.enable&&(D[t].inviewport=!0,D.enterViewPort(t)),D.RS_toInit!==C&&(D.RS_toInit[t]=!0),D[t].observeWrap&&D.observeWraps&&D.wrapObserver.observe((D[t].rsFullWidthWrap!==C?D[t].rsFullWidthWrap:D[t].cpar)[0],t)}}},u=function(e,t){D.winW<D[e].hideSliderAtLimit?(D[e].c.trigger("stoptimer"),!0!==D[e].sliderIsHidden&&(D.sA(D[e].cpar[0],"displaycache","none"!=D[e].cpar.css("display")?D[e].cpar.css("display"):D.gA(D[e].cpar[0],"displaycache")),D[e].cpar.css({display:"none"}),D[e].sliderIsHidden=!0)):(!0===D[e].sliderIsHidden||D[e].sliderIsHidden===C&&D[e].c.is(":hidden"))&&t&&(D[e].cpar[0].style.display=D.gA(D[e].cpar[0],"displaycache")!=C&&"none"!=D.gA(D[e].cpar[0],"displaycache")?D.gA(D[e].cpar[0],"displaycache"):"block",D[e].sliderIsHidden=!1,D[e].c.trigger("restarttimer"),window.requestAnimationFrame(function(){G(e,!0)})),D.hideUnHideNav&&D[e].navigation.use&&D.hideUnHideNav(e)},G=function(e,t,i){if(D[e].c===C)return!1;if(D[e].dimensionReCheck={},D[e].c.trigger("revolution.slide.beforeredraw"),1==D[e].infullscreenmode&&(D[e].minHeight=D.getWinH(e)),D.ISM&&(D[e].lastMobileHeight=D.getWinH(e)),i&&D.updateDims(e),!D.resizeThumbsTabs||!0===D.resizeThumbsTabs(e)){if(window.requestAnimationFrame(function(){u(e,!0!==t),_(e)}),D[e].started){if("carousel"==D[e].sliderType)for(var a in D.prepareCarousel(e),D[e].sbgs)D[e].sbgs.hasOwnProperty(a)&&D[e].sbgs[a].mDIM!==C&&D.updateSlideBGs(e,D[e].sbgs[a].key,D[e].sbgs[a]);else D.updateSlideBGs(e);if("carousel"===D[e].sliderType&&(D[e].carCheckconW!=D[e].canv.width||"fullscreen"==D[e].sliderLayout&&D[e].carCheckconH!=D[e].canv.height)){for(var r in clearTimeout(D[e].pcartimer),D[e].sbgs)D[e].sbgs[r].loadobj!==C&&D.updateSlideBGs(e,D[e].sbgs[r].key,D[e].sbgs[r]);"v"==D[e].carousel.orientation&&tpGS.gsap.set(D[e].canvas,{height:D[e].carousel.slide_height}),requestAnimationFrame(function(){D.prepareCarousel(e),D.animateTheLayers({slide:"individual",id:e,mode:"rebuild",caller:"containerResized_1"}),D[e].carCheckconW=D[e].canv.width,D[e].carCheckconH=D[e].canv.height}),D[e].lastconw=D[e].canv.width}if(D[e].pr_processing_key!==C?D.animateTheLayers({slide:D[e].pr_processing_key,id:e,mode:"rebuild",caller:"containerResized_2"}):D[e].pr_active_key!==C&&D.animateTheLayers({slide:D[e].pr_active_key,id:e,mode:"rebuild",caller:"containerResized_3"}),"carousel"===D[e].sliderType)for(var r in D[e].panzoomTLs){var o;D[e].panzoomTLs.hasOwnProperty(r)&&(o=D.gA(D[e].panzoomBGs[r][0],"key"),D.startPanZoom(D[e].panzoomBGs[r],e,D[e].panzoomTLs[r].progress(),r,D[e].panzoomTLs[r].isActive()?"play":"reset",o))}else D[e].pr_active_bg!==C&&D[e].pr_active_bg[0]!==C&&h(e,D[e].pr_active_bg,D[e].pr_active_bg[0].dataset.key),D[e].pr_next_bg!==C&&D[e].pr_next_bg[0]!==C&&h(e,D[e].pr_next_bg,D[e].pr_next_bg[0].dataset.key);clearTimeout(D[e].mNavigTimeout),D.manageNavigation&&(D[e].mNavigTimeout=setTimeout(function(){D.manageNavigation(e)},20))}D.prepareCoveredVideo(e)}D[e].c.trigger("revolution.slide.afterdraw",[{id:e}])},h=function(e,t,i){var a;D[e].panzoomTLs!==C&&(a=D.getSlideIndex(e,i),D.startPanZoom(t,e,D[e].panzoomTLs[a]!==C?D[e].panzoomTLs[a].progress():0,a,"play",i))},H=function(e){!0!==D[e].noDetach&&D[e].canvas.detach();var t,i=D.isFaceBook()?"visible":"hidden";D[e].autoHeight&&tpGS.gsap.set([D[e].c,D[e].cpar],{maxHeight:"none"}),tpGS.gsap.set(D[e].canvas,D[e].modal!==C&&D[e].modal.useAsModal?{overflow:i,width:"100%",height:"100%"}:{overflow:i,width:"100%",height:"100%",maxHeight:D[e].autoHeight?"none":D[e].cpar.css("maxHeight")}),"carousel"===D[e].sliderType&&(t="margin-top:"+parseInt(D[e].carousel.padding_top||0,0)+"px;",D[e].canvas.css({overflow:"visible"}).wrap('<rs-carousel-wrap style="'+t+'"></rs-carousel-wrap>'),D[e].cpar.prepend("<rs-carousel-space></rs-carousel-space>").append("<rs-carousel-space></rs-carousel-space>"),D.defineCarouselElements(e)),D[e].startWithSlide=D[e].startWithSlide===C?C:Math.max(1,(D[e].sliderType,parseInt(D[e].startWithSlide))),D[e].cpar.css({overflow:"visible"}),D[e].scrolleffect.bgs=[];for(var a=0;a<D[e].slides.length;a++){var r,o,s=T(D[e].slides[a]),n=D.gA(s[0],"key"),l=s.find(".rev-slidebg")||s.find(">img"),d=D[e].sbgs[n]=M(l.data(),e),c=s.data("mediafilter"),p=(d.skeyindex=D.getSlideIndex(e,n),d.bgvid=s.find("rs-bgvideo"),l.detach(),d.bgvid.detach(),(D[e].startWithSlide!=C&&D.gA(D[e].slides[a],"originalindex")==D[e].startWithSlide||D[e].startWithSlide===C&&0==a)&&(D[e].pr_next_key=D[e].carousel.focused=s.index()),tpGS.gsap.set(s,{width:"100%",height:"100%",overflow:i}),l.wrap('<rs-sbg-px><rs-sbg-wrap data-key="'+n+'"></rs-sbg-wrap></rs-sbg-px>'),d.wrap=T(D.closestNode(l[0],"RS-SBG-WRAP")),d.src=l[0].src,d.lazyload=d.lazyload=B(l[0],C,e),d.slidebgimage=!0,d.loadobj=d.loadobj===C?{}:d.loadobj,d.mediafilter=c="none"===c||c===C?"":c,d.sbg=document.createElement("rs-sbg"),d.sbg.alt=l[0].alt,D[e].overlay!==C&&"none"!=D[e].overlay.type&&D[e].overlay.type!=C&&(p=D.createOverlay(e,D[e].overlay.type,D[e].overlay.size,{0:D[e].overlay.colora,1:D[e].overlay.colorb}),(r=document.createElement("rs-dotted")).style.backgroundImage=p,d.wrap.append(r),d.overlay=r),l.data("mediafilter",c),d.canvas=document.createElement("canvas"),d.sbg.appendChild(d.canvas),d.canvas.style.width="100%",d.canvas.style.height="100%",d.ctx=d.canvas.getContext("2d"),d.lazyload!==C&&(d.sbg.dataset.lazyload=d.lazyload),d.sbg.className=c,d.sbg.src=d.src,d.sbg.dataset.bgcolor=d.bgcolor,d.sbg.style.width="100%",d.sbg.style.height="100%",d.key=n,d.wrap[0].dataset.key=n,T(d.sbg).data(d),d.wrap.data(d),d.wrap[0].appendChild(d.sbg),document.createComment("Runtime Modification - Img tag is Still Available for SEO Goals in Source - "+l.get(0).outerHTML)),g=(l.replaceWith(p),D.gA(s[0],"sba")===C&&D.sA(s[0],"sba",""),{}),u=D.gA(s[0],"sba").split(";");for(o in u)if(u.hasOwnProperty(o)){var h=u[o].split(":");switch(h[0]){case"f":g.f=h[1];break;case"b":g.b=h[1];break;case"g":g.g=h[1];break;case"t":g.s=h[1]}}D.sA(s[0],"scroll-based",!!D[e].sbtimeline.set&&g.s!==C&&g.s),0<d.bgvid.length&&(d.bgvidid=d.bgvid[0].id,d.animateDirection="idle",d.bgvid.addClass("defaultvid").css({zIndex:30}),c!==C&&""!==c&&"none"!==c&&d.bgvid.addClass(c),d.bgvid.appendTo(d.wrap),d.parallax!=C&&(d.bgvid.data("parallax",d.parallax),d.bgvid.data("showcoveronpause","on"),d.bgvid.data("mediafilter",c)),d.poster=!1,(d.src!==C&&-1==d.src.indexOf("assets/dummy.png")&&-1==d.src.indexOf("assets/transparent.png")||d.lazyload!==C&&-1==d.lazyload.indexOf("assets/transparent.png")&&-1==d.lazyload.indexOf("assets/dummy.png"))&&(d.poster=!0),d.bgvid.data("bgvideo",1),d.bgvid[0].dataset.key=n,0==d.bgvid.find(".rs-fullvideo-cover").length)&&d.bgvid.append('<div class="rs-fullvideo-cover"></div>'),D[e].scrolleffect.set?(D[e].scrolleffect.bgs.push({fade:g.f!==C?g.f:!!D[e].scrolleffect.slide&&D[e].scrolleffect.fade,blur:g.b!==C?g.b:!!D[e].scrolleffect.slide&&D[e].scrolleffect.blur,grayscale:g.g!==C?g.g:!!D[e].scrolleffect.slide&&D[e].scrolleffect.grayscale,c:d.wrap.wrap("<rs-sbg-effectwrap></rs-sbg-effectwrap>").parent()}),s.prepend(d.wrap.parent().parent())):s.prepend(d.wrap.parent())}"carousel"===D[e].sliderType?(tpGS.gsap.set(D[e].carousel.wrap,{opacity:0}),D[e].c[0].appendChild(D[e].carousel.wrap[0])):D[e].c[0].appendChild(D[e].canvas[0])},M=function(e,t){e.bg=e.bg===C?"":e.bg;var i,a=e.bg.split(";"),r={bgposition:"50% 50%",bgfit:"cover",bgrepeat:"no-repeat",bgcolor:"transparent"};for(i in a)if(a.hasOwnProperty(i)){var o=a[i].split(":"),s=o[0],o=o[1],n="";switch(s){case"p":n="bgposition";break;case"f":n="bgfit";break;case"r":n="bgrepeat";break;case"c":n="bgcolor"}n!==C&&(r[n]=o)}return D[t].fallbacks.panZoomDisableOnMobile&&D.ISM&&(r.panzoom=C,r.bgfit="cover",e.panzoom=C),T.extend(!0,e,r)},m=function(a){4!=D[a].syncload&&D[a].loadqueue&&T.each(D[a].loadqueue,function(e,t){var i;"prepared"==t.progress&&D[a].syncload<=4&&(D[a].syncload++,"img"==t.type?(i=new Image,D.sA(i,"reference",t.src),"RS-SBG"==t.img.tagName&&t.img&&t.img.alt&&(i.alt=t.img.alt),!/^([\w]+\:)?\/\//.test(t.src)||-1!==t.src.indexOf(location.host)&&-1===t.src.indexOf("."+location.host)||""===D[a].imgCrossOrigin||D[a].imgCrossOrigin===C||(i.crossOrigin=D[a].imgCrossOrigin),i.onload=function(){r(this,a,"loaded"),t.error=!1},i.onerror=function(){i.failedOnce||(i.failedOnce=!0,delete i.crossOrigin,i.removeAttribute("crossorigin"),i.src=t.src,r(this,a,"failed"),t.error=!0)},i.src=t.src,t.starttoload=Date.now()):T.get(t.src,function(e){t.innerHTML=(new XMLSerializer).serializeToString(e.documentElement),t.progress="loaded",D[a].syncload--,m(a)}).fail(function(){t.progress="failed",D[a].syncload--,m(a)}),t.progress="inload")})},v=function(e,t){return console.log("Static Image "+e+"  Could not be loaded in time. Error Exists:"+t),!0},f=function(e,t){return 5e3<Date.now()-D[t][e+"starttime"]&&1!=D[t][e+"warning"]&&(D[t][e+"warning"]=!0,e=e+" Api Could not be loaded !","https:"===location.protocol&&(e+=" Please Check and Renew SSL Certificate !"),console.error(e),D[t].c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c;  font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+e+"</strong></div>")),!0},z=function(e){D[e]!==C&&(D[e].pr_active_slide=T(D[e].slides[D[e].pr_active_key]),D[e].pr_next_slide=T(D[e].slides[D[e].pr_processing_key]),D[e].pr_active_bg=D[e].pr_active_slide.find("rs-sbg-wrap"),D[e].pr_next_bg=D[e].pr_next_slide.find("rs-sbg-wrap"),D[e].pr_active_bg!==C&&0<D[e].pr_active_bg.length&&tpGS.gsap.to(D[e].pr_active_bg,.5,{opacity:0}),D[e].pr_next_bg!==C&&0<D[e].pr_next_bg.length&&tpGS.gsap.to(D[e].pr_next_bg,.5,{opacity:0}),tpGS.gsap.set(D[e].pr_active_slide,{zIndex:18}),D[e].pr_next_slide!==C&&0<D[e].pr_next_slide.length&&tpGS.gsap.set(D[e].pr_next_slide,{autoAlpha:0,zIndex:20}),D[e].tonpause=!1,D[e].pr_active_key!==C&&D.removeTheLayers(D[e].pr_active_slide,e,!0),D[e].firststart=1,setTimeout(function(){delete D[e].pr_active_key,delete D[e].pr_processing_key},200))},y=function(e,t,i){if(D[e]!==C)if(clearTimeout(D[e].waitWithSwapSlide),D[e].pr_processing_key!==C&&!0===D[e].firstSlideShown)D[e].waitWithSwapSlide=setTimeout(function(){y(e,t)},18);else{if(clearTimeout(D[e].waitWithSwapSlide),D[e].startWithSlideKey!==C&&(D[e].pr_next_key=D.getComingSlide(e,D[e].startWithSlideKey).nindex,D[e].startedWithOtherSlide=!0,delete D[e].startWithSlideKey),D[e].pr_active_slide=T(D[e].slides[D[e].pr_active_key]),D[e].pr_next_slide=T(D[e].slides[D[e].pr_next_key]),D[e].pr_next_key==D[e].pr_active_key)return delete D[e].pr_next_key;var a=D.gA(D[e].pr_next_slide[0],"key"),a=(D[e].sbgs[a]!==C&&D[e].sbgs[a].bgvid&&0<D[e].sbgs[a].bgvid.length&&(D[e].videos==C||D[e].videos[D[e].sbgs[a].bgvid[0].id]===C)&&D.manageVideoLayer(D[e].sbgs[a].bgvid,e,a),D[e].pr_processing_key=D[e].pr_next_key,D[e].pr_cache_pr_next_key=D[e].pr_next_key,delete D[e].pr_next_key,D[e].pr_next_slide!==C&&D[e].pr_next_slide[0]!==C&&D.gA(D[e].pr_next_slide[0],"hal")!==C&&D.sA(D[e].pr_next_slide[0],"sofacounter",D.gA(D[e].pr_next_slide[0],"sofacounter")===C?1:parseInt(D.gA(D[e].pr_next_slide[0],"sofacounter"),0)+1),D[e].stopLoop&&D[e].pr_processing_key==D[e].lastslidetoshow-1&&(D[e].progressC.css({visibility:"hidden"}),D[e].c.trigger("revolution.slide.onstop"),D[e].noloopanymore=1),D[e].pr_next_slide.index()===D[e].slideamount-1&&0<D[e].looptogo&&"disabled"!==D[e].looptogo&&(D[e].looptogo--,D[e].looptogo<=0)&&(D[e].stopLoop=!0),D[e].tonpause=!0,D[e].slideInSwapTimer=!0,D[e].c.trigger("stoptimer"),"off"===D[e].spinner?D[e].loader!==C&&!0===D[e].loaderVisible&&(D[e].loader.css({display:"none"}),D[e].loaderVisible=!1):D[e].loadertimer=setTimeout(function(){D[e].loader!==C&&!0!==D[e].loaderVisible&&(D[e].loader.css({display:"block"}),D[e].loaderVisible=!0)},100),"carousel"===D[e].sliderType&&"all"!==D[e].lazyType?D.loadVisibleCarouselItems(e):D[e].pr_next_slide[0]);D.loadImages(a,e,1),D.preLoadAudio&&D.preLoadAudio(D[e].pr_next_slide,e,1),D.waitForCurrentImages(a,e,function(){D[e].firstSlideShown=!0,D[e].pr_next_slide.find("rs-bgvideo").each(function(){D.prepareCoveredVideo(e)}),D.loadUpcomingContent(e),window.requestAnimationFrame(function(){W(D[e].pr_next_slide.find("rs-sbg"),e,t,i)})})}},W=function(e,t,i,a){if(D[t]!==C){_(t),D[t].pr_active_slide=T(D[t].slides[D[t].pr_active_key]),D[t].pr_next_slide=T(D[t].slides[D[t].pr_processing_key]),D[t].pr_active_bg=D[t].pr_active_slide.find("rs-sbg-wrap"),D[t].pr_next_bg=D[t].pr_next_slide.find("rs-sbg-wrap"),D[t].tonpause=!1,clearTimeout(D[t].loadertimer),D[t].loader!==C&&!0===D[t].loaderVisible&&(window.requestAnimationFrame(function(){D[t].loader.css({display:"none"})}),D[t].loaderVisible=!1),D[t].onBeforeSwap={slider:t,slideIndex:parseInt(D[t].pr_active_key,0)+1,slideLIIndex:D[t].pr_active_key,nextSlideIndex:parseInt(D[t].pr_processing_key,0)+1,nextSlideLIIndex:D[t].pr_processing_key,nextslide:D[t].pr_next_slide,slide:D[t].pr_active_slide,currentslide:D[t].pr_active_slide,prevslide:D[t].pr_lastshown_key!==C?D[t].slides[D[t].pr_lastshown_key]:""},"carousel"!==D[t].sliderType&&tpGS.gsap.set(D[t].pr_next_slide,{display:"block"}),D[t].c.trigger("revolution.slide.onbeforeswap",D[t].onBeforeSwap);var r,o=D.gA(D[t].pr_active_slide[0],"key"),o=D[t].sbgs[o];if(o&&o.panzoom&&o.pzAnim&&(o.pzLastFrame=!0,D.pzDrawShadow(t,o,o.pzAnim.start)),D[t].sbgs[D.gA(D[t].pr_next_slide[0],"key")]&&tpGS.gsap.fromTo(D[t].sbgs[D.gA(D[t].pr_next_slide[0],"key")].overlay,{opacity:0},{opacity:1,duration:1,ease:"none"}),o&&tpGS.gsap.to(o.overlay,{opacity:0,duration:1,ease:"none"}),D[t].transition=1,D[t].stopByVideo=!1,D[t].pr_next_slide[0]!==C&&D.gA(D[t].pr_next_slide[0],"duration")!=C&&""!=D.gA(D[t].pr_next_slide[0],"duration")?D[t].duration=parseInt(D.gA(D[t].pr_next_slide[0],"duration"),0):D[t].duration=D[t].origcd,D[t].pr_next_slide[0]===C||"true"!=D.gA(D[t].pr_next_slide[0],"ssop")&&!0!==D.gA(D[t].pr_next_slide[0],"ssop")?D[t].ssop=!1:D[t].ssop=!0,D[t].sbtimeline.set&&D[t].sbtimeline.fixed&&D.updateFixedScrollTimes(t),D[t].c.trigger("nulltimer"),D[t].sdir=("bullet"===D[t].sc_indicator||D[t].pr_active_key!=D[t].slideamount-1||0!=D[t].pr_processing_key)&&D[t].pr_processing_key<D[t].pr_active_key?1:0,"arrow"==D[t].sc_indicator&&(D[t].sdir=D[t].sc_indicator_dir),D[t].lsdir=D[t].sdir,D[t].pr_active_key!=D[t].pr_processing_key&&1!=D[t].firststart&&"carousel"!==D[t].sliderType&&D.removeTheLayers&&D.removeTheLayers(D[t].pr_active_slide,t),1!==D.gA(D[t].pr_next_slide[0],"rspausetimeronce")&&1!==D.gA(D[t].pr_next_slide[0],"rspausetimeralways")?D[t].c.trigger("restarttimer"):(D[t].stopByVideo=!0,D.unToggleState(D[t].slidertoggledby)),D.sA(D[t].pr_next_slide[0],"rspausetimeronce",0),D[t].pr_next_slide[0]!==C&&D.sA(D[t].c[0],"slideactive",D.gA(D[t].pr_next_slide[0],"key")),"carousel"==D[t].sliderType?(D[t].mtl=tpGS.gsap.timeline(),D.prepareCarousel(t),"v"!=D[t].carousel.orientation&&"fullscreen"!==D[t].sliderLayout||tpGS.gsap.set(D[t].canvas,{height:D[t].carousel.slide_height}),w(t,a),D.updateSlideBGs(t),!0!==D[t].carousel.checkFVideo&&(r=D.gA(D[t].pr_next_slide[0],"key"),D[t].sbgs[r]!==C&&D[t].sbgs[r].bgvid!==C&&0!==D[t].sbgs[r].bgvid.length&&D.playBGVideo(t,r),D[t].carousel.checkFVideo=!0),D[t].transition=0,D[t].startedWithOtherSlide&&(setTimeout(function(){D[t].carousel.focused=D[t].pr_active_key,D.positionCarousel(t)}),delete D[t].startedWithOtherSlide)):(D[t].pr_lastshown_key=D[t].pr_lastshown_key===C?D[t].pr_next_key!==C?D[t].pr_next_key:D[t].pr_processing_key!==C?D[t].pr_processing_key:D[t].pr_active_key!==C?D[t].pr_active_key:D[t].pr_lastshown_key:D[t].pr_lastshown_key,D[t].mtl=tpGS.gsap.timeline({paused:!0,onComplete:function(){w(t)}}),D[t].pr_next_key!==C?D.animateTheLayers({slide:D[t].pr_next_key,id:t,mode:"preset",caller:"swapSlideProgress_1"}):D[t].pr_processing_key!==C?D.animateTheLayers({slide:D[t].pr_processing_key,id:t,mode:"preset",caller:"swapSlideProgress_2"}):D[t].pr_active_key!==C&&D.animateTheLayers({slide:D[t].pr_active_key,id:t,mode:"preset",caller:"swapSlideProgress_3"}),1==D[t].firststart&&(D[t].pr_active_slide[0]!==C&&tpGS.gsap.set(D[t].pr_active_slide,{autoAlpha:0}),D[t].firststart=0),D[t].pr_active_slide[0]!==C&&tpGS.gsap.set(D[t].pr_active_slide,{zIndex:18}),D[t].pr_next_slide[0]!==C&&tpGS.gsap.set(D[t].pr_next_slide,{autoAlpha:0,zIndex:20}),r=D.gA(D[t].pr_next_slide[0],"key"),D[t].sbgs[r]!==C&&D[t].sbgs[r].alt===C&&(D[t].sbgs[r].alt=D.gA(D[t].pr_next_slide[0],"alttrans")||!1,D[t].sbgs[r].alt=!1!==D[t].sbgs[r].alt&&D[t].sbgs[r].alt.split(","),D[t].sbgs[r].altIndex=0,D[t].sbgs[r].altLen=!1!==D[t].sbgs[r].alt?D[t].sbgs[r].alt.length:0),D[t].firstSlideAnimDone===C&&D[t].fanim!==C&&!1!==D[t].fanim||(D[t].sbgs[r].slideanimation===C||D[t].sbgs[r].slideanimationRebuild||(D[t].sbgs[r].random!==C&&D.SLTR!==C||0<D[t].sbgs[r].altLen&&D.SLTR)),D[t].sbgs[r].slideanimation=D[t].firstSlideAnimDone===C&&D[t].fanim!==C&&!1!==D[t].fanim?D.convertSlideAnimVals(T.extend(!0,{},D.getSlideAnim_EmptyObject(),D[t].fanim)):D[t].sbgs[r].slideanimation===C||D[t].sbgs[r].slideanimationRebuild||0<D[t].sbgs[r].altLen&&"default_first_anim"==D[t].sbgs[r].alt[D[t].sbgs[r].altIndex]?D.getSlideAnimationObj(t,{anim:D.gA(D[t].pr_next_slide[0],"anim"),filter:D.gA(D[t].pr_next_slide[0],"filter"),in:D.gA(D[t].pr_next_slide[0],"in"),out:D.gA(D[t].pr_next_slide[0],"out"),d3:D.gA(D[t].pr_next_slide[0],"d3")},r):D[t].sbgs[r].random!==C&&D.SLTR!==C?D.convertSlideAnimVals(T.extend(!0,{},D.getSlideAnim_EmptyObject(),D.getAnimObjectByKey(D.getRandomSlideTrans(D[t].sbgs[r].random.rndmain,D[t].sbgs[r].random.rndgrp,D.SLTR),D.SLTR))):0<D[t].sbgs[r].altLen&&D.SLTR!==C?D.convertSlideAnimVals(T.extend(!0,{altAnim:D[t].sbgs[r].alt[D[t].sbgs[r].altIndex]},D.getSlideAnim_EmptyObject(),D.getAnimObjectByKey(D[t].sbgs[r].alt[D[t].sbgs[r].altIndex],D.SLTR))):D[t].sbgs[r].slideanimation,0<D[t].sbgs[r].altLen&&(D[t].sbgs[r].firstSlideAnimDone!==C?(D[t].sbgs[r].altIndex++,D[t].sbgs[r].altIndex=D[t].sbgs[r].altIndex>=D[t].sbgs[r].altLen?0:D[t].sbgs[r].altIndex):(D[t].sbgs[r].firstSlideAnimDone=!0,D.SLTR===C&&D.SLTR_loading===C&&D.loadSlideAnimLibrary(t),D[t].sbgs[r].alt.push("default_first_anim"),D[t].sbgs[r].altLen++)),D[t].sbgs[r].currentState="animating",D.animateSlide(t,D[t].sbgs[r].slideanimation),D[t].firstSlideAnimDone===C&&D[t].fanim!==C&&!1!==D[t].fanim&&(D[t].sbgs[r].slideanimationRebuild=!0),D[t].firstSlideAnimDone=!0,D[t].pr_next_bg.data("panzoom")!==C&&requestAnimationFrame(function(){var e=D.gA(D[t].pr_next_slide[0],"key");D.startPanZoom(D[t].pr_next_bg,t,0,D.getSlideIndex(t,e),"first",e)}),D[t].mtl.pause()),D.animateTheLayers?"carousel"===D[t].sliderType?(!1!==D[t].carousel.showLayersAllTime&&(D[t].carousel.allLayersStarted?D.animateTheLayers({slide:"individual",id:t,mode:"rebuild",caller:"swapSlideProgress_5"}):D.animateTheLayers({slide:"individual",id:t,mode:"start",caller:"swapSlideProgress_4"}),D[t].carousel.allLayersStarted==C)&&(D.updateCarouselRows(t),D[t].carousel.allLayersStarted=!0),0!==D[t].firststart?D.animateTheLayers({slide:0,id:t,mode:"start",caller:"swapSlideProgress_6"}):!0!==i&&D.animateTheLayers({slide:D[t].pr_next_key!==C?D[t].pr_next_key:D[t].pr_processing_key!==C?D[t].pr_processing_key:D[t].pr_active_key,id:t,mode:"start",caller:"swapSlideProgress_7"}),D[t].firststart=0):D.animateTheLayers({slide:D[t].pr_next_key!==C?D[t].pr_next_key:D[t].pr_processing_key!==C?D[t].pr_processing_key:D[t].pr_active_key,id:t,mode:"start",caller:"swapSlideProgress_8"}):D[t].mtl!=C&&setTimeout(function(){D[t].mtl.resume()},18),"carousel"!==D[t].sliderType)if(D[t].scwDur=.001,Array.isArray(D[t].scwCallback)&&0<D[t].scwCallback.length&&D[t].pr_next_slide[0].classList.contains("rs-addon-pano-active")){D[t].scwDone=!1,D[t].scwCount=D[t].scwCallback.length;for(var s=0;s<D[t].scwCallback.length;s++)D[t].scwCallback[s]();D[t].scwTimeout=tpGS.gsap.delayedCall(2,function(){0<D[t].scwCount&&(D[t].scwTween&&"function"==typeof D[t].scwTween.kill&&(D[t].scwTween.kill(),D[t].scwTween=null),D[t].scwTween=tpGS.gsap.to(D[t].pr_next_slide,{duration:D[t].scwDur,autoAlpha:1}))})}else tpGS.gsap.to(D[t].pr_next_slide,{duration:D[t].scwDur,autoAlpha:1})}},w=function(e){if(D[e]!==C&&("done"!==D.RS_swapList[e]&&(D.RS_swapList[e]="done",t=T.inArray(e,D.RS_swapping),D.RS_swapping.splice(t,1)),D[e].firstSlideAvailable===C&&(D[e].firstSlideAvailable=!0,window.requestAnimationFrame(function(){"hero"!==D[e].sliderType&&D.createNavigation&&D[e].navigation.use&&!0!==D[e].navigation.createNavigationDone&&D.createNavigation(e)})),"carousel"===D[e].sliderType&&tpGS.gsap.to(D[e].carousel.wrap,1,{opacity:1}),D[e].pr_active_key=D[e].pr_processing_key!==C?D[e].pr_processing_key:D[e].pr_active_key,delete D[e].pr_processing_key,"scroll"!=D[e].parallax.type&&"scroll+mouse"!=D[e].parallax.type&&"mouse+scroll"!=D[e].parallax.type||(D[e].lastscrolltop=-999,D.generalObserver(D.ISM)),D[e].mtldiff=D[e].mtl.time(),delete D[e].mtl,D[e].pr_active_key!==C)){if(D.gA(D[e].slides[D[e].pr_active_key],"sloop")!==C){var i=e;if(D[i]!==C){D[i].sloops=D[i].sloops===C?{}:D[i].sloops;var t=D.gA(D[i].slides[D[i].pr_active_key],"key");if((r=D[i].sloops[t])===C){var a,r={s:2500,e:4500,r:"unlimited"},o=D.gA(D[i].slides[D[i].pr_active_key],"sloop").split(";");for(a in o)if(o.hasOwnProperty(a)){var s=o[a].split(":");switch(s[0]){case"s":r.s=parseInt(s[1],0)/1e3;break;case"e":r.e=parseInt(s[1],0)/1e3;break;case"r":r.r=s[1]}}r.r="unlimited"===r.r?-1:parseInt(r.r,0),(D[i].sloops[t]=r).key=t}r.ct={time:r.s},r.tl=tpGS.gsap.timeline({}),r.timer=tpGS.gsap.fromTo(r.ct,r.e-r.s,{time:r.s},{time:r.e,ease:"none",onRepeat:function(){for(var e in D[i].layers[r.key])D[i].layers[r.key].hasOwnProperty(e)&&D[i]._L[e].timeline.play(r.s);var t=D[i].progressC;t!==C&&t[0]!==C&&t[0].tween!==C&&t[0].tween.time(r.s)},onUpdate:function(){},onComplete:function(){}}).repeat(r.r),r.tl.add(r.timer,r.s),r.tl.time(D[i].mtldiff)}}D.sA(D[e].slides[D[e].activeRSSlide],"isactiveslide",!1),D[e].activeRSSlide=D[e].pr_active_key,D.sA(D[e].slides[D[e].activeRSSlide],"isactiveslide",!0);var n=D.gA(D[e].slides[D[e].pr_active_key],"key"),l=D.gA(D[e].slides[D[e].pr_lastshown_key],"key"),l=(D.sA(D[e].c[0],"slideactive",n),l!==C&&D[e].panzoomTLs!==C&&D[e].panzoomTLs[D.getSlideIndex(e,l)]!==C&&("carousel"===D[e].sliderType?(D[e].panzoomTLs[D.getSlideIndex(e,l)].timeScale(3),D[e].panzoomTLs[D.getSlideIndex(e,l)].reverse()):D[e].panzoomTLs[D.getSlideIndex(e,l)].pause()),b(e,n),{slider:e,slideIndex:parseInt(D[e].pr_active_key,0)+1,slideLIIndex:D[e].pr_active_key,slide:D[e].pr_next_slide,currentslide:D[e].pr_next_slide,prevSlideIndex:D[e].pr_lastshown_key!==C&&parseInt(D[e].pr_lastshown_key,0)+1,prevSlideLIIndex:D[e].pr_lastshown_key!==C&&parseInt(D[e].pr_lastshown_key,0),prevSlide:D[e].pr_lastshown_key!==C&&D[e].slides[D[e].pr_lastshown_key]}),l=(D[e].c.trigger("revolution.slide.onchange",l),D[e].c.trigger("revolution.slide.onafterswap",l),""+D[e].pr_lastshown_key!=""+D[e].pr_active_key&&"carousel"!==D[e].sliderType&&tpGS.gsap.set(l.prevSlide,{display:"none",delay:.01}),(D[e].deepLinkListener||D[e].enableDeeplinkHash)&&(n=D.gA(D[e].slides[D[e].pr_active_key],"deeplink"))!==C&&0<n.length&&(D[e].ignoreDeeplinkChange=!0,window.location.hash=D.gA(D[e].slides[D[e].pr_active_key],"deeplink")),D[e].pr_lastshown_key=D[e].pr_active_key,D[e].startWithSlide!==C&&"done"!==D[e].startWithSlide&&"carousel"===D[e].sliderType&&(D[e].firststart=0),D[e].duringslidechange=!1,0<D[e].pr_active_slide.length&&0!=D.gA(D[e].pr_active_slide[0],"hal")&&D.gA(D[e].pr_active_slide[0],"hal")<=D.gA(D[e].pr_active_slide[0],"sofacounter")&&D[e].c.revremoveslide(D[e].pr_active_slide.index()),D[e].pr_processing_key||D[e].pr_active_key||0);D[e].rowzones!=C&&(l=l>D[e].rowzones.length?D[e].rowzones.length:l),(D[e].rowzones!=C&&0<D[e].rowzones.length&&D[e].rowzones[l]!=C&&0<=l&&l<=D[e].rowzones.length&&0<D[e].rowzones[l].length||D.winH<D[e].module.height)&&D.updateDims(e),D[e].firstLetItFree===C&&(D.generalObserver(D.ISM),D[e].firstLetItFree=!0),D[e].skipAttachDetach=!1}},b=function(e,t){D[e].sbgs[t]===C||D[e].sbgs[t].loadobj.img?D[e].pr_next_bg.data("panzoom")!==C&&(D[e].panzoomTLs!==C&&D[e].panzoomTLs[D.getSlideIndex(e,t)]!==C?(D[e].panzoomTLs[D.getSlideIndex(e,t)].timeScale(1),D[e].panzoomTLs[D.getSlideIndex(e,t)].play()):D.startPanZoom(D[e].pr_next_bg,e,0,D.getSlideIndex(e,t),"play",t)):tpGS.gsap.delayedCall(.1,function(){b(e,t)})},E=function(e){D[e].c.children().each(function(){try{T(this).die("click")}catch(e){}try{T(this).die("mouseenter")}catch(e){}try{T(this).die("mouseleave")}catch(e){}try{T(this).off("hover")}catch(e){}});try{D[e].c.die("click","mouseenter","mouseleave")}catch(e){}clearInterval(D[e].cdint),D[e].c=null},_=function(e){var t,i,a,r,o=D[e].progressBar;if(D[e].progressC===C||0==D[e].progressC.length)if(D[e].progressC=T('<rs-progress style="visibility:hidden;"></rs-progress>'),"horizontal"===o.style||"vertical"===o.style){if("module"===o.basedon){for(var s="",n=0;n<D[e].slideamount;n++)s+="<rs-progress-bar></rs-progress-bar>";s+="<rs-progress-bgs>";for(n=0;n<D[e].slideamount;n++)s+="<rs-progress-bg></rs-progress-bg>";if(s+="</rs-progress-bgs>","nogap"!==o.gaptype)for(n=0;n<D[e].slideamount;n++)s+="<rs-progress-gap></rs-progress-gap>";D[e].progressC[0].innerHTML=s,!0===D[e].noDetach&&D[e].c.append(D[e].progressC),D[e].progressCBarBGS=D.getByTag(D[e].progressC[0],"RS-PROGRESS-BG"),D[e].progressCBarGAPS=D.getByTag(D[e].progressC[0],"RS-PROGRESS-GAP"),"nogap"!==o.gaptype&&tpGS.gsap.set(D[e].progressCBarGAPS,{backgroundColor:o.gapcolor,zIndex:"gapbg"===o.gaptype?17:27}),tpGS.gsap.set(D[e].progressCBarBGS,{backgroundColor:o.bgcolor})}else D[e].progressC[0].innerHTML="<rs-progress-bar></rs-progress-bar>",!0===D[e].noDetach&&D[e].c.append(D[e].progressC);D[e].progressCBarInner=D.getByTag(D[e].progressC[0],"RS-PROGRESS-BAR"),tpGS.gsap.set(D[e].progressCBarInner,{background:o.color})}else D[e].progressC[0].innerHTML='<canvas width="'+2*o.radius+'" height="'+2*o.radius+'" style="position:absolute" class="rs-progress-bar"></canvas>',!0===D[e].noDetach&&D[e].c.append(D[e].progressC),D[e].progressCBarInner=D[e].progressC[0].getElementsByClassName("rs-progress-bar")[0],D[e].progressBCanvas=D[e].progressCBarInner.getContext("2d"),D[e].progressBar.degree="cw"===D[e].progressBar.style?360:0,S(e);!0!==D[e].noDetach&&D[e].progressC.detach(),D[e].progressBar.visibility[D[e].level]&&1!=D[e].progressBar.disableProgressBar?"horizontal"===o.style||"vertical"===o.style?(t=D[e].slideamount-1,"horizontal"===o.style?(r="grid"===o.alignby?D[e].gridwidth[D[e].level]:D[e].module.width,i=Math.ceil(r/D[e].slideamount),a=Math.ceil((r-t*o.gapsize)/D[e].slideamount),tpGS.gsap.set(D[e].progressC,{visibility:"visible",top:"top"===o.vertical?o.y+("grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(0,D[e].gridOffsetHeight):0):"center"===o.vertical?"50%":"auto",bottom:"top"===o.vertical||"center"===o.vertical?"auto":o.y+("grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(0,D[e].gridOffsetHeight):0),left:"left"===o.horizontal&&"grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):"auto",right:"right"===o.horizontal&&"grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):"auto",y:"center"===o.vertical?o.y:0,height:o.size,backgroundColor:"module"===o.basedon?"transparent":o.bgcolor,marginTop:"bottom"===o.vertical||"top"===o.vertical?0:parseInt(o.size,0)/2,width:"grid"===o.alignby?D[e].gridwidth[D[e].level]:"100%"}),tpGS.gsap.set(D[e].progressCBarInner,{x:"module"===o.basedon?o.gap?function(e){return("right"===o.horizontal?t-e:e)*(a+o.gapsize)}:function(e){return("right"===o.horizontal?t-e:e)*i}:0,width:"module"===o.basedon?o.gap?a+"px":100/D[e].slideamount+"%":"100%"}),"module"===o.basedon&&(tpGS.gsap.set(D[e].progressCBarBGS,{x:"module"===o.basedon?o.gap?function(e){return e*(a+o.gapsize)}:function(e){return e*i}:0,width:"module"===o.basedon?o.gap?a+"px":100/D[e].slideamount+"%":"100%"}),tpGS.gsap.set(D[e].progressCBarGAPS,{width:o.gap?o.gapsize+"px":0,x:o.gap?function(e){return(e+1)*a+parseInt(o.gapsize,0)*e}:0}))):"vertical"===o.style&&(r="grid"===o.alignby?D[e].gridheight[D[e].level]:D[e].module.height,i=Math.ceil(r/D[e].slideamount),a=Math.ceil((r-t*o.gapsize)/D[e].slideamount),tpGS.gsap.set(D[e].progressC,{visibility:"visible",left:"left"===o.horizontal?o.x+("grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):0):"center"===o.horizontal?"50%":"auto",right:"left"===o.horizontal||"center"===o.horizontal?"auto":o.x+("grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):0),x:"center"===o.horizontal?o.x:0,top:"top"===o.vertical&&"grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(D[e].gridOffsetHeight,0):"auto",bottom:"bottom"===o.vertical&&"grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(D[e].gridOffsetHeight,0):"auto",width:o.size,marginLeft:"left"===o.horizontal||"right"===o.horizontal?0:parseInt(o.size,0)/2,backgroundColor:"module"===o.basedon?"transparent":o.bgcolor,height:"grid"===o.alignby?D[e].gridheight[D[e].level]:"100%"}),tpGS.gsap.set(D[e].progressCBarInner,{y:"module"===o.basedon?o.gap?function(e){return("bottom"===o.vertical?t-e:e)*(a+o.gapsize)}:function(e){return("bottom"===o.vertical?t-e:e)*i}:0,height:"module"===o.basedon?o.gap?a+"px":100/D[e].slideamount+"%":"100%"}),"module"===o.basedon)&&(tpGS.gsap.set(D[e].progressCBarBGS,{y:"module"===o.basedon?o.gap?function(e){return e*(a+o.gapsize)}:function(e){return e*i}:0,height:"module"===o.basedon?o.gap?a+"px":100/D[e].slideamount+"%":"100%"}),tpGS.gsap.set(D[e].progressCBarGAPS,{height:o.gap?o.gapsize+"px":0,y:o.gap?function(e){return(e+1)*a+parseInt(o.gapsize,0)*e}:0}))):tpGS.gsap.set(D[e].progressC,{top:"top"===o.vertical?o.y+("grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(0,D[e].gridOffsetHeight):0):"center"===o.vertical?"50%":"auto",bottom:"top"===o.vertical||"center"===o.vertical?"auto":o.y+("grid"===o.alignby&&D[e].gridOffsetHeight!==C?Math.max(0,D[e].gridOffsetHeight):0),left:"left"===o.horizontal?o.x+("grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):0):"center"===o.horizontal?"50%":"auto",right:"left"===o.horizontal||"center"===o.horizontal?"auto":o.x+("grid"===o.alignby&&D[e].gridOffsetWidth!==C?Math.max(0,D[e].gridOffsetWidth):0),y:"center"===o.vertical?o.y:0,x:"center"===o.horizontal?o.x:0,width:2*o.radius,height:2*o.radius,marginTop:"center"===o.vertical?0-o.radius:0,marginLeft:"center"===o.horizontal?0-o.radius:0,backgroundColor:"transparent",visibility:"visible"}):D[e].progressC[0].style.visibility="hidden",!0!==D[e].noDetach&&D[e].c.append(D[e].progressC),D[e].gridOffsetWidth===C&&"grid"===o.alignby?D[e].rebuildProgressBar=!0:D[e].rebuildProgressBar=!1},S=function(e){var t=D[e].progressBar,i=(t.radius-parseInt(t.size,0)<=0&&(t.size=t.radius/4),parseInt(t.radius)),a=parseInt(t.radius);D[e].progressBCanvas.lineCap="round",D[e].progressBCanvas.clearRect(0,0,2*t.radius,2*t.radius),D[e].progressBCanvas.beginPath(),D[e].progressBCanvas.arc(i,a,t.radius-parseInt(t.size,0),Math.PI/180*270,Math.PI/180*630),D[e].progressBCanvas.strokeStyle=t.bgcolor,D[e].progressBCanvas.lineWidth=parseInt(t.size,0)-1,D[e].progressBCanvas.stroke(),D[e].progressBCanvas.beginPath(),D[e].progressBCanvas.strokeStyle=t.color,D[e].progressBCanvas.lineWidth=parseInt(t.size,0),D[e].progressBCanvas.arc(i,a,t.radius-parseInt(t.size,0),Math.PI/180*270,Math.PI/180*(270+D[e].progressBar.degree),"cw"!==t.style),D[e].progressBCanvas.stroke()},x=function(e){D[e].progressC==C&&_(e),D[e].loop=0,D[e].stopAtSlide!=C&&-1<D[e].stopAtSlide?D[e].lastslidetoshow=D[e].stopAtSlide:D[e].lastslidetoshow=999,D[e].stopLoop=!1,0==D[e].looptogo&&(D[e].stopLoop=!0),D[e].c.on("stoptimer",function(){D[e].progressC!=C&&(D[e].progressC[0].tween.pause(),D[e].progressBar.disableProgressBar&&(D[e].progressC[0].style.visibility="hidden"),D[e].sliderstatus="paused",D[e].slideInSwapTimer||D.unToggleState(D[e].slidertoggledby),D[e].slideInSwapTimer=!1)}),D[e].c.on("starttimer",function(){D[e].progressC==C||D[e].forcepaused||(1!=D[e].conthover&&1!=D[e].stopByVideo&&D[e].module.width>D[e].hideSliderAtLimit&&1!=D[e].tonpause&&1!=D[e].overnav&&1!=D[e].ssop&&(1===D[e].noloopanymore||D[e].viewPort.enable&&!D[e].inviewport||(D[e].progressBar.visibility[D[e].level]||(D[e].progressC[0].style.visibility="visible"),D[e].progressC[0].tween.resume(),D[e].sliderstatus="playing")),!D[e].progressBar.disableProgressBar&&D[e].progressBar.visibility[D[e].level]||(D[e].progressC[0].style.visibility="hidden"),D.toggleState(D[e].slidertoggledby))}),D[e].c.on("restarttimer",function(){if(!(D[e].modal!==C&&D[e].modal.useAsModal&&"close"==D[e].modal.lastModalCall||D[e].progressC==C||D[e].forcepaused)){if(D[e].mouseoncontainer&&"on"==D[e].navigation.onHoverStop&&!D.ISM)return!1;1===D[e].noloopanymore||D[e].viewPort.enable&&!D[e].inviewport||1==D[e].ssop?D.unToggleState(D[e].slidertoggledby):(D[e].progressBar.visibility[D[e].level]||(D[e].progressC[0].style.visibility="visible"),D[e].progressC[0].tween!==C&&D[e].progressC[0].tween.kill(),D[e].progressC[0].tween=t(e),D[e].progressC[0].tween.play(),D[e].sliderstatus="playing",D.toggleState(D[e].slidertoggledby)),!D[e].progressBar.disableProgressBar&&D[e].progressBar.visibility[D[e].level]||(D[e].progressC[0].style.visibility="hidden"),D[e].mouseoncontainer&&1==D[e].navigation.onHoverStop&&!D.ISM&&(D[e].c.trigger("stoptimer"),D[e].c.trigger("revolution.slide.onpause"))}}),D[e].c.on("nulltimer",function(){D[e].progressC!=C&&D[e].progressC[0]!==C&&(D[e].progressC[0].tween!==C&&D[e].progressC[0].tween.kill(),D[e].progressC[0].tween=t(e),D[e].progressC[0].tween.pause(0),!D[e].progressBar.disableProgressBar&&D[e].progressBar.visibility[D[e].level]||(D[e].progressC[0].style.visibility="hidden"),D[e].sliderstatus="paused")}),D[e].progressC!==C&&(D[e].progressC[0].tween=t(e)),1<D[e].slideamount&&(0!=D[e].stopAfterLoops||1!=D[e].stopAtSlide)?D[e].c.trigger("starttimer"):(D[e].noloopanymore=1,D[e].c.trigger("nulltimer")),D[e].c.on("tp-mouseenter",function(){D[e].mouseoncontainer=!0,1!=D[e].navigation.onHoverStop||D.ISM||(D[e].c.trigger("stoptimer"),D[e].c.trigger("revolution.slide.onpause"))}),D[e].c.on("tp-mouseleft",function(){D[e].mouseoncontainer=!1,1!=D[e].c.data("conthover")&&1==D[e].navigation.onHoverStop&&(1==D[e].viewPort.enable&&D[e].inviewport||0==D[e].viewPort.enable)&&(D[e].c.trigger("revolution.slide.onresume"),D[e].c.trigger("starttimer"))})},N=function(){T("rs-module").each(function(){var e,t=this.id;!D[t].inviewport&&D[t].viewPort.enable||(e=D[t].pr_active_slide!==C&&D[t].pr_active_slide.data("key")!==C?D[t].pr_active_slide.data("key"):D[t].pr_next_slide!==C&&D[t].pr_next_slide.data("key")!==C?D[t].pr_next_slide.data("key"):C)!=C&&0<D[t].sbgs[e].bgvid.length&&D[t].videos[D[t].sbgs[e].bgvid[0].id].loop&&("visible"===document.visibilityState?D.playVideo(D[t].sbgs[e].bgvid,t):D.stopVideo(D[t].sbgs[e].bgvid,t))})},j=function(){var e=document.documentMode===C,t=window.chrome;1!==D.revslider_focus_blur_listener&&(D.revslider_focus_blur_listener=1,e&&!t?D.window.on("focusin",function(){!0!==D.windowIsFocused&&i(),D.windowIsFocused=!0}).on("focusout",function(){!0!==D.windowIsFocused&&D.windowIsFocused!==C||a(),D.windowIsFocused=!1}):window.addEventListener?(window.addEventListener("focus",function(e){!0!==D.windowIsFocused&&i(),D.windowIsFocused=!0},{capture:!1,passive:!0}),window.addEventListener("blur",function(e){!0!==D.windowIsFocused&&D.windowIsFocused!==C||a(),D.windowIsFocused=!1},{capture:!1,passive:!0})):(window.attachEvent("focus",function(e){!0!==D.windowIsFocused&&i(),D.windowIsFocused=!0}),window.attachEvent("blur",function(e){!0!==D.windowIsFocused&&D.windowIsFocused!==C||a(),D.windowIsFocused=!1})))},F=function(e){for(var t,i=[],a=window.location.href.slice(window.location.href.indexOf(e)+1).split("_"),r=0;r<a.length;r++)a[r]=a[r].replace("%3D","="),t=a[r].split("="),i.push(t[0]),i[t[0]]=t[1];return i},V=function(e){if(D[e].blockSpacing!==C){var t,i=D[e].blockSpacing.split(";");for(t in D[e].blockSpacing={},i)if(i.hasOwnProperty(t)){var a=i[t].split(":");switch(a[0]){case"t":D[e].blockSpacing.top=D.revToResp(a[1],4,0);break;case"b":D[e].blockSpacing.bottom=D.revToResp(a[1],4,0);break;case"l":D[e].blockSpacing.left=D.revToResp(a[1],4,0);break;case"r":D[e].blockSpacing.right=D.revToResp(a[1],4,0)}}D[e].blockSpacing.block=T(D.closestClass(D[e].c[0],"wp-block-themepunch-revslider")),D[e].level!==C&&D[e].blockSpacing!==C&&tpGS.gsap.set(D[e].blockSpacing.block,{paddingLeft:D[e].blockSpacing.left[D[e].level],paddingRight:D[e].blockSpacing.right[D[e].level],marginTop:D[e].blockSpacing.top[D[e].level],marginBottom:D[e].blockSpacing.bottom[D[e].level]})}},X=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},U=function(e){var t,i=T.extend(!0,{DPR:"dpr",sliderType:"standard",sliderLayout:"auto",overlay:{type:"none",size:1,colora:"transparent",colorb:"#000000"},duration:9e3,imgCrossOrigin:"",modal:{useAsModal:!1,cover:!0,coverColor:"rgba(0,0,0,0.5)",horizontal:"center",vertical:"middle",coverSpeed:1},navigation:{keyboardNavigation:!1,keyboard_direction:"horizontal",mouseScrollNavigation:"off",wheelViewPort:50,wheelCallDelay:"1000ms",onHoverStop:!0,mouseScrollReverse:"default",target:"window",threshold:50,touch:{touchenabled:!1,touchOnDesktop:!1,swipe_treshold:75,swipe_min_touches:1,swipe_direction:"horizontal",drag_block_vertical:!1,mobileCarousel:!0,desktopCarousel:!0},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_under:0,hide_onleave:!1,hide_delay:200,hide_delay_mobile:1200,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{enable:!1,hide_onmobile:!1,hide_onleave:!1,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"center",v_align:"bottom",space:5,h_offset:0,v_offset:20,tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>',container:"slider",rtl:!1,style:""},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"transparent",tmp:'<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!1,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"center",v_align:"bottom",h_offset:0,v_offset:20,mhoff:0,mvoff:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"transparent",tmp:'<span class="tp-tab-image"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!1,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"center",v_align:"bottom",h_offset:0,v_offset:20,mhoff:0,mvoff:0}},responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,maxHeight:0,keepBPHeight:!1,useFullScreenHeight:!0,overflowHidden:!1,forceOverflow:!1,fixedOnTop:!1,autoHeight:!1,gridEQModule:!1,disableForceFullWidth:!1,fullScreenOffsetContainer:"",fullScreenOffset:"0",hideLayerAtLimit:0,hideAllLayerAtLimit:0,hideSliderAtLimit:0,progressBar:{disableProgressBar:!1,style:"horizontal",size:"5px",radius:10,vertical:"bottom",horizontal:"left",x:0,y:0,color:"rgba(255,255,255,0.5)",bgcolor:"transparent",basedon:"slide",gapsize:0,reset:"reset",gaptype:"gapboth",gapcolor:"rgba(255,255,255,0.5)",ease:"none",visibility:{0:!0,1:!0,2:!0,3:!0}},stopAtSlide:-1,stopAfterLoops:0,shadow:0,startDelay:0,lazyType:"none",lazyOnBg:!1,spinner:"off",shuffle:!1,perspective:"600px",perspectiveType:"local",viewPort:{enable:!1,global:!1,globalDist:"-400px",outof:"wait",visible_area:"200px",presize:!1},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:!1,simplifyAll:!0,nextSlideOnWindowFocus:!1,disableFocusListener:!1,allowHTML5AutoPlayOnAndroid:!0},fanim:!1,parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",disable_onmobile:!1,ddd_shadow:!1,ddd_bgfreeze:!1,ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,speed:400,speedbg:0,speedls:0},scrolleffect:{set:!1,fade:!1,blur:!1,scale:!1,grayscale:!1,maxblur:10,layers:!1,slide:!1,direction:"both",multiplicator:1.35,multiplicator_layers:.5,tilt:30,disable_onmobile:!1},sbtimeline:{set:!1,fixed:!1,fixStart:0,fixEnd:0,layers:!1,slide:!1,ease:"none",speed:500},carousel:{orientation:"h",prevNextVis:"50px",easing:"power3.inOut",speed:800,showLayersAllTime:!1,horizontal_align:"center",vertical_align:"center",snap:!0,infinity:!1,stopOnClick:!0,space:0,maxVisibleItems:3,stretch:!1,fadeout:!0,maxRotation:0,maxOpacity:100,minScale:0,offsetScale:!1,vary_fade:!1,vary_rotation:!1,vary_scale:!1,border_radius:"0px",padding_top:0,padding_bottom:0,skewX:0,skewY:0,spin:"off",spinAngle:0,overshoot:!1},observeWrap:!1,extensions:"extensions/",extensions_suffix:".min.js",stopLoop:!1,waitForInit:!1,ignoreHeightChange:!0,onedpronmobile:!1},e);for(t in i.minHeight=i.minHeight===C||"none"===i.minHeight||"0"===i.minHeight||"0px"===i.minHeight||""==i.minHeight||" "==i.minHeight?0:parseInt(i.minHeight,0),i.maxHeight="none"===i.maxHeight||"0"===i.maxHeight?0:parseInt(i.maxHeight,0),i.carousel.maxVisibleItems=i.carousel.maxVisibleItems<1?999:i.carousel.maxVisibleItems,i.carousel.vertical_align="top"===i.carousel.vertical_align?"0%":"bottom"===i.carousel.vertical_align?"100%":"50%",i.carousel.space=parseInt(i.carousel.space,0),i.carousel.maxOpacity=parseInt(i.carousel.maxOpacity,0),i.carousel.maxOpacity=1<i.carousel.maxOpacity?i.carousel.maxOpacity/100:i.carousel.maxOpacity,i.carousel.showLayersAllTime="true"===i.carousel.showLayersAllTime||!0===i.carousel.showLayersAllTime?"all":i.carousel.showLayersAllTime,i.carousel.maxRotation=parseInt(i.carousel.maxRotation,0),i.carousel.minScale=parseInt(i.carousel.minScale,0),i.carousel.minScale=.9<i.carousel.minScale?i.carousel.minScale/100:i.carousel.minScale,i.carousel.speed=parseInt(i.carousel.speed,0),i.carousel.skewX=parseFloat(i.carousel.skewX),i.carousel.skewY=parseFloat(i.carousel.skewY),i.carousel.spinAngle=parseFloat(i.carousel.spinAngle),0===i.carousel.spinAngle&&(i.carousel.spinAngle=1),"v"===i.carousel.orientation&&(i.carousel.justify=!1),i.navigation.maintypes=["arrows","tabs","thumbnails","bullets"],i.perspective=parseInt(i.perspective,0),i.navigation.maintypes)i.navigation.maintypes.hasOwnProperty(t)&&i.navigation[i.navigation.maintypes[t]]!==C&&(i.navigation[i.navigation.maintypes[t]].animDelay=i.navigation[i.navigation.maintypes[t]].animDelay===C?1e3:i.navigation[i.navigation.maintypes[t]].animDelay,i.navigation[i.navigation.maintypes[t]].animSpeed=i.navigation[i.navigation.maintypes[t]].animSpeed===C?1e3:i.navigation[i.navigation.maintypes[t]].animSpeed,i.navigation[i.navigation.maintypes[t]].animDelay=parseInt(i.navigation[i.navigation.maintypes[t]].animDelay,0)/1e3,i.navigation[i.navigation.maintypes[t]].animSpeed=parseInt(i.navigation[i.navigation.maintypes[t]].animSpeed,0)/1e3);if(D.isNumeric(i.scrolleffect.tilt)||-1!==i.scrolleffect.tilt.indexOf("%")&&(i.scrolleffect.tilt=parseInt(i.scrolleffect.tilt)),i.scrolleffect.tilt=i.scrolleffect.tilt/100,i.navigation.thumbnails.position="outer-horizontal"==i.navigation.thumbnails.position?"bottom"==i.navigation.thumbnails.v_align?"outer-bottom":"outer-top":"outer-vertical"==i.navigation.thumbnails.position?"left"==i.navigation.thumbnails.h_align?"outer-left":"outer-right":i.navigation.thumbnails.position,i.navigation.tabs.position="outer-horizontal"==i.navigation.tabs.position?"bottom"==i.navigation.tabs.v_align?"outer-bottom":"outer-top":"outer-vertical"==i.navigation.tabs.position?"left"==i.navigation.tabs.h_align?"outer-left":"outer-right":i.navigation.tabs.position,i.sbtimeline.speed=parseInt(i.sbtimeline.speed,0)/1e3||.5,!0===i.sbtimeline.set&&!0===i.sbtimeline.fixed&&"auto"!==i.sliderLayout?(i.sbtimeline.fixStart=parseInt(i.sbtimeline.fixStart),i.sbtimeline.fixEnd=parseInt(i.sbtimeline.fixEnd)):i.sbtimeline.fixed=!1,i.progressBar===C||"true"!=i.progressBar.disableProgressBar&&1!=i.progressBar.disableProgressBar||(i.progressBar.disableProgressBar=!0),i.startDelay=parseInt(i.startDelay,0)||0,i.navigation!==C&&i.navigation.arrows!=C&&i.navigation.arrows.hide_under!=C&&(i.navigation.arrows.hide_under=parseInt(i.navigation.arrows.hide_under)),i.navigation!==C&&i.navigation.bullets!=C&&i.navigation.bullets.hide_under!=C&&(i.navigation.bullets.hide_under=parseInt(i.navigation.bullets.hide_under)),i.navigation!==C&&i.navigation.thumbnails!=C&&i.navigation.thumbnails.hide_under!=C&&(i.navigation.thumbnails.hide_under=parseInt(i.navigation.thumbnails.hide_under)),i.navigation!==C&&i.navigation.tabs!=C&&i.navigation.tabs.hide_under!=C&&(i.navigation.tabs.hide_under=parseInt(i.navigation.tabs.hide_under)),i.navigation!==C&&i.navigation.arrows!=C&&i.navigation.arrows.hide_over!=C&&(i.navigation.arrows.hide_over=parseInt(i.navigation.arrows.hide_over)),i.navigation!==C&&i.navigation.bullets!=C&&i.navigation.bullets.hide_over!=C&&(i.navigation.bullets.hide_over=parseInt(i.navigation.bullets.hide_over)),i.navigation!==C&&i.navigation.thumbnails!=C&&i.navigation.thumbnails.hide_over!=C&&(i.navigation.thumbnails.hide_over=parseInt(i.navigation.thumbnails.hide_over)),i.navigation!==C&&i.navigation.tabs!=C&&i.navigation.tabs.hide_over!=C&&(i.navigation.tabs.hide_over=parseInt(i.navigation.tabs.hide_over)),i.lazyloaddata!==C&&0<i.lazyloaddata.length&&0<i.lazyloaddata.indexOf("-")){var a=i.lazyloaddata.split("-");i.lazyloaddata=a[0];for(t=1;t<a.length;t++)i.lazyloaddata+=X(a[t])}return i.duration=parseInt(i.duration),"single"===i.lazyType&&"carousel"===i.sliderType&&(i.lazyType="smart"),"carousel"===i.sliderType&&i.carousel.justify&&(i.justifyCarousel=!0,i.keepBPHeight=!0),i.enableUpscaling=1==i.enableUpscaling&&"carousel"!==i.sliderType&&"fullwidth"===i.sliderLayout,i.useFullScreenHeight="carousel"===i.sliderType&&"fullscreen"===i.sliderLayout&&!0===i.useFullScreenHeight&&"v"!==i.carousel.orientation,i.progressBar.y=parseInt(i.progressBar.y,0),i.progressBar.x=parseInt(i.progressBar.x,0),"IE"!==window.RSBrowser&&i.customEases!==C&&(!i.customEases.SFXBounceLite&&"true"!=i.customEases.SFXBounceLite||tpGS.SFXBounceLite!==C||(tpGS.SFXBounceLite=tpGS.CustomBounce.create("SFXBounceLite",{strength:.3,squash:1,squashID:"SFXBounceLite-squash"})),!i.customEases.SFXBounceSolid&&"true"!=i.customEases.SFXBounceSolid||tpGS.SFXBounceSolid!==C||(tpGS.SFXBounceSolid=tpGS.CustomBounce.create("SFXBounceSolid",{strength:.5,squash:2,squashID:"SFXBounceSolid-squash"})),!i.customEases.SFXBounceStrong&&"true"!=i.customEases.SFXBounceStrong||tpGS.SFXBounceStrong!==C||(tpGS.SFXBounceStrong=tpGS.CustomBounce.create("SFXBounceStrong",{strength:.7,squash:3,squashID:"SFXBounceStrong-squash"})),!i.customEases.SFXBounceExtrem&&"true"!=i.customEases.SFXBounceExtrem||tpGS.SFXBounceExtrem!==C||(tpGS.SFXBounceExtrem=tpGS.CustomBounce.create("SFXBounceExtrem",{strength:.9,squash:4,squashID:"SFXBounceExtrem-squash"})),!i.customEases.BounceLite&&"true"!=i.customEases.BounceLite||tpGS.BounceLite!==C||(tpGS.BounceLite=tpGS.CustomBounce.create("BounceLite",{strength:.3})),!i.customEases.BounceSolid&&"true"!=i.customEases.BounceSolid||tpGS.BounceSolid!==C||(tpGS.BounceSolid=tpGS.CustomBounce.create("BounceSolid",{strength:.5})),!i.customEases.BounceStrong&&"true"!=i.customEases.BounceStrong||tpGS.BounceStrong!==C||(tpGS.BounceStrong=tpGS.CustomBounce.create("BounceStrong",{strength:.7})),!i.customEases.BounceExtrem&&"true"!=i.customEases.BounceExtrem||tpGS.BounceExtrem!==C||(tpGS.BounceExtrem=tpGS.CustomBounce.create("BounceExtrem",{strength:.9}))),i.modal.coverSpeed=parseFloat(i.modal.coverSpeed),i.modal.coverSpeed=200<i.modal.coverSpeed?i.modal.coverSpeed/1e3:i.modal.coverSpeed,i.modal.coverSpeed=Math.max(Math.min(3,i.modal.coverSpeed),.3),i.navigation.wheelViewPort=i.navigation.wheelViewPort===C?.5:i.navigation.wheelViewPort/100,i.navigation.wheelCallDelay=i.navigation.wheelCallDelay===C?1e3:parseInt(i.navigation.wheelCallDelay),i.autoDPR="string"==typeof i.DPR&&-1!==i.DPR.indexOf("ax"),i.DPR=i.DPR.replace("ax",""),i.DPR=parseInt(i.DPR.replace("x","")),i.DPR=isNaN(i.DPR)?window.devicePixelRatio:i.autoDPR?Math.min(window.devicePixelRatio,i.DPR):i.DPR,i.DPR=1!=i.onedpronmobile&&"true"!=i.onedpronmobile||!D.ISM?i.DPR:1,!1===i.viewPort.global?i.viewPort.enable=!1:!0===i.viewPort.global&&(i.viewPort.local=i.viewPort.enable,i.viewPort.enable=!0),i.carousel!==C&&"v"==i.carousel.orientation&&(i.carousel.prevNextVisType=(""+i.carousel.prevNextVis).includes("%")?"%":"px",i.carousel.prevNextVis=parseInt(i.carousel.prevNextVis,0)/("%"==i.carousel.prevNextVisType?100:1)),i},k=(window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.waiting=window.RS_MODULES.waiting||[],["DOM","main","parallax","video","slideanims","actions","layeranimation","navigation","carousel","panzoom"]);for(e in k)-1==window.RS_MODULES.waiting.indexOf(k[e])&&window.RS_MODULES.waiting.push(k[e]);function O(e){window.elementorFrontend!==C&&elementorFrontend.hooks!==C&&elementorFrontend.hooks.removeAction("frontend/element_ready/global",O),window.RS_MODULES.elementor={loaded:!0,version:"6.5.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}function R(){if(window.elementorFrontend===C||window.elementorFrontend.hooks===C||window.elementorFrontend.hooks.addAction===C)return window.RS_MODULES.elementorCounter++,window.RS_MODULES.elementorCounterCheck&&20<window.RS_MODULES.elementorCounter?void O():void requestAnimationFrame(R);window.elementorFrontend.config.environmentMode.edit?elementorFrontend.hooks.addAction("frontend/element_ready/widget",O):O()}function L(){1!=RS_MODULES.checkElementorCalled&&(RS_MODULES.checkElementorCalled=!0,document.body)&&(0<=document.body.className.indexOf("elementor-page")||0<=document.body.className.indexOf("elementor-default"))&&(window.RS_MODULES.waiting=window.RS_MODULES.waiting===C?[]:window.RS_MODULES.waiting,-1==window.RS_MODULES.waiting.indexOf("elementor")&&window.RS_MODULES.waiting.push("elementor"),document.body&&-1==document.body.className.indexOf("elementor-editor-active")&&(window.RS_MODULES.elementorCounterCheck=!0),window.RS_MODULES.elementorCounter=0,R())}window.RS_MODULES.main={loaded:!0,version:o},window.RS_MODULES.minimal=!1,window.RS_MODULES.callSliders=function(){for(var e in RS_MODULES.modules)!0!==RS_MODULES.modules[e].once&&window.RS_MODULES!==C&&window.RS_MODULES.minimal&&(RS_MODULES.modules[e].once=!0,RS_MODULES.modules[e].init())},"loading"===document.readyState?document.addEventListener("readystatechange",function(){"interactive"!==document.readyState&&"complete"!==document.readyState||(L(),window.RS_MODULES.DOM={loaded:!0},window.RS_MODULES.checkMinimal())}):"complete"!==document.readyState&&"interactive"!==document.readyState||(L(),window.RS_MODULES.DOM={loaded:!0}),window.RS_MODULES.checkMinimal=function(){if(0==window.RS_MODULES.minimal){var e=1==window.RS_MODULES.minimal||window.RS_MODULES.waiting!==C&&T.fn.revolution!==C&&window.tpGS!==C&&window.tpGS.gsap!==C;if(e)for(var t in window.RS_MODULES.waiting)window.RS_MODULES.waiting.hasOwnProperty(t)&&"function"!=typeof window.RS_MODULES.waiting[t]&&e&&window.RS_MODULES[window.RS_MODULES.waiting[t]]===C&&(e=!1);e&&(!0!==window.RS_MODULES.minimal&&T(document).trigger("REVSLIDER_READY_TO_USE"),window.RS_MODULES.minimal=!0)}else window.RS_MODULES.minimal=!0;!0===window.RS_MODULES.minimal&&window.RS_MODULES.callSliders()},window.RS_MODULES.checkMinimal()}(jQuery),!function($,undefined){"use strict";var version="6.6.0",_R=(jQuery.fn.revolution=jQuery.fn.revolution||{},jQuery.fn.revolution),moduleEnterLeaveActions=(jQuery.extend(!0,_R,{checkActions:function(e,t){e===undefined?moduleEnterLeaveActions(t):checkActions_intern(e,t)},delayer:function(e,t,i){_R[e].timeStamps=_R[e].timeStamps===undefined?{}:_R[e].timeStamps;var a=(new Date).getTime(),r=_R[e].timeStamps[i]===undefined?parseInt(t)+100:a-_R[e].timeStamps[i],r=parseInt(r)>t;return r&&(_R[e].timeStamps[i]=a),r},getURLDetails:function(e){(e=e===undefined?{}:e).url=e.url===undefined?window.location.href:e.url,e.url=e.url.replace("www",""),e.protocol=0===e.url.indexOf("http://")?"http://":0===e.url.indexOf("https://")?"https://":0===e.url.indexOf("//")?"//":"relative";var t=(t=e.url.replace("https://","")).replace("http://",""),t=(t=(t="relative"===e.protocol?t.replace("//",""):t).split("#"),e.anchor=(e.anchor===undefined||""==e.anchor||0==e.anchor.length)&&1<t.length?t[1]:e.anchor===undefined?"":e.anchor.replace("#",""),e.anchor=e.anchor.split("?"),e.queries=t[0].split("?"),e.queries=1<e.queries.length?e.queries[1]:"",e.queries=1<e.queries.length?e.queries[1]:1<e.anchor.length?e.anchor[1]:e.queries,e.anchor=e.anchor[0],(t=t[0]).split("/"),t.split("/"));return e.host=t[0],t.splice(0,1),e.path="/"+t.join("/"),"/"==e.path[e.path.length-1]&&(e.path=e.path.slice(0,-1)),e.origin="relative"!==e.protocol?e.protocol+e.host:window.location.origin.replace("www","")+window.location.pathname,e.hash=(""!==e.queries&&e.queries!==undefined?"?"+e.queries:"")+(""!==e.anchor&&e.anchor!==undefined?"#"+e.anchor:""),e},scrollToId:function(e){var t,i;_R.scrollToObj=e,window.isSafari11||(t=tpGS.gsap.getProperty("html","scrollBehavior"),i=tpGS.gsap.getProperty("body","scrollBehavior"),tpGS.gsap.set("html,body",{scrollBehavior:"auto"}),e.scrollBehaviorHtml=t,e.scrollBehaviorBody=i),_R.calcScrollToId()},calcScrollToId:function(){var e,t,i,a,r;_R.scrollToObj&&(t=(e=_R.scrollToObj).tween&&e.tween.progress?e.tween.progress():0,e.tween&&e.tween.kill&&e.tween.kill(),e.startScrollPos!==undefined&&null!==e.startScrollPos||(e.startScrollPos=(_R[e.id].modal.useAsModal?_R[e.id].cpar:_R.document).scrollTop()),i="scrollbelow"===e.action?(getOffContH(_R[e.id].fullScreenOffsetContainer)||0)-(parseInt(e.offset,0)||0)||0:0-(parseInt(e.offset,0)||0),a=0<(a="scrollbelow"===e.action?_R[e.id].c:jQuery("#"+e.anchor)).length?a.offset().top:0,r={_y:_R[e.id].modal.useAsModal?_R[e.id].cpar[0].scrollTop:window.pageYOffset===document.documentElement.scrollTop||0!==window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop},a+="scrollbelow"===e.action?_R[e.id].sbtimeline.fixed?_R[e.id].cpar.parent().height()+_R[e.id].fullScreenOffsetResult:jQuery(_R[e.id].slides[0]).height():0,e.tween=tpGS.gsap.fromTo(r,e.speed/1e3,{_y:e.startScrollPos},{_y:a-i,ease:e.ease,onUpdate:function(){(_R[e.id].modal.useAsModal?_R[e.id].cpar:_R.document).scrollTop(r._y)},onComplete:function(){e.hash!==undefined&&history.pushState(null,null,e.hash),window.isSafari11||(tpGS.gsap.set("html",{scrollBehavior:e.scrollBehaviorHtml}),tpGS.gsap.set("body",{scrollBehavior:e.scrollBehaviorBody})),_R.scrollToObj&&(_R.scrollToObj.tween&&(_R.scrollToObj.tween.kill(),_R.scrollToObj.tween=null),_R.scrollToObj.startScrollPos=null,_R.scrollToObj=null)}}),e.tween.progress(t))}}),function(i){!_R[i].moduleActionsPrepared&&0<_R[i].c[0].getElementsByClassName("rs-on-sh").length&&(_R[i].c.on("tp-mouseenter",function(){_R[i].mouseoncontainer=!0;var e,t=_R[i].pr_next_key!==undefined?_R[i].pr_next_key:_R[i].pr_processing_key!==undefined?_R[i].pr_processing_key:_R[i].pr_active_key!==undefined?_R[i].pr_active_key:_R[i].pr_next_key;if("none"!==t&&t!==undefined){if((t=_R.gA(_R[i].slides[t],"key"))!==undefined&&_R[i].layers[t])for(e in _R[i].layers[t])0<=_R[i].layers[t][e].className.indexOf("rs-on-sh")&&_R.renderLayerAnimation({layer:jQuery(_R[i].layers[t][e]),frame:"frame_1",mode:"trigger",id:i});for(e in _R[i].layers.static)0<=_R[i].layers.static[e].className.indexOf("rs-on-sh")&&_R.renderLayerAnimation({layer:jQuery(_R[i].layers.static[e]),frame:"frame_1",mode:"trigger",id:i})}}),_R[i].c.on("tp-mouseleft",function(){_R[i].mouseoncontainer=!0;var e,t=_R[i].pr_next_key!==undefined?_R[i].pr_next_key:_R[i].pr_processing_key!==undefined?_R[i].pr_processing_key:_R[i].pr_active_key!==undefined?_R[i].pr_active_key:_R[i].pr_next_key;if("none"!==t&&t!==undefined){if((t=_R.gA(_R[i].slides[t],"key"))!==undefined&&_R[i].layers[t])for(e in _R[i].layers[t])0<=_R[i].layers[t][e].className.indexOf("rs-on-sh")&&_R.renderLayerAnimation({layer:jQuery(_R[i].layers[t][e]),frame:"frame_999",mode:"trigger",id:i});for(e in _R[i].layers.static)0<=_R[i].layers.static[e].className.indexOf("rs-on-sh")&&_R.renderLayerAnimation({layer:jQuery(_R[i].layers.static[e]),frame:"frame_999",mode:"trigger",id:i})}})),_R[i].moduleActionsPrepared=!0}),checkActions_intern=function(layer,id){var actions=_R.gA(layer[0],"actions"),wrap,_L=("RS-COLUMN"==layer[0].tagName&&(wrap=_R.closestNode(layer[0],"RS-COLUMN-WRAP"),null!==wrap)&&wrap!==undefined&&(_R.sA(wrap,"action",actions),layer=jQuery(wrap)),layer.data()),ei,actions=actions.split("||");for(ei in layer.addClass("rs-waction"),_L.events=_L.events===undefined?[]:_L.events,actions)if(actions.hasOwnProperty(ei)){var event=getEventParams(actions[ei].split(";")),targetlayer=(_L.events.push(event),"click"===event.on&&layer[0].classList.add("rs-wclickaction"),_R[id].fullscreen_esclistener||"exitfullscreen"!=event.action&&"togglefullscreen"!=event.action||(_R.document.keyup(function(e){27==e.keyCode&&0<jQuery("#rs-go-fullscreen").length&&layer.trigger(event.on)}),_R[id].fullscreen_esclistener=!0),"backgroundvideo"==event.layer?jQuery("rs-bgvideo"):"firstvideo"==event.layer?jQuery("rs-slide").find(".rs-layer-video"):jQuery("#"+event.layer));switch(-1!=jQuery.inArray(event.action,["toggleslider","toggle_mute_video","toggle_global_mute_video","togglefullscreen"])&&(_L._togglelisteners=!0),event.action){case"togglevideo":jQuery.each(targetlayer,function(){updateToggleByList(jQuery(this),"videotoggledby",layer[0].id)});break;case"togglelayer":jQuery.each(targetlayer,function(){updateToggleByList(jQuery(this),"layertoggledby",layer[0].id),jQuery(this).data("triggered_startstatus",event.togglestate)});break;case"toggle_global_mute_video":case"toggle_mute_video":jQuery.each(targetlayer,function(){updateToggleByList(jQuery(this),"videomutetoggledby",layer[0].id)});break;case"toggleslider":_R[id].slidertoggledby==undefined&&(_R[id].slidertoggledby=[]),_R[id].slidertoggledby.push(layer[0].id);break;case"togglefullscreen":_R[id].fullscreentoggledby==undefined&&(_R[id].fullscreentoggledby=[]),_R[id].fullscreentoggledby.push(layer[0].id)}}_R[id].actionsPrepared=!0,_R[id].actionListenerHook=_R[id].actionListenerHook==undefined?{_on:""}:_R[id].actionListenerHook,layer.on("click mouseenter mouseleave "+_R[id].actionListenerHook._on,function(e){for(var i in _L.events)if(_L.events.hasOwnProperty(i)&&_L.events[i].on.includes(e.type)){var event=_L.events[i];if(!(event.repeat!==undefined&&0<event.repeat)||_R.delayer(id,1e3*event.repeat,_L.c[0].id+"_"+event.action)){if("click"===event.on&&layer.hasClass("tp-temporarydisabled"))return!1;(""+event.layer).includes("layer-sta_")&&(_R[id].staticPrefix=_R[id].staticPrefix||Object.keys(_R[id].layers.static)[0],(""+_R[id].staticPrefix).includes("layer-"))&&(event.layer=_R[id].staticPrefix.split("layer-")[0]+"layer-"+event.layer.split("layer-sta_")[1]);var targetlayer="backgroundvideo"==event.layer?jQuery(_R[id].slides[_R[id].pr_active_key]).find("rs-sbg-wrap rs-bgvideo"):"firstvideo"==event.layer?jQuery(_R[id].slides[_R[id].pr_active_key]).find(".rs-layer-video").first():jQuery("#"+event.layer),tex=0<targetlayer.length;if(""!=_R[id].actionListenerHook._on&&"click"!==e.type&&"mouseenter"!==e.type&&"mouseleave"!==e.type){var keepgoing=!0,cbs;for(cbs in _R[id].actionListenerHook.callBacks){if(!0!==keepgoing)break;_R[id].actionListenerHook.callBacks.hasOwnProperty(cbs)&&"function"==typeof _R[id].actionListenerHook.callBacks[cbs]&&(keepgoing=_R[id].actionListenerHook.callBacks[cbs]({event:event,layer:layer,targetlayer:targetlayer,L:_L}))}if(!keepgoing)continue}switch(event.action){case"menulink":var linkto=_R.getURLDetails({url:event.url,anchor:event.anchor}),linkfrom=_R.getURLDetails();linkto.host==linkfrom.host&&linkto.path==linkfrom.path&&"_self"===event.target?_R.scrollToId({id:id,offset:event.offset,action:event.action,anchor:event.anchor,hash:linkto.hash,speed:event.speed,ease:event.ease}):"_self"===event.target?window.location=linkto.url+(linkto.anchor!==undefined&&""!==linkto.anchor?"#"+linkto.anchor:""):window.open(linkto.url+(linkto.anchor!==undefined&&""!==linkto.anchor?"#"+linkto.anchor:"")),e.preventDefault();break;case"getAccelerationPermission":_R.getAccelerationPermission(id);break;case"nextframe":case"prevframe":case"gotoframe":case"togglelayer":case"toggleframes":case"startlayer":case"stoplayer":if(targetlayer[0]!==undefined){var _=_R[id]._L[targetlayer[0].id],frame=event.frame,tou="triggerdelay";if("click"===e.type&&_.clicked_time_stamp!==undefined&&(new Date).getTime()-_.clicked_time_stamp<300)return;if("mouseenter"===e.type&&_.mouseentered_time_stamp!==undefined&&(new Date).getTime()-_.mouseentered_time_stamp<300)return;if(clearTimeout(_.triggerdelayIn),clearTimeout(_.triggerdelayOut),clearTimeout(_.triggerdelay),"click"===e.type&&(_.clicked_time_stamp=(new Date).getTime()),"mouseenter"===e.type&&(_.mouseentered_time_stamp=(new Date).getTime()),"mouseleave"===e.type&&(_.mouseentered_time_stamp=undefined),"nextframe"===event.action||"prevframe"===event.action){_.forda=_.forda===undefined?getFordWithAction(_):_.forda;var inx=jQuery.inArray(_.currentframe,_.ford);for("nextframe"===event.action&&inx++,"prevframe"===event.action&&inx--;"skip"!==_.forda[inx]&&0<inx&&inx<_.forda.length-1;)"nextframe"===event.action&&inx++,"prevframe"===event.action&&inx--,inx=Math.min(Math.max(0,inx),_.forda.length-1);frame=_.ford[inx]}0<=jQuery.inArray(event.action,["toggleframes","togglelayer","startlayer","stoplayer"])&&(_.triggeredstate="startlayer"===event.action||"togglelayer"===event.action&&"frame_1"!==_.currentframe||"toggleframes"===event.action&&_.currentframe!==event.frameN,"togglelayer"===event.action&&!0===_.triggeredstate&&_.currentframe!==undefined&&"frame_999"!==_.currentframe&&(_.triggeredstate=!1),frame=_.triggeredstate?"toggleframes"===event.action?event.frameN:"frame_1":"toggleframes"===event.action?event.frameM:"frame_999",tou=_.triggeredstate?"triggerdelayIn":"triggerdelayOut",_.triggeredstate?_R.toggleState(_.layertoggledby):(_R.stopVideo&&_R.stopVideo(targetlayer,id),_R.unToggleState(_.layertoggledby)));var pars={layer:targetlayer,frame:frame,mode:"trigger",id:id};!0===event.children&&(pars.updateChildren=!0,pars.fastforward=!0),_R.renderLayerAnimation&&(clearTimeout(_[tou]),_[tou]=setTimeout(function(e){_R.renderLayerAnimation(e)},1e3*event.delay,pars))}break;case"playvideo":tex&&_R.playVideo(targetlayer,id);break;case"stopvideo":tex&&_R.stopVideo&&_R.stopVideo(targetlayer,id);break;case"togglevideo":tex&&(_R.isVideoPlaying(targetlayer,id)?_R.stopVideo&&_R.stopVideo(targetlayer,id):_R.playVideo(targetlayer,id));break;case"mutevideo":tex&&_R.Mute(targetlayer,id,!0);break;case"unmutevideo":tex&&_R.Mute&&_R.Mute(targetlayer,id,!1);break;case"toggle_mute_video":tex&&(_R.Mute(targetlayer,id)?_R.Mute(targetlayer,id,!1):_R.Mute&&_R.Mute(targetlayer,id,!0));break;case"toggle_global_mute_video":var pvl=_R[id].playingvideos!=undefined&&0<_R[id].playingvideos.length;pvl&&(_R[id].globalmute?jQuery.each(_R[id].playingvideos,function(e,t){_R.Mute&&_R.Mute(t,id,!1)}):jQuery.each(_R[id].playingvideos,function(e,t){_R.Mute&&_R.Mute(t,id,!0)})),_R[id].globalmute=!_R[id].globalmute;break;default:tpGS.gsap.delayedCall(event.delay,function(targetlayer,id,event,layer){switch(event.action){case"openmodal":_R.openModalAPI(event.modal,event.modalslide===undefined?0:event.modalslide,_R[id].ajaxUrl,!0,id,event);break;case"closemodal":_R.revModal(id,{mode:"close"});break;case"callback":eval(event.callback);break;case"simplelink":window.open(event.url,event.target);break;case"simulateclick":0<targetlayer.length&&targetlayer.trigger("click");break;case"toggleclass":0<targetlayer.length&&targetlayer.toggleClass(event.classname);break;case"scrollbelow":case"scrollto":"scrollbelow"===event.action&&layer.addClass("tp-scrollbelowslider"),_R.scrollToId({id:id,offset:event.offset,action:event.action,anchor:event.id,speed:event.speed,ease:event.ease});break;case"jumptoslide":switch(_R[id].skipAttachDetach=!0,event.slide.toLowerCase()){case"rs-random":var ts=Math.min(Math.max(0,Math.ceil(Math.random()*_R[id].realslideamount)-1));ts=_R[id].activeRSSlide==ts?0<ts?ts-1:ts+1:ts,_R.callingNewSlide(id,_R[id].slides[ts].dataset.key,"carousel"===_R[id].sliderType);break;case"+1":case"next":case"rs-next":_R[id].sc_indicator="arrow",_R[id].sc_indicator_dir=0,_R.callingNewSlide(id,1,"carousel"===_R[id].sliderType);break;case"rs-previous":case"rs-prev":case"previous":case"prev":case"-1":_R[id].sc_indicator="arrow",_R[id].sc_indicator_dir=1,_R.callingNewSlide(id,-1,"carousel"===_R[id].sliderType);break;case"first":case"rs-first":_R[id].sc_indicator="arrow",_R[id].sc_indicator_dir=1,_R.callingNewSlide(id,0,"carousel"===_R[id].sliderType);break;case"last":case"rs-last":_R[id].sc_indicator="arrow",_R[id].sc_indicator_dir=0,_R.callingNewSlide(id,_R[id].slideamount-1,"carousel"===_R[id].sliderType);break;default:var ts=_R.isNumeric(event.slide)?parseInt(event.slide,0):event.slide;_R.callingNewSlide(id,ts,"carousel"===_R[id].sliderType)}break;case"toggleslider":_R[id].noloopanymore=0,"playing"==_R[id].sliderstatus?(_R[id].c.revpause(),_R[id].forcepaused=!0,_R.unToggleState(_R[id].slidertoggledby)):(_R[id].forcepaused=!1,_R[id].c.revresume(),_R.toggleState(_R[id].slidertoggledby));break;case"pauseslider":_R[id].c.revpause(),_R.unToggleState(_R[id].slidertoggledby);break;case"playslider":_R[id].noloopanymore=0,_R[id].c.revresume(),_R.toggleState(_R[id].slidertoggledby);break;case"gofullscreen":case"exitfullscreen":case"togglefullscreen":var gf;tpGS.gsap.set(_R[id].parallax.bgcontainers,{y:0}),0<jQuery(".rs-go-fullscreen").length&&("togglefullscreen"==event.action||"exitfullscreen"==event.action)?(jQuery(".rs-go-fullscreen").removeClass("rs-go-fullscreen"),gf=0<_R[id].c.closest("rs-fullwidth-wrap").length?_R[id].c.closest("rs-fullwidth-wrap"):_R[id].c.closest("rs-module-wrap"),_R[id].minHeight=_R[id].oldminheight,_R[id].infullscreenmode=!1,_R[id].c.revredraw(),_R[id].c.revredraw(),jQuery(window).trigger("resize"),_R.unToggleState(_R[id].fullscreentoggledby)):0!=jQuery(".rs-go-fullscreen").length||"togglefullscreen"!=event.action&&"gofullscreen"!=event.action||(gf=0<_R[id].c.closest("rs-fullwidth-wrap").length?_R[id].c.closest("rs-fullwidth-wrap"):_R[id].c.closest("rs-module-wrap"),gf.addClass("rs-go-fullscreen"),_R[id].oldminheight=_R[id].minHeight,_R[id].minHeight=_R.getWinH(id),_R[id].infullscreenmode=!0,jQuery(window).trigger("resize"),_R.toggleState(_R[id].fullscreentoggledby),_R[id].c.revredraw());break;default:_R[id].c.trigger("layeraction",[event.action,layer,event])}},[targetlayer,id,event,layer])}}}})};function getFordWithAction(e){var t,i=[];for(t in e.ford)e.frames[e.ford[t]].timeline.waitoncall?i.push(e.ford[t]):i.push("skip");return i}function updateToggleByList(e,t,i){var a=e.data(t);(a=a===undefined?[]:a).push(i),e.data(t,a)}function getEventParams(e){var t,i={on:"click",delay:0,ease:"power2.out",speed:400};for(t in e)if(e.hasOwnProperty(t)){var a=e[t].split(":");switch(2<a.length&&"call"===a[0]&&(a[1]=a.join(":").replace(a[0]+":","")),a[0]){case"modal":i.modal=a[1];break;case"ms":i.modalslide=a[1];break;case"m":i.frameM=a[1];break;case"n":i.frameN=a[1];break;case"o":i.on="click"===a[1]||"c"===a[1]?"click":"ml"===a[1]||"mouseleave"===a[1]?"mouseleave":"mouseenter"===a[1]||"me"===a[1]?"mouseenter":a[1];break;case"d":i.delay=parseInt(a[1],0)/1e3,i.delay="NaN"===i.delay||isNaN(i.delay)?0:i.delay;break;case"rd":i.repeat=parseInt(a[1],0)/1e3,i.repeat="NaN"===i.repeat||isNaN(i.repeat)?0:i.repeat;break;case"a":i.action=a[1];break;case"f":i.frame=a[1];break;case"slide":i.slide=a[1];break;case"layer":i.layer=a[1];break;case"sp":i.speed=parseInt(a[1],0);break;case"e":i.ease=a[1];break;case"ls":i.togglestate=a[1];break;case"offset":i.offset=a[1];break;case"call":i.callback=a[1];break;case"url":i.url="";for(var r=1;r<a.length;r++)i.url+=a[r]+(r===a.length-1?"":":");break;case"target":i.target=a[1];break;case"class":i.classname=a[1];break;case"ch":i.children="true"==a[1]||1==a[1]||"t"==a[1];break;default:0<a[0].length&&""!==a[0]&&(i[a[0]]=a[1])}}return i}var getOffContH=function(e){var t,i;return e==undefined?0:1<e.split(",").length?(t=e.split(","),i=0,t&&jQuery.each(t,function(e,t){0<jQuery(t).length&&(i+=jQuery(t).outerHeight(!0))}),i):jQuery(e).height()};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.actions={loaded:!0,version:version},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";jQuery.fn.revolution=jQuery.fn.revolution||{};var y=jQuery.fn.revolution,w=(jQuery.extend(!0,y,{prepareCarousel:function(e,t,i,a){var r;void 0===e||((r=y[e].carousel).slidesWithRowAdjustions={},t=r.lastdirection=o(t,r.lastdirection),y.setCarouselDefaults(e,void 0,a),y.organiseCarousel(e,"right",!0,!1,!1),void 0!==r.swipeTo&&y.isNumeric(r.swipeTo)?void 0!==i?y.swipeAnimate({id:e,to:r.swipeTo,distance:r.swipeToDistance,direction:t,fix:!0,speed:i}):y.swipeAnimate({id:e,to:r.swipeTo,distance:r.swipeToDistance,direction:t,fix:!0}):y.swipeAnimate({id:e,to:0,direction:t,speed:0}),"carousel"!==y[e].sliderType)||r.fadein||(tpGS.gsap.to(y[e].canvas,1,{scale:1,opacity:1}),r.fadein=!0)},setupCarousel:function(i){var a=y[i].carousel;"v"==a.orientation?(a.length="height",a.translate="y",a.slide_dims="slide_heights",a.deltaT="deltaY",a.sliderLength="sliderHeight",a.slide_length="slide_height",a.wraplength="wrapheight",a.align="0%"===a.vertical_align?"start":"50%"===a.vertical_align?"center":"end",!a.snap||a.justify||a.infinity||(a.forceBAlign=!0)):(a.length="width",a.translate="x",a.slide_dims="slide_widths",a.deltaT="deltaX",a.sliderLength="sliderWidth",a.slide_length="slide_width",a.wraplength="wrapwidth",a.align="left"===a.horizontal_align?"start":"center"===a.horizontal_align?"center":"end"),a[a.sliderLength]=y[i].canv[a.length],a.proxy=document.createElement("div"),a.follower=document.createElement("div"),a.slideamount=y[i].slideamount,a.infinity||a.snap||(y[i].carousel.align="start"),g(i),b(i,a.align),a.inited=!0,a.lerpHandler=y.carLerpHandler.bind(this,i),void 0===a.animInList&&(a.animInList=[]),a.draggableObj={trigger:y[i].c[0],type:a.translate,edgeResistance:.5,zIndexBoost:!1,cursor:"grab",activeCursor:"grabbing",allowContextMenu:!0,inertia:!0,throwResistance:a.snap?8e3:500,onPress:function(e){y.closestClass(e.target,"rs-nav-element")?(a.draggable.endDrag(),a.draggable.disable()):y[i].c.trigger("stoptimer"),a.focusedOnPress=a.focused,a.isPressed=!0,a.fromWheel=!1,a.cX=a.lerpX=this.pointerX,a.cY=a.lerpY=this.pointerY,a.tween&&a.tween.kill&&(a.tween.kill(),delete a.tween)},onClick:function(e){a.isPressed=!1,y.closestClass(e.target,"rs-nav-element")||y.closestClass(e.target,"rs-waction")||a.draggable.enabled()&&!1===y[i].carousel.stopOnClick&&y[i].c.trigger("starttimer")},onDragStart:function(){a.lerpSpeed=.1,a.lerp||(a.lerp=requestAnimationFrame(a.lerpHandler)),y.ISM&&a.forceBAlign&&("up"===this.getDirection()&&a.focused==a.slideamount-1||"down"===this.getDirection()&&0==a.focused?a.forceScroll=!0:a.forceScroll=!1)},onDrag:function(){a.cX=this.pointerX,a.cY=this.pointerY},snap:function(e){var t;return y.getLastPos(i),a.isPressed=!1,a.forceScroll&&a.forceBAlign?(t="up"===this.getDirection()?y[i].cpar.offset().top+y[i].module.height:y.document.scrollTop()-(window.innerHeight-y[i].cpar[0].getBoundingClientRect().top),y[i].modal.useAsModal||tpGS.gsap.to([window,"body"],{scrollTo:t}),a.focused!=a.slideamount-1||a.infinity?a.lastPos:a[a.wraplength]-a.totalWidth):(y.calculateSnap(i,e),e)}},a.draggable=tpGS.draggable.create(a.proxy,a.draggableObj)[0],y[i].c.one("revolution.slide.onchange",function(){w(i)})},positionCarousel:function(e){var t=y[e].carousel;if(t[t.sliderLength]=y[e].canv[t.length],t.draggable&&!t.draggable.isPressed){for(var i=0,a=0;a<t.slideamount;a++)t.arr[a].elem===y[e].slides[t.closest]&&(i=t.arr[a].prog);if(Number.isNaN(i)&&(i=0),g(e),y.ISM&&y[e].navigation.touch.mobileCarousel||!0!==y.ISM&&y[e].navigation.touch.desktopCarousel?(t.draggable.vars.cursor="grab",t.draggable.enable()):(t.draggable.vars.cursor="pointer",t.draggable.disable()),y[e].carousel.justify)for(a=t.wrapperWidth=0;a<y[e].carousel[t.slide_dims].length;a++)t.wrapperWidth+=y[e].carousel[t.slide_dims][a];else t.wrapperWidth=t.slide_width*y[e].slides.length;void 0===t.focused&&(t.focused=0),t.activeSlide=t.oldfocused=void 0===t.focused||void 0===t.closest?0:t.closest;for(a=0;a<t.arr.length;a++)y.updateSlideWidth(e,a);var r,o,s,n=0,l=(t.lastWrapwidth=t.wrapwidth,t.lastWrapheight=t.wrapheight,o=r="start"===y[e].carousel.align?0:"center"===y[e].carousel.align?(t[t.wraplength]-t.arr[t.activeSlide][t.length])/2:t[t.wraplength]-t.arr[t.activeSlide][t.length],t.infinity||"v"!==t.orientation||t.activeSlide!=t.slideamount-1||(r=t[t.wraplength]-t.arr[t.activeSlide][t.length]),tpGS.gsap.set([t.proxy,t.follower],{x:r,y:r}),t.arr[0][t.length]*i);if(t.infinity){for(a=t.activeSlide;a<t.arr.length;a++)a!==t.activeSlide&&(n+=t.space),"h"===t.orientation?tpGS.gsap.set(t.arr[a].elem,{x:n+r+l}):tpGS.gsap.set(t.arr[a].elem,{y:n+r+l}),t.arr[a].posX=n+r+l,t.arr[a][t.translate]=n+r+l,n+=t.arr[a][t.length];for(var d=r+l,a=t.activeSlide-1;0<=a;a--)d-=t.arr[a][t.length]+t.space,t.arr[a].posX=d+l,t.arr[a][t.translate]=d,"h"===t.orientation?tpGS.gsap.set(t.arr[a].elem,{x:d}):tpGS.gsap.set(t.arr[a].elem,{y:d}),n+=t.arr[a][t.length]+t.space}else{for(var c=0,a=0;a<t.arr.length;a++)0<a&&(n+=t.space),a==t.activeSlide&&(c+=n),t.arr[a].posX=n+r+l,t.arr[a][t.translate]=n+r+l,"h"===t.orientation?tpGS.gsap.set(t.arr[a].elem,{x:n+r+l}):tpGS.gsap.set(t.arr[a].elem,{y:n+r+l}),n+=t.arr[a][t.length];tpGS.gsap.set([t.proxy,t.follower],{x:r-c,y:r-c}),"h"===t.orientation?tpGS.gsap.set([y[e].slides],{x:"-="+c}):tpGS.gsap.set([y[e].slides],{y:"-="+c});for(a=0;a<t.arr.length;a++)t.arr[a].posX-=c,t.arr[a][t.translate]-=c}t.startOffset=o,y.swapCarouselSlides(e,!0),t.infinity?t.draggable.applyBounds({minX:-1/0,maxX:1/0}):!t.infinity&&t.snap?t.draggable.applyBounds({minX:-(t.startOffset+n),maxX:t.startOffset}):t.infinity||t.snap||t.draggable.applyBounds({minX:t.wrapwidth-n,maxX:0}),t.lastActiveSlide=t.activeSlide,t.totalWidth=n,t.lastTotalWidth=n,"off"!==t.spin&&(o=t[t.slide_length]/2,t.spinAngle=Math.max(Math.min(t.spinAngle,360/t.arr.length),-360/t.arr.length),s=o/Math.sin(t.spinAngle/2*Math.PI/180),t.spinR=(Math.sqrt(s*s-o*o)+t.space)*Math.sign(t.spinAngle),"2d"===t.spin&&"h"===t.orientation?t.spinR+=(t.spinAngle<=0?0:1)*("fullscreen"===y[e].sliderLayout?t.wrapheight:t.slide_height):"2d"===t.spin&&(t.spinR+=(t.spinAngle<=0?0:1)*("fullscreen"===y[e].sliderLayout?t.wrapwidth:t.slide_width)));for(a=0;a<t.trackArr.length;a++)for(var p=0;p<t.arr.length;p++)t.trackArr[a].elem===t.arr[p].elem&&(t.trackArr[a].width=t.arr[p].width,t.trackArr[a].height=t.arr[p].height);y.swapCarouselSlides(e,!0),y.applyDistanceEffect(e),y.swipeAnimate({id:e,from:"none"})}},updateSlideWidth:function(e,t){var i=y[e].carousel;if(i.justify)for(var a=0;a<y[e].slides.length;a++)y[e].slides[a]===i.arr[t].elem&&(i.arr[t][i.length]=i[i.slide_dims][a]);else i.arr[t][i.length]=i[i.slide_length]},swapCarouselSlides:function(e){var t,i=y[e].carousel,a=!0;if(i.infinity&&!(i.totalWidth<i[i.wraplength]))for(;a;){var r,o,s=0<parseFloat(i.arr[0][i.translate])||void 0!==i.arr[0].progress&&i.arr[0].progress<=i.maxVisibleItems/2&&!(i.arr[i.arr.length-1].progress<=i.maxVisibleItems/2)&&parseFloat(i.arr[i.arr.length-1][i.translate])>=i[i.wraplength],n=parseFloat(i.arr[i.arr.length-1][i.translate])<i[i.wraplength]-i.arr[i.arr.length-1][i.length]||void 0!==i.arr[i.arr.length-1].progress&&i.arr[i.arr.length-1].progress<=i.maxVisibleItems/2&&!(i.arr[0].progress<=i.maxVisibleItems/2)&&parseFloat(i.arr[0][i.translate])+i.arr[0][i.length]<=0;s?(r=parseFloat(i.arr[0][i.translate])-i.space,o=i.arr.pop(),i.arr.unshift(o),t===o&&(a=!1),t=o,i.arr[0].posX=i.arr[0][i.translate]=r-i.arr[0][i.length],y.getCarActiveSlide(e)):n?(r=parseFloat(i.arr[i.arr.length-1][i.translate])+i.space,o=i.arr.shift(),i.arr.push(o),t===o&&(a=!1),t=o,i.arr[i.arr.length-1].posX=i.arr[i.arr.length-1][i.translate]=r+i.arr[i.arr.length-2][i.length],y.getCarActiveSlide(e)):a=!1}},onThrowComplete:function(e){for(var t=y[e].carousel,i=("carousel"!==y[e].sliderType||t.fadein||(tpGS.gsap.to(y[e].canvas,1,{scale:1,opacity:1}),t.fadein=!0),y.getCarActiveSlide(e,!0),t.arr[t.activeSlide]),a=0;a<y[e].slides.length;a++){if(y[e].slides[a]===i.elem){if(t.focused=parseFloat(a),y[e].pr_next_key=t.focused,t.animInList.includes(t.oldfocused.toString())||t.animInList.push(t.oldfocused.toString()),"all"!==t.showLayersAllTime)for(;1<=t.animInList.length;){var r=t.animInList.pop();t.focused!=r&&y.removeTheLayers(jQuery(y[e].slides[r]),e)}for(var o in y.callingNewSlide(e,y[e].slides[a].getAttribute("data-key"),!0,!0),y[e].c.trigger("revolution.nextslide.waiting"),w(e),t.focused!=t.oldfocused&&"all"!==t.showLayersAllTime&&(t.animInList.includes(t.focused.toString())||t.animInList.push(t.focused.toString()),y.animateTheLayers({slide:t.focused,id:e,mode:"start"}),y.animateTheLayers({slide:"individual",id:e,mode:y[e].carousel.allLayersStarted?"rebuild":"start"})),y[e].sbgs)y[e].sbgs.hasOwnProperty(o)&&void 0!==y[e].sbgs[o].bgvid&&0!==y[e].sbgs[o].bgvid.length&&(""+y[e].sbgs[o].skeyindex==""+t.focused?y.playBGVideo(e,y.gA(y[e].pr_next_slide[0],"key")):y.stopBGVideo(e,y[e].sbgs[o].key));t.oldfocused=t.focused}for(var s=y[e].slides[a].querySelectorAll(".rs-on-car"),n=0;n<s.length;n++)y[e].slides[a]!==i.elem&&s[n].classList.contains("rs-layer-video")&&y[e].videos[s[n].id].pauseOnSlideChange&&y.stopVideo(jQuery(s[n]),e)}t.draggable[t.deltaT]=0,y[e].c.trigger("restarttimer")},calculateSnap:function(e,t){var i,a,r=y[e].carousel,o=(tpGS.gsap.killTweensOf(r.proxy,r.translate),"v"===r.orientation?t-r.draggable.endY:t-r.draggable.endX),s=(Math.abs(o)<3&&(o=0),!0),n="v"===r.orientation?Math.abs(r.draggable.endY-r.draggable.startY):Math.abs(r.draggable.endX-r.draggable.startX);r.focusedPreSnap=r.focused,r.snap?(i=r.direction=0<=r.draggable[r.deltaT]?"right":"left",o=(i=y.getNextSlide(e,o,i,!0,n<300)).delta,s=i.overshoot,r.target=i.target):r.target=t,(r.infinity||r.snap)&&(r.infinity||"v"!==r.orientation)||(r.target<=r[r.wraplength]-r.totalWidth?r.target=r[r.wraplength]-r.totalWidth:0<=r.target&&!r.snap&&(r.target=0)),r.swiped=!0,r.overshoot&&s?(tpGS.gsap.to(r,{duration:r.snap?.3:.5,lerpSpeed:.8}),s=Math.min(0===r.draggable[r.deltaT]?Math.abs(o)/20:Math.abs(r.draggable[r.deltaT])/2,r[r.wraplength]/4)*Math.sign(o),a=Math.abs(s/100),r.time=Math.min(Math.max(a/10,r.speed/1e3*.6),r.speed/1e3),r.tween=tpGS.gsap.timeline({onComplete:function(){y.snapCompleted(e)}}),r.tween.to(r.proxy,{x:r.target+s,y:r.target+s,duration:r.time,ease:"power2.out"}).to(r.proxy,{x:r.target,y:r.target,duration:Math.min(2*r.time,.6),ease:r.easing.replace(".inOut",".out").replace(".in",".out")},"overshoot").to(r,{duration:Math.min(2*r.time,.6),lerpSpeed:1},"overshoot")):(a=Math.abs(o/100),r.time=Math.min(Math.max(a/10,r.speed/1e3*.6),r.speed/1e3),r.tween=tpGS.gsap.to(r.proxy,{x:r.target,y:r.target,duration:r.time,ease:r.easing.replace(".inOut",".out").replace(".in",".out"),onComplete:function(){y.snapCompleted(e)}}),tpGS.gsap.to(r,{duration:r.time,lerpSpeed:1}))},carLerpHandler:function(e,t){var i=y[e].carousel,t=("skip"!==t&&(i.lerp=requestAnimationFrame(i.lerpHandler)),parseFloat(i.proxy._gsap[i.translate])),a=parseFloat(i.follower._gsap[i.translate]),t=a+(t-a)*i.lerpSpeed-a;"mousedrag"==y[e].parallax.type&&(i.delta=t,i.lerpX=i.lerpX+(i.cX-i.lerpX)*i.lerpSpeed,i.lerpY=i.lerpY+(i.cY-i.lerpY)*i.lerpSpeed,y[e].parallax.frame=window.requestAnimationFrame(y[e].parallax.parallaxHandler)),tpGS.gsap.set(y[e].canvas,{skewX:i.skewX*Math.max(-1,Math.min(1,t/100)),skewY:i.skewY*Math.max(-1,Math.min(1,t/100))}),"h"===i.orientation?(tpGS.gsap.set(i.follower,{x:"+="+t}),tpGS.gsap.set(i.arr,{x:"+="+t})):(tpGS.gsap.set(i.follower,{y:"+="+t}),tpGS.gsap.set(i.arr,{y:"+="+t})),y.swapCarouselSlides(e),y.applyDistanceEffect(e)},snapCompleted:function(e){var t=y[e].carousel;t.lerp=cancelAnimationFrame(t.lerp),t.scrollFrame=cancelAnimationFrame(t.scrollFrame),t.swiped=!1,tpGS.gsap.set(t.follower,{x:t.proxy._gsap[t.translate],y:t.proxy._gsap[t.translate]}),y.onThrowComplete(e)},applyDistanceEffect:function(e){var t,i=y[e].carousel,a=1/0,r=0,o=0,s=(void 0===i.lastSlideProgress&&(i.lastSlideProgress=1),i.startOffset);for(t in i.startOffsetCache=i.startOffset,void 0===i.tempAlign&&(i.tempAlign=i.align),"v"!==i.orientation||i.infinity||i.justify||(s=i.startOffset+(i[i.wraplength]-i[i.slide_length]-i.startOffset)*(1-i.lastSlideProgress)),i.arr){var n=parseFloat(i.arr[t][i.translate])-s;if(i.infinity&&(n%=i.totalWidth),Math.abs(n)<a){for(var l=0;l<y[e].slides.length;l++)y[e].slides[l]===i.arr[t].elem&&(o=l,i.closestArr=t);a=Math.abs(n)}i.arr[t].loaded&&r++,i.infinity||i.snap||(0===i.activeSlide?n=parseFloat(i.arr[t][i.translate]):i.activeSlide===i.arr.length-1&&(n=parseFloat(i.arr[t][i.translate])-(i[i.wraplength]-i.arr[t][i.length])));var d=Math.sign(n),c=i.arr[t].progress=Math.abs(n)/(i[i.slide_length]+i.space);if(i.arr[t].prog=n/(i[i.slide_length]+i.space),!i.justify&&"mousedrag"===y[e].parallax.type)for(l=0;l<y[e].slides.length;l++)y[e].slides[l]===i.arr[t].elem&&(i.trackArr[l].progress=c);"v"!==i.orientation||i.infinity||t!=i.slideamount-1||(c<=("left"===i.direction?.9:.1)&&!i.vertAlignBottom?(tpGS.gsap.to(i,{lastSlideProgress:0,duration:.2}),i.vertAlignDefault=!1,i.vertAlignBottom=!0,i.tempAlign="end",b(e,"end")):c>("left"===i.direction?.9:.1)&&!i.vertAlignDefault&&(tpGS.gsap.to(i,{lastSlideProgress:1,duration:.2}),i.vertAlignDefault=!0,i.vertAlignBottom=!1,i.tempAlign=i.align,b(e,i.align))),i.arr[t].sign=d;var p,g,n=i.arr[t].progress/Math.ceil(i.pDiv)*("center"===i.tempAlign?1:"start"===i.tempAlign?d:-d),u=+Math.min(i.arr[t].progress,1),h=100-5*Math.round(i.arr[t].progress),m={};i.justify||"off"===i.spin?0===i.minScale||i.justify?m[i.translate]=i.arr[t][i.translate]:(p=1-(i.vary_scale?n:u)*(1-i.minScale),g=i.offsetScale?i.arr[t].sign*(i[i.slide_length]+i.space-(i[i.slide_length]+i.space)*p)/2*i.arr[t].progress:i.arr[t].sign*(i[i.slide_length]-i[i.slide_length]*p)/2*i.arr[t].progress,m[i.translate]=i.arr[t][i.translate]-g,window.isSafari11&&(m.z=-150*(1-p)),m.scale=p):(m[i.translate]=s,"2d"===i.spin?(m.rotation=i.spinAngle*c*("h"===i.orientation?d:-d),"h"===i.orientation?m.transformOrigin="center "+i.spinR+"px 0":m.transformOrigin=i.spinR+"px center 0"):("h"===i.orientation?m.rotationY=i.spinAngle*i.arr[t].progress*-d:m.rotationX=i.spinAngle*i.arr[t].progress*d,m.transformOrigin="center center "+i.spinR+"px")),m.opacity=1,i.justify||(0!==i.maxRotation&&(m.rotationY=i.maxRotation*(i.vary_rotation?n:u)*-d),m.opacity=1+(i.maxOpacity-1)*(i.vary_fade?n:u),n>i.edgeRatio?m.opacity=i.oRange(n):n<0?m.opacity=i.oRangeMin(n):1===i.maxOpacity&&(m.opacity=1)),m.zIndex=h,0<m.opacity?("visible"!==i.arr[t].elem.style.visibility&&(m.visibility="visible"),tpGS.gsap.set(i.arr[t].elem,m)):("hidden"!==i.arr[t].elem.style.visibility&&(m.visibility="hidden"),tpGS.gsap.set(i.arr[t].elem,{visibility:m.visibility,opacity:m.opacity}))}if(o!==i.closest){if(i.closest=o,r!==i.arr.length&&y.loadVisibleCarouselItems(e,!0,i.closest),i.draggable.isPressed){if(i.focused=i.closest,y[e].pr_next_key=i.focused,i.oldfocused=void 0===i.oldfocused?0:i.oldfocused,y[e].carousel.allLayersStarted?y.updateCarouselRows(e):y.carouselRowAdjustment(i,e,i.focused),"all"!==i.showLayersAllTime)for(i.animInList.includes(i.oldfocused.toString())||i.animInList.push(i.oldfocused.toString());1<=i.animInList.length;){var v=i.animInList.pop();i.focused!=v&&y.removeTheLayers(jQuery(y[e].slides[v]),e)}i.focused!=i.oldfocused&&("all"!==i.showLayersAllTime&&(i.animInList.includes(i.focused.toString())||i.animInList.push(i.focused.toString()),y.animateTheLayers({slide:i.focused,id:e,mode:"start"}),y.animateTheLayers({slide:"individual",id:e,mode:y[e].carousel.allLayersStarted?"rebuild":"start"})),w(e,!0),i.oldfocused=i.focused),y[e].c.trigger("revolution.nextslide.waiting")}for(var f in y[e].sbgs)y[e].sbgs.hasOwnProperty(f)&&void 0!==y[e].sbgs[f].bgvid&&0!==y[e].sbgs[f].bgvid.length&&""+y[e].sbgs[f].skeyindex!=""+i.focused&&y.stopBGVideo(e,y[e].sbgs[f].key)}},getCarActiveSlide:function(e){var t,i,a,r=y[e].carousel,o=999999,s=0;for(i in r.arr)r.arr.hasOwnProperty(i)&&(a="center"===y[e].carousel.align?Math.abs(parseFloat(r.arr[i][r.translate])-(r[r.wraplength]-r.arr[i][r.length])/2):"start"===y[e].carousel.align?Math.abs(parseFloat(r.arr[i][r.translate])):Math.abs(parseFloat(r.arr[i][r.translate])-(r[r.wraplength]-r.arr[i][r.length])),(a=r.vertAlignBottom?Math.abs(parseFloat(r.arr[i][r.translate])-(r[r.wraplength]-r.arr[i][r.length])):a)<o)&&(t=r.arr[i],o=a,s=i);return s=parseInt(s),r.activeSlide=s,t},loadVisibleCarouselItems:function(e,t,i){var a=y[e].carousel,r=[],o=i?a.closest:a.focused;a.focused=parseInt(o,0),a.focused=y.isNumeric(o)?o:0;for(var s=0;s<Math.ceil(y[e].carousel.maxVisibleItems/2);s++){var n="end"===y[e].carousel.align?o-s:o+s,l="center"===y[e].carousel.align?o-s:"start"===y[e].carousel.align?y[e].carousel.maxVisibleItems+n-1:n-y[e].carousel.maxVisibleItems+1,n=n>=y[e].slideamount?n-y[e].slideamount+0:n,l=l>=y[e].slideamount?l-y[e].slideamount+0:l;if(n=n<0?y[e].slideamount+n:n,l=l<0?y[e].slideamount+l:l,r.push(y[e].slides[n]),n!==l&&r.push(y[e].slides[l]),a.arr)for(var d=0;d<a.arr.length;d++)y[e].slides[n]===a.arr[d].elem&&(a.arr[d].loaded=!0),y[e].slides[l]===a.arr[d].elem&&(a.arr[d].loaded=!0)}return t&&(y.loadImages(r,e,1),y.waitForCurrentImages(r,e)),r},organiseCarousel:function(e,t,i,a,r){var o=y[e].carousel;if(y[e].slides)for(var s=0;s<y[e].slides.length;s++){var n={width:!0===o.justify?o.slide_widths[s]:o.slide_width};"off"===o.spin&&(n.transformOrigin="50% "+("h"===o.orientation?o.vertical_align:"center")),n.force3D=!0,n.transformStyle="3D"!=y[e].parallax.type&&"3d"!=y[e].parallax.type?"flat":"preserve-3d",!0!==r&&tpGS.gsap.set(y[e].slides[s],n)}},updateCarouselRows:function(e){if("carousel"===y[e].sliderType)for(var t=0;t<y[e].slideamount;t++)y.carouselRowAdjustment(y[e].carousel,e,t)},carouselRowAdjustment:function(e,t,i){void 0!==e.slidesWithRowAdjustions&&void 0===e.slidesWithRowAdjustions[i]&&(e.slidesWithRowAdjustions[i]=!0,y.getRowHeights(t,i),y.putMiddleZoneInPosition(t,i))},getNextSlide:function(e,t,i,a,r){var o,s=y[e].carousel,n=0,l=!1,d=t,c=t;if(void 0===s.trackIndex){for(var p=0;p<s.trackArr.length;p++)if(s.arr[s.activeSlide].elem===s.trackArr[p].elem){o=p;break}}else o=s.trackIndex;void 0===i&&(l=!0);for(var g=!1;(s.snap||!a)&&!l;){if(g||a&&Math.abs(n)>=Math.abs(t)||void 0===t&&y[e].slides[s.focused]===s.trackArr[o].elem){t=n;break}var d=n,u=y.getNext(e,i,n,o,void 0===a);(g=u.breakLoop)||(n=u.tempDelta,o=u.trackIndex)}var h=s.lastPos+t;return a&&s.focusedOnPress!=s.focusedPreSnap&&(h=Math.abs(c+s.lastPos-h)<=Math.abs(c+s.lastPos-(d+s.lastPos))?h:d+s.lastPos),l&&(h=s.lastPos,t=-s.arr[s.closestArr][s.translate]),{target:h,overshoot:!0,delta:t,trackIndex:o}},getNext:function(e,t,i,a,r){var e=y[e].carousel,o="right"===t?1:-1,s=!1;return"start"===e.align&&"left"===t?i+=(e.trackArr[a][e.length]+e.space)*o:"center"===e.align?i+=(e.trackArr[a][e.length]+e.space)/2*o:"end"===e.align&&"right"===t&&(i+=(e.trackArr[a][e.length]+e.space)*o),"right"===t?--a<0&&(a=e.infinity?e.trackArr.length-1:a+1,e.infinity||(s=!0)):++a>=e.trackArr.length&&(a=e.infinity?0:a-1,e.infinity||(s=!0)),s||("start"===e.align&&"right"===t&&(i+=(e.trackArr[a][e.length]+e.space)*o),"center"===e.align?i+=(e.trackArr[a][e.length]+e.space)/2*o:"end"===e.align&&"left"===t&&(i+=(e.trackArr[a][e.length]+e.space)*o)),{tempDelta:i,trackIndex:a,breakLoop:s}},getCarDir:function(e,t,i){var a=y[e].carousel,e=i-t,r="right",o=(a.sameSlide=!1,0),s=0;if(a.infinity){for(var n=t;n!=i;)s+=1,n=++n>=a.slideamount?0:n;for(n=t;n!=i;)o+=1,n=--n<0?a.slideamount-1:n;r=s<=o?"left":"right"}else a.infinity||(r=0<=i-t?"left":"right",s=Math.abs(i-t),0==e&&(r="right",a.sameSlide=!0));return a.steps=s<=o?s:o,a.direction=r},getLastPos:function(e){var t=y[e].carousel;if(t.trackArr){for(var i=0,a=0,r=0;r<t.trackArr.length;r++)y[e].slides[t.closest]===t.trackArr[r].elem&&(t.trackIndex=r),y[e].slides[t.closest]===t.arr[r].elem&&(i=t.arr[r][t.translate],"center"===t.align&&(a=(t[t.wraplength]-t.arr[r][t.length])/2),"end"===t.align&&(a=t[t.wraplength]-t.arr[r][t.length]),t.lastOffset=a);t.lastPos=parseFloat(t.proxy._gsap[t.translate])-i-(parseFloat(t.proxy._gsap[t.translate])-parseFloat(t.follower._gsap[t.translate])),t.lastPos+=a}},swipeAnimate:function(e){var t,i=y[e.id].carousel,a=e.id;y.getLastPos(a),i.arr&&i.arr[i.closestArr]&&(i.arr[i.closestArr].elem==y[e.id].slides[i.focused]||(t=y.getCarDir(a,i.trackIndex,i.focused),e=y.getNextSlide(e.id,void 0,t,!1),i.target=e.target,(i.infinity||i.snap)&&(i.infinity||"v"!==i.orientation)||(i.target<=i[i.wraplength]-i.totalWidth?i.target=i[i.wraplength]-i.totalWidth:0<=i.target&&!i.snap&&(i.target=0)),i.lerpSpeed=1,i.fromWheel=!1,i.tween&&i.tween.kill&&(i.tween.kill(),delete i.tween),i.tween=tpGS.gsap.to(i.proxy,{x:i.target,y:i.target,ease:i.easing,duration:i.speed/1e3+(2<=i.steps?(i.steps-1)*i.speed/2e3:0),onComplete:function(){i.lerp=cancelAnimationFrame(i.lerp),i.scrollFrame=cancelAnimationFrame(i.scrollFrame),y.carLerpHandler(a,"skip"),i.activeSlide=i.closestArr,y.snapCompleted(a)}}),i.lerp=cancelAnimationFrame(i.lerp),i.scrollFrame=cancelAnimationFrame(i.scrollFrame),i.lerp)||(i.lerp=requestAnimationFrame(i.lerpHandler)))},carScrollTicker:function(e){var t=y[e].carousel,i=(t.scrollFrame=requestAnimationFrame(t.scrollTicker),parseFloat(t.proxy._gsap[t.translate])),a=i+.5*(t.scrollProxy-i),i=a-i;tpGS.gsap.set(t.proxy,{[t.translate]:a}),Math.abs(i)<.03&&(t.scrollFrame=cancelAnimationFrame(t.scrollFrame),t.lerp=cancelAnimationFrame(t.lerp),t.activeSlide=t.closestArr,y.snapCompleted(e))},scrollCar:function(e,t,i){var a=y[e].carousel,r=(a.scrollFrame=cancelAnimationFrame(a.scrollFrame),a.lerp=cancelAnimationFrame(a.lerp),tpGS.gsap.to(a,{lerpSpeed:1}),a.fromWheel=!0,Math.round(parseFloat(a.proxy._gsap[a.translate])));a.tween&&a.tween.kill&&(a.tween.kill(),delete a.tween),1==i&&a.focused==a.slideamount-1&&r<=a[a.wraplength]-a.totalWidth&&!a.infinity||-1==i&&0==a.focused&&0<=r&&!a.infinity?(i=1==i?y[e].cpar.offset().top+y[e].module.height:y.document.scrollTop()-(window.innerHeight-y[e].cpar[0].getBoundingClientRect().top),y[e].modal.useAsModal||tpGS.gsap.to([window,"body"],{scrollTo:i})):(e=r+-8*t,(a.infinity||a.snap)&&(a.infinity||"v"!==a.orientation)||(e<=a[a.wraplength]-a.totalWidth?e=a[a.wraplength]-a.totalWidth:0<=e&&!a.snap&&(e=0)),a.tween=tpGS.gsap.to(a,{scrollProxy:e,duration:.5,ease:a.easing}),a.scrollFrame=requestAnimationFrame(a.scrollTicker),a.lerp||(a.lerp=requestAnimationFrame(a.lerpHandler)))},defineCarouselElements:function(e){var t=y[e].carousel;t.infbackup=t.infinity,t.maxVisiblebackup=t.maxVisibleItems,t.slide_offset="none",t.slide_offset=0,t.cached_slide_offset=0,t.wrap=jQuery(y[e].canvas[0].parentNode),0===t.maxRotation||"3D"!==y[e].parallax.type&&"3d"!==y[e].parallax.type||tpGS.gsap.set(t.wrap,{perspective:"1600px",transformStyle:"preserve-3d"})},setCarouselDefaults:function(e,t,i){var a,r,o=y[e].carousel;if(o.stretchCache=void 0===o.stretchCache?o.stretch:o.stretchCache,o.stretch=!!y[e].infullscreenmode||o.stretchCache,o.slide_width=Math.round(!0!==o.stretch&&"v"!==o.orientation?y[e].gridwidth[y[e].level]*(0===y[e].CM.w?1:y[e].CM.w):y[e].canv.width),o.slide_height=Math.round(!0!==o.stretch?y[e].infullscreenmode?y.getWinH(e)-y.getFullscreenOffsets(e):y[e].gridheight[y[e].level]*(0===y[e].CM.w?1:y[e].CM.w):y[e].canv.height),o.ratio=o.slide_width/o.slide_height,o.len=y[e].slides.length,o.maxwidth=y[e].slideamount*o.slide_width,o.maxheight=y[e].slideamount*o.slide_height,1!=o.justify&&o.maxVisiblebackup>o.len&&(o.maxVisibleItems=o.len%2?o.len:o.len+1),o.wrapwidth=o.maxVisibleItems*o.slide_width+(o.maxVisibleItems-1)*o.space,o.wrapheight=o.maxVisibleItems*o.slide_height+(o.maxVisibleItems-1)*o.space,o.wrapwidth="auto"!=y[e].sliderLayout?o.wrapwidth>y[e].canv.width?y[e].canv.width:o.wrapwidth:o.wrapwidth>y[e].module.width?(0!==y[e].module.width?y[e].module:y[e].canv).width:o.wrapwidth,o.wrapheight="auto"!=y[e].sliderLayout?o.wrapheight>y[e].canv.height?y[e].canv.height:o.wrapheight:o.wrapheight>y[e].module.height?(0!==y[e].module.height?y[e].module:y[e].canv).height:o.wrapheight,!0===o.justify){o.slide_height=Math.round("fullscreen"===y[e].sliderLayout?y[e].module.height:y[e].gridheight[y[e].level]),o.slide_widths=[],o.slide_heights=[],o.slide_widthsCache=void 0===o.slide_widthsCache?[]:o.slide_widthsCache,o.slide_heightsCache=void 0===o.slide_heightsCache?[]:o.slide_heightsCache;for(var s,n=o.maxwidth=0;n<o.len;n++)y[e].slides.hasOwnProperty(n)&&(s=void 0===(s=y.gA(y[e].slides[n],"iratio"))||0===s||null===s?o.ratio:s,s=parseFloat(s),o.slide_widths[n]=Math.round(o.slide_height*s),o.slide_heights[n]=Math.round(o.slide_height),!1!==o.justifyMaxWidth&&(o.slide_widths[n]=Math.min(o.wrapwidth,o.slide_widths[n])),!1!==o.justifyMaxWidth&&(o.slide_heights[n]=Math.min(o.wrapheight,o.slide_heights[n])),o.slide_widths[n]!==o.slide_widthsCache[n]&&(o.slide_widthsCache[n]=o.slide_widths[n],!0!==t)&&tpGS.gsap.set(y[e].slides[n],{width:o.slide_widths[n]}),o.slide_heights[n]!==o.slide_heightsCache[n]&&(o.slide_heightsCache[n]=o.slide_heights[n],!0!==t)&&tpGS.gsap.set(y[e].slides[n],{height:o.slide_heights[n]}),o.maxwidth+=o.slide_widths[n]+o.space,o.maxheight+=o.slide_heights[n]+o.space)}o.infinity=!(o.wrapwidth>=o.maxwidth)&&o.infbackup,o.forceBAlign&&o.slide_height<.6*o.wrapheight&&o.wrapwidth<o.maxwidth?o.infinity=!0:o.forceBAlign&&(o.infinity=!1),!0!==o.quickmode&&(o.wrapoffset="center"===o.horizontal_align?(y[e].canv.width-y[e].outNavDims.right-y[e].outNavDims.left-o.wrapwidth)/2:0,o.wrapoffset="auto"!=y[e].sliderLayout&&y[e].outernav?0:o.wrapoffset<y[e].outNavDims.left?y[e].outNavDims.left:o.wrapoffset,a="3D"==y[e].parallax.type||"3d"==y[e].parallax.type?"visible":"hidden",r="right"===o.horizontal_align?{left:"auto",right:o.wrapoffset+"px",width:o.wrapwidth,overflow:a}:"left"===o.horizontal_align||o.wrapwidth<y.winW?{right:"auto",left:o.wrapoffset+"px",width:o.wrapwidth,overflow:a}:{right:"auto",left:"auto",width:"100%",overflow:a},void 0!==o.cacheWrapObj&&r.left===o.cacheWrapObj.left&&r.right===o.cacheWrapObj.right&&r.width===o.cacheWrapObj.width||(window.requestAnimationFrame(function(){tpGS.gsap.set(o.wrap,r),0<y[e].carousel.wrapoffset&&tpGS.gsap.set(y[e].canvas,{left:0})}),o.cacheWrapObj=jQuery.extend(!0,{},r)),o.inneroffset="right"===o.horizontal_align?o.wrapwidth-o.slide_width:0,o.windhalf="auto"===y[e].sliderLayout?y[e].module.width/2:y.winW/2),o.lastWrapwidth===o.wrapwidth&&o.lastWrapheight===o.wrapheight||window.requestAnimationFrame(function(){y.positionCarousel(e)})}}),function(e,t){var i=y[e].carousel,t=t&&y[e].slides[y[e].pr_next_key]?jQuery(y[e].slides[y[e].pr_next_key]):y[e].pr_next_slide;y[e].c.trigger("revolution.slide.carouselchange",{slider:e,slideIndex:parseInt(y[e].pr_active_key,0)+1,slideLIIndex:y[e].pr_active_key,slide:t,currentslide:t,prevSlideIndex:void 0!==y[e].pr_lastshown_key&&parseInt(y[e].pr_lastshown_key,0)+1,prevSlideLIIndex:void 0!==y[e].pr_lastshown_key&&parseInt(y[e].pr_lastshown_key,0),prevSlide:void 0!==i.oldfocused&&y[e].slides[i.oldfocused]})}),b=function(e,t){var i=y[e].carousel;void 0!==e&&void 0!==i&&(i.pDiv="center"===t?i.maxVisibleItems/2:i.maxVisibleItems,i.edgeRatio=Math.floor(i.pDiv-("center"===t?0:1))/Math.ceil(i.pDiv),1===i.maxVisibleItems&&(i.edgeRatio=1),i.oEdge=1===i.maxOpacity?1:i.vary_fade?1+(i.maxOpacity-1)*i.edgeRatio:i.maxOpacity,i.oEdge=1===i.maxVisibleItems?i.maxOpacity:i.oEdge,i.oRange=1<i.maxVisibleItems?tpGS.gsap.utils.mapRange(i.edgeRatio,1,i.oEdge,0):tpGS.gsap.utils.mapRange(1,1.1,i.oEdge,0),i.oRangeMin=tpGS.gsap.utils.mapRange(-1/i.maxVisibleItems,-1.1/i.maxVisibleItems,1,0))},g=function(e){var t=y[e].carousel;if(void 0!==e&&void 0!==t){tpGS.gsap.set([t.proxy,t.follower],{x:"+=0",y:"+=0"}),t.arr=[],t.trackArr=[];for(var i=0;i<y[e].slides.length;i++)t.arr.push({elem:y[e].slides[i]}),t.trackArr.push({elem:y[e].slides[i]})}},o=function(e,t){return null===e||jQuery.isEmptyObject(e)?t:void 0===e?"right":e};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.carousel={loaded:!0,version:"6.6.17"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";function h(e){var t;return void 0===e?"":(t="",Q.isChrome8889&&0===e.b_blur&&(e.b_blur=.05),t=void 0!==e.b_blur?"blur("+(e.b_blur||0)+"px)":"",(t=(t=(t=(t+=void 0!==e.b_grayscale?(0<t.length?" ":"")+"grayscale("+(e.b_grayscale||0)+"%)":"")+(void 0!==e.b_sepia?(0<t.length?" ":"")+"sepia("+(e.b_sepia||0)+"%)":""))+(void 0!==e.b_invert?(0<t.length?" ":"")+"invert("+(e.b_invert||0)+"%)":""))+(void 0!==e.b_brightness?(0<t.length?" ":"")+"brightness("+(e.b_brightness||100)+"%)":""))||"none")}function m(e,t,i,a,r){return t&&(t[a]="true"===t[a]||t[a]),0===Q[r].sdir||void 0===t||("mask"===i?a="x"===a?"mX":"y"===a?"mY":a:"chars"===i?a="x"===a?"cX":"y"===a?"cY":"dir"===a?"cD":a:"words"===i?a="x"===a?"wX":"y"===a?"wY":"dir"===a?"wD":a:"lines"===i&&(a="x"===a?"lX":"y"===a?"lY":"dir"===a?"lD":a),void 0===t[a])||!1===t[a]?e:void 0!==t&&!0===t[a]?"t"===e||"top"===e?"b":"b"===e||"bottom"===e?"t":"l"===e||"left"===e?"r":"r"===e||"right"===e?"l":-1*parseFloat(e)+(0<=(""+e).indexOf("px")?"px":0<=(""+e).indexOf("%")?"%":""):void 0}function d(e,t,i,a,r){var o,s,n,l={},d={},c={};for(n in a=void 0===a?"transform":a,"loop"===r?(c.autoRotate=!1,c.yoyo_filter=!1,c.yoyo_rotate=!1,c.yoyo_move=!1,c.yoyo_scale=!1,c.curved=!1,c.curviness=2,c.ease="none",c.speed=1e3,l.x=c.st=0,l.y=0,l.z=0,l.xr=0,l.yr=0,l.zr=0,l.scaleX=1,l.scaleY=1,l.originX="50%",l.originY="50%",l.originZ="0",l.rotationX="0deg",l.rotationY="0deg",l.rotationZ="0deg"):(c.speed=300,i?c.ease="default":l.ease="default"),"sfx"===r&&(l.fxc="#ffffff"),e=e.split(";"))if(e.hasOwnProperty(n)){var p=e[n].split(":");switch(p[0]){case"u":l.use="true"===p[1]||"t"===p[1]||fasle;break;case"c":o=p[1];break;case"fxc":l.fxc=p[1];break;case"bgc":s=p[1];break;case"auto":l.auto="t"===p[1]||void 0===p[1]||"true"===p[1];break;case"o":l.opacity=p[1];break;case"oX":l.originX=p[1];break;case"oY":l.originY=p[1];break;case"oZ":l.originZ=p[1];break;case"sX":l.scaleX=p[1];break;case"sY":l.scaleY=p[1];break;case"skX":l.skewX=p[1];break;case"skY":l.skewY=p[1];break;case"rX":l.rotationX=p[1],0!=p[1]&&"0deg"!==p[1]&&Q.addSafariFix(t);break;case"rY":l.rotationY=p[1],0!=p[1]&&"0deg"!==p[1]&&Q.addSafariFix(t);break;case"rZ":l.rotationZ=p[1];break;case"sc":l.color=p[1];break;case"se":l.effect=p[1];break;case"bos":l.borderStyle=p[1];break;case"boc":l.borderColor=p[1];break;case"td":l.textDecoration=p[1];break;case"zI":l.zIndex=p[1];break;case"tp":l.transformPerspective="isometric"===Q[t].perspectiveType?0:"global"===Q[t].perspectiveType?Q[t].perspective:p[1];break;case"cp":l.clip=parseInt(p[1],0);break;case"cpb":l.clipB=parseInt(p[1],0);break;case"aR":c.autoRotate="t"==p[1];break;case"rA":c.radiusAngle=p[1];break;case"yyf":c.yoyo_filter="t"==p[1];break;case"yym":c.yoyo_move="t"==p[1];break;case"yyr":c.yoyo_rotate="t"==p[1];break;case"yys":c.yoyo_scale="t"==p[1];break;case"crd":c.curved="t"==p[1];break;case"x":l.x="reverse"===r?"t"===p[1]||!0===p[1]||"true"==p[1]:"loop"===r?parseInt(p[1],0):Q.revToResp(p[1],Q[t].rle);break;case"y":l.y="reverse"===r?"t"===p[1]||!0===p[1]||"true"==p[1]:"loop"===r?parseInt(p[1],0):Q.revToResp(p[1],Q[t].rle);break;case"z":l.z="loop"===r?parseInt(p[1],0):Q.revToResp(p[1],Q[t].rle),0!=p[1]&&Q.addSafariFix(t);break;case"bow":l.borderWidth=Q.revToResp(p[1],4,0).toString().replace(/,/g," ");break;case"bor":l.borderRadius=Q.revToResp(p[1],4,0).toString().replace(/,/g," ");break;case"m":l.mask="t"===p[1]||"f"!==p[1]&&p[1];break;case"iC":l.instantClick="t"===p[1]||"f"!==p[1]&&p[1];break;case"xR":l.xr=parseInt(p[1],0),Q.addSafariFix(t);break;case"yR":l.yr=parseInt(p[1],0),Q.addSafariFix(t);break;case"zR":l.zr=parseInt(p[1],0);break;case"iosfx":"default"!==p[1]&&"d"!==p[1]&&"p"!==p[1]&&(d.iosfx=p[1]);break;case"blu":"loop"===r?l.blur=parseInt(p[1],0):d.blur=parseInt(p[1],0);break;case"gra":"loop"===r?l.grayscale=parseInt(p[1],0):d.grayscale=parseInt(p[1],0);break;case"bri":"loop"===r?l.brightness=parseInt(p[1],0):d.brightness=parseInt(p[1],0);break;case"bB":d.b_blur=parseInt(p[1],0);break;case"bG":d.b_grayscale=parseInt(p[1],0);break;case"bR":d.b_brightness=parseInt(p[1],0);break;case"bI":d.b_invert=parseInt(p[1],0);break;case"bS":d.b_sepia=parseInt(p[1],0);break;case"sp":c.speed=parseInt(p[1],0);break;case"d":l.delay=parseInt(p[1],0);break;case"crns":c.curviness=parseInt(p[1],0);break;case"st":c.start="w"===p[1]||"a"===p[1]?"+=0":p[1],c.waitoncall="w"===p[1]||"a"===p[1];break;case"sA":c.startAbsolute=p[1];break;case"sR":c.startRelative=p[1];break;case"e":i?c.ease=p[1]:l.ease=p[1];break;default:0<p[0].length&&(l[p[0]]="t"===p[1]||"f"!==p[1]&&p[1])}}var g={timeline:c};return jQuery.isEmptyObject(d)||("split"===r?l=jQuery.extend(!0,l,d):g.filter=d),"split"===r&&(l.dir=void 0===l.dir?"start":"backward"===l.dir?"end":"middletoedge"===l.dir?"center":"edgetomiddle"===l.dir?"edge":l.dir),jQuery.isEmptyObject(o)||(g.color=o),jQuery.isEmptyObject(s)||(g.bgcolor=s),g[a]=l,g}function p(e){return void 0!==e&&(void 0!==e.rotationY||void 0!==e.rotationX||void 0!==e.z)}function c(e){return"thin"===(e=Q.isNumeric(e)?e:e.toLowerCase())?"00":"extra light"===e?200:"light"===e?300:"normal"===e?400:"medium"===e?500:"semi bold"===e?600:"bold"===e?700:"extra bold"===e?800:"ultra bold"===e||"black"===e?900:e}function k(e,t,i,a,r){var o=Q.isNumeric(e)||void 0===e?"":0<=e.indexOf("px")?"px":0<=e.indexOf("%")?"%":"";return e=Q.isNumeric(parseInt(e))?parseInt(e):e,e=null==(e="full"===(e=Q.isNumeric(e)?e*t+o:e)?a:"auto"===e||"none"===e?i:e)?r:e}function O(e){return null!=e&&0!==parseInt(e,0)}var q=["chars","words","lines"],R=["Top","Right","Bottom","Left"],L=["TopLeft","TopRight","BottomRight","BottomLeft"],I=["top","right","bottom","left"],Q=(jQuery.fn.revolution=jQuery.fn.revolution||{},jQuery.fn.revolution),J=(jQuery.extend(!0,Q,{checkLayerDimensions:function(e){var t,i,a,r=!1;for(t in Q[e.id].layers[e.skey])Q[e.id].layers[e.skey].hasOwnProperty(t)&&(i=Q[e.id].layers[e.skey][t],(a=Q[e.id]._L[i.id]).eow!==i.offsetWidth&&"true"!==Q.gA(i,"vary-layer-dims")&&(r=!0),a.lastknownwidth=a.eow,a.lastknownheight=a.eoh,a._slidelink||Q[e.id].caches.calcResponsiveLayersList.push({a:Q[e.id]._L[i.id].c,b:e.id,c:0,d:a.rsp_bd,e:e.slideIndex}));return r},requestLayerUpdates:function(e,t,i,a){var r,o;if(void 0!==i){var s=Q[e]._L[i],n=void 0!==s._ligid?Q[e]._L[s._ligid]:void 0;s.pVisRequest!==s.pVisStatus&&(r=null==n||!0!==n.childrenAtStartNotVisible?(s.pVisStatus=s.pVisRequest,n=("row"===s.type||"column"===s.type||"group"===s.type)&&void 0!==s.frames&&void 0!==s.frames.frame_999&&void 0!==s.frames.frame_999.transform&&""+s.frames.frame_999.transform.opacity!="0",o=1===s.pVisRequest?"remove":n?o:"add",1===s.pVisRequest?"remove":n?"add":r):(o="add","remove"),"group"===s.type&&"add"==r&&"hidden"==(1===s.pVisStatus?"visible":0===s.pVisStatus?"hidden":s.pVisStatus)&&(o="add"),void 0!==r&&s.p[0].classList[r]("rs-forceuntouchable"),void 0!==o)&&s.p[0].classList[o]("rs-forcehidden"),s.pPointerStatus!==s.pPeventsRequest&&(s.pPointerStatus=s.pPeventsRequest,tpGS.gsap.set(s.p[0],{pointerEvents:s.pPointerStatus,visibility:1===s.pVisStatus?"visible":0===s.pVisStatus?"hidden":s.pVisStatus})),void 0!==a&&"ignore"!==a&&0!==a&&(a++,"enterstage"===t||"leavestage"===t||"framestarted"===t?Q.isFirefox(e)?-1===s.p[0].style.transform.indexOf("perspective")&&(s.p[0].style.transform+=(0===s.p[0].style.transform.length?" ":"")+"perspective("+a+"px)"):(window.isSafari11||!0===s.maskHasPerspective||0!==s.p[0].style.perspective.length)&&"none"!=s.p[0].style.perspective||(s.p[0].style.perspective=a+"px"):"frameended"===t&&(Q.isFirefox(e)?s.p[0].style.transform=s.p[0].style.transform.replace("perspective("+a+"px)",""):window.isSafari11||(s.p[0].style.perspective=s.p[0].style.perspective.replace(a-1+"px",""))))}else for(var l in Q[e]._L)Q[e]._L.hasOwnProperty(l)&&(Q[e]._L[l].pVisRequest!==Q[e]._L[l].pVisStatus&&(Q[e]._L[l].pVisStatus=Q[e]._L[l].pVisRequest,0===Q[e]._L[l].pVisStatus?Q[e]._L[l].p[0].classList.add("rs-forcehidden"):Q[e]._L[l].p[0].classList.remove("rs-forcehidden")),Q[e]._L[l].pPointerStatus!==Q[e]._L[l].pPeventsRequest)&&(Q[e]._L[l].pPointerStatus=Q[e]._L[l].pPeventsRequest,tpGS.gsap.set(Q[e]._L[l].p[0],{pointerEvents:Q[e]._L[l].pPointerStatus,visibility:Q[e]._L[l].pVisStatus}));"enterstage"===t&&void 0!==i&&void 0!==Q[e]._L[i].esginside&&0<Q[e]._L[i].esginside.length&&void 0!==Q[e]._L[i].esginside.esredraw&&Q[e]._L[i].esginside.esredraw()},updateMiddleZonesAndESG:function(e){var t,i=Q[e].pr_processing_key||Q[e].pr_active_key||0;if(Q[e].middleZones&&0<Q[e].middleZones.length&&void 0!==Q[e].middleZones[i])for(t=0;t<Q[e].middleZones[i].length;t++)tpGS.gsap.set(Q[e].middleZones[i][t],{y:Math.round(Q[e].module.height/2-Q[e].middleZones[i][t].offsetHeight/2)+"px"});if(Q[e].smiddleZones&&0<Q[e].smiddleZones.length)for(t=0;t<Q[e].smiddleZones.length;t++)tpGS.gsap.set(Q[e].smiddleZones[t],{y:Math.round(Q[e].module.height/2-Q[e].smiddleZones[t].offsetHeight/2)+"px"})},getRowHeights:function(e,t){if(!Q[e].firstLayerCalculated)return{cur:0,last:0,cache:[],tz:0};var i=0,a=0,r=0,o=void 0!==t?t:Q[e].pr_processing_key||Q[e].pr_active_key||0,s=void 0!==t?t:Q[e].pr_active_key||0;if(Q[e].rowMiddleHeights=null==Q[e].rowMiddleHeights?{}:Q[e].rowMiddleHeights,Q[e].rowMiddleHeights[o]=0,Q[e].rowzones&&0<Q[e].rowzones.length){if(void 0!==Q[e].rowzones[o])for(var n=0;n<Q[e].rowzones[o].length;n++)Q[e].rowzonesHeights[o][n]=Q[e].rowzones[o][n][0].offsetHeight,i+=Q[e].rowzonesHeights[o][n],"true"==Q[e].rowzones[o][n][0].dataset.middle&&(Q[e].rowMiddleHeights[o]+=Q[e].rowzonesHeights[o][n]);if(s!==o)for(n=Q[e].rowMiddleHeights[s]=0;n<Q[e].rowzones[s].length;n++)Q[e].rowzonesHeights[s][n]=Q[e].rowzones[s][n][0].offsetHeight,a+=Q[e].rowzonesHeights[s][n],"true"==Q[e].rowzones[s][n][0].dataset.middle&&(Q[e].rowMiddleHeights[s]+=Q[e].rowzonesHeights[s][n])}if(Q[e].srowzones&&0<Q[e].srowzones.length)for(n=Q[e].rowMiddleHeights.static=0;n<Q[e].srowzones.length;n++)r+=Q[e].srowzones[n][0].offsetHeight,"true"==Q[e].srowzones[n][0].dataset.middle&&(Q[e].rowMiddleHeights.static+=Q[e].srowzones[n][0].offsetHeight);var i=i<r?r:i,t=void 0===Q[e].rowHeights?[]:Q[e].rowHeights.cache,l=(new Date).getTime();return void 0!==Q[e].rowHeights&&l-Q[e].rowHeights.tz<300?5<Q[e].rowHeights.cache.length&&(i=Q[e].rowHeights.cache[Q[e].rowHeights.cache.length-1]===i?Q[e].rowHeights.cache[Q[e].rowHeights.cache.length-2]:Q[e].rowHeights.cache[Q[e].rowHeights.cache.length-1],l=Q[e].rowHeights.tz):t=[],{cur:i,last:a,cache:t,tz:l}},getGridOffset:function(e,t,i,a){var r="grid"===i||"carousel"!==Q[e].sliderType||a?Q[e].canv.width:Q[e].carousel.slide_width,o=(Q[e].useFullScreenHeight?Q[e].module:"grid"===i?Q[e].content:"carousel"!==Q[e].sliderType||a?Q[e].module:Q[e].canv).height,s="slide"===i||"carousel"==Q[e].sliderType&&"v"==Q[e].carousel.orientation?0:Math.max(0,"fullscreen"==Q[e].sliderLayout?Q[e].module.height/2-Q.iHE(e)*(Q[e].keepBPHeight?1:Q[e].CM.h)/2:Q[e].autoHeight||null!=Q[e].minHeight&&0<Q[e].minHeight||Q[e].keepBPHeight?Q[e].canv.height/2-Q.iHE(e)*Q[e].CM.h/2:0),t="slide"===i?0:Math.max(0,"carousel"===Q[e].sliderType&&"v"!==Q[e].carousel.orientation?0:Q[e].canv.width/2-Q.iWA(e,t)*Q[e].CM.w/2);return[r,o,t="slide"!==i&&"carousel"===Q[e].sliderType&&a&&void 0!==Q[e].carousel&&void 0!==Q[e].carousel.horizontal_align?Math.max(0,"center"===Q[e].carousel.horizontal_align?0+(Q[e].module.width-Q.iWA(e,"static")*Q[e].CM.w)/2:"right"===Q[e].carousel.horizontal_align?Q[e].module.width-Q[e].gridwidth[Q[e].level]*Q[e].CM.w:t):t,s]},initLayer:function(t){var i,a,r,e,o=t.id,s=t.skey;for(e in Q[o].layers[t.skey])if(Q[o].layers[t.skey].hasOwnProperty(e)){var n=Q[o].layers[t.skey][e],l=jQuery(n),d=Q.gA(n,"initialised"),c=d?Q[o]._L[n.id]:l.data();if("individual"===t.skey&&(c.slideKey=void 0===c.slideKey?Q.gA(l.closest("rs-slide")[0],"key"):c.slideKey,c.slideIndex=void 0===c.slideIndex?Q.getSlideIndex(o,c.slideKey):c.slideIndex,t.slideIndex=c.slideIndex,s=c.slideKey),void 0===d){if(Q.revCheckIDS(o,n),(Q[o]._L[n.id]=c).ford=void 0===c.ford?"frame_0;frame_1;frame_999":c.ford,c.ford=";"==c.ford[c.ford.length-1]?c.ford.substring(0,c.ford.length-1):c.ford,c.ford=c.ford.split(";"),void 0!==c.clip)for(i in c.clipPath={use:!1,origin:"l",type:"rectangle"},c.clip=c.clip.split(";"),c.clip)c.clip.hasOwnProperty(i)&&("u"==(a=c.clip[i].split(":"))[0]&&(c.clipPath.use="true"==a[1]),"o"==a[0]&&(c.clipPath.origin=a[1]),"t"==a[0])&&(c.clipPath.type=a[1]);c.frames=M(c,o),c.caches={},c.OBJUPD={},c.c=l,c.p=Q[o]._Lshortcuts[n.id].p,c.lp=c.reqWrp.loop?Q[o]._Lshortcuts[n.id].lp:void 0,c.m=c.reqWrp.mask?Q[o]._Lshortcuts[n.id].m:void 0,c.triggercache=void 0===c.triggercache?"reset":c.triggercache,c.rsp_bd=void 0===c.rsp_bd?"column"===c.type||"row"===c.type?"off":"on":c.rsp_bd,c.rsp_o=void 0===c.rsp_o?"on":c.rsp_o,c.basealign=void 0===c.basealign?"grid":c.basealign;let e;if(c.group="group"!==c.type&&null!==(e=Q.closestNode(l[0],"RS-GROUP"))||"group"===c.type&&null!==(e=Q.closestNode(l[0].parentNode,"RS-GROUP"))?"group":"column"!==c.type&&null!==(e=Q.closestNode(l[0],"RS-COLUMN"))?"column":"row"!==c.type&&null!==(e=Q.closestNode(l[0],"RS-ROW"))?"row":void 0,c._lig=null!==e&&void 0!==e?jQuery(e):void 0,c._ligid=void 0!==c._lig?c._lig[0].id:void 0,c._column="RS-COLUMN"===l[0].tagName?jQuery(Q.closestNode(l[0],"RS-COLUMN-WRAP")):"none",c._row="RS-COLUMN"===l[0].tagName&&jQuery(Q.closestNode(l[0],"RS-ROW")),c._ingroup="group"===c.group,c._incolumn="column"===c.group,c._inrow="row"===c.group,c.fsom="true"==c.fsom||1==c.fsom,c.fullinset=""+c.fullinset=="true",c.position=void 0!==c.pos?"r"==c.pos?"relative":"absolute":c._incolumn?"relative":"absolute",(c._ingroup||c._incolumn)&&0<=c._lig[0].className.indexOf("rs-sba")&&(!1!==c.animationonscroll||void 0===c.frames.loop)&&!0!==c.animOnScrollForceDisable&&(c.animationonscroll=!0,l[0].className+=" rs-sba",Q[o].sbas[s][n.id]=l[0]),c.animOnScrollRepeats=0,c._isgroup="RS-GROUP"===l[0].tagName,c.type=c.type||"none","row"===c.type&&(void 0===c.cbreak&&(c.cbreak=2),void 0===c.zone)&&(c.zone=Q.closestNode(l[0],"RS-ZONE"),c.zone=null!==c.zone&&void 0!==c.zone?c.zone.className:""),c.esginside=jQuery(l[0].getElementsByClassName("esg-grid")[0]),c._isnotext=-1!==jQuery.inArray(c.type,["video","image","audio","shape","row","group"]),c._mediatag="html5"==c.audio?"audio":"video",c.img=l.find("img"),c.deepiframe=Q.getByTag(l[0],"iframe"),c.deepmedia=Q.getByTag(l[0],c._mediatag),c.layertype="image"===c.type?"image":0<=l[0].className.indexOf("rs-layer-video")||0<=l[0].className.indexOf("rs-layer-audio")||0<c.deepiframe.length&&(0<c.deepiframe[0].src.toLowerCase().indexOf("youtube")||0<c.deepiframe[0].src.toLowerCase().indexOf("vimeo"))||0<c.deepmedia.length?"video":"html",0<c.deepiframe.length&&Q.sA(c.deepiframe[0],"layertype",c.layertype),"column"===c.type&&c.cbgexists&&(c.cbg=jQuery(Q.getByTag(c.p[0],"RS-COLUMN-BG")[0]),c.cbgmask=jQuery(Q.getByTag(c.p[0],"RS-CBG-MASK-WRAP")[0])),c._slidelink=0<=l[0].className.indexOf("slidelink"),c._isstatic=0<=l[0].className.indexOf("rs-layer-static"),c.slidekey=c._isstatic?"staticlayers":s,c._togglelisteners=0<l[0].getElementsByClassName("rs-toggled-content").length,"text"===c.type&&(-1!==c.c[0].innerHTML.indexOf("{{total_slide_count}}")&&(c.c[0].innerHTML=c.c[0].innerHTML.replace("{{total_slide_count}}",Q[o].realslideamount)),0<=c.c[0].innerHTML.indexOf("{{current_slide_index}}"))&&(c._isstatic?(c.metas=c.metas||{},c.metas.csi={},c.c[0].innerHTML=c.c[0].innerHTML.replace("{{current_slide_index}}","<cusli>"+Q[o].realslideamount+"</cusli>"),c.metas.csi.c=c.c[0].getElementsByTagName("CUSLI")[0]):(h=parseInt(t.slideIndex)+1,c.c[0].innerHTML=c.c[0].innerHTML.replace("{{current_slide_index}}",(h<10&&9<Q[o].realslideamount?"0":"")+h))),c.bgcol=void 0===c.bgcol?0<=l[0].style.background.indexOf("gradient")?l[0].style.background:l[0].style.backgroundColor:c.bgcol,c.bgcol=""===c.bgcol?"rgba(0, 0, 0, 0)":c.bgcol,c.bgcol=0===c.bgcol.indexOf("rgba(0, 0, 0, 0)")&&18<c.bgcol.length?c.bgcol.replace("rgba(0, 0, 0, 0)",""):c.bgcol,c.zindex=void 0===c.zindex?parseInt(l[0].style.zIndex):parseInt(c.zindex),c._isgroup&&(c.frames.frame_1.timeline.waitoncall&&(c.childrenAtStartNotVisible=!0),c.pVisRequest=0),c._togglelisteners&&l.on("click",function(){Q.swaptoggleState([this.id])}),void 0!==c.border)for(i in c.border=c.border.split(";"),c.bordercolor="transparent",c.border)if(c.border.hasOwnProperty(i))switch((a=c.border[i].split(":"))[0]){case"boc":c.bordercolor=a[1];break;case"bow":c.borderwidth=Q.revToResp(a[1],4,0);break;case"bos":c.borderstyle=Q.revToResp(a[1],4,0);break;case"bor":c.borderradius=Q.revToResp(a[1],4,0)}if("svg"===c.type&&(c.svg=l.find("svg"),c.svgI=S(c.svgi,o),c.svgPath=c.svg.find(c.svgI.svgAll?"path, circle, ellipse, line, polygon, polyline, rect":"path"),c.svgH=void 0!==c.svgi&&-1===c.svgi.indexOf("oc:t")?S(c.svgh,o):{}),void 0!==c.btrans){var p=c.btrans;for(i in c.btrans={rX:0,rY:0,rZ:0,o:1},p=p.split(";"))if(p.hasOwnProperty(i))switch((a=p[i].split(":"))[0]){case"rX":c.btrans.rX=a[1];break;case"rY":c.btrans.rY=a[1];break;case"rZ":c.btrans.rZ=a[1];break;case"o":c.btrans.o=a[1];break;case"iosfx":c.iOSFix="default"==a[1]?"d":"r"==a[1]?"rotationX":"p"==a[1]?"d":a[1]}}if(void 0!==c.tsh)for(i in c.tshadow={c:"rgba(0,0,0,0.25)",v:0,h:0,b:0},c.tsh=c.tsh.split(";"),c.tsh)if(c.tsh.hasOwnProperty(i))switch((a=c.tsh[i].split(":"))[0]){case"c":c.tshadow.c=a[1];break;case"h":c.tshadow.h=a[1];break;case"v":c.tshadow.v=a[1];break;case"b":c.tshadow.b=a[1]}if(void 0!==c.tst)for(i in c.tstroke={c:"rgba(0,0,0,0.25)",w:1},c.tst=c.tst.split(";"),c.tst)if(c.tst.hasOwnProperty(i))switch((a=c.tst[i].split(":"))[0]){case"c":c.tstroke.c=a[1];break;case"w":c.tstroke.w=a[1]}if(void 0!==c.bsh)for(i in c.bshadow={e:"c",c:"rgba(0,0,0,0.25)",v:0,h:0,b:0,s:0},c.bsh=c.bsh.split(";"),c.bsh)if(c.bsh.hasOwnProperty(i))switch((a=c.bsh[i].split(":"))[0]){case"c":c.bshadow.c=a[1];break;case"h":c.bshadow.h=a[1];break;case"v":c.bshadow.v=a[1];break;case"b":c.bshadow.b=a[1];break;case"s":c.bshadow.s=a[1];break;case"e":c.bshadow.e=a[1]}if(void 0!==c.dim)for(i in c.dim=c.dim.split(";"),c.dim)if(c.dim.hasOwnProperty(i))switch((a=c.dim[i].split(":"))[0]){case"w":c.width=a[1];break;case"h":c.height=a[1];break;case"maxw":c.maxwidth=a[1];break;case"maxh":c.maxheight=a[1];break;case"minw":c.minwidth=a[1];break;case"minh":c.minheight=a[1]}if(void 0!==c.xy&&"row"!==c.type&&"column"!==c.type)for(i in c.xy=c.xy.split(";"),c.xy)if(c.xy.hasOwnProperty(i))switch((a=c.xy[i].split(":"))[0]){case"x":c.x=a[1].replace("px","");break;case"y":c.y=a[1].replace("px","");break;case"xo":c.hoffset=a[1].replace("px","");break;case"yo":c.voffset=a[1].replace("px","")}if(c._isnotext||void 0===c.text)if(c._isgroup&&void 0!==c.text)for(i in c.text=c.text.split(";"),c.text)c.text.hasOwnProperty(i)&&"a"===(a=c.text[i].split(":"))[0]&&(c.textalign=a[1]);else"column"===c.type&&void 0!==c.textDecoration&&delete c.textDecoration;else for(i in c.text=c.text.split(";"),c.text)if(c.text.hasOwnProperty(i))switch((a=c.text[i].split(":"))[0]){case"w":c.whitespace=a[1];break;case"td":c.textDecoration=a[1];break;case"c":c.clear=a[1];break;case"f":c.float=a[1];break;case"s":c.fontsize=a[1];break;case"l":c.lineheight=a[1];break;case"ls":c.letterspacing=a[1];break;case"fw":c.fontweight=a[1];break;case"a":c.textalign=a[1]}if(void 0!==c.flcr)for(i in c.flcr=c.flcr.split(";"),c.flcr)if(c.flcr.hasOwnProperty(i))switch((a=c.flcr[i].split(":"))[0]){case"c":c.clear=a[1];break;case"f":c.float=a[1]}if(void 0!==c.padding)for(i in c.padding=c.padding.split(";"),c.padding)if(c.padding.hasOwnProperty(i))switch((a=c.padding[i].split(":"))[0]){case"t":c.paddingtop=a[1];break;case"b":c.paddingbottom=a[1];break;case"l":c.paddingleft=a[1];break;case"r":c.paddingright=a[1]}if(void 0!==c.margin)for(i in c.margin=c.margin.split(";"),c.margin)if(c.margin.hasOwnProperty(i))switch((a=c.margin[i].split(":"))[0]){case"t":c.margintop=a[1];break;case"b":c.marginbottom=a[1];break;case"l":c.marginleft=a[1];break;case"r":c.marginright=a[1]}if(void 0!==c.spike&&(c.spike=C(c.spike)),void 0!==c.corners)for(i in r=c.corners.split(";"),c.corners={},r)r.hasOwnProperty(i)&&0<r[i].length&&(c.corners[r[i]]=jQuery("<"+r[i]+"></"+r[i]+">"),c.c.append(c.corners[r[i]]));c.textalign=x(c.textalign),c.vbility=Q.revToResp(c.vbility,Q[o].rle,!0),c.hoffset=Q.revToResp(c.hoffset,Q[o].rle,0),c.voffset=Q.revToResp(c.voffset,Q[o].rle,0),c.x=Q.revToResp(c.x,Q[o].rle,"l"),c.y=Q.revToResp(c.y,Q[o].rle,"t"),T(l,0,o),Q.sA(n,"initialised",!0),Q[o].c.trigger("layerinitialised",{layer:l[0].id,slider:o})}var g,u,h,m,d=c.x[Q[o].level],n=c.y[Q[o].level],v=Q.getGridOffset(o,t.slideIndex,c.basealign,c._isstatic),f=v[0],y=v[1],w=v[2],v=v[3];if(c.slideIndex=t.slideIndex,"updateposition"!==t.mode&&(0==c.vbility[Q[o].levelForced]||"f"==c.vbility[Q[o].levelForced]||f<Q[o].hideLayerAtLimit&&"on"==c.layeronlimit||f<Q[o].hideAllLayerAtLimit?(!0!==c.layerIsHidden&&c.p[0].classList.add("rs-layer-hidden"),c.layerIsHidden=!0):(c.layerIsHidden&&c.p[0].classList.remove("rs-layer-hidden"),c.layerIsHidden=!1),c.poster=null==c.poster&&void 0!==c.thumbimage?c.thumbimage:c.poster,"image"===c.layertype?(c.imgOBJ={},"cover-proportional"===c.img.data("c")?(Q.sA(c.img[0],"owidth",Q.gA(c.img[0],"owidth",c.img[0].width)),Q.sA(c.img[0],"oheight",Q.gA(c.img[0],"oheight",c.img[0].height)),u=Q.gA(c.img[0],"owidth")/Q.gA(c.img[0],"oheight"),g=c.img[0].width<=c.img[0].height?y/f:f/y,c.imgOBJ=g<u&&u<=1||u<g&&1<u?{width:"100%",height:"auto",left:"c"===d||"center"===d?"50%":"left"===d||"l"===d?"0":"auto",right:"r"===d||"right"===d?"0":"auto",top:"c"===n||"center"===n||"middle"===n||"m"===n?"50%":"top"===n||"t"===n?"0":"auto",bottom:"b"===n||"bottom"===n?"0":"auto",x:"c"===d||"center"===d||"middle"===d||"m"===d?"-50%":"0",y:"c"===n||"center"===n||"middle"===n||"m"===n?"-50%":"0"}:{height:"100%",width:"auto",left:"c"===d||"center"===d?"50%":"left"===d||"l"===d?"0":"auto",right:"r"===d||"right"===d?"0":"auto",top:"c"===n||"center"===n||"middle"===n||"m"===n?"50%":"top"===n||"t"===n?"0":"auto",bottom:"b"===n||"bottom"===n?"0":"auto",x:"c"===d||"center"===d||"middle"===d||"m"===d?"-50%":"0",y:"c"===n||"center"===n||"middle"===n||"m"===n?"-50%":"0"}):(void 0===c.group&&"auto"===c.width[Q[o].level]&&"auto"===c.height[Q[o].level]&&(c.width[Q[o].level]=Q.gA(c.img[0],"owidth",c.img[0].width),c.height[Q[o].level]=Q.gA(c.img[0],"owidth",c.img[0].height)),c.imgOBJ={width:"auto"!==c.width[Q[o].level]||isNaN(c.width[Q[o].level])&&0<=c.width[Q[o].level].indexOf("%")?"100%":"auto",height:"auto"!==c.height[Q[o].level]||isNaN(c.height[Q[o].level])&&0<=c.height[Q[o].level].indexOf("%")?"100%":"auto"})):"video"===c.layertype&&(Q.manageVideoLayer(l,o,s),"rebuild"!==t.mode&&Q.resetVideo(l,o,t.mode),null!=c.aspectratio&&1<c.aspectratio.split(":").length&&1==c.bgvideo&&Q.prepareCoveredVideo(o,l),c.media=void 0===c.media?0<c.deepiframe.length?jQuery(c.deepiframe[0]):jQuery(c.deepmedia[0]):c.media,c.html5vid=void 0===c.html5vid?!(0<c.deepiframe.length):c.html5vid,c.mediaOBJ={display:"block"},g=c.width[Q[o].level],u=c.height[Q[o].level],g="auto"===g?g:!Q.isNumeric(g)&&0<g.indexOf("%")?c._incolumn||c._ingroup?"100%":"grid"===c.basealign?Q.iWA(o,t.slideIndex)*Q[o].CM.w*parseFloat(g)/100:f*parseFloat(g)/100:"off"!==c.rsp_bd?parseFloat(g)*Q[o].CM.w+"px":parseFloat(g)+"px",u="auto"===u?u:!Q.isNumeric(u)&&0<u.indexOf("%")?"grid"===c.basealign?Q.iHE(o)*Q[o].CM.w:y:"off"!==c.rsp_bd?parseFloat(u)*Q[o].CM.h+"px":parseFloat(u)+"px",c.vd=void 0===c.vd?1<Q[o].videos[l[0].id].ratio.split(":").length?Q[o].videos[l[0].id].ratio.split(":")[0]/Q[o].videos[l[0].id].ratio.split(":")[1]:1:c.vd,!c._incolumn||"100%"!==g&&"auto"!==u||void 0===c.ytid?(-1==l[0].className.indexOf("rs-fsv")?(u="auto"===u&&void 0!==c.vd&&"auto"!==g?"100%"===g?l.width()/c.vd:g/c.vd:u,c.vidOBJ={width:g,height:u}):("grid"!==c.basealign&&(v=w=0),c.x=Q.revToResp(0,Q[o].rle,0),c.y=Q.revToResp(0,Q[o].rle,0),c.vidOBJ={width:g,height:Q[o].autoHeight?Q[o].canv.height:u}),0!=c.html5vid&&l.hasClass("rs-fsv")||(c.mediaOBJ={width:g,height:u,display:"block"}),c._ingroup&&null!==c.vidOBJ.width&&void 0!==c.vidOBJ.width&&!Q.isNumeric(c.vidOBJ.width)&&0<c.vidOBJ.width.indexOf("%")&&(c.OBJUPD.lppmOBJ={minWidth:g})):(m=l.width(),m="auto"===u?m/c.vd:u,c.vidOBJ={width:"auto",height:m},c.heightSetByVideo=!0)),c._slidelink||Q[o].caches.calcResponsiveLayersList.push({a:l,b:o,c:0,d:c.rsp_bd,e:t.slideIndex}),"on"===c.rsp_ch)&&"row"!==c.type&&"column"!==c.type&&"group"!==c.type&&"image"!==c.type&&"video"!==c.type&&"shape"!==c.type&&l.find("*").each(function(){var e=jQuery(this);"true"!==Q.gA(this,"stylerecorder")&&!0!==Q.gA(this,"stylerecorder")&&T(e,"rekursive",o),Q[o].caches.calcResponsiveLayersList.push({a:e,b:o,c:"rekursive",d:c.rsp_bd,e:t.slideIndex,RSL:l})}),"preset"!==t.mode){if(c.oldeow=c.eow,c.oldeoh=c.eoh,c.eow=l.outerWidth(!0),c.eoh=l.outerHeight(!0),0==c.eoh&&"group"==c.type&&"auto"==c.height[Q[o].level]&&(c.eoh=c.p[0].offsetHeight),void 0!==c.metas&&void 0!==c.metas.csi&&c.metas.csi.change!==Q[o].focusedSlideIndex&&(c.metas.csi.change=Q[o].focusedSlideIndex,h=parseInt(c.metas.csi.change)+1,c.metas.csi.c.innerHTML=(9<Q[o].realslideamount&&h<10?"0":"")+h),c.imgInFirefox="image"==c.type&&"auto"==c.width[Q[o].level]&&"100%"==c.height[Q[o].level]&&Q.isFirefox(o),c.imgInFirefox&&(m=c.img.width(),c.eow=0!==m?m:c.eow),c.eow<=0&&void 0!==c.lastknownwidth&&(c.eow=c.lastknownwidth),c.eoh<=0&&void 0!==c.lastknownheight&&(c.eoh=c.lastknownheight),void 0!==c.corners&&("text"===c.type||"button"===c.type||"shape"===c.type)){for(r in c.corners)c.corners.hasOwnProperty(r)&&(c.corners[r].css("borderWidth",c.eoh+"px"),c.corners[r].css("border"+("rs-fcrt"===r||"rs-fcr"===r?"Right":"Left"),"0px solid transparent"),c.corners[r].css("border"+("rs-fcrt"==r||"rs-bcr"==r?"Bottom":"Top")+"Color",c.bgcol));c.eow=l.outerWidth(!0)}0==c.eow&&0==c.eoh&&(c.eow=("grid"===c.basealign?Q[o].content:Q[o].module).width,c.eoh=("grid"===c.basealign?Q[o].content:Q[o].module).height),c.basealign=Q[o].justifyCarousel?"grid":c.basealign;var b="on"===c.rsp_o?parseInt(c.voffset[Q[o].level],0)*Q[o].CM.w:parseInt(c.voffset[Q[o].level],0),_="on"===c.rsp_o?parseInt(c.hoffset[Q[o].level],0)*Q[o].CM.h:parseInt(c.hoffset[Q[o].level],0),f="grid"===c.basealign?Q.iWA(o,t.slideIndex)*Q[o].CM.w:f,y="grid"===c.basealign||"carousel"==Q[o].sliderType&&"v"===Q[o].carousel.orientation?Q.iHE(o)*(Q[o].keepBPHeight||Q[o].currentRowsHeight>Q[o].gridheight[Q[o].level]?1:Q[o].CM.h):y;(1==Q[o].gridEQModule||void 0!==c._lig&&"row"!==c.type&&"column"!==c.type&&("group"!==c.type||c._ingroup||c._incolumn))&&(f=void 0!==c._lig?c._lig.width():Q[o].module.width,y=void 0!==c._lig?c._lig.height():Q[o].module.height,v=w=0),Q[o].keepBPHeight&&y==Q[o].module.height&&(v=0),"video"===c.type&&null!=c.vidOBJ&&(0<=c.vidOBJ.height&&0===c.eoh&&(c.eoh=c.vidOBJ.height),0<=c.vidOBJ.width)&&0===c.eow&&(c.eow=c.vidOBJ.width),d="relative"==c.position?0:"c"===d||"m"===d||"center"===d||"middle"===d?f/2-c.eow/2+_:"l"===d||"left"===d?_:"r"===d||"right"===d?f-c.eow-_:"off"!==c.rsp_o?d*Q[o].CM.w:d,n="relative"==c.position?0:"m"===n||"c"===n||"center"===n||"middle"===n?y/2-c.eoh/2+b:"t"===n||"top"==n?b:"b"===n||"bottom"==n?y-c.eoh-b:"off"!==c.rsp_o?n*Q[o].CM.w:n,d=c._slidelink?0:Q[o].rtl&&-1==(""+c.width[Q[o].level]).indexOf("%")?parseInt(d)+c.eow:d,c.calcx="relative"!=c.position||"group"!==c.type&&!c._incolumn?parseInt(d,0)+w:0,c.calcy="relative"!=c.position||"group"!==c.type&&!c._incolumn?parseInt(n,0)+v:0,"row"!==c.type&&"column"!==c.type?c.OBJUPD.POBJ={zIndex:c.zindex,top:c.calcy,left:c.calcx,overwrite:"auto"}:"row"!==c.type?c.OBJUPD.POBJ={zIndex:c.zindex,width:c.columnwidth,top:0,left:0,overwrite:"auto"}:"row"===c.type&&(c.OBJUPD.POBJ={zIndex:c.zindex,width:"grid"===c.basealign?f+"px":"100%",top:0,left:Q[o].rtl?-1*w:w,overwrite:"auto"},c.cbreak<=Q[o].level?-1===l[0].className.indexOf("rev_break_columns")&&l[0].classList.add("rev_break_columns"):0<l[0].className.indexOf("rev_break_columns")&&l[0].classList.remove("rev_break_columns"),c.rowcalcx=c.OBJUPD.POBJ.left,c.pow=c.p.outerWidth(!0)),void 0!==c.blendmode&&(c.OBJUPD.POBJ.mixBlendMode="color"===c.blendmode&&window.isSafari11?"color-burn":c.blendmode),void 0===c.frames.loop&&!c.imgInFirefox||(c.OBJUPD.LPOBJ={width:c.eow,height:c.eoh}),c._ingroup&&(void 0!==c._groupw&&!Q.isNumeric(c._groupw)&&0<c._groupw.indexOf("%")&&(c.OBJUPD.lppmOBJ.minWidth=c._groupw),void 0!==c._grouph)&&!Q.isNumeric(c._grouph)&&0<c._grouph.indexOf("%")&&(c.OBJUPD.lppmOBJ.minHeight=c._grouph),"updateposition"!==t.mode||c.caches.POBJ_LEFT===c.OBJUPD.POBJ.left&&c.caches.POBJ_TOP===c.OBJUPD.POBJ.top||(tpGS.gsap.set(c.p,c.OBJUPD.POBJ),c.caches.POBJ_LEFT=c.OBJUPD.POBJ.left,c.caches.POBJ_TOP=c.OBJUPD.POBJ.top),t.animcompleted&&Q.animcompleted(l,o)}}},hoverReverseDone:function(e){Q[e.id]._L[e.L[0].id].textDecoration&&tpGS.gsap.set(Q[e.id]._L[e.L[0].id].c,{textDecoration:Q[e.id]._L[e.L[0].id].textDecoration})},animcompleted:function(e,t,i){var a;void 0!==Q[t].videos&&null!=(a=Q[t].videos[e[0].id])&&null!=a.type&&"none"!=a.type&&(1==a.aplay||"true"==a.aplay||"on"==a.aplay||"1sttime"==a.aplay?(("static"===a.slideid||"carousel"!==Q[t].sliderType||e.closest("rs-slide").index()==Q[t].carousel.focused||e.closest("rs-slide").index()==Q[t].activeRSSlide&&Q[t].carousel.oldfocused==Q[t].carousel.focused||i)&&Q.playVideo(e,t),Q.toggleState(e.data("videotoggledby")),!a.aplay1&&"1sttime"!=a.aplay||(a.aplay1=!1,a.aplay=!1)):("no1sttime"==a.aplay&&(a.aplay=!0),Q.unToggleState(e.data("videotoggledby"))))},convertHoverTransform:function(e,t,i){var a,r=Q.clone(e.transform);return(r.originX||r.originY||r.originZ)&&(r.transformOrigin=(void 0===r.originX?"50%":r.originX)+" "+(void 0===r.originY?"50%":r.originY)+" "+(void 0===r.originZ?"50%":r.originZ),delete r.originX,delete r.originY,delete r.originZ),void 0!==e&&void 0!==e.filter&&(r.filter=v(e.filter),r["-webkit-filter"]=r.filter),r.color=void 0===r.color?"rgba(255,255,255,1)":r.color,r.force3D="auto",void 0!==r.borderRadius&&((a=r.borderRadius.split(" ")).length,r.borderTopLeftRadius=a[0],r.borderTopRightRadius=a[1],r.borderBottomRightRadius=a[2],r.borderBottomLeftRadius=a[3],delete r.borderRadius),void 0!==r.borderWidth&&((a=r.borderWidth.split(" ")).length,r.borderTopWidth=a[0],r.borderRightWidth=a[1],r.borderBottomWidth=a[2],r.borderLeftWidth=a[3],delete r.borderWidth),void 0!==i.bg&&-1!==i.bg.indexOf("url")||(e=-1!==i.bgCol.search("gradient"),(a=r.backgroundImage&&"string"==typeof r.backgroundImage&&-1!==r.backgroundImage.search("gradient"))&&e?(180!==s(i.bgCol)&&180==s(r.backgroundImage)&&(r.backgroundImage=o(r.backgroundImage,180)),r.backgroundImage=tpGS.getSSGColors(i.bgCol,r.backgroundImage,void 0===r.gs?"fading":r.gs).to):a&&!e?r.backgroundImage=tpGS.getSSGColors(i.bgCol,r.backgroundImage,void 0===r.gs?"fading":r.gs).to:!a&&e&&(r.backgroundImage=tpGS.getSSGColors(i.bgCol,r.backgroundColor,void 0===r.gs?"fading":r.gs).to)),delete r.gs,r},handleStaticLayers:function(e,t){var i=0,a=Q[t].realslideamount+1;if(void 0!==Q.gA(e[0],"onslides")){var r,o,s=Q.gA(e[0],"onslides").split(";");for(r in s)s.hasOwnProperty(r)&&("s"===(o=s[r].split(":"))[0]&&(i=parseInt(o[1],0)),"e"===o[0])&&(a=parseInt(o[1],0))}i=Math.max(0,i),a=Math.min(Q[t].realslideamount,a<0?Q[t].realslideamount:a),a=1!==i&&0!==i||a!==Q[t].realslideamount?a:Q[t].realslideamount+1,e.data("startslide",i),e.data("endslide",a),Q.sA(e[0],"startslide",i),Q.sA(e[0],"endslide",a)},updateLayersOnFullStage:function(e){if(0<Q[e].caches.calcResponsiveLayersList.length){!0!==Q[e].slideHasIframe&&!0!==Q[e].fullScreenMode&&!0!==Q[e].skipAttachDetach&&("carousel"===Q[e].sliderType?Q[e].carousel.wrap:Q[e].canvas).detach();for(var t=0;t<Q[e].caches.calcResponsiveLayersList.length;t++)void 0!==Q[e].caches.calcResponsiveLayersList[t]&&i(Q[e].caches.calcResponsiveLayersList[t]);!0!==Q[e].slideHasIframe&&!0!==Q[e].fullScreenMode&&!0!==Q[e].skipAttachDetach&&("carousel"===Q[e].sliderType?Q[e].c[0].appendChild(Q[e].carousel.wrap[0]):Q[e].c[0].appendChild(Q[e].canvas[0]))}},animateTheLayers:function(t){if(void 0===t.slide)return!1;var i=t.id;if(void 0===Q[i].slides[t.slide]&&"individual"!==t.slide)return!1;if("carousel"===Q[i].sliderType){if("start"===t.mode&&"start"===Q[i].lastATLmode){if(t.slide===Q[i].lastATLslide&&(new Date).getTime()-Q[i].lastATLtime<1500)return;Q[i].lastATLtime=(new Date).getTime()}Q[i].lastATLmode=t.mode,Q[i].lastATLslide=t.slide}var a="individual"!==t.slide?Q.gA(Q[i].slides[t.slide],"key"):"individual",e=void 0!==Q[i].pr_processing_key?Q[i].pr_processing_key:void 0!==Q[i].pr_active_key?Q[i].pr_active_key:0,r=(Q[i].focusedSlideIndex=e,Q[i].caches.calcResponsiveLayersList=[],Q[i].layers=Q[i].layers||{},"individual"===a?Q[i].layers.individual=void 0===Q[i].layers.individual?"all"===Q[i].carousel.showLayersAllTime?n(jQuery(Q[i].c),"rs-layer","rs-layer-static"):n(jQuery(Q[i].c),"rs-on-car"):Q[i].layers.individual:(Q[i].layers[a]=void 0===Q[i].layers[a]?"all"===Q[i].carousel.showLayersAllTime?[]:n(jQuery(Q[i].slides[t.slide]),"rs-layer","carousel"===Q[i].sliderType?"rs-on-car":void 0):Q[i].layers[a],Q[i].layers.static=void 0===Q[i].layers.static?n(jQuery(Q[i].c.find("rs-static-layers")),"rs-layer","rs-on-car"):Q[i].layers.static,Q[i].sbas[a]=void 0===Q[i].sbas[a]?n(jQuery(Q[i].slides[t.slide]),"rs-sba"):Q[i].sbas[a]),"rebuild"===t.mode&&"carousel"===Q[i].sliderType&&"individual"===a),o=(void 0!==a&&Q[i].layers[a]&&Q.initLayer({id:i,slideIndex:t.slide,skey:a,mode:t.mode,animcompleted:r}),Q[i].layers.static&&Q.initLayer({id:i,skey:"static",slideIndex:"static",mode:t.mode,animcompleted:r}),Q.updateLayersOnFullStage(i),"preset"!==t.mode||void 0!==Q[i].slidePresets&&void 0!==Q[i].slidePresets[t.slide]||(Q[i].slidePresets=void 0===Q[i].slidePresets?{}:Q[i].slidePresets,Q[i].slidePresets[t.slide]=!0,Q[i].c.trigger("revolution.slideprepared",{slide:t.slide,key:a})),Q[i].heightInLayers=Q[i].module.height,Q[i].widthInLayers=Q[i].module.width,Q[i].levelInLayers=Q[i].level,{id:i,skey:a,slide:t.slide,key:a,mode:t.mode,index:e});window.requestAnimationFrame(function(){if(void 0===Q[i].dimensionReCheck[a]?(Q.updateLayerDimensions(o),!0!==Q[i].doubleDimensionCheck?setTimeout(function(){Q.updateLayerDimensions(o),Q.updateRowZones(o)},150):Q.updateRowZones(o),Q[i].doubleDimensionCheck=!0,Q[i].dimensionReCheck[a]=!0):Q.updateRowZones(o),void 0!==a&&Q[i].layers[a])for(var e in Q[i].layers[a])Q[i].layers[a].hasOwnProperty(e)&&Q.renderLayerAnimation({layer:jQuery(Q[i].layers[a][e]),id:i,mode:t.mode,caller:t.caller});if(Q[i].layers.static)for(var e in Q[i].layers.static)Q[i].layers.static.hasOwnProperty(e)&&Q.renderLayerAnimation({layer:jQuery(Q[i].layers.static[e]),id:i,mode:t.mode,caller:t.caller});null!=Q[i].mtl&&Q[i].mtl.resume()})},updateRowZones:function(e){(void 0!==Q[e.id].rowzones&&0<Q[e.id].rowzones.length&&0<=e.index&&Q[e.id].rowzones[Math.min(e.index,Q[e.id].rowzones.length)]&&0<Q[e.id].rowzones[Math.min(e.index,Q[e.id].rowzones.length)].length||void 0!==Q[e.id].srowzones&&0<Q[e.id].srowzones.length||void 0!==Q[e.id].smiddleZones&&0<Q[e.id].smiddleZones.length)&&(Q.updateDims(e.id),Q.initLayer({id:e.id,skey:e.key,slideIndex:e.slide,mode:"updateposition"}),Q.initLayer({id:e.id,skey:"static",slideIndex:"static",mode:"updateposition"}),"start"!==e.mode&&"preset"!==e.mode||Q.manageNavigation(e.id),window.requestAnimationFrame(function(){Q.putRowsInPosition(e.id)}))},updateLayerDimensions:function(e){var t=!1;Q[e.id].caches.calcResponsiveLayersList=[],void 0===e.key||"individual"!=e.key&&void 0===Q[e.id].layers[e.key]||!Q.checkLayerDimensions({id:e.id,skey:e.key,slideIndex:e.slide})||(t=!0),Q.initLayer({id:e.id,skey:e.key,slideIndex:e.slide,mode:"updateAndResize"}),Q[e.id].layers.static&&Q.checkLayerDimensions({id:e.id,skey:"static",slideIndex:"static"})&&(t=!0,Q.initLayer({id:e.id,skey:"static",slideIndex:"static",mode:"updateAndResize"})),t&&Q.updateLayersOnFullStage(e.id)},updateAnimatingLayerPositions:function(e){Q.initLayer({id:e.id,skey:e.key,slideIndex:e.slide,mode:"updateposition"})},removeTheLayers:function(e,t,i){var a,r=Q.gA(e[0],"key");for(a in Q[t].sloops&&Q[t].sloops[r]&&Q[t].sloops[r].tl&&Q[t].sloops[r].tl.pause(),Q[t].layers[r])Q[t].layers[r].hasOwnProperty(a)&&Q.renderLayerAnimation({layer:jQuery(Q[t].layers[r][a]),frame:"frame_999",mode:"continue",remove:!0,id:t,allforce:i});for(a in Q[t].layers.static)Q[t].layers.static.hasOwnProperty(a)&&Q.renderLayerAnimation({layer:jQuery(Q[t].layers.static[a]),frame:"frame_999",mode:"continue",remove:!0,id:t,allforce:i})},renderLayerAnimation:function(t){var i,a,r=t.layer,o=t.id,s=Q[o].level,n=Q[o]._L[r[0].id],F=void 0!==n.timeline?n.timeline.time():void 0,l=!1,d=!1,H="none",c=!1;if(("containerResized_2"!==t.caller&&"swapSlideProgress_2"!==t.caller||!0===n.animationRendered)&&(n.animationRendered=!0,"preset"!==t.mode||!0===n.frames.frame_1.timeline.waitoncall||void 0!==n.scrollBasedOffset)){if("trigger"==t.mode&&(n.triggeredFrame=t.frame),n._isstatic){var p="carousel"===Q[o].sliderType&&void 0!==Q[o].carousel.oldfocused?parseInt(Q[o].carousel.oldfocused)+1:void 0===Q[o].focusedSlideIndex?0:parseInt(Q[o].focusedSlideIndex,0)+1,g="carousel"===Q[o].sliderType?void 0===Q[o].pr_next_key?0==p?1:p:parseInt(Q[o].pr_next_key,0)+1:void 0===Q[o].pr_processing_key?0==p?1:p:parseInt(Q[o].pr_processing_key,0)+1,u=p>=n.startslide&&p<=n.endslide,g=g>=n.startslide&&g<=n.endslide,h=void 0!==n.frames.frame_999&&void 0!==n.frames.frame_999.timeline&&!0!==n.frames.frame_999.timeline.waitoncall&&p===n.endslide;if(void 0===Q[o].modal||"start"!=t.mode&&"continue"!=t.mode||("continue"===t.mode&&"close"==Q[o].modal.lastModalCall&&(g=!1),"start"!==t.mode||"show"!==Q[o].modal.lastModalCall&&"init"!==Q[o].modal.lastModalCall||Q[o].modal.lastModalCall===n.lastModalCall||(n.triggeredFrame=void 0,n.triggercache="reset",void 0!==n.timeline&&void 0!==n.timeline.currentLabel()&&-1==n.timeline.currentLabel().indexOf("frame_999")&&n.timeline.pause(0)),n.lastModalCall=Q[o].modal.lastModalCall),H="start"===t.mode&&h||p===n.endslide&&"continue"===t.mode||("continue"===t.mode||p===n.endslide)&&"none","frame_999"===n.animatedFrame&&"done"===n.animatingFrame|null==n.animatingFrame&&(n.lastRequestedMainFrame="frame_999"),void 0!==n.timeline&&void 0!==n.timeline.currentLabel()&&-1==n.timeline.currentLabel().indexOf("frame_999")&&(c=!0),!0===t.allforce||!0===H){if("continue"===t.mode&&g&&h&&void 0!==n.timeline)return void(0<=n.timeline.currentLabel().indexOf("frame_999")?n.timeline.pause(n.timeline.previousLabel()):n.timeline.pause(n.timeline.currentLabel()));if("continue"===t.mode&&"frame_999"===t.frame&&(g||void 0===n.lastRequestedMainFrame))return}else{if("preset"===t.mode&&(n.elementHovered||!g))return;if("rebuild"===t.mode&&!u&&!g)return;if("start"===t.mode&&g&&"frame_1"===n.lastRequestedMainFrame)return;if(("start"===t.mode||"preset"===t.mode)&&"frame_999"===n.lastRequestedMainFrame&&!0!==n.leftstage)return;if("continue"===t.mode&&"frame_999"===t.frame&&(g||void 0===n.lastRequestedMainFrame))return;if("start"===t.mode&&!g)return;if("rebuild"===t.mode&&n.elementHovered&&n._isstatic&&n.hovertimeline)return}}else"start"===t.mode&&"keep"!==n.triggercache&&(n.triggeredFrame=void 0);"start"===t.mode&&(void 0!==n.layerLoop&&(n.layerLoop.count=0),t.frame=void 0===n.triggeredFrame?c?void 0:0:n.triggeredFrame),"continue"===t.mode||"trigger"===t.mode||void 0===n.timeline||n._isstatic&&!0===n.leftstage||n.timeline.pause(0),"continue"!==t.mode&&"trigger"!==t.mode||void 0===n.timeline||n.timeline.pause(),n.timeline=tpGS.gsap.timeline({paused:!0}),"text"!==n.type&&"button"!==n.type||void 0!==n.splitText&&(void 0!==n.splitTextFix||"start"!==t.mode&&"preset"!==t.mode)||(ae({layer:r,id:o}),"start"===t.mode&&(n.splitTextFix=!0));let e=Q[o].duration;if("carousel"===Q[o].sliderType)for(var m of Q[o].slides)n.slidekey==m.dataset.key&&null!=Q.gA(m,"duration")&&""!=Q.gA(m,"duration")&&(e=parseInt(Q.gA(m,"duration"),0));for(var v in n.ford)if(n.ford.hasOwnProperty(v)){var f=n.ford[v],z=!1;if("frame_0"!==f&&"frame_hover"!==f&&"loop"!==f){if("frame_999"===f&&!n.frames[f].timeline.waitoncall&&n.frames[f].timeline.start>=e&&!0!==t.remove&&(n.frames[f].timeline.waitoncall=!0),"start"===t.mode&&"keep"!==n.triggercache&&(n.frames[f].timeline.callstate=n.frames[f].timeline.waitoncall?"waiting":""),"trigger"===t.mode&&n.frames[f].timeline.waitoncall&&(f===t.frame?(n.frames[f].timeline.triggered=!0,n.frames[f].timeline.callstate="called"):n.frames[f].timeline.triggered=!1),"rebuild"===t.mode||n.frames[f].timeline.triggered||(n.frames[f].timeline.callstate=n.frames[f].timeline.waitoncall?"waiting":""),!1!==t.fastforward){if(("continue"===t.mode||"trigger"===t.mode)&&!1===d&&f!==t.frame)continue;if(("rebuild"===t.mode||"preset"===t.mode)&&!1===d&&void 0!==n.triggeredFrame&&f!==n.triggeredFrame)continue;(f===t.frame||"rebuild"===t.mode&&f===n.triggeredFrame)&&(d=!0)}else f===t.frame&&(d=!0);if(f!==t.frame&&n.frames[f].timeline.waitoncall&&"called"!==n.frames[f].timeline.callstate&&(l=!0),f!==t.frame&&d&&(l=!0===l&&n.frames[f].timeline.waitoncall?"skiprest":!0!==l&&l),void 0===n.hideonfirststart&&"frame_1"===f&&n.frames[f].timeline.waitoncall&&(n.hideonfirststart=!0),l&&"waiting"===n.frames[f].timeline.callstate&&"preset"===t.mode&&1!=n.firstTimeRendered){if(n._isstatic&&void 0===n.currentframe)continue;n.firstTimeRendered=z=!0}else if("skiprest"===l||"called"!==n.frames[f].timeline.callstate&&l&&t.toframe!==f)continue;if("frame_999"!==f||!1!==H||"continue"!==t.mode&&"start"!==t.mode&&"rebuild"!==t.mode){n.fff="frame_1"===f&&("trigger"!==t.mode||"frame_999"===n.currentframe||"frame_0"===n.currentframe||void 0===n.currentframe),"trigger"===t.mode&&"frame_1"===t.frame&&!1===n.leftstage&&(n.fff=!1),z||(n.frames[f].timeline.callstate="called",n.currentframe=f);var y,w,b,_,S,x,k=n.frames[f],O=n.fff?n.frames.frame_0:void 0,R=tpGS.gsap.timeline(),W=tpGS.gsap.timeline(),v=n.c,L=void 0!==k.sfx&&re(k.sfx.effect,n.m,k.timeline.ease),I=k.timeline.speed/1e3,E=0,M=oe({id:o,frame:k,layer:r,ease:k.timeline.ease,splitAmount:v.length,target:f,forcefilter:void 0!==n.frames.frame_hover&&void 0!==n.frames.frame_hover.filter}),T=n.fff?oe({id:o,frame:O,layer:r,ease:k.timeline.ease,splitAmount:v.length,target:"frame_0"}):void 0,C=void 0!==k.mask?oe({id:o,frame:{transform:{x:k.mask.x,y:k.mask.y}},layer:r,ease:M.ease,target:"mask"}):void 0,A=void 0!==C&&n.fff?oe({id:o,frame:{transform:{x:O.mask.x,y:O.mask.y}},layer:r,ease:M.ease,target:"frommask"}):void 0,P=M.ease;if(M.force3D=!0,"block"===L.type&&(L.ft[0].background=k.sfx.fxc,L.ft[0].visibility="visible",L.ft[1].visibility="visible",window.isSafari11&&(x=Math.max(T&&T.z?T.z:0,M&&M.z?M.z:0),L.ft[0].z=Math.max(0,x+1),L.ft[1].z=Math.max(0,x+1),L.t.z=Math.max(0,x+1),L.ft[1].transformPerspective=L.ft[0].transformPerspective=L.t.transformPerspective=M.transformPerspective),R.add(tpGS.gsap.fromTo(L.bmask_in,I/2,L.ft[0],L.ft[1],0)),R.add(tpGS.gsap.fromTo(L.bmask_in,I/2,L.ft[1],L.t,I/2)),"frame_0"!==f&&"frame_1"!==f||(T.opacity=0)),void 0!==k.color?M.color=k.color:void 0!==n.color&&"npc"!==n.color[s]&&(M.color=n.color[s]),void 0!==O&&void 0!==O.color?T.color=O.color:void 0!==O&&void 0!==n.color&&"npc"!==n.color[s]&&(T.color=n.color[s]),void 0!==k.bgcolor?0<=k.bgcolor.indexOf("gradient")?M.background=k.bgcolor:M.backgroundColor=k.bgcolor:!0===n.bgcolinuse&&(0<=n.bgcol.indexOf("gradient")?M.background=n.bgcol:M.backgroundColor=n.bgcol),void 0!==O&&(void 0!==O.bgcolor?0<=O.bgcolor.indexOf("gradient")?T.background=O.bgcolor:T.backgroundColor=O.bgcolor:!0===n.bgcolinuse&&(0<=n.bgcol.indexOf("gradient")?T.background=n.bgcol:T.backgroundColor=n.bgcol)),void 0!==n.splitText&&!1!==n.splitText)for(var D in q)void 0===k[q[D]]||n.quickRendering||(y=n.splitText[q[D]],b=oe({id:o,frame:k,source:q[D],ease:P,layer:r,splitAmount:y.length,target:f+"_"+q[D]}),_=n.fff?oe({id:o,frame:O,ease:b.ease,source:q[D],layer:r,splitAmount:y.length,target:"frame_0_"+q[D]}):void 0,w=n.frames[f].dosplit?void 0===k[q[D]].delay?.05:k[q[D]].delay/100:0,n.color[s]===M.color&&"frame_1"===f||(b.color=M.color),void 0!==T&&n.color[s]!==T.color&&(_.color=T.color),void 0!==_&&_.color!==M.color&&(b.color=M.color),b=Q.clone(b),_=n.fff?Q.clone(_):void 0,S=k[q[D]].dir,delete b.dir,b.data={splitted:!0},b.stagger="center"===S||"edge"===S?$({each:w,offset:w/2,from:S}):{each:w,from:S},b.duration=I,void 0!==_&&(void 0!==_.opacity&&(Q.ISM||window.isSafari11)&&(_.opacity=Math.max(.001,parseFloat(_.opacity))),delete _.dir),n.fff?R.add(W.fromTo(y,_,b),0):R.add(W.to(y,b),0),E=Math.max(E,y.length*w));I+=E,void 0===i&&(i="isometric"===Q[o].perspectiveType?0:"local"===Q[o].perspectiveType?void 0!==M.transformPerspective?M.transformPerspective:n.fff&&void 0!==T.transfromPerspective?T.transfromPerspective:Q[o].perspective:Q[o].perspective),n.knowTransformPerspective=i,n.fsom&&(void 0!==M.filter||n.fff&&void 0!==T.filter)?(C.filter=M.filter,C["-webkit-filter"]=M.filter,delete M.filter,delete M["-webkit-filter"],n.fff&&void 0!==T.filter&&((A=A||{}).filter=T.filter,A["-webkit-filter"]=T.filter,delete T.filter,delete T["-webkit-filter"]),n.forceFsom=!0):n.forceFsom=!1,n.useMaskAnimation=n.pxundermask||void 0!==C&&(void 0!==O&&"hidden"===O.mask.overflow||"hidden"===k.mask.overflow),n.useMaskAnimation||n.forceFsom?(n.useMaskAnimation?R.add(tpGS.gsap.to(n.m,.001,{overflow:"hidden"}),0):R.add(tpGS.gsap.to(n.m,.001,{overflow:"visible"}),0),"column"===n.type&&n.cbgexists&&n.useMaskAnimation&&R.add(tpGS.gsap.to(n.cbgmask,.001,{overflow:"hidden"}),0),n.btrans&&(A&&(A.rotationX=n.btrans.rX,A.rotationY=n.btrans.rY,A.rotationZ=n.btrans.rZ,A.opacity=n.btrans.o),C.rotationX=n.btrans.rX,C.rotationY=n.btrans.rY,C.rotationZ=n.btrans.rZ,C.opacity=n.btrans.o),n.fff?R.add(tpGS.gsap.fromTo(void 0!==n.m&&void 0!==n.cbgmask?[n.m,n.cbgmask]:void 0!==n.m?n.m:n.cbgmask,I,Q.clone(A),Q.clone(C)),.001):R.add(tpGS.gsap.to(void 0!==n.m&&void 0!==n.cbgmask?[n.m,n.cbgmask]:void 0!==n.m?n.m:n.cbgmask,I,Q.clone(C)),.001)):void 0!==n.btrans?(x={x:0,y:0,filter:"none",opacity:n.btrans.o,rotationX:n.btrans.rX,rotationY:n.btrans.rY,rotationZ:n.btrans.rZ,overflow:"visible"},0===n.btrans.rX&&0==n.btrans.rY||(n.maskHasPerspective=!0,x.transformPerspective=i),R.add(tpGS.gsap.to(n.m,.001,x),0)):R.add(tpGS.gsap.to(n.m,.001,{clearProps:"transform",overflow:"hidden"==n.ofHidOnHov?"hidden":"visible"}),0),M.force3D="auto",n.fff?(M.visibility="visible",void 0!==n.cbg&&R.fromTo(n.cbg,I,T,M,0),!Q[o].BUG_safari_clipPath||T.clipPath||M.clipPath||n.spike,I=0<I?I-.001:I,void 0!==n.cbg&&"column"===n.type?R.fromTo(v,I,J(T),J(M),0):R.fromTo(v,I,T,M,0),R.invalidate()):("frame_999"!==n.frame&&(M.visibility="visible"),void 0!==n.cbg&&R.to(n.cbg,I,M,0),void 0!==n.cbg&&"column"===n.type?R.to(v,I,J(M),0):R.to(v,I,M,0)),void 0!==P&&"object"!=typeof P&&"function"!=typeof P&&0<=P.indexOf("SFXBounce")&&R.to(v,I,{scaleY:.5,scaleX:1.3,ease:M.ease+"-squash",transformOrigin:"bottom"},1e-4);L="trigger"!==t.mode&&(!0!==l&&"skiprest"!==l||"rebuild"!==t.mode)||t.frame===f||void 0===k.timeline.start||!Q.isNumeric(k.timeline.start)?"+=0"===k.timeline.start||void 0===k.timeline.start?"+=0.001":parseInt(k.timeline.start,0)/1e3:"+="+parseInt(void 0===k.timeline.startRelative?0:k.timeline.startRelative,0)/1e3;n.timeline.addLabel(f,L),n.timeline.add(R,L),n.timeline.addLabel(f+"_end","+=0.01"),R.eventCallback("onStart",ee,[{id:o,frame:f,L:r,tPE:i}]),"true"==n.animationonscroll||1==n.animationonscroll?(R.eventCallback("onUpdate",te,[{id:o,frame:f,L:r}]),R.smoothChildTiming=!0):R.eventCallback("onUpdate",te,[{id:o,frame:f,L:r}]),R.eventCallback("onComplete",ie,[{id:o,frame:f,L:r,tPE:i}])}}}if(void 0!==n.frames.loop){var p=parseInt(n.frames.loop.timeline.speed,0)/1e3,h=parseInt(n.frames.loop.timeline.start)/1e3||0,u="trigger"!==t.mode&&"frame_999"!==t.frame||"frame_999"!==t.frame?.2:0,g=h+u,c=(n.loop={root:tpGS.gsap.timeline({}),preset:tpGS.gsap.timeline({}),move:tpGS.gsap.timeline({repeat:-1,yoyo:n.frames.loop.timeline.yoyo_move}),rotate:tpGS.gsap.timeline({repeat:-1,yoyo:n.frames.loop.timeline.yoyo_rotate}),scale:tpGS.gsap.timeline({repeat:-1,yoyo:n.frames.loop.timeline.yoyo_scale}),filter:tpGS.gsap.timeline({repeat:-1,yoyo:n.frames.loop.timeline.yoyo_filter})},n.frames.loop.frame_0),h=n.frames.loop.frame_999,B="blur("+parseInt(c.blur||0,0)+"px) grayscale("+parseInt(c.grayscale||0,0)+"%) brightness("+parseInt(c.brightness||100,0)+"%)",N="blur("+(h.blur||0)+"px) grayscale("+(h.grayscale||0)+"%) brightness("+(h.brightness||100)+"%)";if(n.loop.root.add(n.loop.preset,0),n.loop.root.add(n.loop.move,u),n.loop.root.add(n.loop.rotate,u),n.loop.root.add(n.loop.scale,u),n.loop.root.add(n.loop.filter,u),"blur(0px) grayscale(0%) brightness(100%)"===B&&"blur(0px) grayscale(0%) brightness(100%)"===N&&(N=B="none"),h.originX=c.originX,h.originY=c.originY,h.originZ=c.originZ,void 0===i&&(i="isometric"===Q[o].perspectiveType?0:"local"===Q[o].perspectiveType&&void 0!==M?void 0!==M.transformPerspective?M.transformPerspective:n.fff&&void 0!==T.transfromPerspective?T.transfromPerspective:Q[o].perspective:Q[o].perspective),n.frames.loop.timeline.curved){var j,V=parseInt(n.frames.loop.timeline.radiusAngle,0)||0,X=[{x:(c.x-c.xr)*Q[o].CM.w,y:0,z:(c.z-c.zr)*Q[o].CM.w},{x:0,y:(c.y+c.yr)*Q[o].CM.w,z:0},{x:(h.x+h.xr)*Q[o].CM.w,y:0,z:(h.z+h.zr)*Q[o].CM.w},{x:0,y:(h.y-h.yr)*Q[o].CM.w,z:0}],G={type:"thru",curviness:n.frames.loop.timeline.curviness,path:[],autoRotate:n.frames.loop.timeline.autoRotate};for(j in X)X.hasOwnProperty(j)&&(G.path[j]=X[V],V=++V==X.length?0:V);("trigger"!==t.mode&&"frame_999"!==t.frame||"frame_999"!==t.frame)&&n.loop.preset.fromTo(n.lp,u,{"-webkit-filter":B,filter:B,x:0,y:0,z:0,minWidth:n._incolumn||n._ingroup?"100%":void 0===n.eow?0:n.eow,minHeight:n._incolumn||n._ingroup?"100%":void 0===n.eoh?0:n.eoh,scaleX:1,scaleY:1,skewX:0,skewY:0,rotationX:0,rotationY:0,rotationZ:0,transformPerspective:i,transformOrigin:h.originX+" "+h.originY+" "+h.originZ,opacity:1},K({x:G.path[3].x,y:G.path[3].y,z:G.path[3].z,scaleX:c.scaleX,skewX:c.skewX,skewY:c.skewY,scaleY:c.scaleY,rotationX:c.rotationX,rotationY:c.rotationY,rotationZ:c.rotationZ,"-webkit-filter":B,filter:B,ease:"sine.inOut",opacity:c.opacity}),0),Z(G)&&n.loop.move.to(n.lp,n.frames.loop.timeline.yoyo_move?p/2:p,{motionPath:G,ease:n.frames.loop.timeline.ease})}else("trigger"!==t.mode&&"frame_999"!==t.frame||"frame_999"!==t.frame)&&n.loop.preset.fromTo(n.lp,u,{"-webkit-filter":B,filter:B,x:0,y:0,z:0,minWidth:n._incolumn||n._ingroup?"100%":void 0===n.eow?0:n.eow,minHeight:n._incolumn||n._ingroup?"100%":void 0===n.eoh?0:n.eoh,scaleX:1,scaleY:1,skewX:0,skewY:0,rotationX:0,rotationY:0,rotationZ:0,transformPerspective:i,transformOrigin:h.originX+" "+h.originY+" "+h.originZ,opacity:1},K({x:c.x*Q[o].CM.w,y:c.y*Q[o].CM.w,z:c.z*Q[o].CM.w,scaleX:c.scaleX,skewX:c.skewX,skewY:c.skewY,scaleY:c.scaleY,rotationX:c.rotationX,rotationY:c.rotationY,rotationZ:c.rotationZ,ease:"sine.out",opacity:c.opacity,"-webkit-filter":B,filter:B}),0),n.loop.move.to(n.lp,n.frames.loop.timeline.yoyo_move?p/2:p,{x:h.x*Q[o].CM.w,y:h.y*Q[o].CM.w,z:h.z*Q[o].CM.w,ease:n.frames.loop.timeline.ease});n.loop.rotate.to(n.lp,n.frames.loop.timeline.yoyo_rotate?p/2:p,{rotationX:h.rotationX,rotationY:h.rotationY,rotationZ:h.rotationZ,ease:n.frames.loop.timeline.ease}),n.loop.scale.to(n.lp,n.frames.loop.timeline.yoyo_scale?p/2:p,K({scaleX:h.scaleX,scaleY:h.scaleY,skewX:h.skewX,skewY:h.skewY,ease:n.frames.loop.timeline.ease}));u={opacity:h.opacity||1,ease:n.frames.loop.timeline.ease,"-webkit-filter":N,filter:N};n.loop.filter.to(n.lp,n.frames.loop.timeline.yoyo_filter?p/2:p,u),n.timeline.add(n.loop.root,g)}if(void 0===n.frames.frame_hover||"start"!==t.mode&&void 0!==n.hoverframeadded||(n.hoverframeadded=!0,a=n.frames.frame_hover.timeline.speed/1e3,n.cachedHoverSpeed=a=0==a?1e-5:a,n.hoverlistener)||(n.hoverlistener=!0,Q.document.on("mouseenter mousemove",("column"===n.type&&void 0!==n.cbg?"#"+n.cbg[0].id+",":"")+"#"+n.c[0].id,function(e){n.mouseIsOver=!0,1==n.ignoreHoverFrames||"mousemove"===e.type&&!0===n.ignoremousemove||((n.animationonscroll||n.readyForHover)&&(n.elementHovered=!0,n.hovertimeline||(n.hovertimeline=tpGS.gsap.timeline({paused:!0})),0==n.hovertimeline.progress()&&(void 0===n.lastHoveredTimeStamp||150<(new Date).getTime()-n.lastHoveredTimeStamp)&&(n.ignoremousemove=!0,n.ofHidOnHov=n.frames.frame_hover.mask?"hidden":"visible",n.hovertimeline.to(void 0!==n.m&&void 0!==n.cbgmask?[n.m,n.cbgmask]:void 0!==n.m?n.m:n.cbgmask,a,{overflow:n.ofHidOnHov},0),"column"===n.type&&null!=n.cbg&&n.hovertimeline.to(n.cbg,a,Q.clone(Q.convertHoverTransform(n.frames.frame_hover,n.cbg,{bgCol:n.bgcol,bg:n.styleProps.background})),0),"text"!==n.type&&"button"!==n.type||void 0===n.splitText||!1===n.splitText||n.hovertimeline.to([n.splitText.lines,n.splitText.words,n.splitText.chars],a,{color:n.frames.frame_hover.color,ease:n.frames.frame_hover.transform.ease},0),"column"===n.type?n.hovertimeline.to(n.c,a,J(Q.clone(Q.convertHoverTransform(n.frames.frame_hover,n.c,{bgCol:n.bgcol,bg:n.styleProps.background}))),0):n.hovertimeline.to(n.c,a,Q.clone(Q.convertHoverTransform(n.frames.frame_hover,n.c,{bgCol:n.bgcol,bg:n.styleProps.background})),0),n.pZindex=n.p[0].style.zIndex,n.p[0].style.zIndex=parseInt(n.frames&&n.frames.frame_hover&&void 0!==n.frames.frame_hover.transform.zIndex?n.frames.frame_hover.transform.zIndex:n.pZindex),"svg"===n.type)&&(n.svgHTemp=Q.clone(n.svgH),delete n.svgHTemp.svgAll,e=Array.isArray(n.svgHTemp.fill)?n.svgHTemp.fill[Q[o].level]:n.svgHTemp.fill,n.svgHTemp.fill=e,n.hovertimeline.to(n.svg,a,n.svgHTemp,0),n.svg.length<=0&&(n.svg=r.find("svg")),n.svgPath.length<=0&&(n.svgPath=n.svg.find(n.svgI.svgAll?"path, circle, ellipse, line, polygon, polyline, rect":"path")),n.hovertimeline.to(n.svgPath,a,{fill:e},0)),n.hovertimeline.play()),n.lastHoveredTimeStamp=(new Date).getTime())}),Q.document.on("mouseleave",("column"===n.type&&void 0!==n.cbg?"#"+n.cbg[0].id+",":"")+"#"+n.c[0].id,function(){n.mouseIsOver=!1,1!=n.ignoreHoverFrames&&(n.elementHovered=!1,n.animationonscroll||n.readyForHover)&&void 0!==n.hovertimeline&&(n.hovertimeline.reverse(),n.p[0].style.zIndex=n.pZindex||n.zIndex,n.hovertimeline.eventCallback("onReverseComplete",Q.hoverReverseDone,[{id:o,L:r}]))})),z||(n.lastRequestedMainFrame="start"===t.mode?"frame_1":"continue"===t.mode?void 0===t.frame?n.currentframe:t.frame:n.lastRequestedMainFrame),void 0!==t.totime?n.tSTART=t.totime:void 0!==F&&void 0===t.frame?n.tSTART=F:void 0!==t.frame?n.tSTART=t.frame:n.tSTART=0,0===n.tSTART&&void 0===n.startedAnimOnce&&void 0===n.leftstage&&void 0===n.startedAnimOnce&&!0===n.hideonfirststart&&"preset"===t.mode&&(Q[o]._L[r[0].id].pVisRequest=0,n.hideonfirststart=!1),("frame_999"!==n.tSTART&&"frame_999"!==n.triggeredFrame||!n.leftstage&&void 0!==n.startedAnimOnce)&&("true"!=n.animationonscroll&&1!=n.animationonscroll?n.timeline.play(n.tSTART):n.timeline.time(n.tSTART),0<=jQuery.inArray(n.type,["group","row","column"]))&&(void 0!==t.frame||!0===t.updateChildren)){if(void 0===n.childrenJS)for(var D in n.childrenJS={},Q[o]._L){var U=void 0!==Q[o]._L[D]._lig?Q[o]._L[D]._lig[0]:void 0;null!=U&&U.id===r[0].id&&U.id!==Q[o]._L[D].c[0].id&&(n.childrenJS[Q[o]._L[D].c[0].id]=Q[o]._L[D].c)}t.frame="0"==t.frame?"frame_0":t.frame,t.frame="1"==t.frame?"frame_1":t.frame,t.frame="999"==t.frame?"frame_999":t.frame;var Y=void 0===t.totime?void 0!==n.frames[t.frame].timeline.startAbsolute?parseInt(n.frames[t.frame].timeline.startAbsolute,0)/1e3:void 0!==n.frames[t.frame].timeline.start?Q.isNumeric(n.frames[t.frame].timeline.start)?parseInt(n.frames[t.frame].timeline.start,0)/1e3:0:.001:t.totime;if(!0===t.updateChildren)for(var D in n.childrenJS)n.childrenJS.hasOwnProperty(D)&&Q.renderLayerAnimation({layer:n.childrenJS[D],fastforward:!1,id:o,mode:"continue",updateChildren:!0,totime:Y});else for(var D in n.childrenJS)n.childrenJS.hasOwnProperty(D)&&Q[o]._L[D].pausedTrueParrent&&(Q.renderLayerAnimation({layer:n.childrenJS[D],fastforward:!1,id:o,mode:"continue",updateChildren:!0,totime:Y}),Q[o]._L[D].pausedTrueParrent=!1)}}}}),function(e){e=Q.clone(e);return delete e.backgroundColor,delete e.background,delete e.backgroundImage,delete e.borderSize,delete e.borderStyle,delete e["backdrop-filter"],e}),Z=function(e){if(void 0!==e&&void 0!==e.path&&Array.isArray(e.path)){var t,i=0,a=0;for(t in e.path)!e.path.hasOwnProperty(t)||0<i||0<a||(i+=e.path[t].x,a+=e.path[t].y);return 0!=i||0!=a}},K=function(e){return void 0===e.skewX&&delete e.skewX,void 0===e.skewY&&delete e.skewY,e},$=function(a){a.from="edge"===a.from?"edges":a.from;var r=tpGS.gsap.utils.distribute(a);return function(e,t,i){return r(e,t,i)+(!(e<=i.length/2)&&a.offset||0)}},ee=function(e){var t=Q[e.id]._L[e.L[0].id],i=Q[e.id]._L[t._ligid],a=(Q[e.id].BUG_safari_clipPath&&e.L[0].classList.remove("rs-pelock"),!(t._ingroup||t._incolumn||t._inrow)||void 0===i||void 0===i.timeline||i.timeline.isActive()||void 0===t||void 0===t.frames[t.timeline.currentLabel()]||(null==i.timezone||i.timezone.to<=parseInt(t.frames[t.timeline.currentLabel()].timeline.start,0))&&!0!==t.animOnScrollForceDisable&&(t.pausedTrueParrent=!0,t.timeline.pause()),t.hovertimeline),a=(a&&0<a.time()&&(a.pause(),a.time(0),a.kill(),delete t.hovertimeline),delete t.childrenAtStartNotVisible,t.pVisRequest=1,{layer:e.L});t.tweenOnStart=!0,t.animatingFrame=e.frame,t.ignoremousemove=!1,t.leftstage=!1,t.readyForHover=!1,t.tweenDirection=1==t.animationonscroll||"true"==t.animationonscroll?t.animteToTimeCache>t.animteToTime?-1:1:void 0,void 0!==t.layerLoop&&t.layerLoop.from===e.frame&&t.layerLoop.count++,""+t.tweenDirection=="-1"&&("frame_0"===e.frame||"frame_1"==e.frame&&t.animteToTime<=.01)&&"column"!==t.type&&"row"!==t.type&&"group"!==t.type?(t.leftstage=!0,t.pVisRequest=0,t.pPeventsRequest="none",window.requestAnimationFrame(function(){Q.requestLayerUpdates(e.id,"leftstage",e.L[0].id)})):("frame_1"===e.frame&&"Safari"===window.RSBrowser&&void 0===t.safariRenderIssue&&(tpGS.gsap.set([t.c],{opacity:1}),t.safariRenderIssue=!0),"frame_999"!==e.frame&&(t.startedAnimOnce=!0,t.pPeventsRequest=t.noPevents?"none":"auto"),a.eventtype="frame_0"===e.frame||"frame_1"===e.frame?"enterstage":"frame_999"===e.frame?"leavestage":"framestarted",t._ingroup&&void 0!==i&&!0!==i.frames.frame_1.timeline.waitoncall&&(i.pVisRequest=1),Q.requestLayerUpdates(e.id,a.eventtype,e.L[0].id,void 0!==t.frames[e.frame]&&void 0!==t.frames[e.frame].timeline&&0==t.frames[e.frame].timeline.usePerspective?e.tPE:"ignore")),a.id=e.id,a.layerid=e.L[0].id,a.layertype=t.type,a.frame_index=e.frame,a.layersettings=t,Q[e.id].c.trigger("revolution.layeraction",[a]),"enterstage"===a.eventtype&&Q.toggleState(t.layertoggledby),"frame_1"===e.frame&&Q.animcompleted(e.L,e.id)},te=function(e){var t=Q[e.id]._L[e.L[0].id];t.animatingFrame=e.frame,t.tweenOnStart=!1,t.tweenOnEnd=!1,"frame_999"===e.frame&&(t.pVisRequest=1,t.pPeventsRequest=t.noPevents?"none":"auto",t.leftstage=!1,window.requestAnimationFrame(function(){Q.requestLayerUpdates(e.id,"update",e.L[0].id)}))},ie=function(e){var t,i=Q[e.id]._L[e.L[0].id],a=!0,r=("column"!==i.type&&"row"!==i.type&&"group"!==i.type||(t=i.timeline.currentLabel(),r=jQuery.inArray(t,i.ford),r=i.ford.length>++r?i.ford[r]:t,void 0!==i.frames[r]&&void 0!==i.frames[t]&&(i.timezone={from:parseInt(i.frames[t].timeline.startAbsolute,0),to:parseInt(i.frames[r].timeline.startAbsolute,0)})),"frame_999"!==e.frame&&Q[e.id].isEdge&&"shape"===i.type&&(t=i.c[0].style.opacity,i.c[0].style.opacity=t-1e-4,tpGS.gsap.set(i.c[0],{opacity:t-.001,delay:.05}),tpGS.gsap.set(i.c[0],{opacity:t,delay:.1})),i.animatingFrame="done",i.animatedFrame=e.frame,i.tweenOnStart=!1,i.tweenOnEnd=!0,i.tweenDirection=1==i.animationonscroll||"true"==i.animationonscroll?i.animteToTimeCache>i.animteToTime?-1:1:void 0,{});r.layer=e.L,r.eventtype="frame_0"===e.frame||"frame_1"===e.frame?"enteredstage":"frame_999"===e.frame?"leftstage":"frameended",i.readyForHover=!0,r.layertype=i.type,r.frame_index=e.frame,r.layersettings=i,Q[e.id].c.trigger("revolution.layeraction",[r]),"frame_999"===e.frame&&"leftstage"===r.eventtype?(i.leftstage=!0,i.pVisRequest=0,a=!(i.pPeventsRequest="none"),window.requestAnimationFrame(function(){Q.requestLayerUpdates(e.id,"leftstage",e.L[0].id)})):(e.L[0].id,void 0!==i.frames[e.frame]&&void 0!==i.frames[e.frame].timeline&&0==i.frames[e.frame].timeline.usePerspective&&window.requestAnimationFrame(function(){Q.requestLayerUpdates(e.id,"frameended",e.L[0].id,e.tPE)})),"leftstage"===r.eventtype&&void 0!==Q[e.id].videos&&void 0!==Q[e.id].videos[e.L[0].id]&&Q.stopVideo&&Q.stopVideo(e.L,e.id),"column"===i.type&&void 0!==i.cbg&&tpGS.gsap.to(i.cbg,.01,{visibility:"visible"}),"leftstage"===r.eventtype&&(Q.unToggleState(e.layertoggledby),"video"===i.type)&&Q.resetVideo&&setTimeout(function(){Q.resetVideo(e.L,e.id)},100),Q[e.id].BUG_safari_clipPath&&!a&&e.L[0].classList.add("rs-pelock"),void 0!==i.layerLoop&&i.layerLoop.to===e.frame&&(-1==i.layerLoop.repeat||i.layerLoop.repeat>i.layerLoop.count)&&i.timeline.seek(i.layerLoop.from).play()},v=function(e){var t;return void 0===e?"":(t="",Q.isChrome8889&&0===e.blur&&(e.blur=.05),t=void 0!==e.blur?"blur("+(e.blur||0)+"px)":"",(t=(t+=void 0!==e.grayscale?(0<t.length?" ":"")+"grayscale("+(e.grayscale||0)+"%)":"")+(void 0!==e.brightness?(0<t.length?" ":"")+"brightness("+(e.brightness||100)+"%)":""))||"none")},o=function(e,t){var i=(e=e.split("("))[0];return e.shift(),i+"("+t+"deg, "+e.join("(")},s=function(e){if(-1!==e.search("deg,")){e=e.split("deg,")[0];if(-1!==e.search(/\(/))return parseInt(e.split("(")[1],10)}return 180},S=function(e,t){if(void 0!==e&&0<=e.indexOf("oc:t"))return{};e=void 0===e?"":e.split(";");var i,a={fill:Q.revToResp("#ffffff",Q[t].rle),stroke:"transparent","stroke-width":"0px","stroke-dasharray":"0","stroke-dashoffset":"0"};for(i in e)if(e.hasOwnProperty(i)){var r=e[i].split(":");switch(r[0]){case"c":a.fill=Q.revToResp(r[1],Q[t].rle,void 0,"||");break;case"sw":a["stroke-width"]=r[1];break;case"sc":a.stroke=r[1];break;case"so":a["stroke-dashoffset"]=r[1];break;case"sa":a["stroke-dasharray"]=r[1];break;case"sall":a.svgAll=r[1]}}return a},x=function(e){return"c"===e?"center":"l"===e?"left":"r"===e?"right":e},ae=function(e){var t=Q[e.id]._L[e.layer[0].id],i=!1;if(t.splitText&&!1!==t.splitText&&t.splitText.revert(),"text"===t.type||"button"===t.type){for(var a in t.frames)if(void 0!==t.frames[a].chars||void 0!==t.frames[a].words||void 0!==t.frames[a].lines){i=!0;break}t.splitText=!!i&&new tpGS.SplitText(t.c,{type:"lines,words,chars",wordsClass:"rs_splitted_words",linesClass:"rs_splitted_lines",charsClass:"rs_splitted_chars"})}else t.splitText=!1},re=function(e,t,i){if(void 0!==e&&0<=e.indexOf("block")){var a={};switch(0===t[0].getElementsByClassName("tp-blockmask_in").length&&(t.append('<div class="tp-blockmask_in"></div>'),t.append('<div class="tp-blockmask_out"></div>')),a.ft=[{scaleY:1,scaleX:0,transformOrigin:"0% 50%"},{scaleY:1,scaleX:1,ease:i=void 0===i?"power3.inOut":i,immediateRender:!1}],a.t={scaleY:1,scaleX:0,transformOrigin:"100% 50%",ease:i,immediateRender:!1},a.bmask_in=t.find(".tp-blockmask_in"),a.bmask_out=t.find(".tp-blockmask_out"),a.type="block",e){case"blocktoleft":case"blockfromright":a.ft[0].transformOrigin="100% 50%",a.t.transformOrigin="0% 50%";break;case"blockfromtop":case"blocktobottom":a.ft=[{scaleX:1,scaleY:0,transformOrigin:"50% 0%"},{scaleX:1,scaleY:1,ease:i,immediateRender:!1}],a.t={scaleX:1,scaleY:0,transformOrigin:"50% 100%",ease:i,immediateRender:!1};break;case"blocktotop":case"blockfrombottom":a.ft=[{scaleX:1,scaleY:0,transformOrigin:"50% 100%"},{scaleX:1,scaleY:1,ease:i,immediateRender:!1}],a.t={scaleX:1,scaleY:0,transformOrigin:"50% 0%",ease:i,immediateRender:!1}}return a.ft[1].overwrite="auto",a.t.overwrite="auto",a}return!1},oe=function(e){var t,i,a=Q[e.id]._L[e.layer[0].id],r=void 0===e.source?Q.clone(e.frame.transform):Q.clone(e.frame[e.source]),o={originX:"50%",originY:"50%",originZ:"0"},s=void 0!==a._lig&&void 0!==Q[e.id]._L[a._lig[0].id]?Q[e.id]._L[a._lig[0].id].eow:Q[e.id].conw,n=void 0!==a._lig&&void 0!==Q[e.id]._L[a._lig[0].id]?Q[e.id]._L[a._lig[0].id].eoh:Q[e.id].conh;for(i in r)if(r.hasOwnProperty(i)){if(r[i]="object"==typeof r[i]?r[i][Q[e.id].level]:r[i],"inherit"===r[i]||"delay"===i||"direction"===i||"use"===i)delete r[i];else if("originX"===i||"originY"===i||"originZ"===i)o[i]=r[i],delete r[i];else if(Q.isNumeric(r[i],0))r[i]=m(r[i],e.frame.reverse,e.target,i,e.id,e.id);else if("r"===r[i][0]&&"a"===r[i][1]&&"("===r[i][3])r[i]=r[i].replace("ran","random");else if(0<=r[i].indexOf("cyc(")){var l=r[i].replace("cyc(","").replace(")","").replace("[","").replace("]","").split("|");r[i]=new function(e){return tpGS.gsap.utils.wrap(l,void 0)}}else if(0<=r[i].indexOf("%")&&Q.isNumeric(t=parseInt(r[i],0)))r[i]="x"===i?m((a.eow||0)*t/100,e.frame.reverse,e.target,i,e.id):"y"===i?m((a.eoh||0)*t/100,e.frame.reverse,e.target,i,e.id):r[i];else{r[i]=r[i].replace("[","").replace("]",""),r[i]=m(r[i],e.frame.reverse,e.target,i,e.id,e.id);var d={t:0,b:0};switch("row"===a.type&&("rev_row_zone_top"===a.zone&&void 0!==Q[e.id].topZones[a.slideIndex]&&void 0!==Q[e.id].topZones[a.slideIndex][0]?d={t:0,b:0}:"rev_row_zone_middle"===a.zone&&void 0!==Q[e.id].middleZones[a.slideIndex]&&void 0!==Q[e.id].middleZones[a.slideIndex][0]?d={t:Math.round(Q[e.id].module.height/2-Q[e.id].middleZones[a.slideIndex][0].offsetHeight/2),b:Math.round(Q[e.id].module.height/2+Q[e.id].middleZones[a.slideIndex][0].offsetHeight/2)}:"rev_row_zone_bottom"===a.zone&&void 0!==Q[e.id].bottomZones[a.slideIndex]&&void 0!==Q[e.id].bottomZones[a.slideIndex][0]&&(d={t:Math.round(Q[e.id].module.height-Q[e.id].bottomZones[a.slideIndex][0].offsetHeight),b:Q[e.id].module.height+Q[e.id].bottomZones[a.slideIndex][0].offsetHeight})),r[i]){case"t":case"top":r[i]=0-(a.eoh||0)-("column"!==a.type&&a.calcy||0)-Q.getLayerParallaxOffset(e.id,e.layer[0].id,"v")-("row"===a.type&&void 0!==a.marginTop?a.marginTop[Q[e.id].level]:0)-d.b;break;case"b":case"bottom":r[i]=n-("column"!==a.type&&"row"!==a.type&&a.calcy||0)+Q.getLayerParallaxOffset(e.id,e.layer[0].id,"v")-d.t;break;case"l":case"left":r[i]=0-("row"===a.type?a.pow:a.eow||0)-("column"===a.type?0:"row"===a.type?a.rowcalcx:a.calcx||0)-Q.getLayerParallaxOffset(e.id,e.layer[0].id,"h");break;case"r":case"right":r[i]=s-("column"===a.type?0:"row"===a.type?a.rowcalcx:a.calcx||0)+Q.getLayerParallaxOffset(e.id,e.layer[0].id,"h");break;case"m":case"c":case"middle":case"center":r[i]="x"===i?m(s/2-("column"!==a.type&&a.calcx||0)-(a.eow||0)/2,e.frame.reverse,e.target,i,e.id):"y"===i?m(n/2-("column"!==a.type&&a.calcy||0)-(a.eoh||0)/2,e.frame.reverse,e.target,i,e.id):r[i]}}"skewX"===i&&void 0!==r[i]&&(r.scaleY=void 0===r.scaleY?1:parseFloat(r.scaleY),r.scaleY*=Math.cos(parseFloat(r[i])*tpGS.DEG2RAD)),"skewY"===i&&void 0!==r[i]&&(r.scaleX=void 0===r.scaleX?1:parseFloat(r.scaleX),r.scaleX*=Math.cos(parseFloat(r[i])*tpGS.DEG2RAD))}if(r.transformOrigin=o.originX+" "+o.originY+" "+o.originZ,!Q[e.id].BUG_ie_clipPath&&void 0!==r.clip&&void 0!==a.clipPath&&a.clipPath.use){r.clipB=null==r.clipB?100:r.clipB;var c="rectangle"==a.clipPath.type,p=parseInt(r.clip,0),g=100-parseInt(r.clipB,0),u=Math.round(p/2);switch(a.clipPath.origin){case"invh":r.clipPath="polygon(0% 0%, 0% 100%, "+p+"% 100%, "+p+"% 0%, 100% 0%, 100% 100%, "+g+"% 100%, "+g+"% 0%, 0% 0%)";break;case"invv":r.clipPath="polygon(100% 0%, 0% 0%, 0% "+p+"%, 100% "+p+"%, 100% 100%, 0% 100%, 0% "+g+"%, 100% "+g+"%, 100% 0%)";break;case"cv":r.clipPath=c?"polygon("+(50-u)+"% 0%, "+(50+u)+"% 0%, "+(50+u)+"% 100%, "+(50-u)+"% 100%)":"circle("+p+"% at 50% 50%)";break;case"ch":r.clipPath=c?"polygon(0% "+(50-u)+"%, 0% "+(50+u)+"%, 100% "+(50+u)+"%, 100% "+(50-u)+"%)":"circle("+p+"% at 50% 50%)";break;case"l":r.clipPath=c?"polygon(0% 0%, "+p+"% 0%, "+p+"% 100%, 0% 100%)":"circle("+p+"% at 0% 50%)";break;case"r":r.clipPath=c?"polygon("+(100-p)+"% 0%, 100% 0%, 100% 100%, "+(100-p)+"% 100%)":"circle("+p+"% at 100% 50%)";break;case"t":r.clipPath=c?"polygon(0% 0%, 100% 0%, 100% "+p+"%, 0% "+p+"%)":"circle("+p+"% at 50% 0%)";break;case"b":r.clipPath=c?"polygon(0% 100%, 100% 100%, 100% "+(100-p)+"%, 0% "+(100-p)+"%)":"circle("+p+"% at 50% 100%)";break;case"lt":r.clipPath=c?"polygon(0% 0%,"+2*p+"% 0%, 0% "+2*p+"%)":"circle("+p+"% at 0% 0%)";break;case"lb":r.clipPath=c?"polygon(0% "+(100-2*p)+"%, 0% 100%,"+2*p+"% 100%)":"circle("+p+"% at 0% 100%)";break;case"rt":r.clipPath=c?"polygon("+(100-2*p)+"% 0%, 100% 0%, 100% "+2*p+"%)":"circle("+p+"% at 100% 0%)";break;case"rb":r.clipPath=c?"polygon("+(100-2*p)+"% 100%, 100% 100%, 100% "+(100-2*p)+"%)":"circle("+p+"% at 100% 100%)";break;case"clr":r.clipPath=c?"polygon(0% 0%, 0% "+p+"%, "+(100-p)+"% 100%, 100% 100%, 100% "+(100-p)+"%, "+p+"% 0%)":"circle("+p+"% at 50% 50%)";break;case"crl":r.clipPath=c?"polygon(0% "+(100-p)+"%, 0% 100%, "+p+"% 100%, 100% "+p+"%, 100% 0%, "+(100-p)+"% 0%)":"circle("+p+"% at 50% 50%)"}!0!==Q.isFirefox(e.id)&&(r["-webkit-clip-path"]=r.clipPath),r["clip-path"]=r.clipPath,delete r.clip,delete r.clipB}else delete r.clip;return"mask"!==e.target&&(void 0===e.frame||void 0===e.frame.filter&&!e.forcefilter||(r.filter=v(e.frame.filter),r["-webkit-filter"]=r.filter,Q.useBackdrop&&(window.isSafari11?r["-webkit-backdrop-filter"]=h(e.frame.filter):r["backdrop-filter"]=h(e.frame.filter)),window.isSafari11&&void 0!==r.filter&&void 0===r[null==a.iOSFix||"d"==a.iOSFix?"shape"==a.type?"z":"x":a.iOSFix]&&void 0!==e.frame.filter&&void 0!==e.frame.filter.blur&&(r[null==a.iOSFix||"d"==a.iOSFix?"shape"==a.type?"z":"x":a.iOSFix]=1e-4)),0<=jQuery.inArray(e.source,["chars","words","lines"])&&(void 0!==e.frame[e.source].blur||e.forcefilter)&&(r.filter=v(e.frame[e.source]),r["-webkit-filter"]=r.filter),delete r.grayscale,delete r.blur,delete r.brightness),r.ease=(void 0!==r.ease?r:void 0===r.ease&&void 0!==e.ease||void 0!==r.ease&&void 0!==e.ease&&"inherit"===r.ease?e:e.frame.timeline).ease,r.ease=void 0===r.ease||"default"===r.ease?"power3.inOut":r.ease,r},M=function(e,t){var i,a={},r=0;for(r in void 0===Q[t]._rdF0&&(i=d("x:0;y:0;z:0;rX:0;rY:0;rZ:0;o:0;skX:0;skY:0;sX:0;sY:0;oX:50%;oY:50%;oZ:0;dir:forward;d:5",t).transform,Q[t]._rdF0=Q[t]._rdF1={transform:d("x:0;y:0;z:0;rX:0;rY:0;rZ:0;o:0;skX:0;skY:0;sX:0;sY:0;oX:50%;oY:50%;oZ:0;tp:600px",t,!0).transform,mask:d("x:0;y:0",t,!0).transform,chars:jQuery.extend(!0,{blur:0,grayscale:0,brightness:100},i),words:jQuery.extend(!0,{blur:0,grayscale:0,brightness:100},i),lines:jQuery.extend(!0,{blur:0,grayscale:0,brightness:100},i)},Q[t]._rdF1.transform.opacity=Q[t]._rdF1.chars.opacity=Q[t]._rdF1.words.opacity=Q[t]._rdF1.lines.opacity=Q[t]._rdF1.transform.scaleX=Q[t]._rdF1.chars.scaleX=Q[t]._rdF1.words.scaleX=Q[t]._rdF1.lines.scaleX=Q[t]._rdF1.transform.scaleY=Q[t]._rdF1.chars.scaleY=Q[t]._rdF1.words.scaleY=Q[t]._rdF1.lines.scaleY=1),void 0===e.frame_0&&(e.frame_0="x:0"),void 0===e.frame_1&&(e.frame_1="x:0"),e.dddNeeded=!1,e.ford)if(e.ford.hasOwnProperty(r)){var o=e.ford[r];if(e[o]){if(a[o]=d(e[o],t,!0),void 0!==a[o].bgcolor&&(e.bgcolinuse=!0),Q[t].BUG_ie_clipPath&&void 0!==e.clipPath&&e.clipPath.use&&void 0!==a[o].transform.clip){var s="rectangle"===e.clipPath.type?100-parseInt(a[o].transform.clip):100-Math.min(100,2*parseInt(a[o].transform.clip));switch(e.clipPath.origin){case"clr":case"rb":case"rt":case"r":e[o+"_mask"]="u:t;x:"+s+"%;y:0px;",a[o].transform.x=Q.revToResp("-"+s+"%",Q[t].rle);break;case"crl":case"lb":case"lt":case"cv":case"l":e[o+"_mask"]="u:t;x:-"+s+"%;y:0px;",a[o].transform.x=Q.revToResp(s+"%",Q[t].rle);break;case"ch":case"t":e[o+"_mask"]="u:t;y:-"+s+"%;y:0px;",a[o].transform.y=Q.revToResp(s+"%",Q[t].rle);break;case"b":e[o+"_mask"]="u:t;y:"+s+"%;y:0px;",a[o].transform.y=Q.revToResp("-"+s+"%",Q[t].rle)}delete a[o].transform.clip,delete a[o].transform.clipB}e[o+"_mask"]&&(a[o].mask=d(e[o+"_mask"],t).transform),null!=a[o].mask&&a[o].mask.use?(a[o].mask.x=void 0===a[o].mask.x?0:a[o].mask.x,a[o].mask.y=void 0===a[o].mask.y?0:a[o].mask.y,delete a[o].mask.use,a[o].mask.overflow="hidden"):a[o].mask={ease:"default",overflow:"visible"},e[o+"_chars"]&&(a[o].chars=d(e[o+"_chars"],t,void 0,void 0,"split").transform),e[o+"_words"]&&(a[o].words=d(e[o+"_words"],t,void 0,void 0,"split").transform),e[o+"_lines"]&&(a[o].lines=d(e[o+"_lines"],t,void 0,void 0,"split").transform),(e[o+"_chars"]||e[o+"_words"]||e[o+"_lines"])&&(a[o].dosplit=!0),a.frame_0=void 0===a.frame_0?{transform:{}}:a.frame_0,a[o].transform.auto&&(a[o].transform=Q.clone(a.frame_0.transform),a[o].transform.opacity=void 0===a[o].transform.opacity?0:a[o].transform.opacity,void 0!==a.frame_0.filter&&(a[o].filter=Q.clone(a.frame_0.filter)),void 0!==a.frame_0.mask&&(a[o].mask=Q.clone(a.frame_0.mask)),void 0!==a.frame_0.chars&&(a[o].chars=Q.clone(a.frame_0.chars)),void 0!==a.frame_0.words&&(a[o].words=Q.clone(a.frame_0.words)),void 0!==a.frame_0.lines&&(a[o].lines=Q.clone(a.frame_0.lines)),void 0===a.frame_0.chars&&void 0===a.frame_0.words&&void 0===a.frame_0.lines||(a[o].dosplit=!0)),e[o+"_sfx"]&&(a[o].sfx=d(e[o+"_sfx"],t,!1,void 0,"sfx").transform),e[o+"_reverse"]&&(a[o].reverse=d(e[o+"_reverse"],t,!1,void 0,"reverse").transform)}}if(a.frame_0.dosplit&&(a.frame_1.dosplit=!0),void 0===e.frame_hover&&void 0===e.svgh||(a.frame_hover=d(void 0===e.frame_hover?"":e.frame_hover,t),!Q.ISM||"true"!=a.frame_hover.transform.instantClick&&1!=a.frame_hover.transform.instantClick?(delete a.frame_hover.transform.instantClick,a.frame_hover.transform.color=a.frame_hover.color,void 0===a.frame_hover.transform.color&&delete a.frame_hover.transform.color,void 0!==a.frame_hover.bgcolor&&0<=a.frame_hover.bgcolor.indexOf("gradient")?a.frame_hover.transform.backgroundImage=a.frame_hover.bgcolor:void 0!==a.frame_hover.bgcolor&&(a.frame_hover.transform.backgroundColor=a.frame_hover.bgcolor),void 0!==a.frame_hover.bgcolor&&(e.bgcolinuse=!0),a.frame_hover.transform.opacity=void 0===a.frame_hover.transform.opacity?1:a.frame_hover.transform.opacity,a.frame_hover.mask=void 0!==a.frame_hover.transform.mask&&a.frame_hover.transform.mask,delete a.frame_hover.transform.mask,void 0!==a.frame_hover.transform&&((a.frame_hover.transform.borderWidth||a.frame_hover.transform.borderStyle)&&(a.frame_hover.transform.borderColor=void 0===a.frame_hover.transform.borderColor?"transparent":a.frame_hover.transform.borderColor),"none"!==a.frame_hover.transform.borderStyle&&void 0===a.frame_hover.transform.borderWidth&&(a.frame_hover.transform.borderWidth=Q.revToResp(0,4,0).toString().replace(/,/g," ")),void 0===e.bordercolor&&void 0!==a.frame_hover.transform.borderColor&&(e.bordercolor="transparent"),void 0===e.borderwidth&&void 0!==a.frame_hover.transform.borderWidth&&(e.borderwidth=Q.revToResp(a.frame_hover.transform.borderWidth,4,0)),void 0===e.borderstyle)&&void 0!==a.frame_hover.transform.borderStyle&&(e.borderstyle=Q.revToResp(a.frame_hover.transform.borderStyle,4,0))):delete a.frame_hover),void 0!==e.tloop){e.layerLoop={from:"frame_1",to:"frame_999",repeat:-1,keep:!0,children:!0};var n=e.tloop.split(";");for(r in n)if(n.hasOwnProperty(r)){var l=n[r].split(":");switch(l[0]){case"f":e.layerLoop.from=l[1];break;case"t":e.layerLoop.to=l[1];break;case"k":e.layerLoop.keep=l[1];break;case"r":e.layerLoop.repeat=parseInt(l[1],0);break;case"c":e.layerLoop.children=l[1]}}e.layerLoop.count=0}for(r in(e.loop_0||e.loop_999)&&(a.loop=d(e.loop_999,t,!0,"frame_999","loop"),a.loop.frame_0=d(e.loop_0||"",t,!1,void 0,"loop").transform),a.frame_0.transform.opacity=void 0===a.frame_0.transform.opacity?0:a.frame_0.transform.opacity,a.frame_1.transform.opacity=void 0===a.frame_1.transform.opacity?1:a.frame_1.transform.opacity,a.frame_999.transform.opacity=void 0===a.frame_999.transform.opacity?"inherit":a.frame_999.transform.opacity,e.clipPath&&e.clipPath.use&&(a.frame_0.transform.clip=void 0===a.frame_0.transform.clip?100:parseInt(a.frame_0.transform.clip),a.frame_1.transform.clip=void 0===a.frame_1.transform.clip?100:parseInt(a.frame_1.transform.clip)),e.resetfilter=!1,e.useFilter={blur:!1,grayscale:!1,brightness:!1,b_blur:!1,b_grayscale:!1,b_brightness:!1,b_invert:!1,b_sepia:!1},a)void 0!==a[r].filter?(e.resetfilter=!0,e.useFilter=u(e.useFilter,a[r].filter)):null==a[r].filter&&(a[r].filter={},e.useFilter.blur&&(a[r].filter.blur=0),e.useFilter.grayscale&&(a[r].filter.grayscale=0),e.useFilter.brightness&&(a[r].filter.brightness=100),e.useFilter.b_blur&&(a[r].filter.b_blur=0),e.useFilter.b_grayscale&&(a[r].filter.b_grayscale=0),e.useFilter.b_brightness)&&(a[r].filter.b_brightness=100);if(!0!==e.resetFilter&&void 0!==a.frame_hover&&(e.useFilter=u(e.useFilter,a.frame_hover)),e.resetfilter)for(var r in a.frame_0.filter=Q.clone(a.frame_0.filter),a.frame_0.filter=g(e.useFilter,Q.clone(a.frame_0.filter)),a)void 0!==a[r].filter&&"frame_1"!==r&&"frame_0"!==r&&(a[r].filter=Q.clone(a[r].filter),a[r].filter=g(e.useFilter,Q.clone(a[r].filter)));return void 0!==a.frame_0.filter&&(a.frame_1.filter=Q.clone(a.frame_1.filter),void 0!==a.frame_0.filter.blur&&0!==a.frame_1.filter.blur&&(a.frame_1.filter.blur=void 0===a.frame_1.filter.blur?0:a.frame_1.filter.blur),void 0!==a.frame_0.filter.brightness&&100!==a.frame_1.filter.brightness&&(a.frame_1.filter.brightness=void 0===a.frame_1.filter.brightness?100:a.frame_1.filter.brightness),void 0!==a.frame_0.filter.grayscale&&0!==a.frame_1.filter.grayscale&&(a.frame_1.filter.grayscale=void 0===a.frame_1.filter.grayscale?0:a.frame_1.filter.grayscale),void 0!==a.frame_0.filter.b_blur&&0!==a.frame_1.filter.b_blur&&(a.frame_1.filter.b_blur=void 0===a.frame_1.filter.b_blur?0:a.frame_1.filter.b_blur),void 0!==a.frame_0.filter.b_brightness&&100!==a.frame_1.filter.b_brightness&&(a.frame_1.filter.b_brightness=void 0===a.frame_1.filter.b_brightness?100:a.frame_1.filter.b_brightness),void 0!==a.frame_0.filter.b_grayscale&&0!==a.frame_1.filter.b_grayscale&&(a.frame_1.filter.b_grayscale=void 0===a.frame_1.filter.b_grayscale?0:a.frame_1.filter.b_grayscale),void 0!==a.frame_0.filter.b_invert&&0!==a.frame_1.filter.b_invert&&(a.frame_1.filter.b_invert=void 0===a.frame_1.filter.b_invert?0:a.frame_1.filter.b_invert),void 0!==a.frame_0.filter.b_sepia)&&0!==a.frame_1.filter.b_sepia&&(a.frame_1.filter.b_sepia=void 0===a.frame_1.filter.b_sepia?0:a.frame_1.filter.b_sepia),f(a,t,e)},g=function(e,t){return e.blur?t.blur=void 0===t.blur?0:t.blur:delete t.blur,e.brightness?t.brightness=void 0===t.brightness?100:t.brightness:delete t.brightness,e.grayscale?t.grayscale=void 0===t.grayscale?0:t.grayscale:delete t.grayscale,e.b_blur?t.b_blur=void 0===t.b_blur?0:t.b_blur:delete t.b_blur,e.b_brightness?t.b_brightness=void 0===t.b_brightness?100:t.b_brightness:delete t.b_brightness,e.b_grayscale?t.b_grayscale=void 0===t.b_grayscale?0:t.b_grayscale:delete t.b_grayscale,e.b_invert?t.b_invert=void 0===t.b_invert?0:t.b_invert:delete t.b_invert,e.b_sepia?t.b_sepia=void 0===t.b_sepia?0:t.b_sepia:delete t.b_sepia,t},u=function(e,t){return e.blur=!0===e.blur||void 0!==t.blur&&0!==t.blur&&"0px"!==t.blur,e.grayscale=!0===e.grayscale||void 0!==t.grayscale&&0!==t.grayscale&&"0%"!==t.grayscale,e.brightness=!0===e.brightness||void 0!==t.brightness&&100!==t.brightness&&"100%"!==t.brightness,e.b_blur=!0===e.b_blur||void 0!==t.b_blur&&0!==t.b_blur&&"0px"!==t.b_blur,e.b_grayscale=!0===e.b_grayscale||void 0!==t.b_grayscale&&0!==t.b_grayscale&&"0%"!==t.b_grayscale,e.b_brightness=!0===e.b_brightness||void 0!==t.b_brightness&&100!==t.b_brightness&&"100%"!==t.b_brightness,e.b_invert=!0===e.b_invert||void 0!==t.b_invert&&0!==t.b_invert&&"0%"!==t.b_invert,e.b_sepia=!0===e.b_sepia||void 0!==t.b_sepia&&0!==t.b_sepia&&"0%"!==t.b_sepia,e},f=function(e,t,i){var a,r={},o=["transform","words","chars","lines","mask"],s="global"==Q[t].perspectiveType?Q[t].perspective:0,n=!0,l=!1;for(c in e)"loop"!==c&&"frame_hover"!==c&&(r=jQuery.extend(!0,r,e[c]));for(c in e)if(e.hasOwnProperty(c)&&(void 0!==e[c].timeline&&(e[c].timeline.usePerspective=!1),"loop"!==c)&&"frame_hover"!==c){for(a in r.transform)r.transform.hasOwnProperty(a)&&(r.transform[a]=(void 0===e[c].transform[a]?"frame_0"===c?Q[t]._rdF0:"frame_1"===c?Q[t]._rdF1:r:e[c]).transform[a],e[c].transform[a]=(void 0===e[c].transform[a]?r:e[c]).transform[a]);for(var d=1;d<=4;d++)for(a in r[o[d]])r[o[d]].hasOwnProperty(a)&&(e[c][o[d]]=void 0===e[c][o[d]]?{}:e[c][o[d]],r[o[d]][a]=(void 0===e[c][o[d]][a]?"frame_0"===c?Q[t]._rdF0:"frame_1"===c?Q[t]._rdF1:r:e[c])[o[d]][a],e[c][o[d]][a]=(void 0===e[c][o[d]][a]?r:e[c])[o[d]][a]);void 0!==e[c].timeline&&!1===e[c].timeline.usePerspective&&void 0!==e[c].transform&&(void 0!==e[c].transform.rotationY||void 0!==e[c].transform.rotationX||void 0!==e[c].transform.z||p(e[c].chars)||p(e[c].words)||p(e[c].lines))&&(s="local"==Q[t].perspectiveType?void 0===e[c].transform.transformPerspective?600:e[c].transform.transformPerspective:s,e[c].timeline.usePerspective=!0,(p(e[c].chars)||p(e[c].words)||p(e[c].lines))&&!Q.isFirefox(t)&&(l=!0),n=!1)}if(l&&requestAnimationFrame(function(){tpGS.gsap.set(i.c,{transformStyle:"preserve-3d"})}),void 0!==e.frame_0.timeline&&e.frame_0.timeline.usePerspective&&(e.frame_0.transform.transformPerspective="local"===Q[t].perspectiveType?void 0===e.frame_0.transform.transformPerspective?s:e.frame_0.transform.transformPerspective:"isometric"===Q[t].perspectiveType?0:Q[t].perspective),n)for(var c in e){if(!e.hasOwnProperty(c)||void 0===e[c].transform)continue;delete e[c].transform.transformPerspective}return e},n=function(e,t,i){if(0===e.length)return{};for(var a=e[0].getElementsByClassName(t),r={},o=0;o<a.length;o++)void 0!==i&&-1!==a[o].className.indexOf(i)||(r[a[o].id]=a[o]);if(void 0!==e[1])for(a=e[1].getElementsByClassName(t),o=0;o<a.length;o++)void 0!==i&&-1!==a[o].className.indexOf(i)||(r[a[o].id]=a[o]);return r},T=function(e,t,i){if("BR"==e[0].nodeName||"br"==e[0].tagName||"object"!=typeof e[0].className&&0<=e[0].className.indexOf("rs_splitted_"))return!1;Q.sA(e[0],"stylerecorder",!0),void 0===e[0].id&&(e[0].id="rs-layer-sub-"+Math.round(1e6*Math.random())),Q[i].computedStyle[e[0].id]=window.getComputedStyle(e[0],null);var a=void 0!==e[0].id&&void 0!==Q[i]._L[e[0].id]?Q[i]._L[e[0].id]:e.data(),r="rekursive"===t?jQuery(Q.closestClass(e[0],"rs-layer")):void 0,o=(void 0!==r&&(Q[i].computedStyle[r[0].id]=void 0===Q[i].computedStyle[r[0].id]?window.getComputedStyle(r[0],null):Q[i].computedStyle[r[0].id]),void 0!==r&&Q[i].computedStyle[e[0].id].fontSize==Q[i].computedStyle[r[0].id].fontSize&&c(Q[i].computedStyle[e[0].id].fontWeight)==c(Q[i].computedStyle[r[0].id].fontWeight)&&Q[i].computedStyle[e[0].id].lineHeight==Q[i].computedStyle[r[0].id].lineHeight),s=o?void 0!==r[0].id&&void 0!==Q[i]._L[r[0].id]?Q[i]._L[r[0].id]:r.data():void 0,n=0;for(a.basealign=void 0===a.basealign?"grid":a.basealign,a._isnotext||(a.fontSize=Q.revToResp(o?void 0===s.fontsize?parseInt(Q[i].computedStyle[r[0].id].fontSize,0)||20:s.fontsize:void 0===a.fontsize?"rekursive"!==t?20:"inherit":a.fontsize,Q[i].rle),a.fontWeight=Q.revToResp(o?void 0===s.fontweight?Q[i].computedStyle[r[0].id].fontWeight||"inherit":s.fontweight:void 0===a.fontweight?Q[i].computedStyle[e[0].id].fontWeight||"inherit":a.fontweight,Q[i].rle),a.whiteSpace=Q.revToResp(o?void 0===s.whitespace?"nowrap":s.whitespace:void 0===a.whitespace?"nowrap":a.whitespace,Q[i].rle),a.textAlign=Q.revToResp(o?void 0===s.textalign?"left":s.textalign:void 0===a.textalign?"left":a.textalign,Q[i].rle),a.letterSpacing=Q.revToResp(o?void 0===s.letterspacing?parseInt(Q[i].computedStyle[r[0].id].letterSpacing,0)||"inherit":s.letterspacing:void 0===a.letterspacing?parseInt("normal"===Q[i].computedStyle[e[0].id].letterSpacing?0:Q[i].computedStyle[e[0].id].letterSpacing,0)||"inherit":a.letterspacing,Q[i].rle),a.textDecoration=o?void 0===s.textDecoration?"none":s.textDecoration:void 0===a.textDecoration?"none":a.textDecoration,n=25,n=void 0===r||"I"!==e[0].tagName&&"STRONG"!==e[0].tagName?n:"inherit",void 0!==a.tshadow&&(a.tshadow.b=Q.revToResp(a.tshadow.b,Q[i].rle),a.tshadow.h=Q.revToResp(a.tshadow.h,Q[i].rle),a.tshadow.v=Q.revToResp(a.tshadow.v,Q[i].rle))),"group"===a.type&&(a.whiteSpace="normal",a.textAlign=Q.revToResp(o?void 0===s.textalign?"left":s.textalign:void 0===a.textalign?"left":a.textalign,Q[i].rle)),void 0!==a.bshadow&&(a.bshadow.b=Q.revToResp(a.bshadow.b,Q[i].rle),a.bshadow.h=Q.revToResp(a.bshadow.h,Q[i].rle),a.bshadow.v=Q.revToResp(a.bshadow.v,Q[i].rle),a.bshadow.s=Q.revToResp(a.bshadow.s,Q[i].rle)),void 0!==a.tstroke&&(a.tstroke.w=Q.revToResp(a.tstroke.w,Q[i].rle)),a.display=(o?void 0===s.display?Q[i].computedStyle[r[0].id]:s:void 0===a.display?Q[i].computedStyle[e[0].id]:a).display,a.float=Q.revToResp(o?void 0===s.float?Q[i].computedStyle[r[0].id].float||"none":s.float:void 0===a.float?"none":a.float,Q[i].rle),a.clear=Q.revToResp(o?void 0===s.clear?Q[i].computedStyle[r[0].id].clear||"none":s.clear:void 0===a.clear?"none":a.clear,Q[i].rle),a.lineHeight=Q.revToResp(e.is("img")||-1!=jQuery.inArray(a.layertype,["video","image","audio"])?n:o?void 0===s.lineheight?parseInt(Q[i].computedStyle[r[0].id].lineHeight,0)||n:s.lineheight:void 0===a.lineheight?n:a.lineheight,Q[i].rle),a.zIndex=o?void 0===s.zindex?parseInt(Q[i].computedStyle[r[0].id].zIndex,0)||"inherit":s.zindex:void 0===a.zindex?parseInt(Q[i].computedStyle[e[0].id].zIndex,0)||"inherit":parseInt(a.zindex),l=0;l<4;l++)a["padding"+R[l]]=Q.revToResp(void 0===a["padding"+I[l]]?parseInt(Q[i].computedStyle[e[0].id]["padding"+R[l]],0)||0:a["padding"+I[l]],Q[i].rle),a["margin"+R[l]]=Q.revToResp(void 0===a["margin"+I[l]]?parseInt(Q[i].computedStyle[e[0].id]["margin"+R[l]],0)||0:a["margin"+I[l]],Q[i].rle),a["border"+R[l]+"Width"]=void 0===a.borderwidth?parseInt(Q[i].computedStyle[e[0].id]["border"+R[l]+"Width"],0)||0:a.borderwidth[l],a["border"+R[l]+"Color"]=void 0===a.bordercolor?Q[i].computedStyle[e[0].id]["border-"+I[l]+"-color"]:a.bordercolor,a["border"+L[l]+"Radius"]=Q.revToResp(void 0===a.borderradius?Q[i].computedStyle[e[0].id]["border"+L[l]+"Radius"]||0:a.borderradius[l],Q[i].rle);if(a.borderStyle=Q.revToResp(void 0===a.borderstyle?Q[i].computedStyle[e[0].id].borderStyle||0:a.borderstyle,Q[i].rle),"rekursive"!==t?(a.color=Q.revToResp(void 0===a.color?"#ffffff":a.color,Q[i].rle,void 0,"||"),a.minWidth=Q.revToResp(void 0===a.minwidth?parseInt(Q[i].computedStyle[e[0].id].minWidth,0)||0:a.minwidth,Q[i].rle),a.minHeight=Q.revToResp(void 0===a.minheight?parseInt(Q[i].computedStyle[e[0].id].minHeight,0)||0:a.minheight,Q[i].rle),a.width=Q.revToResp(void 0===a.width?"auto":Q.smartConvertDivs(a.width),Q[i].rle),a.height=Q.revToResp(void 0===a.height?"auto":Q.smartConvertDivs(a.height),Q[i].rle),a.maxWidth=Q.revToResp(void 0===a.maxwidth?parseInt(Q[i].computedStyle[e[0].id].maxWidth,0)||"none":a.maxwidth,Q[i].rle),a.maxHeight=Q.revToResp(-1!==jQuery.inArray(a.type,["column","row"])?"none":void 0!==a.maxheight?parseInt(Q[i].computedStyle[e[0].id].maxHeight,0)||"none":a.maxheight,Q[i].rle)):"html"===a.layertype&&(a.width=Q.revToResp(e[0].width,Q[i].rle),a.height=Q.revToResp(e[0].height,Q[i].rle)),a._incolumn)for(var l=0;l<a.height.length;l++)-1!==a.height[l].indexOf("%")&&98<parseFloat(a.height[l])&&(a.height[l]=a.height[l].replace("%","px"));for(a.styleProps={background:e[0].style.background,"background-color":e[0].style["background-color"],color:e[0].style.color,cursor:e[0].style.cursor,"font-style":e[0].style["font-style"]},null==a.bshadow&&(a.styleProps.boxShadow=e[0].style.boxShadow),""!==a.styleProps.background&&void 0!==a.styleProps.background&&a.styleProps.background!==a.styleProps["background-color"]||delete a.styleProps.background,""==a.styleProps.color&&(a.styleProps.color=Q[i].computedStyle[e[0].id].color),l=0;l<4;l++)y(a["padding"+R[l]],0)&&delete a["padding"+R[l]],y(a["margin"+R[l]],0)&&delete a["margin"+R[l]],(y(a["border"+L[l]+"Radius"],"0px")||y(a["border"+L[l]+"Radius"],"0"))&&delete a["border"+L[l]+"Radius"];if(y(a.borderStyle,"none"))for(delete a.borderStyle,l=0;l<4;l++)delete a["border"+R[l]+"Width"],delete a["border"+R[l]+"Color"]},y=function(e,t){return t===e[0]&&t===e[1]&&t===e[2]&&t===e[3]},i=function(e){var t,i,a,r,o,s=e.a,n=e.b,l=e.c,d=e.d,c=e.e,p={},g={},u=Q[n]._L[s[0].id],h=s[0].className,u=void 0===u?{}:u;if("object"==typeof h&&(h=""),void 0!==s&&void 0!==s[0]&&(0<=h.indexOf("rs_splitted")||"BR"==s[0].nodeName||"br"==s[0].tagName||0<s[0].tagName.indexOf("FCR")||0<s[0].tagName.indexOf("BCR")))return!1;var m,c="individual"===c?u.slideIndex:c,v=function(e,t,i){if(void 0!==e){if("BR"==e[0].nodeName||"br"==e[0].tagName)return!1;var a,r=Q[t].level,o=void 0!==e[0]&&void 0!==e[0].id&&void 0!==Q[t]._L[e[0].id]?Q[t]._L[e[0].id]:e.data(),s=(void 0===(o=void 0===o.basealign?i.data():o)._isnotext&&(o._isnotext=void 0!==i&&void 0!==i[0]&&0<i[0].length?Q.gA(i[0],"_isnotext"):o._isnotext),{basealign:void 0===o.basealign?"grid":o.basealign,lineHeight:void 0===o.basealign?"inherit":parseInt(o.lineHeight[r]),color:void 0===o.color?void 0:o.color[r],width:void 0===o.width?void 0:"a"===o.width[r]?"auto":o.width[r],height:void 0===o.height?void 0:"a"===o.height[r]?"auto":o.height[r],minWidth:void 0===o.minWidth?void 0:"n"===o.minWidth[r]?"none":o.minWidth[r],minHeight:void 0===o.minHeight?void 0:"n"==o.minHeight[r]?"none":o.minHeight[r],maxWidth:void 0===o.maxWidth?void 0:"n"==o.maxWidth[r]?"none":o.maxWidth[r],maxHeight:void 0===o.maxHeight?void 0:"n"==o.maxHeight[r]?"none":o.maxHeight[r],float:o.float[r],clear:o.clear[r]});for(o.borderStyle&&(s.borderStyle=o.borderStyle[r]),a=0;a<4;a++)o["padding"+R[a]]&&(s["padding"+R[a]]=o["padding"+R[a]][r]),o["margin"+R[a]]&&(s["margin"+R[a]]=parseInt(o["margin"+R[a]][r])),o["border"+L[a]+"Radius"]&&(s["border"+L[a]+"Radius"]=o["border"+L[a]+"Radius"][r]),void 0!==s.borderStyle&&"none"!==s.borderStyle&&(o["border"+R[a]+"Color"]&&(s["border"+R[a]+"Color"]=o["border"+R[a]+"Color"]),o["border"+R[a]+"Width"])&&(s["border"+R[a]+"Width"]=parseInt(o["border"+R[a]+"Width"]));return o._isnotext||(s.textDecoration=o.textDecoration,s.fontSize=parseInt(o.fontSize[r]),s.fontWeight=parseInt(o.fontWeight[r]),s.letterSpacing=parseInt(o.letterSpacing[r])||0,s.textAlign=o.textAlign[r],s.whiteSpace=o.whiteSpace[r],s.whiteSpace="normal"===s.whiteSpace&&"auto"===s.width&&(!0!==o._incolumn&&!0!==o._ingroup||"relative"!==o.position)?"nowrap":s.whiteSpace,s.display=o.display,void 0!==o.tshadow&&(s.textShadow=parseInt(o.tshadow.h[r],0)+"px "+parseInt(o.tshadow.v[r],0)+"px "+o.tshadow.b[r]+" "+o.tshadow.c),void 0!==o.tstroke&&(s.textStroke=parseInt(o.tstroke.w[r],0)+"px "+o.tstroke.c)),"group"===o.type&&(s.whiteSpace=o.whiteSpace,s.textAlign=o.textAlign[r],s.display=o.display),void 0!==o.bshadow&&(s.boxShadow=parseInt(o.bshadow.h[r],0)+"px "+parseInt(o.bshadow.v[r],0)+"px "+parseInt(o.bshadow.b[r],0)+"px "+parseInt(o.bshadow.s[r],0)+"px "+o.bshadow.c),s}}(s,n,e.RSL),f="off"===d?1:Q[n].CM.w;if(void 0===u._isnotext&&(u._isnotext=void 0!==v.RSL&&void 0!==v.RSL[0]&&0<v.RSL[0].length?Q.gA(v.RSL[0],"_isnotext"):u._isnotext),u._incolumn&&("shape"===u.type||"text"===u.type||"button"===u.type)&&(""+v.height).indexOf(!1)&&(v.height=v.height),u.OBJUPD=null==u.OBJUPD?{}:u.OBJUPD,u.caches=null==u.caches?{}:u.caches,"column"===u.type){for(i={},m={},t=0;t<4;t++)void 0!==v["margin"+R[t]]&&(i["padding"+R[t]]=Math.round(v["margin"+R[t]]*f)+"px",m["margin"+R[t]]=v["margin"+R[t]],delete v["margin"+R[t]]);jQuery.isEmptyObject(i)||tpGS.gsap.set(u._column,i)}var y=Q.clone(u.OBJUPD.POBJ),w=Q.clone(u.OBJUPD.LPOBJ);if(-1===h.indexOf("rs_splitted_")){for(i={overwrite:"auto"},t=0;t<4;t++)void 0!==v["border"+L[t]+"Radius"]&&(i["border"+L[t]+"Radius"]=v["border"+L[t]+"Radius"]),void 0!==v["padding"+R[t]]&&(i["padding"+R[t]]=Math.round(v["padding"+R[t]]*f)+"px"),void 0===v["margin"+R[t]]||u._incolumn||u._ingroup&&"absolute"!=u.position||(i["margin"+R[t]]="row"===u.type?0:Math.round(v["margin"+R[t]]*f)+"px");if(void 0!==u.spike&&(i["clip-path"]=i["-webkit-clip-path"]=u.spike),v.boxShadow&&(i.boxShadow=v.boxShadow),"column"!==u.type&&(void 0!==v.borderStyle&&"none"!==v.borderStyle&&(0!==v.borderTopWidth||0<v.borderBottomWidth||0<v.borderLeftWidth||0<v.borderRightWidth)?(i.borderTopWidth=Math.round(v.borderTopWidth*f)+"px",i.borderBottomWidth=Math.round(v.borderBottomWidth*f)+"px",i.borderLeftWidth=Math.round(v.borderLeftWidth*f)+"px",i.borderRightWidth=Math.round(v.borderRightWidth*f)+"px",i.borderStyle=v.borderStyle,i.borderTopColor=v.borderTopColor,i.borderBottomColor=v.borderBottomColor,i.borderLeftColor=v.borderLeftColor,i.borderRightColor=v.borderRightColor):("none"===v.borderStyle&&(i.borderStyle="none"),void 0!==v.borderTopColor&&(i.borderTopColor=v.borderTopColor),void 0!==v.borderBottomColor&&(i.borderBottomColor=v.borderBottomColor),void 0!==v.borderLeftColor&&(i.borderLeftColor=v.borderLeftColor),void 0!==v.borderRightColor&&(i.borderRightColor=v.borderRightColor))),"shape"!==u.type&&"image"!==u.type||!(O(v.borderTopLeftRadius)||O(v.borderTopRightRadius)||O(v.borderBottomLeftRadius)||O(v.borderBottomRightRadius))||(i.overflow="hidden"),u._isnotext||("column"!==u.type&&(i.fontSize=Math.round(v.fontSize*f)+"px",i.fontWeight=v.fontWeight,i.letterSpacing=v.letterSpacing*f+"px",v.textShadow&&(i.textShadow=v.textShadow),v.textStroke)&&(i["-webkit-text-stroke"]=v.textStroke),i.lineHeight=Math.round(v.lineHeight*f)+"px",i.textAlign=v.textAlign),"video"===u.type&&u.html5vid&&void 0!==u.deepmedia&&void 0!==u.deepmedia[0]&&null!=u.deepmedia[0].parentNode&&(O(v.borderTopLeftRadius)||O(v.borderTopRightRadius)||O(v.borderBottomLeftRadius)||O(v.borderBottomRightRadius))&&tpGS.gsap.set(u.deepmedia[0].parentNode,function(e){e=Q.clone(e);return e.top=0-((parseInt(e.borderTopWidth)||0)+(parseInt(e.borderBottomWidth)||0))/2+"px",e.left=0-((parseInt(e.borderLeftWidth)||0)+(parseInt(e.borderRightWidth)||0))/2+"px",e.borderStyle=void 0!==e.borderTopWidth||void 0!==e.borderBottomWidth||void 0!==e.borderLeftWidth||void 0!==e.borderRightWidth?"solid":"none",e.borderColor="transparent",e.boxSizing="content-box",e}(i)),"column"===u.type&&void 0!==u.cbg&&(void 0===u.cbg_set&&(u.cbg_set=u.styleProps["background-color"],u.cbg_set=""==u.cbg_set||void 0===u.cbg_set||0==u.cbg_set.length?"transparent":u.cbg_set,u.cbg_img=void 0!==s[0].dataset.bglazy?'url("'+s[0].dataset.bglazy+'")':s.css("backgroundImage"),""!==u.cbg_img&&void 0!==u.cbg_img&&"none"!==u.cbg_img&&(u.cbg_img_r=s.css("backgroundRepeat"),u.cbg_img_p=s.css("backgroundPosition"),u.cbg_img_s=s.css("backgroundSize")),u.cbg_o=u.bgopacity&&1,p.backgroundColor="transparent",p.backgroundImage=""),i.backgroundColor="transparent",i.backgroundImage="none"),u._isstatic&&u.elementHovered&&(r=s.data("frames"))&&r.frame_hover&&r.frame_hover.transform)for(o in i)i.hasOwnProperty(o)&&r.frame_hover.transform.hasOwnProperty(o)&&delete i[o];if("IFRAME"==s[0].nodeName&&"html"===Q.gA(s[0],"layertype")&&(b="slide"==v.basealign?Q[n].module.width:Q.iWA(n,c),_="slide"==v.basealign||"carousel"==Q[n].sliderType&&"v"===Q[n].carousel.orientation?Q[n].module.height:Q.iHE(n),i.width=!Q.isNumeric(v.width)&&0<=v.width.indexOf("%")?!u._isstatic||u._incolumn||u._ingroup?v.width:b*parseInt(v.width,0)/100:k(v.width,f,"auto",b,"auto"),i.height=!Q.isNumeric(v.height)&&0<=v.height.indexOf("%")?!u._isstatic||u._incolumn||u._ingroup?v.height:_*parseInt(v.height,0)/100:k(v.height,f,"auto",b,"auto")),p=jQuery.extend(!0,p,i),Q[n].firstLayerCalculated=!0,"rekursive"!=l){var b="slide"==v.basealign?Q[n].module.width:Q.iWA(n,c),_="slide"==v.basealign||"carousel"==Q[n].sliderType&&"v"===Q[n].carousel.orientation?Q[n].module.height:Q.iHE(n),d=!Q.isNumeric(v.width)&&0<=v.width.indexOf("%")?!u._isstatic||u._incolumn||u._ingroup?v.width:b*parseInt(v.width,0)/100:k(v.width,f,"auto",b,"auto"),h=!Q.isNumeric(v.height)&&0<=v.height.indexOf("%")?!u._isstatic||u._incolumn||u._ingroup?v.height:_*parseInt(v.height,0)/100:k(v.height,f,"auto",b,"auto"),S={maxWidth:k(v.maxWidth,f,"none",b,"none"),maxHeight:k(v.maxHeight,f,"none",_,"none"),minWidth:k(v.minWidth,f,"0px",b,0),minHeight:k(v.minHeight,f,"0px",_,0),height:h,width:d,overwrite:"auto"},l=(1==u.heightSetByVideo&&(S.height=u.vidOBJ.height),!1);if(u._incolumn){for(y=jQuery.extend(!0,y,{minWidth:d,maxWidth:d,float:v.float,clear:v.clear}),t=0;t<4;t++)void 0!==v["margin"+R[t]]&&(y["margin"+R[t]]=v["margin"+R[t]]*f+"px");w.width="100%",void 0!==v.display&&"inline-block"!==v.display||(g={width:"100%"}),S.width=!Q.isNumeric(v.width)&&0<=v.width.indexOf("%")?"100%":d,"image"===u.type&&tpGS.gsap.set(u.img,{width:"100%"})}else!Q.isNumeric(v.width)&&0<=v.width.indexOf("%")&&(u._isgroup&&"absolute"===u.position||(!0===u._ingroup||1==u._incolumn)&&"relative"===u.position||void 0!==u.reqWrp&&(!u.reqWrp.loop||!u.reqWrp.mask)?y.width="slide"===u.basealign||!0===u._ingroup||u._isstatic?d:Q.iWA(n,c)*Q[n].CM.w*parseInt(d)/100+"px":y.minWidth="slide"===u.basealign||!0===u._ingroup||u._isstatic?d:Q.iWA(n,c)*Q[n].CM.w*parseInt(d)/100+"px",w.width="100%",g.width="100%");if(!0===u._ingroup&&"relative"===u.position&&(y.float=v.float,y.lineHeight=v.lineHeight+"px",p.verticalAlign="top",g.verticalAlign="top",w.verticalAlign="top",y.verticalAlign="inherit"),!Q.isNumeric(v.height)&&0<=v.height.indexOf("%")&&(y.minHeight="slide"===u.basealign||!0===u._ingroup||u._isstatic?h:Q.iHE(n)*(Q[n].currentRowsHeight>Q[n].gridheight[Q[n].level]?1:Q[n].CM.w)*parseInt(h)/100+"px",void 0===u.reqWrp||u.reqWrp.loop||u.reqWrp.mask||(y.height=y.minHeight),w.height="100%",g.height="100%",l=!0),u._isnotext?"group"==u.type&&(S.whiteSpace="normal"):(S.whiteSpace=v.whiteSpace,S.textAlign=v.textAlign,S.textDecoration=v.textDecoration),"npc"!=v.color&&void 0!==v.color&&(S.color=v.color),u._ingroup&&(u._groupw=S.minWidth,u._grouph=S.minHeight),"row"===u.type&&(Q.isNumeric(S.minHeight)||0<=S.minHeight.indexOf("px"))&&"0px"!==S.minHeight&&0!==S.minHeight&&"0"!==S.minHeight&&"none"!==S.minHeight?S.height=S.minHeight:"row"===u.type&&(S.height="auto"),u._isstatic&&u.elementHovered&&(r=s.data("frames"))&&r.frame_hover&&r.frame_hover.transform)for(o in S)S.hasOwnProperty(o)&&r.frame_hover.transform.hasOwnProperty(o)&&delete S[o];if("group"!==u.type&&"row"!==u.type&&"column"!==u.type&&(!Q.isNumeric(S.width)&&0<=S.width.indexOf("%")&&(S.width="100%"),!Q.isNumeric(S.height))&&0<=S.height.indexOf("%")&&(S.height="100%"),u._isgroup){for(!Q.isNumeric(S.width)&&0<=S.width.indexOf("%")&&(S.width="100%"),"absolute"!=u.position||u._ingroup||u._incolumn||!l?y.height=l?"100%":S.height:(y.height=y.minHeight,S.height="100%"),S.lineHeight=void 0===v.lineHeight||l?"initial":v.lineHeight+"px",S.verticalAlign=u.verticalalign,S.textAlign=v.textAlign,t=0;t<4;t++)void 0!==p["border"+L[t]+"Radius"]&&(g["border"+L[t]+"Radius"]=p["border"+L[t]+"Radius"]);"relative"==u.position&&void 0!==v.display&&(y.display=v.display),"auto"==v.width&&(g.position="relative")}p=jQuery.extend(!0,p,S),null!=u.svg_src&&void 0!==u.svgI&&("string"==typeof u.svgI.fill&&(u.svgI.fill=[u.svgI.fill]),u.svgTemp=Q.clone(u.svgI),delete u.svgTemp.svgAll,void 0!==u.svgTemp.fill&&!0!==(u.elementHovered&&u._isstatic)&&(u.svgTemp.fill=u.svgTemp.fill[Q[n].level],u.svg.length<=0&&(u.svg=s.find("svg")),u.svgPath.length<=0&&(u.svgPath=u.svg.find(u.svgI.svgAll?"path, circle, ellipse, line, polygon, polyline, rect":"path")),tpGS.gsap.set(u.svgPath,{fill:u.svgI.fill[Q[n].level]})),tpGS.gsap.set(u.svg,u.svgTemp))}if("row"===u.type)for(t=0;t<4;t++)void 0!==v["margin"+R[t]]&&(y["padding"+R[t]]=v["margin"+R[t]]*f+"px");if(u._ingroup&&"relative"==u.position){for(t=0;t<4;t++)void 0!==v["margin"+R[t]]&&(y["margin"+R[t]]=v["margin"+R[t]]*f+"px");"shape"===u.type&&"100%"==g.width&&"100%"==g.height&&(g.position="absolute")}if("column"===u.type&&u.cbg&&0<u.cbg.length){for(void 0!==u.cbg_img_s&&void 0!==u.cbg&&(u.cbg[0].style.backgroundSize=u.cbg_img_s),i={},""!==u.styleProps.cursor&&(i.cursor=u.styleProps.cursor),""!==u.cbg_set&&"transparent"!==u.cbg_set&&(i.backgroundColor=u.cbg_set),""!==u.cbg_img&&"none"!==u.cbg_img&&(i.backgroundImage=u.cbg_img,""!==u.cbg_img_r&&(i.backgroundRepeat=u.cbg_img_r),""!==u.cbg_img_p)&&(i.backgroundPosition=u.cbg_img_p),""!==u.cbg_o&&void 0!==u.cbg_o&&(i.opacity=u.cbg_o),t=0;t<4;t++)void 0!==v.borderStyle&&"none"!==v.borderStyle&&(void 0!==v["border"+R[t]+"Width"]&&(i["border"+R[t]+"Width"]=Math.round(parseInt(v["border"+R[t]+"Width"])*f)+"px"),void 0!==v["border"+R[t]+"Color"])&&(i["border"+R[t]+"Color"]=v["border"+R[t]+"Color"]),v["border"+L[t]+"Radius"]&&(i["border"+L[t]+"Radius"]=v["border"+L[t]+"Radius"]);for(void 0!==v.borderStyle&&"none"!==v.borderStyle&&(i.borderStyle=v.borderStyle),(a=JSON.stringify(i))!==Q[n].emptyObject&&a!==u.caches.cbgS&&tpGS.gsap.set(u.cbg,i),u.caches.cbgS=a,i={},t=0;t<4;t++)m["margin"+R[t]]&&(i[I[t]]=m["margin"+R[t]]*f+"px");(a=JSON.stringify(i))!==Q[n].emptyObject&&a!==u.caches.cbgmaskS&&(tpGS.gsap.set(u.cbgmask,i),u.caches.cbgmaskS=a)}for(var x in void 0===u.reqWrp||u.reqWrp.loop||u.reqWrp.mask||"100%"!=p.width||"100%"!=p.height||(p.position="absolute"),"auto"===y.maxWidth&&(y.maxWidth="inherit"),"auto"===y.maxHeight&&(y.maxHeight="inherit"),"auto"===g.maxWidth&&(g.maxWidth="inherit"),"auto"===g.maxHeight&&(g.maxHeight="inherit"),"auto"===w.maxWidth&&(w.maxWidth="inherit"),"auto"===w.maxHeight&&(w.maxHeight="inherit"),u.fullinset&&1==u._ingroup&&"absolute"===u.position&&(y.width="auto",y.minHeight="auto",y.height="auto",y.left=void 0!==p.marginLeft&&"0px"!==p.marginLeft?p.marginLeft:"0px",y.right=void 0!==p.marginRight&&"0px"!==p.marginRight?p.marginRight:"0px",y.top=void 0!==p.marginTop&&"0px"!==p.marginTop?p.marginTop:"0px",y.bottom=void 0!==p.marginBottom&&"0px"!==p.marginBottom?p.marginBottom:"0px",delete p.marginLeft,delete p.marginRight,delete p.marginTop,delete p.marginBottom),void 0!==u.vidOBJ&&(p.width=u.vidOBJ.width,p.height=u.vidOBJ.height),void 0!==u.OBJUPD.lppmOBJ&&(void 0!==u.OBJUPD.lppmOBJ.minWidth&&(w.minWidth=u.OBJUPD.lppmOBJ.minWidth,g.minWidth=u.OBJUPD.lppmOBJ.minWidth),void 0!==u.OBJUPD.lppmOBJ.minHeight)&&(w.minHeight=u.OBJUPD.lppmOBJ.minHeight,g.minHeight=u.OBJUPD.lppmOBJ.minHeight,y.minHeight=u.OBJUPD.lppmOBJ.minHeight),u._incolumn&&"group"==u.type&&void 0!==y&&"100%"==y.minWidth&&(g.width="100%"),u._isgroup&&u.thFixed&&void 0!==u.reqWrp&&u.reqWrp.loop&&u.reqWrp.mask&&"auto"==v.width&&(w.position="relative"),!u._ingroup||u.reqWrp.loop||u.reqWrp.mask||"absolute"!=u.position||"100%"!=y.minHeight||(y.height="100%"),Q[n].calcResponsiveLayerHooks){x=Q[n].calcResponsiveLayerHooks[x]({id:n,L:s,obj:v,_:u,inobj:e,LOBJ:p,LPOBJ:w,MOBJ:g,POBJ:y});null!=x&&(void 0!==x.obj&&(v=jQuery.extend(!0,v,x.obj)),void 0!==x.LOBJ&&(p=jQuery.extend(!0,p,x.LOBJ)),void 0!==x.LPOBJ&&(w=jQuery.extend(!0,w,x.LPOBJ)),void 0!==x.MOBJ&&(g=jQuery.extend(!0,g,x.MOBJ)),void 0!==x.POBJ)&&(y=jQuery.extend(!0,y,x.POBJ))}a=JSON.stringify(p),b=JSON.stringify(w),_=JSON.stringify(g),c=JSON.stringify(y),void 0===u.imgOBJ||void 0!==u.caches.imgOBJ&&u.caches.imgOBJ.width===u.imgOBJ.width&&u.caches.imgOBJ.height===u.imgOBJ.height&&u.caches.imgOBJ.left===u.imgOBJ.left&&u.caches.imgOBJ.right===u.imgOBJ.right&&u.caches.imgOBJ.top===u.imgOBJ.top&&u.caches.imgOBJ.bottom===u.imgOBJ.bottom||(u.caches.imgOBJ=Q.clone(u.imgOBJ),u.imgOBJ.position="relative",tpGS.gsap.set(u.img,u.imgOBJ)),void 0===u.mediaOBJ||void 0!==u.caches.mediaOBJ&&u.caches.mediaOBJ.width===u.mediaOBJ.width&&u.caches.mediaOBJ.height===u.mediaOBJ.height&&u.caches.mediaOBJ.display===u.mediaOBJ.display||(u.caches.mediaOBJ=Q.clone(u.mediaOBJ),u.media.css(u.mediaOBJ)),a!=Q[n].emptyObject&&a!=u.caches.LOBJ&&(tpGS.gsap.set(s,p),u.caches.LOBJ=a),void 0!==u.lp&&b!=Q[n].emptyObject&&b!=u.caches.LPOBJ&&(tpGS.gsap.set(u.lp,w),u.caches.LPOBJ=b),_!=Q[n].emptyObject&&_!=u.caches.MOBJ&&(tpGS.gsap.set(u.m,g),u.caches.MOBJ=_),c!=Q[n].emptyObject&&c!=u.caches.POBJ&&(tpGS.gsap.set(u.p,y),u.caches.POBJ=c,u.caches.POBJ_LEFT=y.left,u.caches.POBJ_TOP=y.top)}},C=function(e){var t,i={l:"none",lw:10,r:"none",rw:10};for(t in e=e.split(";"))if(e.hasOwnProperty(t)){var a=e[t].split(":");switch(a[0]){case"l":i.l=a[1];break;case"r":i.r=a[1];break;case"lw":i.lw=a[1];break;case"rw":i.rw=a[1]}}return"polygon("+r(i.l,0,parseFloat(i.lw))+","+r(i.r,100,100-parseFloat(i.rw),!0)+")"},r=function(e,t,i,a){switch(e){case"none":o=t+"% 100%,"+t+"% 0%";break;case"top":o=i+"% 100%,"+t+"% 0%";break;case"middle":o=i+"% 100%,"+t+"% 50%,"+i+"% 0%";break;case"bottom":o=t+"% 100%,"+i+"% 0%";break;case"two":o=i+"% 100%,"+t+"% 75%,"+i+"% 50%,"+t+"% 25%,"+i+"% 0%";break;case"three":o=t+"% 100%,"+i+"% 75%,"+t+"% 50%,"+i+"% 25%,"+t+"% 0%";break;case"four":o=t+"% 100%,"+i+"% 87.5%,"+t+"% 75%,"+i+"% 62.5%,"+t+"% 50%,"+i+"% 37.5%,"+t+"% 25%,"+i+"% 12.5%,"+t+"% 0%";break;case"five":o=t+"% 100%,"+i+"% 90%,"+t+"% 80%,"+i+"% 70%,"+t+"% 60%,"+i+"% 50%,"+t+"% 40%,"+i+"% 30%,"+t+"% 20%,"+i+"% 10%,"+t+"% 0%"}if(a){var r=o.split(","),o="";for(i in r)r.hasOwnProperty(i)&&(o+=r[r.length-1-i]+(i<r.length-1?",":""))}return o};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.layeranimation={loaded:!0,version:"6.6.17"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";jQuery.fn.revolution=jQuery.fn.revolution||{};var R=jQuery.fn.revolution;function g(e,t){e=new Object({single:".tp-"+t,c:R[e].cpar.find(".tp-"+t+"s")});return e.mask=e.c.find(".tp-"+t+"-mask"),e.wrap=e.c.find(".tp-"+t+"s-inner-wrapper"),e}jQuery.extend(!0,R,{hideUnHideNav:function(t){window.requestAnimationFrame(function(){var e=!1;f(R[t].navigation.arrows)&&(e=i(R[t].navigation.arrows,t,e)),f(R[t].navigation.bullets)&&(e=i(R[t].navigation.bullets,t,e)),f(R[t].navigation.thumbnails)&&(e=i(R[t].navigation.thumbnails,t,e)),(e=f(R[t].navigation.tabs)?i(R[t].navigation.tabs,t,e):e)&&R.manageNavigation(t)})},getOuterNavDimension:function(e){R[e].navigation.scaler=Math.max(0,Math.min(1,(R.winW-480)/500));var t={left:0,right:0,horizontal:0,vertical:0,top:0,bottom:0};return R[e].navigation.thumbnails&&R[e].navigation.thumbnails.enable&&(R[e].navigation.thumbnails.isVisible=R[e].navigation.thumbnails.hide_under<R[e].module.width&&R[e].navigation.thumbnails.hide_over>R[e].module.width,R[e].navigation.thumbnails.cw=Math.max(Math.round(R[e].navigation.thumbnails.width*R[e].navigation.scaler),R[e].navigation.thumbnails.min_width),R[e].navigation.thumbnails.ch=Math.round(R[e].navigation.thumbnails.cw/R[e].navigation.thumbnails.width*R[e].navigation.thumbnails.height),R[e].navigation.thumbnails.isVisible&&"outer-left"===R[e].navigation.thumbnails.position?t.left=R[e].navigation.thumbnails.cw+2*R[e].navigation.thumbnails.wrapper_padding:R[e].navigation.thumbnails.isVisible&&"outer-right"===R[e].navigation.thumbnails.position?t.right=R[e].navigation.thumbnails.cw+2*R[e].navigation.thumbnails.wrapper_padding:R[e].navigation.thumbnails.isVisible&&"outer-top"===R[e].navigation.thumbnails.position?t.top=R[e].navigation.thumbnails.ch+2*R[e].navigation.thumbnails.wrapper_padding:R[e].navigation.thumbnails.isVisible&&"outer-bottom"===R[e].navigation.thumbnails.position&&(t.bottom=R[e].navigation.thumbnails.ch+2*R[e].navigation.thumbnails.wrapper_padding)),R[e].navigation.tabs&&R[e].navigation.tabs.enable&&(R[e].navigation.tabs.isVisible=R[e].navigation.tabs.hide_under<R[e].module.width&&R[e].navigation.tabs.hide_over>R[e].module.width,R[e].navigation.tabs.cw=Math.max(Math.round(R[e].navigation.tabs.width*R[e].navigation.scaler),R[e].navigation.tabs.min_width),R[e].navigation.tabs.ch=Math.round(R[e].navigation.tabs.cw/R[e].navigation.tabs.width*R[e].navigation.tabs.height),R[e].navigation.tabs.isVisible&&"outer-left"===R[e].navigation.tabs.position?t.left+=R[e].navigation.tabs.cw+2*R[e].navigation.tabs.wrapper_padding:R[e].navigation.tabs.isVisible&&"outer-right"===R[e].navigation.tabs.position?t.right+=R[e].navigation.tabs.cw+2*R[e].navigation.tabs.wrapper_padding:R[e].navigation.tabs.isVisible&&"outer-top"===R[e].navigation.tabs.position?t.top+=R[e].navigation.tabs.ch+2*R[e].navigation.tabs.wrapper_padding:R[e].navigation.tabs.isVisible&&"outer-bottom"===R[e].navigation.tabs.position&&(t.bottom+=R[e].navigation.tabs.ch+2*R[e].navigation.tabs.wrapper_padding)),{left:t.left,right:t.right,horizontal:t.left+t.right,vertical:t.top+t.bottom,top:t.top,bottom:t.bottom}},resizeThumbsTabs:function(e,t){var i,a,r,o,s;return void 0!==R[e]&&R[e].navigation.use&&(R[e].navigation&&R[e].navigation.bullets.enable||R[e].navigation&&R[e].navigation.tabs.enable||R[e].navigation&&R[e].navigation.thumbnails.enable)&&(i=tpGS.gsap.timeline(),a=R[e].navigation.tabs,r=R[e].navigation.thumbnails,o=R[e].navigation.bullets,i.pause(),f(a)&&(t||a.width>a.min_width)&&d(e,i,R[e].c,a,R[e].slideamount,"tab"),f(r)&&(t||r.width>r.min_width)&&d(e,i,R[e].c,r,R[e].slideamount,"thumb",e),f(o)&&t&&(s=R[e].c.find(".tp-bullets")).find(".tp-bullet").each(function(e){var t=jQuery(this),e=e+1,i=t.outerWidth()+parseInt(void 0===o.space?0:o.space,0),a=t.outerHeight()+parseInt(void 0===o.space?0:o.space,0);"vertical"===o.direction?(t.css({top:(e-1)*a+"px",left:"0px"}),s.css({height:(e-1)*a+t.outerHeight(),width:t.outerWidth()})):(t.css({left:(e-1)*i+"px",top:"0px"}),s.css({width:(e-1)*i+t.outerWidth(),height:t.outerHeight()}))}),i.play()),!0},updateNavIndexes:function(e){var t=R[e].c;function i(e){0<t.find(e).lenght&&t.find(e).each(function(e){jQuery(this).data("liindex",e)})}i("rs-tab"),i("rs-bullet"),i("rs-thumb"),R.resizeThumbsTabs(e,!0),R.manageNavigation(e)},manageNavigation:function(e,t){R[e].navigation.use&&(f(R[e].navigation.bullets)&&("fullscreen"!=R[e].sliderLayout&&"fullwidth"!=R[e].sliderLayout&&(R[e].navigation.bullets.h_offset_old=void 0===R[e].navigation.bullets.h_offset_old?parseInt(R[e].navigation.bullets.h_offset,0):R[e].navigation.bullets.h_offset_old,R[e].navigation.bullets.h_offset="center"===R[e].navigation.bullets.h_align?R[e].navigation.bullets.h_offset_old+R[e].outNavDims.left/2-R[e].outNavDims.right/2:R[e].navigation.bullets.h_offset_old+R[e].outNavDims.left),_(R[e].navigation.bullets,e)),f(R[e].navigation.thumbnails)&&_(R[e].navigation.thumbnails,e),f(R[e].navigation.tabs)&&_(R[e].navigation.tabs,e),f(R[e].navigation.arrows)&&("fullscreen"!=R[e].sliderLayout&&"fullwidth"!=R[e].sliderLayout&&(R[e].navigation.arrows.left.h_offset_old=void 0===R[e].navigation.arrows.left.h_offset_old?parseInt(R[e].navigation.arrows.left.h_offset,0):R[e].navigation.arrows.left.h_offset_old,R[e].navigation.arrows.left.h_offset=(R[e].navigation.arrows.left.h_align,R[e].navigation.arrows.left.h_offset_old),R[e].navigation.arrows.right.h_offset_old=void 0===R[e].navigation.arrows.right.h_offset_old?parseInt(R[e].navigation.arrows.right.h_offset,0):R[e].navigation.arrows.right.h_offset_old,R[e].navigation.arrows.right.h_offset=(R[e].navigation.arrows.right.h_align,R[e].navigation.arrows.right.h_offset_old)),_(R[e].navigation.arrows.left,e),_(R[e].navigation.arrows.right,e)),!1!==t)&&(f(R[e].navigation.thumbnails)&&c(R[e].navigation.thumbnails,e),f(R[e].navigation.tabs))&&c(R[e].navigation.tabs,e)},showFirstTime:function(e){y(e),R.hideUnHideNav(e)},selectNavElement:function(e,t,i,a){for(var r=R[e].cpar[0].getElementsByClassName(i),o=0;o<r.length;o++)R.gA(r[o],"key")===t?(r[o].classList.add("selected"),void 0!==a&&a()):r[o].classList.remove("selected")},transferParams:function(e,t){if(void 0!==t)for(var i in t.params)e=e.replace(t.params[i].from,t.params[i].to);return e},updateNavElementContent:function(e,t,i,a,r){if(void 0!==R[e].pr_next_key||void 0!==R[e].pr_active_key){var o,s=void 0===R[e].pr_next_key?void 0===R[e].pr_cache_pr_next_key?R[e].pr_active_key:R[e].pr_cache_pr_next_key:R[e].pr_next_key,n=R.gA(R[e].slides[s],"key"),l=0,d=!1;for(o in i.enable&&R.selectNavElement(e,n,"tp-bullet"),a.enable&&R.selectNavElement(e,n,"tp-thumb",function(){c(a,e)}),r.enable&&R.selectNavElement(e,n,"tp-tab",function(){c(r,e)}),R[e].thumbs)l=!0===d?l:o,d=R[e].thumbs[o].id===n||o==n||d;s=0<(l=parseInt(l,0))?l-1:R[e].slideamount-1,i=l+1==R[e].slideamount?0:l+1;!0===t.enable&&t.pi!==s&&t.ni!==i&&(t.pi=s,t.ni=i,t.left.c[0].innerHTML=R.transferParams(t.tmp,R[e].thumbs[s]),i>R[e].slideamount||(t.right.c[0].innerHTML=R.transferParams(t.tmp,R[e].thumbs[i]),t.right.iholder=t.right.c.find(".tp-arr-imgholder"),t.left.iholder=t.left.c.find(".tp-arr-imgholder"),t.rtl?(void 0!==t.left.iholder[0]&&tpGS.gsap.set(t.left.iholder,{backgroundImage:"url("+R[e].thumbs[i].src+")"}),void 0!==R[e].thumbs[s]&&void 0!==t.right.iholder[0]&&tpGS.gsap.set(t.right.iholder,{backgroundImage:"url("+R[e].thumbs[s].src+")"})):(void 0!==R[e].thumbs[s]&&void 0!==t.left.iholder[0]&&tpGS.gsap.set(t.left.iholder,{backgroundImage:"url("+R[e].thumbs[s].src+")"}),void 0!==t.right.iholder[0]&&tpGS.gsap.set(t.right.iholder,{backgroundImage:"url("+R[e].thumbs[i].src+")"}))))}},createNavigation:function(t){var e,i,a,r=R[t].navigation.arrows,o=R[t].navigation.bullets,s=R[t].navigation.thumbnails,n=R[t].navigation.tabs,l=f(r),d=f(o),c=f(s),p=f(n);for(e in u(t),h(t),l&&(b(r,t),r.c=R[t].cpar.find(".tparrows")),R[t].slides)R[t].slides.hasOwnProperty(e)&&"true"!=R.gA(R[t].slides[e],"not_in_nav")&&(i=jQuery(R[t].slides[R[t].slides.length-1-e]),a=jQuery(R[t].slides[e]),d&&(R[t].navigation.bullets.rtl?S(R[t].c,o,i,t):S(R[t].c,o,a,t)),c&&(R[t].navigation.thumbnails.rtl?x(R[t].c,s,i,"tp-thumb",t):x(R[t].c,s,a,"tp-thumb",t)),p)&&(R[t].navigation.tabs.rtl?x(R[t].c,n,i,"tp-tab",t):x(R[t].c,n,a,"tp-tab",t));d&&_(o,t),c&&_(s,t),p&&_(n,t),(c||p)&&R.updateDims(t),R[t].navigation.createNavigationDone=!0,c&&jQuery.extend(!0,s,g(t,"thumb")),p&&jQuery.extend(!0,n,g(t,"tab")),R[t].c.on("revolution.slide.onafterswap revolution.nextslide.waiting",function(){R.updateNavElementContent(t,r,o,s,n)}),v(r),v(o),v(s),v(n),R[t].cpar.on(R.ISM?"touchstart touchmove":"mouseenter mousemove",function(e){void 0!==e.target&&void 0!==e.target.className&&"string"==typeof e.target.className&&0<=e.target.className.indexOf("rs-waction")||!0!==R[t].tpMouseOver&&R[t].firstSlideAvailable&&(R[t].tpMouseOver=!0,y(t),R.ISM)&&!0!==R[t].someNavIsDragged&&(I(R[t].hideAllNavElementTimer),R[t].hideAllNavElementTimer=setTimeout(function(){R[t].tpMouseOver=!1,w(t)},150))}),R[t].cpar.on(R.ISM?"touchend":"mouseleave ",function(){R[t].tpMouseOver=!1,w(t)}),(c||p||"carousel"===R[t].sliderType||R[t].navigation.touch.touchOnDesktop||R[t].navigation.touch.touchenabled&&R.ISM)&&m(t),R[t].navigation.initialised=!0,R.updateNavElementContent(t,r,o,s,n),R.showFirstTime(t)}});function L(e,t){var i,a=!1;for(i in void 0!==t.path&&!R.ISM||(a=r(t.target,e)),t.path)t.path.hasOwnProperty(i)&&t.path[i].tagName===e&&(a=!0);return a}function n(e,t,i,a){var a=void 0===a?e.outerHeight(!0):a,r=null==R[i]?0:(0==R[i].canv.height?R[i].module:R[i].canv).height,r="layergrid"==t.container?"fullscreen"==R[i].sliderLayout?R[i].module.height/2-R[i].gridheight[R[i].level]*R[i].CM.h/2:R[i].autoHeight||null!=R[i].minHeight&&0<R[i].minHeight?r/2-R[i].gridheight[R[i].level]*R[i].CM.h/2:0:0,i="top"===t.v_align?{top:"0px",y:Math.round(t.v_offset+r)+"px"}:"center"===t.v_align?{top:"50%",y:Math.round(0-a/2+t.v_offset)+"px"}:{top:"100%",y:Math.round(0-(a+t.v_offset+r))+"px"};e.hasClass("outer-bottom")||tpGS.gsap.set(e,i)}function l(e,t,i,a){a=void 0===a?e.outerWidth():a,i="layergrid"===t.container?R[i].module.width/2-R[i].gridwidth[R[i].level]*R[i].CM.w/2:0,a="left"===t.h_align?{left:"0px",x:Math.round(t.h_offset+i)+"px"}:"center"===t.h_align?{left:"50%",x:Math.round(0-a/2+t.h_offset)+"px"}:{left:"100%",x:Math.round(0-(a+t.h_offset+i))+"px"},tpGS.gsap.set(e,a)}var c=function(e,t){var i,a,r,o,s,n,l;void 0===e||null==e.mask||(i="vertical"===e.direction?e.mask.find(e.single).first().outerHeight(!0)+e.space:e.mask.find(e.single).first().outerWidth(!0)+e.space,a="vertical"===e.direction?e.mask.height():e.mask.width(),o=e.mask.find(e.single+".selected").data("liindex"),o=0<(o=void 0===(o=e.rtl?R[t].slideamount-o:o)?0:o)&&1===R[t].sdir&&1<e.visibleAmount?o-1:o,t=a/i,r="vertical"===e.direction?e.mask.height():e.mask.width(),n=(o=0-o*i)<0-((s="vertical"===e.direction?e.wrap.height():e.wrap.width())-r)?0-(s-r):o,l=void 0===(l=R.gA(e.wrap[0],"offset"))?0:l,2<t&&(n=o-(l+i)<=0?o-(l+i)<0-i?l:n+i:n,n=o-i+l+a<i&&o+(Math.round(t)-2)*i<l?o+(Math.round(t)-2)*i:n),n="vertical"!==e.direction&&e.mask.width()>=e.wrap.width()||"vertical"===e.direction&&e.mask.height()>=e.wrap.height()?0:n<0-(s-r)?0-(s-r):0<n?0:n,e.c.hasClass("dragged"))||("vertical"===e.direction?e.wrap.data("tmmove",tpGS.gsap.to(e.wrap,.5,{top:n+"px",ease:"power3.inOut"})):e.wrap.data("tmmove",tpGS.gsap.to(e.wrap,.5,{left:n+"px",ease:"power3.inOut"})),e.wrap.data("offset",n))},d=function(e,i,t,a,r,o){var t=t.parent().find(".tp-"+o+"s"),s=t.find(".tp-"+o+"s-inner-wrapper"),n=t.find(".tp-"+o+"-mask"),l="vertical"===a.direction?a.cw:a.cw*r+parseFloat(a.space)*(r-1),r="vertical"===a.direction?a.ch*r+parseInt(a.space)*(r-1):a.ch,d="vertical"===a.direction?{width:a.cw+"px"}:{height:a.ch+"px"},t=(i.add(tpGS.gsap.set(t,d)),i.add(tpGS.gsap.set(s,{width:l+"px",height:r+"px"})),"horizontal"===a.direction?(t=Math.min(l,a.cw*a.visibleAmount+parseFloat(a.space)*(a.visibleAmount-1)),i.add(tpGS.gsap.set(n,{width:t+"px",height:r+"px"}))):(d=Math.min(r,a.ch*a.visibleAmount+parseFloat(a.space)*(a.visibleAmount-1)),i.add(tpGS.gsap.set(n,{width:l+"px",height:d+"px"}))),null!==s.outerWidth()&&(R[e].thumbResized=!0),s.find(".tp-"+o));return t&&jQuery.each(t,function(e,t){"vertical"===a.direction?i.add(tpGS.gsap.set(t,{top:e*(a.ch+parseInt(void 0===a.space?0:a.space,0)),width:a.cw+"px",height:a.ch+"px"})):"horizontal"===a.direction&&i.add(tpGS.gsap.set(t,{left:e*(a.cw+parseInt(void 0===a.space?0:a.space,0)),width:a.cw+"px",height:a.ch+"px"}))}),i},u=function(t){!0===R[t].navigation.keyboardNavigation&&R.document.on("keydown",function(e){if("horizontal"==R[t].navigation.keyboard_direction&&39==e.keyCode||"vertical"==R[t].navigation.keyboard_direction&&40==e.keyCode){if(void 0!==R[t].keydown_time_stamp&&(new Date).getTime()-R[t].keydown_time_stamp<1e3)return;R[t].sc_indicator="arrow",R[t].sc_indicator_dir=0,"carousel"===R[t].sliderType&&(R[t].ctNavElement=!0),R.callingNewSlide(t,1,"carousel"===R[t].sliderType)}if("horizontal"==R[t].navigation.keyboard_direction&&37==e.keyCode||"vertical"==R[t].navigation.keyboard_direction&&38==e.keyCode){if(void 0!==R[t].keydown_time_stamp&&(new Date).getTime()-R[t].keydown_time_stamp<1e3)return;R[t].sc_indicator="arrow",R[t].sc_indicator_dir=1,"carousel"===R[t].sliderType&&(R[t].ctNavElement=!0),R.callingNewSlide(t,-1,"carousel"===R[t].sliderType)}R[t].keydown_time_stamp=(new Date).getTime()})},h=function(d){R[d].carousel.scrollTicker=R.carScrollTicker.bind(window,d),!0!==R[d].navigation.mouseScrollNavigation&&"on"!==R[d].navigation.mouseScrollNavigation&&"carousel"!==R[d].navigation.mouseScrollNavigation||R[d].c[0].addEventListener("wheel",function(e){var t=function(e){var t=0;return"deltaY"in e||"deltaX"in e?t=0!=e.deltaY&&-0!=e.deltaY||!(e.deltaX<0||0<e.deltaX)?e.deltaY:e.deltaX:("detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120)),(300<(t=navigator.userAgent.match(/mozilla/i)?10*t:t)||t<-300)&&(t/=10),t}(e),i=!1,a=0==R[d].pr_active_key||0==R[d].pr_processing_key,r=R[d].pr_active_key==R[d].slideamount-1||R[d].pr_processing_key==R[d].slideamount-1,o=(void 0!==R[d].topc?R[d].topc:0===R[d].canv.height?R[d].cpar:R[d].c)[0].getBoundingClientRect(),s=0<=o.top&&o.bottom<=R.winH?1:0<=o.top&&o.bottom>=R.winH?(R.winH-Math.round(o.top))/o.height:o.top<=0&&o.bottom<=R.winH?Math.round(o.bottom)/o.height:1,t=t<0?-1:1,n=R[d].navigation.wheelViewPort;s=Math.round(100*s)/100,"reverse"==R[d].navigation.mouseScrollReverse&&(l=r,r=a,a=l);{var l;!(n-s<=R[d].navigation.threshold/100)||n<=s||0<=o.top&&-1==t||o.top<=0&&1==t||(e.preventDefault(),R[d].mScrollTween)||(l="window"!==R[d].navigation.target&&R[d].navigation.target?R[d].navigation.target:window,R[d].mScrollTween=tpGS.gsap.to(l,{duration:jQuery.fn.revolution.isWebkit()?.1:.7,scrollTo:{y:R[d].topc},ease:"power2.out",onComplete:function(){R[d].mScrollTween.kill(),delete R[d].mScrollTween}}))}if(Math.abs(s-n)<.1||n<=s)return R[d].sc_indicator_dir="reverse"===R[d].navigation.mouseScrollReverse&&t<0||"reverse"!==R[d].navigation.mouseScrollReverse&&0<t?"reverse"!==R[d].navigation.mouseScrollReverse?0:1:"reverse"!==R[d].navigation.mouseScrollReverse?1:0,"carousel"==R[d].navigation.mouseScrollNavigation||0===R[d].sc_indicator_dir&&!r||1===R[d].sc_indicator_dir&&!a?void 0===R[d].pr_processing_key&&!0!==R[d].justmouseScrolled&&(R[d].sc_indicator="arrow","carousel"===R[d].sliderType&&(R[d].ctNavElement=!0),R.callingNewSlide(d,0===R[d].sc_indicator_dir?"reverse"===R[d].navigation.mouseScrollReverse?-1:1:"reverse"===R[d].navigation.mouseScrollReverse?1:-1,"carousel"===R[d].sliderType),R[d].justmouseScrolled=!0,setTimeout(function(){R[d].justmouseScrolled=!1},R[d].navigation.wheelCallDelay)):!0!==R[d].justmouseScrolled&&(i=!0),!!i||(e.preventDefault(e),!1)},{passive:!1})},r=function(e,t){for(;e&&e!==document;e=e.parentNode)if(e.tagName===t)return e;return!1},m=function(x){var t,e,k=R[x].carousel,O=R.is_android();jQuery(".bullet, .bullets, .tp-bullets, .tparrows").addClass("noSwipe"),R[x].navigation.touch=void 0===R[x].navigation.touch?{}:R[x].navigation.touch,R[x].navigation.touch.swipe_direction=void 0===R[x].navigation.touch.swipe_direction?"horizontal":R[x].navigation.touch.swipe_direction,R[x].cpar.find(".rs-nav-element").rsswipe({allowPageScroll:"vertical",triggerOnTouchLeave:!0,treshold:R[x].navigation.touch.swipe_treshold,fingers:5<R[x].navigation.touch.swipe_min_touches?1:R[x].navigation.touch.swipe_min_touches,excludedElements:"button, input, select, textarea, .noSwipe, .rs-waction",tap:function(e,t){var i;(void 0!==(i=void 0!==t?jQuery(t).closest("rs-thumb"):i)&&0<i.length||0<(i=jQuery(t).closest("rs-tab")).length||0<(i=jQuery(t).closest("rs-bullet")).length)&&i.trigger("click")},swipeStatus:function(e,t,i,a,r,o,s){if("start"!==t&&"move"!==t&&"end"!==t&&"cancel"!=t)return!0;var n=L("RS-THUMB",e),l=L("RS-TAB",e),d=(!1===n&&!1===l&&!0!==(n="RS-THUMBS-WRAP"===e.target.tagName||"RS-THUMBS"===e.target.tagName||0<=e.target.className.indexOf("tp-thumb-mask"))&&("RS-TABS-WRAP"!==e.target.tagName&&"RS-TABS"!==e.target.tagName&&e.target.className.indexOf("tp-tab-mask")),"start"===t?0:O?s[0].end.x-s[0].start.x:e.pageX-k.screenX),c="start"===t?0:O?s[0].end.y-s[0].start.y:e.pageY-k.screenY,p=n?".tp-thumbs":".tp-tabs",l=n?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",g=n?".tp-thumb":".tp-tab",u=n?R[x].navigation.thumbnails:R[x].navigation.tabs,h=R[x].cpar.find(n?".tp-thumb-mask":".tp-tab-mask"),m=h.find(l),v=u.direction,f="vertical"===v?m.height():m.width(),y="vertical"===v?h.height():h.width(),w="vertical"===v?h.find(g).first().outerHeight(!0)+parseFloat(u.space):h.find(g).first().outerWidth(!0)+parseFloat(u.space),b=void 0===m.data("offset")?0:parseInt(m.data("offset"),0),_=0;switch(t){case"start":"vertical"===v&&e.preventDefault(),k.screenX=O?s[0].end.x:e.pageX,k.screenY=O?s[0].end.y:e.pageY,R[x].cpar.find(p).addClass("dragged"),b="vertical"===v?m.position().top:m.position().left,m.data("offset",b),m.data("tmmove")&&m.data("tmmove").pause(),R[x].someNavIsDragged=!0,M(x);break;case"move":if(f<=y)return!1;var _=0<(_=b+("vertical"===v?c:d))?"horizontal"===v?_-m.width()*(_/m.width()*_/m.width()):_-m.height()*(_/m.height()*_/m.height()):_,S="vertical"===v?0-(m.height()-h.height()):0-(m.width()-h.width());_=_<S?"horizontal"===v?_+m.width()*(_-S)/m.width()*(_-S)/m.width():_+m.height()*(_-S)/m.height()*(_-S)/m.height():_,"vertical"===v?tpGS.gsap.set(m,{top:_+"px"}):tpGS.gsap.set(m,{left:_+"px"}),I(R[x].hideAllNavElementTimer);break;case"end":case"cancel":return R[x].navigation.draggable&&R[x].navigation.draggable.enable&&R[x].navigation.draggable.enable(),k.draggable&&k.draggable.enable&&k.draggable.enable(),_=b+("vertical"===v?c:d),_=0<(_="vertical"===v?_<0-(m.height()-h.height())?0-(m.height()-h.height()):_:_<0-(m.width()-h.width())?0-(m.width()-h.width()):_)?0:_,_=Math.abs(a)>w/10?a<=0?Math.floor(_/w)*w:Math.ceil(_/w)*w:a<0?Math.ceil(_/w)*w:Math.floor(_/w)*w,_=0<(_="vertical"===v?_<0-(m.height()-h.height())?0-(m.height()-h.height()):_:_<0-(m.width()-h.width())?0-(m.width()-h.width()):_)?0:_,"vertical"===v?tpGS.gsap.to(m,.5,{top:_+"px",ease:"power3.out"}):tpGS.gsap.to(m,.5,{left:_+"px",ease:"power3.out"}),_=_||("vertical"===v?m.position().top:m.position().left),m.data("offset",_),m.data("distance",a),R[x].cpar.find(p).removeClass("dragged"),!(R[x].someNavIsDragged=!1)}}}),"carousel"===R[x].sliderType&&R.setupCarousel(x),"carousel"!==R[x].sliderType&&(R.ISM&&R[x].navigation.touch.touchenabled||!0!==R.ISM&&R[x].navigation.touch.touchOnDesktop)&&(R[x].navigation.proxy=document.createElement("div"),t=R[x].navigation,e={trigger:R[x].c[0],type:"horizontal"===R[x].navigation.touch.swipe_direction?"x":"y",cursor:"pointer",lockAxis:!0,onPress:function(e){R.closestClass(e.target,"rs-nav-element")&&(R[x].navigation.draggable.endDrag(),R[x].navigation.draggable.disable()),t.touch.pressX=e.pageX,t.touch.pressY=e.pageY},onDragStart:function(){var e=void 0!==R[x].pr_processing_key?R[x].pr_processing_key:void 0===R[x].pr_active_key?0:R[x].pr_active_key;"up"===this.getDirection()&&e==R[x].slideamount-1||"down"===this.getDirection()&&0===e?t.forceScroll=!0:t.forceScroll=!1},onDragEnd:function(e){R[x].sc_indicator="arrow";var t=this.getDirection(),i=R[x].navigation;if(Math.abs(e.pageY-i.touch.pressY)>Math.abs(e.pageX-i.touch.pressX)){if("right"===t||"left"===t)return}else if(Math.abs(e.pageY-i.touch.pressY)>Math.abs(e.pageX-i.touch.pressX)&&("up"===t||"down"===t))return;if(!i.forceScroll)return"horizontal"==R[x].navigation.touch.swipe_direction&&"left"==t||"vertical"==R[x].navigation.touch.swipe_direction&&"up"==t?(R[x].sc_indicator_dir=0,R.callingNewSlide(x,1),!1):"horizontal"==R[x].navigation.touch.swipe_direction&&"right"==t||"vertical"==R[x].navigation.touch.swipe_direction&&"down"==t?(R[x].sc_indicator_dir=1,R.callingNewSlide(x,-1),!1):void 0;e="up"===this.getDirection()?R[x].cpar.offset().top+R[x].module.height:R.document.scrollTop()-(window.innerHeight-R[x].cpar[0].getBoundingClientRect().top),R[x].modal.useAsModal||tpGS.gsap.to([window,"body"],{scrollTo:e})}},t.touch.drag_block_vertical||(R.ISM&&(e.allowContextMenu=!0),e.allowEventDefault=!0),R[x].navigation.draggable=tpGS.draggable.create(R[x].navigation.proxy,e)),"carousel"===R[x].sliderType&&(R.ISM&&0==R[x].navigation.touch.mobileCarousel||!0!==R.ISM&&!1===R[x].navigation.touch.desktopCarousel)&&k.wrap.addClass("noswipe"),R[x].navigation.touch.drag_block_vertical&&R[x].c.addClass("disableVerticalScroll")},v=function(e){e.hide_delay=R.isNumeric(parseInt(e.hide_delay,0))?e.hide_delay:.2,e.hide_delay_mobile=R.isNumeric(parseInt(e.hide_delay_mobile,0))?e.hide_delay_mobile:.2},f=function(e){return e&&e.enable},I=function(e){clearTimeout(e)},y=function(t){var e,i=R[t].navigation.maintypes;for(e in i)i.hasOwnProperty(e)&&f(R[t].navigation[i[e]])&&void 0!==R[t].navigation[i[e]].c&&(I(R[t].navigation[i[e]].showCall),R[t].navigation[i[e]].showCall=setTimeout(function(e){I(e.hideCall),e.hide_onleave&&!0!==R[t].tpMouseOver||(void 0===e.tween?e.tween=a(e):e.tween.play())},R[t].navigation[i[e]].hide_onleave&&!0!==R[t].tpMouseOver?0:parseInt(R[t].navigation[i[e]].animDelay),R[t].navigation[i[e]]))},M=function(e){var t,i=R[e].navigation.maintypes;for(t in i)i.hasOwnProperty(t)&&void 0!==R[e].navigation[i[t]]&&R[e].navigation[i[t]].hide_onleave&&f(R[e].navigation[i[t]])&&I(R[e].navigation[i[t]].hideCall)},w=function(e,t){var i,a=R[e].navigation.maintypes;for(i in a)a.hasOwnProperty(i)&&void 0!==R[e].navigation[a[i]]&&R[e].navigation[a[i]].hide_onleave&&f(R[e].navigation[a[i]])&&(I(R[e].navigation[a[i]].hideCall),R[e].navigation[a[i]].hideCall=setTimeout(function(e){I(e.showCall),e.tween&&e.tween.reverse()},R.ISM?parseInt(R[e].navigation[a[i]].hide_delay_mobile,0):parseInt(R[e].navigation[a[i]].hide_delay,0),R[e].navigation[a[i]]))},a=function(e){e.speed=void 0===e.animSpeed?.5:e.animSpeed,e.anims=[],void 0!==e.anim&&void 0===e.left&&e.anims.push(e.anim),void 0!==e.left&&e.anims.push(e.left.anim),void 0!==e.right&&e.anims.push(e.right.anim);var t,i=tpGS.gsap.timeline();for(t in i.add(tpGS.gsap.to(e.c,e.speed,{delay:e.animDelay,opacity:1,ease:"power3.inOut"}),0),e.anims)if(e.anims.hasOwnProperty(t))switch(e.anims[t]){case"left":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{marginLeft:-50},{delay:e.animDelay,marginLeft:"0px",ease:"power3.inOut"}),0);break;case"right":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{marginLeft:50},{delay:e.animDelay,marginLeft:"0px",ease:"power3.inOut"}),0);break;case"top":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{marginTop:-50},{delay:e.animDelay,marginTop:"0px",ease:"power3.inOut"}),0);break;case"bottom":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{marginTop:50},{delay:e.animDelay,marginTop:"0px",ease:"power3.inOut"}),0);break;case"zoomin":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{scale:.5},{delay:e.animDelay,scale:1,ease:"power3.inOut"}),0);break;case"zoomout":i.add(tpGS.gsap.fromTo(e.c[t],e.speed,{scale:1.2},{delay:e.animDelay,scale:1,ease:"power3.inOut"}),0)}return i.play(),i},b=function(e,t){e.style=void 0===e.style?"":e.style,e.left.style=void 0===e.left.style?"":e.left.style,e.right.style=void 0===e.right.style?"":e.right.style,void 0===e.left.c&&(e.left.c=jQuery('<rs-arrow style="opacity:0" class="tp-leftarrow tparrows '+e.style+" "+e.left.style+'">'+e.tmp+"</rs-arrow>"),R[t].c.append(e.left.c)),void 0===e.right.c&&(e.right.c=jQuery('<rs-arrow style="opacity:0"  class="tp-rightarrow tparrows '+e.style+" "+e.right.style+'">'+e.tmp+"</rs-arrow>"),R[t].c.append(e.right.c)),e[e.rtl?"left":"right"].c.on("click",function(){"carousel"===R[t].sliderType&&(R[t].ctNavElement=!0),R[t].sc_indicator="arrow",R[t].sc_indicator_dir=0,R[t].c.revnext()}),e[e.rtl?"right":"left"].c.on("click",function(){"carousel"===R[t].sliderType&&(R[t].ctNavElement=!0),R[t].sc_indicator="arrow",R[t].sc_indicator_dir=1,R[t].c.revprev()}),e.padding_top=parseInt(R[t].carousel.padding_top||0,0),e.padding_bottom=parseInt(R[t].carousel.padding_bottom||0,0),_(e.left,t),_(e.right,t),"outer-left"!=e.position&&"outer-right"!=e.position||(R[t].outernav=!0)},_=function(e,t){var i,a,r,o,s;null==e||void 0===e.c||(i=("fullwidth"==R[t].sliderLayout||"fullscreen"==R[t].sliderLayout?R[t].module:R[t].canv).width,r=e.c.outerWidth(),a=e.c.outerHeight(),r<=0)||a<=0||(n(e.c,e,t,a),l(e.c,e,t,r),"outer-left"===e.position?tpGS.gsap.set(e.c,{left:0-r+"px",x:e.h_offset+"px"}):"outer-right"===e.position&&tpGS.gsap.set(e.c,{right:0-r+"px",x:e.h_offset+"px"}),"tp-thumb"!==e.type&&"tp-tab"!==e.type)||(a=parseInt(e.padding_top||0,0),r=parseInt(e.padding_bottom||0,0),o={},s={},e.maxw>i&&"outer-left"!==e.position&&"outer-right"!==e.position?(o.left="0px",o.x=0,o.maxWidth=i-2*e.wpad+"px",s.maxWidth=i-2*e.wpad+"px"):(o.maxWidth=e.maxw,s.maxWidth=i+"px"),e.maxh+2*e.wpad>R[t].conh&&"outer-bottom"!==e.position&&"outer-top"!==e.position?(o.top="0px",o.y=0,o.maxHeight=a+r+(R[t].conh-2*e.wpad)+"px",s.maxHeight=a+r+(R[t].conh-2*e.wpad)+"px"):(o.maxHeight=e.maxh+"px",s.maxHeight=e.maxh+"px"),e.mask=void 0===e.mask?e.c.find("rs-navmask"):e.mask,(0<e.mhoff||0<e.mvoff)&&(s.padding=e.mvoff+"px "+e.mhoff+"px"),e.span?("layergrid"==e.container&&"outer-left"!==e.position&&"outer-right"!==e.position&&(a=r=0),"vertical"===e.direction?(o.maxHeight=a+r+(R[t].conh-2*e.wpad)+"px",o.height=a+r+(R[t].conh-2*e.wpad)+"px",o.top=0,o.y=0,s.maxHeight=a+r+Math.min(e.maxh,R[t].conh-2*e.wpad)+"px",tpGS.gsap.set(e.c,o),tpGS.gsap.set(e.mask,s),n(e.mask,e,t)):"horizontal"===e.direction&&(o.maxWidth="100%",o.width=i-2*e.wpad+"px",o.left=0,o.x=0,s.maxWidth=e.maxw>=i?"100%":Math.min(e.maxw,i)+"px",tpGS.gsap.set(e.c,o),tpGS.gsap.set(e.mask,s),l(e.mask,e,t))):(tpGS.gsap.set(e.c,o),tpGS.gsap.set(e.mask,s)))},S=function(e,t,i,a){0===e.find(".tp-bullets").length&&(t.style=void 0===t.style?"":t.style,t.c=jQuery('<rs-bullets style="opacity:0"  class="tp-bullets '+t.style+" "+t.direction+" nav-pos-hor-"+t.h_align+" nav-pos-ver-"+t.v_align+" nav-dir-"+t.direction+'"></rs-bullets>'));var r=i.data("key"),o=t.tmp,s=(void 0!==R[a].thumbs[i.index()]&&jQuery.each(R[a].thumbs[i.index()].params,function(e,t){o=o.replace(t.from,t.to)}),jQuery('<rs-bullet data-key="'+r+'" class="tp-bullet">'+o+"</rs-bullet>")),i=(void 0!==R[a].thumbs[i.index()]&&s.find(".tp-bullet-image").css({backgroundImage:"url("+R[a].thumbs[i.index()].src+")"}),t.c.append(s),e.append(t.c),t.c.find(".tp-bullet").length),n=s.outerWidth(),l=s.outerHeight(),d=n+parseInt(void 0===t.space?0:t.space,0),c=l+parseInt(void 0===t.space?0:t.space,0);"vertical"===t.direction?(s.css({top:(i-1)*c+"px",left:"0px"}),t.c.css({height:(i-1)*c+l,width:n})):(s.css({left:(i-1)*d+"px",top:"0px"}),t.c.css({width:(i-1)*d+n,height:l})),s.on("click",function(){"carousel"===R[a].sliderType&&(R[a].ctNavElement=!0),R[a].sc_indicator="bullet",e.revcallslidewithid(r),e.find(".tp-bullet").removeClass("selected"),jQuery(this).addClass("selected")}),t.padding_top=parseInt(R[a].carousel.padding_top||0,0),t.padding_bottom=parseInt(R[a].carousel.padding_bottom||0,0),"outer-left"!=t.position&&"outer-right"!=t.position||(R[a].outernav=!0)},x=function(t,e,i,a,r){var o="tp-thumb"===a?".tp-thumbs":".tp-tabs",s="tp-thumb"===a?".tp-thumb-mask":".tp-tab-mask",n="tp-thumb"===a?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",l="tp-thumb"===a?".tp-thumb":".tp-tab",d="tp-thumb"===a?".tp-thumb-image":".tp-tab-image",c="tp-thumb"===a?"rs-thumb":"rs-tab",p=(e.type=a,e.visibleAmount=e.visibleAmount>R[r].slideamount?R[r].slideamount:e.visibleAmount,e.sliderLayout=R[r].sliderLayout,void 0===e.c&&(e.wpad=e.wrapper_padding,e.c=jQuery("<"+c+'s style="opacity:0" class="nav-dir-'+e.direction+" nav-pos-ver-"+e.v_align+" nav-pos-hor-"+e.h_align+" rs-nav-element "+a+"s "+(!0===e.span?"tp-span-wrapper":"")+" "+e.position+" "+(void 0===e.style?"":e.style)+'"><rs-navmask class="'+a+'-mask" style="overflow:hidden;position:relative"><'+c+'s-wrap class="'+a+'s-inner-wrapper" style="position:relative;"></'+c+"s-wrap></rs-navmask></"+c+"s>"),e.c.css({overflow:"visible",position:"outer-top"===e.position||"outer-bottom"===e.position?"relative":"absolute",background:e.wrapper_color,padding:e.wpad+"px",boxSizing:"contet-box"}),"outer-top"===e.position?t.parent().prepend(e.c):"outer-bottom"===e.position?t.after(e.c):t.append(e.c),"outer-left"!==e.position&&"outer-right"!==e.position||tpGS.gsap.set(R[r].c,{overflow:"visible"}),e.padding_top=parseInt(R[r].carousel.padding_top||0,0),e.padding_bottom=parseInt(R[r].carousel.padding_bottom||0,0),"outer-left"!=e.position&&"outer-right"!=e.position||(R[r].outernav=!0)),i.data("key")),s=e.c.find(s),g=s.find(n),u=e.tmp,a=(e.space=parseFloat(e.space)||0,e.maxw="horizontal"===e.direction?e.width*e.visibleAmount+e.space*(e.visibleAmount-1):e.width,e.maxh="horizontal"===e.direction?e.height:e.height*e.visibleAmount+e.space*(e.visibleAmount-1),e.maxw+=2*e.mhoff,e.maxh+=2*e.mvoff,void 0!==R[r].thumbs[i.index()]&&jQuery.each(R[r].thumbs[i.index()].params,function(e,t){u=u.replace(t.from,t.to)}),jQuery("<"+c+' data-liindex="'+i.index()+'" data-key="'+p+'" class="'+a+'" style="width:'+e.width+"px;height:"+e.height+'px;">'+u+"<"+c+">")),c=(void 0!==R[r].thumbs[i.index()]&&a.find(d).css({backgroundImage:"url("+R[r].thumbs[i.index()].src+")"}),g.append(a),e.c.find(l).length),d=a.outerWidth(),i=a.outerHeight(),l=d+parseInt(void 0===e.space?0:e.space,0),h=i+parseInt(void 0===e.space?0:e.space,0);"vertical"===e.direction?(a.css({top:(c-1)*h+"px",left:"0px"}),g.css({height:(c-1)*h+i,width:d})):(a.css({left:(c-1)*l+"px",top:"0px"}),g.css({width:(c-1)*l+d,height:i})),s.css({maxWidth:e.maxw+"px",maxHeight:e.maxh+"px"}),e.c.css({maxWidth:e.maxw+"px",maxHeight:e.maxh+"px"}),a.on("click",function(){R[r].sc_indicator="bullet","carousel"===R[r].sliderType&&(R[r].ctNavElement=!0);var e=void 0===(e=t.parent().find(n).data("distance"))?0:e;Math.abs(e)<10&&(t.revcallslidewithid(p),t.parent().find(o).removeClass("selected"),jQuery(this).addClass("selected"))})},i=function(e,t,i){return null!=e&&void 0!==e.c&&(e.hide_under>R[t].canv.width||R[t].canv.width>e.hide_over?(!0!==e.tpForceNotVisible&&(e.c.addClass("tp-forcenotvisible"),i=!(e.isVisible=!1)),e.tpForceNotVisible=!0):(!1!==e.tpForceNotVisible&&(e.c.removeClass("tp-forcenotvisible"),i=e.isVisible=!0),e.tpForceNotVisible=!1)),i};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.navigation={loaded:!0,version:"6.6.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";window._R_is_Editor?RVS._R=void 0===RVS._R?{}:RVS._R:window._R_is_Editor=!1,jQuery.fn.revolution=jQuery.fn.revolution||{};var p=_R_is_Editor?RVS._R:jQuery.fn.revolution;jQuery.extend(!0,p,{bgW:function(e,t){return _R_is_Editor?RVS.RMD.width:"carousel"===p[e].sliderType?p[e].justifyCarousel?p[e].carousel.slide_widths[void 0!==t?t:p[e].carousel.focused]:p[e].carousel.slide_width:p[e].module.width},bgH:function(e,t){return _R_is_Editor?RVS.RMD.height:"carousel"===p[e].sliderType?p[e].carousel.slide_height:p[e].module.height},getPZSides:function(e,t,i,a,r,o,s){e*=i,t*=i,i=Math.abs(a-e),a=Math.abs(r-t),r=new Object;return r.l=(0-o)*i,r.r=r.l+e,r.t=(0-s)*a,r.b=r.t+t,r.h=o,r.v=s,r},getPZCorners:function(e,t,i,a){var e=e.bgposition.split(" ")||"center center",r="center"==e[0]?"50%":"left"==e[0]||"left"==e[1]?"0%":"right"==e[0]||"right"==e[1]?"100%":e[0],e="center"==e[1]?"50%":"top"==e[0]||"top"==e[1]?"0%":"bottom"==e[0]||"bottom"==e[1]?"100%":e[1],r=parseInt(r,0)/100||0,e=parseInt(e,0)/100||0,o=new Object;return o.start=p.getPZSides(a.start.width,a.start.height,a.start.scale,t,i,r,e),o.end=p.getPZSides(a.start.width,a.start.height,a.end.scale,t,i,r,e),o},getPZValues:function(e){var t,i=e.panzoom.split(";"),a={duration:10,ease:"none",scalestart:1,scaleend:1,rotatestart:.01,rotateend:0,blurstart:0,blurend:0,offsetstart:"0/0",offsetend:"0/0"};for(t in i)if(i.hasOwnProperty(t)){var r=i[t].split(":"),o=r[0],s=r[1];switch(o){case"d":a.duration=parseInt(s,0)/1e3;break;case"e":a.ease=s;break;case"ss":a.scalestart=parseInt(s,0)/100;break;case"se":a.scaleend=parseInt(s,0)/100;break;case"rs":a.rotatestart=parseInt(s,0);break;case"re":a.rotateend=parseInt(s,0);break;case"bs":a.blurstart=parseInt(s,0);break;case"be":a.blurend=parseInt(s,0);break;case"os":a.offsetstart=s;break;case"oe":a.offsetend=s}}return a.offsetstart=a.offsetstart.split("/")||[0,0],a.offsetend=a.offsetend.split("/")||[0,0],a.rotatestart=0===a.rotatestart?.01:a.rotatestart,e.panvalues=a,e.bgposition="center center"==e.bgposition?"50% 50%":e.bgposition,a},pzCalcL:function(e,t,i){var a,r,o,s=void 0===i.panvalues?jQuery.extend(!0,{},p.getPZValues(i)):jQuery.extend(!0,{},i.panvalues),n=s.offsetstart,l=s.offsetend,d={start:{width:e,height:_R_is_Editor?e/i.loadobj.width*i.loadobj.height:e/i.owidth*i.oheight,rotation:Math.PI/180*s.rotatestart,rotationV:s.rotatestart,scale:s.scalestart,transformOrigin:"0% 0%"},end:{rotation:Math.PI/180*s.rotateend,rotationV:s.rotateend,scale:s.scaleend}};s.scalestart,i.owidth,i.oheight,s.scaleend,i.owidth,i.oheight;return d.start.height<t&&(o=t/d.start.height,d.start.height=t,d.start.width=d.start.width*o),.01===s.rotatestart&&0===s.rotateend&&(delete d.start.rotation,delete d.end.rotation),o=p.getPZCorners(i,e,t,d),n[0]=parseFloat(n[0])+o.start.l,l[0]=parseFloat(l[0])+o.end.l,n[1]=parseFloat(n[1])+o.start.t,l[1]=parseFloat(l[1])+o.end.t,i=o.start.r-o.start.l,a=o.start.b-o.start.t,r=o.end.r-o.end.l,o=o.end.b-o.end.t,n[0]=0<n[0]?0:i+n[0]<e?e-i:n[0],l[0]=0<l[0]?0:r+l[0]<e?e-r:l[0],n[1]=0<n[1]?0:a+n[1]<t?t-a:n[1],l[1]=0<l[1]?0:o+l[1]<t?t-o:l[1],d.start.x=n[0],d.start.y=n[1],d.end.x=l[0],d.end.y=l[1],d.end.ease=s.ease,d},pzDrawShadow:function(e,t,i){"animating"!==t.currentState&&null!=t.panFake&&!t.pzLastFrame||(t.pzLastFrame=!1,t.shadowCTX.clearRect(0,0,t.shadowCanvas.width,t.shadowCanvas.height),t.shadowCTX.save(),void 0!==i.rotation?t.shadowCTX.transform(Math.cos(i.rotation)*i.scale,Math.sin(i.rotation)*i.scale,Math.sin(i.rotation)*-i.scale,Math.cos(i.rotation)*i.scale,i.x,i.y):t.shadowCTX.transform(i.scale,0,0,i.scale,i.x,i.y),t.shadowCTX.drawImage(t.loadobj.img,0,0,i.width,i.height),t.shadowCTX.restore()),"animating"!==t.currentState?null!=t.panFake?(t.panFake.visible||(t.panFake.visible=!0,t.panFake.img.style.opacity=1,t.canvas.style.opacity=0),tpGS.gsap.set(t.panFake.img,{width:i.width,height:i.height,force3D:!0,x:i.x,y:i.y,transformOrigin:"0% 0%",rotationZ:i.rotationV+"deg",scale:i.scale}),void 0!==i.blur&&(t.panFake.img.style.filter=0===i.blur?"none":"blur("+i.blur+"px)")):(p.updateSlideBGs(e,i.slidekey,t,!0),void 0!==i.blur&&(t.canvas.style.filter=0===i.blur?"none":"blur("+i.blur+"px)")):(void 0!==t.panFake&&!1!==t.panFake.visible&&(t.panFake.visible=!1,t.panFake.img.style.opacity=0,t.canvas.style.opacity=1,t.panFake.img.style.filter="none"),void 0!==i.blur&&t.canvasFilter?t.canvasFilterBlur=i.blur:t.canvas.style.filter=0===i.blur?"none":"blur("+i.blur+"px)")},startPanZoom:function(e,t,i,a,r,o){var s,n,l,d,c=_R_is_Editor?e:e.data();void 0!==c.panzoom&&null!==c.panzoom&&(s=_R_is_Editor?c:p[t].sbgs[o],_R_is_Editor||"carousel"!==p[t].sliderType||(p[t].carousel.justify&&void 0===p[t].carousel.slide_widths&&p.setCarouselDefaults(t,!0),p[t].carousel.justify)||(void 0===p[t].carousel.slide_width&&(p[t].carousel.slide_width=!0!==p[t].carousel.stretch?p[t].gridwidth[p[t].level]*(0===p[t].CM.w?1:p[t].CM.w):p[t].canv.width),void 0===p[t].carousel.slide_height&&(p[t].carousel.slide_height=!0!==p[t].carousel.stretch?p[t].gridheight[p[t].level]*(0===p[t].CM.w?1:p[t].CM.w):p[t].canv.height)),n=p.getmDim(t,a,s),l=p.pzCalcL(n.width,n.height,c),s.pzAnim=l,_R_is_Editor||(p[t].panzoomTLs=void 0===p[t].panzoomTLs?{}:p[t].panzoomTLs,p[t].panzoomBGs=void 0===p[t].panzoomBGs?{}:p[t].panzoomBGs,void 0===p[t].panzoomBGs[a]&&(p[t].panzoomBGs[a]=e),d=p[t].panzoomTLs[a]),i=i||0,void 0!==d&&(d.pause(),d.kill(),d=void 0),d=tpGS.gsap.timeline({paused:!0}),c.panvalues.duration=NaN===c.panvalues.duration||void 0===c.panvalues.duration?10:c.panvalues.duration,_R_is_Editor||void 0===c||void 0===s||(s.panvalues=c.panvalues),void 0!==s)&&(void 0===s.shadowCanvas&&(s.shadowCanvas=document.createElement("canvas"),s.shadowCTX=s.shadowCanvas.getContext("2d"),s.shadowCanvas.style.background="transparent",s.shadowCanvas.style.opacity=1),s.shadowCanvas.width!==n.width&&(s.shadowCanvas.width=n.width),s.shadowCanvas.height!==n.height&&(s.shadowCanvas.height=n.height),l.slideindex=a,l.slidekey=_R_is_Editor?void 0:o,l.start.slidekey=l.slidekey,p.pzDrawShadow(t,s,l.start),l.end.onUpdate=function(){p.pzDrawShadow(t,s,l.start)},s.panStart=jQuery.extend(!0,{},l.start),void 0===c.panvalues.blurstart||void 0===c.panvalues.blurend||0===c.panvalues.blurstart&&0===c.panvalues.blurend||(l.start.blur=c.panvalues.blurstart,l.end.blur=c.panvalues.blurend),(!_R_is_Editor&&void 0===l.start.blur&&!p.isFF||window.isSafari11&&p.ISM)&&(s.panFake=void 0===s.panFake?{img:s.loadobj.img.cloneNode(!0)}:s.panFake,void 0!==s.panFake)&&(!0!==s.panFake.appended&&(s.panFake.appended=!0,s.sbg.appendChild(s.panFake.img),s.panFake.img.style.position="absolute",s.panFake.img.style.display="block",s.panFake.img.style.zIndex=0,s.panFake.img.style.opacity=0,s.panFake.img.style.top="0px",s.panFake.img.style.left="0px"),s.panFake.img.width=l.start.width,s.panFake.img.height=l.start.height),d.add(tpGS.gsap.to(l.start,c.panvalues.duration,l.end),0),d.progress(i),"play"!==r&&"first"!==r||d.play(),_R_is_Editor?RVS.TL[RVS.S.slideId].panzoom=d:p[t].panzoomTLs[a]=d)}}),window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.panzoom={loaded:!0,version:"6.6.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(t){"use strict";jQuery.fn.revolution=jQuery.fn.revolution||{};var k=jQuery.fn.revolution,l=(jQuery.extend(!0,k,{checkForParallax:function(a){var r=k[a].parallax;if(!r.done){if(r.done=!0,k.ISM&&r.disable_onmobile)return!1;if("3D"==r.type||"3d"==r.type){for(e in k.addSafariFix(a),tpGS.gsap.set(k[a].c,{overflow:r.ddd_overflow}),tpGS.gsap.set(k[a].canvas,{overflow:r.ddd_overflow}),("carousel"!=k[a].sliderType||"carousel"==k[a].sliderType&&"mousedrag"==k[a].parallax.type)&&r.ddd_shadow&&(n=jQuery('<div class="dddwrappershadow"></div>'),tpGS.gsap.set(n,{force3D:"auto",transformPerspective:1600,transformOrigin:"50% 50%",width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:0}),k[a].c.prepend(n)),k[a].slides)k[a].slides.hasOwnProperty(e)&&l(jQuery(k[a].slides[e]),a);0<k[a].c.find("rs-static-layers").length&&(tpGS.gsap.set(k[a].c.find("rs-static-layers"),{top:0,left:0,width:"100%",height:"100%"}),l(k[a].c.find("rs-static-layers"),a))}r.pcontainers={},r.bgcontainers=[],r.bgcontainer_depths=[],r.speed=void 0===r.speed?0:parseInt(r.speed,0),r.speedbg=void 0===r.speedbg?0:parseInt(r.speedbg,0),r.speedls=void 0===r.speedls?0:parseInt(r.speedls,0),k[a].c.find("rs-slide rs-sbg-wrap, rs-slide rs-bgvideo").each(function(){var e=jQuery(this),t=e.data("parallax");window.isSafari11||(k[a].parZ=1),void 0!==(t="on"==t||!0===t?1:t)&&"off"!==t&&!1!==t&&(r.bgcontainers.push(e.closest("rs-sbg-px")),r.bgcontainer_depths.push(k[a].parallax.levels[parseInt(t,0)-1]/100))});for(var e=1;e<=r.levels.length;e++){for(var t in k[a].slides)k[a].slides.hasOwnProperty(t)&&(i=(o=k[a].slides[t]).dataset.key,void 0===r.pcontainers[i]&&(r.pcontainers[i]={}),d(e,r,o,r.pcontainers[i]));var i="static";void 0===r.pcontainers[i]&&(r.pcontainers[i]={}),d(e,r,k[a].slayers[0],r.pcontainers[i]),JSON.stringify(r.pcontainers[i])==JSON.stringify({})&&delete r.pcontainers[i]}if("mouse"==r.type||"mousedrag"==r.type||"mousescroll"==r.type||"3D"==r.type||"3d"==r.type){var o,s="rs-slide .dddwrapper, .dddwrappershadow, rs-slide .dddwrapper-layer, rs-static-layers .dddwrapper-layer";for(t in"carousel"===k[a].sliderType&&(s="rs-slide .dddwrapper, rs-slide .dddwrapper-layer, rs-static-layers .dddwrapper-layer"),r.sctors={},k[a].slides)k[a].slides.hasOwnProperty(t)&&(i=(o=k[a].slides[t]).dataset.key,r.sctors[i]=o.querySelectorAll(s));k[a].slayers[0]&&(r.sctors.static=k[a].slayers[0].querySelectorAll(s)),r.mouseEntered=!1,k[a].c.on("mouseenter",function(e){var t=k[a].c.offset().top,i=k[a].c.offset().left;r.mouseEnterX=e.pageX-i,r.mouseEnterY=e.pageY-t,r.mouseEntered=!0}),r.parallaxHandler=this.updateParallax.bind(this,a,r),r.hasAlreadyPermission=!1,"mousedrag"!=r.type&&k[a].c.on("mousemove.hoverdir, mouseleave.hoverdir, trigger3dpath",function(e){r.eventData=e,void 0!==r.frame&&"mouseleave"!==e.type||(r.frame=window.requestAnimationFrame(r.parallaxHandler))}),k.ISM&&(k.modulesNeedOrientationListener=null==k.modulesNeedOrientationListener?{}:k.modulesNeedOrientationListener,k.modulesNeedOrientationListener[a]=!0,k.addDeviceOrientationListener(a))}var n=k[a].scrolleffect;n.set&&(n.multiplicator_layers=parseFloat(n.multiplicator_layers),n.multiplicator=parseFloat(n.multiplicator)),void 0!==n._L&&0===n._L.length&&(n._L=!1),void 0!==n.bgs&&0===n.bgs.length&&(n.bgs=!1)}},removeIOSPermissionWait:function(){document.querySelectorAll(".iospermaccwait").forEach(function(e){e.classList.add("permanenthidden")})},addDeviceOrientationListener:function(t){var i=k[t].parallax;window.addEventListener("deviceorientation",function(e){k.modulesNeedOrientationListener[t]&&(k.modulesNeedOrientationListener[t]=!1,k.removeIOSPermissionWait()),i.eventData=e,void 0===i.frame&&(i.frame=window.requestAnimationFrame(i.parallaxHandler))})},getAccelerationPermission:function(e){DeviceMotionEvent.requestPermission().then(function(e){if("granted"==e)for(var t in k.modulesNeedOrientationListener)k.modulesNeedOrientationListener.hasOwnProperty(t)&&(k.modulesNeedOrientationListener[t]=!1,k.removeIOSPermissionWait(),k.addDeviceOrientationListener(t))})},getLayerParallaxOffset:function(e,t,i){return void 0!==k[e].parallax&&void 0!==k[e].parallax.pcontainers&&void 0!==k[e].parallax.pcontainers[k[e]._L[t].slidekey]&&void 0!==k[e].parallax.pcontainers[k[e]._L[t].slidekey][t]?Math.abs(k[e].parallax.pcontainers[k[e]._L[t].slidekey][t]["offs"+i]):0},updateParallax:function(e,t){t.frame&&(t.frame=window.cancelAnimationFrame(t.frame));var i,a,r,o,s,n,l,d,c,p,g=t.eventData,u=k[e].c.offset().left,h=k[e].c.offset().top,m=k[e].canv.width,v=k[e].canv.height,f=t.speed/1e3||3;if("mousedrag"==t.type?(a=-20*k[e].carousel.delta,i=-20*k[e].carousel.delta,k[e].carousel.fromWheel?"v"===k[e].carousel.orientation?i=0:a=0:"v"===k[e].carousel.orientation?i=k[e].carousel.cX-k[e].carousel.lerpX:a=k[e].carousel.cY-k[e].carousel.lerpY):"enterpoint"==t.origo&&"deviceorientation"!==g.type?(!1===t.mouseEntered&&(t.mouseEnterX=g.pageX-u,t.mouseEnterY=g.pageY-h,t.mouseEntered=!0),i=t.mouseEnterX-(g.pageX-u),a=t.mouseEnterY-(g.pageY-h),f=t.speed/1e3||.4):"deviceorientation"!==g.type&&(i=m/2-(g.pageX-u),a=v/2-(g.pageY-h)),("mousedrag"!=k[e].parallax.type||k[e].carousel.isPressed)&&g&&"deviceorientation"==g.type){var y,u=g.beta-60,w=(y=g.gamma,u=u,1<Math.abs(t.orientationX-y)||1<Math.abs(t.orientationY-u));if(t.orientationX=y,t.orientationY=u,!w)return;k.winW>k.getWinH(e)&&(w=y,y=u,u=w),i=360/m*(y*=1.5),a=180/v*(u*=1.5)}for(x in!g||"mouseleave"!==g.type&&"mouseout"!==g.type?"mousedrag"==k[e].parallax.type&&k[e].carousel.isPressed&&("v"===k[e].carousel.orientation&&"same"==t.car_dir&&(i=0),"same"==t.car_dir?"v"===k[e].carousel.orientation?i=0:a=0:"opposite"==t.car_dir&&("v"===k[e].carousel.orientation?(i=a,a=0):(a=i,i=0)),"v"===k[e].carousel.orientation?(a*=t.car_smulti,i*=t.car_omulti):(a*=t.car_omulti,i*=t.car_smulti)):t.mouseEntered=!1,t.pcontainers)if(t.pcontainers.hasOwnProperty(x)){var b,_=!1;if("mousedrag"==t.type&&!k[e].carousel.justify)for(var S=0;S<k[e].slideamount;S++)k[e].carousel.trackArr[S].elem.getAttribute("data-key")===x&&Math.abs(k[e].carousel.trackArr[S].progress<=1)&&(_=!0);if(void 0===k[e].activeRSSlide||"static"===x||_&&"all"==t.car_env||k[e].slides[k[e].activeRSSlide].dataset.key===x)for(var S in t.pcontainers[x])t.pcontainers[x].hasOwnProperty(S)&&((b=t.pcontainers[x][S]).pl="3D"==t.type||"3d"==t.type?b.depth/200:b.depth/100,b.offsh=i*b.pl,b.offsv=a*b.pl,"mousescroll"==t.type?tpGS.gsap.to(b.tpw,f,{force3D:"auto",x:b.offsh,ease:"power3.out",overwrite:"all"}):tpGS.gsap.to(b.tpw,f,{force3D:"auto",x:b.offsh,y:b.offsv,ease:"power3.out",overwrite:"all"}))}if("3D"==t.type||"3d"==t.type)for(var x in t.sctors)if(t.sctors.hasOwnProperty(x)&&(void 0===k[e].activeRSSlide||"static"===x||k[e].slides[k[e].activeRSSlide].dataset.key===x||k.isFF))for(var S in t.sctors[x])t.sctors[x].hasOwnProperty(S)&&(h=jQuery(t.sctors[x][S]),o=i*(r=k.isFirefox()?Math.min(25,t.levels[t.levels.length-1])/200:t.levels[t.levels.length-1]/200),s=a*r,n=0!=k[e].canv.width&&Math.round(i/k[e].canv.width*r*100)||0,l=0!=k[e].canv.height&&Math.round(a/k[e].canv.height*r*100)||0,d=h.closest("rs-slide"),c=0,p=!1,"deviceorientation"===g.type&&(o=i*(r=t.levels[t.levels.length-1]/200),s=a*r*3,n=0!=k[e].canv.width&&Math.round(i/k[e].canv.width*r*500)||0,l=0!=k[e].canv.height&&Math.round(a/k[e].canv.height*r*700)||0),h.hasClass("dddwrapper-layer")&&(c=t.ddd_z_correction||65,p=!0),h.hasClass("dddwrapper-layer")&&(s=o=0),d.index()===k[e].pr_active_key||"carousel"!=k[e].sliderType||"carousel"==k[e].sliderType&&"mousedrag"==k[e].parallax.type?!t.ddd_bgfreeze||p?tpGS.gsap.to(h,f,{rotationX:l,rotationY:-n,x:o,z:c,y:s,ease:"power3.out",overwrite:"all"}):tpGS.gsap.to(h,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,ease:"power3.out",overwrite:"all"}):tpGS.gsap.to(h,.5,{force3D:"auto",rotationY:0,x:0,y:0,rotationX:0,z:0,ease:"power3.out",overwrite:"all"}),"mouseleave"!=g.type&&"mouseout"!==g.type||tpGS.gsap.to(this,3.8,{z:0,ease:"power3.out"}))},parallaxProcesses:function(e,t,i,a){var r=k[e].fixedOnTop?Math.min(1,Math.max(0,window.scrollY/k.lastwindowheight)):Math.min(1,Math.max(0,(0-(t.top-k.lastwindowheight))/(t.hheight+k.lastwindowheight))),o=(0<=t.top&&t.top<=k.lastwindowheight||t.top<=0&&0<=t.bottom||t.top<=0&&t.bottom,k[e].slides[void 0===k[e].pr_active_key?0:k[e].pr_active_key]);if(k[e].scrollProg=r,k[e].scrollProgBasics={top:t.top,height:t.hheight,bottom:t.bottom},k[e].sbtimeline.fixed?(!1===k[e].fixedScrollOnState||0!==k[e].drawUpdates.cpar.left||!k.stickySupported||0!=k[e].fullScreenOffsetResult&&null!=k[e].fullScreenOffsetResult?k.stickySupported=!1:(k[e].topc.addClass("rs-stickyscrollon"),k[e].fixedScrollOnState=!0),void 0===k[e].sbtimeline.rest&&k.updateFixedScrollTimes(e),t.top>=k[e].fullScreenOffsetResult&&t.top<=k.lastwindowheight?(r=k[e].sbtimeline.fixStart*(1-t.top/k.lastwindowheight)/1e3,!0!==k.stickySupported&&!1!==k[e].fixedScrollOnState&&(k[e].topc.removeClass("rs-fixedscrollon"),tpGS.gsap.set(k[e].cpar,{top:0,y:0}),k[e].fixedScrollOnState=!1)):r=t.top<=k[e].fullScreenOffsetResult&&t.bottom>=k[e].module.height?(!0!==k.stickySupported&&!0!==k[e].fixedScrollOnState&&(k[e].fixedScrollOnState=!0,k[e].topc.addClass("rs-fixedscrollon"),tpGS.gsap.set(k[e].cpar,{top:0,y:k[e].fullScreenOffsetResult})),(k[e].sbtimeline.fixStart+k[e].sbtimeline.time*(Math.abs(t.top)/(t.hheight-k[e].module.height)))/1e3):(!0!==k.stickySupported&&(tpGS.gsap.set(k[e].cpar,{top:0<=k[e].scrollproc?0:t.height-k[e].module.height}),!1!==k[e].fixedScrollOnState)&&(k[e].topc.removeClass("rs-fixedscrollon"),k[e].fixedScrollOnState=!1),t.top>k.lastwindowheight?0:(k[e].sbtimeline.fixEnd+k[e].sbtimeline.rest*(1-t.bottom/k[e].module.height))/1e3)):r=k[e].duration*r/1e3,void 0!==o&&void 0!==k.gA(o,"key")&&!0!==i){var s,n,l=0;for(s in k[e].sbas[k.gA(o,"key")])void 0!==k[e]._L[s]&&null==k[e]._L[s].timeline&&l++,void 0===k[e]._L[s]||void 0===k[e]._L[s].timeline||1!=k[e]._L[s].animationonscroll&&"true"!=k[e]._L[s].animationonscroll||(l=-9999,n=void 0!==k[e]._L[s].scrollBasedOffset?r+k[e]._L[s].scrollBasedOffset:r,k[e]._L[s].animteToTime!==(n=n<=0?0:n<.1?.1:n)&&(k[e]._L[s].animteToTimeCache=k[e]._L[s].animteToTime,k[e]._L[s].animteToTime=n,tpGS.gsap.to(k[e]._L[s].timeline,k[e].sbtimeline.speed,{time:n,ease:k[e].sbtimeline.ease})));0<l&&requestAnimationFrame(function(){k.parallaxProcesses(e,t,i,a)}),k[e].c.trigger("timeline_scroll_processed",{id:e,mproc:r,speed:k[e].sbtimeline.speed})}if(k.ISM&&k[e].parallax.disable_onmobile)return!1;var d,c,p=k[e].parallax;if(void 0!==k[e].slides[k[e].pr_processing_key]&&void 0!==k[e].slides[k[e].pr_processing_key].dataset&&(d=k[e].slides[k[e].pr_processing_key].dataset.key),"3d"!=p.type&&"3D"!=p.type){if("scroll"==p.type||"mousescroll"==p.type)for(var g in p.pcontainers)if(p.pcontainers.hasOwnProperty(g)&&(void 0===k[e].activeRSSlide||"static"===g||k[e].slides[k[e].activeRSSlide].dataset.key===g||d===g))for(var u in p.pcontainers[g])p.pcontainers[g].hasOwnProperty(u)&&(c=p.pcontainers[g][u],v=void 0!==a?a:p.speedls/1e3||0,c.pl=c.depth/100,c.offsv=Math.round(k[e].scrollproc*-(c.pl*k[e].canv.height)*10)/10||0,tpGS.gsap.to(c.tpw,v,{overwrite:"auto",force3D:"auto",y:c.offsv}));if(p.bgcontainers)for(u=0;u<p.bgcontainers.length;u++){var h=p.bgcontainers[u],m=p.bgcontainer_depths[u],m=k[e].scrollproc*-(m*k[e].canv.height)||0,v=void 0!==a?a:p.speedbg/1e3||.015;v=void 0!==k[e].parallax.lastBGY&&0===v&&50<Math.abs(m-k[e].parallax.lastBGY)?.15:v,tpGS.gsap.to(h,v,{position:"absolute",top:"0px",left:"0px",backfaceVisibility:"hidden",force3D:"true",y:m+"px"}),k[e].parallax.lastBGY=m}}var f=k[e].scrolleffect;if(f.set&&(!k.ISM||!1===f.disable_onmobile)){var y,o=(o=Math.abs(k[e].scrollproc)-f.tilt/100)<0?0:o;if(!1!==f._L&&(S=1-o*f.multiplicator_layers,x={force3D:"true"},"top"==f.direction&&0<=k[e].scrollproc&&(S=1),S=1<(S="bottom"==f.direction&&k[e].scrollproc<=0?1:S)?1:S<0?0:S,f.fade&&(x.opacity=S),f.scale&&(y=S,x.scale=1-y+1),f.blur&&(b=(1-S)*f.maxblur,x["-webkit-filter"]="blur("+(b=b<=.03?0:b)+"px)",x.filter="blur("+b+"px)",window.isSafari11)&&void 0!==f._L&&void 0!==f._L[0]&&void 0!==f._L[0][0]&&"RS-MASK-WRAP"==f._L[0][0].tagName&&(x.z=.001),f.grayscale&&(_="grayscale("+100*(1-S)+"%)",x["-webkit-filter"]=void 0===x["-webkit-filter"]?_:x["-webkit-filter"]+" "+_,x.filter=void 0===x.filter?_:x.filter+" "+_),tpGS.gsap.set(f._L,x)),!1!==f.bgs){var w,b,_,S=1-o*f.multiplicator,x={backfaceVisibility:"hidden",force3D:"true"};for(w in"top"==f.direction&&0<=k[e].scrollproc&&(S=1),S=1<(S="bottom"==f.direction&&k[e].scrollproc<=0?1:S)?1:S<0?0:S,f.bgs)f.bgs.hasOwnProperty(w)&&(f.bgs[w].fade&&(x.opacity=S),f.bgs[w].blur&&(b=(1-S)*f.maxblur,x["-webkit-filter"]="blur("+b+"px)",x.filter="blur("+b+"px)"),f.bgs[w].grayscale&&(_="grayscale("+100*(1-S)+"%)",x["-webkit-filter"]=void 0===x["-webkit-filter"]?_:x["-webkit-filter"]+" "+_,x.filter=void 0===x.filter?_:x.filter+" "+_),tpGS.gsap.set(f.bgs[w].c,x))}}}}),function(e,t){var i=k[t].parallax,a=(e.find("rs-sbg-wrap").wrapAll('<div class="dddwrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden"></div>'),e[0].querySelectorAll(".rs-parallax-wrap")),r=document.createElement("div");r.className="dddwrapper-layer",r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex=5,r.style.overflow=i.ddd_layer_overflow;for(var o=0;o<a.length;o++)a.hasOwnProperty(o)&&null===k.closestNode(a[o],"RS-GROUP")&&null===k.closestNode(a[o],"RS-ROW")&&r.appendChild(a[o]);e[0].appendChild(r),e.find(".rs-pxl-tobggroup").closest(".rs-parallax-wrap").wrapAll('<div class="dddwrapper-layertobggroup" style="position:absolute;top:0px;left:0px;z-index:50;width:100%;height:100%"></div>');var s=e.find(".dddwrapper"),n=e.find(".dddwrapper-layer");e.find(".dddwrapper-layertobggroup").appendTo(s),"carousel"==k[t].sliderType&&(i.ddd_shadow&&s.addClass("dddwrappershadow"),tpGS.gsap.set(s,{borderRadius:k[t].carousel.border_radius})),tpGS.gsap.set(e,{overflow:"visible",transformStyle:"preserve-3d",perspective:1600}),tpGS.gsap.set(s,{force3D:"auto",transformOrigin:"50% 50%",transformStyle:"preserve-3d",transformPerspective:1600}),tpGS.gsap.set(n,{force3D:"auto",transformOrigin:"50% 50%",zIndex:5,transformStyle:"flat",transformPerspective:1600}),tpGS.gsap.set(k[t].canvas,{transformStyle:"preserve-3d",transformPerspective:1600})});function d(i,a,e,r){t(e).find(".rs-pxl-"+i).each(function(){var e=0<=this.className.indexOf("rs-pxmask"),t=e?k.closestNode(this,"RS-PX-MASK"):k.closestClass(this,"rs-parallax-wrap");t&&(e&&!window.isSafari11&&(tpGS.gsap.set(t,{z:1}),tpGS.gsap.set(k.closestNode(t,"RS-BG-ELEM"),{z:1})),t.dataset.parallaxlevel=a.levels[i-1],t.classList.add("tp-parallax-container"),r[this.id]={tpw:t,depth:a.levels[i-1],offsv:0,offsh:0})})}window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.parallax={loaded:!0,version:"6.6.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";window._R_is_Editor?RVS._R=void 0===RVS._R?{}:RVS._R:window._R_is_Editor=!1;var e="power1.inOut",t="power2.inOut",b=(jQuery.fn.revolution=jQuery.fn.revolution||{},_R_is_Editor?RVS._R:jQuery.fn.revolution),n=(_R_is_Editor&&(RVS._R.isNumeric=RVS.F.isNumeric),jQuery.extend(!0,b,{getSlideAnimationObj:function(e,t,i){var a,r,o,s,n={};for(r in void 0===t.anim&&null==t.in&&(t.in="o:0"),t)if(t.hasOwnProperty(r)&&void 0!==t[r])for(s in o=t[r].split(";"))o.hasOwnProperty(s)&&void 0!==(a=o[s].split(":"))[0]&&void 0!==a[1]&&(n[r]=void 0===n[r]?{}:n[r],n[r][a[0]]="d3"===r&&"c"===a[0]?a[1]:a[1].split(",")[0]);return n.in=void 0===n.in?{}:n.in,n.anim=void 0===n.anim?{e:"basic"}:n.anim,_R_is_Editor||void 0===n.in||void 0===n.in.prst||b.loadSlideAnimLibrary(e,{key:i,prst:n.in.prst}),b[e].sbgs[i].slideanimationRebuild=!1,n},loadSlideAnimLibrary:function(a,r){void 0===b.SLTR&&!0!==b.SLTR_loading?(b.SLTR_loading=!0,jQuery.ajax({type:"post",url:b[a].ajaxUrl,dataType:"json",data:{action:"revslider_ajax_call_front",client_action:"get_transitions"},success:function(e,t,i){1==e.success&&(b.SLTR=e.transitions,void 0!==r)&&b.setRandomDefaults(a,r.key,r.prst)},error:function(e){console.log("Transition Table can not be loaded"),console.log(e)}})):void 0!==r&&void 0!==b.SLTR&&b.setRandomDefaults(a,r.key,r.prst)},convertSlideAnimVals:function(e){return{anim:{eng:e.eng,ms:parseInt(e.speed,0),o:e.o,e:e.e,f:e.f,p:e.p,d:parseInt(e.d,0),adpr:e.adpr},d3:{f:e.d3.f,d:e.d3.d,z:e.d3.z,t:e.d3.t,c:e.d3.c,e:e.d3.e,fdi:e.d3.fdi,fdo:e.d3.fdo,fz:e.d3.fz,su:e.d3.su,smi:e.d3.smi,sma:e.d3.sma,sc:e.d3.sc,sl:e.d3.sl},in:{eng:e.in.eng,o:_R_is_Editor&&void 0!==e.preset&&0===e.preset.indexOf("rnd")?0:b.valBeau(e.in.o),x:b.valBeau(e.in.x),y:b.valBeau(e.in.y),r:b.valBeau(e.in.r),sx:b.valBeau(e.in.sx),sy:b.valBeau(e.in.sy),m:e.in.m,e:e.in.e,row:e.in.row,col:e.in.col,mo:"false"!==e.in.mou&&!1!==e.in.mou?b.valBeau(e.in.mo):0,moo:"false"!==e.in.mou&&!1!==e.in.mou?b.valBeau(e.in.moo):"none",mou:e.in.mou},out:void 0===e.out.a||"true"==e.out.a||!0===e.out.a?void 0:{a:o(e.out.a),o:b.valBeau(e.out.o),x:b.valBeau(e.out.x),y:b.valBeau(e.out.y),r:b.valBeau(e.out.r),sx:b.valBeau(e.out.sx),sy:b.valBeau(e.out.sy),m:e.out.m,e:e.out.e,row:b.valBeau(e.out.row),col:b.valBeau(e.out.col)},filter:{u:e.filter.u,e:e.filter.e,b:e.filter.b,g:e.filter.g,h:e.filter.h,s:e.filter.s,c:e.filter.c,i:e.filter.i},addOns:e.addOns}},setRandomDefaults:function(e,t,i){b[e].sbgs[t].random=b.getAnimObjectByKey(i,b.SLTR)},getSlideAnim_AddonDefaults:function(){var e,t={};for(e in b.enabledSlideAnimAddons)t=jQuery.extend(!0,t,b[b.enabledSlideAnimAddons[e]].defaults());return t},getSlideAnim_EmptyObject:function(){return{speed:1e3,o:"inout",e:"basic",f:"start",p:"none",d:15,eng:"animateCore",adpr:!0,d3:{f:"none",d:"horizontal",z:300,t:0,c:"#ccc",e:"power2.inOut",fdi:1.5,fdo:2,fz:0,su:!1,smi:0,sma:.5,sc:"#000",sl:1},filter:{u:!1,e:"default",b:0,g:0,h:100,s:0,c:100,i:0},in:{o:1,x:0,y:0,r:0,sx:1,sy:1,m:!1,e:"power2.inOut",row:1,col:1,mo:80,mou:!1},out:{a:"true",o:1,x:0,y:0,r:0,sx:1,sy:1,m:!1,e:"power2.inOut",row:1,col:1},addOns:b.getSlideAnim_AddonDefaults()}},getAnimObjectByKey:function(e,t){if(b.getAnimObjectCacheKey===e)return b.getAnimObjectCache;var i,a;for(a in b.getAnimObjectCacheKey=e,t)if(t.hasOwnProperty(a)&&void 0===i)for(var r in t[a])if(t[a].hasOwnProperty(r)&&void 0===i)if(e===r&&0===e.indexOf("rnd"))(i=t[a][r]).main=a,i.group=r;else for(var o in t[a][r])t[a][r].hasOwnProperty(o)&&void 0===i&&o===e&&((i=t[a][r][o]).main=a,i.group=r);return b.getAnimObjectCache=jQuery.extend(!0,{},i),i},getRandomSlideTrans:function(e,t,i){if(void 0===b.randomSlideAnimCache||void 0===b.randomSlideAnimCache[e]||void 0===b.randomSlideAnimCache[e][t])for(var a in b.randomSlideAnimCache=void 0===b.randomSlideAnimCache?{}:b.randomSlideAnimCache,b.randomSlideAnimCache[e]=void 0===b.randomSlideAnimCache[e]?{}:b.randomSlideAnimCache[e],b.randomSlideAnimCache[e][t]=void 0===b.randomSlideAnimCache[e][t]?[]:b.randomSlideAnimCache[e][t],i)if(i.hasOwnProperty(a)&&"random"!==a&&"custom"!==a&&("all"==e||a==e))for(var r in i[a])if(i[a].hasOwnProperty(r)&&"icon"!==r&&(""+t=="undefined"||0<=t.indexOf(r)))for(var o in i[a][r])i[a][r].hasOwnProperty(o)&&-1==jQuery.inArray(i[a][r][o].title,["*north*","*south*","*east*","*west*"])&&b.randomSlideAnimCache[e][t].push(o);return b.randomSlideAnimCache[e][t][Math.floor(Math.random()*b.randomSlideAnimCache[e][t].length)]},cbgW:function(e,t){return _R_is_Editor?RVS.RMD.width:"carousel"===b[e].sliderType?b[e].justifyCarousel?b[e].carousel.slide_widths[void 0!==t?t:b[e].carousel.focused]:b[e].carousel.slide_width:b[e].canv.width},cbgH:function(e,t){return _R_is_Editor?RVS.RMD.height:"carousel"===b[e].sliderType?"v"==b[e].carousel.orientation&&("fullscreen"===b[e].sliderLayout||b[e].infullscreenmode)||!0===b[e].carousel.justify?b[e].carousel.slide_height:"fullscreen"===b[e].sliderLayout||b[e].infullscreenmode?b[e].module.height:Math.min(b[e].canv.height,b[e].gridheight[b[e].level]):void 0!==b[e].maxHeight&&0<b[e].maxHeight&&!b[e].fixedOnTop?Math.min(b[e].canv.height,b[e].maxHeight):b[e].canv.height},valBeau:function(e){return e=(""+(e=(""+(e=(""+(e=(""+(e=(""+e).split(",").join("|"))).replace("{","ran("))).replace("}",")"))).replace("[","cyc("))).replace("]",")")},animateSlide:function(e,t){return _R_is_Editor&&RVS.F.resetSlideTL(),void 0===tpGS.eases.late&&(tpGS.CustomEase.create("late","M0,0,C0,0,0.474,0.078,0.724,0.26,0.969,0.438,1,1,1,1"),tpGS.CustomEase.create("late2","M0,0 C0,0 0.738,-0.06 0.868,0.22 1,0.506 1,1 1,1 "),tpGS.CustomEase.create("late3","M0,0,C0,0,0.682,0.157,0.812,0.438,0.944,0.724,1,1,1,1")),a(e,t)},getBasic:function(e){return jQuery.extend(!0,{attr:null==e||void 0===e.attr?["o","r","sx","sy","x","y","m","e","row","col","mo","moo"]:e.attr,in:{f:"start",m:!1,o:1,r:0,sx:1,sy:1,x:0,y:0,row:1,col:1,e:t,ms:1e3,mo:0,moo:"none"},out:{f:"start",m:!1,o:1,r:0,sx:1,sy:1,x:0,y:0,row:1,col:1,e:t,ms:1e3}},e)},playBGVideo:function(e,t,i){if(_R_is_Editor)i=void 0===i?RVS.SBGS[RVS.S.slideId].n:i;else{if(void 0===i&&(void 0===b[e].pr_next_bg||0===b[e].pr_next_bg.length))return;i=void 0===i?b[e].sbgs[void 0===t?b[e].pr_next_bg[0].dataset.key:t]:i}void 0!==i.bgvid&&0<i.bgvid.length&&(c(e,{},i,"in"),b.resetVideo(i.bgvid,e),b.playVideo(i.bgvid,e,!0),tpGS.gsap.to(i.bgvid[0],.2,{zIndex:30,display:"block",autoAlpha:1,delay:.075,overwrite:"all"}))},stopBGVideo:function(e,t,i){if(_R_is_Editor)i=void 0===i?RVS.SBGS[RVS.S.slideId].n:i;else{if(void 0===i&&(void 0===b[e].pr_next_bg||0===b[e].pr_next_bg.length))return;i=void 0===i?b[e].sbgs[void 0===t?b[e].pr_next_bg[0].dataset.key:t]:i}void 0!==i.bgvid&&0<i.bgvid.length&&(i.drawVideoCanvasImagesRecall=!1,b.stopVideo(i.bgvid,e),tpGS.gsap.to(i.bgvid[0],.2,{autoAlpha:0,zIndex:0,display:"none"}))},SATools:{getOffset:function(e,t,i,a){var r=0<=(""+e).indexOf("%");return 0==(e=b.SATools.getSpecialValue(e,a,i))||void 0===e?0:r?t*(parseInt(e)/100):parseInt(e)},getSpecialValue:function(e,t,i,a){var r;return b.isNumeric(parseFloat(e,0))?parseFloat(e,0):(e=("random"==(r=1<(""+e).split("ran(").length?"random":1<(""+e).split("cyc(").length?"wrap":1<(""+e).split("(").length?"dir":"unknown")||"wrap"==r?e.slice(4,-1):e.slice(1,-1)).split("|"),"random"==r?tpGS.gsap.utils.random(parseFloat(e[0]),parseFloat(1<e.length?e[1]:0-e[0])):"wrap"==r?1<(""+(t=tpGS.gsap.utils.wrap(e,t))).split("(").length?parseFloat(t.slice(1,-1))*i+(a?"%":""):t:"dir"==r?parseFloat(e[0])*i+(a?"%":""):void 0)}},getmDim:function(e,t,i){var a=b.cbgW(e,t),t=b.cbgH(e,t);return i.DPR=_R_is_Editor?Math.min(window.devicePixelRatio,2):b[e].DPR,b.maxDimCheck(i,a,t)},maxDimCheck:function(e,t,i){var a,r,o,s,n,l;void 0!==e.video&&"img"!==e.video.tagName&&null!=e.video.videoWidth&&e.video.videoWidth;return("animating"===e.currentState||null!=e.panzoom)&&("animating"!==e.currentState||null!=e.panzoom||null!=e.slideanimation&&null!=e.slideanimation.anim&&"true"===e.slideanimation.anim.adpr)||1<e.DPR&&b.ISM&&1024<i?(e.DPR=1,a=t,r=i):(void 0===(o={w:null==e.video||e.isVidImg||0==e.video.videoWidth?e.loadobj.width:e.video.videoWidth,h:null==e.video||e.isVidImg||0==e.video.videoHeight?e.loadobj.height:e.video.videoHeight}).w&&(o.w=e.loadobj.width),void 0===o.h&&(o.h=e.loadobj.height),l=i/o.w,s=t/o.h,(n=Math.max(l,s))>e.DPR||1<=l&&1<=s?e.DPR=1:e.DPR>n&&(e.DPR=Math.min(e.DPR,e.DPR/n)),a=t*e.DPR,r=i*e.DPR,1<e.DPR&&(l=t/i,o.h<o.w&&o.w<a?(r=(a=Math.max(a,o.w))/l,e.DPR=1):o.w<o.h&&o.h<r&&(a=(r=Math.max(r,o.h))*l,e.DPR=1))),{width:Math.round(a),height:Math.round(r),w:t,h:i}},updateSlideBGs:function(e,t,i,a){if(_R_is_Editor)i=void 0===i?RVS.SBGS[RVS.S.slideId].n:i;else{if(void 0===i&&(void 0===b[e].pr_next_bg||0===b[e].pr_next_bg.length))return;i=void 0===i?b[e].sbgs[void 0===t?b[e].pr_next_bg[0].dataset.key:t]:i}(a=void 0!==i.mDIM&&a)||(i.mDIM=b.getmDim(e,i.skeyindex,i)),void 0!==i.video?("IMG"!==i.video.tagName&&(i.isVidImg=""),i.cDIMS=b.getBGCanvasDetails(e,i),i.canvas.width=i.mDIM.width,i.canvas.height=i.mDIM.height,i.ctx.clearRect(0,0,i.mDIM.width,i.mDIM.height),i.ctx.drawImage(i.shadowCanvas,0,0)):(i.cDIMS=b.getBGCanvasDetails(e,i,a),i.canvas.width=i.mDIM.width,i.canvas.height=i.mDIM.height,"panzoom"===i.currentState||"animating"===i.currentState||void 0===i.currentState&&!_R_is_Editor&&"carousel"!=b[e].sliderType||(i.ctx.clearRect(0,0,i.mDIM.width,i.mDIM.height),0!==i.shadowCanvas.width&&0!==i.shadowCanvas.height&&i.ctx.drawImage(i.shadowCanvas,0,0))),"animating"===i.currentState&&"carousel"!==b[e].sliderType&&b.animatedCanvasUpdate(e,i)},addCanvas:function(){var e=document.createElement("canvas");return x=e.getContext("2d"),e.style.background="transparent",e.style.opacity=1,x},updateVideoFrames:function(e,t,i){var a;t.now=Date.now(),t.then=void 0===t.then?t.now-500:t.then,t.elapsed=t.now-t.then,t.fps="animating"===t.currentState&&window._rs_firefox?50:33,t.elapsed>t.fps&&(t.then=t.now-t.elapsed%t.fps,a="img"===t.video.tagName||null==t.video.videoWidth||0==t.video.videoWidth,void 0!==t.video&&!t.video.BGrendered&&void 0!==t.loadobj&&void 0!==t.loadobj.img||b.ISM&&b.isFirefox(e)?(t.mDIM=b.getmDim(e,t.skeyindex,t),t.pDIMS=r(t.mDIM,t,{width:t.mDIM.width,height:t.mDIM.height,x:0,y:0,contw:t.loadobj.width,conth:t.loadobj.height}),t.shadowCanvas.width!==t.mDIM.width&&(t.shadowCanvas.width=t.mDIM.width),t.shadowCanvas.height!==t.mDIM.height&&(t.shadowCanvas.height=t.mDIM.height),t.shadowCTX.drawImage(t.loadobj.img,t.pDIMS.x,t.pDIMS.y,t.pDIMS.width,t.pDIMS.height)):(!i&&void 0!==t.sDIMS&&a===t.isVidImg&&0!==t.sDIMS.width&&0!==t.sDIMS.height||(t.isVidImg=a,t.mDIM=b.getmDim(e,t.skeyindex,t),t.sDIMS=r(t.mDIM,t,{width:t.mDIM.width,height:t.mDIM.height,x:0,y:0,contw:t.isVidImg?t.loadobj.width:t.video.videoWidth,conth:t.isVidImg?t.loadobj.height:t.video.videoHeight})),void 0!==t.sDIMS&&0!==t.sDIMS.width&&0!==t.sDIMS.height&&("animating"===t.currentState?(t.shadowCanvas.width!==t.mDIM.width&&(t.shadowCanvas.width=t.mDIM.width),t.shadowCanvas.height!==t.mDIM.height&&(t.shadowCanvas.height=t.mDIM.height),t.shadowCTX.drawImage(t.video,t.sDIMS.x,t.sDIMS.y,t.sDIMS.width,t.sDIMS.height)):void 0===t.animateDirection&&(t.canvas.width!==t.mDIM.width&&(t.canvas.width=t.mDIM.width),t.canvas.height!==t.mDIM.height&&(t.canvas.height=t.mDIM.height),t.ctx.drawImage(t.video,t.sDIMS.x,t.sDIMS.y,t.sDIMS.width,t.sDIMS.height)),t.shadowCanvas_Drawn=!0))),(i||t.drawVideoCanvasImagesRecall&&"animating"===t.currentState||"animating"===t.currentState&&void 0===t.shadowCanvas_Drawn)&&window.requestAnimationFrame(function(){b.updateVideoFrames(e,t)})},createOverlay:function(e,t,i,a){if("none"===t)return"none";i=void 0===i?1:i;var a=void 0===a?{0:"rgba(0, 0, 0, 0)",1:"rgba(0, 0, 0, 1)"}:a,r={none:[[0]],1:[[1,0],[0,0]],2:[[1,0,0],[0,0,0],[0,0,0]],3:[[1,0,0,0],[0,0,0,0],[0,0,0,0]],4:[[1],[0]],5:[[1],[0],[0]],6:[[1],[0],[0],[0]],7:[[1,0]],8:[[1,0,0]],9:[[1,0,0,0]],10:[[1,0,0,0,0],[0,1,0,1,0],[0,0,0,0,0],[0,1,0,1,0],[0,0,0,0,1]],11:[[0,0,1,0,0],[0,1,0,1,0],[1,0,0,0,1],[0,1,0,1,0],[0,0,1,0,0]],12:[[1,0,0],[0,1,0],[0,0,1]],13:[[0,0,1],[0,1,0],[1,0,0]],14:[[1,0,0,0,0],[0,1,0,0,0],[0,0,1,0,0],[0,0,0,1,0],[0,0,0,0,0]],15:[[0,0,0,0,1],[0,0,0,1,0],[0,0,1,0,0],[0,1,0,0,0],[1,0,0,0,0]],16:[[1,0,0,0,1],[0,1,0,1,0],[0,0,1,0,0],[0,1,0,1,0],[1,0,0,0,1]]},o=void 0===r[t=void 0===t?1:t]?r[2]:r[t];_R_is_Editor&&(b[e]=void 0===b[e]?{}:b[e]),b[e].patternCanvas=document.createElement("canvas"),b[e].patternCtx=b[e].patternCanvas.getContext("2d"),b[e].patternCanvas.width=o[0].length*i,b[e].patternCanvas.height=o.length*i;for(var s=0;s<o.length;s++)for(var n=0;n<o[s].length;n++)"transparent"!=a[o[s][n]]&&(b[e].patternCtx.fillStyle=a[o[s][n]],b[e].patternCtx.fillRect(n*i,s*i,i,i));return"url("+b[e].patternCanvas.toDataURL()+")"},getBGCanvasDetails:function(e,t,i){var a;return i||(t.mDIM=b.getmDim(e,t.skeyindex,t)),t.usepattern=("auto"===t.bgfit||0<=t.bgfit.indexOf("%"))&&(void 0===t.loadobj||!0!==t.loadobj.useBGColor),_R_is_Editor&&void 0===t.panzoom&&delete t.shadowCanvas,void 0===t.shadowCanvas&&(t.shadowCanvas=document.createElement("canvas"),t.shadowCTX=t.shadowCanvas.getContext("2d"),t.shadowCanvas.style.background="transparent",t.shadowCanvas.style.opacity=1),!0===t.replaceShadowCanvas||!0===t.loadobj.bgColor||!0===t.usebgColor||void 0!==t.panzoom||null!=t.isHTML5&&1!=t.poster||t.usepattern?(a={width:t.mDIM.width,height:t.mDIM.height,x:0,y:0},t.usepattern&&void 0!==t.loadobj&&void 0!==t.loadobj.img?b.getCanvasPattern(e,t,{ratio:t.loadobj.height/t.loadobj.width}):(t.loadobj.bgColor||t.usebgColor)&&(t.shadowCanvas.width!==t.mDIM.width&&(t.shadowCanvas.width=t.mDIM.width),t.shadowCanvas.height!==t.mDIM.height&&(t.shadowCanvas.height=t.mDIM.height),b.getCanvasGradients(e,t))):(a=r(t.mDIM,t,{width:t.mDIM.width,height:t.mDIM.height,x:0,y:0,contw:t.loadobj.width,conth:t.loadobj.height}),t.shadowCanvas.width!==t.mDIM.width&&(t.shadowCanvas.width=t.mDIM.width),t.shadowCanvas.height!==t.mDIM.height&&(t.shadowCanvas.height=t.mDIM.height),void 0!==t.loadobj&&void 0!==t.loadobj.img&&t.shadowCTX.drawImage(t.loadobj.img,a.x,a.y,a.width,a.height),a={width:t.mDIM.width,height:t.mDIM.height,x:0,y:0}),a},getCanvasPattern:function(e,t,i){void 0===t.patternImageCanvas&&(t.patternImageCanvas=document.createElement("canvas"),t.patternImageCTX=t.patternImageCanvas.getContext("2d"));var a=t.bgfit.split(" "),a=(1===a.length&&(a[1]=a[0]),i.width="auto"===a[0]?t.loadobj.width:t.loadobj.width*(parseInt(a[0],0)/100),i.height="auto"===a[1]?t.loadobj.height:i.width*i.ratio,t.DPR=_R_is_Editor?Math.min(window.devicePixelRatio,2):b[e].DPR,i.width/i.height);i.width=i.width*t.DPR,i.height=i.height*t.DPR,b.isIOS&&15728640<i.width*i.height&&(t.mDIM.width>t.mDIM.height?(i.width=t.mDIM.width,i.height=Math.round(t.mDIM.width/a)):(i.height=t.mDIM.height,i.width=Math.round(t.mDIM.height*a))),t.patternImageCanvas.width=i.width,t.patternImageCanvas.height=i.height,t.patternImageCTX.drawImage(t.loadobj.img,0,0,i.width,i.height),t.shadowCanvas.width!==t.mDIM.width&&(t.shadowCanvas.width=t.mDIM.width),t.shadowCanvas.height!==t.mDIM.height&&(t.shadowCanvas.height=t.mDIM.height),t.shadowCTX.clearRect(0,0,t.shadowCTX.canvas.width,t.shadowCTX.canvas.height),t.pattern=t.shadowCTX.createPattern(t.patternImageCanvas,t.bgrepeat),t.shadowCTX.fillStyle=t.pattern,t.shadowShifts={h:t.bgposition.split(" ")[0],v:t.bgposition.split(" ")[1]},t.shadowShifts.hperc=b.isNumeric(parseInt(t.shadowShifts.h))?parseInt(t.shadowShifts.h)/100*t.mDIM.width:0,t.shadowShifts.vperc=b.isNumeric(parseInt(t.shadowShifts.v))?parseInt(t.shadowShifts.v)/100*t.mDIM.height:0,t.shadowShifts.x="left"===t.shadowShifts.h?0:"center"===t.shadowShifts.h||"50%"==t.shadowShifts.h?"repeat"==t.bgrepeat||"repeat-x"==t.bgrepeat?t.mDIM.width/2-i.width/2-Math.ceil(t.mDIM.width/2/i.width)*i.width:t.mDIM.width/2-i.width/2:"right"===t.shadowShifts.h?"repeat"==t.bgrepeat||"repeat-x"==t.bgrepeat?-(i.width-t.mDIM.width%i.width):t.mDIM.width-i.width:"repeat"==t.bgrepeat||"repeat-x"==t.bgrepeat?-(i.width-t.shadowShifts.hperc%i.width):t.shadowShifts.hperc,t.shadowShifts.y="top"===t.shadowShifts.v?0:"center"===t.shadowShifts.v||"50%"==t.shadowShifts.v?"repeat"==t.bgrepeat||"repeat-y"==t.bgrepeat?t.mDIM.height/2-i.height/2-Math.ceil(t.mDIM.height/2/i.height)*i.height:t.mDIM.height/2-i.height/2:"bottom"===t.shadowShifts.v?"repeat"==t.bgrepeat||"repeat-y"==t.bgrepeat?-(i.height-t.mDIM.height%i.height):t.mDIM.height-i.height:"repeat"==t.bgrepeat||"repeat-y"==t.bgrepeat?-(i.height-t.shadowShifts.vperc%i.height):t.shadowShifts.vperc,t.shadowCTX.save(),t.shadowCTX.translate(t.shadowShifts.x,t.shadowShifts.y),t.shadowCTX.fillRect(0,0,t.mDIM.width-t.shadowShifts.x,t.mDIM.height-t.shadowShifts.y),t.shadowCTX.restore()},getCanvasGradients:function(e,t){if(0<=t.bgcolor.indexOf("gradient")){t.gradient=null==t.gradient||_R_is_Editor?b.getGradients(t.bgcolor):t.gradient,t.shadowGrd="radialGradient"===t.gradient.type?t.shadowCTX.createRadialGradient(t.mDIM.width/2,t.mDIM.height/2,0,t.mDIM.width/2,t.mDIM.height/2,Math.max(t.mDIM.width/2,t.mDIM.height/2)):b.calcLinearGradient(t.shadowCTX,t.shadowCanvas.width,t.shadowCanvas.height,t.gradient.deg);for(var i=0;i<t.gradient.stops.length;i+=2)t.shadowGrd.addColorStop(t.gradient.stops[i+1],t.gradient.stops[i]);t.shadowCTX.clearRect(0,0,t.mDIM.width,t.mDIM.height),t.shadowCTX.fillStyle=t.shadowGrd}else t.shadowCTX.clearRect(0,0,t.mDIM.width,t.mDIM.height),t.shadowCTX.fillStyle=t.bgcolor;t.shadowCTX.fillRect(0,0,t.mDIM.width,t.mDIM.height)},cNS:function(e){for(var t in e.n=document.createElementNS("http://www.w3.org/2000/svg",e.n),e.v)e.n.setAttributeNS(null,t.replace(/[A-Z]/g,function(e,t,i,a){return"-"+e.toLowerCase()}),e.v[t]);for(t in void 0!==e.c&&e.n.setAttribute("class",e.c),void 0!==e.id&&(e.n.id=e.id),void 0!==e.t&&(e.n.textContent=e.t),e.s)e.s.hasOwnProperty(t)&&(e.n.style[t]=e.s[t]);return e.n},rgbToHex:function(e){return"#"+s(e[0])+s(e[1])+s(e[2])},getSVGGradient:function(e){if(void 0!==e&&-1!=(e=_R_is_Editor?RSColor.convert(e):e).indexOf("gradient")){for(var t=b.getGradients(e),i=(void 0===b.gradSVG&&(b.gradSVG=b.cNS({n:"svg",id:"tp_svg_gradients",s:{width:"100%",height:"100%",opacity:0,pointerEvents:"none"}}),b.gradSVG.setAttribute("viewBox","0 0 1 1"),b.gradSVG.setAttribute("preserveAspectRatio","none"),document.body.appendChild(b.gradSVG),b.svgGradients=[]),!1),a=JSON.stringify(e),r=0;r<b.svgGradients.length;r++)i||b.svgGradients[r].src==a&&(i=!0,e=b.svgGradients[r].url);if(!i){for(var o,s="radialGradient"===t.type?0:t.deg*(Math.PI/180),s="radialGradient"===t.type?0:{x1:Math.round(50+50*Math.sin(s))+"%",y1:Math.round(50+50*Math.cos(s))+"%",x2:Math.round(50+50*Math.sin(s+Math.PI))+"%",y2:Math.round(50+50*Math.cos(s+Math.PI))+"%"},n=b.cNS({n:t.type,id:"tp_svg_gradient_"+b.svgGradients.length,v:"radialGradient"===t.type?void 0:{gradientUnits:"userSpaceOnUse",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2}}),l=0;l<=t.stops.length/2;l+=2)o=tpGS.gsap.utils.splitColor(t.stops[l]),o=b.cNS({n:"stop",v:{offset:100*t.stops[l+1]+"%",stopColor:b.rgbToHex(o),stopOpacity:3<o.length?o[3]:1}}),n.appendChild(o);b.gradSVG.appendChild(n),e="url(#tp_svg_gradient_"+b.svgGradients.length+")",b.svgGradients.push({url:e,src:a,g:n})}}return e},getGradients:function(e){return 0<=e.indexOf("radial-gradient")?{stops:b.getGradientColorStopPoints(e.split("radial-gradient(ellipse at center, ")[1]),type:"radialGradient",deg:0}:-1!==e.indexOf("gradient")?b.getLinearGradientStops(e):e},getLinearGradientStops:function(e){var t,i=e.split("linear-gradient(")[1],i=(1<(e=(i=_R_is_Editor?(i=i.split(", ").join(",")).split(",rgba").join(", rgba"):i).split("deg, ")).length?e[1]:e[0]).split(" "),e=1<e.length?e[0]:180;for(t in i)i.hasOwnProperty(t)&&0<=i[t].indexOf("%")&&(i[t]=""+Math.round(100*parseFloat(i[t].split("%,")[0].split("%)")[0]))/1e4);return{stops:i,deg:e,type:"linearGradient"}},getGradientColorStopPoints:function(e){for(var t=/rgb([\s\S]*?)%/g,i=[],a=[];(o=t.exec(e))&&i.push(o[0]),o;);for(var r=0;r<i.length;r++){var o=i[r],e=/rgb([\s\S]*?)\)/.exec(o),s=/\)([\s\S]*?)%/.exec(o);e[0]&&(e=e[0]),s[1]&&(s=s[1]),a.push(e),a.push(parseFloat(s)/100)}return a},calcLinearGradient:function(e,t,i,a){a=a*Math.PI/180+Math.PI/2;for(var r,o,s=t/2,n=i/2,l=Math.sqrt(s*s+n*n),d={x1:Math.cos(a)*l+s,y1:Math.sin(a)*l+n,x2:s,y2:n},c=[h({x:0,y:0},a),h({x:t,y:0},a),h({x:t,y:i},a),h({x:0,y:i},a)],p=[],g=0;g<c.length;g++)p.push(m(c[g],d));return l=(u(s,n,p[0].x,p[0].y)>u(s,n,p[1].x,p[1].y)?(r=p[0].x,p[0]):(r=p[1].x,p[1])).y,t=(u(s,n,p[2].x,p[2].y)>u(s,n,p[3].x,p[3].y)?(o=p[2].x,p[2]):(o=p[3].x,p[3])).y,Math.round(100*Math.atan2(n-l,s-r))/100==Math.round(a%(2*Math.PI)*100)/100&&(i=r,n=l,r=o,l=t,o=i,t=n),e.createLinearGradient(Math.round(r),Math.round(l),Math.round(o),Math.round(t))},transitions:{filter:{update:function(e,t,i){void 0!==e&&void 0!==e.tl&&(i=void 0!==i||void 0!==e.tl.blur?" blur("+(void 0!==i?i:0+e.tl.blur!==void 0?e.tl.blur:0)+"px)":"",t.canvas.style.filter=void 0===e.tl.filter?i:e.tl.filter+i)},extendTimeLine:function(e,t,i){var a;null!=t&&(a=void 0!==t.g&&"0%"!==t.g&&0!==t.g?(""===a?"":" ")+"grayscale(_g_%)":"",""!==(a=(a=(a=(a+=void 0!==t.h&&"100%"!==t.h&&100!==t.h?(""===a?"":" ")+"brightness(_h_%)":"")+(void 0!==t.s&&"0px"!==t.s&&0!==t.s?(""===a?"":" ")+"sepia(_s_%)":""))+(void 0!==t.c&&100!==t.c?(""===a?"":" ")+"contrast(_c_%)":""))+(void 0!==t.i&&0!==t.i?(""===a?"":" ")+"invert(_i_%)":""))&&(t.tl={filter:a.replace("_g_",parseFloat(t.g)).replace("_h_",parseFloat(t.h)).replace("_s_",parseFloat(t.s)).replace("_c_",parseFloat(t.c)).replace("_i_",parseFloat(t.i))}),void 0!==t.b&&"0px"!==t.b&&0!==t.b&&(void 0===t.tl?t.tl={blur:parseFloat(t.b)}:t.tl.blur=parseFloat(t.b)),void 0!==t.tl)&&(e.add(tpGS.gsap.to(t.tl,t.ms/t.sec,void 0===t.tl.filter?{blur:0}:void 0===t.tl.blur?{filter:a.replace("_g_","0").replace("_h_","100").replace("_s_","0").replace("_c_",100).replace("_i_",0),ease:t.e}:{blur:0,filter:a.replace("_g_","0").replace("_h_","100").replace("_s_","0").replace("_c_",100).replace("_i_",0),ease:t.e}),0),i.canvasFilter=!0)}},slidingoverlay:{getBasic:function(){return b.getBasic({attr:["x","y"],in:{m:!0,o:-1,_xy:20,_gxys:10,_gxye:-10,zIndex:20,e:e},out:{m:!0,reversed:!1,_xy:-100,o:0,zIndex:10,e:e}})},updateAnim:function(e,t,i){var a=void 0!==t.in.x&&0!==t.in.x&&"0%"!==t.in.x?"x":"y",i=(t.in["g"+a+"s"]=b.SATools.getOffset(t.in[a],t.in._gxys,i,1)+"%",t.in["g"+a+"e"]=b.SATools.getOffset(t.in[a],t.in._gxye,i,1)+"%",t.out[a]=b.SATools.getOffset(t.in[a],t.out._xy,i,1)+"%",t.in[a]=b.SATools.getOffset(t.in[a],t.in._xy,i,1)+"%",0<=parseInt(t.in[a]));return t.in.d="x"==a?i?"left":"right":i?"up":"down",t},beforeDraw:function(e,t,i,a){void 0!==i.d&&(i._dxs="right"===i.d?0+i.mw:"left"===i.d?0-i.mw:0,i._dys="down"===i.d?0+i.mh:"up"===i.d?0-i.mh:0,i._xs="left"===i.d?0-i.mw:0,i._ys="up"===i.d?0-i.mh:0,i._xe="right"===i.d?a.SLOT.OW+i.mw:"left"===i.d?a.SLOT.OW-i.mw:a.SLOT.OW,i._ye="down"===i.d?a.SLOT.OH+i.mh:"up"===i.d?a.SLOT.OH-i.mh:a.SLOT.OH,t.beginPath(),t.rect("left"===i.d?Math.max(0,i._xs):"right"===i.d?Math.min(0,i._xs):0,"up"===i.d?Math.max(0,i._ys):"down"===i.d?Math.min(0,i._ys):0,"left"===i.d?Math.max(a.SLOT.OW,i._xe):"right"===i.d?Math.min(a.SLOT.OW,i._xe):i._xe,"up"===i.d?Math.max(a.SLOT.OH,i._ye):"down"===i.d?Math.min(a.SLOT.OH,i._ye):i._ye),t.clip())},afterDraw:function(e,t,i,a,r){void 0!==i.d&&(t.save(),t.beginPath(),t.rect(Math.max(0,i._dxs),Math.max(0,i._dys),i._xe,i._ye),t.clip(),t.save(),t.transform(r.csx,r.ssx,r.ssy,r.csy,.5*a.SLOT.OW+i.x+i.sgx,.5*a.SLOT.OH+i.y+i.sgy),t.drawImage(void 0!==a.shadowCanvas?a.shadowCanvas:a.loadobj.img,0,0,a.SLOT.OW,a.SLOT.OH,i.sgx-a.SLOT.OW/2,i.sgy-a.SLOT.OH/2,a.SLOT.OW,a.SLOT.OH),t.restore(),t.fillStyle="rgba(0,0,0,0.6)",t.fillRect(i.gx,i.gy,a.SLOT.OW,a.SLOT.OH),t.restore())},extendTimeLine:function(e,t,i,a,r,o){"in"!==r.direction||void 0===a.gxe&&void 0===a.gye||(jQuery.extend(!0,i[0],{d:a.d,gx:void 0===a.gxs?0:2*b.SATools.getOffset(a.gxs,o.width,r.sdir,0),gy:void 0===a.gys?0:2*b.SATools.getOffset(a.gys,o.height,r.sdir,0),sgx:void 0===a.gxs?0:b.SATools.getOffset(a.gxs,o.width,r.sdir,0),sgy:void 0===a.gys?0:b.SATools.getOffset(a.gys,o.height,r.sdir,0),mw:0-o.width,mh:0-o.height}),t.add(tpGS.gsap.to(i,a.ms/a.sec,{gx:void 0===a.gxe?0:2*b.SATools.getOffset(a.gxe,o.width,r.sdir,0),gy:void 0===a.gye?0:2*b.SATools.getOffset(a.gye,o.height,r.sdir,0),sgx:void 0===a.gxe?0:2*b.SATools.getOffset(a.gxe,o.width,r.sdir,0),sgy:void 0===a.gye?0:2*b.SATools.getOffset(a.gye,o.height,r.sdir,0),mw:o.width,mh:o.height,ease:a.e}),0))}},motionFilter:{init:function(e,t){return void 0!==t&&0<parseFloat(t)?(t=parseFloat(t),e.fmExists=!0,e.fmShadow=void 0===e.fmShadow?document.createElement("canvas"):e.fmShadow,e.fmCtx=e.fmShadow.getContext("2d"),e.fmShadow.width=e.ctx.canvas.width,e.fmShadow.height=e.ctx.canvas.height,e.fmCtx.globalAlpha=tpGS.gsap.utils.mapRange(100,0,40,0,t)/100,e.fmCtx.clearRect(0,0,e.ctx.canvas.width,e.ctx.canvas.height)):e.fmExists=!1,t},render:function(e,t){"partial"===t&&(e.fmCtx.globalCompositeOperation="source-over"),e.fmCtx.drawImage(e.canvas,0,0,e.canvas.width,e.canvas.height),e.ctx.clearRect(0,0,e.canvas.width,e.canvas.height),e.ctx.drawImage(e.fmCtx.canvas,0,0,e.canvas.width,e.canvas.height),"partial"===t&&(e.fmCtx.globalCompositeOperation="source-atop"),"partial"!==t&&"full"!==t||(e.fmCtx.fillStyle="rgba(255, 255, 255, 0.1)",e.fmCtx.fillRect(0,0,e.canvas.width,e.canvas.height))},clearFull:function(e,t){e.fmExists&&void 0!==e.fmCtx&&(e.ctx.clearRect(0,0,e.canvas.width,e.canvas.height),e.fmCtx.clearRect(0,0,e.canvas.width,e.canvas.height),void 0!==t)&&t.render(t.time(),!0,!0)},complete:function(e){e.fmShadow&&e.fmShadow.remove()}},d3:{ticker:function(e,t,i){var a,r;void 0!==e.helper&&(a=e.smi*("in"===i?e.helper.oo:e.helper.o),r=e.sma*("in"===i?e.helper.oo:e.helper.o),e.gradient="vertical"===e.d?"in"===i?t.ctx.createLinearGradient(0,0,0,t.canvas.height):t.ctx.createLinearGradient(0,t.canvas.height,0,0):"in"===i?t.ctx.createLinearGradient(0,0,t.canvas.width,0):t.ctx.createLinearGradient(t.canvas.width,0,0,0),e.gradient.addColorStop(0,"rgba("+e.sc+","+a+")"),e.gradient.addColorStop(e.sl,"rgba("+e.sc+","+r+")"),t.ctx.fillStyle=e.gradient,t.ctx.fillRect(0,0,t.canvas.width,t.canvas.height),void 0!==t.cube)&&t.cube.ctx&&(a=!1!==(i=void 0!==e.roomhelper&&!1!==e.roomhelper&&(90-e.roomhelper.r)/90)?i:e.smi*e.helper.o,r=!1!==i?i:e.sma*e.helper.o,t.cube.ctx.clearRect(0,0,t.cube.ctx.canvas.width,t.cube.ctx.canvas.height),e.gradientW=!1!==i?"vertical"===e.d?e.t<0&&1===e.sdir||0<e.t&&-1===e.sdir?t.ctx.createRadialGradient(0,t.cube.ctx.canvas.width/2,0,0,0,2*t.cube.ctx.canvas.width):t.ctx.createRadialGradient(t.cube.ctx.canvas.width,0,0,0,0,2*t.cube.ctx.canvas.width):0<e.t&&1===e.sdir||e.t<0&&-1===e.sdir?t.ctx.createRadialGradient(t.cube.ctx.canvas.width/2,t.cube.ctx.canvas.height,0,t.cube.ctx.canvas.width/2,t.cube.ctx.canvas.height,t.cube.ctx.canvas.width):t.ctx.createRadialGradient(t.cube.ctx.canvas.width/2,.2*t.cube.ctx.canvas.height,0,t.cube.ctx.canvas.width/2,.2*t.cube.ctx.canvas.height,t.cube.ctx.canvas.width):"vertical"===e.d?t.ctx.createLinearGradient(0,0,0,t.cube.ctx.canvas.height):t.ctx.createLinearGradient(0,0,t.cube.ctx.canvas.width,0),e.gradientW.addColorStop(0,"rgba("+e.sc+","+(!1!==i?"a"===e.DIR?r:0:"a"===e.DIR?0:r)+")"),e.gradientW.addColorStop(1,"rgba("+e.sc+","+(!1!==i?"a"===e.DIR?0:r:"a"===e.DIR?r:0)+")"),t.cube.ctx.fillStyle=e.gradientW,t.cube.ctx.fillRect(0,0,t.cube.ctx.canvas.width,t.cube.ctx.canvas.height))},setWall:function(e,t,i,a,r,o){return e.TL=tpGS.gsap.timeline(),e.TL.add(tpGS.gsap.to(e.c,.2,{display:"block"}),0),"rotationX"===i?(e.ctx.canvas.width=a.w,e.ctx.canvas.height=a.w,e.TL.add(tpGS.gsap.set(e.w,{backgroundColor:r,width:a.w,height:a.w,transformOrigin:"50% 50% -"+a.w/2+"px",x:0,y:0<t?-(a.w-a.h):0,rotationX:0<t?-90:90,rotationY:0}),0)):(e.ctx.canvas.width=o?a.w:a.h,e.ctx.canvas.height=a.h,e.TL.add(tpGS.gsap.set(e.w,{backgroundColor:r,width:o?a.w:a.h,height:a.h,transformOrigin:"50% 50% -"+(o?a.w:a.h)/2+"px",x:t<0?a.w-a.h:0,y:0,rotationX:0,rotationY:0<t?-90:90}),0)),e.TL},buildCube:function(e){e.cube={c:document.createElement("div"),w:document.createElement("canvas")},e.cube.ctx=e.cube.w.getContext("2d"),e.cube.c.className="rs_fake_cube",e.cube.w.className="rs_fake_cube_wall",tpGS.gsap.set(e.cube.c,{width:e.mDIM.w,height:e.mDIM.h}),tpGS.gsap.set(e.cube.w,{width:e.mDIM.w,height:e.mDIM.h,backgroundColor:"#ccc"}),e.cube.c.appendChild(e.cube.w),e.sbg.appendChild(e.cube.c)},cubeTL:function(e,t,i,a){var r,o,s,n,l,d,c,p,g,u,h,m,v,f,y,w;if("none"!==t.f&&void 0!==t.f)return i.sbg.style.transformStyle="preserve-3d",r=tpGS.gsap.timeline(),o="incube"===t.f?1:-1,s="incube"===t.f||"cube"===t.f,f="fly"===t.f?-30:90,n="turn"!==t.f&&!1!==t.t&&(_R_is_Editor||!0===b[e].firstSlideAnimDone),l=-1*t.z,d={},c={z:n?0:l,ease:"power1.inOut"},p={ease:t.e},g=[i.canvas],u=s?"50% 50% ":"20% 20% ",h="rotationX",m="rotationY",w="y",y="height",v=t.fd,"vertical"!==t.d?(h="rotationY",m="rotationX",w="x",y="width",t.DIR=1===t.sdir?"b":"a"):t.DIR=1===t.sdir?"a":"b",y="width"===y?"w":"height"===y?"h":y,"turn"===t.f?(f="vertical"===t.d?-120:120,u="vertical"===t.d?1===t.sdir?"in"===a?"0% 0% 0%":"0% 100% 0%":"in"===a?"0% 100% 0%":"0% 0% 0%":1===t.sdir?"in"===a?"0% 0% 0%":"100% 0% 0%":"in"===a?"100% 0% 0%":"0% 0% 0%",c.z=0,p.ease="out"===a?"power3.out":p.ease,v="out"===a?v/2:v):u+=o*i.mDIM[y]/2+"px",p[h]=0,p[w]=0,"in"===a?d[h]=f*t.sdir:p[h]=-f*t.sdir,"fly"===t.f&&(f=void 0===t.fz?20*Math.random()-10:parseInt(t.fz),"in"===a?(d[w]=i.mDIM[y]*(void 0===t.fdi?1.5:parseFloat(t.fdi))*t.sdir,d.rotateZ=t.sdir*f,p.rotateZ=0):(p[w]=i.mDIM[y]*(void 0===t.fdo?2:parseFloat(t.fdo))*t.sdir*-1,p.rotateZ=t.sdir*f*-1)),i.sbg.style.perspective=n?"2500px":"1500px",n?(w={z:0,ease:"power1.inOut"},(y={z:l*("fly"===t.f?1.5:3),ease:"power1.inOut"})[m]=-1*t.t,t.roomhelper={r:w[m]=0},r.add(tpGS.gsap.set(_R_is_Editor?RVS.SBGS[RVS.S.slideId].wrap:i.wrap[0],{perspective:1200,transformStyle:"preserve-3d",transformOrigin:u}),0),r.add(tpGS.gsap.to(i.sbg,3*t.md,y),0),r.add(tpGS.gsap.to(i.sbg,3*t.md,w),v-t.md),r.add(tpGS.gsap.to(t.roomhelper,3*t.md,{r:Math.abs(t.t)}),0),r.add(tpGS.gsap.to(t.roomhelper,3*t.md,{r:0}),v-t.md),"in"===a&&1!=o&&s&&(void 0===i.cube&&b.transitions.d3.buildCube(i),r.add(b.transitions.d3.setWall(i.cube,y[m],m,i.mDIM,t.c),0),g.push(i.cube.c))):(t.roomhelper=!1,r.add(tpGS.gsap.set(_R_is_Editor?RVS.SBGS[RVS.S.slideId].wrap:i.wrap[0],{perspective:"none",transformStyle:"none",transformOrigin:"50% 50%"}),0),!_R_is_Editor&&!0!==b[e].firstSlideAnimDone&&s&&(void 0===i.cube&&b.transitions.d3.buildCube(i),r.add(b.transitions.d3.setWall(i.cube,d[h],h,i.mDIM,t.c,!0),0),r.add(tpGS.gsap.fromTo(i.cube.w,4*t.md,{opacity:0},{opacity:1}),0),g.push(i.cube.c))),t.helper={o:0,oo:1},r.add(tpGS.gsap.to(t.helper,v,{o:1,oo:0,ease:t.e}),t.md+0),r.add(tpGS.gsap.set(g,jQuery.extend(!0,{},d,{force3D:!0,transformOrigin:u})),0),"turn"!==t.f&&r.add(tpGS.gsap.to(g,3*t.md,c),0),r.add(tpGS.gsap.to(g,v,p),t.md+0),"turn"!==t.f&&r.add(tpGS.gsap.to(g,3*t.md,{z:0,ease:"power1.inOut"}),v-t.md),"out"===a&&1!=o&&r.add(tpGS.gsap.to(g,2*t.md,{opacity:0}),t.dur-2*t.md),r}}},animatedCanvasUpdate:function(e,t){t.cDIMS=b.getBGCanvasDetails(e,t),t.canvas.style.backgroundColor="transparent",t.canvas.style.opacity=1,t.canvas.width!==t.mDIM.width&&(t.canvas.width=t.mDIM.width),t.canvas.height!==t.mDIM.height&&(t.canvas.height=t.mDIM.height),_R_is_Editor||!0!==b[e].clearModalBG||(t.ctx.clearRect(0,0,t.canvas.width,t.canvas.height),b[e].clearModalBG=!1,t.sbg.parentNode.style.opacity=1),t.col=Math.min(t.col||1,t.canvas.width-10),t.row=Math.min(t.row||1,t.canvas.height-10),t.SLOT=jQuery.extend(!0,{s:{},c:{}},i(e,t.col,t.row,t.mDIM,"OW","OH")),t.SLOT.DX=0-t.SLOT.OW/2,t.SLOT.DY=0-t.SLOT.OH/2,t.row=Math.ceil(t.mDIM.height/t.SLOT.OH)||1,void 0!==t.callFromAnimatedCanvasUpdate&&t.callFromAnimatedCanvasUpdate()},slideAnimFinished:function(e,t,i,a){void 0!==t&&(void 0!==t.bgvid&&0<t.bgvid.length&&"out"===i.direction&&(t.drawVideoCanvasImagesRecall=!1,b.stopVideo(t.bgvid,e),t.bgvid[0].style.display="none",t.bgvid[0].style.zIndex=0),t.panFake&&t.panFake.img&&("out"===i.direction?t.panFake.img.style.display="none":t.panFake.img.style.display="block"),"in"===i.direction&&(b.transitions.motionFilter.complete(t),t.ctx.canvas.style.filter="none",tpGS.gsap.set(i.slide,{zIndex:20}),delete t.animateDirection,0<t.bgvid.length)&&(t.isHTML5?tpGS.gsap.set(t.bgvid[0],{zIndex:30,display:"block",opacity:1}):(b.resetVideo(t.bgvid,e),tpGS.gsap.delayedCall(.1,function(){b.playVideo(t.bgvid,e,!0),tpGS.gsap.set(t.bgvid[0],{zIndex:30,display:"block",opacity:1})}))),"out"===i.direction?(tpGS.gsap.set(i.slide,{zIndex:10}),tpGS.gsap.set(t.canvas,{rotationX:0,rotationY:0,rotationZ:0,x:0,y:0,z:0,opacity:1}),t.currentState=void 0):t.currentState="idle",void 0!==t.cube&&(t.cube.c.style.display="none"),"in"===i.direction)&&(b.updateSlideBGs(e,t.skeyindex,t),void 0===t.panzoom||_R_is_Editor||b.startPanZoom(b[e].pr_next_bg,e,void 0!==b[e].panzoomTLs[t.skeyindex]?b[e].panzoomTLs[t.skeyindex].progress():0,t.skeyindex,"play",t.key),void 0!==i.BG)&&!0!==a&&i.BG.ctx.clearRect(0,0,2*t.canvas.width,2*t.canvas.height)},animateCore:function(r,o,s,n){var l,d,e,c,p=o.canvas,g=o.ctx,u=0;if(o.col=s.col,o.row=s.row,_R_is_Editor&&o.three){for(o.canvas.style.display="block";0<o.three.scene.children.length;)o.three.scene.remove(o.three.scene.children[0]);o.three.canvas.parentNode.removeChild(o.three.canvas),o.three=void 0}b.animatedCanvasUpdate(r,o),s.row=o.row,o.animateDirection=n.direction,n.delay=void 0===n.delay?0:n.delay,e=s.col*s.row,c=Array(e),void 0===o.help_canvas&&"out"===n.direction&&void 0!==n.bgColor&&(o.help_canvas=document.createElement("canvas"),o.help_ctx=o.help_canvas.getContext("2d"),o.help_canvas.style.backgroundColor="transparent"),"out"===n.direction&&void 0!==n.bgColor&&(o.help_canvas.width=o.mDIM.width,o.help_canvas.height=o.mDIM.height,o.help_ctx.fillStyle=n.bgColor,o.help_ctx.fillRect(0,0,o.mDIM.width,o.mDIM.height)),s.mo=b.transitions.motionFilter.init(o,s.mo),s.dur=s.ms/s.sec,void 0!==n.d3&&(n.d3.dur=s.dur,n.d3.fd=.7*s.dur,n.d3.md=.15*s.dur,n.d3.sdir=n.sdir),o.SLOT.c={ws:0,hs:0,wd:0,hd:0},0<s.mo&&_R_is_Editor&&g.clearRect(0,0,p.width,p.height);var t=tpGS.gsap.timeline({onUpdate:function(){if((u=0)<s.mo?b.transitions.motionFilter.render(o,s.moo):g.clearRect(0,0,p.width,p.height),o.help_canvas&&"out"===n.direction&&g.drawImage(o.help_canvas,0,0),(n.filter&&n.filter.u||!_R_is_Editor)&&b.transitions.filter.update(n.filter,g,o.canvasFilterBlur),_R_is_Editor&&0!==s.zIndex&&void 0!==s.zIndex&&tpGS.gsap.set(n.slide,{zIndex:s.zIndex}),void 0!==o.shadowCanvas)for(l=0;l<s.col;l++)for(o.SLOT.SX=o.SLOT.OW*l,o.SLOT.tw=o.SLOT.OW*(l+.5),o.SLOT.c.wd=o.mDIM.width-(o.SLOT.tw+o.SLOT.DX+o.SLOT.OW),o.SLOT.c.wd=o.SLOT.c.wd<0?o.SLOT.c.wd:0,o.SLOT.DW=o.SLOT.SW=o.SLOT.OW+o.SLOT.c.wd,d=0;d<s.row;d++){g.save();var e=-Math.PI/180*c[u].r,t=0!==s.r?Math.cos(e)*c[u].sx:c[u].sx,i=0!==s.r?Math.cos(e)*c[u].sy:c[u].sy,a=0!==s.r?Math.sin(e)*c[u].sx:0,e=0!==s.r?Math.sin(e)*-c[u].sy:0;o.SLOT.SY=o.SLOT.OH*d,o.SLOT.th=o.SLOT.OH*(d+.5),b.transitions[n.effect]&&b.transitions[n.effect].beforeDraw&&b.transitions[n.effect].beforeDraw(r,g,c[u],o),s.m&&(g.beginPath(),g.rect(o.SLOT.OW*l,o.SLOT.OH*d,o.SLOT.OW,o.SLOT.OH),g.clip()),g.transform(t,a,e,i,o.SLOT.tw+c[u].x,o.SLOT.th+c[u].y),g.globalAlpha=Math.max(0,c[u].o),o.SLOT.c.hd=o.mDIM.height-(o.SLOT.th+o.SLOT.DY+o.SLOT.OH),o.SLOT.c.hd=o.SLOT.c.hd<0?o.SLOT.c.hd:0,o.SLOT.DH=o.SLOT.SH=o.SLOT.OH+o.SLOT.c.hd,1<o.SLOT.SW&&1<o.SLOT.SH&&g.drawImage(o.shadowCanvas,o.SLOT.SX,o.SLOT.SY,o.SLOT.SW,o.SLOT.SH,o.SLOT.DX,o.SLOT.DY,o.SLOT.DW,o.SLOT.DH),g.restore(),b.transitions[n.effect]&&b.transitions[n.effect].afterDraw&&b.transitions[n.effect].afterDraw(r,g,c[u],o,{csx:t,csy:i,ssx:a,ssy:e}),u++}void 0!==n.d3&&n.d3.su&&b.transitions.d3.ticker(n.d3,o,n.direction),o.currentState="animating"},onComplete:function(){b.slideAnimFinished(r,o,n)}});if(s.col*s.row<2&&(s.f="start"),0!==s.zIndex&&void 0!==s.zIndex&&t.add(tpGS.gsap.set(n.slide,{zIndex:parseInt(s.zIndex,0)}),0),s.m="false"!=s.m&&!1!==s.m,"in"===n.direction){for(l=0;l<e;l++)c[l]={x:b.SATools.getOffset(s.x,s.m?o.SLOT.OW:o.mDIM.width,n.sdir,l),y:b.SATools.getOffset(s.y,s.m?o.SLOT.OH:o.mDIM.height,n.sdir,l),o:b.SATools.getSpecialValue(s.o,l,n.sdir),sx:b.SATools.getSpecialValue(s.sx,l,n.sdir),sy:b.SATools.getSpecialValue(s.sy,l,n.sdir),r:0!==s.r?b.SATools.getSpecialValue(s.r,l,n.sdir):0};t.add(tpGS.gsap.to(c,s.dur,{o:1,sx:1,sy:1,r:0,x:0,y:0,ease:s.e,stagger:{amount:"nodelay"===s.f?0:s.ms/s.stasec,grid:[s.col,s.row],from:"nodelay"===s.f?"start":s.f}}),n.delay),void 0!==n.d3&&t.add(b.transitions.d3.cubeTL(r,n.d3,o,"in"),0),b.transitions.filter.extendTimeLine(t,n.filter,o)}else{for(l=0;l<e;l++)c[l]={x:0,y:0,o:1,sx:1,sy:1,r:0};t.add(tpGS.gsap.to(c,s.dur,{o:function(e){return b.SATools.getSpecialValue(s.o,e,n.sdir)},sx:function(e){return b.SATools.getSpecialValue(s.sx,e,n.sdir)},sy:function(e){return b.SATools.getSpecialValue(s.sy,e,n.sdir)},r:0!==s.r&&void 0!==s.r?function(e){return b.SATools.getSpecialValue(s.r,e,n.sdir)}:0,x:function(e){return b.SATools.getOffset(s.x,s.m?o.SLOT.OW:o.mDIM.width,n.sdir,e)*(s.reversed?-1:1)},y:function(e){return b.SATools.getOffset(s.y,s.m?o.SLOT.OH:o.mDIM.height,n.sdir,e)*(s.reversed?-1:1)},ease:s.e,stagger:{amount:"nodelay"===s.f?0:s.ms/s.stasec,grid:[s.col,s.row],from:"nodelay"===s.f?"start":s.f}}),n.delay+(void 0!==s.outdelay?s.outdelay:0)),void 0!==n.d3&&t.add(b.transitions.d3.cubeTL(r,n.d3,o,"out"),0)}b.transitions[n.effect]&&b.transitions[n.effect].extendTimeLine&&b.transitions[n.effect].extendTimeLine(r,t,c,s,n,o.mDIM),_R_is_Editor?RVS.TL[RVS.S.slideId].slide.add(t,0):b[r].mtl.add(t,n.delay)}}),function(e,t){return void 0!==t&&b.isNumeric(t)?parseFloat(t,0):null==t||"default"===t||"d"===t?e:t}),i=function(e,t,i,a,r,o){var s={};return s[r]=Math.ceil(a.width/t),s[o]=(_R_is_Editor,Math.ceil(a.height/i)),s},l=function(e){return null==e||0===e||NaN===e?1:e},a=function(e,t){_R_is_Editor||(b[e].duringslidechange=!0);var i,a=_R_is_Editor?-1:"arrow"!=b[e].sc_indicator||void 0===b[e].sc_indicator_dir?b[e].sdir:b[e].sc_indicator_dir,r=!!_R_is_Editor||void 0!==b[e].pr_next_bg&&0<b[e].pr_next_bg.length&&void 0!==b[e].pr_next_bg[0],o=!!_R_is_Editor||void 0!==b[e].pr_active_bg&&0<b[e].pr_active_bg.length&&void 0!==b[e].pr_active_bg[0],r=_R_is_Editor?RVS.SBGS[RVS.S.slideId].n:r?b[e].sbgs[b[e].pr_next_bg[0].dataset.key]:void 0,s=_R_is_Editor?RVS.SBGS[RVS.S.slideId].c:o?b[e].sbgs[b[e].pr_active_bg[0].dataset.key]:void 0,a=1===a?-1:1;_R_is_Editor||(delete b[e].sc_indicator,delete b[e].sc_indicator_dir),i=jQuery.extend(!0,{},function(e,t,i){var a,r,o=(void 0!==b.transitions[t.anim.e]&&void 0!==b.transitions[t.anim.e].getBasic?b.transitions[t.anim.e]:b).getBasic();o.out=null==o.out?{}:o.out,o.out.reversed=void 0===t.out&&(void 0===o.out.reversed||o.out.reversed),void 0!==t.iw&&parseInt(t.iw,0),void 0!==t.ow&&parseInt(t.ow,0);for(r in o.attr)a=o.attr[r],o.in[a]=n(o.in[a],t.in[a]),o.out[a]=o.out.reversed?o.in[a]:void 0===t.out?o.out[a]:n(o.out[a],t.out[a]);return o.filter=void 0!==t.filter?jQuery.extend(!0,t.filter,t.filter):o.filter,(o=b.transitions[t.anim.e]&&b.transitions[t.anim.e].updateAnim?b.transitions[t.anim.e].updateAnim(e,o,i):o).e=t.anim.e,void 0!==o.in&&(o.in.col="random"===o.in.col?tpGS.gsap.utils.random(1,10,1):l(o.in.col),o.in.row="random"===o.in.row?tpGS.gsap.utils.random(1,10,1):l(o.in.row)),void 0!==o.out&&(o.out.col="random"===o.out.col?tpGS.gsap.utils.random(1,10,1):l(o.out.col),o.out.row="random"===o.out.row?tpGS.gsap.utils.random(1,10,1):l(o.out.row)),o}(e,t,a)),void 0!==r.random&&void 0!==b.SLTR&&void 0!==s&&(delete s.help_canvas,delete s.help_ctx),i.ms=n(void 0,void 0===t.anim.ms?1e3:t.anim.ms),i.f=n(void 0,t.anim.f),i.p=n(void 0,t.anim.p),i.d=n(void 0,t.anim.d),i.o=t.anim.o,void 0!==t.d3&&(t.d3.t=void 0!==t.d3.t&&0!==t.d3.t&&t.d3.t,t.d3.su="true"==t.d3.su||1==t.d3.su,t.d3.su&&(t.d3.smi=void 0===t.d3.smi?0:parseFloat(t.d3.smi),t.d3.sl=void 0===t.d3.sl?1:parseFloat(t.d3.sl),t.d3.sma=void 0===t.d3.sma?.5:parseFloat(t.d3.sma),t.d3.sc=void 0===t.d3.sc?"0,0,0":tpGS.gsap.utils.splitColor(t.d3.sc).join(",")),i.p="none",void 0!==i.in.row)&&void 0!==i.in.col&&200<i.in.row*i.in.col&&(i.filter=void 0),i.in.sec=void 0===i.in.sec?1e3:i.in.sec,i.in.stasec=void 0===i.in.stasec?void 0===i.d?1500:100*i.d:i.in.stasec,i.in.ms="default"===i.ms||"d"===i.ms?i.in.ms:"random"===i.ms?Math.round(1e3*Math.random()+300):null!=i.ms?parseInt(i.ms,0):i.in.ms,i.out.ms=i.in.ms,void 0!==i.filter&&(i.filter.ms=i.in.ms,i.filter.sec=i.in.sec,i.filter.e=(void 0===i.filter.e||"default"===i.filter.e?i.in:i.filter).e),i.in.f=(void 0===i.f||"default"===i.f||"d"===i.f?i.in:i).f,i.in.f="slidebased"===i.in.f?1==a?"start":"end":"oppslidebased"===i.in.f?1==a?"end":"start":i.in.f,i.out.f=i.in.f,i.out=jQuery.extend(!0,{},i.in,i.out),i.in.eng=i.out.eng=t.anim.eng,void 0!==i.out.eng&&null==b[i.out.eng]&&(i.out.o=0,i.in.o=0,i.in.ms=i.out.ms=1e3,i.in.eng=i.out.eng="animateCore"),void 0!==i.p&&"none"!==i.p&&(i.in.bg="dark"===i.p?"#000":"light"===i.p?"#fff":"transparent",i.out.delay="none"!==i.p?function(e,t){return e/2.5}:0,1===i.out.o)&&0===i.out.x&&0===i.out.y&&(i.out.o=0),"forceinout"===i.o?(i.in.zIndex=20,i.out.zIndex=10):"outin"!==i.o&&(1!==i.in.o||0!==i.in.x||0!==i.in.y||void 0===t.out||1===i.out.o&&0===i.out.x&&0===i.out.y)||(i.in.zIndex=10,i.out.zIndex=20),0<r.bgvid.length&&(i.in=c(e,i.in,r,"in")),o&&void 0!==s.bgvid&&0<s.bgvid.length&&(i.out=c(e,i.out,s,"out")),void 0!==i.out&&(i.out.simplify||i.in.simplify)&&(i.out=d(i.out)),i.in.simplify&&(i.in=d(i.in)),_R_is_Editor||requestAnimationFrame(function(){b.generalObserver(b.ISM,!0)}),i.in.eng=void 0===i.in.eng?"animateCore":i.in.eng,i.out.eng=void 0===i.out.eng?"animateCore":i.out.eng,o&&!0!==i.out.skip&&b[i.out.eng](e,s,i.out,{effect:i.e,slide:_R_is_Editor?RVS.SBGS[RVS.S.slideId].c.sbg:b[e].pr_active_slide,direction:"out",delay:0,bgColor:i.in.bg,sdir:a,filter:void 0,d3:t.d3,addOns:_R_is_Editor?t.addOns:void 0}),!0!==i.in.skip&&b[i.in.eng](e,r,i.in,{effect:i.e,slide:_R_is_Editor?RVS.SBGS[RVS.S.slideId].n.sbg:b[e].pr_next_slide,direction:"in",delay:o?"function"==typeof i.out.delay?i.out.delay(i.in.ms/1e3,i.out.row*i.out.col):i.out.delay:i.in.delay,BG:s,outslide:_R_is_Editor?RVS.SBGS[RVS.S.slideId].c.sbg:b[e].pr_active_slide,sdir:a,filter:i.filter,d3:t.d3,addOns:_R_is_Editor?t.addOns:void 0})},r=function(e,t,i){var a=e.height/e.width,a=(i.ratio=i.conth/i.contw,i.ratio<a&&"contain"===t.bgfit||i.ratio>a&&"cover"===t.bgfit?i.height=e.width*i.ratio:i.ratio>a&&"contain"===t.bgfit||i.ratio<a&&"cover"===t.bgfit?i.width=e.width*a/i.ratio:i.ratio!==a||"contain"!==t.bgfit&&"cover"!==t.bgfit?(1===(a=t.bgfit.split(" ")).length&&(a[1]=a[0]),i.width="auto"===a[0]?i.contw:e.width*(parseInt(a[0],0)/100),i.height="auto"===a[1]?i.conth:i.width*i.ratio,t.usepattern=!0):i.width=e.width,a=e,e=i,1===(t=(t=t.bgposition).split(" ")).length&&(t[1]=t[0]),{x:"center"===t[0]||"50%"===t[0]?(a.width-e.width)/2:"left"===t[0]?0:"right"===t[0]?a.width-e.width:b.isNumeric(t[0])?0:0<=t[0].indexOf("%")?parseInt(t[0],0)/100*a.width-parseInt(t[0],0)/100*e.width:parseInt(t[0],0),y:"center"===t[1]||"50%"===t[1]?(a.height-e.height)/2:"top"===t[1]?0:"bottom"===t[1]?a.height-e.height:b.isNumeric(t[1])?0:0<=t[1].indexOf("%")?parseInt(t[1],0)/100*a.height-parseInt(t[1],0)/100*e.height:parseInt(t[1],0)});return i.x=a.x,i.y=a.y,i},d=function(e){return e.o=0,e.r=0,e.row=1,e.col=1,e.x=0,e.y=0,e.sx=1,e.sy=1,e},o=function(e){return e="false"!==e&&!1!==e&&"off"!==e&&void 0!==e&&0!==e&&-1!==e},s=function(e){e=e.toString(16);return 1==e.length?"0"+e:e},c=function(e,t,i,a){return t.skip=!1,"in"===a?i.isHTML5?(i.bgvid[0].style.display="none",b.resetVideo(i.bgvid,e),i.animateDirection="in",i.currentState="animating",i.drawVideoCanvasImagesRecall=!0,b.updateVideoFrames(e,i,!0),b.playVideo(i.bgvid,e)):(b[e].videos[i.bgvid[0].id].pauseCalled=!1,t.waitToSlideTrans=b[e].videos[i.bgvid[0].id].waitToSlideTrans,!0!==i.poster?(b.resetVideo(i.bgvid,e),!(b[e].videos[i.bgvid[0].id].prePlayForaWhile=!1)!==t.waitToSlideTrans&&b.playVideo(i.bgvid,e,!0),tpGS.gsap.fromTo(i.bgvid,t.ms/t.sec,{zIndex:30,display:"block",opacity:0},{opacity:1,zIndex:30,display:"block"}),i.loadobj.bgColor=!0,i.bgcolor="#000",t.simplify=!0):(b[e].videos[i.bgvid[0].id].prePlayForaWhile=!1,b.resetVideo(i.bgvid,e),b.playVideo(i.bgvid,e),i.bgvid[0].style.display="none",i.bgvid[0].style.zIndex=0,i.bgvid[0].style.opacity=0)):"out"===a&&(i.isHTML5?(i.currentState="animating",i.drawVideoCanvasImagesRecall=!0,b.updateVideoFrames(e,i,!0),window.requestAnimationFrame(function(){tpGS.gsap.to(i.bgvid,.1,{zIndex:0,display:"none"})})):(b.stopVideo(i.bgvid,e,!0),!0!==i.poster&&(i.loadobj.bgColor=!0,i.bgcolor="#000"))),t},u=function(e,t,i,a){return Math.sqrt(Math.pow(e-i,2)+Math.pow(t-a,2))},h=function(e,t){t+=Math.PI/2;return{x1:e.x,y1:e.y,x2:e.x+100*Math.cos(t),y2:e.y+100*Math.sin(t)}},m=function(e,t){var i=e.y2-e.y1,a=e.x1-e.x2,e=i*e.x1+a*e.y1,r=t.y2-t.y1,o=t.x1-t.x2,t=r*t.x1+o*t.y1,s=i*o-r*a;return 0!=s&&{x:Math.round((o*e-a*t)/s*100)/100,y:Math.round((i*t-r*e)/s*100)/100}};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.slideanims={loaded:!0,version:"6.6.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery),!function(){"use strict";jQuery.fn.revolution=jQuery.fn.revolution||{};var h=jQuery.fn.revolution;function n(e){return null==e?-1:!h.isNumeric(e)&&1<e.split(":").length?60*parseInt(e.split(":")[0],0)+parseInt(e.split(":")[1],0):e}jQuery.extend(!0,h,{preLoadAudio:function(a,r){h[r].videos=void 0===h[r].videos?{}:h[r].videos,a.find(".rs-layer-audio").each(function(){var e=jQuery(this),t=h[r].videos[e[0].id]=void 0===h[r].videos[e[0].id]?u(e.data(),"audio",h.gA(a[0],"key")):h[r].videos[e[0].id],i={};0===e.find("audio").length&&(i.src=null!=t.mp4?t.mp4:"",i.pre=t.pload||"",this.id=void 0===this.id||""===this.id?e.attr("audio-layer-"+Math.round(199999*Math.random())):this.id,i.id=this.id,void 0===h[r].audioqueue&&(h[r].audioqueue=[]),h[r].audioqueue.push(i),h.manageVideoLayer(e,r,h.gA(a[0],"key"),!0))})},preLoadAudioDone:function(e,t,i){var a=h[t].videos[e[0].id];h[t].audioqueue&&0<h[t].audioqueue.length&&jQuery.each(h[t].audioqueue,function(e,t){a.mp4!==t.src||t.pre!==i&&"auto"!==t.pre||(t.status="loaded")})},checkfullscreenEnabled:function(e){var t;return void 0!==window.fullScreen?window.fullScreen:void 0!==document.fullscreen?document.fullscreen:void 0!==document.mozFullScreen?document.mozFullScreen:void 0!==document.webkitIsFullScreen?document.webkitIsFullScreen:(t=h.isWebkit()&&/Apple Computer/.test(navigator.vendor)?42:5,screen.width==h.winW&&Math.abs(screen.height-h.getWinH(e))<t)},showVideo:function(e){tpGS.gsap.to(e,.3,{opacity:1,display:"block",ease:"power3.inOut"})},resetVideo:function(e,t,i){if("updateAndResize"!==i){var a=h[t].videos[e[0].id];if("resetVideo"!==a.cRS)switch(a.cRS="resetVideo",a.type){case"youtube":a.rwd&&null!=a.player&&void 0!==a.player.seekTo&&(a.player.seekTo(-1==a.ssec?0:a.ssec),a.player.pauseVideo()),a.bgvideo||"preset"===i||0!=a.jsposter.length||h.showVideo(e.find("iframe"));break;case"vimeo":void 0!==a.vimeoplayer&&a.rwd&&(0!==a.ssec&&-1!==a.ssec||a.bgvideo||0<a.jsposter.length)&&(a.vimeoplayer.setCurrentTime(-1==a.ssec?0:a.ssec),a.vimeoplayer.pause()),0!=a.jsposter.length||a.bgvideo||"preset"===i||h.showVideo(e.find("iframe"));break;case"html5":if(h.ISM&&a.notonmobile)return!1;a.bgvideo||h.showVideo(a.jvideo),a.rwd&&"playing"!==a.cSS&&!isNaN(a.video.duration)&&(a.justReseted=!0,a.video.currentTime=-1==a.ssec?0:a.ssec),"mute"!=a.volume&&!h.lastToggleState(e.videomutetoggledby)&&!0!==h[t].globalmute||(a.video.muted=!0)}}},Mute:function(e,t,i){var a=!1,r=h[t].videos[e[0].id];switch(r.type){case"youtube":r.player&&(!0===i&&r.player.mute(),!1===i&&y(r,parseInt(r.volcache,0)),a=r.player.isMuted?r.player.isMuted():"mute"===r.volume);break;case"vimeo":r.volcachecheck||(r.volcache=1<r.volcache?r.volcache/100:r.volcache,r.volcachecheck=!0),r.volume=!0===i?"mute":!1===i?r.volcache:r.volume,void 0!==i&&null!=r.vimeoplayer&&o(r,!0===i?0:r.volcache),a="mute"==r.volume||0===r.volume;break;case"html5":r.volcachecheck||(r.volcache=1<r.volcache?r.volcache/100:r.volcache,r.volcachecheck=!0),r.video.volume=r.volcache,void 0!==i&&r.video&&(r.video.muted=i),a=void 0!==r.video?r.video.muted:a}if(void 0===i)return a},stopVideo:function(e,t,i){if(void 0!==h[t]&&void 0!==h[t]){var a=h[t].videos[e[0].id];if(void 0!==a&&("stopVideo"!==a.cRS||"paused"!==a.cSS))switch(a.cRS="stopVideo",h[t].leaveViewPortBasedStop||(h[t].lastplayedvideos=[]),h[t].leaveViewPortBasedStop=!1,a.type){case"youtube":void 0!==a.player&&2!==a.player.getPlayerState()&&5!==a.player.getPlayerState()&&(a.player.pauseVideo(),void 0!==i)&&w(t,a,"hide");break;case"vimeo":void 0!==a.vimeoplayer&&(a.vimeoplayer.pause(),void 0!==i)&&w(t,a,"hide");break;case"html5":a.video&&(a.video.pause(),h.ISM)&&k(a,1)}}},playVideo:function(e,t,i){var a=h[t].videos[e[0].id];if(clearTimeout(a.videoplaywait),"playVideo"!==a.cRS||"playing"!==a.cSS)switch(a.cRS="playVideo",a.type){case"youtube":0==e.find("iframe").length?(e.append(a.videomarkup),b(e,t,!0)):void 0!==a.player&&null!=a.player.playVideo?(r=a.player.getCurrentTime(),a.nseTriggered&&(a.nseTriggered=!(r=-1)),-1!=a.ssec&&a.ssec>r&&a.player.seekTo(a.ssec),p(a)):a.videoplaywait=setTimeout(function(){h.playVideo(e,t)},50);break;case"vimeo":0==e.find("iframe").length?(delete a.vimeoplayer,e.append(a.videomarkup),b(e,t,!0)):e.hasClass("rs-apiready")&&(a.vimeoplayer=null==a.vimeoplayer?new Vimeo.Player(e.find("iframe").attr("id")):a.vimeoplayer,a.vimeoplayer.getPaused())?(r=void 0===a.currenttime?0:a.currenttime,a.nseTriggered&&(a.nseTriggered=!(r=-1)),-1!=a.ssec&&a.ssec>r&&a.vimeoplayer.setCurrentTime(a.ssec),"mute"!=a.volume&&0!==a.volume&&!h.lastToggleState(e.data("videomutetoggledby"))&&!0!==h[t].globalmute||(a.volumetoken=!0,a.vimeoplayer.setMuted(!0)),c(a)):a.videoplaywait=setTimeout(function(){h.playVideo(e,t)},50);break;case"html5":if(a.metaloaded){if((""+a.video.duration=="NaN"||a.video.readyState<4)&&!i)return a.loadRequested||(a.video.load(),a.loadRequested=!0),void setTimeout(function(){h.playVideo(e,t)},50);var r=a.video.currentTime;a.nseTriggered&&(a.nseTriggered=!(r=-1)),-1!=a.ssec&&a.ssec>r&&a.ssec<a.video.duration&&(a.video.currentTime=a.ssec),s(a,void 0,t)}else d(a.video,"loadedmetadata",void h.playVideo(e,t))}},isVideoPlaying:function(i,e){var a=!1;return null!=h[e].playingvideos&&jQuery.each(h[e].playingvideos,function(e,t){i.attr("id")==t.attr("id")&&(a=!0)}),a},removeMediaFromList:function(e,t){x(e,t)},prepareCoveredVideo:function(e){clearTimeout(h[e].resizePrepareCoverVideolistener);var t="carousel"===h[e].sliderType?h[e].carousel.justify?void 0===h[e].carousel.slide_widths?void 0:h[e].carousel.slide_widths[h[e].carousel.focused]:h[e].carousel.slide_width:h[e].canv.width,i="carousel"===h[e].sliderType?h[e].carousel.slide_height:h[e].canv.height;if(0===t||0===i||void 0===t||void 0===i)h[e].resizePrepareCoverVideolistener=setTimeout(function(){h.prepareCoveredVideo(e)},100);else for(var a in h[e].videos){var r,o,s,a=h[e].videos[a];void 0!==a.jvideo&&(a.bgvideo||a.jvideo.parent().hasClass("rs-fsv")||h.closestNode(a.video,"RS-LAYER")&&h.closestNode(a.video,"RS-LAYER").classList.contains("rs-fsv"))&&("html5"===a.type&&void 0!==a.jvideo&&tpGS.gsap.set(a.jvideo,{width:t}),void 0!==h[e].activeRSSlide&&a.slideid!==h.gA(h[e].slides[h[e].activeRSSlide],"key")&&void 0!==h[e].pr_next_slide&&a.slideid!==h.gA(h[e].pr_next_slide[0],"key")||(a.vd=1<a.ratio.split(":").length?a.ratio.split(":")[0]/a.ratio.split(":")[1]:1,r=a.vd*(s=t/i)*100,o=a.vd/s*100,s="Edge"===h.get_browser()||"IE"===h.get_browser()?s>a.vd?{minWidth:"100%",height:r+"%",x:"-50%",y:"-50%",top:"50%",left:"50%",position:"absolute"}:{minHeight:"100%",width:o+"%",x:"-50%",y:"-50%",top:"50%",left:"50%",position:"absolute"}:(a.bgvideo&&void 0!==a.vimeoid&&"carousel"==h[e].sliderType&&(o=r=100),s>a.vd?{height:(a.fitCover?100:r)+"%",width:"100%",top:a.fitCover?0:-(r-100)/2+"%",left:"0px",position:"absolute"}:{width:(a.fitCover?100:o)+"%",height:"100%",left:a.fitCover?0:-(o-100)/2+"%",top:"0px",position:"absolute"}),void 0===a.vimeoid&&void 0===a.ytid||(s.maxWidth="none",s.maxHeight="none"),tpGS.gsap.set(a.jvideo,s)))}},checkVideoApis:function(e,t){var i,a,r;location.protocol;h[t].youtubeapineeded||(i=e.find("iframe"),(null!=e.data("ytid")||0<i.length&&i.attr("src")&&0<i.attr("src").toLowerCase().indexOf("youtube"))&&(h[t].youtubeapineeded=!0),h[t].youtubeapineeded&&!window.rs_addedyt&&(h[t].youtubestarttime=Date.now(),window.rs_addedyt=!0,i=document.createElement("script"),a=h.getByTag(document,"script")[0],r=!0,i.src="https://www.youtube.com/iframe_api",jQuery("head").find("*").each(function(){"https://www.youtube.com/iframe_api"==jQuery(this).attr("src")&&(r=!1)}),r)&&a.parentNode.insertBefore(i,a)),h[t].vimeoapineeded||(i=e.find("iframe"),(null!=e.data("vimeoid")||0<i.length&&i.attr("src")&&0<i.attr("src").toLowerCase().indexOf("vimeo"))&&(h[t].vimeoapineeded=!0),h[t].vimeoapineeded&&!window.rs_addedvim&&(h[t].vimeostarttime=Date.now(),window.rs_addedvim=!0,e=document.createElement("script"),a=h.getByTag(document,"script")[0],r=!0,e.src="https://player.vimeo.com/api/player.js",jQuery("head").find("*").each(function(){"https://player.vimeo.com/api/player.js"==jQuery(this).attr("src")&&(r=!1)}),r)&&a.parentNode.insertBefore(e,a))},manageVideoLayer:function(e,t,i,a){if(h[t].videos=void 0===h[t].videos?{}:h[t].videos,void 0===h[t].videos[e[0].id]||!0===a){var r=h[t].videos[e[0].id]=void 0===h[t].videos[e[0].id]?u(e.data(),void 0,i):h[t].videos[e[0].id];if(r.audio=void 0!==r.audio&&r.audio,h.ISM&&r.opom)0==e.find("rs-poster").length&&e.append('<rs-poster class="noSwipe" style="background-image:url('+r.poster+');"></rs-poster>');else{r.jsposter=e.find("rs-poster"),r.id=e[0].id,r.pload="auto"===r.pload||"canplay"===r.pload||"canplaythrough"===r.pload||"progress"===r.pload?"auto":r.pload,r.type=null!=r.mp4||null!=r.webm?"html5":null!=r.ytid&&1<String(r.ytid).length?"youtube":null!=r.vimeoid&&1<String(r.vimeoid).length?"vimeo":"none",r.newtype="html5"==r.type&&0==e.find(r.audio?"audio":"video").length?"html5":"youtube"==r.type&&0==e.find("iframe").length?"youtube":"vimeo"==r.type&&0==e.find("iframe").length?"vimeo":"none",r.extras="",r.posterMarkup=void 0===r.posterMarkup?"":r.posterMarkup,!r.audio&&"1sttime"==r.aplay&&r.pausetimer&&r.bgvideo&&h.sA(e.closest("rs-slide")[0],"rspausetimeronce",1),r.audio||!r.bgvideo||!r.pausetimer||1!=r.aplay&&"true"!=r.aplay&&"no1sttime"!=r.aplay||h.sA(e.closest("rs-slide")[0],"rspausetimeralways",1),r.noInt&&e.find("*").addClass("rs-nointeraction"),!(null!=r.poster&&2<r.poster.length)||h.ISM&&r.npom||0==r.jsposter.length&&(r.posterMarkup+='<rs-poster class="noSwipe" style="background-image:url('+r.poster+');"></rs-poster>');var o=!0;switch(r.cSS="created",r.cRS="created",r.newtype){case"html5":1==window.isSafari11&&(h[t].slideHasIframe=!0),r.audio&&e.addClass("rs-audio"),r.tag=r.audio?"audio":"video";var s="video"===r.tag&&(h.is_mobile()||h.isSafari11())?r.aplay&&"no1sttime"!==r.aplay||"true"===r.aplay?"muted playsinline autoplay":r.inline?" playsinline":"":"",n='<div class="html5vid rs_html5vidbasicstyles '+(!1===r.afs?"hidefullscreen":"")+'">',l=r.bgvideo&&/^([\w]+\:)?\/\//.test(r.mp4)&&(-1===r.mp4.indexOf(location.host)||-1!==r.mp4.indexOf("."+location.host))&&r.crossOriginVideo?' crossOrigin="anonymous" ':"";n+="<"+r.tag+" "+s+" "+(r.controls&&"none"!==r.controls?" controls":"")+l+(r.bgvideo&&-1==s.indexOf("autoplay")?" autoplay":"")+(r.bgvideo&&-1==s.indexOf("muted")?" muted":"")+' style="'+("Edge"!==h.get_browser()?(r.fitCover?"object-fit:cover;background-size:cover;":"")+"opacity:0;width:100%; height:100%":"")+'" class="" '+(r.loop?"loop":"")+' preload="'+r.pload+'">',"video"===r.tag&&null!=r.webm&&"firefox"==h.get_browser().toLowerCase()&&(n=n+'<source src="'+r.webm+'" type="video/webm" />'),null!=r.mp4&&(n=n+'<source src="'+r.mp4+'" type="'+("video"===r.tag?"video/mp4":0<r.mp4.toLowerCase().indexOf("m4a")?"audio/x-m4a":"audio/mpeg")+'" />'),null!=r.ogv&&(n=n+'<source src="'+r.mp4+'" type="'+r.tag+'/ogg" />'),n=(n+="</"+r.tag+"></div>")+r.posterMarkup,r.controls&&!r.audio&&void 0===r.poster||r.bgvideo||(n+='<div class="tp-video-play-button"><i class="revicon-right-dir"></i><span class="tp-revstop">&nbsp;</span></div>'),r.videomarkup=n,o=!1,h.ISM&&r.notonmobile||h.isIE(8)||e.append(n),r.jvideo=e.find(r.tag),r.video=r.jvideo[0],r.html5vid=r.jvideo.parent(),d(r.video,"canplay",(g(l=e,t),void h.resetVideo(l,t)));break;case"youtube":h[t].slideHasIframe=!0,r.controls&&"none"!==r.controls||(r.vatr=r.vatr.replace("controls=1","controls=0"),-1==r.vatr.toLowerCase().indexOf("controls")&&(r.vatr=r.vatr+"&controls=0")),!r.inline&&"RS-BGVIDEO"!==e[0].tagName||(r.vatr=r.vatr+"&playsinline=1"),-1!=r.ssec&&(r.vatr+="&start="+r.ssec),-1!=r.esec&&(r.vatr+="&end="+r.esec);s=r.vatr.split("origin=https://");r.vatrnew=1<s.length?s[0]+"origin=https://"+(self.location.href.match(/www/gi)&&!s[1].match(/www/gi)?"www."+s[1]:s[1]):r.vatr,r.videomarkup='<iframe allow="autoplay; '+(!0===r.afs?"fullscreen":"")+'" type="text/html" src="https://www.youtube-nocookie.com/embed/'+r.ytid+"?"+r.vatrnew+'"  width="100%" height="100%" class="intrinsic-ignore" style="opacity:0;visibility:visible;width:100%;height:100%"></iframe>';break;case"vimeo":h[t].slideHasIframe=!0,r.vatr=r.vatr.replaceAll("&background=0","").replaceAll("&background=1",""),r.vatr=r.vatr.replaceAll("background=0","").replaceAll("background=1",""),!r.controls||"none"===r.controls||r.bgvideo?(r.vatr=r.vatr.replace("background=0","background=1"),-1==r.vatr.toLowerCase().indexOf("background")&&(r.vatr=r.vatr+"&background=1")):(r.vatr=r.vatr.replace("background=1","background=0"),-1==r.vatr.toLowerCase().indexOf("background")&&(r.vatr=r.vatr+"&background=0")),r.vatr="autoplay="+(!0===r.aplay?1:0)+("&"==r.vatr[0]?"":"&")+r.vatr,r.bgvideo&&(r.prePlayForaWhile=!0),h.ISM&&!0===r.aplay&&(r.vatr="muted=1"+("&"==r.vatr[0]?"":"&")+r.vatr),r.loop&&(r.vatr="loop=1"+("&"==r.vatr[0]?"":"&")+r.vatr),r.videomarkup='<iframe  allow="autoplay; '+(!0===r.afs?"fullscreen":"")+'" src="https://player.vimeo.com/video/'+r.vimeoid+"?"+r.vatr+'" '+(!0===r.afs?"webkitallowfullscreen mozallowfullscreen allowfullscreen":"")+' width="100%" height="100%" class="intrinsic-ignore" style="opacity:0;visibility:visible;width:100%;height:100%"></iframe>'}if(!(null!=r.poster&&2<r.poster.length)||h.ISM&&r.npom){if(h.ISM&&r.notonmobile)return!1;0!=e.find("iframe").length||"youtube"!=r.type&&"vimeo"!=r.type||(delete r.vimeoplayer,e.append(r.videomarkup),b(e,t,!("vimeo"!==r.newtype||!r.bgvideo),!0))}else o&&0==e.find("rs-poster").length&&e.append(r.posterMarkup),0==e.find("iframe").length&&(r.jsposter=e.find("rs-poster"),r.jsposter.on("click",function(){if(h.playVideo(e,t,!0),h.ISM){if(r.notonmobile)return!1;tpGS.gsap.to(r.jsposter,.3,{opacity:0,visibility:"hidden",force3D:"auto",ease:"power3.inOut"}),h.showVideo(e.find("iframe"))}}));"none"!==r.doverlay&&void 0!==r.doverlay&&(a=h.createOverlay(t,r.doverlay,r.doverlaysize,{0:r.doverlaycolora,1:r.doverlaycolorb}),r.bgvideo&&1!=e.closest("rs-sbg-wrap").find("rs-dotted").length?e.closest("rs-sbg-wrap").append('<rs-dotted style="background-image:'+a+'"></rs-dotted>'):r.bgvideo||1==e.find("rs-dotted").length||e.append('<rs-dotted style="background-image:'+a+'"></rs-dotted>')),r.bgvideo&&("youtube"!==r.type&&"vimeo"!==r.type&&(e[0].style.display="none"),e[0].style.zIndex=0,tpGS.gsap.set(e.find("video, iframe"),{opacity:0}))}}}});function m(e,t){var i=h[e].videos[t[0].id];(i.bgvideo||t.hasClass("rs-fsv"))&&((void 0===i.ratio||i.ratio.split(":").length<=1)&&(i.ratio="16:9"),requestAnimationFrame(function(){h.prepareCoveredVideo(e)}))}function v(e,t,i){e.cSS="playing",e.vimeostarted=!0,e.nextslidecalled=!1,e.jsposter=void 0===e.jsposter||0===e.jsposter.length?t.find("rs-poster"):e.jsposter,e.jvideo=t.find("iframe"),h[i].c.trigger("revolution.slide.onvideoplay",f(e.vimeoplayer,"vimeo",e)),h[i].stopByVideo=e.pausetimer,S(t,i),"mute"==e.volume||0===e.volume||h.lastToggleState(t.data("videomutetoggledby"))||!0===h[i].globalmute?(e.volumetoken=!0,e.vimeoplayer.setMuted(!0)):o(e,parseInt(e.volcache,0)/100||.75),h.toggleState(e.videotoggledby)}function l(e){return"t"===e||!0===e||"true"===e||"f"!==e&&!1!==e&&"false"!==e&&e}var d=function(e,t,i){e.addEventListener?e.addEventListener(t,i,{capture:!1,passive:!0}):e.attachEvent(t,i,{capture:!1,passive:!0})},f=function(e,t,i){var a={};return a.video=e,a.type=t,a.settings=i,a},o=function(i,a){var r=i.vimeoplayer;r.getPaused().then(function(e){i.volumetoken=!0;var t=!e,e=r.setVolume(a);void 0!==e&&e.then(function(e){r.getPaused().then(function(e){t===e&&(i.volume="mute",r.getMuted().then(function(e){e||(i.volumetoken=!0,r.setMuted(!0))}),r.play())}).catch(function(e){console.log("Get Paused Function Failed for Vimeo Volume Changes Inside the Promise")})}).catch(function(e){t&&(i.volume="mute",i.volumetoken=!0,r.setMuted(!0),r.play()),h.ISM&&k(i,0)})}).catch(function(){console.log("Get Paused Function Failed for Vimeo Volume Changes")})},y=function(e,t){var i=e.player.getPlayerState?e.player.getPlayerState():-1;"mute"===t?e.player.mute&&e.player.mute():(e.player.unMute&&e.player.unMute(),e.player.setVolume&&e.player.setVolume(t)),setTimeout(function(){1===i&&1!==e.player.getPlayerState()&&(e.player.mute(),e.player.playVideo())},39)},s=function(t,i,a){var e;"playVideo"===t.cRS&&(void 0!==(e=t.video.play())&&e.then(function(e){!0===t.twaudio&&!0!==h[a].globalmute&&(t.twaudio=!1,h.clickedOnce)&&(t.video.volume=t.volcache,t.volume=t.volcache,t.video.muted=!1)}).catch(function(e){t.video.pause(),!0!==i&&s(t,!0,a)}),h.ISM)&&k(t,0)},c=function(t){var e;"playVideo"===t.cRS&&void 0!==(e=t.vimeoplayer.play())&&e.then(function(e){}).catch(function(e){t.vimeoplayer.volumetoken=!0,t.vimeoplayer.setMuted(!0),t.vimeoplayer.play()})},p=function(e){"playVideo"===e.cRS&&(e.player.playVideo(),1!==e.player.getPlayerState())&&tpGS.gsap.delayedCall(.5,function(){p(e)})},w=function(e,t,i,a){clearTimeout(t.repeatedPosterCalls),t.repeatedPosterCalls=setTimeout(function(){"show"===i||"playing"===t.cSS&&!0!==t.VideoIsVisible?(void 0!==t.showhideposter&&t.showhideposter.pause(),t.showhideposter=tpGS.gsap.timeline(),0<t.jsposter.length&&t.showhideposter.add(tpGS.gsap.to(t.jsposter,.3,{zIndex:5,autoAlpha:0,force3D:"auto",ease:"power3.inOut"}),0),0<t.jvideo.length&&t.showhideposter.add(tpGS.gsap.to(t.jvideo,void 0!==a?a:.001,{opacity:1,display:"block",ease:0<t.jsposter.length?"power3.inOut":"power3.out"}),0),t.VideoIsVisible=!0):("hide"===i||"paused"===t.cSS&&1!=h.checkfullscreenEnabled(e)&&0<t.jsposter.length&&!1!==t.VideoIsVisible&&!0!==t.seeking)&&(void 0!==t.showhideposter&&t.showhideposter.pause(),t.showhideposter=tpGS.gsap.timeline(),0<t.jsposter.length&&t.showhideposter.add(tpGS.gsap.to(t.jsposter,.3,{zIndex:5,autoAlpha:1,force3D:"auto",ease:"power3.inOut"}),0),0<t.jvideo.length&&t.showhideposter.add(tpGS.gsap.to(t.jvideo,void 0!==a?a:.001,{opacity:0,ease:0<t.jsposter.length?"power3.inOut":"power3.out"}),.3),t.bgvideo&&void 0!==t.nBG&&void 0!==t.nBG.loadobj&&(t.nBG.video=t.nBG.loadobj.img),t.VideoIsVisible=!1)},void 0!==i?0:100)},b=function(r,o,e,s){var n=h[o].videos[r[0].id],t="iframe"+Math.round(1e5*Math.random()+1);if(n.jvideo=r.find("iframe"),m(o,r),n.jvideo.attr("id",t),n.startvideonow=e,n.videolistenerexist){if(e)switch(n.type){case"youtube":h.playVideo(r,o),-1!=n.ssec&&n.player.seekTo(n.ssec);break;case"vimeo":h.playVideo(r,o),-1!=n.ssec&&n.vimeoplayer.seekTo(n.ssec)}}else switch(n.type){case"youtube":"undefined"==typeof YT||void 0===YT.Player?(h.checkVideoApis(r,o),setTimeout(function(){b(r,o,e,s)},50)):n.player=new YT.Player(t,{events:{onStateChange:function(e){e.data==YT.PlayerState.PLAYING?(n.cSS="playing",!(h[o].onceVideoPlayed=!0)===n.player.isMuted()&&(n.volume=n.volcache=n.player.getVolume()),"mute"==n.volume||0===n.volume||h.lastToggleState(r.data("videomutetoggledby"))||!0===h[o].globalmute?n.player.mute():y(n,parseInt(n.volcache,0)||75),h[o].stopByVideo=!0,S(r,o),n.pausetimer?h[o].c.trigger("stoptimer"):h[o].stopByVideo=!1,h[o].c.trigger("revolution.slide.onvideoplay",f(n.player,"youtube",n)),h.toggleState(n.videotoggledby)):(n.cSS="paused",0==e.data&&n.loop&&(-1!=n.ssec&&n.player.seekTo(n.ssec),h.playVideo(r,o),h.toggleState(n.videotoggledby)),-1!=e.data&&3!=e.data&&(h[o].stopByVideo=!1,h[o].tonpause=!1,x(r,o),h[o].c.trigger("starttimer"),h[o].c.trigger("revolution.slide.onvideostop",f(n.player,"youtube",n)),null!=h[o].videoIsPlaying&&h[o].videoIsPlaying.attr("id")!=r.attr("id")||h.unToggleState(n.videotoggledby)),0==e.data&&n.nse?(document.fullscreenElement!==r.find("iframe")[0]&&document.webkitFullscreenElement!==r.find("iframe")[0]||_(),n.nseTriggered=!0,h[o].c.revnext(),x(r,o)):(x(r,o),h[o].stopByVideo=!1,3!==e.data&&(-1!=n.lasteventdata&&3!=n.lasteventdata&&void 0!==n.lasteventdata||-1!=e.data&&3!=e.data)&&h[o].c.trigger("starttimer"),h[o].c.trigger("revolution.slide.onvideostop",f(n.player,"youtube",n)),null!=h[o].videoIsPlaying&&h[o].videoIsPlaying.attr("id")!=r.attr("id")||h.unToggleState(n.videotoggledby))),clearTimeout(n.postOrVideoTimer),3!==e.data&&(n.postOrVideoTimer=setTimeout(function(){w(o,n)},1===n.lasteventdata&&2===e.data||2===n.lasteventdata&&3!==e.data?1e3:0),n.lasteventdata=e.data)},onReady:function(e){var t,i=h.is_mobile(),a=r.hasClass("rs-layer-video");n.ready=!0,!i&&(!h.isSafari11()||i&&a)||"RS-BGVIDEO"!==r[0].tagName&&(!a||!0!==n.aplay&&"true"!==n.aplay)||(t=!0,n.player.setVolume(n.volcache),n.volume="mute",n.player.mute(),clearTimeout(r.data("mobilevideotimr")),2!==n.player.getPlayerState()&&-1!==n.player.getPlayerState())||r.data("mobilevideotimr",setTimeout(function(){h.playVideo(r,o)},500)),t||"mute"!=n.volume||(n.player.setVolume(n.volcache),n.player.mute()),r.addClass("rs-apiready"),null==n.speed&&1===n.speed||e.target.setPlaybackRate(parseFloat(n.speed)),n.jsposter.off("click"),n.jsposter.on("click",function(){h.playVideo(r,o,!0)}),n.startvideonow?(h.playVideo(r,o),-1!=n.ssec&&n.player.seekTo(n.ssec)):s&&w(o,n,"show",.2),n.videolistenerexist=!0}}});break;case"vimeo":if("undefined"==typeof Vimeo||void 0===Vimeo.Player)h.checkVideoApis(r,o),setTimeout(function(){b(r,o,e,s)},50);else{for(var i,a={},l=p=n.jvideo.attr("src"),d=/([^&=]+)=([^&]*)/g;i=d.exec(l);)a[decodeURIComponent(i[1])]=decodeURIComponent(i[2]);var c,p=(p=null!=a.player_id?p.replace(a.player_id,t):p+"&player_id="+t).replace(/&api=0|&api=1/g,""),g=h.is_mobile()||h.isSafari11(),u="RS-BGVIDEO"===r[0].tagName;g&&u&&(p+="&background=1"),n.jvideo.attr("src",p),n.vimeoplayer=void 0===n.vimeoplayer||!1===n.vimeoplayer?new Vimeo.Player(t):n.vimeoplayer,g&&(c=!(!u&&!n.aplay&&"true"!==n.aplay)||c)&&(n.volumetoken=!0,n.vimeoplayer.setMuted(!0),n.volume="mute"),n.vimeoplayer.on("play",function(e){h[o].onceVideoPlayed=!0,n.cSS="playing",n.vimeostarted||v(n,r,o)}),n.vimeoplayer.on("loaded",function(e){var t={};n.vimeoplayer.getVideoWidth().then(function(e){t.width=e,void 0!==t.width&&void 0!==t.height&&(n.ratio=t.width+":"+t.height,n.vimeoplayerloaded=!0,m(o,r))}),n.vimeoplayer.getVideoHeight().then(function(e){t.height=e,void 0!==t.width&&void 0!==t.height&&(n.ratio=t.width+":"+t.height,n.vimeoplayerloaded=!0,m(o,r))}),n.startvideonow?("mute"===n.volume&&(n.volumetoken=!0,n.vimeoplayer.setMuted(!0)),h.playVideo(r,o),-1!=n.ssec&&n.vimeoplayer.setCurrentTime(n.ssec)):s&&w(o,n,"show",.2),null==n.speed&&1===n.speed||n.vimeoplayer.setPlaybackRate(parseFloat(n.speed))}),r.addClass("rs-apiready"),n.vimeoplayer.on("volumechange",function(e){n.volumetoken&&(n.volume=e.volume),n.volumetoken=!1}),n.vimeoplayer.on("timeupdate",function(e){w(o,n),n.vimeostarted||0===e.percent||void 0!==h[o].activeRSSlide&&n.slideid!==h.gA(h[o].slides[h[o].activeRSSlide],"key")||v(n,r,o),n.pausetimer&&"playing"==h[o].sliderstatus&&(h[o].stopByVideo=!0,h[o].c.trigger("stoptimer")),n.currenttime=e.seconds,0!=n.esec&&-1!==n.esec&&n.esec<e.seconds&&!0!==n.nextslidecalled&&(n.loop?(h.playVideo(r,o),n.vimeoplayer.setCurrentTime(-1!==n.ssec?n.ssec:0)):(n.nse&&(n.nseTriggered=!0,n.nextslidecalled=!0,h[o].c.revnext()),n.vimeoplayer.pause())),n.prePlayForaWhile&&n.vimeoplayer.pause()}),n.vimeoplayer.on("ended",function(e){n.cSS="paused",w(o,n),n.vimeostarted=!1,x(r,o),h[o].stopByVideo=!1,h[o].c.trigger("starttimer"),h[o].c.trigger("revolution.slide.onvideostop",f(n.vimeoplayer,"vimeo",n)),n.nse&&(n.nseTriggered=!0,h[o].c.revnext()),null!=h[o].videoIsPlaying&&h[o].videoIsPlaying.attr("id")!=r.attr("id")||h.unToggleState(n.videotoggledby)}),n.vimeoplayer.on("pause",function(e){n.vimeostarted=!1,n.cSS="paused",w(o,n),h[o].stopByVideo=!1,h[o].tonpause=!1,x(r,o),h[o].c.trigger("starttimer"),h[o].c.trigger("revolution.slide.onvideostop",f(n.vimeoplayer,"vimeo",n)),null!=h[o].videoIsPlaying&&h[o].videoIsPlaying.attr("id")!=r.attr("id")||h.unToggleState(n.videotoggledby)}),n.jsposter.off("click"),n.jsposter.on("click",function(){if(!h.ISM)return h.playVideo(r,o,!0),!1}),n.videolistenerexist=!0}}},_=function(){document.exitFullscreen&&document.fullscreen?document.exitFullscreen():document.mozCancelFullScreen&&document.mozFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitIsFullScreen&&document.webkitExitFullscreen()},g=function(t,i,e){var a,r=h[i].videos[t[0].id];if(h.ISM&&r.notonmobile)return!1;r.metaloaded=!0,"html5"===r.newtype&&r.bgvideo&&(r.nBG=h[i].sbgs[t[0].dataset.key],void 0===r.nBG.shadowCanvas&&(r.nBG.shadowCanvas=document.createElement("canvas"),r.nBG.shadowCTX=r.nBG.shadowCanvas.getContext("2d"),r.nBG.shadowCanvas.style.background="transparent",r.nBG.shadowCanvas.style.opacity=1),r.nBG.isHTML5=!0,r.nBG.video=void 0!==r.nBG.loadobj&&void 0!==r.nBG.loadobj.img?r.nBG.loadobj.img:r.video,r.nBG.drawVideoCanvasImagesRecall=!1),r.controls&&!r.audio&&void 0===r.poster||r.noInt||(0!=t.find(".tp-video-play-button").length||h.ISM||t.append('<div class="tp-video-play-button"><i class="revicon-right-dir"></i><span class="tp-revstop">&nbsp;</span></div>'),a="video, rs-poster, .tp-video-play-button",void 0!==r.poster&&r.controls&&(a=".tp-video-play-button"),t.find(a).on("click",function(){!1===r.loop&&0<r.esec&&r.esec<=r.video.currentTime||(t.hasClass("videoisplaying")?h.stopVideo(t,i):h.playVideo(t,i,!0))})),(t.hasClass("rs-fsv")||r.bgvideo)&&(r.bgvideo||t.hasClass("rs-fsv")?(r.html5vid.addClass("fullcoveredvideo"),void 0!==r.ratio&&1!=r.ratio.split(":").length||(r.ratio="16:9"),h.prepareCoveredVideo(i)):r.html5vid.addClass("rs-fsv")),d(r.video,"canplaythrough",function(){h.preLoadAudioDone(t,i,"canplaythrough")}),d(r.video,"canplay",function(){h.preLoadAudioDone(t,i,"canplay")}),d(r.video,"progress",function(){h.preLoadAudioDone(t,i,"progress")}),d(r.video,"pause",function(){h.ISM&&k(r,1)}),d(r.video,"timeupdate",function(e){this.BGrendered=!0,w(i,r),-1===r.esec&&r.loop&&1==window.isSafari11&&(r.esec=r.video.duration-.075),void 0!==r.lastCurrentTime?r.fps=r.video.currentTime-r.lastCurrentTime:r.fps=.1,r.lastCurrentTime=r.video.currentTime,0!=r.esec&&-1!=r.esec&&r.esec<r.video.currentTime&&!r.nextslidecalled&&(r.loop?(s(r,void 0,i),r.video.currentTime=-1===r.ssec?.5:r.ssec):(r.nse&&(r.nseTriggered=!0,r.nextslidecalled=!0,h[i].jcnah=!0,h[i].c.revnext(),setTimeout(function(){h[i].jcnah=!1},1e3)),r.video.pause()))}),d(r.video,"play",function(){r.cSS="playing",w(i,r),r.bgvideo&&(r.nBG.drawVideoCanvasImagesRecall=!0,r.nBG.videoisplaying=!0,r.nBG.video=r.video,h.updateVideoFrames(i,r.nBG)),h[i].onceVideoPlayed=!0,r.nextslidecalled=!1,r.volume=null!=r.volume&&"mute"!=r.volume?parseFloat(r.volcache):r.volume,r.volcache=null!=r.volcache&&"mute"!=r.volcache?parseFloat(r.volcache):r.volcache,h.is_mobile()||(!0===h[i].globalmute?r.video.muted=!0:r.video.muted="mute"==r.volume,r.volcache=h.isNumeric(r.volcache)&&1<r.volcache?r.volcache/100:r.volcache,"mute"==r.volume?r.video.muted=!0:null!=r.volcache&&(r.video.volume=r.volcache)),t.addClass("videoisplaying"),S(t,i),clearTimeout(r.showCoverSoon),!0!==r.pausetimer||"audio"==r.tag?(h[i].stopByVideo=!1,h[i].c.trigger("revolution.slide.onvideostop",f(r.video,"html5",r))):(h[i].stopByVideo=!0,h[i].c.trigger("revolution.slide.onvideoplay",f(r.video,"html5",r))),r.pausetimer&&"playing"==h[i].sliderstatus&&(h[i].stopByVideo=!0,h[i].c.trigger("stoptimer")),h.toggleState(r.videotoggledby)}),d(r.video,"seeked",function(){r.seeking=!1}),d(r.video,"seeking",function(){r.seeking=!0}),d(r.video,"pause",function(e){r.cSS="paused",w(i,r),t.removeClass("videoisplaying"),r.bgvideo&&(r.nBG.drawVideoCanvasImagesRecall=!1,r.nBG.videoisplaying=!1),h[i].stopByVideo=!1,x(t,i),"audio"!=r.tag&&h[i].c.trigger("starttimer"),h[i].c.trigger("revolution.slide.onvideostop",f(r.video,"html5",r)),null!=h[i].videoIsPlaying&&h[i].videoIsPlaying.attr("id")!=t.attr("id")||h.unToggleState(r.videotoggledby)}),d(r.video,"ended",function(){r.cSS="paused",document.fullscreenElement!==r.video&&document.webkitFullscreenElement!==r.video||_(),w(i,r),x(t,i),h[i].stopByVideo=!1,x(t,i),"audio"!=r.tag&&h[i].c.trigger("starttimer"),h[i].c.trigger("revolution.slide.onvideostop",f(r.video,"html5",t.data())),r.nse&&0<r.video.currentTime&&(1==!h[i].jcnah&&(r.nseTriggered=!0,h[i].c.revnext(),h[i].jcnah=!0),setTimeout(function(){h[i].jcnah=!1},1500)),t.removeClass("videoisplaying"),r.bgvideo&&(r.nBG.drawVideoCanvasImagesRecall=!1,r.nBG.videoisplaying=!1),!0!==h[i].inviewport&&void 0!==h[i].inviewport||(h[i].lastplayedvideos=[])}),d(r.video,"volumechange",function(){r.video.muted?r.volume="mute":r.volume=r.volcache=r.video.volume})},u=function(e,t,i){e.audio="audio"===t;var a,r=void 0===e.video?[]:e.video.split(";"),o={volume:e.audio?1:"mute",pload:"auto",ratio:"16:9",loop:!0,aplay:"true",fitCover:!0,afs:!0,controls:!1,nse:!0,npom:!1,opom:!1,inline:!0,notonmobile:!1,start:-1,end:-1,doverlay:"none",doverlaysize:1,doverlaycolora:"transparent",doverlaycolorb:"#000000",scop:!1,rwd:!0,speed:1,ploadwait:5,stopAV:1!==e.bgvideo,noInt:!1,volcache:75,crossOriginVideo:!1};for(a in r)if(r.hasOwnProperty(a)){var s=r[a].split(":");switch(s[0]){case"v":o.volume=s[1];break;case"twa":o.twaudio=s[1];break;case"vd":o.volcache=s[1];break;case"p":o.pload=s[1];break;case"ar":o.ratio=s[1]+(void 0!==s[2]?":"+s[2]:"");break;case"ap":o.aplay=l(s[1]);break;case"vfc":o.fitCover=l(s[1]);break;case"afs":o.afs=l(s[1]);break;case"vc":o.controls=s[1];break;case"nse":o.nse=l(s[1]);break;case"npom":o.npom=l(s[1]);break;case"opom":o.opom=l(s[1]);break;case"t":o.vtype=s[1];break;case"inl":o.inline=l(s[1]);break;case"nomo":o.notonmobile=l(s[1]);break;case"sta":o.start=s[1]+(void 0!==s[2]?":"+s[2]:"");break;case"end":o.end=s[1]+(void 0!==s[2]?":"+s[2]:"");break;case"do":o.doverlay=s[1];break;case"dos":o.doverlaysize=s[1];break;case"doca":o.doverlaycolora=s[1];break;case"docb":o.doverlaycolorb=s[1];break;case"scop":o.scop=l(s[1]);break;case"rwd":o.rwd=l(s[1]);break;case"sp":o.speed=s[1];break;case"vw":o.ploadwait=parseInt(s[1],0)||5;break;case"sav":o.stopAV=l(s[1]);break;case"noint":o.noInt=l(s[1]);break;case"l":o.loopcache=s[1],o.loop="loop"===s[1]||"loopandnoslidestop"===s[1]||"none"!==s[1]&&l(s[1]);break;case"ptimer":o.pausetimer=l(s[1]);break;case"sat":o.waitToSlideTrans=l(s[1]);break;case"crossOriginVideo":o.crossOriginVideo=l(s[1]);break;case"poch":o.pauseOnSlideChange=l(s[1])}}return null==e.mp4&&null==e.webm&&(o.fitCover=!1),void 0!==e.bgvideo&&(o.bgvideo=e.bgvideo),o.noInt&&(o.controls=!1),void 0!==e.mp4&&(o.mp4=e.mp4),void 0!==e.videomp4&&(o.mp4=e.videomp4),void 0!==e.ytid&&(o.ytid=e.ytid),void 0!==e.ogv&&(o.ogv=e.ogv),void 0!==e.webm&&(o.webm=e.webm),void 0!==e.vimeoid&&(o.vimeoid=e.vimeoid),void 0!==e.vatr&&(o.vatr=e.vatr),void 0!==e.videoattributes&&(o.vatr=e.videoattributes),void 0!==e.poster&&(o.poster=e.poster),o.slideid=i,o.aplay="true"===o.aplay||o.aplay,1===o.bgvideo&&(o.volume="mute"),o.ssec=n(o.start),o.esec=n(o.end),o.pausetimer=void 0===o.pausetimer?"loopandnoslidestop"!==o.loopcache:o.pausetimer,o.inColumn=e._incolumn,o.audio=e.audio,!0!==o.loop&&"true"!==o.loop||!0!==o.nse&&"true"!==o.nse||(o.loop=!1),o.aplay&&o.twaudio&&!o.bgvideo&&(o.twaudio=!0),o},S=function(e,t){if(h[t].playingvideos=void 0===h[t].playingvideos?new Array:h[t].playingvideos,h[t].videos[e[0].id].stopAV&&void 0!==h[t].playingvideos&&0<h[t].playingvideos.length)for(var i in h[t].lastplayedvideos=jQuery.extend(!0,[],h[t].playingvideos),h[t].playingvideos)h[t].playingvideos.hasOwnProperty(i)&&h.stopVideo(h[t].playingvideos[i],t);h[t].playingvideos.push(e),h[t].videoIsPlaying=e},x=function(e,t){void 0!==h[t]&&void 0!==h[t]&&null!=h[t].playingvideos&&0<=jQuery.inArray(e,h[t].playingvideos)&&h[t].playingvideos.splice(jQuery.inArray(e,h[t].playingvideos),1)},k=function(e,t){var i,a,r;void 0!==e&&(void 0===t&&(t=0),h.ISM)&&!e.bgvideo&&(e.playPauseBtnTween&&e.playPauseBtnTween.kill&&e.playPauseBtnTween.kill(),i=h.closestNode(e.video,"RS-LAYER"),a=e.controls?1:0,r=e.controls?0:.3,e.controls&&e.poster&&0===t&&(a=r=0),i)&&(e.playPauseBtnTween=tpGS.gsap.to(i.querySelector(".tp-video-play-button"),{duration:r,delay:a,opacity:t}))};window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.video={loaded:!0,version:"6.6.9"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}(jQuery);
// source --> https://oldsite.uoi.gr/wp-includes/js/jquery/ui/menu.min.js?ver=1.13.3 
/*!
 * jQuery UI Menu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../safe-active-element","../unique-id","../version","../widget"],e):e(jQuery)}(function(a){"use strict";return a.widget("ui.menu",{version:"1.13.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault(),this._activateItem(e)},"click .ui-menu-item":function(e){var t=a(e.target),i=a(a.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active)&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this._menuItems().first();t||this.focus(e,i)},blur:function(e){this._delay(function(){a.contains(this.element[0],a.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e,!0),this.mouseHandled=!1}})},_activateItem:function(e){var t,i;this.previousFilter||e.clientX===this.lastMousePosition.x&&e.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:e.clientX,y:e.clientY},t=a(e.target).closest(".ui-menu-item"),i=a(e.currentTarget),t[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i))},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=a(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,i,s,n=!0;switch(e.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(e);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case a.ui.keyCode.HOME:this._move("first","first",e);break;case a.ui.keyCode.END:this._move("last","last",e);break;case a.ui.keyCode.UP:this.previous(e);break;case a.ui.keyCode.DOWN:this.next(e);break;case a.ui.keyCode.LEFT:this.collapse(e);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(e);break;case a.ui.keyCode.ESCAPE:this.collapse(e);break;default:t=this.previousFilter||"",s=n=!1,i=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),i===t?s=!0:i=t+i,t=this._filterMenuItems(i),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=a(this),t=e.prev(),i=a("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(e=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=a(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),t=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(t,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){var i;"icons"===e&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,s;this._hasScroll()&&(t=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-t-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),e=e.outerHeight(),t<0?this.activeMenu.scrollTop(i+t):s<t+e&&this.activeMenu.scrollTop(i+t-s+e))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var e=i?this.element:a(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},i?0:this.delay)},_close:function(e){(e=e||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!a(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(e){return(e||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(e,t,i){var s;(s=this.active?"first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").last():this.active[e+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[t]()),this.focus(i,s)},nextPage:function(e){var t,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(t=a(this)).offset().top-i-s<0}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=a(this)).offset().top-i+s}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||a(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var e=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),t=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return t.test(String.prototype.trim.call(a(this).children(".ui-menu-item-wrapper").text()))})}})});
// source --> https://oldsite.uoi.gr/wp-includes/js/jquery/ui/selectmenu.min.js?ver=1.13.3 
/*!
 * jQuery UI Selectmenu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../form-reset-mixin","../keycode","../labels","../position","../unique-id","../version","../widget"],e):e(jQuery)}(function(u){"use strict";return u.widget("ui.selectmenu",[u.ui.formResetMixin,{version:"1.13.3",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=u()},_drawButton:function(){var e,t=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.trigger("focus"),e.preventDefault()}}),this.element.hide(),this.button=u("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=u("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t._rendered||t._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=u("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=u("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,t){e.preventDefault(),i._setSelection(),i._select(t.item.data("ui-selectmenu-item"),e)},focus:function(e,t){t=t.item.data("ui-selectmenu-item");null!=i.focusIndex&&t.index!==i.focusIndex&&(i._trigger("focus",e,{item:t}),i.isOpen||i._select(t,e)),i.focusIndex=t.index,i.button.attr("aria-activedescendant",i.menuItems.eq(t.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(u.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var t=u("<span>");return this._setText(t,e.label),this._addClass(t,"ui-selectmenu-text"),t},_renderMenu:function(n,e){var s=this,o="";u.each(e,function(e,t){var i;t.optgroup!==o&&(i=u("<li>",{text:t.optgroup}),s._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(n),o=t.optgroup),s._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(e,t){var i=u("<li>"),n=u("<div>",{title:t.element.attr("title")});return t.disabled&&this._addClass(i,null,"ui-state-disabled"),t.hidden?i.prop("hidden",!0):this._setText(n,t.label),i.append(n).appendTo(e)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),(i="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0)).length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(e){!this.isOpen||u(e.target).closest(".ui-selectmenu-menu, #"+u.escapeSelector(this.ids.button)).length||this.close(e)}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(e){var t=!0;switch(e.keyCode){case u.ui.keyCode.TAB:case u.ui.keyCode.ESCAPE:this.close(e),t=!1;break;case u.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case u.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case u.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case u.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case u.ui.keyCode.LEFT:this._move("prev",e);break;case u.ui.keyCode.RIGHT:this._move("next",e);break;case u.ui.keyCode.HOME:case u.ui.keyCode.PAGE_UP:this._move("first",e);break;case u.ui.keyCode.END:case u.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),t=!1}t&&e.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){e=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(e,t){var i;"icons"===e&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,t.button)),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e=(e=(e=e&&(e.jquery||e.nodeType?u(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1===e?this.button.css("width",""):(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(e){var i=this,n=[];e.each(function(e,t){n.push(i._parseOption(u(t),e))}),this.items=n},_parseOption:function(e,t){var i=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),hidden:i.prop("hidden")||e.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}])});
// source --> https://oldsite.uoi.gr/wp-includes/js/jquery/ui/tooltip.min.js?ver=1.13.3 
/*!
 * jQuery UI Tooltip 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../unique-id","../version","../widget"],t):t(jQuery)}(function(r){"use strict";return r.widget("ui.tooltip",{version:"1.13.3",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=r(this).attr("title");return r("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var e=(t.attr("aria-describedby")||"").split(/\s+/);e.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",String.prototype.trim.call(e.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),e=(t.attr("aria-describedby")||"").split(/\s+/),i=r.inArray(i,e);-1!==i&&e.splice(i,1),t.removeData("ui-tooltip-id"),(e=String.prototype.trim.call(e.join(" ")))?t.attr("aria-describedby",e):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=r("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=r([])},_setOption:function(t,i){var e=this;this._super(t,i),"content"===t&&r.each(this.tooltips,function(t,i){e._updateContent(i.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var o=this;r.each(this.tooltips,function(t,i){var e=r.Event("blur");e.target=e.currentTarget=i.element[0],o.close(e,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=r(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=r(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=r([])},open:function(t){var e=this,i=r(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=r(this);i.data("ui-tooltip-open")&&((t=r.Event("blur")).target=t.currentTarget=this,e.close(t,!0)),i.attr("title")&&(i.uniqueId(),e.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(i,e){var t=this.options.content,o=this,n=e?e.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(e,i,t);(t=t.call(i[0],function(t){o._delay(function(){i.data("ui-tooltip-open")&&(e&&(e.type=n),this._open(e,i,t))})}))&&this._open(e,i,t)},_open:function(t,i,e){var o,n,s,l=r.extend({},this.options.position);function a(t){l.of=t,o.is(":hidden")||o.position(l)}e&&((s=this._find(i))?s.tooltip.find(".ui-tooltip-content").html(e):(i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),o=s.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(e),this.liveRegion.children().hide(),(s=r("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),s.removeAttr("id").find("[id]").removeAttr("id"),s.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:a}),a(t)):o.position(r.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(n=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(n))},13)),this._trigger("open",t,{tooltip:o})))},_registerCloseHandlers:function(t,i){var e={keyup:function(t){t.keyCode===r.ui.keyCode.ESCAPE&&((t=r.Event(t)).currentTarget=i[0],this.close(t,!0))}};i[0]!==this.element[0]&&(e.remove=function(){var t=this._find(i);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,i,e)},close:function(t){var i,e=this,o=r(t?t.currentTarget:this.element),n=this._find(o);n?(i=n.tooltip,n.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),n.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){e._removeTooltip(r(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&r.each(this.parents,function(t,i){r(i.element).attr("title",i.title),delete e.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:i}),n.hiding)||(n.closing=!1)):o.removeData("ui-tooltip-open")},_tooltip:function(t){var i=r("<div>").attr("role","tooltip"),e=r("<div>").appendTo(i),o=i.uniqueId().attr("id");return this._addClass(e,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(t)),this.tooltips[o]={element:t,tooltip:i}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=t.length?t:this.document[0].body},_destroy:function(){var o=this;r.each(this.tooltips,function(t,i){var e=r.Event("blur"),i=i.element;e.target=e.currentTarget=i[0],o.close(e,!0),r("#"+t).remove(),i.data("ui-tooltip-title")&&(i.attr("title")||i.attr("title",i.data("ui-tooltip-title")),i.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==r.uiBackCompat&&r.widget("ui.tooltip",r.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),r.ui.tooltip});
// source --> https://oldsite.uoi.gr/wp-includes/js/dist/vendor/moment.min.js?ver=2.30.1 
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||(t.meridiem,n)),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\d/,t=/\d\d/,he=/\d{3}/,ce=/\d{4}/,fe=/[+-]?\d{6}/,n=/\d\d?/,me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,ge=/\d{1,4}/,we=/[+-]?\d{1,6}/,pe=/\d+/,ke=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,d=/^([1-9]\d|\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",ke),h("YY",n,t),h("YYYY",ge,ce),h("YYYYY",we,fe),h("YYYYYY",we,fe),v(["YYYYY","YYYYYY"],D),v("YYYY",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v("YY",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v("Y",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re("FullYear",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case"Seconds":return i?s.setUTCSeconds(n):s.setSeconds(n);case"Minutes":return i?s.setUTCMinutes(n):s.setMinutes(n);case"Hours":return i?s.setUTCHours(n):s.setHours(n);case"Date":return i?s.setUTCDate(n):s.setDate(n);case"FullYear":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",n,u),h("MM",n,t),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),v(["M","MM"],function(e,t){t[Y]=M(e)-1}),v(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Le="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ve=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,"Month")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,"")),n=f(this.months(n,"")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split("-")).length,n=(n=dt(e[r+1]))?n.split("-"):null;0<t;){if(s=ct(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&&lt[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),h("Z",ve),h("ZZ",ve),v(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+M(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,"Month")+t*n),r&&Ue(e,"Date",Ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,"add"),Qe=qt(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Ke=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",rn),h("NN",rn),h("NNN",rn),h("NNNN",function(e,t){return t.erasNameRegex(e)}),h("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),v(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h("y",pe),h("yy",pe),h("yyy",pe),h("yyyy",pe),h("yo",function(e,t){return t._eraYearOrdinalRegex||pe}),v(["y","yy","yyy","yyyy"],D),v(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),h("G",ke),h("g",ke),h("GG",n,t),h("gg",n,t),h("GGGG",ge,ce),h("gggg",ge,ce),h("GGGGG",we,fe),h("ggggg",we,fe),Oe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",de),v("Q",function(e,t){t[Y]=3*(M(e)-1)}),s("D",["DD",2],"Do","date"),h("D",n,u),h("DD",n,t),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v(["D","DD"],S),v("Do",function(e,t){t[S]=M(e.match(n)[0])});ge=Re("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",ye),h("DDDD",he),v(["DDD","DDDD"],function(e,t,n){n._dayOfYear=M(e)}),s("m",["mm",2],0,"minute"),h("m",n,d),h("mm",n,t),v(["m","mm"],b);var ln,ce=Re("Minutes",!1),we=(s("s",["ss",2],0,"second"),h("s",n,d),h("ss",n,t),v(["s","ss"],T),Re("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",ye,de),h("SS",ye,t),h("SSS",ye,he),ln="SSSS";ln.length<=9;ln+="S")h(ln,pe);function dn(e,t){t[Te]=M(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")v(ln,dn);fe=Re("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3)}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,"Day"),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace("%d",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P("en")._eras,i=0,r=s.length;i<r;++i)switch("string"==typeof s[i].since&&(n=_(s[i].since).startOf("day"),s[i].since=n.valueOf()),typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf()}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ft),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn("ms"),t=kn("s"),ye=kn("m"),he=kn("h"),Fe=kn("d"),_e=kn("w"),me=kn("M"),Qe=kn("Q"),i=kn("y"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn("milliseconds"),fe=Mn("seconds"),ge=Mn("minutes"),Pe=Mn("hours"),d=Mn("days"),vn=Mn("months"),Dn=Mn("years");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),d=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(d<=1?["w"]:d<n.w&&["ww",d]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",d=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?d+i+"H":"")+(s?d+s+"M":"")+(e?d+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),U.lang=Ke,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",ke),h("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v("x",function(e,t,n){n._d=new Date(M(e))}),_.version="2.30.1",H=R,_.fn=u,_.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,"s"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_});