!function(e){var t=function(t){var n=t.find(".wcf-mailchimp-form"),a=t.find(".mailchimp-response-message"),r=n.data();n.on("submit",(function(t){t.preventDefault();var o={};e.extend(o,r,{action:"wcf_mailchimp_ajax",nonce:WCF_ADDONS_JS._wpnonce,subscriber_info:n.serialize()}),e.ajax({type:"post",url:WCF_ADDONS_JS.ajaxUrl,data:o,success:function(e){n.trigger("reset"),e.status?(a.removeClass("error"),a.addClass("success"),a.text(e.msg)):(a.addClass("error"),a.removeClass("success"),a.text(e.msg));var t=setTimeout((function(){a.removeClass("error"),a.removeClass("success"),clearTimeout(t)}),5e3)},error:function(e){}})})),n.removeAttr("data-key");var o=document.querySelectorAll(".enews"),s=document.createElement("span");s.classList.add("slider");var c=document.querySelector(".aae-radio .input");c&&c.appendChild(s),o.forEach((function(e){e.addEventListener("change",(function(){console.log(this.value),"NO"===this.value?s.style.left="50%":s.style.left="0%"}))}))};e(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/wcf--mailchimp.default",t),elementorFrontend.hooks.addAction("frontend/element_ready/aae--advanced-mailchimp.default",t)}))}(jQuery);