{"version":3,"sources":["../node_modules/scroll/index.js","../node_modules/rafl/index.js","../node_modules/global/window.js","../node_modules/nested-property/index.js","../node_modules/react-joyride/es/utils.js","../node_modules/react-joyride/es/Beacon.js","../node_modules/react-joyride/es/Tooltip.js","../node_modules/react-joyride/es/index.js"],"names":["raf","require","E_NOSCROLL","Error","E_CANCELLED","min","Math","make","prop","el","to","opts","cb","noop","start","Date","from","ease","inOutSine","duration","isNaN","cancelled","animate","timestamp","now","time","eased","n","cos","PI","module","exports","left","top","global","request","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","fn","curr","ms","max","prev","req","setTimeout","cancel","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","clearTimeout","Function","prototype","bind","win","window","self","set","object","property","value","split","reduce","obj","idx","length","get","has","options","array","own","hasOwnProperty","hasOwn","this","isIn","objectInPath","pathExists","validPath","hexToRGB","hex","newHex","replace","m","r","g","b","result","exec","parseInt","browser","isOpera","Boolean","opera","navigator","userAgent","indexOf","isFirefox","InstallTrigger","isChrome","chrome","webstore","isSafari","Object","toString","call","HTMLElement","undefined","webkitAudioContext","isIE","document","documentMode","getBrowser","getDocHeight","_document","body","html","documentElement","scrollHeight","offsetHeight","clientHeight","getRootEl","scrollingElement","logger","_ref","_ref$type","type","msg","_ref$warn","warn","_ref$debug","debug","loggingFunction","console","error","log","Array","isArray","apply","sanitizeSelector","selector","dataset","reactid","className","getOffsetBoundingClientRect","element","offsetParent","elementRect","getBoundingClientRect","offsetParentRect","offsetTop","offsetLeft","right","bottom","x","y","width","height","_createClass","defineProperties","target","props","i","descriptor","enumerable","configurable","writable","defineProperty","key","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","_possibleConstructorReturn","ReferenceError","isTouch","msMaxTouchPoints","JoyrideBeacon","_React$Component","__proto__","getPrototypeOf","arguments","subClass","superClass","create","constructor","setPrototypeOf","_inherits","_props","eventType","onTrigger","step","xPos","yPos","styles","beacon","position","isFixed","inner","outer","stepStyles","style","rgb","backgroundColor","borderColor","React","createElement","onClick","onMouseEnter","Component","propTypes","PropTypes","string","isRequired","func","oneOfType","number","defaultProps","_extends","assign","source","JoyrideTooltip","_this","handleMouseMove","e","event","hole","state","offsetY","clientY","pageY","offsetX","clientX","pageX","inHoleHeight","inHole","mouseOverHole","setState","setOpts","setStyles","allowClicksThruHole","onRender","showOverlay","forceUpdate","addEventListener","nextProps","nextAllowClicksThruHole","nextAnimate","nextStandalone","standalone","nextStep","nextHolePadding","holePadding","nextPosition","nextXPos","nextYPos","nextShowOverlay","_props2","removeEventListener","prevProps","_props3","arrowPosition","innerWidth","location","color","scale","rotate","arrow","buttons","header","main","footer","tooltip","round","rect","back","close","primary","skip","backgroundImage","generateArrow","positonBaseClass","borderRadius","mainColor","textAlign","button","offsetParentSelector","querySelector","classes","positionClass","match","test","targetMiddle","toFixed","getArrowPosition","push","_props4","disableOverlay","_state","output","title","text","dangerouslySetInnerHTML","__html","secondary","opacity","tooltipComponent","join","overlayStyles","cursor","pointerEvents","bool","oneOf","_typeof","Symbol","iterator","defaultState","action","index","isRunning","isTourSkipped","shouldRedraw","shouldRenderTooltip","shouldRun","standaloneData","callbackTypes","DEFAULTS","hasTouch","Joyride","handleKeyboardNavigation","_this$state","steps","intKey","Event","which","keyCode","hasSteps","preventDefault","toggleTooltip","show","handleClickStandaloneTrigger","_this$state2","tooltipData","currentTarget","JSON","parse","click","handleClickBeacon","triggerCallback","handleClickTooltip","_this$state3","_this$props","tagName","dataType","startsWith","stopPropagation","newIndex","classList","contains","shouldDisplay","handleRenderTooltip","calcPlacement","listeners","tooltips","_this2","autoStart","keyboardNavigation","resizeDebounce","resizeDebounceDelay","run","stepsAreValid","checkStepsValidity","timeoutId","resize","keyboard","setHasTouch","stepIndex","stepsChanged","stepIndexChanged","runChanged","shouldStart","didStop","reset","stop","nextState","_state2","nextSteps","hasRenderedTarget","getStepTargetElement","prevState","_state3","scrollToFirstStep","scrollToSteps","scrollTop","getScrollTop","shouldScroll","scroll","_this3","keys","map","filter","forEach","_ref2","autorun","startIndex","hasMountedTarget","_state4","nextIndex","_state5","previousIndex","restart","_state6","shouldRestart","newState","percentageComplete","parseFloat","data","checkStepValidity","trigger","setAttribute","stringify","_this4","every","requiredField","hasField","_state7","displayTooltip","getComputedStyle","marginTop","marginBottom","clientWidth","marginLeft","marginRight","_state8","scrollOffset","targetTop","pageYOffset","calcPosition","scrollTo","floor","callback","_ref3","_ref3$index","_ref3$steps","_state9","_props5","tooltipOffset","getRenderStage","placement","nested","component","getElementDimensions","preventWindowOverflow","ceil","_props6","scrollingElementRect","_getElementDimensions","_getElementDimensions2","_state10","axis","elWidth","elHeight","winWidth","docHeight","newValue","_state11","_props7","locale","showBackButton","showSkipButton","showStepsProgress","currentStep","shouldShowOverlay","last","next","Tooltip","Beacon","_state12","hasStep","standaloneComponent","createComponent"],"mappings":";mHAAA,IAAIA,EAAMC,EAAQ,KACdC,EAAa,IAAIC,MAAM,6CACvBC,EAAc,IAAID,MAAM,oBACxBE,EAAMC,KAAKD,IAOf,SAASE,EAAMC,GACb,OAAO,SAAiBC,EAAIC,EAAIC,EAAMC,GAGjB,mBAFnBD,EAAOA,GAAQ,MAEgBC,EAAKD,EAAMA,EAAO,IAChC,mBAANC,IAAkBA,EAAKC,GAElC,IAAIC,GAAS,IAAIC,KACbC,EAAOP,EAAGD,GACVS,EAAON,EAAKM,MAAQC,EACpBC,EAAYC,MAAMT,EAAKQ,UAA6B,KAAhBR,EAAKQ,SACzCE,GAAY,EAEhB,OAAOL,IAASN,EACdE,EAAGV,EAAYO,EAAGD,IAClBR,GAMF,SAASsB,EAASC,GAChB,GAAIF,EAAW,OAAOT,EAAGR,EAAaK,EAAGD,IAEzC,IAAIgB,GAAO,IAAIT,KACXU,EAAOpB,EAAI,GAAKmB,EAAMV,GAASK,GAC/BO,EAAQT,EAAKQ,GAEjBhB,EAAGD,GAASkB,GAAShB,EAAKM,GAASA,EAExBhB,EAAXyB,EAAO,EAAQH,EAAe,WA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pBqG,OAAQ,CACNhM,KAAM,OACNC,MAAO,QACPqM,KAAM,OACNC,KAAM,OACNpM,KAAM,QAERQ,qBAAsB,OACtBiF,gBAAgB,EAChBC,oBAAqB,IACrBC,KAAK,EACLiE,aAAc,GACd3C,mBAAmB,EACnBC,eAAe,EACf4E,gBAAgB,EAChBlO,aAAa,EACbmO,gBAAgB,EAChBC,mBAAmB,EACnB9F,UAAW,EACX7C,MAAO,GACPmH,cAAe,GACflU,KAAM,UAIO4M","file":"static/js/7.cbfc5778.chunk.js","sourcesContent":["var raf = require('rafl')\nvar E_NOSCROLL = new Error('Element already at target scroll position')\nvar E_CANCELLED = new Error('Scroll cancelled')\nvar min = Math.min\n\nmodule.exports = {\n left: make('scrollLeft'),\n top: make('scrollTop')\n}\n\nfunction make (prop) {\n return function scroll (el, to, opts, cb) {\n opts = opts || {}\n\n if (typeof opts == 'function') cb = opts, opts = {}\n if (typeof cb != 'function') cb = noop\n\n var start = +new Date\n var from = el[prop]\n var ease = opts.ease || inOutSine\n var duration = !isNaN(opts.duration) ? +opts.duration : 350\n var cancelled = false\n\n return from === to ?\n cb(E_NOSCROLL, el[prop]) :\n raf(animate), cancel\n\n function cancel () {\n cancelled = true\n }\n\n function animate (timestamp) {\n if (cancelled) return cb(E_CANCELLED, el[prop])\n\n var now = +new Date\n var time = min(1, ((now - start) / duration))\n var eased = ease(time)\n\n el[prop] = (eased * (to - from)) + from\n\n time < 1 ? raf(animate) : raf(function () {\n cb(null, el[prop])\n })\n }\n }\n}\n\nfunction inOutSine (n) {\n return 0.5 * (1 - Math.cos(Math.PI * n))\n}\n\nfunction noop () {}\n","var global = require('global')\n\n/**\n * `requestAnimationFrame()`\n */\n\nvar request = global.requestAnimationFrame\n || global.webkitRequestAnimationFrame\n || global.mozRequestAnimationFrame\n || fallback\n\nvar prev = +new Date\nfunction fallback (fn) {\n var curr = +new Date\n var ms = Math.max(0, 16 - (curr - prev))\n var req = setTimeout(fn, ms)\n return prev = curr, req\n}\n\n/**\n * `cancelAnimationFrame()`\n */\n\nvar cancel = global.cancelAnimationFrame\n || global.webkitCancelAnimationFrame\n || global.mozCancelAnimationFrame\n || clearTimeout\n\nif (Function.prototype.bind) {\n request = request.bind(global)\n cancel = cancel.bind(global)\n}\n\nexports = module.exports = request\nexports.cancel = cancel\n","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n","/**\n* @license nested-property https://github.com/cosmosio/nested-property\n*\n* The MIT License (MIT)\n*\n* Copyright (c) 2014-2015 Olivier Scherrer \n*/\n\"use strict\";\n\nmodule.exports = {\n set: setNestedProperty,\n get: getNestedProperty,\n has: hasNestedProperty,\n hasOwn: function (object, property, options) {\n return this.has(object, property, options || {own: true});\n },\n isIn: isInNestedProperty\n};\n\n/**\n * Get the property of an object nested in one or more objects\n * given an object such as a.b.c.d = 5, getNestedProperty(a, \"b.c.d\") will return 5.\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @returns the object or the the property value if found\n */\nfunction getNestedProperty(object, property) {\n if (object && typeof object == \"object\") {\n if (typeof property == \"string\" && property !== \"\") {\n var split = property.split(\".\");\n return split.reduce(function (obj, prop) {\n return obj && obj[prop];\n }, object);\n } else if (typeof property == \"number\") {\n return object[property];\n } else {\n return object;\n }\n } else {\n return object;\n }\n}\n\n/**\n * Tell if a nested object has a given property (or array a given index)\n * given an object such as a.b.c.d = 5, hasNestedProperty(a, \"b.c.d\") will return true.\n * It also returns true if the property is in the prototype chain.\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @param {Object} options:\n * - own: set to reject properties from the prototype\n * @returns true if has (property in object), false otherwise\n */\nfunction hasNestedProperty(object, property, options) {\n options = options || {};\n\n if (object && typeof object == \"object\") {\n if (typeof property == \"string\" && property !== \"\") {\n var split = property.split(\".\");\n return split.reduce(function (obj, prop, idx, array) {\n if (idx == array.length - 1) {\n if (options.own) {\n return !!(obj && obj.hasOwnProperty(prop));\n } else {\n return !!(obj !== null && typeof obj == \"object\" && prop in obj);\n }\n }\n return obj && obj[prop];\n }, object);\n } else if (typeof property == \"number\") {\n return property in object;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}\n\n/**\n * Set the property of an object nested in one or more objects\n * If the property doesn't exist, it gets created.\n * @param {Object} object\n * @param {String} property\n * @param value the value to set\n * @returns object if no assignment was made or the value if the assignment was made\n */\nfunction setNestedProperty(object, property, value) {\n if (object && typeof object == \"object\") {\n if (typeof property == \"string\" && property !== \"\") {\n var split = property.split(\".\");\n return split.reduce(function (obj, prop, idx) {\n obj[prop] = obj[prop] || {};\n if (split.length == (idx + 1)) {\n obj[prop] = value;\n }\n return obj[prop];\n }, object);\n } else if (typeof property == \"number\") {\n object[property] = value;\n return object[property];\n } else {\n return object;\n }\n } else {\n return object;\n }\n}\n\n/**\n * Tell if an object is on the path to a nested property\n * If the object is on the path, and the path exists, it returns true, and false otherwise.\n * @param {Object} object to get the nested property from\n * @param {String} property name of the nested property\n * @param {Object} objectInPath the object to check\n * @param {Object} options:\n * - validPath: return false if the path is invalid, even if the object is in the path\n * @returns {boolean} true if the object is on the path\n */\nfunction isInNestedProperty(object, property, objectInPath, options) {\n options = options || {};\n\n if (object && typeof object == \"object\") {\n if (typeof property == \"string\" && property !== \"\") {\n var split = property.split(\".\"),\n isIn = false,\n pathExists;\n\n pathExists = !!split.reduce(function (obj, prop) {\n isIn = isIn || obj === objectInPath || (!!obj && obj[prop] === objectInPath);\n return obj && obj[prop];\n }, object);\n\n if (options.validPath) {\n return isIn && pathExists;\n } else {\n return isIn;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n}\n","/*eslint-disable no-nested-ternary */\n\n/**\n * Convert hex to RGB\n *\n * @param {string} hex\n * @returns {Object}\n */\nexport function hexToRGB(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n var newHex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(newHex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n}\n\n/**\n * Get the current browser\n *\n * @returns {String}\n */\nfunction getBrowser() {\n /* istanbul ignore if */\n if (typeof window === 'undefined') {\n return 'node';\n }\n\n // Opera 8.0+\n var isOpera = Boolean(window.opera) || navigator.userAgent.indexOf(' OPR/') >= 0;\n // Firefox 1.0+\n var isFirefox = typeof InstallTrigger !== 'undefined';\n // Chrome 1+\n var isChrome = !!window.chrome && !!window.chrome.webstore;\n // Safari <= 9 \"[object HTMLElementConstructor]\"\n var isSafari = (Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || !isChrome) && !isOpera && window.webkitAudioContext !== undefined;\n // Internet Explorer 6-11\n var isIE = Boolean(document.documentMode); // At least IE6\n\n return isOpera ? 'opera' : isFirefox ? 'firefox' : isChrome ? 'chrome' : isSafari ? 'safari' : isIE ? 'ie' : '';\n}\n\nexport var browser = getBrowser();\n\n/**\n * Helper function to get the browser-normalized \"document height\"\n * @returns {Number}\n */\nexport function getDocHeight() {\n var _document = document,\n body = _document.body,\n html = _document.documentElement;\n\n\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n}\n\n/**\n * Get DOM document root element\n * @returns {Element}\n */\nexport function getRootEl() {\n var _document2 = document,\n scrollingElement = _document2.scrollingElement;\n\n\n if (!scrollingElement) {\n return ['ie', 'firefox'].indexOf(browser) > -1 ? document.documentElement : document.body;\n }\n\n return scrollingElement;\n}\n\n/**\n * Log method calls if debug is enabled\n *\n * @private\n * @param {Object} arg - Immediately destructured option argument\n * @param {string} arg.type - The method the logger was called from\n * @param {string|Array} [arg.msg] - The message to be logged\n * @param {boolean} [arg.warn] - If true, the message will be a warning\n * @param {boolean} [arg.debug] - Nothing will be logged unless debug is true\n */\nexport function logger(_ref) {\n var _ref$type = _ref.type,\n type = _ref$type === undefined ? 'joyride' : _ref$type,\n msg = _ref.msg,\n _ref$warn = _ref.warn,\n warn = _ref$warn === undefined ? false : _ref$warn,\n _ref$debug = _ref.debug,\n debug = _ref$debug === undefined ? false : _ref$debug;\n\n var loggingFunction = warn ? console.warn || console.error : console.log; //eslint-disable-line no-console\n if (debug) {\n console.log('%c' + type, 'color: #760bc5; font-weight: bold; font-size: 12px;'); //eslint-disable-line no-console\n /* istanbul ignore else */\n if (msg) {\n if (Array.isArray(msg)) {\n loggingFunction.apply(console, msg);\n } else {\n loggingFunction.apply(console, [msg]);\n }\n }\n }\n}\n\n/**\n * Check for deprecated selector styles, return stringified, safer versions\n *\n * @param {string|Object} selector - The selector provided in a step object\n * @returns {string} A cleaned-up selector string\n */\nexport function sanitizeSelector(selector) {\n if (selector.dataset && selector.dataset.reactid) {\n console.warn('Deprecation warning: React 15.0 removed reactid. Update your code.'); //eslint-disable-line no-console\n return '[data-reactid=\"' + selector.dataset.reactid + '\"]';\n } else if (selector.dataset) {\n console.error('Unsupported error: React 15.0+ doesn’t write reactid to the DOM anymore, please use a plain class in your step.', selector); //eslint-disable-line no-console\n\n /* istanbul ignore else */\n if (selector.className) {\n return '.' + selector.className.replace(' ', '.');\n }\n }\n return selector;\n}\n\n/**\n * Find the bounding client rect\n *\n * @private\n * @param {Object} element - The target element\n * @param {string} [offsetParent] - The parent element to calculate offsets from\n * @returns {DOMRect}\n */\nexport function getOffsetBoundingClientRect(element, offsetParent) {\n var elementRect = element.getBoundingClientRect();\n\n if (!offsetParent) {\n return elementRect;\n }\n\n var offsetParentRect = offsetParent.getBoundingClientRect();\n\n var offsetTop = offsetParentRect.top > 0 ? elementRect.top - offsetParentRect.top : elementRect.top;\n var offsetLeft = offsetParentRect.left > 0 ? elementRect.left - offsetParentRect.left : elementRect.left;\n var offsetRight = offsetParentRect.right > 0 ? offsetParentRect.right - elementRect.right : elementRect.right;\n var offsetBottom = offsetParentRect.bottom > 0 ? offsetParentRect.bottom - elementRect.bottom : elementRect.bottom;\n\n return {\n top: offsetTop,\n left: offsetLeft,\n right: offsetRight,\n bottom: offsetBottom,\n x: offsetLeft,\n y: offsetTop,\n width: elementRect.width,\n height: elementRect.height\n };\n}","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { hexToRGB } from './utils';\n\nvar isTouch = false;\n\n/* istanbul ignore else */\nif (typeof window !== 'undefined') {\n isTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;\n}\n\nvar JoyrideBeacon = function (_React$Component) {\n _inherits(JoyrideBeacon, _React$Component);\n\n function JoyrideBeacon() {\n _classCallCheck(this, JoyrideBeacon);\n\n return _possibleConstructorReturn(this, (JoyrideBeacon.__proto__ || Object.getPrototypeOf(JoyrideBeacon)).apply(this, arguments));\n }\n\n _createClass(JoyrideBeacon, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n eventType = _props.eventType,\n onTrigger = _props.onTrigger,\n step = _props.step,\n xPos = _props.xPos,\n yPos = _props.yPos;\n\n var styles = {\n beacon: {\n left: xPos,\n position: step.isFixed === true ? 'fixed' : 'absolute',\n top: yPos\n },\n inner: {},\n outer: {}\n };\n var stepStyles = step.style || {};\n var rgb = void 0;\n\n /* istanbul ignore else */\n if (stepStyles.beacon) {\n if (typeof stepStyles.beacon === 'string') {\n rgb = hexToRGB(stepStyles.beacon);\n\n styles.inner.backgroundColor = stepStyles.beacon;\n styles.outer = {\n backgroundColor: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', 0.2)',\n borderColor: stepStyles.beacon\n };\n } else {\n if (stepStyles.beacon.inner) {\n styles.inner.backgroundColor = stepStyles.beacon.inner;\n }\n\n if (stepStyles.beacon.outer) {\n rgb = hexToRGB(stepStyles.beacon.outer);\n\n styles.outer = {\n backgroundColor: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', 0.4)',\n borderColor: stepStyles.beacon.outer\n };\n }\n }\n }\n\n return React.createElement(\n 'button',\n {\n className: 'joyride-beacon',\n style: styles.beacon,\n onClick: eventType === 'click' || isTouch ? onTrigger : null,\n onMouseEnter: eventType === 'hover' && !isTouch ? onTrigger : null },\n React.createElement('span', { className: 'joyride-beacon__inner', style: styles.inner }),\n React.createElement('span', { className: 'joyride-beacon__outer', style: styles.outer })\n );\n }\n }]);\n\n return JoyrideBeacon;\n}(React.Component);\n\nJoyrideBeacon.propTypes = {\n eventType: PropTypes.string.isRequired,\n onTrigger: PropTypes.func.isRequired,\n step: PropTypes.object.isRequired,\n xPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n yPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired\n};\nJoyrideBeacon.defaultProps = {\n xPos: -1000,\n yPos: -1000\n};\nexport default JoyrideBeacon;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { browser, getOffsetBoundingClientRect, sanitizeSelector } from './utils';\n\nvar JoyrideTooltip = function (_React$Component) {\n _inherits(JoyrideTooltip, _React$Component);\n\n function JoyrideTooltip(props) {\n _classCallCheck(this, JoyrideTooltip);\n\n var _this = _possibleConstructorReturn(this, (JoyrideTooltip.__proto__ || Object.getPrototypeOf(JoyrideTooltip)).call(this, props));\n\n _this.handleMouseMove = function (e) {\n var event = e || window.e;\n var hole = _this.state.styles.hole;\n\n var offsetY = hole.position === 'fixed' ? event.clientY : event.pageY;\n var offsetX = hole.position === 'fixed' ? event.clientX : event.pageX;\n var inHoleHeight = offsetY >= hole.top && offsetY <= hole.top + hole.height;\n var inHoleWidth = offsetX >= hole.left && offsetX <= hole.left + hole.width;\n var inHole = inHoleWidth && inHoleHeight;\n\n if (inHole && !_this.state.mouseOverHole) {\n _this.setState({ mouseOverHole: true });\n }\n\n if (!inHole && _this.state.mouseOverHole) {\n _this.setState({ mouseOverHole: false });\n }\n };\n\n _this.state = {};\n return _this;\n }\n\n _createClass(JoyrideTooltip, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n var opts = this.setOpts();\n var styles = this.setStyles(this.props.step.style, opts, this.props);\n this.setState({ styles: styles, opts: opts });\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props = this.props,\n allowClicksThruHole = _props.allowClicksThruHole,\n onRender = _props.onRender,\n showOverlay = _props.showOverlay;\n\n\n this.forceUpdate();\n onRender();\n\n if (showOverlay && allowClicksThruHole) {\n document.addEventListener('mousemove', this.handleMouseMove, false);\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var nextAllowClicksThruHole = nextProps.allowClicksThruHole,\n nextAnimate = nextProps.animate,\n nextStandalone = nextProps.standalone,\n nextStep = nextProps.step,\n nextHolePadding = nextProps.holePadding,\n nextPosition = nextProps.position,\n nextXPos = nextProps.xPos,\n nextYPos = nextProps.yPos,\n nextShowOverlay = nextProps.showOverlay;\n var _props2 = this.props,\n allowClicksThruHole = _props2.allowClicksThruHole,\n animate = _props2.animate,\n standalone = _props2.standalone,\n step = _props2.step,\n holePadding = _props2.holePadding,\n position = _props2.position,\n xPos = _props2.xPos,\n yPos = _props2.yPos,\n showOverlay = _props2.showOverlay;\n\n /* istanbul ignore else */\n\n if (nextAnimate !== animate || nextStandalone !== standalone || nextStep !== step || nextHolePadding !== holePadding || nextPosition !== position || nextXPos !== xPos || nextYPos !== yPos) {\n var opts = this.setOpts(nextProps);\n var styles = this.setStyles(nextProps.step.style, opts, nextProps);\n this.setState({ styles: styles, opts: opts });\n }\n\n // If showOverlay changed, we might need to allow clicks in the overlay hole\n if (nextShowOverlay !== showOverlay) {\n if (nextShowOverlay && nextAllowClicksThruHole) {\n document.addEventListener('mousemove', this.handleMouseMove, false);\n } else {\n document.removeEventListener('mousemove', this.handleMouseMove, false);\n }\n }\n\n // If allowClickInHole changed, we need to enable or disable clicking in the overlay hole\n if (nextAllowClicksThruHole !== allowClicksThruHole) {\n if (nextAllowClicksThruHole) {\n document.addEventListener('mousemove', this.handleMouseMove, false);\n } else {\n document.removeEventListener('mousemove', this.handleMouseMove, false);\n }\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props3 = this.props,\n onRender = _props3.onRender,\n selector = _props3.selector;\n\n\n if (prevProps.selector !== selector) {\n this.forceUpdate();\n onRender();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n document.removeEventListener('mousemove', this.handleMouseMove, false);\n }\n }, {\n key: 'getArrowPosition',\n value: function getArrowPosition(position) {\n var arrowPosition = position;\n\n if (window.innerWidth < 480) {\n if (position < 8) {\n arrowPosition = 8;\n } else if (position > 92) {\n arrowPosition = 92;\n }\n } else if (window.innerWidth < 1024) {\n if (position < 6) {\n arrowPosition = 6;\n } else if (position > 94) {\n arrowPosition = 94;\n }\n } else if (position < 5) {\n arrowPosition = 5;\n } else if (position > 95) {\n arrowPosition = 95;\n }\n\n return arrowPosition;\n }\n }, {\n key: 'generateArrow',\n value: function generateArrow() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n opts.location = opts.location || 'top';\n opts.color = opts.color || '#f04';\n opts.color = opts.color.replace('#', '%23');\n\n opts.width = opts.width || 36;\n opts.height = opts.width / 2;\n opts.scale = opts.width / 16;\n opts.rotate = '0';\n\n var height = opts.height,\n rotate = opts.rotate,\n width = opts.width;\n\n\n if (opts.location === 'bottom') {\n rotate = '180 8 4';\n } else if (opts.location === 'left') {\n height = opts.width;\n width = opts.height;\n rotate = '270 8 8';\n } else if (opts.location === 'right') {\n height = opts.width;\n width = opts.height;\n rotate = '90 4 4';\n }\n\n return 'data:image/svg+xml,%3Csvg%20width%3D%22' + width + '%22%20height%3D%22' + height + '%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpolygon%20points%3D%220%2C%200%208%2C%208%2016%2C0%22%20fill%3D%22' + opts.color + '%22%20transform%3D%22scale%28' + opts.scale + '%29%20rotate%28' + rotate + '%29%22%3E%3C%2Fpolygon%3E%3C%2Fsvg%3E';\n }\n\n /**\n * Calculate styles based on those passed in with the step, or calculated opts, or props\n *\n * @param {Object} stepStyles Style object provided with step\n * @param {Object} opts Options object calculated from this.setOpts\n * @param {string} opts.arrowPosition Used for left/right positioing of arrow when on bottom or top\n * @param {Object} opts.rect BoundingClientRect of target element\n * @param {string} opts.positonBaseClass Base position of tooltip (top, bottom, left, right)\n * @param {Object} props Positioning properties: cssPosition, xPos, and yPos\n * @returns {Object} Calculated styles for arrow, buttons, header, main, footer, hole, and tooltip\n */\n\n }, {\n key: 'setStyles',\n value: function setStyles(stepStyles, opts, props) {\n var holePadding = props.holePadding,\n step = props.step,\n xPos = props.xPos,\n yPos = props.yPos;\n\n var isFixed = step.isFixed === true;\n\n var styles = {\n arrow: {\n left: opts.arrowPosition\n },\n buttons: {},\n header: {},\n main: {},\n footer: {},\n hole: {},\n tooltip: {\n position: isFixed ? 'fixed' : 'absolute',\n top: Math.round(yPos),\n left: Math.round(xPos)\n }\n };\n\n styles.hole = {\n top: Math.round(opts.rect.top - (isFixed ? 0 : document.body.getBoundingClientRect().top) - holePadding),\n left: Math.round(opts.rect.left - holePadding),\n width: Math.round(opts.rect.width + holePadding * 2),\n height: Math.round(opts.rect.height + holePadding * 2)\n };\n if (isFixed) {\n styles.hole.position = 'fixed';\n }\n\n styles.buttons = {\n back: {},\n close: {},\n primary: {},\n skip: {}\n };\n\n /* Styling */\n /* istanbul ignore else */\n if (stepStyles) {\n if (stepStyles.backgroundColor) {\n styles.arrow.backgroundImage = 'url(\"' + this.generateArrow({\n location: opts.positonBaseClass,\n color: stepStyles.backgroundColor\n }) + '\")';\n styles.tooltip.backgroundColor = stepStyles.backgroundColor;\n }\n\n if (stepStyles.borderRadius) {\n styles.tooltip.borderRadius = stepStyles.borderRadius;\n }\n\n if (stepStyles.color) {\n styles.buttons.primary.color = stepStyles.color;\n styles.buttons.close.color = stepStyles.color;\n styles.buttons.skip.color = stepStyles.color;\n styles.header.color = stepStyles.color;\n styles.tooltip.color = stepStyles.color;\n\n if (stepStyles.mainColor && stepStyles.mainColor === stepStyles.color) {\n styles.buttons.primary.color = stepStyles.backgroundColor;\n }\n }\n\n if (stepStyles.mainColor) {\n styles.buttons.primary.backgroundColor = stepStyles.mainColor;\n styles.buttons.back.color = stepStyles.mainColor;\n styles.header.borderColor = stepStyles.mainColor;\n }\n\n if (stepStyles.textAlign) {\n styles.tooltip.textAlign = stepStyles.textAlign;\n }\n\n if (stepStyles.width) {\n styles.tooltip.width = stepStyles.width;\n }\n\n if (stepStyles.header) {\n styles.header = _extends({}, styles.header, stepStyles.header);\n }\n\n if (stepStyles.main) {\n styles.main = _extends({}, styles.main, stepStyles.main);\n }\n\n if (stepStyles.footer) {\n styles.footer = _extends({}, styles.footer, stepStyles.footer);\n }\n\n if (stepStyles.back) {\n styles.buttons.back = _extends({}, styles.buttons.back, stepStyles.back);\n }\n\n if (stepStyles.arrow) {\n styles.arrow = _extends({}, styles.arrow, stepStyles.arrow);\n }\n\n if (stepStyles.button) {\n styles.buttons.primary = _extends({}, styles.buttons.primary, stepStyles.button);\n }\n\n if (stepStyles.close) {\n styles.buttons.close = _extends({}, styles.buttons.close, stepStyles.close);\n }\n\n if (stepStyles.skip) {\n styles.buttons.skip = _extends({}, styles.buttons.skip, stepStyles.skip);\n }\n\n if (stepStyles.hole) {\n styles.hole = _extends({}, stepStyles.hole, styles.hole);\n }\n }\n\n return styles;\n }\n }, {\n key: 'setOpts',\n value: function setOpts() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var animate = props.animate,\n offsetParentSelector = props.offsetParentSelector,\n position = props.position,\n standalone = props.standalone,\n target = props.target,\n xPos = props.xPos;\n\n var offsetParent = document.querySelector(sanitizeSelector(offsetParentSelector));\n var tooltip = document.querySelector('.joyride-tooltip');\n\n var opts = {\n classes: ['joyride-tooltip'],\n rect: getOffsetBoundingClientRect(target, offsetParent),\n positionClass: position\n };\n\n opts.positonBaseClass = opts.positionClass.match(/-/) ? opts.positionClass.split('-')[0] : opts.positionClass;\n\n if ((/^bottom$/.test(opts.positionClass) || /^top$/.test(opts.positionClass)) && xPos > -1) {\n opts.tooltip = { width: 450 };\n\n /* istanbul ignore else */\n if (tooltip) {\n opts.tooltip = getOffsetBoundingClientRect(tooltip, offsetParent);\n }\n\n opts.targetMiddle = opts.rect.left + opts.rect.width / 2;\n opts.arrowPosition = ((opts.targetMiddle - xPos) / opts.tooltip.width * 100).toFixed(2);\n opts.arrowPosition = this.getArrowPosition(opts.arrowPosition) + '%';\n }\n\n if (standalone) {\n opts.classes.push('joyride-tooltip--standalone');\n }\n\n if (opts.positonBaseClass !== opts.positionClass) {\n opts.classes.push(opts.positonBaseClass);\n }\n\n opts.classes.push(opts.positionClass);\n\n if (animate) {\n opts.classes.push('joyride-tooltip--animate');\n }\n\n return opts;\n }\n }, {\n key: 'render',\n value: function render() {\n var _props4 = this.props,\n buttons = _props4.buttons,\n disableOverlay = _props4.disableOverlay,\n onClick = _props4.onClick,\n selector = _props4.selector,\n showOverlay = _props4.showOverlay,\n step = _props4.step,\n target = _props4.target,\n type = _props4.type;\n\n\n if (!target) {\n return undefined;\n }\n\n var _state = this.state,\n opts = _state.opts,\n styles = _state.styles;\n\n var output = {};\n\n if (step.title) {\n output.header = React.createElement(\n 'div',\n { className: 'joyride-tooltip__header', style: styles.header },\n step.title\n );\n }\n\n if (buttons.skip) {\n output.skip = React.createElement(\n 'button',\n {\n className: 'joyride-tooltip__button joyride-tooltip__button--skip',\n style: styles.buttons.skip,\n 'data-type': 'skip',\n onClick: onClick },\n buttons.skip\n );\n }\n\n // Why is this here?\n if (!step.text || typeof step.text === 'string') {\n output.main = React.createElement('div', {\n className: 'joyride-tooltip__main',\n style: styles.main,\n dangerouslySetInnerHTML: { __html: step.text || '' } });\n } else {\n output.main = React.createElement(\n 'div',\n { className: 'joyride-tooltip__main', style: styles.main },\n step.text\n );\n }\n\n if (buttons.secondary) {\n output.secondary = React.createElement(\n 'button',\n {\n className: 'joyride-tooltip__button joyride-tooltip__button--secondary',\n style: styles.buttons.back,\n 'data-type': 'back',\n onClick: onClick },\n buttons.secondary\n );\n }\n\n if (step.event === 'hover') {\n styles.buttons.close.opacity = 0;\n }\n\n output.tooltipComponent = React.createElement(\n 'div',\n { className: opts.classes.join(' '), style: styles.tooltip, 'data-target': selector },\n React.createElement('div', {\n className: 'joyride-tooltip__triangle joyride-tooltip__triangle-' + opts.positionClass,\n style: styles.arrow }),\n React.createElement('button', {\n className: 'joyride-tooltip__close' + (output.header ? ' joyride-tooltip__close--header' : ''),\n style: styles.buttons.close,\n 'data-type': 'close',\n onClick: onClick }),\n output.header,\n output.main,\n React.createElement(\n 'div',\n { className: 'joyride-tooltip__footer', style: styles.footer },\n output.skip,\n output.secondary,\n React.createElement(\n 'button',\n {\n className: 'joyride-tooltip__button joyride-tooltip__button--primary',\n style: styles.buttons.primary,\n 'data-type': ['single', 'casual'].indexOf(type) !== -1 ? 'close' : 'next',\n onClick: onClick },\n buttons.primary\n )\n )\n );\n\n if (showOverlay) {\n // Empty onClick handler is for iOS touch devices (https://github.com/gilbarbara/react-joyride/issues/204)\n output.hole = React.createElement('div', { className: 'joyride-hole ' + browser, style: styles.hole, onClick: function onClick() {} });\n }\n\n if (!showOverlay) {\n return output.tooltipComponent;\n }\n\n var overlayStyles = {\n cursor: disableOverlay ? 'default' : 'pointer',\n height: document.body.clientHeight,\n pointerEvents: this.state.mouseOverHole ? 'none' : 'auto'\n };\n\n return React.createElement(\n 'div',\n {\n className: 'joyride-overlay',\n style: overlayStyles,\n 'data-type': 'close',\n onClick: !disableOverlay ? onClick : undefined },\n output.hole,\n output.tooltipComponent\n );\n }\n }]);\n\n return JoyrideTooltip;\n}(React.Component);\n\nJoyrideTooltip.propTypes = {\n allowClicksThruHole: PropTypes.bool.isRequired,\n animate: PropTypes.bool.isRequired,\n buttons: PropTypes.object.isRequired,\n disableOverlay: PropTypes.bool,\n holePadding: PropTypes.number,\n offsetParentSelector: PropTypes.string, //eslint-disable-line react/no-unused-prop-types\n onClick: PropTypes.func.isRequired,\n onRender: PropTypes.func.isRequired,\n // position of tooltip with respect to target\n position: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'right', 'left']).isRequired,\n // sanitized selector string\n selector: PropTypes.string.isRequired,\n showOverlay: PropTypes.bool.isRequired,\n standalone: PropTypes.bool,\n step: PropTypes.object.isRequired,\n // DOM element to target\n target: PropTypes.object.isRequired,\n type: PropTypes.string.isRequired,\n xPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n yPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired\n};\nJoyrideTooltip.defaultProps = {\n buttons: {\n primary: 'Close'\n },\n step: {},\n xPos: -1000,\n yPos: -1000\n};\nexport default JoyrideTooltip;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport scroll from 'scroll';\nimport nested from 'nested-property';\nimport { getRootEl, getOffsetBoundingClientRect, logger, sanitizeSelector, getDocHeight } from './utils';\n\nimport Beacon from './Beacon';\nimport Tooltip from './Tooltip';\n\nvar defaultState = {\n action: '',\n index: 0,\n isRunning: false,\n isTourSkipped: false,\n shouldRedraw: true,\n shouldRenderTooltip: false,\n shouldRun: false,\n standaloneData: false, // The standalone tooltip data\n xPos: -1000,\n yPos: -1000\n};\n\nvar callbackTypes = {\n STEP_BEFORE: 'step:before',\n BEACON_BEFORE: 'beacon:before',\n BEACON_TRIGGER: 'beacon:trigger',\n TOOLTIP_BEFORE: 'tooltip:before',\n STEP_AFTER: 'step:after',\n STANDALONE_BEFORE: 'standalone:before',\n STANDALONE_AFTER: 'standalone:after',\n OVERLAY: 'overlay:click',\n HOLE: 'hole:click',\n FINISHED: 'finished',\n TARGET_NOT_FOUND: 'error:target_not_found'\n};\n\nvar DEFAULTS = {\n position: 'top',\n minWidth: 290\n};\n\nvar hasTouch = false;\n\nvar Joyride = function (_React$Component) {\n _inherits(Joyride, _React$Component);\n\n function Joyride(props) {\n _classCallCheck(this, Joyride);\n\n var _this = _possibleConstructorReturn(this, (Joyride.__proto__ || Object.getPrototypeOf(Joyride)).call(this, props));\n\n _this.handleKeyboardNavigation = function (e) {\n var _this$state = _this.state,\n index = _this$state.index,\n shouldRenderTooltip = _this$state.shouldRenderTooltip;\n var steps = _this.props.steps;\n\n var intKey = window.Event ? e.which : e.keyCode;\n var hasSteps = void 0;\n\n if (shouldRenderTooltip) {\n if ([32, 38, 40].indexOf(intKey) !== -1) {\n e.preventDefault();\n }\n\n if (intKey === 27) {\n _this.toggleTooltip({ show: false, index: index + 1, action: 'esc' });\n } else if ([13, 32].indexOf(intKey) !== -1) {\n hasSteps = Boolean(steps[index + 1]);\n _this.toggleTooltip({ show: hasSteps, index: index + 1, action: 'next' });\n }\n }\n };\n\n _this.handleClickStandaloneTrigger = function (e) {\n e.preventDefault();\n var _this$state2 = _this.state,\n isRunning = _this$state2.isRunning,\n standaloneData = _this$state2.standaloneData;\n\n var tooltipData = e.currentTarget.dataset.tooltip;\n\n if (['mouseenter', 'mouseleave'].indexOf(e.type) !== -1 && hasTouch) {\n return;\n }\n\n /* istanbul ignore else */\n if (tooltipData) {\n tooltipData = JSON.parse(tooltipData);\n\n if (!standaloneData || standaloneData.selector !== tooltipData.selector) {\n _this.setState({\n isRunning: false,\n shouldRenderTooltip: false,\n shouldRun: isRunning,\n standaloneData: tooltipData,\n xPos: -1000,\n yPos: -1000\n });\n } else {\n document.querySelector('.joyride-tooltip__close').click();\n }\n }\n };\n\n _this.handleClickBeacon = function (e) {\n e.preventDefault();\n var index = _this.state.index;\n var steps = _this.props.steps;\n\n\n _this.triggerCallback({\n action: e.type,\n index: index,\n type: callbackTypes.BEACON_TRIGGER,\n step: steps[index]\n });\n\n _this.toggleTooltip({ show: true, index: index, action: 'beacon:' + e.type });\n };\n\n _this.handleClickTooltip = function (e) {\n var _this$state3 = _this.state,\n index = _this$state3.index,\n shouldRun = _this$state3.shouldRun;\n var _this$props = _this.props,\n steps = _this$props.steps,\n type = _this$props.type;\n\n var el = e.currentTarget.className.indexOf('joyride-') !== -1 && ['A', 'BUTTON'].indexOf(e.currentTarget.tagName) !== -1 ? e.currentTarget : e.target;\n var dataType = el.dataset.type;\n\n /* istanbul ignore else */\n if (typeof el.className === 'string' && el.className.startsWith('joyride-')) {\n e.preventDefault();\n e.stopPropagation();\n var tooltip = document.querySelector('.joyride-tooltip');\n var newIndex = index + (dataType === 'back' ? -1 : 1);\n\n if (dataType === 'skip') {\n _this.setState({\n isTourSkipped: true\n });\n newIndex = steps.length + 1;\n }\n\n /* istanbul ignore else */\n if (tooltip.classList.contains('joyride-tooltip--standalone')) {\n _this.setState({\n isRunning: shouldRun,\n shouldRedraw: true,\n shouldRun: false,\n standaloneData: false\n });\n } else if (dataType) {\n var shouldDisplay = ['continuous', 'guided'].indexOf(type) !== -1 && !(['close', 'skip'].indexOf(dataType) !== -1) && Boolean(steps[newIndex]);\n\n _this.toggleTooltip({ show: shouldDisplay, index: newIndex, action: dataType });\n }\n\n if (e.target.className === 'joyride-overlay') {\n _this.triggerCallback({\n action: 'click',\n type: callbackTypes.OVERLAY,\n step: steps[index]\n });\n }\n\n if (e.target.classList.contains('joyride-hole')) {\n _this.triggerCallback({\n action: 'click',\n type: callbackTypes.HOLE,\n step: steps[index]\n });\n }\n }\n };\n\n _this.handleRenderTooltip = function () {\n _this.calcPlacement();\n };\n\n _this.state = _extends({}, defaultState);\n\n _this.listeners = {\n tooltips: {}\n };\n return _this;\n }\n\n _createClass(Joyride, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var _props = this.props,\n autoStart = _props.autoStart,\n keyboardNavigation = _props.keyboardNavigation,\n resizeDebounce = _props.resizeDebounce,\n resizeDebounceDelay = _props.resizeDebounceDelay,\n run = _props.run,\n steps = _props.steps,\n type = _props.type;\n\n\n logger({\n type: 'joyride:initialized',\n msg: [this.props],\n debug: this.props.debug\n });\n\n var stepsAreValid = this.checkStepsValidity(steps);\n if (steps && stepsAreValid && run) {\n this.start(autoStart);\n }\n\n if (resizeDebounce) {\n var timeoutId = void 0;\n\n this.listeners.resize = function () {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(function () {\n timeoutId = null;\n _this2.calcPlacement();\n }, resizeDebounceDelay);\n };\n } else {\n this.listeners.resize = function () {\n _this2.calcPlacement();\n };\n }\n window.addEventListener('resize', this.listeners.resize);\n\n /* istanbul ignore else */\n if (keyboardNavigation && type === 'continuous') {\n this.listeners.keyboard = this.handleKeyboardNavigation;\n document.body.addEventListener('keydown', this.listeners.keyboard);\n }\n\n window.addEventListener('touchstart', function setHasTouch() {\n hasTouch = true;\n // Remove event listener once fired, otherwise it'll kill scrolling\n // performance\n window.removeEventListener('touchstart', setHasTouch);\n }, false);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n logger({\n type: 'joyride:willReceiveProps',\n msg: [nextProps],\n debug: nextProps.debug\n });\n\n var _state = this.state,\n isRunning = _state.isRunning,\n shouldRun = _state.shouldRun,\n standaloneData = _state.standaloneData;\n var _props2 = this.props,\n keyboardNavigation = _props2.keyboardNavigation,\n run = _props2.run,\n steps = _props2.steps,\n stepIndex = _props2.stepIndex;\n\n var stepsChanged = nextProps.steps !== steps;\n var stepIndexChanged = nextProps.stepIndex !== stepIndex && nextProps.stepIndex !== this.state.index;\n var runChanged = nextProps.run !== run;\n var shouldStart = false;\n var didStop = false;\n\n if (stepsChanged && this.checkStepsValidity(nextProps.steps)) {\n // Removed all steps, so reset\n if (!nextProps.steps || !nextProps.steps.length) {\n this.reset();\n }\n // Start the joyride if steps were added for the first time, and run prop is true\n else if (!steps.length && nextProps.run) {\n shouldStart = true;\n }\n }\n\n /* istanbul ignore else */\n if (runChanged) {\n // run prop was changed to off, so stop the joyride\n if (run && !nextProps.run) {\n this.stop();\n didStop = true;\n }\n // run prop was changed to on, so start the joyride\n else if (!run && nextProps.run) {\n shouldStart = true;\n }\n // Was not playing, but should, and isn't a standaloneData\n else if (!isRunning && shouldRun && !standaloneData) {\n shouldStart = true;\n }\n }\n\n /* istanbul ignore else */\n if (stepIndexChanged) {\n var hasStep = nextProps.steps[nextProps.stepIndex];\n var shouldDisplay = hasStep && nextProps.autoStart;\n if (runChanged && shouldStart) {\n this.start(nextProps.autoStart, nextProps.steps, nextProps.stepIndex);\n }\n // Next prop is set to run, and the index has changed, but for some reason joyride is not running\n // (maybe this is because of a target not mounted, and the app wants to skip to another step)\n else if (nextProps.run && !isRunning) {\n this.start(nextProps.autoStart, nextProps.steps, nextProps.stepIndex);\n } else if (!didStop) {\n this.toggleTooltip({ show: shouldDisplay, index: nextProps.stepIndex, steps: nextProps.steps, action: 'jump' });\n }\n }\n // Did not change the index, but need to start up the joyride\n else if (shouldStart) {\n this.start(nextProps.autoStart, nextProps.steps);\n }\n\n // Update keyboard listeners if necessary\n /* istanbul ignore else */\n if (!this.listeners.keyboard && (!keyboardNavigation && nextProps.keyboardNavigation || keyboardNavigation) && nextProps.type === 'continuous') {\n this.listeners.keyboard = this.handleKeyboardNavigation;\n document.body.addEventListener('keydown', this.listeners.keyboard);\n } else if (this.listeners.keyboard && keyboardNavigation && (!nextProps.keyboardNavigation || nextProps.type !== 'continuous')) {\n document.body.removeEventListener('keydown', this.listeners.keyboard);\n delete this.listeners.keyboard;\n }\n }\n }, {\n key: 'componentWillUpdate',\n value: function componentWillUpdate(nextProps, nextState) {\n var _state2 = this.state,\n index = _state2.index,\n isRunning = _state2.isRunning,\n shouldRenderTooltip = _state2.shouldRenderTooltip,\n standaloneData = _state2.standaloneData;\n var steps = this.props.steps;\n var nextSteps = nextProps.steps;\n\n var step = steps[index];\n var nextStep = nextSteps[nextState.index];\n var hasRenderedTarget = Boolean(this.getStepTargetElement(nextStep));\n\n // Standalone tooltip is being turned on\n if (!standaloneData && nextState.standaloneData) {\n this.triggerCallback({\n type: callbackTypes.STANDALONE_BEFORE,\n step: nextState.standaloneData\n });\n }\n // Standalone tooltip is being turned off\n else if (standaloneData && !nextState.standaloneData) {\n this.triggerCallback({\n type: callbackTypes.STANDALONE_AFTER,\n step: standaloneData\n });\n }\n\n // Tried to start, but something went wrong and we're not actually running\n if (nextState.action === 'start' && !nextState.isRunning) {\n // There's a step to use, but there's no target in the DOM\n if (nextStep && !hasRenderedTarget) {\n console.warn('Target not mounted', nextStep, nextState.action); //eslint-disable-line no-console\n this.triggerCallback({\n action: 'start',\n index: nextState.index,\n type: callbackTypes.TARGET_NOT_FOUND,\n step: nextStep\n });\n }\n }\n\n // Started running from the beginning (the current index is 0)\n if (!isRunning && nextState.isRunning && nextState.index === 0) {\n this.triggerCallback({\n action: 'start',\n index: nextState.index,\n type: callbackTypes.STEP_BEFORE,\n step: nextStep\n });\n\n // Not showing a tooltip yet, so we're going to show a beacon instead\n /* istanbul ignore else */\n if (!nextState.shouldRenderTooltip) {\n this.triggerCallback({\n action: 'start',\n index: nextState.index,\n type: callbackTypes.BEACON_BEFORE,\n step: nextStep\n });\n }\n }\n\n // Joyride was running (it might still be), and the index has been changed\n if (isRunning && nextState.index !== index) {\n this.triggerCallback({\n action: nextState.action,\n index: index,\n type: callbackTypes.STEP_AFTER,\n step: step\n });\n\n // Attempted to advance to a step with a target that cannot be found\n /* istanbul ignore else */\n if (nextStep && !hasRenderedTarget) {\n console.warn('Target not mounted', nextStep, nextState.action); //eslint-disable-line no-console\n this.triggerCallback({\n action: nextState.action,\n index: nextState.index,\n type: callbackTypes.TARGET_NOT_FOUND,\n step: nextStep\n });\n }\n // There's a next step and the index is > 0\n // (which means STEP_BEFORE wasn't sent as part of the start handler above)\n else if (nextStep && nextState.index) {\n this.triggerCallback({\n action: nextState.action,\n index: nextState.index,\n type: callbackTypes.STEP_BEFORE,\n step: nextStep\n });\n }\n }\n\n // Running, and a tooltip is being turned on/off or the index is changing\n if (nextState.isRunning && (shouldRenderTooltip !== nextState.shouldRenderTooltip || nextState.index !== index)) {\n // Going to show a tooltip\n if (nextState.shouldRenderTooltip) {\n this.triggerCallback({\n action: nextState.action || (nextState.index === 0 ? 'autostart' : ''),\n index: nextState.index,\n type: callbackTypes.TOOLTIP_BEFORE,\n step: nextStep\n });\n }\n // Going to show a beacon\n else {\n this.triggerCallback({\n action: nextState.action,\n index: nextState.index,\n type: callbackTypes.BEACON_BEFORE,\n step: nextStep\n });\n }\n }\n\n // Joyride was changed to a step index which doesn't exist (hit the end)\n if (!nextState.isRunning && nextSteps.length && index !== nextState.index && !nextStep) {\n this.triggerCallback({\n action: nextState.action,\n type: callbackTypes.FINISHED,\n steps: nextSteps,\n isTourSkipped: nextState.isTourSkipped\n });\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n var _state3 = this.state,\n index = _state3.index,\n shouldRedraw = _state3.shouldRedraw,\n isRunning = _state3.isRunning,\n shouldRun = _state3.shouldRun,\n standaloneData = _state3.standaloneData;\n var _props3 = this.props,\n scrollToFirstStep = _props3.scrollToFirstStep,\n scrollToSteps = _props3.scrollToSteps,\n steps = _props3.steps;\n\n var step = steps[index];\n var scrollTop = this.getScrollTop();\n var shouldScroll = (scrollToFirstStep || index > 0 || prevState.index > index) && step && !step.isFixed; // fixed steps don't need to scroll\n\n if (shouldRedraw && step) {\n this.calcPlacement();\n }\n\n if (isRunning && scrollToSteps && shouldScroll && scrollTop >= 0) {\n scroll.top(getRootEl(), this.getScrollTop());\n }\n\n if (steps.length && !isRunning && shouldRun && !standaloneData) {\n this.start();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var _this3 = this;\n\n window.removeEventListener('resize', this.listeners.resize);\n\n /* istanbul ignore else */\n if (this.listeners.keyboard) {\n document.body.removeEventListener('keydown', this.listeners.keyboard);\n }\n\n /* istanbul ignore else */\n if (Object.keys(this.listeners.tooltips).length) {\n Object.keys(this.listeners.tooltips).map(function (key) {\n return {\n el: document.querySelector(key),\n event: _this3.listeners.tooltips[key].event,\n cb: _this3.listeners.tooltips[key].cb,\n key: key\n };\n }).filter(function (_ref) {\n var el = _ref.el;\n return !!el;\n }).forEach(function (_ref2) {\n var el = _ref2.el,\n event = _ref2.event,\n cb = _ref2.cb,\n key = _ref2.key;\n\n el.removeEventListener(event, cb);\n delete _this3.listeners.tooltips[key];\n });\n }\n }\n\n /**\n * Starts the tour\n *\n * @private\n *\n * @param {boolean} [autorun] - Starts with the first tooltip opened\n * @param {Array} [steps] - Array of steps, defaults to this.props.steps\n * @param {number} [startIndex] - Optional step index to start joyride at\n */\n\n }, {\n key: 'start',\n value: function start(autorun) {\n var steps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props.steps;\n var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.state.index;\n\n var hasMountedTarget = Boolean(this.getStepTargetElement(steps[startIndex]));\n var shouldRenderTooltip = autorun === true && hasMountedTarget;\n\n logger({\n type: 'joyride:start',\n msg: ['autorun:', autorun === true],\n debug: this.props.debug\n });\n\n this.setState({\n action: 'start',\n index: startIndex,\n isRunning: Boolean(steps.length) && hasMountedTarget,\n shouldRenderTooltip: shouldRenderTooltip,\n shouldRun: !steps.length\n });\n }\n\n /**\n * Stop the tour\n *\n * @private\n */\n\n }, {\n key: 'stop',\n value: function stop() {\n logger({\n type: 'joyride:stop',\n debug: this.props.debug\n });\n\n this.setState({\n isRunning: false,\n shouldRenderTooltip: false\n });\n }\n\n /**\n * Move to the next step, if there is one. If there is no next step, hide the tooltip.\n */\n\n }, {\n key: 'next',\n value: function next() {\n var _state4 = this.state,\n index = _state4.index,\n shouldRenderTooltip = _state4.shouldRenderTooltip;\n var steps = this.props.steps;\n\n var nextIndex = index + 1;\n\n var shouldDisplay = Boolean(steps[nextIndex]) && shouldRenderTooltip;\n\n logger({\n type: 'joyride:next',\n msg: ['new index:', nextIndex],\n debug: this.props.debug\n });\n this.toggleTooltip({ show: shouldDisplay, index: nextIndex, action: 'next' });\n }\n\n /**\n * Move to the previous step, if there is one. If there is no previous step, hide the tooltip.\n */\n\n }, {\n key: 'back',\n value: function back() {\n var _state5 = this.state,\n index = _state5.index,\n shouldRenderTooltip = _state5.shouldRenderTooltip;\n var steps = this.props.steps;\n\n var previousIndex = index - 1;\n\n var shouldDisplay = Boolean(steps[previousIndex]) && shouldRenderTooltip;\n\n logger({\n type: 'joyride:back',\n msg: ['new index:', previousIndex],\n debug: this.props.debug\n });\n this.toggleTooltip({ show: shouldDisplay, index: previousIndex, action: 'next' });\n }\n\n /**\n * Reset Tour\n *\n * @param {boolean} [restart] - Starts the new tour right away\n */\n\n }, {\n key: 'reset',\n value: function reset(restart) {\n var _state6 = this.state,\n index = _state6.index,\n isRunning = _state6.isRunning;\n\n var shouldRestart = restart === true;\n\n var newState = _extends({}, defaultState, {\n isRunning: shouldRestart,\n shouldRenderTooltip: this.props.autoStart\n });\n\n logger({\n type: 'joyride:reset',\n msg: ['restart:', shouldRestart],\n debug: this.props.debug\n });\n // Force a re-render if necessary\n if (shouldRestart && isRunning === shouldRestart && index === 0) {\n this.forceUpdate();\n }\n\n this.setState(newState);\n }\n\n /**\n * Retrieve the current progress of your tour\n *\n * @returns {{index: number, percentageComplete: number, step: (object|null)}}\n */\n\n }, {\n key: 'getProgress',\n value: function getProgress() {\n var index = this.state.index;\n var steps = this.props.steps;\n\n\n logger({\n type: 'joyride:getProgress',\n msg: ['steps:', steps],\n debug: this.props.debug\n });\n\n return {\n index: index,\n percentageComplete: parseFloat((index / steps.length * 100).toFixed(2).replace('.00', '')),\n step: steps[index]\n };\n }\n\n /**\n * Add standalone tooltip events\n *\n * @param {Object} data - Similar shape to a 'step', but for a single tooltip\n */\n\n }, {\n key: 'addTooltip',\n value: function addTooltip(data) {\n if (!this.checkStepValidity(data)) {\n logger({\n type: 'joyride:addTooltip:FAIL',\n msg: ['data:', data],\n debug: this.props.debug\n });\n\n return;\n }\n\n logger({\n type: 'joyride:addTooltip',\n msg: ['data:', data],\n debug: this.props.debug\n });\n\n var key = data.trigger || sanitizeSelector(data.selector);\n var el = document.querySelector(key);\n\n if (!el) {\n return;\n }\n\n el.setAttribute('data-tooltip', JSON.stringify(data));\n var eventType = data.event || 'click';\n\n /* istanbul ignore else */\n if (eventType === 'hover') {\n this.listeners.tooltips[key + 'mouseenter'] = { event: 'mouseenter', cb: this.handleClickStandaloneTrigger };\n this.listeners.tooltips[key + 'mouseleave'] = { event: 'mouseleave', cb: this.handleClickStandaloneTrigger };\n\n el.addEventListener('mouseenter', this.listeners.tooltips[key + 'mouseenter'].cb);\n el.addEventListener('mouseleave', this.listeners.tooltips[key + 'mouseleave'].cb);\n }\n\n this.listeners.tooltips[key + 'click'] = { event: 'click', cb: this.handleClickStandaloneTrigger };\n el.addEventListener('click', this.listeners.tooltips[key + 'click'].cb);\n }\n\n /**\n * Parse the incoming steps\n *\n * @deprecated\n *\n * @param {Array|Object} steps\n * @returns {Array}\n */\n\n }, {\n key: 'parseSteps',\n value: function parseSteps(steps) {\n console.warn('joyride.parseSteps() is deprecated. It is no longer necessary to parse steps before providing them to Joyride'); //eslint-disable-line no-console\n\n return steps;\n }\n\n /**\n * Verify that a step is valid\n *\n * @param {Object} step - A step object\n * @returns {boolean} - True if the step is valid, false otherwise\n */\n\n }, {\n key: 'checkStepValidity',\n value: function checkStepValidity(step) {\n var _this4 = this;\n\n // Check that the step is the proper type\n if (!step || (typeof step === 'undefined' ? 'undefined' : _typeof(step)) !== 'object' || Array.isArray(step)) {\n logger({\n type: 'joyride:checkStepValidity',\n msg: 'Did not provide a step object.',\n warn: true,\n debug: this.props.debug\n });\n\n return false;\n }\n\n // Check that all required step fields are present\n var requiredFields = ['selector'];\n var hasRequiredField = function hasRequiredField(requiredField) {\n var hasField = Boolean(step[requiredField]);\n\n if (!hasField) {\n logger({\n type: 'joyride:checkStepValidity',\n msg: ['Provided a step without the required ' + requiredField + ' property.', 'Step:', step],\n warn: true,\n debug: _this4.props.debug\n });\n }\n\n return hasField;\n };\n\n return requiredFields.every(hasRequiredField);\n }\n\n /**\n * Check one or more steps are valid\n *\n * @param {Object|Array} steps - A step object or array of step objects\n * @returns {boolean} - True if one or more stpes, and all steps are valid, false otherwise\n */\n\n }, {\n key: 'checkStepsValidity',\n value: function checkStepsValidity(steps) {\n /* istanbul ignore else */\n if (!Array.isArray(steps) && (typeof steps === 'undefined' ? 'undefined' : _typeof(steps)) === 'object') {\n return this.checkStepValidity(steps);\n } else if (steps.length > 0) {\n return steps.every(this.checkStepValidity);\n }\n\n return false;\n }\n\n /**\n * Find and return the targeted DOM element based on a step's 'selector'.\n *\n * @private\n * @param {Object} step - A step object\n * @returns {Element} - A DOM element (if found)\n */\n\n }, {\n key: 'getStepTargetElement',\n value: function getStepTargetElement(step) {\n var isValidStep = this.checkStepValidity(step);\n if (!isValidStep) {\n return null;\n }\n\n var el = document.querySelector(sanitizeSelector(step.selector));\n\n if (!el) {\n logger({\n type: 'joyride:getStepTargetElement',\n msg: 'Target not rendered. For best results only add steps after they are mounted.',\n warn: true,\n debug: this.props.debug\n });\n\n return null;\n }\n\n return el;\n }\n\n /**\n * Get an element actual dimensions with margin\n *\n * @private\n * @returns {{height: number, width: number}}\n */\n\n }, {\n key: 'getElementDimensions',\n value: function getElementDimensions() {\n var _state7 = this.state,\n shouldRenderTooltip = _state7.shouldRenderTooltip,\n standaloneData = _state7.standaloneData;\n\n var displayTooltip = standaloneData ? true : shouldRenderTooltip;\n var el = document.querySelector(displayTooltip ? '.joyride-tooltip' : '.joyride-beacon');\n\n var height = 0;\n var width = 0;\n\n if (el) {\n var styles = window.getComputedStyle(el);\n height = el.clientHeight + parseInt(styles.marginTop || 0, 10) + parseInt(styles.marginBottom || 0, 10);\n width = el.clientWidth + parseInt(styles.marginLeft || 0, 10) + parseInt(styles.marginRight || 0, 10);\n }\n\n return {\n height: height,\n width: width\n };\n }\n\n /**\n * Get the scrollTop position\n *\n * @private\n * @returns {number}\n */\n\n }, {\n key: 'getScrollTop',\n value: function getScrollTop() {\n var _state8 = this.state,\n index = _state8.index,\n yPos = _state8.yPos;\n var _props4 = this.props,\n offsetParentSelector = _props4.offsetParentSelector,\n scrollOffset = _props4.scrollOffset,\n steps = _props4.steps;\n\n var step = steps[index];\n var target = this.getStepTargetElement(step);\n var offsetParent = document.querySelector(sanitizeSelector(offsetParentSelector));\n\n if (!target) {\n return 0;\n }\n\n var rect = getOffsetBoundingClientRect(target, offsetParent);\n var targetTop = rect.top + (window.pageYOffset || document.documentElement.scrollTop);\n var position = this.calcPosition(step);\n var scrollTo = 0;\n\n /* istanbul ignore else */\n if (/^top/.test(position)) {\n scrollTo = Math.floor(yPos - scrollOffset);\n } else if (/^bottom|^left|^right/.test(position)) {\n scrollTo = Math.floor(targetTop - scrollOffset);\n }\n\n return scrollTo;\n }\n\n /**\n * Trigger the callback.\n *\n * @private\n * @param {Object} options\n */\n\n }, {\n key: 'triggerCallback',\n value: function triggerCallback(options) {\n var callback = this.props.callback;\n\n /* istanbul ignore else */\n\n if (typeof callback === 'function') {\n logger({\n type: 'joyride:triggerCallback',\n msg: [options],\n debug: this.props.debug\n });\n\n callback(options);\n }\n }\n\n /**\n * Keydown event listener\n *\n * @private\n * @param {Event} e - Keyboard event\n */\n\n\n /**\n * Tooltip event listener\n *\n * @private\n * @param {Event} e - Click event\n */\n\n\n /**\n * Beacon click event listener\n *\n * @private\n * @param {Event} e - Click event\n */\n\n\n /**\n * Tooltip click event listener\n *\n * @private\n * @param {Event} e - Click event\n */\n\n }, {\n key: 'toggleTooltip',\n\n\n /**\n * Toggle Tooltip's visibility\n *\n * @private\n * @param {Object} options - Immediately destructured argument object\n * @param {Boolean} options.show - Render the tooltip or the beacon\n * @param {Number} options.index - The tour's new index\n * @param {string} [options.action] - The action being undertaken.\n * @param {Array} [options.steps] - The array of step objects that is going to be rendered\n */\n value: function toggleTooltip(_ref3) {\n var show = _ref3.show,\n _ref3$index = _ref3.index,\n index = _ref3$index === undefined ? this.state.index : _ref3$index,\n action = _ref3.action,\n _ref3$steps = _ref3.steps,\n steps = _ref3$steps === undefined ? this.props.steps : _ref3$steps;\n\n var nextStep = steps[index];\n var hasMountedTarget = Boolean(this.getStepTargetElement(nextStep));\n\n this.setState({\n action: action,\n index: index,\n // Stop playing if there is no next step or can't find the target\n isRunning: nextStep && hasMountedTarget ? this.state.isRunning : false,\n // If we are not showing now, or there is no target, we'll need to redraw eventually\n shouldRedraw: !show || !hasMountedTarget,\n shouldRenderTooltip: show && hasMountedTarget,\n xPos: -1000,\n yPos: -1000\n });\n }\n\n /**\n * Position absolute elements next to its target\n *\n * @private\n */\n\n }, {\n key: 'calcPlacement',\n value: function calcPlacement() {\n var _state9 = this.state,\n index = _state9.index,\n isRunning = _state9.isRunning,\n standaloneData = _state9.standaloneData,\n shouldRenderTooltip = _state9.shouldRenderTooltip;\n var _props5 = this.props,\n offsetParentSelector = _props5.offsetParentSelector,\n steps = _props5.steps,\n tooltipOffset = _props5.tooltipOffset;\n\n var step = standaloneData || steps[index] || {};\n var displayTooltip = standaloneData ? true : shouldRenderTooltip;\n var target = this.getStepTargetElement(step);\n var offsetParent = document.querySelector(sanitizeSelector(offsetParentSelector));\n\n logger({\n type: 'joyride:calcPlacement' + this.getRenderStage(),\n msg: ['step:', step],\n debug: this.props.debug\n });\n\n /* istanbul ignore else */\n if (!target) {\n return;\n }\n\n var placement = {\n x: -1000,\n y: -1000\n };\n\n /* istanbul ignore else */\n if (step && (standaloneData || isRunning && steps[index])) {\n var offsetX = nested.get(step, 'style.beacon.offsetX') || 0;\n var offsetY = nested.get(step, 'style.beacon.offsetY') || 0;\n var position = this.calcPosition(step);\n var scrollingElement = getRootEl().getBoundingClientRect();\n var scrollTop = step.isFixed === true ? 0 : scrollingElement.top;\n var component = this.getElementDimensions();\n var rect = getOffsetBoundingClientRect(target, offsetParent);\n\n // Calculate x position\n if (/^left/.test(position)) {\n placement.x = rect.left - (displayTooltip ? component.width + tooltipOffset : component.width / 2 + offsetX);\n } else if (/^right/.test(position)) {\n placement.x = rect.left + rect.width - (displayTooltip ? -tooltipOffset : component.width / 2 - offsetX);\n } else {\n placement.x = rect.left + (rect.width / 2 - component.width / 2);\n }\n\n // Calculate y position\n if (/^top/.test(position)) {\n placement.y = rect.top - scrollTop - (displayTooltip ? component.height + tooltipOffset : component.height / 2 + offsetY);\n } else if (/^bottom/.test(position)) {\n placement.y = rect.top - scrollTop + (rect.height - (displayTooltip ? -tooltipOffset : component.height / 2 - offsetY));\n } else {\n placement.y = rect.top - scrollTop;\n }\n\n /* istanbul ignore else */\n if (/^bottom|^top/.test(position)) {\n if (/left/.test(position)) {\n placement.x = rect.left - (displayTooltip ? tooltipOffset : component.width / 2);\n } else if (/right/.test(position)) {\n placement.x = rect.left + (rect.width - (displayTooltip ? component.width - tooltipOffset : component.width / 2));\n }\n }\n\n this.setState({\n shouldRedraw: false,\n xPos: this.preventWindowOverflow(Math.ceil(placement.x), 'x', component.width, component.height),\n yPos: this.preventWindowOverflow(Math.ceil(placement.y), 'y', component.width, component.height)\n });\n }\n }\n\n /**\n * Update position for overflowing elements.\n *\n * @private\n * @param {Object} step\n *\n * @returns {string}\n */\n\n }, {\n key: 'calcPosition',\n value: function calcPosition(step) {\n var _props6 = this.props,\n offsetParentSelector = _props6.offsetParentSelector,\n tooltipOffset = _props6.tooltipOffset;\n\n var scrollingElement = getRootEl();\n var scrollingElementRect = scrollingElement.getBoundingClientRect();\n var target = this.getStepTargetElement(step);\n var offsetParent = document.querySelector(sanitizeSelector(offsetParentSelector));\n var rect = getOffsetBoundingClientRect(target, offsetParent);\n\n var _getElementDimensions = this.getElementDimensions(),\n height = _getElementDimensions.height,\n _getElementDimensions2 = _getElementDimensions.width,\n width = _getElementDimensions2 === undefined ? DEFAULTS.minWidth : _getElementDimensions2;\n\n var position = step.position || DEFAULTS.position;\n\n if (/^left/.test(position) && rect.left - (width + tooltipOffset) < 0) {\n position = 'top';\n } else if (/^right/.test(position) && rect.left + rect.width + (width + tooltipOffset) > scrollingElementRect.width) {\n position = 'bottom';\n }\n\n if (/^top/.test(position) && (rect.top + scrollingElement.scrollTop - (height + tooltipOffset) < 0 || step.isFixed && rect.top - height < 0)) {\n position = 'bottom';\n } else if (/^bottom/.test(position) && (rect.top + scrollingElement.scrollTop + (height + tooltipOffset) > getDocHeight() || step.isFixed && rect.top + rect.height + height > scrollingElementRect.height)) {\n position = 'top';\n }\n\n return position;\n }\n\n /**\n * Get the render stage.\n *\n * @private\n * @returns {string}\n */\n\n }, {\n key: 'getRenderStage',\n value: function getRenderStage() {\n var _state10 = this.state,\n shouldRedraw = _state10.shouldRedraw,\n xPos = _state10.xPos;\n\n\n if (shouldRedraw) {\n return ':redraw';\n } else if (xPos < 0) {\n return ':pre-render';\n }\n\n return '';\n }\n\n /**\n * Prevent tooltip to render outside the window\n *\n * @private\n * @param {Number} value - The axis position\n * @param {String} axis - The Axis X or Y\n * @param {Number} elWidth - The target element width\n * @param {Number} elHeight - The target element height\n * @returns {Number}\n */\n\n }, {\n key: 'preventWindowOverflow',\n value: function preventWindowOverflow(value, axis, elWidth, elHeight) {\n var winWidth = window.innerWidth;\n var docHeight = getDocHeight();\n var newValue = value;\n\n /* istanbul ignore else */\n if (axis === 'x') {\n if (value + elWidth >= winWidth) {\n newValue = winWidth - elWidth - 15;\n } else if (value < 15) {\n newValue = 15;\n }\n } else if (axis === 'y') {\n if (value + elHeight >= docHeight) {\n newValue = docHeight - elHeight - 15;\n } else if (value < 15) {\n newValue = 15;\n }\n }\n\n return newValue;\n }\n\n /**\n * Create a React Element\n *\n * @private\n * @returns {boolean|ReactComponent}\n */\n\n }, {\n key: 'createComponent',\n value: function createComponent() {\n var _state11 = this.state,\n index = _state11.index,\n shouldRedraw = _state11.shouldRedraw,\n shouldRenderTooltip = _state11.shouldRenderTooltip,\n standaloneData = _state11.standaloneData,\n xPos = _state11.xPos,\n yPos = _state11.yPos;\n var _props7 = this.props,\n disableOverlay = _props7.disableOverlay,\n holePadding = _props7.holePadding,\n locale = _props7.locale,\n offsetParentSelector = _props7.offsetParentSelector,\n showBackButton = _props7.showBackButton,\n showOverlay = _props7.showOverlay,\n showSkipButton = _props7.showSkipButton,\n showStepsProgress = _props7.showStepsProgress,\n steps = _props7.steps,\n type = _props7.type;\n\n var currentStep = standaloneData || steps[index];\n var step = _extends({}, currentStep);\n\n var target = this.getStepTargetElement(step);\n var component = void 0;\n\n var allowClicksThruHole = step && step.allowClicksThruHole || this.props.allowClicksThruHole;\n var shouldShowOverlay = standaloneData ? false : showOverlay;\n var buttons = {\n primary: locale.close\n };\n\n logger({\n type: 'joyride:createComponent' + this.getRenderStage(),\n msg: ['component:', shouldRenderTooltip || standaloneData ? 'Tooltip' : 'Beacon', 'animate:', xPos > -1 && !shouldRedraw, 'step:', step],\n debug: this.props.debug,\n warn: !target\n });\n\n if (!target) {\n return false;\n }\n\n if (shouldRenderTooltip || standaloneData) {\n var position = this.calcPosition(step);\n\n /* istanbul ignore else */\n if (!standaloneData) {\n /* istanbul ignore else */\n if (['continuous', 'guided'].indexOf(type) !== -1) {\n buttons.primary = locale.last;\n\n /* istanbul ignore else */\n if (steps[index + 1]) {\n if (showStepsProgress) {\n var next = locale.next;\n\n\n if (typeof locale.next === 'string') {\n next = React.createElement(\n 'span',\n null,\n locale.next\n );\n }\n\n buttons.primary = React.createElement(\n 'span',\n null,\n next,\n ' ',\n React.createElement(\n 'span',\n null,\n index + 1 + '/' + steps.length\n )\n );\n } else {\n buttons.primary = locale.next;\n }\n }\n\n if (showBackButton && index > 0) {\n buttons.secondary = locale.back;\n }\n }\n\n if (showSkipButton) {\n buttons.skip = locale.skip;\n }\n }\n\n component = React.createElement(Tooltip, {\n allowClicksThruHole: allowClicksThruHole,\n animate: xPos > -1 && !shouldRedraw,\n buttons: buttons,\n disableOverlay: disableOverlay,\n holePadding: holePadding,\n offsetParentSelector: offsetParentSelector,\n position: position,\n selector: sanitizeSelector(step.selector),\n showOverlay: shouldShowOverlay,\n step: step,\n standalone: Boolean(standaloneData),\n target: target,\n type: type,\n xPos: xPos,\n yPos: yPos,\n onClick: this.handleClickTooltip,\n onRender: this.handleRenderTooltip\n });\n } else {\n component = React.createElement(Beacon, {\n step: step,\n xPos: xPos,\n yPos: yPos,\n onTrigger: this.handleClickBeacon,\n eventType: step.type || 'click'\n });\n }\n\n return component;\n }\n }, {\n key: 'render',\n value: function render() {\n var _state12 = this.state,\n index = _state12.index,\n isRunning = _state12.isRunning,\n standaloneData = _state12.standaloneData;\n var steps = this.props.steps;\n\n var hasStep = Boolean(steps[index]);\n var component = void 0;\n var standaloneComponent = void 0;\n\n if (isRunning && hasStep) {\n logger({\n type: 'joyride:render' + this.getRenderStage(),\n msg: ['step:', steps[index]],\n debug: this.props.debug\n });\n } else if (!isRunning && standaloneData) {\n logger({\n type: 'joyride:render',\n msg: ['tooltip:', standaloneData],\n debug: this.props.debug\n });\n }\n\n if (standaloneData) {\n standaloneComponent = this.createComponent();\n } else if (isRunning && hasStep) {\n component = this.createComponent();\n }\n\n return React.createElement(\n 'div',\n { className: 'joyride' },\n component,\n standaloneComponent\n );\n }\n }]);\n\n return Joyride;\n}(React.Component);\n\nJoyride.propTypes = {\n allowClicksThruHole: PropTypes.bool,\n autoStart: PropTypes.bool,\n callback: PropTypes.func,\n debug: PropTypes.bool,\n disableOverlay: PropTypes.bool,\n holePadding: PropTypes.number,\n keyboardNavigation: PropTypes.bool,\n locale: PropTypes.object,\n offsetParentSelector: PropTypes.string,\n resizeDebounce: PropTypes.bool,\n resizeDebounceDelay: PropTypes.number,\n run: PropTypes.bool,\n scrollOffset: PropTypes.number,\n scrollToFirstStep: PropTypes.bool,\n scrollToSteps: PropTypes.bool,\n showBackButton: PropTypes.bool,\n showOverlay: PropTypes.bool,\n showSkipButton: PropTypes.bool,\n showStepsProgress: PropTypes.bool,\n stepIndex: PropTypes.number,\n steps: PropTypes.array,\n tooltipOffset: PropTypes.number,\n type: PropTypes.string\n};\nJoyride.defaultProps = {\n allowClicksThruHole: false,\n autoStart: false,\n debug: false,\n disableOverlay: false,\n holePadding: 5,\n keyboardNavigation: true,\n locale: {\n back: 'Back',\n close: 'Close',\n last: 'Last',\n next: 'Next',\n skip: 'Skip'\n },\n offsetParentSelector: 'body',\n resizeDebounce: false,\n resizeDebounceDelay: 200,\n run: false,\n scrollOffset: 20,\n scrollToFirstStep: false,\n scrollToSteps: true,\n showBackButton: true,\n showOverlay: true,\n showSkipButton: false,\n showStepsProgress: false,\n stepIndex: 0,\n steps: [],\n tooltipOffset: 15,\n type: 'single'\n};\n\n\nexport default Joyride;"],"sourceRoot":""}