!function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";o(2),o(14)},function(t,e){},,,,,,,,,,,,function(t,e,o){(function(e){t.exports=e.OnBoarding=o(15)}).call(e,function(){return this}())},function(t,e){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:"",o=$(this.templates[t]);""!=e&&o.find(".content").html(e);$("body").prepend(o)}},{key:"gotoNextStep",value:function(){this.gotoStep(this.currentStep+1)}},{key:"gotoStep",value:function(e){var o=this;this.save({action:"setCurrentStep",value:e},function(n){if(!n){var i=o.getStep(o.currentStep),r=o.getStep(e);if(null==r)return $(".onboarding-popup").remove(),$(".onboarding-navbar").remove(),void $(".onboarding-tooltip").remove();null!=i.action?$(i.action.selector)[i.action.action]():(o.currentStep++,t.isCurrentPage(r.page)?o.showCurrentStep():window.location.href=o.getRedirectUrl(r))}})}},{key:"getTokenAsString",value:function(e){var o;o=-1!==e.indexOf("?")?"&":"?";var n=window.location.search.substr(1),i=t.getSecurityTokens(n,e),r=o;return void 0!==i._token&&(r=r+"&_token="+i._token),r}},{key:"getRedirectUrl",value:function(t){var e;return e=Array.isArray(t.page)?t.page[0]:t.page,e+this.getTokenAsString(e)}},{key:"stop",value:function(){this.save({action:"setCurrentStep",value:this.getTotalSteps()},function(t){t||($(".onboarding-advancement").remove(),$(".onboarding-navbar").remove(),$(".onboarding-popup").remove(),$(".onboarding-tooltip").remove())})}},{key:"gotoLastSavePoint",value:function(){var t=this,e=0,o=0;this.steps.groups.forEach(function(n){n.steps.forEach(function(n){o<=t.currentStep&&$.inArray("savepoint",n.options)!=-1&&(e=o),o++})}),this.gotoStep(e)}},{key:"getGroupForStep",value:function(t){return this.getElementForStep(t,"group")}},{key:"getCurrentGroupID",value:function(){var t=this,e=0,o=0,n=0;return this.steps.groups.forEach(function(i){i.steps.forEach(function(){o==t.currentStep&&(n=e),o++}),e++}),n}},{key:"getCurrentStepIDOnGroup",value:function(){var t=this,e=0,o=0,n=0;return this.steps.groups.forEach(function(i){n=0,i.steps.forEach(function(){e==t.currentStep&&(o=n),n++,e++})}),o}},{key:"getStep",value:function(t){return this.getElementForStep(t,"step")}},{key:"getElementForStep",value:function(t,e){var o=0,n=null;return this.steps.groups.forEach(function(i){i.steps.forEach(function(r){o==t&&("step"==e?n=r:"group"==e&&(n=i)),o++})}),n}},{key:"save",value:function(t,e){$.ajax({method:"POST",url:this.apiLocation,data:t}).done(function(t){e("0"!=t)}).fail(function(){e(!0)})}},{key:"updateAdvancement",value:function(){var t=this,e=$(".onboarding-advancement"),o=$(".onboarding-navbar"),n=0;this.steps.groups.forEach(function(o,i){var r=Math.min(t.currentStep+1-n,o.steps.length);if(e.find(".group-"+i+" .advancement").css("width",r/o.steps.length*100+"%"),n+=o.steps.length,r==o.steps.length){var s=e.find(".group-"+i+" .id");s.hasClass("-done")||s.addClass("-done")}}),e.find(".group-title").html(this.getCurrentGroupID()+1+"/"+this.getTotalGroups()+" - "+this.getGroupForStep(this.currentStep).title),this.getGroupForStep(this.currentStep).subtitle&&(this.getGroupForStep(this.currentStep).subtitle[1]&&e.find(".step-title-1").html('check '+this.getGroupForStep(this.currentStep).subtitle[1]),this.getGroupForStep(this.currentStep).subtitle[2]&&e.find(".step-title-2").html('check '+this.getGroupForStep(this.currentStep).subtitle[2]));var i=this.currentStep/this.getTotalSteps();o.find(".text").find(".text-right").html(Math.floor(100*i)+"%"),o.find(".progress-bar").width(100*i+"%")}},{key:"getTotalSteps",value:function(){var t=0;return this.steps.groups.forEach(function(e){t+=e.steps.length}),t}},{key:"getTotalGroups",value:function(){return this.steps.groups.length}},{key:"setShutDown",value:function(e){var o=this;this.isShutDown=e?1:0,1===this.isShutDown&&($(".onboarding-advancement").toggle(!1),$(".onboarding-navbar").toggleClass("displayed",!0),$(".onboarding-popup").remove(),$(".onboarding-tooltip").remove()),this.save({action:"setShutDown",value:this.isShutDown},function(e){e||0===o.isShutDown&&(t.isCurrentPage(o.getStep(o.currentStep).page)?o.showCurrentStep():o.gotoLastSavePoint())})}},{key:"placeToolTip",value:function(t){var e=this;if(this.tooltipElement=$(t.selector),this.tooltip=$(".onboarding-tooltip"),this.tooltip.hide(),!this.tooltipElement.is(":visible"))return setTimeout(function(){e.placeToolTip(t)},100),void(void 0!=this.tooltipPlacementInterval&&clearInterval(this.tooltipPlacementInterval));this.tooltipPlacementInterval=setInterval(function(){e.updateToolTipPosition(t)},100),this.tooltip.show(),this.tooltip.addClass("-"+t.position),this.tooltip.data("position",t.position);var o=this.getCurrentStepIDOnGroup(),n=this.getGroupForStep(this.currentStep).steps.length;this.tooltip.find(".count").html(o+1+"/"+n);for(var i=this.tooltip.find(".bulls"),r=0;r").addClass("bull");rscreen.height/2-200&&window.scrollTo(0,this.tooltipElement.offset().top-(screen.height/2-200))}.bind(this),200),this.updateToolTipPosition()}},{key:"updateToolTipPosition",value:function(){var t=this.tooltipElement.offset().top-this.tooltipElement.outerHeight()/2-this.tooltip.outerHeight()/2,e=this.tooltipElement.offset().top+this.tooltipElement.outerHeight()/2-this.tooltip.outerHeight()/2,o=this.tooltipElement.offset().top+this.tooltipElement.outerHeight()/2-this.tooltip.outerHeight()/2,n=this.tooltipElement.offset().left-this.tooltip.outerWidth(),i=this.tooltipElement.offset().left+this.tooltipElement.outerWidth();switch(this.tooltip.data("position")){case"right":this.tooltip.css({left:i,top:e});break;case"left":this.tooltip.css({left:n,top:e});break;case"top":this.tooltip.css({left:t,top:o})}}}],[{key:"parseQueryString",value:function(t){var e,o,n=t.split("&"),i={};for(o=0;o