// source --> https://everymanskin.cz/wp-content/plugins/woo-comgate/public/assets/js/public.js?ver=4.0.6 
jQuery( document ).ready(function() {


    if(jQuery('#comgate_payment_loader').length > 0) {

        var refreshInterval = setInterval(get_comgate_status, 2000);

        function get_comgate_status() {
            var id = jQuery("#comgate_payment_loader").data('orderid');

            let data = {
                action: 'comgate_load_payment_status',
                orderid: id
            };

            jQuery.post(comgate_localize.ajaxurl, data, function (response) {
                console.log(response)
                if(response !== '') {
                    clearInterval(refreshInterval);
                    if(jQuery('#comgate_status_loader_wrap').length > 0) {
                        document.getElementById("comgate_status_loader_wrap").remove();
                    }
                    if (response === 'PAID') {
                        jQuery('.woocommerce-thankyou-order-received').html(comgate_localize.paidok)
                    } else if (response === 'CANCELLED') {
                        jQuery('.woocommerce-thankyou-order-received').html(comgate_localize.paidcancelled)
                        data = {
                            action: 'comgate_pay_url',
                            orderid: id
                        };
                        jQuery.post(comgate_localize.ajaxurl, data, function (response) {
                            window.top.location.replace(response);
                        });
                    } else if (response === 'AUTHORIZED') {
                        jQuery('.woocommerce-thankyou-order-received').html(comgate_localize.paidauthorized)
                    } else if (response === 'PENDING') {
                        jQuery('.woocommerce-thankyou-order-received').html(comgate_localize.paidpending)
                    }
                }
            })
        }

    }


});


(function ( $ ) {
	"use strict";

	$(function () {

   jQuery('body').on('click','.comgate_select',function(){
    
    jQuery(this).children('.comgate_select_input').prop('checked',true);
    
   });

   jQuery('body').on('click','.comgate_bank_select',function(){

    jQuery(this).children('.comgate_select_input').prop('checked',true);

   });
		
	});

}(jQuery));
// source --> https://everymanskin.cz/wp-content/plugins/theplus_elementor_addon//assets/js/main/woo-swatches/woo-swatches-front.js?ver=6.0.0 
(function(a){'use strict';a.fn.tp_woo_variation_swatches_form=function(){return this.each(function(){var b=a(this);b.addClass("swatches-support").on("click",".tp-swatches",function(c){c.preventDefault();var d=a(this),e=d.closest(".value").find("select"),f=d.attr("data-value");if(!d.hasClass("disabled"))return e.trigger("focusin"),e.find("option[value=\""+f+"\"]").length?void(d.hasClass("selected")?(e.val(""),d.removeClass("selected")):(d.addClass("selected").siblings(".selected").removeClass("selected"),e.val(f)),e.change()):(d.siblings(".tp-swatches").removeClass("selected"),e.val("").change(),void b.trigger("tp-woo_no_matching_variations",[d]))}).on("click",".reset_variations",function(){b.find(".tp-swatches.selected").removeClass("selected"),b.find(".tp-swatches.disabled").removeClass("disabled")}).on("woocommerce_update_variation_values",function(){setTimeout(function(){b.find("tbody tr").each(function(){var b=a(this),c=b.find("select").find("option"),d=c.filter(":selected"),e=[];c.each(function(a,b){""!==b.value&&e.push(b.value)}),b.find(".tp-swatches").each(function(){var b=a(this),c=b.attr("data-value");-1<e.indexOf(c)?b.removeClass("disabled"):(b.addClass("disabled"),d.length&&c===d.val()&&b.removeClass("selected"))})})},50)}).on("tp-woo_no_matching_variations",function(){window.alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text)})})},a(function(){a(".variations_form").tp_woo_variation_swatches_form(),a(document.body).trigger("tp-woo_initialized")})})(jQuery);