// source --> https://www.tcgkauppa.fi/wp-content/plugins/woo-conditional-shipping-pro/includes/frontend/../../frontend/js/woo-conditional-shipping.js?ver=3.6.2.pro 
jQuery(document).ready(function($) {
	/**
	 * Notices in checkout
	 */
	$( document.body ).on( 'updated_checkout', function() {
		let noticesEl = $( '#wcs-notices-pending' );

		if ( noticesEl.length > 0 ) {
			// Clear existing notices
			$( '#wcs-notices' ).remove();

			let shippingMethods = $( '.woocommerce-shipping-totals ul.woocommerce-shipping-methods' );
			
			if ( shippingMethods.length > 0 ) {
				shippingMethods.after( noticesEl );
				noticesEl.css( 'display', 'block' ).attr( 'id', 'wcs-notices' );
			}
		}
	} );

	/**
	 * Notices in cart
	 */
	 $( document.body ).on( 'wcs_updated_cart', function() {
		let noticesEl = $( '#wcs-notices-pending' );

		if ( noticesEl.length > 0 ) {
			// Clear existing notices
			$( '#wcs-notices' ).remove();

			let shippingMethods = $( '.woocommerce-shipping-totals ul.woocommerce-shipping-methods' );
			
			if ( shippingMethods.length > 0 ) {
				shippingMethods.after( noticesEl );
				noticesEl.css( 'display', 'block' ).attr( 'id', 'wcs-notices' );
			}
		}
	} );
	$( document.body ).trigger( 'wcs_updated_cart' );
	$( document.body ).on( 'updated_cart_totals', function() {
		$( document.body ).trigger( 'wcs_updated_cart' );
	} );

	/**
	 * Trigger checkout update if some field that is used
	 * for conditions is updated. Some fields such as email
	 * don't trigger checkout update by default
	 */
	function wcsTriggerCheckoutUpdate() {
		if ( typeof conditional_shipping_settings != 'undefined' ) {
			$.each( conditional_shipping_settings.trigger_fields, function( index, value ) {
				$( document.body ).on( 'change', 'input[name="' + value + '"]', function() {
					$( document.body ).trigger( 'update_checkout' );
				} );

				if ( value.indexOf('shipping_') !== -1 ) {
					var billingValue = value.replace( 'shipping', 'billing' );
					if ( $.inArray( billingValue, conditional_shipping_settings.trigger_fields ) === -1 ) {
						$( document.body ).on( 'change', 'input[name="' + billingValue + '"]', function() {
							$( document.body ).trigger( 'update_checkout' );
						} );
					}
				}
			} );
		}
	}
	wcsTriggerCheckoutUpdate();
});
// source --> https://www.tcgkauppa.fi/wp-content/plugins/woocommerce-social-login/assets/js/frontend/wc-social-login.min.js?ver=2.17.1 
!function(){jQuery(function(o){var e=o(".woocommerce form.login"),n=e.children(":not(.wc-social-login)"),l=e.find(".wc-social-login");return o("a.js-show-social-login").on("click",function(i){var o;return i.preventDefault(),e.is(":visible")?n.is(":visible")?(o=n.length,n.fadeOut(function(){if(0===--o)return l.fadeIn()})):l.is(":visible")?e.slideUp():void 0:(l.is(":visible")||(n.hide(),l.show()),e.slideDown())}),o(document.body).off("click","a.showlogin"),o("a.showlogin").on("click",function(i){return i.preventDefault(),e.is(":visible")?l.is(":visible")?l.fadeOut(function(){return n.fadeIn()}):n.is(":visible")?e.slideUp():void 0:(n.is(":visible")||(n.show(),l.hide()),e.slideDown())}),o("a.js-show-available-providers").on("click",function(i){return i.preventDefault(),(i=o(".wc-social-login-available-providers")).show(),o("html, body").animate({scrollTop:i.offset().top},1e3),o(this).hide()})})}.call(void 0);//# sourceMappingURL=wc-social-login.min.js.map;