// source --> https://www.navigando.it/cms/wp-content/plugins/gravityforms/js/conditional_logic.js?ver=2.8.18 

var __gf_timeout_handle;

gform.addAction( 'gform_input_change', function( elem, formId, fieldId ) {
	if( ! window.gf_form_conditional_logic ) {
		return;
	}
	var dependentFieldIds = rgars( gf_form_conditional_logic, [ formId, 'fields', gformExtractFieldId( fieldId ) ].join( '/' ) );
	if( dependentFieldIds ) {
		gf_apply_rules( formId, dependentFieldIds );
	}
}, 10 );

function gf_apply_rules(formId, fields, isInit){

	jQuery(document).trigger( 'gform_pre_conditional_logic', [ formId, fields, isInit ] );
	gform.utils.trigger( {
		event: 'gform/conditionalLogic/applyRules/start',
		native: false,
		data: { formId: formId, fields: fields, isInit: isInit },
	} );
	for(var i=0; i < fields.length; i++){
		gf_apply_field_rule(formId, fields[i], isInit, function(){
			var is_last_field = ( i >= fields.length - 1 );
			if( is_last_field ) {
				jQuery(document).trigger('gform_post_conditional_logic', [formId, fields, isInit]);
				gform.utils.trigger( {
					event: 'gform/conditionalLogic/applyRules/end',
					native: false,
					data: { formId: formId, fields: fields, isInit: isInit },
				} );
				if(window["gformCalculateTotalPrice"]){
					window["gformCalculateTotalPrice"](formId);
				}
			}
		});
	}
}

function gf_check_field_rule(formId, fieldId, isInit, callback){

	//if conditional logic is not specified for that field, it is supposed to be displayed
	var conditionalLogic = gf_get_field_logic( formId, fieldId );
	if ( ! conditionalLogic ) {
		return 'show';
	}

	var action = gf_get_field_action(formId, conditionalLogic["section"]);

	//If section is hidden, always hide field. If section is displayed, see if field is supposed to be displayed or hidden
	if(action != "hide")
		action = gf_get_field_action(formId, conditionalLogic["field"]);

	return action;
}

/**
 * Retrieves the conditional logic properties for the specified field.
 *
 * @since 2.4.16
 *
 * @param {(string|number)} formId  The ID of the current form.
 * @param {(string|number)} fieldId The ID of the current field.
 *
 * @return {(boolean|object)} False or the field conditional logic properties.
 */
function gf_get_field_logic(formId, fieldId) {
	var formConditionalLogic = rgars( window, 'gf_form_conditional_logic/' + formId );
	if ( ! formConditionalLogic ) {
		return false;
	}

	var conditionalLogic = rgars( formConditionalLogic, 'logic/' + fieldId );
	if ( conditionalLogic ) {
		return conditionalLogic;
	}

	var dependents = rgar( formConditionalLogic, 'dependents' );
	if ( ! dependents ) {
		return false;
	}

	// Attempting to get section field conditional logic instead.
	for ( var key in dependents ) {
		if ( dependents[key].indexOf( fieldId ) !== -1 ) {
			return rgars( formConditionalLogic, 'logic/' + key );
		}
	}

	return false;
}

function gf_apply_field_rule(formId, fieldId, isInit, callback){

	var action = gf_check_field_rule(formId, fieldId, isInit, callback);

	gf_do_field_action(formId, action, fieldId, isInit, callback);

	var conditionalLogic = window["gf_form_conditional_logic"][formId]["logic"][fieldId];
	//perform conditional logic for the next button
	if(conditionalLogic["nextButton"]){
		action = gf_get_field_action(formId, conditionalLogic["nextButton"]);
		gf_do_next_button_action(formId, action, fieldId, isInit);
	}

}

function gf_get_field_action(formId, conditionalLogic){
	if(!conditionalLogic)
		return "show";

	var matches = 0;
	for(var i = 0; i < conditionalLogic["rules"].length; i++){
		/**
		 * Filter the conditional logic rule before it is evaluated on the frontend.
		 *
		 * @param {object}          rule             The conditional logic rule about to be evaluated.
		 * @param {(string|number)} formId           The current form ID.
		 * @param {object}          conditionalLogic All details required to evaluate an objects conditional logic.
		 *
		 * @since 2.4.22
		 */
		var rule = gform.applyFilters( 'gform_rule_pre_evaluation', jQuery.extend( {}, conditionalLogic["rules"][i] ), formId, conditionalLogic );
		if(gf_is_match(formId, rule))
			matches++;
	}

	var action;
	if( (conditionalLogic["logicType"] == "all" && matches == conditionalLogic["rules"].length) || (conditionalLogic["logicType"] == "any"  && matches > 0) )
		action = conditionalLogic["actionType"];
	else
		action = conditionalLogic["actionType"] == "show" ? "hide" : "show";

	return action;
}

function gf_is_match( formId, rule ) {

	var $               = jQuery,
		inputId         = rule['fieldId'],
		fieldId         = gformExtractFieldId( inputId ),
		inputIndex      = gformExtractInputIndex( inputId ),
		isInputSpecific = inputIndex !== false,
		$inputs;

	if( isInputSpecific ) {
		$inputs = $( '#input_{0}_{1}_{2}, #choice_{0}_{1}_{2}'.gformFormat( formId, fieldId, inputIndex ) );
	} else {
		$inputs = $( 'input[id="input_{0}_{1}"], input[id^="input_{0}_{1}_"], input[id^="choice_{0}_{1}_"], select#input_{0}_{1}, textarea#input_{0}_{1}'.gformFormat( formId, fieldId ) );
	}

	var isCheckable = $.inArray( $inputs.attr( 'type' ), [ 'checkbox', 'radio' ] ) !== -1;
	var isMatch     = isCheckable ? gf_is_match_checkable( $inputs, rule, formId, fieldId ) : gf_is_match_default( $inputs.eq( 0 ), rule, formId, fieldId );

	return gform.applyFilters( 'gform_is_value_match', isMatch, formId, rule );
}

function gf_is_match_checkable( $inputs, rule, formId, fieldId ) {

	// Rule is checking if the checkable is/isn't blank. Return a specific check for that use-case.
	if ( rule.value === '' ) {
		return rule.operator === 'is' ? gf_is_checkable_empty( $inputs ) : ! gf_is_checkable_empty( $inputs );
	}

	var isMatch = false;

	$inputs.each( function() {

		var $input           = jQuery( this ),
			fieldValue       = gf_get_value( $input.val() ),
			isRangeOperator  = jQuery.inArray( rule.operator, [ '<', '>' ] ) !== -1,
			isStringOperator = jQuery.inArray( rule.operator, [ 'contains', 'starts_with', 'ends_with' ] ) !== -1;

		// if we are looking for a specific value and this is not it, skip
		if( fieldValue != rule.value && ! isRangeOperator && ! isStringOperator ) {
			return; // continue
		}

		// force an empty value for unchecked items
		if( ! $input.is( ':checked' ) ) {
			fieldValue = '';
		}
		// if the 'other' choice is selected, get the value from the 'other' text input
		else if ( fieldValue == 'gf_other_choice' ) {
			fieldValue = jQuery( '#input_{0}_{1}_other'.gformFormat( formId, fieldId ) ).val();
		}

		if( gf_matches_operation( fieldValue, rule.value, rule.operator ) ) {
			isMatch = true;
			return false; // break
		}

	} );

	return isMatch;
}

/**
 * Check if a collection of checkable inputs has any checked,
 * or if they are all unchecked.
 *
 * @param {jQuery} $inputs A collection of inputs to check.
 *
 * @returns {boolean}
 */
function gf_is_checkable_empty( $inputs ) {
	var isEmpty = true;

	$inputs.each( function() {
		if ( jQuery( this ).is( ':checked' ) ) {
			isEmpty = false;
		}
	} );

	return isEmpty;
}

function gf_is_match_default( $input, rule, formId, fieldId ) {

	var val           = $input.val(),
		values        = ( val instanceof Array ) ? val : [ val ], // transform regular value into array to support multi-select (which returns an array of selected items)
		matchCount    = 0,
		valuesLength  = Math.max( values.length, 1 ); // jQuery 3.0: Make sure our length is at least 1 so that the following loop fires.

	for( var i = 0; i < valuesLength; i++ ) {

		// fields with pipes in the value will use the label for conditional logic comparison
		var hasLabel   = values[i] ? values[i].indexOf( '|' ) >= 0 : true,
			fieldValue = gf_get_value( values[i] );

		var fieldNumberFormat = gf_get_field_number_format( rule.fieldId, formId, 'value' );
		if( fieldNumberFormat && ! hasLabel ) {
			fieldValue = gf_format_number( fieldValue, fieldNumberFormat );
		}

		var ruleValue = rule.value;
		//if ( fieldNumberFormat ) {
		//	ruleValue = gf_format_number( ruleValue, fieldNumberFormat );
		//}

		if( gf_matches_operation( fieldValue, ruleValue, rule.operator ) ) {
			matchCount++;
		}

	}

	// if operator is 'isnot', none of the values can match
	var isMatch = rule.operator == 'isnot' ? matchCount == valuesLength : matchCount > 0;

	return isMatch;
}

function gf_format_number( value, fieldNumberFormat ) {

	decimalSeparator = '.';

	if( fieldNumberFormat == 'currency' ) {
		decimalSeparator = gformGetDecimalSeparator( 'currency' );
	} else if( fieldNumberFormat == 'decimal_comma' ) {
		decimalSeparator = ',';
	} else if( fieldNumberFormat == 'decimal_dot' ) {
		decimalSeparator = '.';
	}

	// transform to a decimal dot number
	value = gformCleanNumber( value, '', '', decimalSeparator );

	/**
	 * Looking at format specified by wp locale creates issues. When performing conditional logic, all numbers will be formatted to decimal dot and then compared that way. AC
	 */
	// now transform to number specified by locale
	// if( window['gf_number_format'] && window['gf_number_format'] == 'decimal_comma' ) {
	//     value = gformFormatNumber( value, -1, ',', '.' );
	// }

	if( ! value ) {
		value = 0;
	}

	number = value.toString();

	return number;
}

function gf_try_convert_float(text){

	/*
	 * The only format that should matter is the field format. Attempting to do this by WP locale creates a lot of issues with consistency.
	 * var format = window["gf_number_format"] == "decimal_comma" ? "decimal_comma" : "decimal_dot";
	 */

	var format = 'decimal_dot';
	if( gformIsNumeric( text, format ) ) {
		var decimal_separator = format == "decimal_comma" ? "," : ".";
		return gformCleanNumber( text, "", "", decimal_separator );
	}

	return text;
}

function gf_matches_operation(val1, val2, operation){
	val1 = val1 ? val1.toLowerCase() : "";
	val2 = val2 ? val2.toLowerCase() : "";

	switch(operation){
		case "is" :
			return val1 == val2;
			break;

		case "isnot" :
			return val1 != val2;
			break;

		case ">" :
			val1 = gf_try_convert_float(val1);
			val2 = gf_try_convert_float(val2);

			return gformIsNumber(val1) && gformIsNumber(val2) ? val1 > val2 : false;
			break;

		case "<" :
			val1 = gf_try_convert_float(val1);
			val2 = gf_try_convert_float(val2);

			return gformIsNumber(val1) && gformIsNumber(val2) ? val1 < val2 : false;
			break;

		case "contains" :
			return val1.indexOf(val2) >=0;
			break;

		case "starts_with" :
			return val1.indexOf(val2) ==0;
			break;

		case "ends_with" :
			var start = val1.length - val2.length;
			if(start < 0)
				return false;

			var tail = val1.substring(start);
			return val2 == tail;
			break;
	}
	return false;
}

function gf_get_value(val){
	if(!val)
		return "";

	val = val.split("|");
	return val[0];
}

function gf_do_field_action(formId, action, fieldId, isInit, callback){
	var conditional_logic = window["gf_form_conditional_logic"][formId];
	var dependent_fields = conditional_logic["dependents"][fieldId];

	for(var i=0; i < dependent_fields.length; i++){
		var targetId = fieldId == 0 ? "#gform_submit_button_" + formId : "#field_" + formId + "_" + dependent_fields[i];
		var defaultValues = conditional_logic["defaults"][dependent_fields[i]];

		//calling callback function on the last dependent field, to make sure it is only called once
		do_callback = (i+1) == dependent_fields.length ? callback : null;

		/**
		 * Allow add-ons to abort gf_do_action() function.
		 *
		 * @since 2.6.2
		 *
		 * @param bool   $doAbort      The value being filtered. True to abort conditional logic action, false to continue. Defaults to false.
		 * @param string $action       The conditional logic action that will be performed. Possible values: show or hide
		 * @param string $targetId     HTML element id that will be the targed of the conditional logic action.
		 * @param bool   $doAnimation  True to perform animation while showing/hiding field. False to hide/show field without animation.
		 * @param array  $defaultValue Array containg default field values.
		 * @param bool   $isInit       True if form is being initialized (i.e. before user has interacted with any input). False otherwise.
		 * @param array  $formId       The current form ID.
		 * @param func   $do_callback   Callback function to be executed after conditional logic is executed.
		 */
		let abort = gform.applyFilters( 'gform_abort_conditional_logic_do_action', false, action, targetId, conditional_logic[ "animation" ], defaultValues, isInit, formId, do_callback );
		if ( ! abort ) {
			gf_do_action( action, targetId, conditional_logic[ "animation" ], defaultValues, isInit, do_callback, formId );
		} else if ( do_callback ) {
			do_callback();
		}

		gform.doAction('gform_post_conditional_logic_field_action', formId, action, targetId, defaultValues, isInit);
	}
}

function gf_do_next_button_action(formId, action, fieldId, isInit){
	var conditional_logic = window["gf_form_conditional_logic"][formId];
	var targetId = "#gform_next_button_" + formId + "_" + fieldId;

	/**
	 * Allow add-ons to abort gf_do_action() function.
	 *
	 * @since 2.6.2
	 *
	 * @param bool   $doAbort      The value being filtered. True to abort conditional logic action, false to continue. Defaults to false.
	 * @param string $action       The conditional logic action that will be performed. Possible values: show or hide
	 * @param string $targetId     HTML element id that will be the targed of the conditional logic action.
	 * @param bool   $doAnimation  True to perform animation while showing/hiding field. False to hide/show field without animation.
	 * @param array  $defaultValue Array containg default field values.
	 * @param bool   $isInit       True if form is being initialized (i.e. before user has interacted with any input). False otherwise.
	 * @param array  $formId       The current form ID.
	 * @param func   $do_callback   Callback function to be executed after conditional logic is executed.
	 */
	let abort = gform.applyFilters( 'gform_abort_conditional_logic_do_action', false, action, targetId, conditional_logic[ "animation" ], null, isInit, formId, null );
	if ( ! abort ) {
		gf_do_action( action, targetId, conditional_logic[ "animation" ], null, isInit, null, formId );
	}
}

function gf_do_action(action, targetId, useAnimation, defaultValues, isInit, callback, formId){
	var $target = jQuery( targetId );

	/**
	 * Do not re-enable inputs that are disabled by default. Check if field's inputs have been assessed. If not, add
	 * designator class so these inputs are exempted below.
	 */
	if( ! $target.data( 'gf-disabled-assessed' ) ) {
		$target.find( ':input:disabled' ).addClass( 'gf-default-disabled' );
		$target.data( 'gf-disabled-assessed', true );
	}

	// honeypot should not be impacted by conditional logic.
	if( $target.hasClass( 'gfield--type-honeypot') ) {
		return;
	}

	if(action == "show"){
		// reset tabindex for selects
		$target.find( 'select' ).each( function() {
			var $select = jQuery( this );
			$select.attr( 'tabindex', $select.data( 'tabindex' ) );
		} );

		if(useAnimation && !isInit){
			if($target.length > 0){
				$target.find(':input:hidden:not(.gf-default-disabled)').prop( 'disabled', false );
				if ( $target.is( 'input[type="submit"]' ) || $target.hasClass( 'gform_next_button' ) ) {
					gf_show_button( $target );
				}
				$target.slideDown(callback);
				$target.attr( 'data-conditional-logic', 'visible' );
			} else if(callback){
				callback();
			}
		}
		else{
			var display = $target.data('gf_display');

			// set display if previous (saved) display isn't set for any reason
			if ( display == '' || display == 'none' ){
				display = '1' === gf_legacy.is_legacy ? 'list-item' : 'block';
			}
			$target.find(':input:hidden:not(.gf-default-disabled)').prop( 'disabled', false ).attr( 'data-conditional-logic', 'visible' );

			// Handle conditional submit and next buttons.
			if ( $target.is( 'input[type="submit"]' ) || $target.hasClass( 'gform_next_button' ) ) {
				gf_show_button( $target );
			} else {
				$target.css( 'display', display );
				if( display == 'none' ) {
					$target.attr( 'data-conditional-logic', 'hidden' );
				} else {
					$target.attr( 'data-conditional-logic', 'visible' );
				}
			}

			if(callback){
				callback();
			}
		}
	}
	else{

		//if field is not already hidden, reset its values to the default
		var child = $target.children().first();
		if (child.length > 0){
			var reset = gform.applyFilters('gform_reset_pre_conditional_logic_field_action', true, formId, targetId, defaultValues, isInit);

			if(reset && !gformIsHidden(child)){
				gf_reset_to_default(targetId, defaultValues);
			}
		}

		// remove tabindex and stash as a data attr for selects
		$target.find( 'select' ).each( function() {
			var $select = jQuery( this );
			$select.data( 'tabindex', $select.attr( 'tabindex' ) ).removeAttr( 'tabindex' );
		} );

		//Saving existing display so that it can be reset when showing the field
		if( ! $target.data('gf_display') ){
			$target.data('gf_display', $target.css('display'));
		}

		if(useAnimation && !isInit){
			if( $target.is( 'input[type="submit"]' ) || $target.hasClass( 'gform_next_button' ) ) {
				gf_hide_button( $target );
			} else if ( $target.length > 0 && $target.is( ":visible" ) ) {
				$target.slideUp( callback );
				$target.attr( 'data-conditional-logic', 'hidden' );
			} else if ( callback ) {
				callback();
			}
		} else{

			// Handle conditional submit and next buttons.
			if ( $target.is( 'input[type="submit"]' ) || $target.hasClass( 'gform_next_button' ) ) {
				gf_hide_button( $target );
			} else {
				$target.css( 'display', 'none' );
				$target.attr( 'data-conditional-logic', 'hidden' );
			}
			$target.find(':input:hidden:not(.gf-default-disabled)').attr( 'disabled', 'disabled' );
			if(callback){
				callback();
			}
		}
	}

}

function gf_show_button( $target ) {
	$target.prop( 'disabled', false ).css( 'display', '' );
	$target.attr( 'data-conditional-logic', 'visible' );
	if ( '1' == gf_legacy.is_legacy ) {
		// for legacy markup, remove screen reader class.
		$target.removeClass( 'screen-reader-text' );
	}

	// Sometimes the next button is pretending to be a submit button, so it needs conditional logic too.
	var fauxSubmitButton = jQuery( 'input.gform_next_button[type="button"][value="Submit"]' );
	if ( fauxSubmitButton ) {
		fauxSubmitButton.prop( 'disabled', false ).css( 'display', '' );
		fauxSubmitButton.attr( 'data-conditional-logic', 'visible' );
	}
}

function gf_hide_button( $target ) {
	$target.attr( 'disabled', 'disabled' ).hide();
	$target.attr( 'data-conditional-logic', 'hidden' );
	if ( '1' === gf_legacy.is_legacy ) {
		// for legacy markup, let screen readers read the button.
		$target.addClass( 'screen-reader-text' );
	}

	// Sometimes the next button is pretending to be a submit button, so it needs conditional logic too.
	var fauxSubmitButton = jQuery( 'input.gform_next_button[type="button"][value="Submit"]' );
	if ( fauxSubmitButton ) {
		fauxSubmitButton.attr( 'disabled', 'disabled' ).hide();
		fauxSubmitButton.attr( 'data-conditional-logic', 'hidden' );
	}
}

function gf_reset_to_default(targetId, defaultValue){

	var dateFields = jQuery( targetId ).find( '.gfield_date_month input, .gfield_date_day input, .gfield_date_year input, .gfield_date_dropdown_month select, .gfield_date_dropdown_day select, .gfield_date_dropdown_year select' );
	if( dateFields.length > 0 ) {

		dateFields.each( function(){

			var element = jQuery( this );

			// defaultValue is associative array (i.e. [ m: 1, d: 13, y: 1987 ] )
			if( defaultValue ) {

				var key = 'd';
				if (element.parents().hasClass('gfield_date_month') || element.parents().hasClass('gfield_date_dropdown_month') ){
					key = 'm';
				}
				else if(element.parents().hasClass('gfield_date_year') || element.parents().hasClass('gfield_date_dropdown_year') ){
					key = 'y';
				}

				val = defaultValue[ key ];

			}
			else{
				val = "";
			}

			if(element.prop("tagName") == "SELECT" && val != '' )
				val = parseInt(val, 10);


			if(element.val() != val)
				element.val(val).trigger("change");
			else
				element.val(val);

		});

		return;
	}

	//cascading down conditional logic to children to support nested conditions
	//text fields and drop downs, filter out list field text fields name with "_shim"
	var target = jQuery(targetId).find( 'select, input[type="text"]:not([id*="_shim"]), input[type="number"], input[type="hidden"], input[type="email"], input[type="tel"], input[type="url"], textarea' );
	var target_index = 0;

	// When a List field is hidden via conditional logic during a page submission, the markup will be reduced to a
	// single row. Add enough rows/inputs to satisfy the default value.
	if( defaultValue && target.parents( '.ginput_list' ).length > 0 && target.length < defaultValue.length ) {
		while( target.length < defaultValue.length ) {
			gformAddListItem( target.eq( 0 ), 0 );
			target = jQuery(targetId).find( 'select, input[type="text"]:not([id*="_shim"]), input[type="number"], textarea' );
		}
	}

	target.each(function(){

		var val = "";

		var element = jQuery(this);

		// Only reset Single Product and Shipping hidden inputs.
		if( element.is( '[type="hidden"]' ) && ! gf_is_hidden_pricing_input( element ) ) {
			return;
		}

		//get name of previous input field to see if it is the radio button which goes with the "Other" text box
		//otherwise field is populated with input field name
		var radio_button_name = element.prevAll("input").first().attr("value");
		if(radio_button_name == "gf_other_choice"){
			val = element.attr("value");
		}
		else if( Array.isArray( defaultValue ) && ! element.is( 'select[multiple]' ) ) {
			val = defaultValue[target_index];
		}
		else if(jQuery.isPlainObject(defaultValue)){
			val = defaultValue[element.attr("name")];
			if( ! val && element.attr( 'id' ) ) {
				// 'input_123_3_1' => '3.1'
				var inputId = element.attr( 'id' ).split( '_' ).slice( 2 ).join( '.' );
				val = defaultValue[ inputId ];
			}
			if( ! val && element.attr( 'name' ) ) {
				var inputId = element.attr( 'name' ).split( '_' )[1];
				val = defaultValue[ inputId ];
			}
		}
		else if(defaultValue){
			val = defaultValue;
		}

		if( element.is('select:not([multiple])') && ! val ) {
			val = element.find( 'option' ).not( ':disabled' ).eq(0).val();
		}

		if(element.val() != val) {
			element.val(val).trigger('change');
			if (element.is('select') && element.next().hasClass('chosen-container')) {
				element.trigger('chosen:updated');
			}
			// Check for Single Product & Shipping input and force visual price update.
			if( gf_is_hidden_pricing_input( element ) ) {
				var ids = gf_get_ids_by_html_id( element.parents( '.gfield' ).attr( 'id' ) );
				jQuery( '#input_' + ids[0] + '_' + ids[1] ).text( gformFormatMoney( element.val() ) );
				element.val( gformFormatMoney( element.val() ) );
			}
		}
		else{
			element.val(val);
		}

		target_index++;
	});

	//checkboxes and radio buttons
	var elements = jQuery(targetId).find('input[type="radio"], input[type="checkbox"]:not(".copy_values_activated")');

	elements.each(function(){

		//is input currently checked?
		var isChecked = jQuery(this).is(':checked') ? true : false;

		//does input need to be marked as checked or unchecked?
		var doCheck = defaultValue ? jQuery.inArray(jQuery(this).attr('id'), defaultValue) > -1 : false;

		//if value changed, trigger click event
		if(isChecked != doCheck){
			//setting input as checked or unchecked appropriately

			if(jQuery(this).attr("type") == "checkbox"){
				jQuery(this).trigger('click');
			}
			else{
				jQuery(this).prop('checked', doCheck).change();
			}

		}
	});

}

function gf_is_hidden_pricing_input( element ) {

	// Check for Single Product fields.
	if( element.attr( 'id' ) && element.attr( 'id' ).indexOf( 'ginput_base_price' ) === 0 ) {
		return true;
	}

	if( element.attr( 'type' ) !== 'hidden' ) {
		return false;
	}

	// Check for Shipping fields.
	return element.parents( '.gfield_shipping' ).length;
};
// source --> https://www.navigando.it/cms/wp-content/plugins/gravityforms/assets/js/dist/utils.min.js?ver=50c7bea9c2320e16728e44ae9fde5f26 
!function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{run:function(){return Ct},runGroup:function(){return kt}});var n={};t.r(n),t.d(n,{getScroller:function(){return Ut},lock:function(){return Wt},unlock:function(){return Bt}});var r={};t.r(r),t.d(r,{reInitChildren:function(){return ve}});var o={};t.r(o),t.d(o,{down:function(){return Oe},up:function(){return Se}});var i={};t.r(i),t.d(i,{elVisibleHeight:function(){return Pe},elements:function(){return Te},height:function(){return ke},width:function(){return Ce}});var a={};t.r(a),t.d(a,{clear:function(){return Ue},get:function(){return Je},put:function(){return ze},remove:function(){return Re}});var c={};t.r(c),t.d(c,{clear:function(){return $e},get:function(){return Be},put:function(){return We},remove:function(){return Xe}});var u={};t.r(u),t.d(u,{get:function(){return Ye},remove:function(){return Ge},set:function(){return Ke}});var l={};function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],u=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[],n=t.length;n--;e.unshift(t[n]));return e}function p(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function g(){return d((arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((function(t){return p(t)}))}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};if(n&&e){if(27===t.keyCode)return e.focus(),void r();if(9===t.keyCode){var o=g(n),i=o[0],a=o[o.length-1];t.shiftKey?document.activeElement===i&&(a.focus(),t.preventDefault()):document.activeElement===a&&(i.focus(),t.preventDefault())}}}function h(t,e){Object.keys(e).forEach((function(n){return t.setAttribute(n,e[n])}))}t.r(l),t.d(l,{animate:function(){return e},applyBrowserClasses:function(){return Jt},arrayEquals:function(){return k},arrayToInt:function(){return P},aspectRatioToPadding:function(){return L},bodyLock:function(){return n},browsers:function(){return zt},checkNotificationPromise:function(){return qe},clipboard:function(){return Xt},consoleError:function(){return x},consoleInfo:function(){return A},consoleLog:function(){return T},consoleWarn:function(){return C},convertElements:function(){return d},cookieStorage:function(){return u},debounce:function(){return Le},deepMerge:function(){return B},delay:function(){return Y},delegate:function(){return Fe},dragHorizontal:function(){return Yt},escapeHtml:function(){return K},escapeScripts:function(){return G},filterObject:function(){return X},findNestedObject:function(){return $},focusLoop:function(){return v},getChildren:function(){return Kt},getClosest:function(){return Gt},getConfig:function(){return V},getCoords:function(){return Vt},getFocusable:function(){return g},getHiddenHeight:function(){return Qt},getNode:function(){return te},getNodes:function(){return Zt},hasClassFromArray:function(){return ee},hasScrollbar:function(){return ne},insertAfter:function(){return re},insertBefore:function(){return oe},isEmptyObject:function(){return Q},isExternalLink:function(){return ie},isFileLink:function(){return ae},isFormDirty:function(){return ce},isFunction:function(){return N},isImageLink:function(){return ue},isJestTest:function(){return E},isJson:function(){return Z},isObject:function(){return tt},isRtl:function(){return le},localStorage:function(){return a},matchesOrContainedInSelectors:function(){return se},mimicFn:function(){return gt},objectAssign:function(){return vt},objectToAttributes:function(){return wt},objectToFormData:function(){return ht},openNewTab:function(){return fe},parseUrl:function(){return mt},popup:function(){return de},queryToJson:function(){return xt},ready:function(){return Ne},removeClassThatContains:function(){return pe},resize:function(){return He},saferHtml:function(){return yt},sessionStorage:function(){return c},setAttributes:function(){return h},shouldLoadChunk:function(){return ge},simpleBar:function(){return r},slide:function(){return o},slugify:function(){return bt},spacerClasses:function(){return Ae},speak:function(){return j},sprintf:function(){return St},trigger:function(){return $t},uniqueId:function(){return At},updateQueryVar:function(){return Tt},viewport:function(){return i},visible:function(){return p},vsprintf:function(){return jt}});var m={containers:[]},y={previousMessage:""},b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",e=document.createElement("div");h(e,{"aria-live":t,"aria-relevant":"additions text","aria-atomic":"true",style:"position: absolute; margin: -1px; padding: 0; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); -webkit-clip-path: inset(50%); clip-path: inset(50%); border: 0; word-wrap: normal !important;"}),document.body.appendChild(e),m.containers.push(e)},w=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/<[^<>]+>/g," ");return y.previousMessage===t&&(t+=" "),y.previousMessage=t,t},O=function(){return m.containers.forEach((function(t){return t.textContent=""}))},S=function(){m.containers.length||(b("assertive"),b("polite"))};function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"polite";S(),O();var n=m.containers.filter((function(t){return t.getAttribute("aria-live")===e}))[0];n&&(n.textContent=w(t))}function E(){return!!window.__TEST__}function x(){window.console&&E()}function A(){}function T(){}function C(){window.console&&E()}function k(t,e){return Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((function(t,n){return t===e[n]}))}var P=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return parseInt(t,10)}))};function L(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(":");return parseFloat((t[1]/t[0]*100).toFixed(5))}function _(t){return _="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)}var I="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,M=function(t){return!!t&&"object"===_(t)},D=function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===I}(t)};function F(t){return M(t)&&!D(t)}function N(t){return t&&"[object Function]"==={}.toString.call(t)}function H(t,e){return!1!==e.clone&&e.isMergeableObject(t)?W((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function q(t,e,n){return t.concat(e).map((function(t){return H(t,n)}))}function z(t,e,n){var r=t.slice();return e.forEach((function(e,o){void 0===r[o]?r[o]=n.cloneUnlessOtherwiseSpecified(e,n):n.isMergeableObject(e)?r[o]=W(t[o],e,n):-1===t.indexOf(e)&&r.push(e)})),r}function J(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function R(t,e){try{return e in t}catch(t){return!1}}function U(t,e,n){var r={};return n.isMergeableObject(t)&&J(t).forEach((function(e){r[e]=H(t[e],n)})),J(e).forEach((function(o){(function(t,e){return R(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(R(t,o)&&n.isMergeableObject(e[o])?r[o]=function(t,e){if(!e.customMerge)return W;var n=e.customMerge(t);return"function"==typeof n?n:W}(o,n)(t[o],e[o],n):r[o]=H(e[o],n))})),r}function W(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.arrayMerge=function(t){var e=q;return"combine"===t.arrayMerge?e=z:N(t.arrayMerge)&&(e=t.arrayMerge),e}(n),n.isMergeableObject=n.isMergeableObject||F,n.cloneUnlessOtherwiseSpecified=H;var r=Array.isArray(e);return r===Array.isArray(t)?r?n.arrayMerge(t,e,n):U(t,e,n):H(e,n)}W.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return W(t,n,e)}),{})};var B=W,X=function(t,e){var n=Object.entries(t).filter(e);return Object.fromEntries(n)};function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return function t(r){if("object"===_(r))for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(o===e&&r[o]===n)return r;var i=t(r[o]);if(i)return i}return null}(t)}function Y(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=[];function i(t,n){e=window.setTimeout((function(){if(e=null,t(),o.length){var n=o.shift();i(n.fn,n.t)}}),n)}return t={delay:function(n,r){return o.length||e?o.push({fn:n,t:r}):i(n,r),t},cancel:function(){return window.clearTimeout(e),o=[],t}},t.delay(n,r)}function K(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function G(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")}function V(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e&&t[e]?t[e]:t}function Q(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return JSON.stringify(t)===JSON.stringify({})}function Z(t){if(null===t)return!1;try{JSON.parse(t)}catch(t){return!1}return!0}function tt(t){return!(!t||"object"!==_(t)||Array.isArray(t))}function et(t){var e=function(t,e){if("object"!=_(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_(e)?e:String(e)}function nt(t,e,n){return(e=et(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ot(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){nt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ct=function(t,e,n,r){if("length"!==n&&"prototype"!==n&&"arguments"!==n&&"caller"!==n){var o=Object.getOwnPropertyDescriptor(t,n),i=Object.getOwnPropertyDescriptor(e,n);!ut(o,i)&&r||Object.defineProperty(t,n,i)}},ut=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},lt=function(t,e){var n=Object.getPrototypeOf(e);n!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,n)},st=function(t,e){return"/* Wrapped ".concat(t,"*/\n").concat(e)},ft=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),dt=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),pt=function(t,e,n){var r=""===n?"":"with ".concat(n.trim(),"() "),o=st.bind(null,r,e.toString());Object.defineProperty(o,"name",dt),Object.defineProperty(t,"toString",at(at({},ft),{},{value:o}))};function gt(t,e){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).ignoreNonConfigurable,o=void 0!==r&&r,i=t.name,a=rt(Reflect.ownKeys(e));try{for(a.s();!(n=a.n()).done;){var c=n.value;ct(t,e,c,o)}}catch(t){a.e(t)}finally{a.f()}return lt(t,e),pt(t,e,i),t}function vt(){for(var t={},e=0;e<arguments.length;e+=1)for(var n=arguments[e],r=Object.keys(n),o=0;o<r.length;o+=1)t[r[o]]=n[r[o]];return t}var ht=function(t,e,n){var r=new window.FormData;return function t(e,o){if(!function(t){return Array.isArray(n)&&n.some((function(e){return e===t}))}(o))if(o=o||"",e instanceof window.File)r.append(o,e);else if(Array.isArray(e))for(var i=0;i<e.length;i++)t(e[i],o+"["+i+"]");else if("object"===_(e)&&e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t(e[a],""===o?a:o+"["+a+"]");else null!=e&&r.append(o,e)}(t,e),r};function mt(t,e){for(var n,r=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],o={},i=o["phpjs.parse_url.mode"]&&o["phpjs.parse_url.mode"].local_value||"php",a={php:/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},c=a[i].exec(t),u={},l=14;l--;)c[l]&&(u[r[l]]=c[l]);return e?u[e.replace("PHP_URL_","").toLowerCase()]:("php"!==i&&(n=o["phpjs.parse_url.queryKey"]&&o["phpjs.parse_url.queryKey"].local_value||"queryKey",a=/(?:^|&)([^&=]*)=?([^&]*)/g,u[n]={},(u[r[12]]||"").replace(a,(function(t,e,r){e&&(u[n][e]=r)}))),u.source=null,u)}function yt(t){for(var e=t[0],n=1;n<arguments.length;n++){e+=String(arguments[n]).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e+=t[n]}return e}function bt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().normalize("NFKD").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/-$/g,"")}function wt(t){var e=[];return Object.entries(t).forEach((function(t){var n=f(t,2),r=n[0],o=n[1];if(o.length||"alt"===r)if(Array.isArray(o)){var i=o.filter((function(t){return t}));e.push("".concat(r,'="').concat(i.join(" "),'"'))}else e.push("".concat(r,'="').concat(o,'"'))})),e.join(" ")}var Ot={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function St(t){return function(t,e){var n,r,o,i,a,c,u,l,s,f=1,d=t.length,p="";for(r=0;r<d;r++)if("string"==typeof t[r])p+=t[r];else if("object"===_(t[r])){if((i=t[r]).keys)for(n=e[f],o=0;o<i.keys.length;o++){if(null==n)throw new Error(St('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[o],i.keys[o-1]));n=n[i.keys[o]]}else n=i.param_no?e[i.param_no]:e[f++];if(Ot.not_type.test(i.type)&&Ot.not_primitive.test(i.type)&&n instanceof Function&&(n=n()),Ot.numeric_arg.test(i.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(St("[sprintf] expecting number but found %T",n));switch(Ot.number.test(i.type)&&(l=n>=0),i.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,i.width?parseInt(i.width):0);break;case"e":n=i.precision?parseFloat(n).toExponential(i.precision):parseFloat(n).toExponential();break;case"f":n=i.precision?parseFloat(n).toFixed(i.precision):parseFloat(n);break;case"g":n=i.precision?String(Number(n.toPrecision(i.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=i.precision?n.substring(0,i.precision):n;break;case"t":n=String(!!n),n=i.precision?n.substring(0,i.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=i.precision?n.substring(0,i.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=i.precision?n.substring(0,i.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}Ot.json.test(i.type)?p+=n:(!Ot.number.test(i.type)||l&&!i.sign?s="":(s=l?"+":"-",n=n.toString().replace(Ot.sign,"")),c=i.pad_char?"0"===i.pad_char?"0":i.pad_char.charAt(1):" ",u=i.width-(s+n).length,a=i.width&&u>0?c.repeat(u):"",p+=i.align?s+n+a:"0"===c?s+a+n:a+s+n)}return p}(function(t){if(Et[t])return Et[t];var e,n=t,r=[],o=0;for(;n;){if(null!==(e=Ot.text.exec(n)))r.push(e[0]);else if(null!==(e=Ot.modulo.exec(n)))r.push("%");else{if(null===(e=Ot.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var i=[],a=e[2],c=[];if(null===(c=Ot.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(i.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=Ot.key_access.exec(a)))i.push(c[1]);else{if(null===(c=Ot.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");i.push(c[1])}e[2]=i}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return Et[t]=r}(t),arguments)}function jt(t,e){return St.apply(null,[t].concat(e||[]))}var Et=Object.create(null);var xt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.length?t:window.location.search.slice(1),n=e.length?e.split("&"):[],r={},o=[];return n.forEach((function(t){o=t.split("="),r[o[0]]=decodeURIComponent(o[1]||"")})),JSON.parse(JSON.stringify(r))};function At(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";return"".concat(t.length?"".concat(t,"-"):"").concat(Math.random().toString(36).substr(2,9))}function Tt(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.href).split("#"),r=n[1]?"#".concat(n[1]):"",o=n[0].split("?"),i=o[0],a=o[1],c=void 0!==a?a.split("&"):[],u=!1;return c.forEach((function(n,r){n.startsWith("".concat(t,"="))&&(u=!0,e?c[r]="".concat(t,"=").concat(e):c.splice(r,1))})),!u&&e&&(c[c.length]="".concat(t,"=").concat(e)),"".concat(i).concat("?").concat(c.join("&")).concat(r)}var Ct=function(){var t,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r){var i=o.onAnimateInit,a=void 0===i?function(){}:i,c=o.onAnimateStart,u=void 0===c?function(){}:c,l=o.onAnimateEnd,s=void 0===l?function(){}:l,f=o.delay,d=void 0===f?(null===(t=r.dataset)||void 0===t?void 0:t.animationDelay)||0:f,p=o.duration,g=void 0===p?(null===(e=r.dataset)||void 0===e?void 0:e.animationDuration)||400:p,v=o.easing,h=void 0===v?(null===(n=r.dataset)||void 0===n?void 0:n.animationEasing)||"linear":v,m=function(t,e){var n,r,o,i,a,c={},u={},l=e.distanceFrom,s=void 0===l?(null===(n=t.dataset)||void 0===n?void 0:n.translateDistanceFrom)||"20px":l,f=e.distanceTo,d=void 0===f?(null===(r=t.dataset)||void 0===r?void 0:r.translateDistanceTo)||"0px":f,p=e.opacityFrom,g=void 0===p?null===(o=t.dataset)||void 0===o?void 0:o.translateOpacityFrom:p,v=e.opacityTo,h=void 0===v?null===(i=t.dataset)||void 0===i?void 0:i.translateOpacityTo:v,m=e.types;return(void 0===m?(null===(a=t.dataset)||void 0===a?void 0:a.animationTypes)||"":m).split(" ").forEach((function(t){"fadeIn"===t&&(c.opacity=g||0,u.opacity=h||1),"fadeOut"===t&&(c.opacity=g||1,u.opacity=h||0),"translateY"===t&&(c.transform="translateY(".concat(s,")"),u.transform="translateY(".concat(d,")"))})),[c,u]}(r,o);a(),setTimeout((function(){u(),requestAnimationFrame((function(){r.animate(m,{duration:Number(g),easing:h}).onfinish=function(){!function(t,e){var n,r,o,i=e.distanceTo,a=void 0===i?(null===(n=t.dataset)||void 0===n?void 0:n.translateDistanceTo)||"0px":i,c=e.opacityTo,u=void 0===c?null===(r=t.dataset)||void 0===r?void 0:r.translateOpacityTo:c,l=e.types;(void 0===l?(null===(o=t.dataset)||void 0===o?void 0:o.animationTypes)||"":l).split(" ").forEach((function(e){"fadeIn"===e&&(t.style.opacity=u||"1",t.setAttribute("aria-hidden","false")),"fadeOut"===e&&(t.style.opacity=u||"0",t.setAttribute("aria-hidden","true")),"translateY"===e&&(t.style.transform="translateY(".concat(a,")"))}))}(r,o),s()}}))}),d)}},kt=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var e=t.target,n=t.options;Ct(e,n)}))},Pt=/(android)/i.test(window.navigator.userAgent),Lt=!!window.chrome,_t="undefined"!=typeof InstallTrigger,It=document.documentMode||!1,Mt=!It&&!!window.StyleMedia,Dt=!!window.navigator.userAgent.match(/(iPod|iPhone|iPad)/i),Ft=!!window.navigator.userAgent.match(/(iPod|iPhone)/i),Nt=!!window.opera||window.navigator.userAgent.indexOf(" OPR/")>=0,Ht=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||!Lt&&!Nt&&"undefined"!==window.webkitAudioContext,qt=window.navigator.platform;function zt(){return{android:Pt,chrome:Lt,edge:Mt,firefox:_t,ie:It,ios:Dt,iosMobile:Ft,opera:Nt,safari:Ht,os:qt}}function Jt(){var t=zt(),e=document.body.classList;t.android?e.add("device-android"):t.ios&&e.add("device-ios"),t.edge?e.add("browser-edge"):t.chrome?e.add("browser-chrome"):t.firefox?e.add("browser-firefox"):t.ie?e.add("browser-ie"):t.opera?e.add("browser-opera"):t.safari&&e.add("browser-safari")}var Rt=0,Ut=function(){var t=zt();return t.ie||t.firefox||t.chrome&&!t.edge?document.documentElement:document.body},Wt=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=Ut(),n=document.body.style;Rt=e.scrollTop,n.overflowY="scroll",n.position="fixed",n.width="100%",t&&(n.marginTop="-".concat(Rt,"px"))},Bt=function(){var t=Ut(),e=document.body.style;e.overflowY="",e.position="static",e.marginTop="0px",e.width="",t.scrollTop=Rt};function Xt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",t);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var e=document.createElement("textarea");e.textContent=t,e.style.position="fixed",document.body.appendChild(e),e.select();try{return document.execCommand("copy")}catch(t){return C("Copy to clipboard failed.",t),!1}finally{document.body.removeChild(e)}}}function $t(){var t,e=vt({data:{},el:document,event:"",native:!0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});if(e.native)(t=document.createEvent("HTMLEvents")).initEvent(e.event,!0,!1);else try{t=new window.CustomEvent(e.event,{detail:e.data})}catch(n){(t=document.createEvent("CustomEvent")).initCustomEvent(e.event,!0,!0,e.data)}e.el.dispatchEvent(t)}function Yt(t){var e={isDown:!1,moveEventTriggered:!1,startX:0,scrollLeft:0};t.addEventListener("mousedown",(function(n){e.isDown=!0,t.classList.add("drag-horizontal--active"),e.startX=n.pageX-t.offsetLeft,e.scrollLeft=t.scrollLeft})),t.addEventListener("mouseleave",(function(){e.isDown=!1,t.classList.remove("drag-horizontal--active")})),t.addEventListener("mouseup",(function(){e.isDown=!1,t.classList.remove("drag-horizontal--active"),$t({event:"gform-utils/horizontal-drag-ended",native:!1}),e.moveEventTriggered=!1})),t.addEventListener("mousemove",(function(n){if(e.isDown){n.preventDefault();var r=3*(n.pageX-t.offsetLeft-e.startX);t.scrollLeft=e.scrollLeft-r,e.moveEventTriggered||($t({event:"gform-utils/horizontal-drag-started",native:!1}),e.moveEventTriggered=!0)}}))}function Kt(t){for(var e=[],n=t.children.length;n--;)8!==t.children[n].nodeType&&e.unshift(t.children[n]);return e}function Gt(t,e){var n,r;for(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some((function(t){return"function"==typeof document.body[t]&&(n=t,!0)}));t;){if((r=t.parentElement)&&r[n](e))return r;t=r}return null}function Vt(t){var e=t.getBoundingClientRect(),n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft,a=r.clientTop||n.clientTop||0,c=r.clientLeft||n.clientLeft||0,u=e.top+o-a,l=e.left+i-c;return{top:Math.round(u),left:Math.round(l),bottom:Math.round(e.bottom)}}function Qt(t){var e=t.clientWidth,n=t;n.style.visibility="hidden",n.style.height="auto",n.style.maxHeight="none",n.style.position="fixed",n.style.width="".concat(e,"px");var r=n.offsetHeight;return n.style.visibility="",n.style.height="",n.style.maxHeight="",n.style.width="",n.style.position="",n.style.zIndex="",r}function Zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?t:'[data-js="'.concat(t,'"]'),o=n.querySelectorAll(r);return e&&(o=d(o)),o}function te(){var t=Zt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",!1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,arguments.length>2&&void 0!==arguments[2]&&arguments[2]);return t.length>0?t[0]:null}function ee(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((function(r){return t.classList.contains("".concat(e).concat(r).concat(n))}))}function ne(t){return{vertical:t.scrollHeight>t.clientHeight,horizontal:t.scrollWidth>t.clientWidth}}function re(t,e){e.parentNode.insertBefore(t,e.nextElementSibling)}function oe(t,e){e.parentNode.insertBefore(t,e)}function ie(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(/^([^:/?#]+:)?(?:\/\/([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof t[1]&&t[1].length>0&&t[1].toLowerCase()!==window.location.protocol||"string"==typeof t[2]&&t[2].length>0&&t[2].replace(new RegExp(":(".concat({"http:":80,"https:":443}[window.location.protocol],")?$")),"")!==window.location.host}function ae(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/").pop().indexOf(".")}function ce(){var t;if(!window.gforms_original_json||!window.UpdateFormObject)return!1;window.UpdateFormObject();var e="1"===(null===(t=window)||void 0===t||null===(t=t.gf_legacy)||void 0===t?void 0:t.is_legacy),n=JSON.parse(JSON.stringify(JSON.parse(window.gforms_original_json))),r=JSON.parse(JSON.stringify(window.form));return e&&(n.fields.forEach((function(t,e){delete n.fields[e].layoutGroupId})),r.fields.forEach((function(t,e){delete r.fields[e].layoutGroupId}))),JSON.stringify(n)!==JSON.stringify(r)}function ue(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(".").pop().toLowerCase().match(/(jpg|jpeg|png|gif|svg)/g);return t&&t.length>0||!1}function le(){var t=document.createElement("div");document.body.appendChild(t);var e="rtl"===window.getComputedStyle(t,null).getPropertyValue("direction");return document.body.removeChild(t),e}function se(t,e){for(var n=0;n<e.length;n++)for(var r=document.querySelectorAll(e[n]),o=0;o<r.length;o++)if(t===r[o]||r[o].contains(t))return!0;return!1}function fe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("a");e.href=t,e.target="_blank",document.body.appendChild(e),e.click(),e.remove()}function de(){var t=vt({event:null,url:"",center:!0,name:"_blank",specs:{menubar:0,scrollbars:0,status:1,titlebar:1,toolbar:0,top:100,left:100,width:500,height:300}},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});if(t.event&&(t.event.preventDefault(),t.url.length||(t.url=t.event.currentTarget.href)),t.url.length){t.center&&(t.specs.top=window.screen.height/2-t.specs.height/2,t.specs.left=window.screen.width/2-t.specs.width/2);var e=[];Object.entries(t.specs).forEach((function(t){var n=f(t,2),r=n[0],o=n[1],i="".concat(r,"=").concat(o);e.push(i)})),window.open(t.url,t.name,e.join())}}function pe(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.classList.length;n++)-1!==t.classList.item(n).indexOf(e)&&t.classList.remove(t.classList.item(n))}function ge(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return document.querySelectorAll("[data-load-chunk-".concat(t,"]")).length>0}var ve=function(t){var e,n=(null===(e=window)||void 0===e?void 0:e.SimpleBar)||{};n.instances&&t&&Zt("[data-simplebar]",!0,t,!0).forEach((function(t){var e;return null!==(e=n.instances.get(t))&&void 0!==e?e:new n(t)}))},he=25,me=[],ye=function(t){return t<.2074?-3.8716*t*t*t+6.137*t*t+.4*t:1.1317*(t-1)*(t-1)*(t-1)-.1975*(t-1)*(t-1)+1},be=function(t){me[t]||(me[t]={up:null,down:null})},we=function(t){me[t].up&&(window.cancelAnimationFrame(me[t].up),me[t].up=null),me[t].down&&(window.cancelAnimationFrame(me[t].down),me[t].down=null)},Oe=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=t.offsetHeight,i=Qt(t),a=null;t.style.maxHeight="0",be(e),we(e);var c=function c(u){a||(a=u);var l=u-a,s=ye(l/n)*(i-o)+o;t.style.maxHeight="".concat(s,"px"),l<n?me[e].down=window.requestAnimationFrame(c):(me[e].down=null,t.style.maxHeight="none",r&&r())};setTimeout((function(){me[e].down=window.requestAnimationFrame(c)}),he)},Se=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=t.offsetHeight,i=null;t.style.maxHeight="".concat(o,"px"),be(e),we(e);var a=function a(c){i||(i=c);var u=c-i,l=ye(u/n)*(0-o)+o;t.style.maxHeight="".concat(l,"px"),u<n?me[e].up=window.requestAnimationFrame(a):(me[e].up=null,t.style.maxHeight="0",r&&r())};setTimeout((function(){me[e].up=window.requestAnimationFrame(a)}),he)};function je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ee(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?je(Object(n),!0).forEach((function(e){nt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var xe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"gform-spacing",r={};return!t||"string"!=typeof t&&"number"!=typeof t&&!Array.isArray(t)||Array.isArray(t)&&!t.length?r:"string"==typeof t||"number"==typeof t?(r["".concat(n,"--").concat(e,"bottom-").concat(t)]=!0,r):1===t.length?(["top","right","bottom","left"].forEach((function(o){r["".concat(n,"--").concat(e).concat(o,"-").concat(t[0])]=!0})),r):2===t.length?(["top","bottom"].forEach((function(o){r["".concat(n,"--").concat(e).concat(o,"-").concat(t[0])]=!0})),["right","left"].forEach((function(o){r["".concat(n,"--").concat(e).concat(o,"-").concat(t[1])]=!0})),r):3===t.length?(r["".concat(n,"--").concat(e,"top-").concat(t[0])]=!0,["right","left"].forEach((function(o){r["".concat(n,"--").concat(e).concat(o,"-").concat(t[1])]=!0})),r["gform-spacing--".concat(e,"bottom-").concat(t[2])]=!0,r):4===t.length?(r["".concat(n,"--").concat(e,"top-").concat(t[0])]=!0,r["".concat(n,"--").concat(e,"right-").concat(t[1])]=!0,r["".concat(n,"--").concat(e,"bottom-").concat(t[2])]=!0,r["".concat(n,"--").concat(e,"left-").concat(t[3])]=!0,r):r};function Ae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gform-spacing",n={};return!t||"string"!=typeof t&&"number"!=typeof t&&!Array.isArray(t)&&("object"!==_(t)||Array.isArray(t))||Array.isArray(t)&&!t.length?n:(n[e]=!0,"string"==typeof t||"number"==typeof t||Array.isArray(t)?Ee(Ee({},n),xe(t,"",e)):["","md","lg"].reduce((function(n,r){return Object.prototype.hasOwnProperty.call(t,r)?Ee(Ee({},n),xe(t[r],r?"".concat(r,"-"):"",e)):n}),n))}var Te=function(){var t="undefined"!=typeof window&&window,e="undefined"!=typeof document&&document;return{docElem:e&&e.documentElement,win:t}},Ce=function(){var t=Te(),e=t.docElem,n=t.win,r=e.clientWidth,o=n.innerWidth;return r<o?o:r},ke=function(){var t=Te(),e=t.docElem,n=t.win,r=e.clientHeight,o=n.innerHeight;return r<o?o:r},Pe=function(t){var e=t.offsetHeight,n=ke(),r=t.getBoundingClientRect(),o=r.bottom,i=r.top;return Math.max(0,i>0?Math.min(e,n-i):Math.min(o,n))};function Le(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof t)throw new TypeError("Expected the first argument to be a function, got `".concat(_(t),"`"));var n,r,o,i=e.wait,a=void 0===i?0:i,c=e.maxWait,u=void 0===c?Number.Infinity:c,l=e.before,s=void 0!==l&&l,f=e.after,d=void 0===f||f;if(!s&&!d)throw new Error("Both `before` and `after` are false, function wouldn't be called.");var p=function(){for(var e=arguments.length,i=new Array(e),c=0;c<e;c++)i[c]=arguments[c];var l=this,f=s&&!n;return clearTimeout(n),n=setTimeout((function(){n=void 0,r&&(clearTimeout(r),r=void 0),d&&(o=t.apply(l,i))}),a),u>0&&u!==Number.Infinity&&!r&&(r=setTimeout((function(){r=void 0,n&&(clearTimeout(n),n=void 0),d&&(o=t.apply(l,i))}),u)),f&&(o=t.apply(l,i)),o};return gt(p,t),p.cancel=function(){n&&(clearTimeout(n),n=void 0),r&&(clearTimeout(r),r=void 0)},p}var _e=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var Ie=Element.prototype;Ie.matches=Ie.matchesSelector||Ie.mozMatchesSelector||Ie.msMatchesSelector||Ie.oMatchesSelector||Ie.webkitMatchesSelector}function Me(t,e,n,r,o){var i=De.apply(this,arguments);return t.addEventListener(n,i,o),{destroy:function(){t.removeEventListener(n,i,o)}}}function De(t,e,n,r){return function(n){n.delegateTarget=function(t,e){for(;t&&t.nodeType!==_e;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}(n.target,e),n.delegateTarget&&r.call(t,n)}}var Fe=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return"function"==typeof t.addEventListener?Me.apply(null,arguments):"function"==typeof n?Me.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return Me(t,e,n,r,o)})))};function Ne(t){"loading"!==document.readyState?t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",(function(){"loading"!==document.readyState&&t()}))}function He(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?window.addEventListener("resize",Le(t,{wait:e})):window.removeEventListener("resize",Le(t,{wait:e}))}function qe(){try{window.Notification.requestPermission().then()}catch(t){return!1}return!0}var ze=function(t,e){window.localStorage.setItem(t,e)},Je=function(t){return window.localStorage.getItem(t)},Re=function(t){return window.localStorage.removeItem(t)},Ue=function(){window.localStorage.clear()},We=function(t,e){window.sessionStorage.setItem(t,e)},Be=function(t){return window.sessionStorage.getItem(t)},Xe=function(t){return window.sessionStorage.removeItem(t)},$e=function(){window.sessionStorage.clear()},Ye=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.cookie.split(";"),n=0;n<e.length;n++){var r=e[n].split("=");if(t===r[0].trim())return decodeURIComponent(r[1])}return null},Ke=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o="",i=e;if(n&&!isNaN(Number(n))){var a=new Date;a.setTime(a.getTime()+24*Number(n)*60*60*1e3),o=" expires="+a.toUTCString()}if(r){var c=Ye(t);i=""!==c&&null!==c?c+","+e:e}document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(i)+";"+o},Ge=function(t){Ke(t,"",-1)};window.gform=window.gform||{},window.gform.utils=window.gform.utils||{};var Ve;Ve=window.gform.utils,Object.entries(l).forEach((function(t){var e=f(t,2),n=e[0],r=e[1];Ve[n]=r}))}();