require.config({paths:{"bootstrap-tour":"/webjars/wiki%3Axwiki/bootstrap-tour/0.12.0/js/bootstrap-tour.min.js?r=1"},shim:{"bootstrap-tour":{deps:["bootstrap","jquery"],exports:"Tour"}}});require(["jquery","xwiki-meta"],function(d,g){var f=function(h){return h.replace(/[^a-zA-Z0-9\-]/g,function(i){return"_"+i.charCodeAt(0)+"_"})};var c=function(l,k){var h=d('<div id="tourResumeContainer" style="position: fixed; bottom: 0; right: 0; z-index: 2000; width: 300px; text-align: right;"></div>').appendTo(d(document.body));var i=d('<button id="tourResume" class="btn btn-default btn-xs"><span class="fa fa-info-circle"></span> Show tour</button>').appendTo(h);h.hide();h.fadeIn();i.click(function(){if(k){i.popover("destroy")}if(window.localStorage.getItem(l._options.name+"_current_step")!=l._options.steps.length-1){l.start(true)}else{l.restart()}i.remove()});var j="You can restart the tour by clicking this button at anytime";if(k){i.popover({animation:true,content:j,placement:"top",container:"#tourResumeContainer"});i.popover("show");setTimeout(function(){i.popover("destroy")},7000)}};var b=function(h,k){var j="bootstrap_tour";var i='<div class="popover tour" style="min-width: 300px;">\n <a class="btn btn-xs btn-default" id="'+j+'_close"><span class="fa fa-times"></span></a>\n  <div class="arrow"></div>\n  <h3 class="popover-title"></h3>\n  <div class="popover-content"></div>\n  <div class="popover-navigation row">\n    <div class="col-xs-6 text-left">\n';if(k.prev>-1){i+='      <a class="btn btn-default btn-sm" id="'+j+'_prev">\u00AB Prev</a>\n'}i+='    </div>\n    <div class="col-xs-6 text-right">\n';if(k.next>-1){i+='      <a class="btn btn-primary btn-sm" id="'+j+'_next">Next \u00BB</a>\n'}else{i+='      <a class="btn btn-success btn-sm" id="'+j+'_end">End tour</a>\n'}i+="    </div>\n  </div></div>";return i};var e=function(m){var l="bootstrap_tour";var h="#"+l+"_close";var i="#"+l+"_end";var k="#"+l+"_prev";var j="#"+l+"_next";d(h).on("click",function(){m.end()});d(i).on("click",function(){m.end()});d(k).on("click",function(){m.prev()});d(j).on("click",function(){m.next()});d(h).css("position","absolute");d(h).css("top","3px");d(h).css("right","5px");d(".tour .popover-title").css("padding-right",d(h).outerWidth()+10+"px")};var a=function(h){var i="/webjars/wiki%3Axwiki/bootstrap-tour/0.12.0/css/bootstrap-tour.min.css";d("<link>").attr("rel","stylesheet").attr("type","text/css").attr("href",i).appendTo(d(document.head));require(["bootstrap-tour"],function(l){var j=f("tour_"+h.name);var o=new l({name:j,storage:window.localStorage,onEnd:function(){c(o,true)},onShown:e,orphan:false,template:b});for(var k=0;k<h.steps.length;k++){o.addStep(h.steps[k])}var n=function(q){var p=RegExp("[?&]"+q+"=([^&]*)").exec(window.location.search);return p&&decodeURIComponent(p[1].replace(/\+/g," "))};var m=n("startTour")=="true";o.init();if(m){o.restart()}else{if(window.localStorage.getItem(j+"_end")==null){o.start()}}if(window.localStorage.getItem(j+"_end")=="yes"){c(o,false,j)}})};d(document).ready(function(){if(d(window).innerWidth()<=768){return}var h={url:new XWiki.Document("TourJson","TourCode").getURL("get","xpage=plain&outputSyntax=plain"),dataType:"json",data:{tourDoc:g.document}};d.ajax(h).success(function(k){for(var j=0;j<k.tours.length;++j){var l=k.tours[j];if(l.steps.length>0){a(l)}}})})});