{"version":3,"sources":["webpack://my-gatsby-site/./node_modules/lodash.throttle/index.js","webpack://my-gatsby-site/./node_modules/react-animate-on-scroll/dist/scrollAnimation.min.js"],"names":["FUNC_ERROR_TEXT","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","g","Object","freeSelf","self","root","Function","objectToString","prototype","toString","nativeMax","Math","max","nativeMin","min","now","Date","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","this","toNumber","isObject","cancel","clearTimeout","flush","value","type","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","slice","module","exports","defineProperty","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","Constructor","protoProps","staticProps","_interopRequireDefault","obj","__esModule","_react","_react2","_lodashThrottle2","_propTypes2","ScrollAnimation","_Component","instance","_classCallCheck","_x","_x2","_x3","_again","object","property","receiver","desc","getOwnPropertyDescriptor","getter","get","parent","getPrototypeOf","_get","serverSide","window","listener","handleScroll","bind","visibility","onScreen","inViewport","state","classes","style","animationDuration","duration","opacity","initiallyVisible","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_inherits","elm","yPos","offsetTop","clientTop","offsetParent","scrollableParent","pageYOffset","scrollTop","innerHeight","clientHeight","getScrollPos","offset","getScrollableParentHeight","y","getViewportTop","getViewportBottom","elementTop","elementBottom","isInViewport","isAboveViewport","isBelowViewport","isAboveScreen","isBelowScreen","getElementTop","node","parentSelector","scrollableParentSelector","document","querySelector","addEventListener","console","warn","animatePreScroll","delayedAnimationTimeout","callbackTimeout","removeEventListener","previousVis","currentVis","animation","callback","_this","animating","setState","delay","_this2","animate","animateIn","animateOnce","vis","getVisibility","_this3","animateOut","afterAnimatedIn","visibilityHasChanged","afterAnimatedOut","_this4","className","createElement","ref","assign","children","Component","defaultProps","propTypes","string","number","bool"],"mappings":"yGAUA,IAAIA,EAAkB,sBASlBC,EAAS,aAGTC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,SAGfC,EAA8B,iBAAV,EAAAC,GAAsB,EAAAA,GAAU,EAAAA,EAAOC,SAAWA,QAAU,EAAAD,EAGhFE,EAA0B,iBAARC,MAAoBA,MAAQA,KAAKF,SAAWA,QAAUE,KAGxEC,EAAOL,GAAcG,GAAYG,SAAS,cAATA,GAUjCC,EAPcL,OAAOM,UAOQC,SAG7BC,EAAYC,KAAKC,IACjBC,EAAYF,KAAKG,IAkBjBC,EAAM,WACR,OAAOV,EAAKW,KAAKD,OA0DnB,SAASE,EAASC,EAAMC,EAAMC,GAC5B,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,GAAU,EACVC,GAAS,EACTC,GAAW,EAEf,GAAmB,mBAARZ,EACT,MAAM,IAAIa,UAAUtC,GAYtB,SAASuC,EAAWC,GAClB,IAAIC,EAAOb,EACPc,EAAUb,EAId,OAHAD,EAAWC,OAAWc,EACtBT,EAAiBM,EACjBT,EAASN,EAAKmB,MAAMF,EAASD,GAI/B,SAASI,EAAYL,GAMnB,OAJAN,EAAiBM,EAEjBR,EAAUc,WAAWC,EAAcrB,GAE5BS,EAAUI,EAAWC,GAAQT,EAUtC,SAASiB,EAAaR,GACpB,IAAIS,EAAoBT,EAAOP,EAK/B,YAAwBU,IAAjBV,GAA8BgB,GAAqBvB,GAAQuB,EAAoB,GAAKb,GAJjEI,EAAON,GAI2FJ,EAG9H,SAASiB,IACP,IAAIP,EAAOlB,IAEX,GAAI0B,EAAaR,GACf,OAAOU,EAAaV,GAItBR,EAAUc,WAAWC,EAxBvB,SAAuBP,GACrB,IAEIT,EAASL,GAFWc,EAAOP,GAG/B,OAAOG,EAAShB,EAAUW,EAAQD,GAFRU,EAAON,IAEkCH,EAoBhCoB,CAAcX,IAGnD,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MgH,kBAV3BvI,KAAK2H,SAAS,CACZvD,QAAS,WACTC,MAAO,CACLC,kBAAmBtE,KAAKuB,MAAMgD,SAAW,IACzCC,QAASxE,KAAKuB,MAAMkD,iBAAmB,EAAI,KASjDzE,KAAKgE,WAAasD,MAIvB,CACDxF,IAAK,SACLxB,MAAO,WACL,IAAIkI,EAASxI,KAEToE,EAAUpE,KAAKuB,MAAMkH,UAAYzI,KAAKuB,MAAMkH,UAAY,IAAMzI,KAAKmE,MAAMC,QAAUpE,KAAKmE,MAAMC,QAClG,OAAO9B,EAAiB,QAAEoG,cAAc,MAAO,CAC7CC,IAAK,SAAalC,GAChB+B,EAAO/B,KAAOA,GAEhBgC,UAAWrE,EACXC,MAAOnH,OAAO0L,OAAO,GAAI5I,KAAKmE,MAAME,MAAOrE,KAAKuB,MAAM8C,QACrDrE,KAAKuB,MAAMsH,cAIXpG,EA7Pa,CA8PpBJ,EAAOyG,WAET5H,EAAA,QAAqBuB,EACrBA,EAAgBsG,aAAe,CAC7BnD,OAAQ,IACRrB,SAAU,EACVE,kBAAkB,EAClBmD,MAAO,EACPI,aAAa,EACbf,kBAAkB,GAEpBxE,EAAgBuG,UAAY,CAC1BjB,UAAWvF,EAAqB,QAAEyG,OAClCb,WAAY5F,EAAqB,QAAEyG,OACnCrD,OAAQpD,EAAqB,QAAE0G,OAC/B3E,SAAU/B,EAAqB,QAAE0G,OACjCtB,MAAOpF,EAAqB,QAAE0G,OAC9BzE,iBAAkBjC,EAAqB,QAAE2G,KACzCnB,YAAaxF,EAAqB,QAAE2G,KACpC9E,MAAO7B,EAAqB,QAAES,OAC9B0D,yBAA0BnE,EAAqB,QAAEyG,OACjDR,UAAWjG,EAAqB,QAAEyG,OAClChC,iBAAkBzE,EAAqB,QAAE2G,MAE3ClI,EAAOC,QAAUA,EAAiB","file":"0683896693240ec8254fa4cfb57f6750101d4587-061b66f3bc6e649c433d.js","sourcesContent":["/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n/** Used as references for various `Number` constants. */\n\nvar NAN = 0 / 0;\n/** `Object#toString` result references. */\n\nvar symbolTag = '[object Symbol]';\n/** Used to match leading and trailing whitespace. */\n\nvar reTrim = /^\\s+|\\s+$/g;\n/** Used to detect bad signed hexadecimal string values. */\n\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n/** Used to detect binary string values. */\n\nvar reIsBinary = /^0b[01]+$/i;\n/** Used to detect octal string values. */\n\nvar reIsOctal = /^0o[0-7]+$/i;\n/** Built-in method references without a dependency on `root`. */\n\nvar freeParseInt = parseInt;\n/** Detect free variable `global` from Node.js. */\n\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n/** Detect free variable `self`. */\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n\nvar now = function now() {\n return root.Date.now();\n};\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n\n\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n wait = toNumber(wait) || 0;\n\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time; // Start the timer for the trailing edge.\n\n timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.\n\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n\n function timerExpired() {\n var time = now();\n\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n } // Restart the timer.\n\n\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n\n\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n\n\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\n\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n\n\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n\n if (isSymbol(value)) {\n return NAN;\n }\n\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\n\nmodule.exports = throttle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _get = function get(_x, _x2, _x3) {\n var _again = true;\n\n _function: while (_again) {\n var object = _x,\n property = _x2,\n receiver = _x3;\n _again = false;\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n _x = parent;\n _x2 = property;\n _x3 = receiver;\n _again = true;\n desc = parent = undefined;\n continue _function;\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n }\n};\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _lodashThrottle = require(\"lodash.throttle\");\n\nvar _lodashThrottle2 = _interopRequireDefault(_lodashThrottle);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar ScrollAnimation = function (_Component) {\n _inherits(ScrollAnimation, _Component);\n\n function ScrollAnimation(props) {\n _classCallCheck(this, ScrollAnimation);\n\n _get(Object.getPrototypeOf(ScrollAnimation.prototype), \"constructor\", this).call(this, props);\n\n this.serverSide = typeof window === \"undefined\";\n this.listener = (0, _lodashThrottle2[\"default\"])(this.handleScroll.bind(this), 50);\n this.visibility = {\n onScreen: false,\n inViewport: false\n };\n this.state = {\n classes: \"animated\",\n style: {\n animationDuration: this.props.duration + \"s\",\n opacity: this.props.initiallyVisible ? 1 : 0\n }\n };\n }\n\n _createClass(ScrollAnimation, [{\n key: \"getElementTop\",\n value: function getElementTop(elm) {\n var yPos = 0;\n\n while (elm && elm.offsetTop !== undefined && elm.clientTop !== undefined) {\n yPos += elm.offsetTop + elm.clientTop;\n elm = elm.offsetParent;\n }\n\n return yPos;\n }\n }, {\n key: \"getScrollPos\",\n value: function getScrollPos() {\n if (this.scrollableParent.pageYOffset !== undefined) {\n return this.scrollableParent.pageYOffset;\n }\n\n return this.scrollableParent.scrollTop;\n }\n }, {\n key: \"getScrollableParentHeight\",\n value: function getScrollableParentHeight() {\n if (this.scrollableParent.innerHeight !== undefined) {\n return this.scrollableParent.innerHeight;\n }\n\n return this.scrollableParent.clientHeight;\n }\n }, {\n key: \"getViewportTop\",\n value: function getViewportTop() {\n return this.getScrollPos() + this.props.offset;\n }\n }, {\n key: \"getViewportBottom\",\n value: function getViewportBottom() {\n return this.getScrollPos() + this.getScrollableParentHeight() - this.props.offset;\n }\n }, {\n key: \"isInViewport\",\n value: function isInViewport(y) {\n return y >= this.getViewportTop() && y <= this.getViewportBottom();\n }\n }, {\n key: \"isAboveViewport\",\n value: function isAboveViewport(y) {\n return y < this.getViewportTop();\n }\n }, {\n key: \"isBelowViewport\",\n value: function isBelowViewport(y) {\n return y > this.getViewportBottom();\n }\n }, {\n key: \"inViewport\",\n value: function inViewport(elementTop, elementBottom) {\n return this.isInViewport(elementTop) || this.isInViewport(elementBottom) || this.isAboveViewport(elementTop) && this.isBelowViewport(elementBottom);\n }\n }, {\n key: \"onScreen\",\n value: function onScreen(elementTop, elementBottom) {\n return !this.isAboveScreen(elementBottom) && !this.isBelowScreen(elementTop);\n }\n }, {\n key: \"isAboveScreen\",\n value: function isAboveScreen(y) {\n return y < this.getScrollPos();\n }\n }, {\n key: \"isBelowScreen\",\n value: function isBelowScreen(y) {\n return y > this.getScrollPos() + this.getScrollableParentHeight();\n }\n }, {\n key: \"getVisibility\",\n value: function getVisibility() {\n var elementTop = this.getElementTop(this.node) - this.getElementTop(this.scrollableParent);\n var elementBottom = elementTop + this.node.clientHeight;\n return {\n inViewport: this.inViewport(elementTop, elementBottom),\n onScreen: this.onScreen(elementTop, elementBottom)\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!this.serverSide) {\n var parentSelector = this.props.scrollableParentSelector;\n this.scrollableParent = parentSelector ? document.querySelector(parentSelector) : window;\n\n if (this.scrollableParent && this.scrollableParent.addEventListener) {\n this.scrollableParent.addEventListener(\"scroll\", this.listener);\n } else {\n console.warn(\"Cannot find element by locator: \" + this.props.scrollableParentSelector);\n }\n\n if (this.props.animatePreScroll) {\n this.handleScroll();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.delayedAnimationTimeout);\n clearTimeout(this.callbackTimeout);\n\n if (window && window.removeEventListener) {\n window.removeEventListener(\"scroll\", this.listener);\n }\n }\n }, {\n key: \"visibilityHasChanged\",\n value: function visibilityHasChanged(previousVis, currentVis) {\n return previousVis.inViewport !== currentVis.inViewport || previousVis.onScreen !== currentVis.onScreen;\n }\n }, {\n key: \"animate\",\n value: function animate(animation, callback) {\n var _this = this;\n\n this.delayedAnimationTimeout = setTimeout(function () {\n _this.animating = true;\n\n _this.setState({\n classes: \"animated \" + animation,\n style: {\n animationDuration: _this.props.duration + \"s\"\n }\n });\n\n _this.callbackTimeout = setTimeout(callback, _this.props.duration * 1000);\n }, this.props.delay);\n }\n }, {\n key: \"animateIn\",\n value: function animateIn(callback) {\n var _this2 = this;\n\n this.animate(this.props.animateIn, function () {\n if (!_this2.props.animateOnce) {\n _this2.setState({\n style: {\n animationDuration: _this2.props.duration + \"s\",\n opacity: 1\n }\n });\n\n _this2.animating = false;\n }\n\n var vis = _this2.getVisibility();\n\n if (callback) {\n callback(vis);\n }\n });\n }\n }, {\n key: \"animateOut\",\n value: function animateOut(callback) {\n var _this3 = this;\n\n this.animate(this.props.animateOut, function () {\n _this3.setState({\n classes: \"animated\",\n style: {\n animationDuration: _this3.props.duration + \"s\",\n opacity: 0\n }\n });\n\n var vis = _this3.getVisibility();\n\n if (vis.inViewport && _this3.props.animateIn) {\n _this3.animateIn(_this3.props.afterAnimatedIn);\n } else {\n _this3.animating = false;\n }\n\n if (callback) {\n callback(vis);\n }\n });\n }\n }, {\n key: \"handleScroll\",\n value: function handleScroll() {\n if (!this.animating) {\n var currentVis = this.getVisibility();\n\n if (this.visibilityHasChanged(this.visibility, currentVis)) {\n clearTimeout(this.delayedAnimationTimeout);\n\n if (!currentVis.onScreen) {\n this.setState({\n classes: \"animated\",\n style: {\n animationDuration: this.props.duration + \"s\",\n opacity: this.props.initiallyVisible ? 1 : 0\n }\n });\n } else if (currentVis.inViewport && this.props.animateIn) {\n this.animateIn(this.props.afterAnimatedIn);\n } else if (currentVis.onScreen && this.visibility.inViewport && this.props.animateOut && this.state.style.opacity === 1) {\n this.animateOut(this.props.afterAnimatedOut);\n }\n\n this.visibility = currentVis;\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n var classes = this.props.className ? this.props.className + \" \" + this.state.classes : this.state.classes;\n return _react2[\"default\"].createElement(\"div\", {\n ref: function ref(node) {\n _this4.node = node;\n },\n className: classes,\n style: Object.assign({}, this.state.style, this.props.style)\n }, this.props.children);\n }\n }]);\n\n return ScrollAnimation;\n}(_react.Component);\n\nexports[\"default\"] = ScrollAnimation;\nScrollAnimation.defaultProps = {\n offset: 150,\n duration: 1,\n initiallyVisible: false,\n delay: 0,\n animateOnce: false,\n animatePreScroll: true\n};\nScrollAnimation.propTypes = {\n animateIn: _propTypes2[\"default\"].string,\n animateOut: _propTypes2[\"default\"].string,\n offset: _propTypes2[\"default\"].number,\n duration: _propTypes2[\"default\"].number,\n delay: _propTypes2[\"default\"].number,\n initiallyVisible: _propTypes2[\"default\"].bool,\n animateOnce: _propTypes2[\"default\"].bool,\n style: _propTypes2[\"default\"].object,\n scrollableParentSelector: _propTypes2[\"default\"].string,\n className: _propTypes2[\"default\"].string,\n animatePreScroll: _propTypes2[\"default\"].bool\n};\nmodule.exports = exports[\"default\"];"],"sourceRoot":""}