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OC,QAAUjM,EACVmF,IACPtE,EAAOb,WAAaA,EAG3B,EA3hBA,CA2hBEa,OAAQgD,S","sources":["webpack://tombras/./js/components/ScrollText.js","webpack://tombras/./node_modules/stickyfilljs/dist/stickyfill.js"],"sourcesContent":["import AnimationHandler, {\n\tcomponentAnimationHandler,\n} from \"../animations/AnimationHandler\";\nimport { debounce, TABLET_SIZE, DESKTOP_SIZE } from \"../utils\";\nimport { ani, DEFAULT_EASE, DEFAULT_TIME_SHORT } from \"../animations/config\";\nimport gsap from \"gsap\";\nimport Stickyfill from \"stickyfilljs\";\nimport { windowScrollEvents, windowResizeEvents } from \"../events\";\nclass ScrollText {\n\tconstructor(el) {\n\t\tthis.el = el;\n\t\tthis.viewing = -1;\n\t\tthis.isScrolling = false;\n\n\t\tthis.setupEvents(el);\n\t\tthis.setupSticky(el.querySelector(\".sticky\"));\n\t\tcomponentAnimationHandler.add(el);\n\t\tthis.mediaChangeTL = null;\n\t}\n\n\tsetupSticky(el) {\n\t\tStickyfill.add(el);\n\t}\n\n\tgetPositionData(els) {\n\t\treturn [...els].map((el) => {\n\t\t\tconst { top } = el.getBoundingClientRect();\n\t\t\tconst pos = el.getAttribute(\"data-sticky-link\");\n\t\t\treturn { top, el, pos };\n\t\t});\n\t}\n\tscrollyScrollScroller(e) {\n\t\tconst sections = this.el.querySelectorAll(\".linked-section\");\n\t\tconst offset = window.getComputedStyle(sections[0]).marginTop;\n\t\tconst newActiveEl = this.getPositionData(sections)\n\t\t\t.filter(({ top, pos }) => {\n\t\t\t\treturn pos != this.viewing && top - parseInt(offset) < 100 && top > 0;\n\t\t\t})\n\t\t\t.reduce((acc, curr) => {\n\t\t\t\tif (acc < 0) return curr;\n\t\t\t}, -1);\n\n\t\t// console.log(newActiveEl);\n\t\tif (newActiveEl.pos >= 0) {\n\t\t\tthis.fireViewingEvent(newActiveEl);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tfireViewingEvent(newActiveEl) {\n\t\tthis.viewing = newActiveEl.pos;\n\t\tif (window.innerWidth >= DESKTOP_SIZE) {\n\t\t\tthis.el.dispatchEvent(\n\t\t\t\tnew CustomEvent(\"showmedia\", {\n\t\t\t\t\tdetail: {\n\t\t\t\t\t\tpos: parseInt(newActiveEl.pos, 10),\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\tanimateMedia(evt) {\n\t\tconst { el } = this;\n\t\tconst tl = gsap.timeline({ paused: true });\n\t\tconst curr = el.querySelectorAll(\".section-media.active\");\n\t\tconst next = el.querySelector(\n\t\t\t`.section-media[data-sticky-link=\"${evt.detail.pos}\"]`,\n\t\t);\n\t\ttl.to(curr, DEFAULT_TIME_SHORT, ani({ opacity: 0 }, DEFAULT_EASE));\n\t\ttl.set(next, { opacity: 0 });\n\t\ttl.call((_) => {\n\t\t\t[...curr].forEach((el) => {\n\t\t\t\tel.classList.remove(\"active\");\n\t\t\t\tconst vid = el.querySelector(\"stream\");\n\t\t\t\tif (vid) {\n\t\t\t\t\tvid.pause();\n\t\t\t\t}\n\t\t\t});\n\t\t\tnext.classList.add(\"active\");\n\n\t\t\tconst nextVideo = next.querySelector(\"stream\");\n\t\t\tif (nextVideo) {\n\t\t\t\tnextVideo.play().catch((err) => {\n\t\t\t\t\tconsole.log(\"[STREAM]\", err);\n\t\t\t\t\tnextVideo.play();\n\t\t\t\t});\n\t\t\t\t// if (nextVideo.paused) setTimeout(() => nextVide.play(), 100);\n\t\t\t}\n\t\t});\n\t\ttl.to(next, DEFAULT_TIME_SHORT, ani({ opacity: 1 }, DEFAULT_EASE));\n\t\tif (this.mediaChangeTL) {\n\t\t\tthis.mediaChangeTL.pause();\n\t\t}\n\t\tthis.mediaChangeTL = tl;\n\t\tthis.mediaChangeTL.play();\n\t}\n\n\tsetupEvents(el) {\n\t\tel.addEventListener(\"showmedia\", this.animateMedia.bind(this));\n\t\tel.addEventListener(\"inview\", this.animate.bind(this));\n\t\twindowScrollEvents.push(this.scrollyScrollScroller.bind(this));\n\t\twindowResizeEvents.push(this.recalculate.bind(this));\n\t}\n\n\trecalculate() {\n\t\tconst windowWidth = window.innerWidth;\n\n\t\tif (windowWidth < DESKTOP_SIZE) {\n\t\t\tthis.animateMedia({ detail: { pos: 0 } });\n\t\t} else {\n\t\t\tthis.animateMedia({ detail: { pos: this.viewing } });\n\t\t}\n\t}\n\n\tanimate() {\n\t\tthis.el.classList.add(\"animated\");\n\t\tif (this.viewing < 0) {\n\t\t\tthis.el.querySelector(\"stream\").addEventListener(\"canplay\", (e) => {\n\t\t\t\tconst sections = this.el.querySelectorAll(\".linked-section\");\n\t\t\t\tthis.fireViewingEvent(this.getPositionData(sections)[0]);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport default ScrollText;\nexport const instantiatedScrollText = [\n\t...document.querySelectorAll(\".scroll-text\"),\n].map((el) => new ScrollText(el));\n","/*!\r\n * Stickyfill – `position: sticky` polyfill\r\n * v. 2.1.0 | https://github.com/wilddeer/stickyfill\r\n * MIT License\r\n */\r\n\r\n;(function(window, document) {\r\n 'use strict';\r\n \r\n /*\r\n * 1. Check if the browser supports `position: sticky` natively or is too old to run the polyfill.\r\n * If either of these is the case set `seppuku` flag. It will be checked later to disable key features\r\n * of the polyfill, but the API will remain functional to avoid breaking things.\r\n */\r\n \r\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; }; }();\r\n \r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n \r\n var seppuku = false;\r\n \r\n var isWindowDefined = typeof window !== 'undefined';\r\n \r\n // The polyfill can’t function properly without `window` or `window.getComputedStyle`.\r\n if (!isWindowDefined || !window.getComputedStyle) seppuku = true;\r\n // Dont’t get in a way if the browser supports `position: sticky` natively.\r\n else {\r\n (function () {\r\n var testNode = document.createElement('div');\r\n \r\n if (['', '-webkit-', '-moz-', '-ms-'].some(function (prefix) {\r\n try {\r\n testNode.style.position = prefix + 'sticky';\r\n } catch (e) {}\r\n \r\n return testNode.style.position != '';\r\n })) seppuku = true;\r\n })();\r\n }\r\n \r\n /*\r\n * 2. “Global” vars used across the polyfill\r\n */\r\n var isInitialized = false;\r\n \r\n // Check if Shadow Root constructor exists to make further checks simpler\r\n var shadowRootExists = typeof ShadowRoot !== 'undefined';\r\n \r\n // Last saved scroll position\r\n var scroll = {\r\n top: null,\r\n left: null\r\n };\r\n \r\n // Array of created Sticky instances\r\n var stickies = [];\r\n \r\n /*\r\n * 3. Utility functions\r\n */\r\n function extend(targetObj, sourceObject) {\r\n for (var key in sourceObject) {\r\n if (sourceObject.hasOwnProperty(key)) {\r\n targetObj[key] = sourceObject[key];\r\n }\r\n }\r\n }\r\n \r\n function parseNumeric(val) {\r\n return parseFloat(val) || 0;\r\n }\r\n \r\n function getDocOffsetTop(node) {\r\n var docOffsetTop = 0;\r\n \r\n while (node) {\r\n docOffsetTop += node.offsetTop;\r\n node = node.offsetParent;\r\n }\r\n \r\n return docOffsetTop;\r\n }\r\n \r\n /*\r\n * 4. Sticky class\r\n */\r\n \r\n var Sticky = function () {\r\n function Sticky(node) {\r\n _classCallCheck(this, Sticky);\r\n \r\n if (!(node instanceof HTMLElement)) throw new Error('First argument must be HTMLElement');\r\n if (stickies.some(function (sticky) {\r\n return sticky._node === node;\r\n })) throw new Error('Stickyfill is already applied to this node');\r\n \r\n this._node = node;\r\n this._stickyMode = null;\r\n this._active = false;\r\n \r\n stickies.push(this);\r\n \r\n this.refresh();\r\n }\r\n \r\n _createClass(Sticky, [{\r\n key: 'refresh',\r\n value: function refresh() {\r\n if (seppuku || this._removed) return;\r\n if (this._active) this._deactivate();\r\n \r\n var node = this._node;\r\n \r\n /*\r\n * 1. Save node computed props\r\n */\r\n var nodeComputedStyle = getComputedStyle(node);\r\n var nodeComputedProps = {\r\n position: nodeComputedStyle.position,\r\n top: nodeComputedStyle.top,\r\n display: nodeComputedStyle.display,\r\n marginTop: nodeComputedStyle.marginTop,\r\n marginBottom: nodeComputedStyle.marginBottom,\r\n marginLeft: nodeComputedStyle.marginLeft,\r\n marginRight: nodeComputedStyle.marginRight,\r\n cssFloat: nodeComputedStyle.cssFloat\r\n };\r\n \r\n /*\r\n * 2. Check if the node can be activated\r\n */\r\n if (isNaN(parseFloat(nodeComputedProps.top)) || nodeComputedProps.display == 'table-cell' || nodeComputedProps.display == 'none') return;\r\n \r\n this._active = true;\r\n \r\n /*\r\n * 3. Check if the current node position is `sticky`. If it is, it means that the browser supports sticky positioning,\r\n * but the polyfill was force-enabled. We set the node’s position to `static` before continuing, so that the node\r\n * is in it’s initial position when we gather its params.\r\n */\r\n var originalPosition = node.style.position;\r\n if (nodeComputedStyle.position == 'sticky' || nodeComputedStyle.position == '-webkit-sticky') node.style.position = 'static';\r\n \r\n /*\r\n * 4. Get necessary node parameters\r\n */\r\n var referenceNode = node.parentNode;\r\n var parentNode = shadowRootExists && referenceNode instanceof ShadowRoot ? referenceNode.host : referenceNode;\r\n var nodeWinOffset = node.getBoundingClientRect();\r\n var parentWinOffset = parentNode.getBoundingClientRect();\r\n var parentComputedStyle = getComputedStyle(parentNode);\r\n \r\n this._parent = {\r\n node: parentNode,\r\n styles: {\r\n position: parentNode.style.position\r\n },\r\n offsetHeight: parentNode.offsetHeight\r\n };\r\n this._offsetToWindow = {\r\n left: nodeWinOffset.left,\r\n right: document.documentElement.clientWidth - nodeWinOffset.right\r\n };\r\n this._offsetToParent = {\r\n top: nodeWinOffset.top - parentWinOffset.top - parseNumeric(parentComputedStyle.borderTopWidth),\r\n left: nodeWinOffset.left - parentWinOffset.left - parseNumeric(parentComputedStyle.borderLeftWidth),\r\n right: -nodeWinOffset.right + parentWinOffset.right - parseNumeric(parentComputedStyle.borderRightWidth)\r\n };\r\n this._styles = {\r\n position: originalPosition,\r\n top: node.style.top,\r\n bottom: node.style.bottom,\r\n left: node.style.left,\r\n right: node.style.right,\r\n width: node.style.width,\r\n marginTop: node.style.marginTop,\r\n marginLeft: node.style.marginLeft,\r\n marginRight: node.style.marginRight\r\n };\r\n \r\n var nodeTopValue = parseNumeric(nodeComputedProps.top);\r\n this._limits = {\r\n start: nodeWinOffset.top + window.pageYOffset - nodeTopValue,\r\n end: parentWinOffset.top + window.pageYOffset + parentNode.offsetHeight - parseNumeric(parentComputedStyle.borderBottomWidth) - node.offsetHeight - nodeTopValue - parseNumeric(nodeComputedProps.marginBottom)\r\n };\r\n \r\n /*\r\n * 5. Ensure that the node will be positioned relatively to the parent node\r\n */\r\n var parentPosition = parentComputedStyle.position;\r\n \r\n if (parentPosition != 'absolute' && parentPosition != 'relative') {\r\n parentNode.style.position = 'relative';\r\n }\r\n \r\n /*\r\n * 6. Recalc node position.\r\n * It’s important to do this before clone injection to avoid scrolling bug in Chrome.\r\n */\r\n this._recalcPosition();\r\n \r\n /*\r\n * 7. Create a clone\r\n */\r\n var clone = this._clone = {};\r\n clone.node = document.createElement('div');\r\n \r\n // Apply styles to the clone\r\n extend(clone.node.style, {\r\n width: nodeWinOffset.right - nodeWinOffset.left + 'px',\r\n height: nodeWinOffset.bottom - nodeWinOffset.top + 'px',\r\n marginTop: nodeComputedProps.marginTop,\r\n marginBottom: nodeComputedProps.marginBottom,\r\n marginLeft: nodeComputedProps.marginLeft,\r\n marginRight: nodeComputedProps.marginRight,\r\n cssFloat: nodeComputedProps.cssFloat,\r\n padding: 0,\r\n border: 0,\r\n borderSpacing: 0,\r\n fontSize: '1em',\r\n position: 'static'\r\n });\r\n \r\n referenceNode.insertBefore(clone.node, node);\r\n clone.docOffsetTop = getDocOffsetTop(clone.node);\r\n }\r\n }, {\r\n key: '_recalcPosition',\r\n value: function _recalcPosition() {\r\n if (!this._active || this._removed) return;\r\n \r\n var stickyMode = scroll.top <= this._limits.start ? 'start' : scroll.top >= this._limits.end ? 'end' : 'middle';\r\n \r\n if (this._stickyMode == stickyMode) return;\r\n \r\n switch (stickyMode) {\r\n case 'start':\r\n extend(this._node.style, {\r\n position: 'absolute',\r\n left: this._offsetToParent.left + 'px',\r\n right: this._offsetToParent.right + 'px',\r\n top: this._offsetToParent.top + 'px',\r\n bottom: 'auto',\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0,\r\n marginTop: 0\r\n });\r\n break;\r\n \r\n case 'middle':\r\n extend(this._node.style, {\r\n position: 'fixed',\r\n left: this._offsetToWindow.left + 'px',\r\n right: this._offsetToWindow.right + 'px',\r\n top: this._styles.top,\r\n bottom: 'auto',\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0,\r\n marginTop: 0\r\n });\r\n break;\r\n \r\n case 'end':\r\n extend(this._node.style, {\r\n position: 'absolute',\r\n left: this._offsetToParent.left + 'px',\r\n right: this._offsetToParent.right + 'px',\r\n top: 'auto',\r\n bottom: 0,\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0\r\n });\r\n break;\r\n }\r\n \r\n this._stickyMode = stickyMode;\r\n }\r\n }, {\r\n key: '_fastCheck',\r\n value: function _fastCheck() {\r\n if (!this._active || this._removed) return;\r\n \r\n if (Math.abs(getDocOffsetTop(this._clone.node) - this._clone.docOffsetTop) > 1 || Math.abs(this._parent.node.offsetHeight - this._parent.offsetHeight) > 1) this.refresh();\r\n }\r\n }, {\r\n key: '_deactivate',\r\n value: function _deactivate() {\r\n var _this = this;\r\n \r\n if (!this._active || this._removed) return;\r\n \r\n this._clone.node.parentNode.removeChild(this._clone.node);\r\n delete this._clone;\r\n \r\n extend(this._node.style, this._styles);\r\n delete this._styles;\r\n \r\n // Check whether element’s parent node is used by other stickies.\r\n // If not, restore parent node’s styles.\r\n if (!stickies.some(function (sticky) {\r\n return sticky !== _this && sticky._parent && sticky._parent.node === _this._parent.node;\r\n })) {\r\n extend(this._parent.node.style, this._parent.styles);\r\n }\r\n delete this._parent;\r\n \r\n this._stickyMode = null;\r\n this._active = false;\r\n \r\n delete this._offsetToWindow;\r\n delete this._offsetToParent;\r\n delete this._limits;\r\n }\r\n }, {\r\n key: 'remove',\r\n value: function remove() {\r\n var _this2 = this;\r\n \r\n this._deactivate();\r\n \r\n stickies.some(function (sticky, index) {\r\n if (sticky._node === _this2._node) {\r\n stickies.splice(index, 1);\r\n return true;\r\n }\r\n });\r\n \r\n this._removed = true;\r\n }\r\n }]);\r\n \r\n return Sticky;\r\n }();\r\n \r\n /*\r\n * 5. Stickyfill API\r\n */\r\n \r\n \r\n var Stickyfill = {\r\n stickies: stickies,\r\n Sticky: Sticky,\r\n \r\n forceSticky: function forceSticky() {\r\n seppuku = false;\r\n init();\r\n \r\n this.refreshAll();\r\n },\r\n addOne: function addOne(node) {\r\n // Check whether it’s a node\r\n if (!(node instanceof HTMLElement)) {\r\n // Maybe it’s a node list of some sort?\r\n // Take first node from the list then\r\n if (node.length && node[0]) node = node[0];else return;\r\n }\r\n \r\n // Check if Stickyfill is already applied to the node\r\n // and return existing sticky\r\n for (var i = 0; i < stickies.length; i++) {\r\n if (stickies[i]._node === node) return stickies[i];\r\n }\r\n \r\n // Create and return new sticky\r\n return new Sticky(node);\r\n },\r\n add: function add(nodeList) {\r\n // If it’s a node make an array of one node\r\n if (nodeList instanceof HTMLElement) nodeList = [nodeList];\r\n // Check if the argument is an iterable of some sort\r\n if (!nodeList.length) return;\r\n \r\n // Add every element as a sticky and return an array of created Sticky instances\r\n var addedStickies = [];\r\n \r\n var _loop = function _loop(i) {\r\n var node = nodeList[i];\r\n \r\n // If it’s not an HTMLElement – create an empty element to preserve 1-to-1\r\n // correlation with input list\r\n if (!(node instanceof HTMLElement)) {\r\n addedStickies.push(void 0);\r\n return 'continue';\r\n }\r\n \r\n // If Stickyfill is already applied to the node\r\n // add existing sticky\r\n if (stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n addedStickies.push(sticky);\r\n return true;\r\n }\r\n })) return 'continue';\r\n \r\n // Create and add new sticky\r\n addedStickies.push(new Sticky(node));\r\n };\r\n \r\n for (var i = 0; i < nodeList.length; i++) {\r\n var _ret2 = _loop(i);\r\n \r\n if (_ret2 === 'continue') continue;\r\n }\r\n \r\n return addedStickies;\r\n },\r\n refreshAll: function refreshAll() {\r\n stickies.forEach(function (sticky) {\r\n return sticky.refresh();\r\n });\r\n },\r\n removeOne: function removeOne(node) {\r\n // Check whether it’s a node\r\n if (!(node instanceof HTMLElement)) {\r\n // Maybe it’s a node list of some sort?\r\n // Take first node from the list then\r\n if (node.length && node[0]) node = node[0];else return;\r\n }\r\n \r\n // Remove the stickies bound to the nodes in the list\r\n stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n sticky.remove();\r\n return true;\r\n }\r\n });\r\n },\r\n remove: function remove(nodeList) {\r\n // If it’s a node make an array of one node\r\n if (nodeList instanceof HTMLElement) nodeList = [nodeList];\r\n // Check if the argument is an iterable of some sort\r\n if (!nodeList.length) return;\r\n \r\n // Remove the stickies bound to the nodes in the list\r\n \r\n var _loop2 = function _loop2(i) {\r\n var node = nodeList[i];\r\n \r\n stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n sticky.remove();\r\n return true;\r\n }\r\n });\r\n };\r\n \r\n for (var i = 0; i < nodeList.length; i++) {\r\n _loop2(i);\r\n }\r\n },\r\n removeAll: function removeAll() {\r\n while (stickies.length) {\r\n stickies[0].remove();\r\n }\r\n }\r\n };\r\n \r\n /*\r\n * 6. Setup events (unless the polyfill was disabled)\r\n */\r\n function init() {\r\n if (isInitialized) {\r\n return;\r\n }\r\n \r\n isInitialized = true;\r\n \r\n // Watch for scroll position changes and trigger recalc/refresh if needed\r\n function checkScroll() {\r\n if (window.pageXOffset != scroll.left) {\r\n scroll.top = window.pageYOffset;\r\n scroll.left = window.pageXOffset;\r\n \r\n Stickyfill.refreshAll();\r\n } else if (window.pageYOffset != scroll.top) {\r\n scroll.top = window.pageYOffset;\r\n scroll.left = window.pageXOffset;\r\n \r\n // recalc position for all stickies\r\n stickies.forEach(function (sticky) {\r\n return sticky._recalcPosition();\r\n });\r\n }\r\n }\r\n \r\n checkScroll();\r\n window.addEventListener('scroll', checkScroll);\r\n \r\n // Watch for window resizes and device orientation changes and trigger refresh\r\n window.addEventListener('resize', Stickyfill.refreshAll);\r\n window.addEventListener('orientationchange', Stickyfill.refreshAll);\r\n \r\n //Fast dirty check for layout changes every 500ms\r\n var fastCheckTimer = void 0;\r\n \r\n function startFastCheckTimer() {\r\n fastCheckTimer = setInterval(function () {\r\n stickies.forEach(function (sticky) {\r\n return sticky._fastCheck();\r\n });\r\n }, 500);\r\n }\r\n \r\n function stopFastCheckTimer() {\r\n clearInterval(fastCheckTimer);\r\n }\r\n \r\n var docHiddenKey = void 0;\r\n var visibilityChangeEventName = void 0;\r\n \r\n if ('hidden' in document) {\r\n docHiddenKey = 'hidden';\r\n visibilityChangeEventName = 'visibilitychange';\r\n } else if ('webkitHidden' in document) {\r\n docHiddenKey = 'webkitHidden';\r\n visibilityChangeEventName = 'webkitvisibilitychange';\r\n }\r\n \r\n if (visibilityChangeEventName) {\r\n if (!document[docHiddenKey]) startFastCheckTimer();\r\n \r\n document.addEventListener(visibilityChangeEventName, function () {\r\n if (document[docHiddenKey]) {\r\n stopFastCheckTimer();\r\n } else {\r\n startFastCheckTimer();\r\n }\r\n });\r\n } else startFastCheckTimer();\r\n }\r\n \r\n if (!seppuku) init();\r\n \r\n /*\r\n * 7. Expose Stickyfill\r\n */\r\n if (typeof module != 'undefined' && module.exports) {\r\n module.exports = Stickyfill;\r\n } else if (isWindowDefined) {\r\n window.Stickyfill = Stickyfill;\r\n }\r\n \r\n})(window, document);"],"names":["ScrollText","constructor","el","this","viewing","isScrolling","setupEvents","setupSticky","querySelector","componentAnimationHandler","add","mediaChangeTL","Stickyfill","getPositionData","els","map","top","getBoundingClientRect","pos","getAttribute","scrollyScrollScroller","e","sections","querySelectorAll","offset","window","getComputedStyle","marginTop","newActiveEl","filter","parseInt","reduce","acc","curr","fireViewingEvent","innerWidth","DESKTOP_SIZE","dispatchEvent","CustomEvent","detail","animateMedia","evt","tl","gsap","timeline","paused","next","to","DEFAULT_TIME_SHORT","ani","opacity","DEFAULT_EASE","set","call","_","forEach","classList","remove","vid","pause","nextVideo","play","catch","err","addEventListener","bind","animate","windowScrollEvents","push","windowResizeEvents","recalculate","windowWidth","instantiatedScrollText","document","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","seppuku","isWindowDefined","testNode","createElement","some","prefix","style","position","isInitialized","shadowRootExists","ShadowRoot","scroll","left","stickies","extend","targetObj","sourceObject","hasOwnProperty","parseNumeric","val","parseFloat","getDocOffsetTop","node","docOffsetTop","offsetTop","offsetParent","Sticky","HTMLElement","Error","sticky","_node","_stickyMode","_active","refresh","value","_removed","_deactivate","nodeComputedStyle","nodeComputedProps","display","marginBottom","marginLeft","marginRight","cssFloat","isNaN","originalPosition","referenceNode","parentNode","host","nodeWinOffset","parentWinOffset","parentComputedStyle","_parent","styles","offsetHeight","_offsetToWindow","right","documentElement","clientWidth","_offsetToParent","borderTopWidth","borderLeftWidth","borderRightWidth","_styles","bottom","width","nodeTopValue","_limits","start","pageYOffset","end","borderBottomWidth","parentPosition","_recalcPosition","clone","_clone","height","padding","border","borderSpacing","fontSize","insertBefore","stickyMode","Math","abs","_this","removeChild","_this2","index","splice","forceSticky","init","refreshAll","addOne","nodeList","addedStickies","_loop","removeOne","_loop2","removeAll","checkScroll","fastCheckTimer","docHiddenKey","visibilityChangeEventName","startFastCheckTimer","stopFastCheckTimer","pageXOffset","setInterval","_fastCheck","clearInterval","module","exports"],"sourceRoot":""}