jQuery(document).ready((function(e){"use strict";jQuery(document.body).on("submit",".ekit-mailChimpForm",(function(e){e.preventDefault();let s=jQuery(this).serialize(),t=jQuery(this).attr("data-listed"),r=jQuery(this).attr("data-success-message"),a=jQuery(this).attr("data-success-opt-in-message"),i=jQuery(this).children(".ekit-mail-message"),u=jQuery(this).attr("data-nonce");jQuery.ajax({data:s,type:"get",url:window.elementskit.resturl+"widget/mailchimp/sendmail/?listed="+t,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",u)},success:function(e){if(i.show(),e.error.length>0)i.removeClass("error").html("Found error : "+e.error).addClass("error");else{var s=JSON.parse(e.success.body);"subscribed"!=s.status?"pending"!=s.status?i.html(s.title):i.removeClass("success").html(a).addClass("success"):i.removeClass("success").html(r).addClass("success")}}})}))}));