'use strict';((d,e)=>{e.body.on("submit.tb_signup",".tb_signup_form",function(k){k.preventDefault();const a=d(this),f=a.find("button");f.prop("disabled",!0);d.ajax({type:"POST",url:themify_vars.ajax_url,data:{dataType:"json",action:"tb_signup_process",nonce:a.find('input[name="nonce"]').val(),data:a.serialize()},beforeSend(){a.find(".tb_signup_errors").removeClass("tb_signup_errors").empty();a.find(".tb_signup_success").hide()},success(b){if(b.err){const g=a[0].getElementsByClassName("tb_signup_messages")[0];
g.classList.add("tb_signup_errors");for(let c=b.err.length-1;-1<c;--c){let h=document.createElement("div");h.innerText=b.err[c];g.appendChild(h)}}else a.find(".tb_signup_success").fadeIn(),b=a.find('input[name="redirect"]'),b[0]?(b=b.val(),""!==b?window.location.href=b:window.location.reload(!0)):a[0].reset();e.scrollTo(a.offset().top-100)},complete(){f.prop("disabled",!1)}})})})(jQuery,Themify);
