// 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-min-max-quantities/assets/js/frontend/validate.min.js?ver=5.2.6 
!function(a){a(function(){var i={init:function(p){p.find(".quantity").each(function(){var n,t,i=a(this).find("input.qty");i.length&&(n=parseInt(i.prop("min"),10),t=""!==i.prop("max")?parseInt(i.prop("max"),10):1/0,1===n&&n===t?(i.prop("type","hidden"),a(this).addClass("hidden")):a(this).hasClass("hidden")&&(i.prop("type","number"),a(this).removeClass("hidden")))}),p.hasClass("variations_form")&&p.on("show_variation",function(n,t){var i=p.find("input.qty"),a=p.find(".quantity"),e=void 0===t.step||t.step.length?1:parseInt(t.step,10),o=parseInt(t.min_qty,10),t=""!==t.max_qty?parseInt(t.max_qty,10):1/0;1<e&&(e<o?o=(remain=o/e)?e*Math.ceil(remain):o:0<o&&(o=Math.max(o,e)),e<t?t=(remain=t/e)?e*Math.floor(remain):t:t<e&&(t=e)),i.prop("step",e).val(o),i.prop("min",o),i.prop("max",t),1===o&&o===t?(i.prop("type","hidden"),a.addClass("hidden")):a.hasClass("hidden")&&(i.prop("type","number"),a.removeClass("hidden"))})},watch:function(){a("body").on("wc-mmq-init-validation",function(n,t){i.init(t)})}},n=a("body").find(".cart:not( .cart_group )");n.length&&(n.each(function(){i.init(a(this))}),i.watch())})}(jQuery,(document,window));
// 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;