!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.chariot=t()}}(function(){var t;return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("./tutorial"),l=r(a);t("./ie-shim");var u=function(){function t(e,n){o(this,t),this.config=e,this.delegate=n,this.tutorials={},this._readConfig(e)}return s(t,[{key:"setDelegate",value:function(t){this.delegate=t}},{key:"startTutorial",value:function(t){if(!this.currentTutorial()){var e=this.tutorials[t];return e.start(),e}}},{key:"endTutorial",value:function(){var t=this.currentTutorial();t.end(!0)}},{key:"currentTutorial",value:function(){for(var t in this.tutorials){var e=this.tutorials[t];if(e.isActive())return e}}},{key:"toString",value:function(){return"[Chariot - config: "+this.config+", tutorials: {this.tutorials}]"}},{key:"_readConfig",value:function(t){if(!t||"object"!==("undefined"==typeof t?"undefined":i(t)))throw new Error("Config must contains a tutorials hash.\n"+this);for(var e in t)this.tutorials[e]=new l["default"](t[e],e,this.delegate)}}],[{key:"createTutorial",value:function(t,e){return new l["default"](t,"",e)}},{key:"startTutorial",value:function(t,e){var n=this.createTutorial(t,e);return n.start(),n}}]),t}();n["default"]=u,e.exports=n["default"]},{"./ie-shim":3,"./tutorial":8}],2:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.OVERLAY_Z_INDEX=e.overlayZIndex||20,this.CLONE_Z_INDEX=this.OVERLAY_Z_INDEX+1,this.TOOLTIP_Z_INDEX=this.CLONE_Z_INDEX+1}return o(t,[{key:"reload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.OVERLAY_Z_INDEX=t.overlayZIndex||20,this.CLONE_Z_INDEX=this.OVERLAY_Z_INDEX+1,this.TOOLTIP_Z_INDEX=this.CLONE_Z_INDEX+1}}]),t}();n["default"]=new i,e.exports=n["default"]},{}],3:[function(t,e,n){"use strict";"undefined"!=typeof navigator&&navigator.userAgent.match(/msie|windows|firefox/i)&&(Node.prototype.getComputedCSSText=function(){var t=[],e={cssFloat:"float"},n=document.defaultView.getComputedStyle(this);for(var r in n)if("string"==typeof n[r]&&""!=n[r]){var o=e[r]||r;t[t.length]=o.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})+": "+n[r]}return t.join("; ")+";"})},{}],4:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("./constants"),a=r(s),l=function(){function t(e){o(this,t),this.shouldOverlay=void 0===e.shouldOverlay||e.shouldOverlay,this.overlayColor=e.overlayColor||"rgba(255,255,255,0.8)",this.useTransparentOverlayStrategy=!!e.useTransparentOverlayStrategy,this._resizeHandler=null}return i(t,[{key:"isVisible",value:function(){return this.shouldOverlay===!1}},{key:"render",value:function(){if(!this.isVisible()){this.$document=$(document);var t=$("body"),e=this._createOverlay();t.append(e),this.$overlay=e;var n=this._createTransparentOverlay();t.append(n),this.$transparentOverlay=n}}},{key:"isTransparentOverlayStrategy",value:function(){return this.useTransparentOverlayStrategy}},{key:"showBackgroundOverlay",value:function(){$(window);this.$overlay.css({background:this.overlayColor,border:"none"}),this._resizeOverlayToFullScreen(),this._resizeHandler=this._resizeOverlayToFullScreen.bind(this)}},{key:"showTransparentOverlay",value:function(){this.$transparentOverlay.show()}},{key:"focusOnElement",value:function(t){this.$transparentOverlay.hide(),this._resizeOverlayToElement(t),this._resizeHandler=this._resizeOverlayToElement.bind(this,t)}},{key:"resize",value:function(){this._resizeHandler()}},{key:"tearDown",value:function(){this.$overlay.remove(),this.$transparentOverlay&&this.$transparentOverlay.remove()}},{key:"toString",value:function(){return"[Overlay - shouldOverlay: "+this.shouldOverlay+", "+("overlayColor: "+this.overlayColor+"]")}},{key:"_createOverlay",value:function(){var t=$("<div class='chariot-overlay'></div>");return t.css({"z-index":a["default"].OVERLAY_Z_INDEX}),t}},{key:"_createTransparentOverlay",value:function(){var t=$("<div class='chariot-transparent-overlay'></div>");return t.css({"z-index":a["default"].CLONE_Z_INDEX+1,width:document.body.scrollWidth,height:document.body.scrollHeight}),t}},{key:"_resizeOverlayToFullScreen",value:function(){this.$overlay.css({width:document.body.scrollWidth,height:document.body.scrollHeight})}},{key:"_resizeOverlayToElement",value:function(t){var e=t.offset(),n="solid "+this.overlayColor,r=this.$document,o=r.outerWidth(),i=r.outerHeight(),s=t.outerWidth(),a=t.outerHeight(),l=e.left,u=o-(e.left+s),c=e.top,f=i-(e.top+a);this.$overlay.css({background:"transparent",width:s,height:a,"border-left":l+"px "+n,"border-top":c+"px "+n,"border-right":u+"px "+n,"border-bottom":f+"px "+n})}}]),t}();n["default"]=l,e.exports=n["default"]},{"./constants":2}],5:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("lodash.debounce"),a=r(s),l=t("./tooltip"),u=r(l),c=t("./constants"),f=r(c),h=t("./style"),p=r(h),d=100,v=100,y=t("es6-promise").Promise,m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=arguments[2],i=this,s=arguments[3],a=arguments[4];if(o(this,t),this.tutorial=r,this.index=n,this.overlay=s,this.delegate=a||{},!e.selectors)throw new Error("selectors must be present in Step configuration\n"+this);if("string"==typeof e.selectors)this.selectors={0:e.selectors};else if("[object Object]"===Object.prototype.toString.call(e.selectors)){if(!Object.keys(e.selectors).length)throw new Error("selectors must be present in Step configuration\n"+this);this.selectors=e.selectors}else{if(!Array.isArray(e.selectors))throw new Error("selectors must be an object, array, or string");!function(){var t={};e.selectors.forEach(function(e,n){t[n]=e}),i.selectors=t}()}this._resizeTimeout=null,this._elementMap={};for(var l in this.selectors)this._elementMap[l]={};this.tooltip=new u["default"](e.tooltip,this,r)}return i(t,[{key:"render",value:function(){var t=this;y.resolve().then(function(){if(t.delegate.willBeginStep)return t.delegate.willBeginStep(t,t.index,t.tutorial)}).then(function(){if(t.delegate.willShowOverlay)return t.delegate.willShowOverlay(t.overlay,t.index,t.tutorial)}).then(function(){return t.overlay.showBackgroundOverlay(),t._waitForElements()}).then(function(){t.overlay.isTransparentOverlayStrategy()&&1===Object.keys(t.selectors).length?t._singleTransparentOverlayStrategy():t._clonedElementStrategy()}).then(function(){if(t.delegate.didShowOverlay)return t.delegate.didShowOverlay(t.overlay,t.index,t.tutorial)}).then(function(){if(t.delegate.willRenderTooltip)return t.delegate.willRenderTooltip(t.tooltip,t.index,t.tutorial)}).then(function(){if(t._renderTooltip(),t.delegate.didRenderTooltip)return t.delegate.didRenderTooltip(t.tooltip,t.index,t.tutorial)}).then(function(){t.overlay.resize(),t._resizeHandler=(0,a["default"])(function(){for(var e in t.selectors){var n=t._elementMap[e];if(n.clone){var r=n.element,o=n.clone;p["default"].clearCachedStylesForElement(r),t._applyComputedStyles(o,r),t._positionClone(o,r)}}t.tooltip.reposition(),t.overlay.resize()},50),$(window).on("resize",t._resizeHandler)})["catch"](function(e){console.log(e),t.tutorial.tearDown()})}},{key:"next",value:function(){var t=this;y.resolve().then(function(){if(t.delegate.didFinishStep)return t.delegate.didFinishStep(t,t.index,t.tutorial)}).then(function(){t.tutorial.next()})["catch"](function(e){console.log(e),t.tutorial.next()})}},{key:"getClonedElement",value:function(t){var e=this._elementMap[t];if(e)return e.clone}},{key:"tearDown",value:function(){var t=$(window);for(var e in this.selectors){var n=this.selectors[e];p["default"].clearCachedStylesForElement($(n));var r=this._elementMap[e];r.clone&&r.clone.remove()}this.tooltip.tearDown(),t.off("resize",this._resizeHandler)}},{key:"prepare",value:function(){for(var t in this.selectors){var e=this.selectors[t];this._computeStyles($(e))}}},{key:"toString",value:function(){return"[Step - index: "+this.index+", "+("selectors: "+JSON.stringify(this.selectors)+"]")}},{key:"_singleTransparentOverlayStrategy",value:function(){var t=Object.keys(this.selectors)[0],e=this._elementMap[t].element;this.overlay.focusOnElement(e)}},{key:"_clonedElementStrategy",value:function(){this._cloneElements(this.selectors),this.overlay.showTransparentOverlay()}},{key:"_renderTooltip",value:function(){this.tooltip.render()}},{key:"_waitForElements",value:function(){var t=this,e=[],n=function(n){var r=new y(function(e,r){t._waitForElement(n,0,e,r)});e.push(r)};for(var r in this.selectors)n(r);return y.all(e)}},{key:"_waitForElement",value:function(t,e,n,r){var o=this,i=this.selectors[t],s=$(i);0==s.length?(++e,e==d?r("Selector not found: "+i):window.setTimeout(function(){o._waitForElement(t,e,n,r)},v)):(this._elementMap[t].element=s,n())}},{key:"_computeStyles",value:function(t){var e=this;p["default"].getComputedStylesFor(t[0]),t.children().toArray().forEach(function(t){e._computeStyles($(t))})}},{key:"_cloneElements",value:function(t){var e=this;if(!this.overlay.isVisible()){setTimeout(function(){e.tutorial.prepare()},0);for(var n in t){var r=this._cloneElement(n);this._elementMap[n].clone=r}}}},{key:"_cloneElement",value:function(t){var e=this._elementMap[t].element;if(0==e.length)return null;var n=e.clone();return $("body").append(n),this._applyComputedStyles(n,e),this._positionClone(n,e),n}},{key:"_applyComputedStyles",value:function(t,e){var n=this;if(e.is(":visible")){t.addClass("chariot-clone"),p["default"].cloneStyles(e,t);var r=t.children().toArray();e.children().toArray().forEach(function(t,e){n._applyComputedStyles($(r[e]),$(t))})}}},{key:"_positionClone",value:function(t,e){t.css({"z-index":f["default"].CLONE_Z_INDEX,position:"absolute"}),t.offset(e.offset())}}]),t}();n["default"]=m,e.exports=n["default"]},{"./constants":2,"./style":6,"./tooltip":7,"es6-promise":9,"lodash.debounce":11}],6:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){r(this,t)}return o(t,null,[{key:"calculateLeft",value:function(t,e,n,r,o){var i=0;switch(r){case"left":i=e.offset().left-t.outerWidth()+n-o;break;case"right":i=e.offset().left+e.outerWidth()+n+o;break;case"top":case"bottom":i=e.offset().left+e.outerWidth()/2-t.outerWidth()/2+n}return i}},{key:"calculateTop",value:function(t,e,n,r,o){var i=0;switch(r){case"top":i=e.offset().top-t.outerHeight()+n-o;break;case"bottom":i=e.offset().top+e.outerHeight()+n+o;break;case"left":case"right":i=e.offset().top+e.outerHeight()/2-t.outerHeight()/2+n}return i}},{key:"getComputedStylesFor",value:function(t){return t._chariotComputedStyles?t._chariotComputedStyles:this._cacheStyleFor(t)}},{key:"cloneStyles",value:function(t,e){var n=((new Date).getTime(),this.getComputedStylesFor(t[0]));e[0].style.cssText=n,navigator.userAgent.match(/msie|windows/i)&&(this._ieBoxModelStyleFix("width",e,n),this._ieBoxModelStyleFix("height",e,n)),e.css("pointer-events","none")}},{key:"clearCachedStylesForElement",value:function(t){var e=this;t&&t.length&&(t[0]._chariotComputedStyles=null,t.children().each(function(t,n){e.clearCachedStylesForElement($(n))}))}},{key:"_ieBoxModelStyleFix",value:function(t,e,n){var r=n.match(new RegExp("; "+t+": ([^;]*)")),o=r&&r.length>1?parseInt(r[1]):0;0===o||isNaN(o)||e[t](o)}},{key:"_generateUniqueClassName",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"class";return t+"_"+Math.floor(1e6*Math.random())}},{key:"_clonePseudoStyle",value:function(t,e,n){var r=window.getComputedStyle(t[0],":"+n);if(r.content&&""!==r.content){var o=this._generateUniqueClassName();e.addClass(o),document.styleSheets[0].insertRule("."+o+"::"+n+" {\n        "+r.cssText+"; content: "+r.content+"; }",0)}}},{key:"_cacheStyleFor",value:function(t){var e=void 0;return e=navigator.userAgent.match(/msie|windows|firefox/i)?t.getComputedCSSText():document.defaultView.getComputedStyle(t).cssText,Object.defineProperty(t,"_chariotComputedStyles",{value:e,enumerable:!1,writable:!0,configurable:!1}),e}}]),t}();n["default"]=i,e.exports=n["default"]},{}],7:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("./constants"),a=r(s),l=t("./style"),u=r(l),c=11,f=function(){function t(e,n,r){o(this,t),this.config=e,this.step=n,this.tutorial=r,this.position=e.position;var i="chariot-tooltip";switch(this.position){case"left":i+="-arrow-right";break;case"right":i+="-arrow-left";break;case"top":i+="-arrow-bottom";break;case"bottom":i+="-arrow-top"}this.className=e.className,this.xOffsetTooltip=e.xOffsetTooltip?parseInt(e.xOffsetTooltip):0,this.yOffsetTooltip=e.yOffsetTooltip?parseInt(e.yOffsetTooltip):0,this.offsetArrow=e.offsetArrow?parseInt(e.offsetArrow):0,this.arrowClass=i,this.appearAnimationClass="animate-appear-"+this.position,this.width=parseInt(e.width),this.height=parseInt(e.height);var s=Object.keys(this.step.selectors);if(s.length>1&&!e.anchorElement)throw new Error("anchorElement is not optional when more than one selector exists:\n"+this);this.anchorElement=e.anchorElement||s[0],this.text=e.text,this.iconUrl=e.iconUrl,this.title=e.title,this.attr=e.attr||{},this.arrowLength=e.arrowLength||c}return i(t,[{key:"currentStepNum",value:function(){return this.tutorial.stepNum(this.step)}},{key:"render",value:function(){var t=this,e=this.$tooltip=this._createTooltipTemplate();e.css({opacity:0}),$("body").append(e);var n=this.$tooltipArrow=$(".chariot-tooltip-arrow");this._position(e,n),$(".chariot-btn-row button").click(function(){t._animateTooltipDisappear(e)})}},{key:"tearDown",value:function(){this.$tooltip&&(this.$tooltip.remove(),this.$tooltip=null,this.$tooltipArrow.remove(),this.$tooltipArrow=null)}},{key:"reposition",value:function(){this._position(this.$tooltip,this.$tooltipArrow)}},{key:"toString",value:function(){return"[Tooltip - currentStep: "+this.currentStepNum()+", Step: "+this.step+","+(" text: "+this.text+"]")}},{key:"_createTooltipTemplate",value:function(){var t=this.currentStepNum(),e=this.tutorial.steps.length;this.cta=this.config.cta||(t!=e?"Next":"Done"),this.subtext=this.config.subtext||function(){return t+" of "+e};var n=this._subtextMarkup(),r=""===n?"center":"right",o='\n      <div class="'+this._classNames()+'">\n        '+this._arrowMarkup()+'\n        <div class="chariot-tooltip-content">'+this._iconMarkup()+'</div>\n        <h1 class="chariot-tooltip-header">'+this.title+'</h1>\n        <div class="chariot-tooltip-content"><p>'+this.text+'</p></div>\n        <div class="chariot-btn-row">\n          '+n+'\n          <button class="btn btn-inverse '+r+'">'+this.cta+"</button>\n        </div>\n      </div>",i=$(o);return this.attr["data-step-order"]=t,i.attr(this.attr),i}},{key:"_classNames",value:function(){var t=this.currentStepNum(),e="chariot-tooltip chariot-step-"+t;return this.className?e+" "+this.className:e}},{key:"_iconMarkup",value:function(){return this.iconUrl?"<div class='chariot-tooltip-icon'>\n       <img class='chariot-tooltip-icon-img' src=\""+this.iconUrl+'"/>\n     </div>':""}},{key:"_subtextMarkup",value:function(){return this.subtext?"<span class='chariot-tooltip-subtext'>\n      "+this.subtext(this.currentStepNum(),this.tutorial.steps.length)+"\n    </span>":""}},{key:"_arrowMarkup",value:function(){return 0===this.arrowLength?"":'<div class="chariot-tooltip-arrow '+this.arrowClass+'"></div>'}},{key:"_position",value:function(t,e){var n=this;this._positionTooltip(t),this._positionArrow(t,e),this.tutorial.animateScrolling&&!this._isElementInViewport(t)?$("html, body").animate({scrollTop:t.offset().top+t.height()/2-document.body.clientHeight/2,scrollLeft:t.offset().left+t.width()/2-document.body.clientWidth/2},this.tutorial.scrollAnimationDuration,function(){n._animateTooltipAppear(t)}):this._animateTooltipAppear(t)}},{key:"_positionTooltip",value:function(t){var e=this._getAnchorElement();if(e){this.borderLeftWidth=parseInt(t.css("border-left-width"))||0,this.borderRightWidth=parseInt(t.css("border-right-width"))||0,this.borderBottomWidth=parseInt(t.css("border-bottom-width"))||0,this.borderTopWidth=parseInt(t.css("border-top-width"))||0;var n=u["default"].calculateTop(t,e,this.yOffsetTooltip,this.position,this.arrowLength+this.borderTopWidth+this.borderBottomWidth),r=u["default"].calculateLeft(t,e,this.xOffsetTooltip,this.position,this.arrowLength+this.borderLeftWidth+this.borderRightWidth),o={top:n,left:r,"z-index":a["default"].TOOLTIP_Z_INDEX,position:"absolute"};t.css(o)}}},{key:"_positionArrow",value:function(t,e){if(0!==this.arrowLength){var n=2*this.arrowLength,r=Math.sqrt(Math.pow(n,2)/2),o=r+"px",i={"z-index":a["default"].TOOLTIP_Z_INDEX+1,width:o,height:o},s=void 0,l=void 0,u=void 0,c=void 0,f=parseInt(t.css("border-radius"))||0;switch(this.arrowClass){case"chariot-tooltip-arrow-left":s=(t.outerHeight()-n)/2-this.yOffsetTooltip+this.offsetArrow,u=f,c=t.outerHeight()-n-f,i.top=Math.max(Math.min(s,c),u),i.left=-(r/2+this.borderLeftWidth);break;case"chariot-tooltip-arrow-right":s=(t.outerHeight()-n)/2-this.yOffsetTooltip+this.offsetArrow,u=f,c=t.outerHeight()-n-f,i.top=Math.max(Math.min(s,c),u),i.right=-(r/2+this.borderRightWidth);break;case"chariot-tooltip-arrow-bottom":l=(t.outerWidth()-n)/2-this.xOffsetTooltip+this.offsetArrow,u=f,c=t.outerWidth()-n-f,i.left=Math.max(Math.min(l,c),u),i.bottom=-(r/2+this.borderBottomWidth);break;case"chariot-tooltip-arrow-top":l=(t.outerWidth()-n)/2-this.xOffsetTooltip+this.offsetArrow,u=f,c=t.outerWidth()-n-f,i.left=Math.max(Math.min(l,c),u),i.top=-(r/2+this.borderTopWidth)}e.css(i)}}},{key:"_isElementInViewport",value:function(t){var e=t[0].getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}},{key:"_animateTooltipAppear",value:function(t){var e=this;t.css({opacity:1}),this.tutorial.animateTooltips&&t.addClass(this.appearAnimationClass).one("animationend",function(t){$(t.currentTarget).removeClass(e.appearAnimationClass)})}},{key:"_animateTooltipDisappear",value:function(t){var e=this;return this.tutorial.animateTooltips?void t.addClass(this.appearAnimationClass).css({"animation-direction":"reverse"}).on("animationend",function(){e.next()}):void this.next()}},{key:"_getAnchorElement",value:function(){var t=this.step.getClonedElement(this.anchorElement);if(t)return t;var e=this.step.selectors[this.anchorElement],n=$(e);return 0===n.length&&(n=$(this.anchorElement)),0===n.length&&console.log("Anchor element not found: "+this.anchorElement),n}},{key:"next",value:function(){this.step.next()}}]),t}();n["default"]=f,e.exports=n["default"]},{"./constants":2,"./style":6}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("./step"),a=r(s),l=t("./overlay"),u=r(l),c=t("./constants"),f=r(c),h=t("es6-promise").Promise,p=500,d=function(){function t(e,n,r){var i=this;o(this,t),this.name=n,this.delegate=r||{},this.steps=[];var s=Object.prototype.toString.call(e),l=void 0,c=void 0;if("[object Array]"===s)l=e,c={},this.animateTooltips=!0,this.animateScrolling=!0,this.scrollAnimationDuration=p;else{if("[object Object]"!==s)throw new Error("config must be an object or array");if(!Array.isArray(e.steps))throw new Error("steps must be an array.\n"+this);this.zIndex=e.zIndex,this.useTransparentOverlayStrategy=e.useTransparentOverlayStrategy,this.animateTooltips=void 0===e.animateTooltips||e.animateTooltips,this.animateScrolling=void 0===e.animateScrolling||e.animateScrolling,this.scrollAnimationDuration=e.scrollAnimationDuration||p,l=e.steps,c=e}this.overlay=new u["default"](c),l.forEach(function(t,e){i.steps.push(new a["default"](t,e,i,i.overlay,i.delegate))}),this._prepared=!1,this._isActive=!1}return i(t,[{key:"isActive",value:function(){return this._isActive}},{key:"start",value:function(){var t=this;if(null!==this.zIndex&&f["default"].reload({overlayZIndex:this.zIndex}),0===this.steps.length)throw new Error("steps should not be empty.\n"+this);return this._isActive=!0,this.overlay.render(),h.resolve().then(function(){if(t.delegate.willBeginTutorial)return t.delegate.willBeginTutorial(t)}).then(function(){t.currentStep=t.steps[0],t.currentStep.render()})["catch"](function(){t.tearDown()})}},{key:"prepare",value:function(){var t=this;this._prepared||this.steps.forEach(function(e){e.prepare(),t._prepared=!0})}},{key:"next",value:function(t){var e=-1;if(!t){if(e=this.steps.indexOf(this.currentStep),e<0)throw new Error("step not found");if(e===this.steps.length-1)return void this.end()}this.currentStep&&this.currentStep.tearDown();var n=void 0;if(t)if("number"==typeof t){if(t<0||t>=this.steps.length)throw new Error("step is outside bounds of steps array (length: "+this.steps.length+")");n=this.steps[t]}else{if("[object Object]"!==Object.prototype.toString.call(t))throw new Error("step arg must be number or object");n=t}else n=this.steps[e+1];this.currentStep=n,n.render()}},{key:"stepNum",value:function(t){return null===t?null:this.steps.indexOf(t)+1}},{key:"tearDown",value:function(){this._prepared=!1,this.overlay.tearDown(),this.steps.forEach(function(t){t.tearDown()}),this.currentStep=null}},{key:"getStep",value:function(t){return this.steps[t]}},{key:"end",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.tearDown(),h.resolve().then(function(){if(t.delegate.didFinishTutorial)return t.delegate.didFinishTutorial(t,e)}).then(function(){t._isActive=!1})}},{key:"toString",value:function(){return"[Tutorial - active: "+this._isActive+", "+("useTransparentOverlayStrategy: "+this.useTransparentOverlayStrategy+", ")+("steps: "+this.steps+", overlay: "+this.overlay+"]")}}]),t}();n["default"]=d,e.exports=n["default"]},{"./constants":2,"./overlay":4,"./step":5,"es6-promise":9}],9:[function(e,n,r){(function(r,o){(function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function a(t){return"object"==typeof t&&null!==t}function l(t){V=t}function u(t){J=t}function c(){var t=r.nextTick,e=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(v)}}function f(){return function(){B(v)}}function h(){var t=0,e=new Q(v),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function p(){var t=new MessageChannel;return t.port1.onmessage=v,function(){t.port2.postMessage(0)}}function d(){return function(){setTimeout(v,1)}}function v(){for(var t=0;t<q;t+=2){var e=nt[t],n=nt[t+1];e(n),nt[t]=void 0,nt[t+1]=void 0}q=0}function y(){try{var t=e,n=t("vertx");return B=n.runOnLoop||n.runOnContext,f()}catch(r){return d()}}function m(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return st.error=e,st}}function b(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function T(t,e,n){J(function(t){var r=!1,o=b(n,e,function(n){r||(r=!0,e!==n?E(t,n):x(t,n))},function(e){r||(r=!0,C(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,C(t,o))},t)}function O(t,e){e._state===ot?x(t,e._result):e._state===it?C(t,e._result):A(e,void 0,function(e){E(t,e)},function(e){C(t,e)})}function k(t,e){if(e.constructor===t.constructor)O(t,e);else{var n=w(e);n===st?C(t,st.error):void 0===n?x(t,e):s(n)?T(t,e,n):x(t,e)}}function E(t,e){t===e?C(t,g()):i(e)?k(t,e):x(t,e)}function S(t){t._onerror&&t._onerror(t._result),j(t)}function x(t,e){t._state===rt&&(t._result=e,t._state=ot,0!==t._subscribers.length&&J(j,t))}function C(t,e){t._state===rt&&(t._state=it,t._result=e,J(S,t))}function A(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+ot]=n,o[i+it]=r,0===i&&t._state&&J(j,t)}function j(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?N(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function $(t,e){try{return t(e)}catch(n){return at.error=n,at}}function N(t,e,n,r){var o,i,a,l,u=s(n);if(u){if(o=$(n,r),o===at?(l=!0,i=o.error,o=null):a=!0,e===o)return void C(e,_())}else o=r,a=!0;e._state!==rt||(u&&a?E(e,o):l?C(e,i):t===ot?x(e,o):t===it&&C(e,o))}function I(t,e){try{e(function(e){E(t,e)},function(e){C(t,e)})}catch(n){C(t,n)}}function D(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(m),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?x(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&x(n.promise,n._result))):C(n.promise,n._validationError())}function L(t){return new lt(this,t).promise}function P(t){function e(t){E(o,t)}function n(t){C(o,t)}var r=this,o=new r(m);if(!Y(t))return C(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===rt&&s<i;s++)A(r.resolve(t[s]),void 0,e,n);return o}function F(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(m);return E(n,t),n}function W(t){var e=this,n=new e(m);return C(n,t),n}function z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function Z(t){this._id=pt++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==t&&(s(t)||z(),this instanceof Z||H(),I(this,t))}function R(){var t;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=dt)}var X;X=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,V,U,Y=X,q=0,J=({}.toString,function(t,e){nt[q]=t,nt[q+1]=e,q+=2,2===q&&(V?V(v):U())}),K="undefined"!=typeof window?window:void 0,G=K||{},Q=G.MutationObserver||G.WebKitMutationObserver,tt="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nt=new Array(1e3);U=tt?c():Q?h():et?p():void 0===K&&"function"==typeof e?y():d();var rt=void 0,ot=1,it=2,st=new M,at=new M;D.prototype._validateInput=function(t){return Y(t)},D.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},D.prototype._init=function(){this._result=new Array(this.length)};var lt=D;D.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===rt&&o<e;o++)t._eachEntry(r[o],o)},D.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;a(t)?t.constructor===r&&t._state!==rt?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},D.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===rt&&(r._remaining--,t===it?C(o,n):r._result[e]=n),0===r._remaining&&x(o,r._result)},D.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,function(t){n._settledAt(ot,e,t)},function(t){n._settledAt(it,e,t)})};var ut=L,ct=P,ft=F,ht=W,pt=0,dt=Z;Z.all=ut,Z.race=ct,Z.resolve=ft,Z.reject=ht,Z._setScheduler=l,Z._setAsap=u,Z._asap=J,Z.prototype={constructor:Z,then:function(t,e){var n=this,r=n._state;if(r===ot&&!t||r===it&&!e)return this;var o=new this.constructor(m),i=n._result;if(r){var s=arguments[r-1];J(function(){N(r,o,s,i)})}else A(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var vt=R,yt={Promise:dt,polyfill:vt};"function"==typeof t&&t.amd?t(function(){return yt}):"undefined"!=typeof n&&n.exports?n.exports=yt:"undefined"!=typeof this&&(this.ES6Promise=yt),vt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:12}],10:[function(t,e,n){function r(t){return!!t&&"object"==typeof t}function o(t,e){var n=null==t?void 0:t[e];return a(n)?n:void 0}function i(t){return s(t)&&p.call(t)==l}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null!=t&&(i(t)?d.test(f.call(t)):r(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,f=Function.prototype.toString,h=c.hasOwnProperty,p=c.toString,d=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");
e.exports=o},{}],11:[function(t,e,n){function r(t,e,n){function r(){m&&clearTimeout(m),p&&clearTimeout(p),_=0,p=m=g=void 0}function i(e,n){n&&clearTimeout(n),p=m=g=void 0,e&&(_=u(),d=t.apply(y,h),m||p||(h=y=void 0))}function l(){var t=e-(u()-v);t<=0||t>e?i(g,p):m=setTimeout(l,t)}function c(){i(b,m)}function f(){if(h=arguments,v=u(),y=this,g=b&&(m||!T),w===!1)var n=T&&!m;else{p||T||(_=v);var r=w-(v-_),o=r<=0||r>w;o?(p&&(p=clearTimeout(p)),_=v,d=t.apply(y,h)):p||(p=setTimeout(c,r))}return o&&m?m=clearTimeout(m):m||e===w||(m=setTimeout(l,e)),n&&(o=!0,d=t.apply(y,h)),!o||m||p||(h=y=void 0),d}var h,p,d,v,y,m,g,_=0,w=!1,b=!0;if("function"!=typeof t)throw new TypeError(s);if(e=e<0?0:+e||0,n===!0){var T=!0;b=!1}else o(n)&&(T=!!n.leading,w="maxWait"in n&&a(+n.maxWait||0,e),b="trailing"in n?!!n.trailing:b);return f.cancel=r,f}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var i=t("lodash._getnative"),s="Expected a function",a=Math.max,l=i(Date,"now"),u=l||function(){return(new Date).getTime()};e.exports=r},{"lodash._getnative":10}],12:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function s(t){if(h===clearTimeout)return clearTimeout(t);if((h===o||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?v=d.concat(v):m=-1,v.length&&l())}function l(){if(!y){var t=i(a);y=!0;for(var e=v.length;e;){for(d=v,v=[];++m<e;)d&&d[m].run();m=-1,e=v.length}d=null,y=!1,s(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var f,h,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(t){f=r}try{h="function"==typeof clearTimeout?clearTimeout:o}catch(t){h=o}}();var d,v=[],y=!1,m=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];v.push(new u(t,e)),1!==v.length||y||i(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}]},{},[1])(1)});