!function(){var n={376:function(){jQuery(document).ready((function(n){"use strict";function e(e){var t=n(".wslu-onboard-main-header--progress-percentage"),a=n(".wslu-onboard-main-header--progress"),s=Math.round(Math.min(100,Math.max(0,e))),i=parseInt(t.text())||0;n({percent:i}).animate({percent:s},{duration:500,step:function(n){t.text(Math.round(n)+"%")}}),a.stop().animate({width:s+"%"},500)}function t(e){var t='\n        <div class="configure-features--item">\n            <div class="configure-features--wrapper">\n                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" fill="none">\n                    <rect width="22" height="22" rx="11" fill="#0FA20C" fill-opacity="0.1" />\n                    <path d="M15.4 8L9.35 14.02L6.6 11.27" stroke="#0FA20C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n                </svg>\n                <span>'.concat(e,"</span>\n            </div>\n        </div>");n(t).hide().appendTo(".configure-features").slideDown(300)}n("#wslu-admin-settings-form").on("submit",(function(e){var t=n(this),a=t.find(".wslu-admin-settings-form-submit"),s=t.serialize();t.addClass("is-loading"),a.attr("disabled",!0),a.find(".wslu-admin-save-icon").hide(),s+="&nonce="+ekit_ajax_var.nonce,n.post(ajaxurl+"?action=wp_social_admin_action",s,(function(n){t.removeClass("is-loading"),a.removeAttr("disabled"),a.find(".wslu-admin-save-icon").fadeIn(),a.hasClass("wslu-onboard-btn")&&(window.location.href=window.location.origin+window.location.pathname+"?page=wslu_global_setting")})),e.preventDefault()})),n(".wslu-onboard-step-wrapper #signup").on("input",(function(){var e,t,a;e=n(this),a=e,n(".error").remove(),!a.length||(t=a.val(),/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(t))||a.parent().after('<p class="error">Please enter valid email.</p>')})),n(".wslu-onboard-step-wrapper #signup").on("keydown",(function(n){"Enter"==n.key&&n.preventDefault()})),n(".wslu-onboard-nav-item").on("click",(function(){if(n(this).index()>1&&!n(this).hasClass("next")&&!n(this).hasClass("selected"))return!1;if(n(this).hasClass("next"))n(".wslu-onboard-step-wrapper.active #signup");n(this).next().addClass("next").siblings().removeClass("next"),n(this).removeClass("selected"),n(this).addClass("active").siblings().removeClass("active"),n(this).prevAll().addClass("selected").end().nextAll().removeClass("selected");var e=n(this).data("step_key"),t=n(this).parents(".wslu-onboard-nav"),a=t.offset().left,s=n(this).is(":last-child")?t.width():n(this).offset().left-a+n(this).outerWidth();n(".wslu-onboard-progressbar").css("width",s),n(".wslu-onboard-"+e).addClass("active").siblings().removeClass("active")})),n(".wslu-onboard-nav-item:first-of-type").trigger("click"),n(".wslu-onboard-pagi-btn").on("click",(function(e){n(this).hasClass("next")&&n(".wslu-onboard-nav-item.active").next().trigger("click"),n(this).hasClass("prev")&&n(".wslu-onboard-nav-item.active").prev().trigger("click")})),n(window).on("configureWsluOnboard",(function(a){var s=n("#wslu-admin-settings-form"),i=s.serialize();s.find(".wslu-onboard-nav li").attr("disabled",!0).css("pointer-events","none"),i+="&nonce="+ekit_ajax_var.nonce,n.post(ajaxurl+"?action=wp_social_admin_action",i,(function(a){var s;Array.isArray(a.plugins)&&a.plugins.length>0&&null!==(s=navigator)&&void 0!==s&&s.onLine?(e(a.progress),function(a){var s=a.length,i=0;function o(){if(0===a.length)return console.log("✅ All plugins installed"),void n(".go-to-dashboard").fadeIn(300);var r=a.shift();n.post(ajaxurl,{action:"wp_social_onboard_plugins",plugin_slug:r,nonce:ekit_ajax_var.nonce},(function(n){var a,l;n.success?(e(++i/s*100),t(null==n||null===(a=n.data)||void 0===a?void 0:a.message)):console.error("❌ Failed to install: ".concat(r),(null===(l=n.data)||void 0===l?void 0:l.message)||"");o()}))}o()}(a.plugins),t(null==a?void 0:a.message)):(e(100),t(null==a?void 0:a.message),n(".go-to-dashboard").fadeIn(700))}))})),n(document).on("click",".wslu-onboard-select-all-next-btn",(function(e){e.preventDefault(),n(".wslu-onboard-single-plugin--input:not(:checked)").prop("checked",!0)})),jQuery(".wslu-onboard-tut-term--help").on("click",(function(){n(this).toggleClass("active").prev().toggleClass("active")}))}))}},e={};function t(a){var s=e[a];if(s!==undefined)return s.exports;var i=e[a]={exports:{}};return n[a](i,i.exports,t),i.exports}t.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(e,{a:e}),e},t.d=function(n,e){for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},function(){"use strict";t(376)}()}();