+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?(i.hoverState="in",void 0):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide),void 0):i.hide())};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),e=n.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery),function(n,t){return"function"==typeof define&&define.amd?define(["jquery"],function(i){return n.Tour=t(i)}):"object"==typeof exports?module.exports=t(require("jQuery")):n.Tour=t(n.jQuery)}(window,function(n){var i,t;return t=window.document,i=function(){function i(t){var i;try{i=window.localStorage}catch(r){i=!1}this._options=n.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:i,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'<div class="popover" role="tooltip"> <div class="arrow"><\/div> <h3 class="popover-title"><\/h3> <div class="popover-content"><\/div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">&laquo; Prev<\/button> <button class="btn btn-sm btn-default" data-role="next">Next &raquo;<\/button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause<\/button> <\/div> <button class="btn btn-sm btn-default" data-role="end">End tour<\/button> <\/div> <\/div>',afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){},onRedirectError:function(){}},t);this._force=!1;this._inited=!1;this._current=null;this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return i.prototype.addSteps=function(n){for(var i,t=0,r=n.length;r>t;t++)i=n[t],this.addStep(i);return this},i.prototype.addStep=function(n){return this._options.steps.push(n),this},i.prototype.getStep=function(t){if(null!=this._options.steps[t])return n.extend({id:"step-"+t,path:"",host:"",placement:"right",title:"",content:"<p><\/p>",next:t===this._options.steps.length-1?-1:t+1,prev:t-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[t].element,backdropElement:this._options.steps[t].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[t])},i.prototype.init=function(n){return this._force=n,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(n){return function(){return n.showStep(n._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},i.prototype.start=function(n){var t;return null==n&&(n=!1),this._inited||this.init(n),null===this._current&&(t=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(t,this.showStep,0)),this},i.prototype.next=function(){var n;return n=this.hideStep(this._current,this._current+1),this._callOnPromiseDone(n,this._showNextStep)},i.prototype.prev=function(){var n;return n=this.hideStep(this._current,this._current-1),this._callOnPromiseDone(n,this._showPrevStep)},i.prototype.goTo=function(n){var t;return t=this.hideStep(this._current,n),this._callOnPromiseDone(t,this.showStep,n)},i.prototype.end=function(){var i,r;return i=function(i){return function(){return n(t).off("click.tour-"+i._options.name),n(t).off("keyup.tour-"+i._options.name),n(window).off("resize.tour-"+i._options.name),i._setState("end","yes"),i._inited=!1,i._force=!1,i._clearTimer(),null!=i._options.onEnd?i._options.onEnd(i):void 0}}(this),r=this.hideStep(this._current),this._callOnPromiseDone(r,i)},i.prototype.ended=function(){return!this._force&&!!this._getState("end")},i.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},i.prototype.pause=function(){var n;return n=this.getStep(this._current),n&&n.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,window.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=n.onPause?n.onPause(this,this._duration):void 0):this},i.prototype.resume=function(){var n;return n=this.getStep(this._current),n&&n.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||n.duration,this._timer=window.setTimeout(function(n){return function(){return n._isLast()?n.next():n.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=n.onResume&&this._duration!==n.duration?n.onResume(this,this._duration):void 0):this},i.prototype.hideStep=function(t,i){var u,e,f,r;if((r=this.getStep(t)))return(this._clearTimer(),f=this._makePromise(null!=r.onHide?r.onHide(this,t):void 0),e=function(u){return function(){var f,e;return f=n(r.element),f.data("bs.popover")||f.data("popover")||(f=n("body")),f.popover("destroy").removeClass("tour-"+u._options.name+"-element tour-"+u._options.name+"-"+t+"-element").removeData("bs.popover").focus(),r.reflex&&n(r.reflexElement).removeClass("tour-step-element-reflex").off(""+u._reflexEvent(r.reflex)+".tour-"+u._options.name),r.backdrop&&(e=null!=i&&u.getStep(i),e&&e.backdrop&&e.backdropElement===r.backdropElement||u._hideBackdrop()),null!=r.onHidden?r.onHidden(u):void 0}}(this),u=r.delay.hide||r.delay,"[object Number]"==={}.toString.call(u)&&u>0?(this._debug("Wait "+u+" milliseconds to hide the step "+(this._current+1)),window.setTimeout(function(n){return function(){return n._callOnPromiseDone(f,e)}}(this),u)):this._callOnPromiseDone(f,e),f)},i.prototype.showStep=function(n){var u,f,r,e,o,i;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(i=this.getStep(n),i&&(o=n<this._current,f=this._makePromise(null!=i.onShow?i.onShow(this,n):void 0),this.setCurrentStep(n),u=function(){switch({}.toString.call(i.path)){case"[object Function]":return i.path();case"[object String]":return this._options.basePath+i.path;default:return i.path}}.call(this),!i.redirect||!this._isRedirect(i.host,u,t.location)||(this._redirect(i,n,u),this._isJustPathHashDifferent(i.host,u,t.location)))?(e=function(t){return function(){var r;if(t._isOrphan(i)){if(i.orphan===!1)return t._debug("Skip the orphan step "+(t._current+1)+".\nOrphan option is false and the element does not exist or is hidden."),o?t._showPrevStep():t._showNextStep(),void 0;t._debug("Show the orphan step "+(t._current+1)+". Orphans option is true.")}return i.backdrop&&t._showBackdrop(i),r=function(){if(t.getCurrentStep()===n&&!t.ended())return(null!=i.element&&i.backdrop&&t._showOverlayElement(i,!0),t._showPopover(i,n),null!=i.onShown&&i.onShown(t),t._debug("Step "+(t._current+1)+" of "+t._options.steps.length))},i.autoscroll?t._scrollIntoView(i,r):r(),i.duration?t.resume():void 0}}(this),r=i.delay.show||i.delay,"[object Number]"==={}.toString.call(r)&&r>0?(this._debug("Wait "+r+" milliseconds to show the step "+(this._current+1)),window.setTimeout(function(n){return function(){return n._callOnPromiseDone(f,e)}}(this),r)):this._callOnPromiseDone(f,e),f):void 0)},i.prototype.getCurrentStep=function(){return this._current},i.prototype.setCurrentStep=function(n){return null!=n?(this._current=n,this._setState("current_step",n)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},i.prototype.redraw=function(){return this._showOverlayElement(this.getStep(this.getCurrentStep()).element,!0)},i.prototype._setState=function(n,t){var r,i;if(this._options.storage){i=""+this._options.name+"_"+n;try{this._options.storage.setItem(i,t)}catch(u){r=u;r.code===DOMException.QUOTA_EXCEEDED_ERR&&this._debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(i,t)}return null==this._state&&(this._state={}),this._state[n]=t},i.prototype._removeState=function(n){var t;return this._options.storage?(t=""+this._options.name+"_"+n,this._options.storage.removeItem(t),this._options.afterRemoveState(t)):null!=this._state?delete this._state[n]:void 0},i.prototype._getState=function(n){var i,t;return this._options.storage?(i=""+this._options.name+"_"+n,t=this._options.storage.getItem(i)):null!=this._state&&(t=this._state[n]),(void 0===t||"null"===t)&&(t=null),this._options.afterGetState(n,t),t},i.prototype._showNextStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.next)}}(this),t=this._makePromise(null!=n.onNext?n.onNext(this):void 0),this._callOnPromiseDone(t,i)},i.prototype._showPrevStep=function(){var t,i,n;return n=this.getStep(this._current),i=function(t){return function(){return t.showStep(n.prev)}}(this),t=this._makePromise(null!=n.onPrev?n.onPrev(this):void 0),this._callOnPromiseDone(t,i)},i.prototype._debug=function(n){if(this._options.debug)return window.console.log("Bootstrap Tour '"+this._options.name+"' | "+n)},i.prototype._isRedirect=function(n,t,i){var r;return null!=n&&""!==n&&("[object RegExp]"==={}.toString.call(n)&&!n.test(i.origin)||"[object String]"==={}.toString.call(n)&&this._isHostDifferent(n,i))?!0:(r=[i.pathname,i.search,i.hash].join(""),null!=t&&""!==t&&("[object RegExp]"==={}.toString.call(t)&&!t.test(r)||"[object String]"==={}.toString.call(t)&&this._isPathDifferent(t,r)))},i.prototype._isHostDifferent=function(n,t){switch({}.toString.call(n)){case"[object RegExp]":return!n.test(t.origin);case"[object String]":return this._getProtocol(n)!==this._getProtocol(t.href)||this._getHost(n)!==this._getHost(t.href);default:return!0}},i.prototype._isPathDifferent=function(n,t){return this._getPath(n)!==this._getPath(t)||!this._equal(this._getQuery(n),this._getQuery(t))||!this._equal(this._getHash(n),this._getHash(t))},i.prototype._isJustPathHashDifferent=function(n,t,i){var r;return null!=n&&""!==n&&this._isHostDifferent(n,i)?!1:(r=[i.pathname,i.search,i.hash].join(""),"[object String]"==={}.toString.call(t)?this._getPath(t)===this._getPath(r)&&this._equal(this._getQuery(t),this._getQuery(r))&&!this._equal(this._getHash(t),this._getHash(r)):!1)},i.prototype._redirect=function(i,r,u){var f;return n.isFunction(i.redirect)?i.redirect.call(this,u):(f="[object String]"==={}.toString.call(i.host)?""+i.host+u:u,this._debug("Redirect to "+f),this._getState("redirect_to")!==""+r?(this._setState("redirect_to",""+r),t.location.href=f):(this._debug("Error redirection loop to "+u),this._removeState("redirect_to"),null!=i.onRedirectError?i.onRedirectError(this):void 0))},i.prototype._isOrphan=function(t){return null==t.element||!n(t.element).length||n(t.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==n(t.element)[0].namespaceURI},i.prototype._isLast=function(){return this._current<this._options.steps.length-1},i.prototype._showPopover=function(t,i){var r,u,f,e,o;return n(".tour-"+this._options.name).remove(),e=n.extend({},this._options),f=this._isOrphan(t),t.template=this._template(t,i),f&&(t.element="body",t.placement="top"),r=n(t.element),r.addClass("tour-"+this._options.name+"-element tour-"+this._options.name+"-"+i+"-element"),t.options&&n.extend(e,t.options),t.reflex&&!f&&n(t.reflexElement).addClass("tour-step-element-reflex").off(""+this._reflexEvent(t.reflex)+".tour-"+this._options.name).on(""+this._reflexEvent(t.reflex)+".tour-"+this._options.name,function(n){return function(){return n._isLast()?n.next():n.end()}}(this)),o=t.smartPlacement===!0&&-1===t.placement.search(/auto/i),r.popover({placement:o?"auto "+t.placement:t.placement,trigger:"manual",title:t.title,content:t.content,html:!0,animation:t.animation,container:t.container,template:t.template,selector:t.element}).popover("show"),u=r.data("bs.popover")?r.data("bs.popover").tip():r.data("popover").tip(),u.attr("id",t.id),this._focus(u,r,t.next<0),this._reposition(u,t),f?this._center(u):void 0},i.prototype._template=function(t,i){var f,e,o,s,r,u;return u=t.template,this._isOrphan(t)&&"[object Boolean]"!=={}.toString.call(t.orphan)&&(u=t.orphan),r=n.isFunction(u)?n(u(i,t)):n(u),f=r.find(".popover-navigation"),o=f.find('[data-role="prev"]'),e=f.find('[data-role="next"]'),s=f.find('[data-role="pause-resume"]'),this._isOrphan(t)&&r.addClass("orphan"),r.addClass("tour-"+this._options.name+" tour-"+this._options.name+"-"+i),t.reflex&&r.addClass("tour-"+this._options.name+"-reflex"),t.prev<0&&o.addClass("disabled").prop("disabled",!0).prop("tabindex",-1),t.next<0&&e.addClass("disabled").prop("disabled",!0).prop("tabindex",-1),t.duration||s.remove(),r.clone().wrap("<div>").parent().html()},i.prototype._reflexEvent=function(n){return"[object Boolean]"==={}.toString.call(n)?"click":n},i.prototype._focus=function(n,t,i){var r,u;return u=i?"end":"next",r=n.find("[data-role='"+u+"']"),t.on("shown.bs.popover",function(){return r.focus()})},i.prototype._reposition=function(i,r){var f,h,e,c,o,s,u;if(c=i[0].offsetWidth,h=i[0].offsetHeight,u=i.offset(),o=u.left,s=u.top,f=n(t).outerHeight()-u.top-i.outerHeight(),0>f&&(u.top=u.top+f),e=n("html").outerWidth()-u.left-i.outerWidth(),0>e&&(u.left=u.left+e),u.top<0&&(u.top=0),u.left<0&&(u.left=0),i.offset(u),"bottom"===r.placement||"top"===r.placement){if(o!==u.left)return this._replaceArrow(i,2*(u.left-o),c,"left")}else if(s!==u.top)return this._replaceArrow(i,2*(u.top-s),h,"top")},i.prototype._center=function(t){return t.css("top",n(window).outerHeight()/2-t.outerHeight()/2)},i.prototype._replaceArrow=function(n,t,i,r){return n.find(".arrow").css(r,t?50*(1-t/i)+"%":"")},i.prototype._scrollIntoView=function(t,i){var u,o,h,s,f,r,e;if(u=n(t.element),!u.length)return i();switch(o=n(window),f=u.offset().top,s=u.outerHeight(),e=o.height(),r=0,t.placement){case"top":r=Math.max(0,f-e/2);break;case"left":case"right":r=Math.max(0,f+s/2-e/2);break;case"bottom":r=Math.max(0,f+s-e/2)}return this._debug("Scroll into view. ScrollTop: "+r+". Element offset: "+f+". Window height: "+e+"."),h=0,n("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(r)},function(n){return function(){if(2==++h)return(i(),n._debug("Scroll into view.\nAnimation end element offset: "+u.offset().top+".\nWindow height: "+o.height()+"."))}}(this))},i.prototype._onResize=function(t,i){return n(window).on("resize.tour-"+this._options.name,function(){return clearTimeout(i),i=setTimeout(t,100)})},i.prototype._initMouseNavigation=function(){var i;return i=this,n(t).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(n){return function(t){return t.preventDefault(),n.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(n){return function(t){return t.preventDefault(),n._current>0?n.prev():void 0}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(n){return function(t){return t.preventDefault(),n.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(t){var r;return t.preventDefault(),r=n(this),r.text(i._paused?r.data("pause-text"):r.data("resume-text")),i._paused?i.resume():i.pause()})},i.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return n(t).on("keyup.tour-"+this._options.name,function(n){return function(t){if(t.which)switch(t.which){case 39:return t.preventDefault(),n._isLast()?n.next():n.end();case 37:if(t.preventDefault(),n._current>0)return n.prev()}}}(this))},i.prototype._makePromise=function(t){return t&&n.isFunction(t.then)?t:null},i.prototype._callOnPromiseDone=function(n,t,i){return n?n.then(function(n){return function(){return t.call(n,i)}}(this)):t.call(this,i)},i.prototype._showBackdrop=function(t){if(!this.backdrop.backgroundShown)return(this.backdrop=n("<div>",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,n(t.backdropContainer).append(this.backdrop))},i.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},i.prototype._hideBackground=function(){if(this.backdrop&&this.backdrop.remove)return(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1)},i.prototype._showOverlayElement=function(t,i){var u,f,r;return f=n(t.element),u=n(t.backdropElement),!f||0===f.length||this.backdrop.overlayElementShown&&!i?void 0:(this.backdrop.overlayElementShown||(this.backdrop.$element=u.addClass("tour-step-backdrop"),this.backdrop.$background=n("<div>",{"class":"tour-step-background"}),this.backdrop.$background.appendTo(t.backdropContainer),this.backdrop.overlayElementShown=!0),r={width:u.innerWidth()-2,height:u.innerHeight()-2,offset:u.offset()},t.backdropPadding&&(r=this._applyBackdropPadding(t.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset))},i.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1)},i.prototype._applyBackdropPadding=function(n,t){return"object"==typeof n?(null==n.top&&(n.top=0),null==n.right&&(n.right=0),null==n.bottom&&(n.bottom=0),null==n.left&&(n.left=0),t.offset.top=t.offset.top-n.top,t.offset.left=t.offset.left-n.left,t.width=t.width+n.left+n.right,t.height=t.height+n.top+n.bottom):(t.offset.top=t.offset.top-n,t.offset.left=t.offset.left-n,t.width=t.width+2*n,t.height=t.height+2*n),t},i.prototype._clearTimer=function(){return window.clearTimeout(this._timer),this._timer=null,this._duration=null},i.prototype._getProtocol=function(n){return n=n.split("://"),n.length>1?n[0]:"http"},i.prototype._getHost=function(n){return n=n.split("//"),n=n.length>1?n[1]:n[0],n.split("/")[0]},i.prototype._getPath=function(n){return n.replace(/\/?$/,"").split("?")[0].split("#")[0]},i.prototype._getQuery=function(n){return this._getParams(n,"?")},i.prototype._getHash=function(n){return this._getParams(n,"#")},i.prototype._getParams=function(n,t){var r,i,f,u,e;if(i=n.split(t),1===i.length)return{};for(i=i[1].split("&"),f={},u=0,e=i.length;e>u;u++)r=i[u],r=r.split("="),f[r[0]]=r[1]||"";return f},i.prototype._equal=function(n,t){var i,f,e,r,u,o;if("[object Object]"==={}.toString.call(n)&&"[object Object]"==={}.toString.call(t)){if(f=Object.keys(n),e=Object.keys(t),f.length!==e.length)return!1;for(i in n)if(r=n[i],!this._equal(t[i],r))return!1;return!0}if("[object Array]"==={}.toString.call(n)&&"[object Array]"==={}.toString.call(t)){if(n.length!==t.length)return!1;for(i=u=0,o=n.length;o>u;i=++u)if(r=n[i],!this._equal(r,t[i]))return!1;return!0}return n===t},i}()})