function wfp_welcome_control(e){var t=document.querySelectorAll(e);if(!t)return"";for(var r=0;r<t.length;r++)t[r].addEventListener("click",o);function o(){event.preventDefault();var e=this.getAttribute("wfp-total-step");e||(e=0);var t=this.getAttribute("wfp-button-type");t||(t="next");var r=document.querySelector(".wfp-welcome-block.wfp-open");if(r){var o=r.getAttribute("wfp-wel-index");o||(o=0);var n=r.getAttribute("wfp-pre-step-type");n||(n="skip");var i=r.getAttribute("wfp-next-step-type");i||(i="next");var u=Number(o)+1;if(u==e&&(u=o),"next"==t){var l=r.getAttribute("wfp-path");l||(l="");var c=r.getAttribute("wfp-return");c||(c="next");var a=r.getAttribute("wfp-return-location");a||(a=u),ajaxWelcomeSubmit(l);if("redirect"==c?setTimeout((function(){window.location.href=a}),2e3):Number(a)>0&&(u=a),"finish"==i)return document.querySelector('[data-modal-dismiss="modal"]').click(),""}else{if("pre"==n){var p=Number(o)-1;u=p<0?0:p}else if("close"==n)return document.querySelector('[data-modal-dismiss="modal"]').click(),""}!function(e,t){var r=document.querySelector('div[wfp-wel-index="'+e+'"]');if(r){var o=document.querySelectorAll(".wfp-welcome-block");if(!o)return"";for(var n=document.querySelectorAll("li[wfp-selector-index]"),i=0;i<o.length;i++)o[i].classList.remove("wfp-open"),n[i]&&n[i].classList.remove("wfp-selected");r.classList.add("wfp-open");var u=document.querySelector('li[wfp-selector-index="'+e+'"]');u&&u.classList.add("wfp-selected");var l=r.getAttribute("wfp-pre-step");l||(l="Skip");var c=r.getAttribute("wfp-next-step");c||(c="Next");var a=document.querySelector('button[wfp-button-type="pre"]');a&&(a.innerHTML=l);var p=document.querySelector('button[wfp-button-type="next"]');p&&(p.innerHTML=c)}}(u)}}}function ajaxWelcomeSubmit(e){var t=jQuery("#xs-donate-modal-popup__welcome").find("> form#wfdp-welcomeForm-19").serialize();jQuery.ajax({data:t,type:"get",url:window.xs_donate_url.resturl+"xs-welcome-form/welcome-submit/"+e,success:function(e){}})}