diff --git a/dist/locomotive-scroll.esm.js b/dist/locomotive-scroll.esm.js index 9d4a5d8f..8d2e976c 100644 --- a/dist/locomotive-scroll.esm.js +++ b/dist/locomotive-scroll.esm.js @@ -1,4 +1,42 @@ /* locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */ +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); @@ -36,40 +74,6 @@ function _defineProperty(obj, key, value) { return obj; } -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); @@ -107,7 +111,7 @@ function _isNativeReflectConstruct() { if (typeof Proxy === "function") return true; try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; @@ -196,18 +200,21 @@ function _arrayWithHoles(arr) { } function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; var _arr = []; var _n = true; var _d = false; - var _e = undefined; + + var _s, _e; try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; @@ -265,7 +272,7 @@ var defaults = { gestureDirection: 'vertical', reloadOnContextChange: false, lerp: 0.1, - "class": 'is-inview', + class: 'is-inview', scrollbarContainer: false, scrollbarClass: 'c-scrollbar', scrollingClass: 'has-scroll-scrolling', @@ -292,7 +299,7 @@ var defaults = { } }; -var _default = /*#__PURE__*/function () { +var _default$2 = /*#__PURE__*/function () { function _default() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; @@ -487,7 +494,7 @@ var _default = /*#__PURE__*/function () { key: "setInView", value: function setInView(current, i) { this.els[i].inView = true; - current.el.classList.add(current["class"]); + current.el.classList.add(current.class); this.currentElements[i] = current; if (current.call && this.hasCallEventSet) { @@ -520,7 +527,7 @@ var _default = /*#__PURE__*/function () { } if (current.repeat) { - current.el.classList.remove(current["class"]); + current.el.classList.remove(current.class); } } }, { @@ -1065,7 +1072,7 @@ var smoothscroll = createCommonjsModule(function (module, exports) { }()); }); -var smoothscroll_1 = smoothscroll.polyfill; +smoothscroll.polyfill; var _default$1 = /*#__PURE__*/function (_Core) { _inherits(_default, _Core); @@ -1173,8 +1180,8 @@ var _default$1 = /*#__PURE__*/function (_Core) { this.els = {}; var els = this.el.querySelectorAll('[data-' + this.name + ']'); els.forEach(function (el, index) { - var BCR = el.getBoundingClientRect(); - var cl = el.dataset[_this3.name + 'Class'] || _this3["class"]; + el.getBoundingClientRect(); + var cl = el.dataset[_this3.name + 'Class'] || _this3.class; var id = typeof el.dataset[_this3.name + 'Id'] === 'string' ? el.dataset[_this3.name + 'Id'] : index; var top; var left; @@ -1212,7 +1219,7 @@ var _default$1 = /*#__PURE__*/function (_Core) { el: el, targetEl: targetEl, id: id, - "class": cl, + class: cl, top: top, bottom: bottom, left: left, @@ -1359,7 +1366,7 @@ var _default$1 = /*#__PURE__*/function (_Core) { }]); return _default; -}(_default); +}(_default$2); /* object-assign @@ -1368,7 +1375,7 @@ object-assign */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; +var hasOwnProperty$1 = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { @@ -1432,7 +1439,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) from = Object(arguments[s]); for (var key in from) { - if (hasOwnProperty.call(from, key)) { + if (hasOwnProperty$1.call(from, key)) { to[key] = from[key]; } } @@ -1521,7 +1528,7 @@ var lethargy = createCommonjsModule(function (module, exports) { (function() { var root; - root = exports !== null ? exports : this; + root = exports !== null ? exports : this; root.Lethargy = (function() { function Lethargy(stability, sensitivity, tolerance, delay) { @@ -1632,7 +1639,7 @@ var support = (function getSupport() { })(); var toString = Object.prototype.toString, - hasOwnProperty$1 = Object.prototype.hasOwnProperty; + hasOwnProperty = Object.prototype.hasOwnProperty; var bindallStandalone = function(object) { if(!object) return console.warn('bindAll requires at least one argument.'); @@ -1642,7 +1649,7 @@ var bindallStandalone = function(object) { if (functions.length === 0) { for (var method in object) { - if(hasOwnProperty$1.call(object, method)) { + if(hasOwnProperty.call(object, method)) { if(typeof object[method] == 'function' && toString.call(object[method]) == "[object Function]") { functions.push(method); } @@ -1673,9 +1680,9 @@ var Lethargy = lethargy.Lethargy; var EVT_ID = 'virtualscroll'; -var src = VirtualScroll; +var src$1 = VirtualScroll; -var keyCodes = { +var keyCodes$1 = { LEFT: 37, UP: 38, RIGHT: 39, @@ -1801,19 +1808,19 @@ VirtualScroll.prototype._onKeyDown = function(e) { var windowHeight = window.innerHeight - 40; switch(e.keyCode) { - case keyCodes.LEFT: - case keyCodes.UP: + case keyCodes$1.LEFT: + case keyCodes$1.UP: evt.deltaY = this.options.keyStep; break; - case keyCodes.RIGHT: - case keyCodes.DOWN: + case keyCodes$1.RIGHT: + case keyCodes$1.DOWN: evt.deltaY = - this.options.keyStep; break; - case e.shiftKey: + case e.shiftKey: evt.deltaY = windowHeight; break; - case keyCodes.SPACE: + case keyCodes$1.SPACE: evt.deltaY = - windowHeight; break; default: @@ -1982,7 +1989,7 @@ function LinearEasing (x) { return x; } -var src$1 = function bezier (mX1, mY1, mX2, mY2) { +var src = function bezier (mX1, mY1, mX2, mY2) { if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { throw new Error('bezier x values must be in [0, 1] range'); } @@ -2033,7 +2040,7 @@ var src$1 = function bezier (mX1, mY1, mX2, mY2) { }; }; -var keyCodes$1 = { +var keyCodes = { LEFT: 37, UP: 38, RIGHT: 39, @@ -2046,7 +2053,7 @@ var keyCodes$1 = { END: 35 }; -var _default$2 = /*#__PURE__*/function (_Core) { +var _default = /*#__PURE__*/function (_Core) { _inherits(_default, _Core); var _super = _createSuper(_default); @@ -2094,7 +2101,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { y: this.initPosition.y } }, this.instance); - this.vs = new src({ + this.vs = new src$1({ el: this.scrollFromAnywhere ? document : this.el, mouseMultiplier: navigator.platform.indexOf('Win') > -1 ? 1 : 0.4, firefoxMultiplier: this.firefoxMultiplier, @@ -2130,13 +2137,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { this.instance.limit.y = this.el.offsetHeight - this.windowHeight; if (this.direction === 'horizontal') { - var totalWidth = 0; - var nodes = this.el.children; - - for (var i = 0; i < nodes.length; i++) { - totalWidth += nodes[i].offsetWidth; - } - + var totalWidth = this.el.scrollWidth; this.instance.limit.x = totalWidth - this.windowWidth; } } @@ -2171,7 +2172,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { if (this.stop) { // If we are stopped, we don't want any scroll to occur because of a keypress // Prevent tab to scroll to activeElement - if (e.keyCode == keyCodes$1.TAB) { + if (e.keyCode == keyCodes.TAB) { requestAnimationFrame(function () { // Make sure native scroll is always at top of page _this3.html.scrollTop = 0; @@ -2185,7 +2186,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { } switch (e.keyCode) { - case keyCodes$1.TAB: + case keyCodes.TAB: // Do not remove the RAF // It allows to override the browser's native scrollTo, which is essential requestAnimationFrame(function () { @@ -2201,31 +2202,31 @@ var _default$2 = /*#__PURE__*/function (_Core) { }); break; - case keyCodes$1.UP: + case keyCodes.UP: this.instance.delta[this.directionAxis] -= 240; break; - case keyCodes$1.DOWN: + case keyCodes.DOWN: this.instance.delta[this.directionAxis] += 240; break; - case keyCodes$1.PAGEUP: + case keyCodes.PAGEUP: this.instance.delta[this.directionAxis] -= window.innerHeight; break; - case keyCodes$1.PAGEDOWN: + case keyCodes.PAGEDOWN: this.instance.delta[this.directionAxis] += window.innerHeight; break; - case keyCodes$1.HOME: + case keyCodes.HOME: this.instance.delta[this.directionAxis] -= this.instance.limit[this.directionAxis]; break; - case keyCodes$1.END: + case keyCodes.END: this.instance.delta[this.directionAxis] += this.instance.limit[this.directionAxis]; break; - case keyCodes$1.SPACE: + case keyCodes.SPACE: if (!(document.activeElement instanceof HTMLInputElement) && !(document.activeElement instanceof HTMLTextAreaElement)) { if (e.shiftKey) { this.instance.delta[this.directionAxis] -= window.innerHeight; @@ -2272,9 +2273,9 @@ var _default$2 = /*#__PURE__*/function (_Core) { } Object.entries(this.sections).forEach(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - i = _ref2[0], - section = _ref2[1]; + var _ref2 = _slicedToArray(_ref, 2); + _ref2[0]; + var section = _ref2[1]; if (section.persistent || _this4.instance.scroll[_this4.directionAxis] > section.offset[_this4.directionAxis] && _this4.instance.scroll[_this4.directionAxis] < section.limit[_this4.directionAxis]) { if (_this4.direction === 'horizontal') { @@ -2547,15 +2548,15 @@ var _default$2 = /*#__PURE__*/function (_Core) { // Try and find the target's parent section var targetParents = getParents(el); var section = Object.entries(_this6.sections).map(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - key = _ref4[0], - section = _ref4[1]; + var _ref4 = _slicedToArray(_ref3, 2); + _ref4[0]; + var section = _ref4[1]; return section; }).find(function (section) { return targetParents.includes(section.el); }); - var cl = el.dataset[_this6.name + 'Class'] || _this6["class"]; + var cl = el.dataset[_this6.name + 'Class'] || _this6.class; var id = typeof el.dataset[_this6.name + 'Id'] === 'string' ? el.dataset[_this6.name + 'Id'] : 'el' + index; var top; var left; @@ -2663,7 +2664,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { var mappedEl = { el: el, id: id, - "class": cl, + class: cl, section: section, top: top, middle: middle, @@ -2760,9 +2761,9 @@ var _default$2 = /*#__PURE__*/function (_Core) { y: this.instance.scroll.y + this.windowMiddle.y }; Object.entries(this.parallaxElements).forEach(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 2), - i = _ref6[0], - current = _ref6[1]; + var _ref6 = _slicedToArray(_ref5, 2); + _ref6[0]; + var current = _ref6[1]; var transformDistance = false; @@ -2865,7 +2866,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { var callback = options.callback ? options.callback : false; // function called when scrollTo completes (note that it won't wait for lerp to stabilize) - easing = src$1.apply(void 0, _toConsumableArray(easing)); + easing = src.apply(void 0, _toConsumableArray(easing)); if (typeof target === 'string') { // Selector or boundaries @@ -2911,9 +2912,9 @@ var _default$2 = /*#__PURE__*/function (_Core) { var parentSection = targetParents.find(function (candidate) { return Object.entries(_this9.sections) // Get sections associative array as a regular array .map(function (_ref7) { - var _ref8 = _slicedToArray(_ref7, 2), - key = _ref8[0], - section = _ref8[1]; + var _ref8 = _slicedToArray(_ref7, 2); + _ref8[0]; + var section = _ref8[1]; return section; }) // map to section only (we dont need the key here) @@ -3038,7 +3039,7 @@ var _default$2 = /*#__PURE__*/function (_Core) { }]); return _default; -}(_default); +}(_default$2); var Smooth = /*#__PURE__*/function () { function Smooth() { @@ -3066,7 +3067,7 @@ var Smooth = /*#__PURE__*/function () { this.options.isTablet = this.options.isMobile && window.innerWidth >= this.tablet.breakpoint; if (this.smooth && !this.options.isMobile || this.tablet.smooth && this.options.isTablet || this.smartphone.smooth && this.options.isMobile && !this.options.isTablet) { - this.scroll = new _default$2(this.options); + this.scroll = new _default(this.options); } else { this.scroll = new _default$1(this.options); } diff --git a/dist/locomotive-scroll.js b/dist/locomotive-scroll.js index c6beee27..8e75cbad 100644 --- a/dist/locomotive-scroll.js +++ b/dist/locomotive-scroll.js @@ -5,6 +5,44 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.LocomotiveScroll = factory()); }(this, (function () { 'use strict'; + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; + } + + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); @@ -42,40 +80,6 @@ return obj; } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; - } - - function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; - } - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); @@ -113,7 +117,7 @@ if (typeof Proxy === "function") return true; try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; @@ -202,18 +206,21 @@ } function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; var _arr = []; var _n = true; var _d = false; - var _e = undefined; + + var _s, _e; try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; @@ -271,7 +278,7 @@ gestureDirection: 'vertical', reloadOnContextChange: false, lerp: 0.1, - "class": 'is-inview', + class: 'is-inview', scrollbarContainer: false, scrollbarClass: 'c-scrollbar', scrollingClass: 'has-scroll-scrolling', @@ -298,7 +305,7 @@ } }; - var _default = /*#__PURE__*/function () { + var _default$2 = /*#__PURE__*/function () { function _default() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; @@ -493,7 +500,7 @@ key: "setInView", value: function setInView(current, i) { this.els[i].inView = true; - current.el.classList.add(current["class"]); + current.el.classList.add(current.class); this.currentElements[i] = current; if (current.call && this.hasCallEventSet) { @@ -526,7 +533,7 @@ } if (current.repeat) { - current.el.classList.remove(current["class"]); + current.el.classList.remove(current.class); } } }, { @@ -1071,7 +1078,7 @@ }()); }); - var smoothscroll_1 = smoothscroll.polyfill; + smoothscroll.polyfill; var _default$1 = /*#__PURE__*/function (_Core) { _inherits(_default, _Core); @@ -1179,8 +1186,8 @@ this.els = {}; var els = this.el.querySelectorAll('[data-' + this.name + ']'); els.forEach(function (el, index) { - var BCR = el.getBoundingClientRect(); - var cl = el.dataset[_this3.name + 'Class'] || _this3["class"]; + el.getBoundingClientRect(); + var cl = el.dataset[_this3.name + 'Class'] || _this3.class; var id = typeof el.dataset[_this3.name + 'Id'] === 'string' ? el.dataset[_this3.name + 'Id'] : index; var top; var left; @@ -1218,7 +1225,7 @@ el: el, targetEl: targetEl, id: id, - "class": cl, + class: cl, top: top, bottom: bottom, left: left, @@ -1365,7 +1372,7 @@ }]); return _default; - }(_default); + }(_default$2); /* object-assign @@ -1374,7 +1381,7 @@ */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { @@ -1438,7 +1445,7 @@ from = Object(arguments[s]); for (var key in from) { - if (hasOwnProperty.call(from, key)) { + if (hasOwnProperty$1.call(from, key)) { to[key] = from[key]; } } @@ -1527,7 +1534,7 @@ (function() { var root; - root = exports !== null ? exports : this; + root = exports !== null ? exports : this; root.Lethargy = (function() { function Lethargy(stability, sensitivity, tolerance, delay) { @@ -1638,7 +1645,7 @@ })(); var toString = Object.prototype.toString, - hasOwnProperty$1 = Object.prototype.hasOwnProperty; + hasOwnProperty = Object.prototype.hasOwnProperty; var bindallStandalone = function(object) { if(!object) return console.warn('bindAll requires at least one argument.'); @@ -1648,7 +1655,7 @@ if (functions.length === 0) { for (var method in object) { - if(hasOwnProperty$1.call(object, method)) { + if(hasOwnProperty.call(object, method)) { if(typeof object[method] == 'function' && toString.call(object[method]) == "[object Function]") { functions.push(method); } @@ -1679,9 +1686,9 @@ var EVT_ID = 'virtualscroll'; - var src = VirtualScroll; + var src$1 = VirtualScroll; - var keyCodes = { + var keyCodes$1 = { LEFT: 37, UP: 38, RIGHT: 39, @@ -1807,19 +1814,19 @@ var windowHeight = window.innerHeight - 40; switch(e.keyCode) { - case keyCodes.LEFT: - case keyCodes.UP: + case keyCodes$1.LEFT: + case keyCodes$1.UP: evt.deltaY = this.options.keyStep; break; - case keyCodes.RIGHT: - case keyCodes.DOWN: + case keyCodes$1.RIGHT: + case keyCodes$1.DOWN: evt.deltaY = - this.options.keyStep; break; - case e.shiftKey: + case e.shiftKey: evt.deltaY = windowHeight; break; - case keyCodes.SPACE: + case keyCodes$1.SPACE: evt.deltaY = - windowHeight; break; default: @@ -1988,7 +1995,7 @@ return x; } - var src$1 = function bezier (mX1, mY1, mX2, mY2) { + var src = function bezier (mX1, mY1, mX2, mY2) { if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { throw new Error('bezier x values must be in [0, 1] range'); } @@ -2039,7 +2046,7 @@ }; }; - var keyCodes$1 = { + var keyCodes = { LEFT: 37, UP: 38, RIGHT: 39, @@ -2052,7 +2059,7 @@ END: 35 }; - var _default$2 = /*#__PURE__*/function (_Core) { + var _default = /*#__PURE__*/function (_Core) { _inherits(_default, _Core); var _super = _createSuper(_default); @@ -2100,7 +2107,7 @@ y: this.initPosition.y } }, this.instance); - this.vs = new src({ + this.vs = new src$1({ el: this.scrollFromAnywhere ? document : this.el, mouseMultiplier: navigator.platform.indexOf('Win') > -1 ? 1 : 0.4, firefoxMultiplier: this.firefoxMultiplier, @@ -2136,13 +2143,7 @@ this.instance.limit.y = this.el.offsetHeight - this.windowHeight; if (this.direction === 'horizontal') { - var totalWidth = 0; - var nodes = this.el.children; - - for (var i = 0; i < nodes.length; i++) { - totalWidth += nodes[i].offsetWidth; - } - + var totalWidth = this.el.scrollWidth; this.instance.limit.x = totalWidth - this.windowWidth; } } @@ -2177,7 +2178,7 @@ if (this.stop) { // If we are stopped, we don't want any scroll to occur because of a keypress // Prevent tab to scroll to activeElement - if (e.keyCode == keyCodes$1.TAB) { + if (e.keyCode == keyCodes.TAB) { requestAnimationFrame(function () { // Make sure native scroll is always at top of page _this3.html.scrollTop = 0; @@ -2191,7 +2192,7 @@ } switch (e.keyCode) { - case keyCodes$1.TAB: + case keyCodes.TAB: // Do not remove the RAF // It allows to override the browser's native scrollTo, which is essential requestAnimationFrame(function () { @@ -2207,31 +2208,31 @@ }); break; - case keyCodes$1.UP: + case keyCodes.UP: this.instance.delta[this.directionAxis] -= 240; break; - case keyCodes$1.DOWN: + case keyCodes.DOWN: this.instance.delta[this.directionAxis] += 240; break; - case keyCodes$1.PAGEUP: + case keyCodes.PAGEUP: this.instance.delta[this.directionAxis] -= window.innerHeight; break; - case keyCodes$1.PAGEDOWN: + case keyCodes.PAGEDOWN: this.instance.delta[this.directionAxis] += window.innerHeight; break; - case keyCodes$1.HOME: + case keyCodes.HOME: this.instance.delta[this.directionAxis] -= this.instance.limit[this.directionAxis]; break; - case keyCodes$1.END: + case keyCodes.END: this.instance.delta[this.directionAxis] += this.instance.limit[this.directionAxis]; break; - case keyCodes$1.SPACE: + case keyCodes.SPACE: if (!(document.activeElement instanceof HTMLInputElement) && !(document.activeElement instanceof HTMLTextAreaElement)) { if (e.shiftKey) { this.instance.delta[this.directionAxis] -= window.innerHeight; @@ -2278,9 +2279,9 @@ } Object.entries(this.sections).forEach(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - i = _ref2[0], - section = _ref2[1]; + var _ref2 = _slicedToArray(_ref, 2); + _ref2[0]; + var section = _ref2[1]; if (section.persistent || _this4.instance.scroll[_this4.directionAxis] > section.offset[_this4.directionAxis] && _this4.instance.scroll[_this4.directionAxis] < section.limit[_this4.directionAxis]) { if (_this4.direction === 'horizontal') { @@ -2553,15 +2554,15 @@ // Try and find the target's parent section var targetParents = getParents(el); var section = Object.entries(_this6.sections).map(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - key = _ref4[0], - section = _ref4[1]; + var _ref4 = _slicedToArray(_ref3, 2); + _ref4[0]; + var section = _ref4[1]; return section; }).find(function (section) { return targetParents.includes(section.el); }); - var cl = el.dataset[_this6.name + 'Class'] || _this6["class"]; + var cl = el.dataset[_this6.name + 'Class'] || _this6.class; var id = typeof el.dataset[_this6.name + 'Id'] === 'string' ? el.dataset[_this6.name + 'Id'] : 'el' + index; var top; var left; @@ -2669,7 +2670,7 @@ var mappedEl = { el: el, id: id, - "class": cl, + class: cl, section: section, top: top, middle: middle, @@ -2766,9 +2767,9 @@ y: this.instance.scroll.y + this.windowMiddle.y }; Object.entries(this.parallaxElements).forEach(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 2), - i = _ref6[0], - current = _ref6[1]; + var _ref6 = _slicedToArray(_ref5, 2); + _ref6[0]; + var current = _ref6[1]; var transformDistance = false; @@ -2871,7 +2872,7 @@ var callback = options.callback ? options.callback : false; // function called when scrollTo completes (note that it won't wait for lerp to stabilize) - easing = src$1.apply(void 0, _toConsumableArray(easing)); + easing = src.apply(void 0, _toConsumableArray(easing)); if (typeof target === 'string') { // Selector or boundaries @@ -2917,9 +2918,9 @@ var parentSection = targetParents.find(function (candidate) { return Object.entries(_this9.sections) // Get sections associative array as a regular array .map(function (_ref7) { - var _ref8 = _slicedToArray(_ref7, 2), - key = _ref8[0], - section = _ref8[1]; + var _ref8 = _slicedToArray(_ref7, 2); + _ref8[0]; + var section = _ref8[1]; return section; }) // map to section only (we dont need the key here) @@ -3044,7 +3045,7 @@ }]); return _default; - }(_default); + }(_default$2); var Smooth = /*#__PURE__*/function () { function Smooth() { @@ -3072,7 +3073,7 @@ this.options.isTablet = this.options.isMobile && window.innerWidth >= this.tablet.breakpoint; if (this.smooth && !this.options.isMobile || this.tablet.smooth && this.options.isTablet || this.smartphone.smooth && this.options.isMobile && !this.options.isTablet) { - this.scroll = new _default$2(this.options); + this.scroll = new _default(this.options); } else { this.scroll = new _default$1(this.options); } diff --git a/dist/locomotive-scroll.min.css b/dist/locomotive-scroll.min.css index 09d908bd..d842fd0a 100644 --- a/dist/locomotive-scroll.min.css +++ b/dist/locomotive-scroll.min.css @@ -1 +1 @@ -/*! locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}.has-scroll-smooth [data-scroll-container]{min-height:100vh}[data-scroll-direction=horizontal] [data-scroll-container]{height:100vh;display:inline-block;white-space:nowrap}[data-scroll-direction=horizontal] [data-scroll-section]{display:inline-block;vertical-align:top;white-space:nowrap;height:100%}.c-scrollbar{position:absolute;right:0;top:0;width:11px;height:100%;transform-origin:center right;transition:transform .3s,opacity .3s;opacity:0}.c-scrollbar:hover{transform:scaleX(1.45)}.c-scrollbar:hover,.has-scroll-dragging .c-scrollbar,.has-scroll-scrolling .c-scrollbar{opacity:1}[data-scroll-direction=horizontal] .c-scrollbar{width:100%;height:10px;top:auto;bottom:0;transform:scaleY(1)}[data-scroll-direction=horizontal] .c-scrollbar:hover{transform:scaleY(1.3)}.c-scrollbar_thumb{position:absolute;top:0;right:0;background-color:#000;opacity:.5;width:7px;border-radius:10px;margin:2px;cursor:-webkit-grab;cursor:grab}.has-scroll-dragging .c-scrollbar_thumb{cursor:-webkit-grabbing;cursor:grabbing}[data-scroll-direction=horizontal] .c-scrollbar_thumb{right:auto;bottom:0} \ No newline at end of file +/*! locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}.has-scroll-smooth [data-scroll-container]{min-height:100vh}[data-scroll-direction=horizontal] [data-scroll-container]{display:inline-block;height:100vh;white-space:nowrap}[data-scroll-direction=horizontal] [data-scroll-section]{display:inline-block;height:100%;vertical-align:top;white-space:nowrap}.c-scrollbar{height:100%;opacity:0;position:absolute;right:0;top:0;transform-origin:center right;transition:transform .3s,opacity .3s;width:11px}.c-scrollbar:hover{transform:scaleX(1.45)}.c-scrollbar:hover,.has-scroll-dragging .c-scrollbar,.has-scroll-scrolling .c-scrollbar{opacity:1}[data-scroll-direction=horizontal] .c-scrollbar{bottom:0;height:10px;top:auto;transform:scaleY(1);width:100%}[data-scroll-direction=horizontal] .c-scrollbar:hover{transform:scaleY(1.3)}.c-scrollbar_thumb{background-color:#000;border-radius:10px;cursor:-webkit-grab;cursor:grab;margin:2px;opacity:.5;position:absolute;right:0;top:0;width:7px}.has-scroll-dragging .c-scrollbar_thumb{cursor:-webkit-grabbing;cursor:grabbing}[data-scroll-direction=horizontal] .c-scrollbar_thumb{bottom:0;right:auto} \ No newline at end of file diff --git a/dist/locomotive-scroll.min.js b/dist/locomotive-scroll.min.js index d812d2df..e3ec9489 100644 --- a/dist/locomotive-scroll.min.js +++ b/dist/locomotive-scroll.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).LocomotiveScroll=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,s=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),Object.assign(this,y,i),this.smartphone=y.smartphone,i.smartphone&&Object.assign(this.smartphone,i.smartphone),this.tablet=y.tablet,i.tablet&&Object.assign(this.tablet,i.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return i(e,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame((function(){t.resize(),t.resizeTick=!1})))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||this.windowWidth=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context)("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach((function(e){e.addEventListener("click",t.setScrollTo,!1)}))}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,i=this.instance.scroll.y,s=i+this.windowHeight,n=this.instance.scroll.x,o=n+this.windowWidth;Object.entries(this.els).forEach((function(r){var l=f(r,2),a=l[0],c=l[1];if(!c||c.inView&&!t||("horizontal"===e.direction?o>=c.left&&n=c.top&&ic.right)&&e.setOutOfView(c,a)}else{var d=c.bottom-c.top;c.progress=(e.instance.scroll.y-(c.top-e.windowHeight))/(d+e.windowHeight),(sc.bottom)&&e.setOutOfView(c,a)}})),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach((function(t){t===e&&delete i.currentElements[t]})),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map((function(t){return t.trim()})),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),1===i.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var i=this.listeners[t],s=i.indexOf(e);s<0||(i.splice(s,1),0===i.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),s=this.listeners[i];s&&0!==s.length&&s.forEach((function(t){switch(i){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}}))}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach((function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)})),this.listeners={},this.scrollToEls.forEach((function(e){e.removeEventListener("click",t.setScrollTo,!1)})),this.html.classList.remove(this.initClass)}}]),e}(),g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(t,e){return t(e={exports:{}},e.exports),e.exports}var x=w((function(t,e){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var i,s=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||l,scrollIntoView:s.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,r=(i=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?p.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},s.prototype.scroll=s.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==a(arguments[0])){var t=arguments[0].left,e=arguments[0].top;p.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},s.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},s.prototype.scrollIntoView=function(){if(!0!==a(arguments[0])){var i=u(this),s=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==e.body?(p.call(this,i,i.scrollLeft+o.left-s.left,i.scrollTop+o.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(t,e){return"Y"===e?t.clientHeight+r1?1:l,i=.5*(1-Math.cos(Math.PI*r)),s=e.startX+(e.x-e.startX)*i,n=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,s,n),s===e.x&&n===e.y||t.requestAnimationFrame(f.bind(t,e))}function p(i,s,r){var a,c,h,d,u=o();i===e.body?(a=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=n.scroll):(a=i,c=i.scrollLeft,h=i.scrollTop,d=l),f({scrollable:a,method:d,startTime:u,startX:c,startY:h,x:s,y:r})}}}})),S=(x.polyfill,function(e){r(n,e);var s=d(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,n),(e=s.call(this,i)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",e.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=x,window.smoothscrollPolyfill.polyfill()),e}return i(n,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),u(l(n.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;u(l(n.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame((function(){t.detectElements()})),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset1&&void 0!==arguments[1]?arguments[1]:{},i=parseInt(e.offset)||0,s=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");i="number"!=typeof t?t.getBoundingClientRect().top+i+this.instance.scroll.y:t+i;var n=function(){return parseInt(window.pageYOffset)===parseInt(i)};if(s){if(n())return void s();var o=function t(){n()&&(window.removeEventListener("scroll",t),s())};window.addEventListener("scroll",o)}window.scrollTo({top:i,behavior:"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){u(l(n.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),n}(b)),k=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function A(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var O=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(t){s[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,s,n=A(t),o=1;o=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.lastDownDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.deltasTimestamp=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this)}return t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,i,s,n,o,r,l;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(s=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),l=s.reduce((function(t,e){return t+e})),o=i.reduce((function(t,e){return t+e})),r=l/s.length,n=o/i.length,Math.abs(r)1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1},j=Object.prototype.toString,_=Object.prototype.hasOwnProperty;function B(t,e){return function(){return t.apply(e,arguments)}}var W=L.Lethargy,H="virtualscroll",R=V,P=37,Y=38,I=39,z=40,X=32;function V(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var i in t)_.call(t,i)&&"function"==typeof t[i]&&"[object Function]"==j.call(t[i])&&e.push(i);for(var s=0;s=.001?function(t,e,i,s){for(var n=0;n<4;++n){var o=Q(e,i,s);if(0===o)return e;e-=(J(e,i,s)-t)/o}return e}(e,r,t,i):0===l?r:function(t,e,i,s,n){var o,r,l=0;do{(o=J(r=e+(i-e)/2,s,n)-t)>0?i=r:e=r}while(Math.abs(o)>1e-7&&++l<10);return r}(e,s,s+.1,t,i)}return function(t){return 0===t?0:1===t?1:J(r(t),e,s)}},et=38,it=40,st=32,nt=9,ot=33,rt=34,lt=36,at=35,ct=function(e){r(n,e);var s=d(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,n),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(e=s.call(this,i)).inertia&&(e.lerp=.1*e.inertia),e.isScrolling=!1,e.isDraggingScrollbar=!1,e.isTicking=!1,e.hasScrollTicking=!1,e.parallaxElements={},e.stop=!1,e.scrollbarContainer=i.scrollbarContainer,e.checkKey=e.checkKey.bind(c(e)),window.addEventListener("keydown",e.checkKey,!1),e}return i(n,[{key:"init",value:function(){var t=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=o({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new R({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on((function(e){t.stop||t.isDraggingScrollbar||requestAnimationFrame((function(){t.updateDelta(e),t.isScrolling||t.startScrolling()}))})),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),u(l(n.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){for(var t=0,e=this.el.children,i=0;ithis.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"checkScroll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame((function(){return t.checkScroll()})),this.hasScrollTicking=!0),this.updateScroll();var i=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),s=Date.now()-this.startScrollTs;if(!this.animatingScroll&&s>100&&(i<.5&&0!=this.instance.delta[this.directionAxis]||i<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach((function(i){var s=f(i,2),n=(s[0],s[1]);n.persistent||t.instance.scroll[t.directionAxis]>n.offset[t.directionAxis]&&t.instance.scroll[t.directionAxis]this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=F(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.ythis.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x0&&s0&&i1&&void 0!==arguments[1]&&arguments[1],s=this.instance.scroll.x+this.windowWidth,n=this.instance.scroll.y+this.windowHeight,o={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach((function(r){var l=f(r,2),a=(l[0],l[1]),c=!1;if(t&&(c=0),a.inView||i)switch(a.position){case"top":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementTop":c=(n-a.top)*-a.speed;break;case"bottom":c=(e.instance.limit[e.directionAxis]-n+e.windowHeight)*a.speed;break;case"left":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementLeft":c=(s-a.left)*-a.speed;break;case"right":c=(e.instance.limit[e.directionAxis]-s+e.windowHeight)*a.speed;break;default:c=(o[e.directionAxis]-a.middle[e.directionAxis])*-a.speed}a.sticky&&(c=a.inView?"horizontal"===e.direction?e.instance.scroll.x-a.left+window.innerWidth:e.instance.scroll.y-a.top+window.innerHeight:"horizontal"===e.direction?e.instance.scroll.xa.right&&e.instance.scroll.x>a.right+100&&a.right-a.left+window.innerWidth:e.instance.scroll.ya.bottom&&e.instance.scroll.y>a.bottom+100&&a.bottom-a.top+window.innerHeight),!1!==c&&("horizontal"===a.direction||"horizontal"===e.direction&&"vertical"!==a.direction?e.transform(a.el,c,0,!t&&a.delay):e.transform(a.el,0,c,!t&&a.delay))}))}},{key:"scrollTo",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=parseInt(i.offset)||0,n=isNaN(parseInt(i.duration))?1e3:parseInt(i.duration),o=i.easing||[.25,0,.35,1],r=!!i.disableLerp,l=!!i.callback&&i.callback;if(o=tt.apply(void 0,p(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){var a=K(t).includes(this.el);if(!a)return;var c=t.getBoundingClientRect(),h=c.top,d=c.left,u=K(t),m=u.find((function(t){return Object.entries(e.sections).map((function(t){var e=f(t,2);e[0];return e[1]})).find((function(e){return e.el==t}))})),v=0;v=m?q(m)[this.directionAxis]:-this.instance.scroll[this.directionAxis],s="horizontal"===this.direction?d+s-v:h+s-v}else s=t+s;var y=parseFloat(this.instance.delta[this.directionAxis]),b=Math.max(0,Math.min(s,this.instance.limit[this.directionAxis])),g=b-y,w=function(t){r?"horizontal"===e.direction?e.setScroll(y+g*t,e.instance.delta.y):e.setScroll(e.instance.delta.x,y+g*t):e.instance.delta[e.directionAxis]=y+g*t};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var x=Date.now(),S=function t(){var i=(Date.now()-x)/n;i>1?(w(1),e.animatingScroll=!1,0==n&&e.update(),l&&l()):(e.scrollToRaf=requestAnimationFrame(t),w(o(i)))};S()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance=o(o({},this.instance),{},{scroll:{x:t,y:e},delta:{x:t,y:e},speed:0})}},{key:"destroy",value:function(){u(l(n.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),n}(b);return function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.options=i,Object.assign(this,y,i),this.smartphone=y.smartphone,i.smartphone&&Object.assign(this.smartphone,i.smartphone),this.tablet=y.tablet,i.tablet&&Object.assign(this.tablet,i.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return i(e,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||window.innerWidth=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new ct(this.options):this.scroll=new S(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),e}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).LocomotiveScroll=e()}(this,(function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,s=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),Object.assign(this,y,e),this.smartphone=y.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=y.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return n(t,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame((function(){t.resize(),t.resizeTick=!1})))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||this.windowWidth=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context)("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach((function(e){e.addEventListener("click",t.setScrollTo,!1)}))}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,i=this.instance.scroll.y,s=i+this.windowHeight,n=this.instance.scroll.x,o=n+this.windowWidth;Object.entries(this.els).forEach((function(l){var r=f(l,2),a=r[0],c=r[1];if(!c||c.inView&&!t||("horizontal"===e.direction?o>=c.left&&n=c.top&&ic.right)&&e.setOutOfView(c,a)}else{var d=c.bottom-c.top;c.progress=(e.instance.scroll.y-(c.top-e.windowHeight))/(d+e.windowHeight),(sc.bottom)&&e.setOutOfView(c,a)}})),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach((function(t){t===e&&delete i.currentElements[t]})),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map((function(t){return t.trim()})),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),1===i.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var i=this.listeners[t],s=i.indexOf(e);s<0||(i.splice(s,1),0===i.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),s=this.listeners[i];s&&0!==s.length&&s.forEach((function(t){switch(i){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}}))}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach((function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)})),this.listeners={},this.scrollToEls.forEach((function(e){e.removeEventListener("click",t.setScrollTo,!1)})),this.html.classList.remove(this.initClass)}}]),t}(),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}var x=g((function(t,e){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var i,s=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||r,scrollIntoView:s.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,l=(i=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?p.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},s.prototype.scroll=s.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==a(arguments[0])){var t=arguments[0].left,e=arguments[0].top;p.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},s.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},s.prototype.scrollIntoView=function(){if(!0!==a(arguments[0])){var i=u(this),s=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==e.body?(p.call(this,i,i.scrollLeft+o.left-s.left,i.scrollTop+o.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function r(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(t,e){return"Y"===e?t.clientHeight+l1?1:r,i=.5*(1-Math.cos(Math.PI*l)),s=e.startX+(e.x-e.startX)*i,n=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,s,n),s===e.x&&n===e.y||t.requestAnimationFrame(f.bind(t,e))}function p(i,s,l){var a,c,h,d,u=o();i===e.body?(a=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=n.scroll):(a=i,c=i.scrollLeft,h=i.scrollTop,d=r),f({scrollable:a,method:d,startTime:u,startX:c,startY:h,x:s,y:l})}}}}));x.polyfill;var S=function(t){l(s,t);var e=d(s);function s(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,s),(t=e.call(this,n)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",t.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=x,window.smoothscrollPolyfill.polyfill()),t}return n(s,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),u(r(s.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;u(r(s.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame((function(){t.detectElements()})),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset1&&void 0!==arguments[1]?arguments[1]:{},i=parseInt(e.offset)||0,s=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");i="number"!=typeof t?t.getBoundingClientRect().top+i+this.instance.scroll.y:t+i;var n=function(){return parseInt(window.pageYOffset)===parseInt(i)};if(s){if(n())return void s();var o=function t(){n()&&(window.removeEventListener("scroll",t),s())};window.addEventListener("scroll",o)}window.scrollTo({top:i,behavior:"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){u(r(s.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),s}(b),k=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function A(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var O=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(t){s[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,s,n=A(t),o=1;o=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.lastDownDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.deltasTimestamp=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this)}return t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,i,s,n,o,l,r;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(s=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),r=s.reduce((function(t,e){return t+e})),o=i.reduce((function(t,e){return t+e})),l=r/s.length,n=o/i.length,Math.abs(l)1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1},j=Object.prototype.toString,B=Object.prototype.hasOwnProperty;function _(t,e){return function(){return t.apply(e,arguments)}}var W=L.Lethargy,H="virtualscroll",R=V,P=37,Y=38,I=39,z=40,X=32;function V(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var i in t)B.call(t,i)&&"function"==typeof t[i]&&"[object Function]"==j.call(t[i])&&e.push(i);for(var s=0;s=.001?function(t,e,i,s){for(var n=0;n<4;++n){var o=Q(e,i,s);if(0===o)return e;e-=(J(e,i,s)-t)/o}return e}(e,l,t,i):0===r?l:function(t,e,i,s,n){var o,l,r=0;do{(o=J(l=e+(i-e)/2,s,n)-t)>0?i=l:e=l}while(Math.abs(o)>1e-7&&++r<10);return l}(e,s,s+.1,t,i)}return function(t){return 0===t?0:1===t?1:J(l(t),e,s)}},et=38,it=40,st=32,nt=9,ot=33,lt=34,rt=36,at=35,ct=function(t){l(o,t);var s=d(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,o),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(t=s.call(this,e)).inertia&&(t.lerp=.1*t.inertia),t.isScrolling=!1,t.isDraggingScrollbar=!1,t.isTicking=!1,t.hasScrollTicking=!1,t.parallaxElements={},t.stop=!1,t.scrollbarContainer=e.scrollbarContainer,t.checkKey=t.checkKey.bind(c(t)),window.addEventListener("keydown",t.checkKey,!1),t}return n(o,[{key:"init",value:function(){var t=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=e({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new R({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on((function(e){t.stop||t.isDraggingScrollbar||requestAnimationFrame((function(){t.updateDelta(e),t.isScrolling||t.startScrolling()}))})),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),u(r(o.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){var t=this.el.scrollWidth;this.instance.limit.x=t-this.windowWidth}}},{key:"startScrolling",value:function(){this.startScrollTs=Date.now(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"stopScrolling",value:function(){cancelAnimationFrame(this.checkScrollRaf),this.scrollToRaf&&(cancelAnimationFrame(this.scrollToRaf),this.scrollToRaf=null),this.isScrolling=!1,this.instance.scroll.y=Math.round(this.instance.scroll.y),this.html.classList.remove(this.scrollingClass)}},{key:"checkKey",value:function(t){var e=this;if(this.stop)t.keyCode==nt&&requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0}));else{switch(t.keyCode){case nt:requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0,e.scrollTo(document.activeElement,{offset:-window.innerHeight/2})}));break;case et:this.instance.delta[this.directionAxis]-=240;break;case it:this.instance.delta[this.directionAxis]+=240;break;case ot:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case lt:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case rt:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case at:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case st:document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||(t.shiftKey?this.instance.delta[this.directionAxis]-=window.innerHeight:this.instance.delta[this.directionAxis]+=window.innerHeight);break;default:return}this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"checkScroll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame((function(){return t.checkScroll()})),this.hasScrollTicking=!0),this.updateScroll();var i=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),s=Date.now()-this.startScrollTs;if(!this.animatingScroll&&s>100&&(i<.5&&0!=this.instance.delta[this.directionAxis]||i<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach((function(i){var s=f(i,2);s[0];var n=s[1];n.persistent||t.instance.scroll[t.directionAxis]>n.offset[t.directionAxis]&&t.instance.scroll[t.directionAxis]this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=F(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.ythis.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x0&&s0&&i1&&void 0!==arguments[1]&&arguments[1],s=this.instance.scroll.x+this.windowWidth,n=this.instance.scroll.y+this.windowHeight,o={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach((function(l){var r=f(l,2);r[0];var a=r[1],c=!1;if(t&&(c=0),a.inView||i)switch(a.position){case"top":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementTop":c=(n-a.top)*-a.speed;break;case"bottom":c=(e.instance.limit[e.directionAxis]-n+e.windowHeight)*a.speed;break;case"left":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementLeft":c=(s-a.left)*-a.speed;break;case"right":c=(e.instance.limit[e.directionAxis]-s+e.windowHeight)*a.speed;break;default:c=(o[e.directionAxis]-a.middle[e.directionAxis])*-a.speed}a.sticky&&(c=a.inView?"horizontal"===e.direction?e.instance.scroll.x-a.left+window.innerWidth:e.instance.scroll.y-a.top+window.innerHeight:"horizontal"===e.direction?e.instance.scroll.xa.right&&e.instance.scroll.x>a.right+100&&a.right-a.left+window.innerWidth:e.instance.scroll.ya.bottom&&e.instance.scroll.y>a.bottom+100&&a.bottom-a.top+window.innerHeight),!1!==c&&("horizontal"===a.direction||"horizontal"===e.direction&&"vertical"!==a.direction?e.transform(a.el,c,0,!t&&a.delay):e.transform(a.el,0,c,!t&&a.delay))}))}},{key:"scrollTo",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=parseInt(i.offset)||0,n=isNaN(parseInt(i.duration))?1e3:parseInt(i.duration),o=i.easing||[.25,0,.35,1],l=!!i.disableLerp,r=!!i.callback&&i.callback;if(o=tt.apply(void 0,p(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){var a=K(t).includes(this.el);if(!a)return;var c=t.getBoundingClientRect(),h=c.top,d=c.left,u=K(t),m=u.find((function(t){return Object.entries(e.sections).map((function(t){var e=f(t,2);return e[0],e[1]})).find((function(e){return e.el==t}))})),v=0;v=m?q(m)[this.directionAxis]:-this.instance.scroll[this.directionAxis],s="horizontal"===this.direction?d+s-v:h+s-v}else s=t+s;var y=parseFloat(this.instance.delta[this.directionAxis]),b=Math.max(0,Math.min(s,this.instance.limit[this.directionAxis])),w=b-y,g=function(t){l?"horizontal"===e.direction?e.setScroll(y+w*t,e.instance.delta.y):e.setScroll(e.instance.delta.x,y+w*t):e.instance.delta[e.directionAxis]=y+w*t};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var x=Date.now(),S=function t(){var i=(Date.now()-x)/n;i>1?(g(1),e.animatingScroll=!1,0==n&&e.update(),r&&r()):(e.scrollToRaf=requestAnimationFrame(t),g(o(i)))};S()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,i){this.instance=e(e({},this.instance),{},{scroll:{x:t,y:i},delta:{x:t,y:i},speed:0})}},{key:"destroy",value:function(){u(r(o.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),o}(b);return function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.options=e,Object.assign(this,y,e),this.smartphone=y.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=y.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return n(t,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||window.innerWidth=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new ct(this.options):this.scroll=new S(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),t}()})); \ No newline at end of file diff --git a/docs/dist/scripts/main.js b/docs/dist/scripts/main.js index 0fd36d55..6e6a1069 100644 --- a/docs/dist/scripts/main.js +++ b/docs/dist/scripts/main.js @@ -1 +1 @@ -!function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,s=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),Object.assign(this,y,i),this.smartphone=y.smartphone,i.smartphone&&Object.assign(this.smartphone,i.smartphone),this.tablet=y.tablet,i.tablet&&Object.assign(this.tablet,i.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return i(e,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame((function(){t.resize(),t.resizeTick=!1})))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||this.windowWidth=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context)("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach((function(e){e.addEventListener("click",t.setScrollTo,!1)}))}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,i=this.instance.scroll.y,s=i+this.windowHeight,n=this.instance.scroll.x,o=n+this.windowWidth;Object.entries(this.els).forEach((function(l){var r=f(l,2),a=r[0],c=r[1];if(!c||c.inView&&!t||("horizontal"===e.direction?o>=c.left&&n=c.top&&ic.right)&&e.setOutOfView(c,a)}else{var d=c.bottom-c.top;c.progress=(e.instance.scroll.y-(c.top-e.windowHeight))/(d+e.windowHeight),(sc.bottom)&&e.setOutOfView(c,a)}})),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach((function(t){t===e&&delete i.currentElements[t]})),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map((function(t){return t.trim()})),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),1===i.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var i=this.listeners[t],s=i.indexOf(e);s<0||(i.splice(s,1),0===i.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),s=this.listeners[i];s&&0!==s.length&&s.forEach((function(t){switch(i){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}}))}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach((function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)})),this.listeners={},this.scrollToEls.forEach((function(e){e.removeEventListener("click",t.setScrollTo,!1)})),this.html.classList.remove(this.initClass)}}]),e}(),b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(t,e){return t(e={exports:{}},e.exports),e.exports}var x=w((function(t,e){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var i,s=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||r,scrollIntoView:s.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,l=(i=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?p.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},s.prototype.scroll=s.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==a(arguments[0])){var t=arguments[0].left,e=arguments[0].top;p.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},s.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},s.prototype.scrollIntoView=function(){if(!0!==a(arguments[0])){var i=u(this),s=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==e.body?(p.call(this,i,i.scrollLeft+o.left-s.left,i.scrollTop+o.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function r(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(t,e){return"Y"===e?t.clientHeight+l1?1:r,i=.5*(1-Math.cos(Math.PI*l)),s=e.startX+(e.x-e.startX)*i,n=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,s,n),s===e.x&&n===e.y||t.requestAnimationFrame(f.bind(t,e))}function p(i,s,l){var a,c,h,d,u=o();i===e.body?(a=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=n.scroll):(a=i,c=i.scrollLeft,h=i.scrollTop,d=r),f({scrollable:a,method:d,startTime:u,startX:c,startY:h,x:s,y:l})}}}})),S=(x.polyfill,function(e){l(n,e);var s=d(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,n),(e=s.call(this,i)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",e.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=x,window.smoothscrollPolyfill.polyfill()),e}return i(n,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),u(r(n.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;u(r(n.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame((function(){t.detectElements()})),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset1&&void 0!==arguments[1]?arguments[1]:{},i=parseInt(e.offset)||0,s=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");i="number"!=typeof t?t.getBoundingClientRect().top+i+this.instance.scroll.y:t+i;var n=function(){return parseInt(window.pageYOffset)===parseInt(i)};if(s){if(n())return void s();var o=function t(){n()&&(window.removeEventListener("scroll",t),s())};window.addEventListener("scroll",o)}window.scrollTo({top:i,behavior:"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){u(r(n.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),n}(g)),k=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function A(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var O=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(t){s[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,s,n=A(t),o=1;o=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.lastDownDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.deltasTimestamp=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this)}return t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,i,s,n,o,l,r;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(s=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),r=s.reduce((function(t,e){return t+e})),o=i.reduce((function(t,e){return t+e})),l=r/s.length,n=o/i.length,Math.abs(l)1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1},j=Object.prototype.toString,_=Object.prototype.hasOwnProperty;function B(t,e){return function(){return t.apply(e,arguments)}}var W=L.Lethargy,H="virtualscroll",R=V,P=37,Y=38,I=39,z=40,X=32;function V(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var i in t)_.call(t,i)&&"function"==typeof t[i]&&"[object Function]"==j.call(t[i])&&e.push(i);for(var s=0;s=.001?function(t,e,i,s){for(var n=0;n<4;++n){var o=Q(e,i,s);if(0===o)return e;e-=(J(e,i,s)-t)/o}return e}(e,l,t,i):0===r?l:function(t,e,i,s,n){var o,l,r=0;do{(o=J(l=e+(i-e)/2,s,n)-t)>0?i=l:e=l}while(Math.abs(o)>1e-7&&++r<10);return l}(e,s,s+.1,t,i)}return function(t){return 0===t?0:1===t?1:J(l(t),e,s)}},et=38,it=40,st=32,nt=9,ot=33,lt=34,rt=36,at=35,ct=function(e){l(n,e);var s=d(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,n),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(e=s.call(this,i)).inertia&&(e.lerp=.1*e.inertia),e.isScrolling=!1,e.isDraggingScrollbar=!1,e.isTicking=!1,e.hasScrollTicking=!1,e.parallaxElements={},e.stop=!1,e.scrollbarContainer=i.scrollbarContainer,e.checkKey=e.checkKey.bind(c(e)),window.addEventListener("keydown",e.checkKey,!1),e}return i(n,[{key:"init",value:function(){var t=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=o({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new R({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on((function(e){t.stop||t.isDraggingScrollbar||requestAnimationFrame((function(){t.updateDelta(e),t.isScrolling||t.startScrolling()}))})),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),u(r(n.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){for(var t=0,e=this.el.children,i=0;ithis.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"checkScroll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame((function(){return t.checkScroll()})),this.hasScrollTicking=!0),this.updateScroll();var i=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),s=Date.now()-this.startScrollTs;if(!this.animatingScroll&&s>100&&(i<.5&&0!=this.instance.delta[this.directionAxis]||i<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach((function(i){var s=f(i,2),n=(s[0],s[1]);n.persistent||t.instance.scroll[t.directionAxis]>n.offset[t.directionAxis]&&t.instance.scroll[t.directionAxis]this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=F(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.ythis.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x0&&s0&&i1&&void 0!==arguments[1]&&arguments[1],s=this.instance.scroll.x+this.windowWidth,n=this.instance.scroll.y+this.windowHeight,o={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach((function(l){var r=f(l,2),a=(r[0],r[1]),c=!1;if(t&&(c=0),a.inView||i)switch(a.position){case"top":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementTop":c=(n-a.top)*-a.speed;break;case"bottom":c=(e.instance.limit[e.directionAxis]-n+e.windowHeight)*a.speed;break;case"left":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementLeft":c=(s-a.left)*-a.speed;break;case"right":c=(e.instance.limit[e.directionAxis]-s+e.windowHeight)*a.speed;break;default:c=(o[e.directionAxis]-a.middle[e.directionAxis])*-a.speed}a.sticky&&(c=a.inView?"horizontal"===e.direction?e.instance.scroll.x-a.left+window.innerWidth:e.instance.scroll.y-a.top+window.innerHeight:"horizontal"===e.direction?e.instance.scroll.xa.right&&e.instance.scroll.x>a.right+100&&a.right-a.left+window.innerWidth:e.instance.scroll.ya.bottom&&e.instance.scroll.y>a.bottom+100&&a.bottom-a.top+window.innerHeight),!1!==c&&("horizontal"===a.direction||"horizontal"===e.direction&&"vertical"!==a.direction?e.transform(a.el,c,0,!t&&a.delay):e.transform(a.el,0,c,!t&&a.delay))}))}},{key:"scrollTo",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=parseInt(i.offset)||0,n=isNaN(parseInt(i.duration))?1e3:parseInt(i.duration),o=i.easing||[.25,0,.35,1],l=!!i.disableLerp,r=!!i.callback&&i.callback;if(o=tt.apply(void 0,p(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){var a=K(t).includes(this.el);if(!a)return;var c=t.getBoundingClientRect(),h=c.top,d=c.left,u=K(t),m=u.find((function(t){return Object.entries(e.sections).map((function(t){var e=f(t,2);e[0];return e[1]})).find((function(e){return e.el==t}))})),v=0;v=m?q(m)[this.directionAxis]:-this.instance.scroll[this.directionAxis],s="horizontal"===this.direction?d+s-v:h+s-v}else s=t+s;var y=parseFloat(this.instance.delta[this.directionAxis]),g=Math.max(0,Math.min(s,this.instance.limit[this.directionAxis])),b=g-y,w=function(t){l?"horizontal"===e.direction?e.setScroll(y+b*t,e.instance.delta.y):e.setScroll(e.instance.delta.x,y+b*t):e.instance.delta[e.directionAxis]=y+b*t};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var x=Date.now(),S=function t(){var i=(Date.now()-x)/n;i>1?(w(1),e.animatingScroll=!1,0==n&&e.update(),r&&r()):(e.scrollToRaf=requestAnimationFrame(t),w(o(i)))};S()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance=o(o({},this.instance),{},{scroll:{x:t,y:e},delta:{x:t,y:e},speed:0})}},{key:"destroy",value:function(){u(r(n.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),n}(g),ht=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.options=i,Object.assign(this,y,i),this.smartphone=y.smartphone,i.smartphone&&Object.assign(this.smartphone,i.smartphone),this.tablet=y.tablet,i.tablet&&Object.assign(this.tablet,i.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return i(e,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||window.innerWidth=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new ct(this.options):this.scroll=new S(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),e}();!function(){document.documentElement.classList.add("is-loaded"),document.documentElement.classList.remove("is-loading"),setTimeout((function(){document.documentElement.classList.add("is-ready")}),300);var t={el:document.querySelector("#js-scroll"),smooth:!0,getSpeed:!0,getDirection:!0};"true"==document.querySelector("#js-scroll").getAttribute("data-horizontal")&&(t.direction="horizontal",t.gestureDirection="both",t.tablet={smooth:!0,direction:"horizontal",horizontalGesture:!0},t.smartphone={smooth:!1},t.reloadOnContextChange=!0),setTimeout((function(){var e=new ht(t),i=[],s=[];e.on("scroll",(function(t){var n=360*t.scroll.y/t.limit.y;e.el.style.backgroundColor="hsl(".concat(n,", 11%, 81%)"),i.forEach((function(t){t.el.style.backgroundColor="hsl(".concat(n,", 11%, 81%)")})),s.forEach((function(t){t.el.style.color="hsl(".concat(n,", 11%, 81%)")})),document.documentElement.setAttribute("data-direction",t.direction)})),e.on("call",(function(t,e,n){if("dynamicBackground"===t)if("enter"===e)i.push({id:n.id,el:n.el});else for(var o=0;ot.length)&&(e=t.length);for(var i=0,s=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),Object.assign(this,y,e),this.smartphone=y.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=y.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return n(t,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame((function(){t.resize(),t.resizeTick=!1})))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||this.windowWidth=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context)("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach((function(e){e.addEventListener("click",t.setScrollTo,!1)}))}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,i=this.instance.scroll.y,s=i+this.windowHeight,n=this.instance.scroll.x,o=n+this.windowWidth;Object.entries(this.els).forEach((function(l){var r=f(l,2),a=r[0],c=r[1];if(!c||c.inView&&!t||("horizontal"===e.direction?o>=c.left&&n=c.top&&ic.right)&&e.setOutOfView(c,a)}else{var d=c.bottom-c.top;c.progress=(e.instance.scroll.y-(c.top-e.windowHeight))/(d+e.windowHeight),(sc.bottom)&&e.setOutOfView(c,a)}})),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach((function(t){t===e&&delete i.currentElements[t]})),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map((function(t){return t.trim()})),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),1===i.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var i=this.listeners[t],s=i.indexOf(e);s<0||(i.splice(s,1),0===i.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),s=this.listeners[i];s&&0!==s.length&&s.forEach((function(t){switch(i){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}}))}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach((function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)})),this.listeners={},this.scrollToEls.forEach((function(e){e.removeEventListener("click",t.setScrollTo,!1)})),this.html.classList.remove(this.initClass)}}]),t}(),b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(t,e){return t(e={exports:{}},e.exports),e.exports}var x=w((function(t,e){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var i,s=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||r,scrollIntoView:s.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,l=(i=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?p.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},s.prototype.scroll=s.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==a(arguments[0])){var t=arguments[0].left,e=arguments[0].top;p.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},s.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},s.prototype.scrollIntoView=function(){if(!0!==a(arguments[0])){var i=u(this),s=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==e.body?(p.call(this,i,i.scrollLeft+o.left-s.left,i.scrollTop+o.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function r(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(t,e){return"Y"===e?t.clientHeight+l1?1:r,i=.5*(1-Math.cos(Math.PI*l)),s=e.startX+(e.x-e.startX)*i,n=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,s,n),s===e.x&&n===e.y||t.requestAnimationFrame(f.bind(t,e))}function p(i,s,l){var a,c,h,d,u=o();i===e.body?(a=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=n.scroll):(a=i,c=i.scrollLeft,h=i.scrollTop,d=r),f({scrollable:a,method:d,startTime:u,startX:c,startY:h,x:s,y:l})}}}}));x.polyfill;var S=function(t){l(s,t);var e=d(s);function s(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,s),(t=e.call(this,n)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",t.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=x,window.smoothscrollPolyfill.polyfill()),t}return n(s,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),u(r(s.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;u(r(s.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame((function(){t.detectElements()})),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset1&&void 0!==arguments[1]?arguments[1]:{},i=parseInt(e.offset)||0,s=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");i="number"!=typeof t?t.getBoundingClientRect().top+i+this.instance.scroll.y:t+i;var n=function(){return parseInt(window.pageYOffset)===parseInt(i)};if(s){if(n())return void s();var o=function t(){n()&&(window.removeEventListener("scroll",t),s())};window.addEventListener("scroll",o)}window.scrollTo({top:i,behavior:"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){u(r(s.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),s}(g),k=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function A(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var O=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(t){s[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,s,n=A(t),o=1;o=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.lastDownDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this),this.deltasTimestamp=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)i.push(null);return i}.call(this)}return t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,i,s,n,o,l,r;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(s=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),r=s.reduce((function(t,e){return t+e})),o=i.reduce((function(t,e){return t+e})),l=r/s.length,n=o/i.length,Math.abs(l)1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1},j=Object.prototype.toString,B=Object.prototype.hasOwnProperty;function _(t,e){return function(){return t.apply(e,arguments)}}var W=L.Lethargy,H="virtualscroll",R=V,P=37,Y=38,I=39,z=40,X=32;function V(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var i in t)B.call(t,i)&&"function"==typeof t[i]&&"[object Function]"==j.call(t[i])&&e.push(i);for(var s=0;s=.001?function(t,e,i,s){for(var n=0;n<4;++n){var o=Q(e,i,s);if(0===o)return e;e-=(J(e,i,s)-t)/o}return e}(e,l,t,i):0===r?l:function(t,e,i,s,n){var o,l,r=0;do{(o=J(l=e+(i-e)/2,s,n)-t)>0?i=l:e=l}while(Math.abs(o)>1e-7&&++r<10);return l}(e,s,s+.1,t,i)}return function(t){return 0===t?0:1===t?1:J(l(t),e,s)}},et=38,it=40,st=32,nt=9,ot=33,lt=34,rt=36,at=35,ct=function(t){l(o,t);var s=d(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,o),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(t=s.call(this,e)).inertia&&(t.lerp=.1*t.inertia),t.isScrolling=!1,t.isDraggingScrollbar=!1,t.isTicking=!1,t.hasScrollTicking=!1,t.parallaxElements={},t.stop=!1,t.scrollbarContainer=e.scrollbarContainer,t.checkKey=t.checkKey.bind(c(t)),window.addEventListener("keydown",t.checkKey,!1),t}return n(o,[{key:"init",value:function(){var t=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=e({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new R({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on((function(e){t.stop||t.isDraggingScrollbar||requestAnimationFrame((function(){t.updateDelta(e),t.isScrolling||t.startScrolling()}))})),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),u(r(o.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){var t=this.el.scrollWidth;this.instance.limit.x=t-this.windowWidth}}},{key:"startScrolling",value:function(){this.startScrollTs=Date.now(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"stopScrolling",value:function(){cancelAnimationFrame(this.checkScrollRaf),this.scrollToRaf&&(cancelAnimationFrame(this.scrollToRaf),this.scrollToRaf=null),this.isScrolling=!1,this.instance.scroll.y=Math.round(this.instance.scroll.y),this.html.classList.remove(this.scrollingClass)}},{key:"checkKey",value:function(t){var e=this;if(this.stop)t.keyCode==nt&&requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0}));else{switch(t.keyCode){case nt:requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0,e.scrollTo(document.activeElement,{offset:-window.innerHeight/2})}));break;case et:this.instance.delta[this.directionAxis]-=240;break;case it:this.instance.delta[this.directionAxis]+=240;break;case ot:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case lt:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case rt:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case at:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case st:document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||(t.shiftKey?this.instance.delta[this.directionAxis]-=window.innerHeight:this.instance.delta[this.directionAxis]+=window.innerHeight);break;default:return}this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"checkScroll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame((function(){return t.checkScroll()})),this.hasScrollTicking=!0),this.updateScroll();var i=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),s=Date.now()-this.startScrollTs;if(!this.animatingScroll&&s>100&&(i<.5&&0!=this.instance.delta[this.directionAxis]||i<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach((function(i){var s=f(i,2);s[0];var n=s[1];n.persistent||t.instance.scroll[t.directionAxis]>n.offset[t.directionAxis]&&t.instance.scroll[t.directionAxis]this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=F(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.ythis.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x0&&s0&&i1&&void 0!==arguments[1]&&arguments[1],s=this.instance.scroll.x+this.windowWidth,n=this.instance.scroll.y+this.windowHeight,o={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach((function(l){var r=f(l,2);r[0];var a=r[1],c=!1;if(t&&(c=0),a.inView||i)switch(a.position){case"top":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementTop":c=(n-a.top)*-a.speed;break;case"bottom":c=(e.instance.limit[e.directionAxis]-n+e.windowHeight)*a.speed;break;case"left":c=e.instance.scroll[e.directionAxis]*-a.speed;break;case"elementLeft":c=(s-a.left)*-a.speed;break;case"right":c=(e.instance.limit[e.directionAxis]-s+e.windowHeight)*a.speed;break;default:c=(o[e.directionAxis]-a.middle[e.directionAxis])*-a.speed}a.sticky&&(c=a.inView?"horizontal"===e.direction?e.instance.scroll.x-a.left+window.innerWidth:e.instance.scroll.y-a.top+window.innerHeight:"horizontal"===e.direction?e.instance.scroll.xa.right&&e.instance.scroll.x>a.right+100&&a.right-a.left+window.innerWidth:e.instance.scroll.ya.bottom&&e.instance.scroll.y>a.bottom+100&&a.bottom-a.top+window.innerHeight),!1!==c&&("horizontal"===a.direction||"horizontal"===e.direction&&"vertical"!==a.direction?e.transform(a.el,c,0,!t&&a.delay):e.transform(a.el,0,c,!t&&a.delay))}))}},{key:"scrollTo",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=parseInt(i.offset)||0,n=isNaN(parseInt(i.duration))?1e3:parseInt(i.duration),o=i.easing||[.25,0,.35,1],l=!!i.disableLerp,r=!!i.callback&&i.callback;if(o=tt.apply(void 0,p(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){var a=K(t).includes(this.el);if(!a)return;var c=t.getBoundingClientRect(),h=c.top,d=c.left,u=K(t),m=u.find((function(t){return Object.entries(e.sections).map((function(t){var e=f(t,2);return e[0],e[1]})).find((function(e){return e.el==t}))})),v=0;v=m?q(m)[this.directionAxis]:-this.instance.scroll[this.directionAxis],s="horizontal"===this.direction?d+s-v:h+s-v}else s=t+s;var y=parseFloat(this.instance.delta[this.directionAxis]),g=Math.max(0,Math.min(s,this.instance.limit[this.directionAxis])),b=g-y,w=function(t){l?"horizontal"===e.direction?e.setScroll(y+b*t,e.instance.delta.y):e.setScroll(e.instance.delta.x,y+b*t):e.instance.delta[e.directionAxis]=y+b*t};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var x=Date.now(),S=function t(){var i=(Date.now()-x)/n;i>1?(w(1),e.animatingScroll=!1,0==n&&e.update(),r&&r()):(e.scrollToRaf=requestAnimationFrame(t),w(o(i)))};S()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,i){this.instance=e(e({},this.instance),{},{scroll:{x:t,y:i},delta:{x:t,y:i},speed:0})}},{key:"destroy",value:function(){u(r(o.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),o}(g),ht=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.options=e,Object.assign(this,y,e),this.smartphone=y.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=y.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return n(t,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||window.innerWidth=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new ct(this.options):this.scroll=new S(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),t}();!function(){document.documentElement.classList.add("is-loaded"),document.documentElement.classList.remove("is-loading"),setTimeout((function(){document.documentElement.classList.add("is-ready")}),300);var t={el:document.querySelector("#js-scroll"),smooth:!0,getSpeed:!0,getDirection:!0};"true"==document.querySelector("#js-scroll").getAttribute("data-horizontal")&&(t.direction="horizontal",t.gestureDirection="both",t.tablet={smooth:!0,direction:"horizontal",horizontalGesture:!0},t.smartphone={smooth:!1},t.reloadOnContextChange=!0),setTimeout((function(){var e=new ht(t),i=[],s=[];e.on("scroll",(function(t){var n=360*t.scroll.y/t.limit.y;e.el.style.backgroundColor="hsl(".concat(n,", 11%, 81%)"),i.forEach((function(t){t.el.style.backgroundColor="hsl(".concat(n,", 11%, 81%)")})),s.forEach((function(t){t.el.style.color="hsl(".concat(n,", 11%, 81%)")})),document.documentElement.setAttribute("data-direction",t.direction)})),e.on("call",(function(t,e,n){if("dynamicBackground"===t)if("enter"===e)i.push({id:n.id,el:n.el});else for(var o=0;oabbr[title]{text-decoration:none}table{border-spacing:0;border-collapse:collapse}hr{display:block;margin:1em 0;padding:0;height:1px;border:0;border-top:1px solid #272727}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio:not([controls]){display:none;height:0}img,svg{max-width:100%;height:auto}img[height],img[width],svg[height],svg[width]{max-width:none}img{font-style:italic}svg{fill:currentColor}input,select,textarea{display:block;margin:0;padding:0;width:100%;outline:0;border:0;border-radius:0;background:none transparent;color:inherit;font:inherit;line-height:normal;-webkit-appearance:none;-moz-appearance:none;appearance:none}select{text-transform:none}select::-ms-expand{display:none}select::-ms-value{background:none;color:inherit}textarea{overflow:auto;resize:vertical}.o-button,button{display:inline-block;overflow:visible;margin:0;padding:0;outline:0;border:0;background:none transparent;color:inherit;vertical-align:middle;text-align:center;text-transform:none;font:inherit;line-height:normal;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.o-button,.o-button:focus,.o-button:hover,button,button:focus,button:hover{text-decoration:none}@font-face{font-family:Neue Montreal;src:url(../fonts/NeueMontreal-Medium.woff2) format("woff2"),url(../fonts/NeueMontreal-Medium.woff) format("woff");font-weight:500;font-style:normal}html{color:#222;font-family:Neue Montreal;line-height:1.5}@media (max-width:699px){html{font-size:12px}}@media (min-width:700px) and (max-width:999px){html{font-size:13px}}@media (min-width:1000px) and (max-width:1199px){html{font-size:14px}}@media (min-width:1200px) and (max-width:1599px){html{font-size:16px}}@media (min-width:1600px) and (max-width:1999px){html{font-size:18px}}@media (min-width:2000px) and (max-width:2399px){html{font-size:21px}}@media (min-width:2400px){html{font-size:24px}}html:not(.has-scroll-init){cursor:wait;overflow:hidden}::-moz-selection{background-color:#272727;color:#fff;text-shadow:none}::selection{background-color:#272727;color:#fff;text-shadow:none}a{transition:color .3s cubic-bezier(.215,.61,.355,1);color:#272727}@media (min-width:1200px){a:focus,a:hover{color:#fff}}a.-underline{text-decoration:underline}.o-h,.o-h1,.o-h2,.o-h3,.o-h4,.o-h5,.o-h6,h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.5;margin-bottom:0;line-height:1;font-weight:400}.o-h1,h1{line-height:.9;text-transform:uppercase}@media (max-width:699px){.o-h1,h1{font-size:12vw}}@media (min-width:700px) and (max-width:1599px){.o-h1,h1{font-size:13.5vw}.o-h1.-huge,h1.-huge{font-size:36vh}}@media (min-width:1600px){.o-h1,h1{font-size:12vw}}.o-h2,h2{font-size:2rem}.o-h3,h3{font-size:1.5rem}.o-h4,h4{line-height:1.2}.o-h4,.o-h5,h4,h5{font-size:1rem}.o-h6,h6{font-size:.9375rem}.o-container{margin-right:auto;margin-left:auto;max-width:95rem}@media (max-width:699px){.o-container{padding-right:20px;padding-left:20px}}@media (min-width:700px){.o-container{padding-right:2.5rem;padding-left:2.5rem}}.o-ratio{position:relative;display:block;overflow:hidden}.o-ratio:before{display:block;padding-bottom:100%;width:100%;content:""}.o-ratio>embed,.o-ratio>iframe,.o-ratio>img,.o-ratio>object,.o-ratio_content{position:absolute;top:0;bottom:0;left:0;width:100%}.o-layout{padding:0;list-style:none;font-size:0;margin:0}.o-layout.-gutter{margin-left:-3.75rem}.o-layout.-gutter-small{margin-left:-1.875rem}.o-layout.-center{text-align:center}.o-layout.-right{text-align:right}.o-layout.-reverse{direction:rtl}.o-layout.-reverse.-flex{flex-direction:row-reverse}.o-layout.-flex{display:flex}.o-layout.-flex.-top{align-items:flex-start}.o-layout.-flex.-middle{align-items:center}.o-layout.-flex.-bottom{align-items:flex-end}.o-layout.-stretch{align-items:stretch}.o-layout_item{display:inline-block;width:100%;vertical-align:top;font-size:1rem;padding-left:0}.o-layout.-gutter>.o-layout_item{padding-left:3.75rem}.o-layout.-gutter-small>.o-layout_item{padding-left:1.875rem}.o-layout.-middle>.o-layout_item{vertical-align:middle}.o-layout.-bottom>.o-layout_item{vertical-align:bottom}.o-layout.-center>.o-layout_item,.o-layout.-reverse>.o-layout_item,.o-layout.-right>.o-layout_item{text-align:left}.o-layout.-reverse>.o-layout_item{direction:ltr}.o-checkbox-label,.o-label,.o-radio-label{display:block;margin-bottom:.9375rem}.o-input,.o-select,.o-textarea{padding:.625rem;border:1px solid #d3d3d3;background-color:#fff}.o-input:focus,.o-select:focus,.o-textarea:focus{border-color:grey}.o-input::-moz-placeholder,.o-select::-moz-placeholder,.o-textarea::-moz-placeholder{color:grey}.o-input:-ms-input-placeholder,.o-select:-ms-input-placeholder,.o-textarea:-ms-input-placeholder{color:grey}.o-input::placeholder,.o-select::placeholder,.o-textarea::placeholder{color:grey}.o-checkbox,.o-radio{position:absolute;width:0;opacity:0}.o-checkbox:focus+.o-checkbox-label:before,.o-checkbox:focus+.o-radio-label:before,.o-radio:focus+.o-checkbox-label:before,.o-radio:focus+.o-radio-label:before{border-color:grey}.o-checkbox:checked+.o-checkbox-label:after,.o-checkbox:checked+.o-radio-label:after,.o-radio:checked+.o-checkbox-label:after,.o-radio:checked+.o-radio-label:after{opacity:1}.o-checkbox-label,.o-radio-label{position:relative;display:inline-block;margin-right:.5em;padding-left:1.75rem}.o-checkbox-label:after,.o-checkbox-label:before,.o-radio-label:after,.o-radio-label:before{position:absolute;top:50%;left:0;display:inline-block;margin-top:-.5625rem;padding:0;width:1.125rem;height:1.125rem;content:""}.o-checkbox-label:before,.o-radio-label:before{background-color:#fff}.o-checkbox-label:after,.o-radio-label:after{border-color:transparent;background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10.5'%3E%3Cpath fill='%23424242' d='M4.8 5.8L2.4 3.3 0 5.7l4.8 4.8L13 2.4 10.6 0 4.8 5.8z'/%3E%3C/svg%3E");background-position:50%;background-size:.8125rem;background-repeat:no-repeat;opacity:0}.o-radio-label:after,.o-radio-label:before{border-radius:50%}.o-radio-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Ccircle fill='%23424242' cx='6.5' cy='6.5' r='6.5'/%3E%3C/svg%3E");background-size:.5rem}.o-select{z-index:1;padding-right:2.5rem}.o-select,.o-select-wrap{position:relative}.o-select-wrap:after{position:absolute;top:0;right:0;bottom:0;z-index:2;width:2.5rem;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='11.3'%3E%3Cpath fill='%23424242' d='M6.5 11.3L3.3 5.6 0 0h13L9.8 5.6z'/%3E%3C/svg%3E");background-position:50%;background-size:.625rem;background-repeat:no-repeat;content:"";pointer-events:none}.o-textarea{min-height:6.25rem}.o-button{position:relative;z-index:1;color:#fff;padding:2rem 2.1875rem;font-size:1.5rem;background-color:#272727;transition:color .3s cubic-bezier(.215,.61,.355,1);width:100%;text-align:left}.o-button:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;transform:scaleY(0);transform-origin:center top;background-color:#fff;transition:transform .3s cubic-bezier(.215,.61,.355,1)}.o-button:focus,.o-button:hover{color:#272727}.o-button:focus:before,.o-button:hover:before{transform:scaleY(1);transform-origin:center bottom}.o-button_icon{display:inline-block;vertical-align:middle;width:3.4375rem;height:3.4375rem;margin-right:.9375rem}.o-button_icon svg{display:block;width:100%;height:100%}.o-button_arrow{position:absolute;top:50%;right:2.1875rem;transform:translateY(-50%)}.o-scroll{background-color:#d4c9c9;overflow:hidden}.o-title{margin:0;padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.o-title_line{display:block;opacity:0;transform-origin:center top;transform-style:preserve-3d;transform:translateY(100%) rotateX(-80deg);transition:opacity .8s cubic-bezier(.215,.61,.355,1),transform .8s cubic-bezier(.215,.61,.355,1);font-size:0}.o-title.is-inview .o-title_line{transform:none;opacity:1}.o-title.is-inview .o-title_line:first-child{transition-delay:.4s}.o-title.is-inview .o-title_line:nth-child(2){transition-delay:.5s}.o-title.is-inview .o-title_line:nth-child(3){transition-delay:.6s}.o-title.is-inview .o-title_line:nth-child(4){transition-delay:.7s}.o-title_line span{display:inline-block;min-width:.05em;font-size:13.5vw}.o-image_wrapper{position:relative;overflow:hidden;background-color:#d4c9c9}.o-image_wrapper.-full{height:100%;margin:0 6.25rem;display:flex;align-content:center}@media (max-width:699px){.o-image_wrapper.-full{margin:1.875rem 0}}.o-image{opacity:.75;mix-blend-mode:multiply}.o-image img{width:100%;opacity:0;transform:scale(1.4);transition:opacity 1.2s cubic-bezier(.215,.61,.355,1),transform 1.2s cubic-bezier(.215,.61,.355,1)}.o-image.is-inview img{opacity:1;transform:scale(1);transition-delay:.6s}.o-image_wrapper.-full .o-image{align-self:center}html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}.has-scroll-smooth [data-scroll-container]{min-height:100vh}[data-scroll-direction=horizontal] [data-scroll-container]{height:100vh;display:inline-block;white-space:nowrap}[data-scroll-direction=horizontal] [data-scroll-section]{display:inline-block;vertical-align:top;white-space:nowrap;height:100%}.c-scrollbar{position:absolute;right:0;top:0;width:11px;height:100%;transform-origin:center right;transition:transform .3s,opacity .3s;opacity:0}.c-scrollbar:hover{transform:scaleX(1.45)}.c-scrollbar:hover,.has-scroll-dragging .c-scrollbar,.has-scroll-scrolling .c-scrollbar{opacity:1}[data-scroll-direction=horizontal] .c-scrollbar{width:100%;height:10px;top:auto;bottom:0;transform:scaleY(1)}[data-scroll-direction=horizontal] .c-scrollbar:hover{transform:scaleY(1.3)}.c-scrollbar_thumb{position:absolute;top:0;right:0;background-color:#000;opacity:.5;width:7px;border-radius:10px;margin:2px;cursor:-webkit-grab;cursor:grab}.has-scroll-dragging .c-scrollbar_thumb{cursor:-webkit-grabbing;cursor:grabbing}[data-scroll-direction=horizontal] .c-scrollbar_thumb{right:auto;bottom:0}.c-header{position:relative}@media (max-width:699px){.c-header{height:50vh;min-height:340px}}@media (min-width:700px) and (max-width:999px){.c-header{height:80vh;min-height:380px}}@media (min-width:1000px){.c-header{height:100vh;min-height:46.875rem}}.c-header_title{padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.c-header_line,.c-header_title{position:absolute;bottom:0;left:0;margin:0}.c-header_line{right:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-header_line.is-inview{transform:scaleX(1)}.c-header_title_line{display:block;opacity:0;transform-origin:center top;transform-style:preserve-3d;transform:translateY(100%) rotateX(-80deg);transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1)}html.is-ready .c-header_title_line{transform:none;opacity:1;transition-duration:.8s}html.is-ready .c-header_title_line:first-child{transition-delay:.1s}html.is-ready .c-header_title_line:nth-child(2){transition-delay:.2s}html.is-ready .c-header_title_line:nth-child(3){transition-delay:.3s}html.is-ready .c-header_title_line:nth-child(4){transition-delay:.4s}.c-header_title_line span{display:inline-block}.c-header_title_line.-version{text-transform:none;font-size:0}.c-header_heading{padding:1.875rem 0}.c-header_heading_label{display:block;transition:transform 0s cubic-bezier(.215,.61,.355,1);transform:translateY(-60px)}html.is-ready .c-header_heading_label{transform:none;transition-duration:.6s}html.is-ready .o-layout_item:nth-child(2) .c-header_heading_label{transition-delay:.1s}.c-header_logo{position:absolute;bottom:2.5rem;right:0;opacity:0;transform:translateY(120px);transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1)}@media (max-width:699px){.c-header_logo{width:30px;height:66px}}@media (min-width:700px){.c-header_logo{width:4rem;height:8.75rem}}.c-header_logo svg{display:block;width:100%;height:100%}html.is-ready .c-header_logo{transform:none;opacity:1;transition-delay:.6s;transition-duration:.6s}.c-fixed_wrapper{position:relative;overflow:hidden;background-color:#d4c9c9}@media (min-width:1000px){.c-fixed_wrapper{height:100vh}}@media (max-width:999px){.c-fixed_wrapper{height:50vh}}.c-fixed_target{bottom:-100vh}.c-fixed,.c-fixed_target{position:absolute;top:-100vh;right:0;left:0}.c-fixed{height:100%;background-size:cover;background-position:50%;opacity:.75;mix-blend-mode:multiply}html:not(.has-scroll-smooth) .c-fixed{top:0}.c-intro{margin:7.5rem 0;font-size:2.1875rem;line-height:1.2;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-intro.is-inview{opacity:1;transform:none;transition-delay:.3s}.c-features{padding:7.5rem 0}.c-features_item{background-color:rgba(0,0,0,.1);border-radius:20px;padding:3.75rem;margin-bottom:3.75rem}.c-summary{margin:3.75rem 0 7.5rem}.c-summary_text{font-size:1.125rem;font-weight:600;opacity:0;transform:translateY(60px);transition:transform 1s cubic-bezier(.215,.61,.355,1)}.c-summary.is-inview .c-summary_text{opacity:1;transform:none}@media (min-width:1000px){.c-summary_text{max-width:320px}}@media (max-width:999px){.c-summary_list{margin-top:1.875rem}}.c-summary_list_item{position:relative;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item:after{content:"";position:absolute;bottom:0;right:0;left:0;height:1px;background-color:#272727;transform:scaleX(0);transform-origin:center left;transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview{transform:none;opacity:1}.c-summary_list_item.is-inview:after{transform:scaleX(1)}.c-summary_list_item.is-inview:first-child{transition-delay:.1s}.c-summary_list_item.is-inview:first-child:after{transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(2){transition-delay:.2s}.c-summary_list_item.is-inview:nth-child(2):after{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(3){transition-delay:.3s}.c-summary_list_item.is-inview:nth-child(3):after{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(4){transition-delay:.4s}.c-summary_list_item.is-inview:nth-child(4):after{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(5){transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(5):after{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(6){transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(6):after{transition-delay:1s}.c-summary_list_item a{display:block;padding:8px 0}.c-summary_list_icon{position:absolute;top:50%;right:0;transform:translateY(-50%) translateX(30px) rotate(90deg);opacity:0;transition:opacity .4s cubic-bezier(.215,.61,.355,1),transform .4s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview .c-summary_list_icon{transform:translateY(-50%) rotate(0deg);opacity:1}.c-summary_list_item.is-inview:first-child .c-summary_list_icon{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(2) .c-summary_list_icon{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(3) .c-summary_list_icon{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(4) .c-summary_list_icon{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(5) .c-summary_list_icon{transition-delay:1s}.c-summary_list_item.is-inview:nth-child(6) .c-summary_list_icon{transition-delay:1.1s}.c-section{position:relative}@media (max-width:1199px){.c-section{padding-bottom:10vh;margin-bottom:10vh}}@media (min-width:1200px){.c-section{margin-bottom:35vh}}.c-section_infos{position:relative;max-width:320px;z-index:0}@media (min-width:1000px){.c-section_infos{padding-top:7.5rem}.c-section_infos.-padding{padding-top:35vh}}@media (max-width:999px){.c-section_infos{margin-bottom:1.875rem}}.c-section_infos_inner>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-section_infos_inner.is-inview>*{opacity:1;transform:none}.c-section_infos_inner.is-inview>:first-child{transition-delay:.06s}.c-section_infos_inner.is-inview>:nth-child(2){transition-delay:.12s}.c-section_infos_inner.is-inview>:nth-child(3){transition-delay:.18s}.c-sections_infos_text{margin-top:1.25rem}.c-image{opacity:0;transition:opacity .6s cubic-bezier(.215,.61,.355,1)}.c-image.is-inview{opacity:1;transition-delay:.6s}.c-speed-block{position:relative}@media (min-width:1000px){.c-speed-block.-margin{margin-top:7.5rem}}@media (max-width:999px){.c-speed-block{margin:1.875rem 0}}@media (max-width:699px){.c-speed-block{margin:15px 0}}.c-speed-block_image{margin-top:-30px;margin-bottom:-30px}.c-speed-block_title{font-size:1.5rem;text-transform:uppercase;font-weight:600;color:#fff;text-align:center;position:absolute;bottom:3.75rem;right:0;left:0;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-speed-block_title.is-inview{opacity:1;transform:none;transition-delay:.3s}@media (max-width:1199px){.c-speed-block_title{display:none}}.c-speed-block_bubble{position:absolute;right:20px;top:30%;z-index:1;color:#d4c9c9;padding:1.5rem 2.5rem;font-size:1.25rem}.c-speed-block_bubble.-right{right:-30px}.c-speed-block_bubble.-left{right:auto;left:-30px}.c-speed-block_bubble.-top{top:-20%}.c-speed-block_bubble.-bottom{top:auto;bottom:0}.c-speed-block_bubble:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;background-color:#272727;border-radius:50%;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33)}.c-speed-block_bubble.is-inview:before{transform:scale(1);transition-delay:.3s}@media (max-width:1199px){.c-speed-block_bubble{display:none}}.c-direction-block_wrapper{margin-bottom:31.25rem}@media (min-width:1200px){.c-direction-block_wrapper{min-height:180vh}}@media (min-width:1000px) and (max-width:1199px){.c-direction-block_wrapper{min-height:130vh}}@media (min-width:700px) and (max-width:999px){.c-direction-block_wrapper{min-height:100vh}}@media (max-width:699px){.c-direction-block_wrapper{min-height:70vh}}@media (min-width:1000px){.c-direction-block_wrapper{margin-top:-35vh}}.c-direction-block{position:absolute;right:0;left:0;z-index:1}@media (min-width:1200px){.c-direction-block{top:-50vh;bottom:-50vh}}@media (min-width:700px) and (max-width:1199px){.c-direction-block{top:-30vh;bottom:-50vh}}@media (max-width:699px){.c-direction-block{top:-15vh;bottom:0}}@media (min-width:1000px) and (max-width:1199px){.c-direction-block{margin-top:6.25rem}}@media (min-width:1200px){.c-direction-block{margin-top:18.75rem}}.c-direction-block_item{position:absolute;font-size:10vw;white-space:nowrap;font-weight:600;text-transform:uppercase;line-height:1}.c-direction-block_item span{display:block;background-color:#fff;white-space:nowrap;padding:0 20px}.c-direction-block_item.-one{top:33%;transform:translateX(-50vw) rotate(26deg)}.c-direction-block_item.-two{top:45%}.c-direction-block_item.-three{top:55%;transform:rotate(9deg)}.c-direction-block_item.-four{top:68%;transform:translateX(-50vw) rotate(-19deg)}.c-direction-block_item.-five{top:63%;transform:translateX(-10vw) rotate(3deg)}.c-lerp-block{font-weight:700;text-transform:uppercase;margin-bottom:10rem}@media (min-width:1000px){.c-lerp-block:not(:first-child){margin-top:3.75rem}}@media (max-width:999px){.c-lerp-block{margin-top:1.875rem}}.c-lerp-block_index{vertical-align:middle;color:#d4c9c9;width:3.75rem;height:2.8125rem;display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem;position:relative;z-index:1}.c-lerp-block_index:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;background-color:#272727;border-radius:50%;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33)}.c-lerp-block_index.is-inview:before{transform:scale(1);transition-delay:.3s}.c-lerp-block_title{display:inline-block;vertical-align:middle;font-size:0;margin-left:1.25rem;line-height:1.1}.c-lerp-block_title.is-inview>span:not([data-scroll]){opacity:1;transform:none;transition-delay:.4s}.c-lerp-block_title>span:not([data-scroll]){opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-lerp-block_title span{display:inline-block;min-width:.3em}@media (max-width:699px){.c-lerp-block_title span{font-size:1.5625rem}}@media (min-width:700px){.c-lerp-block_title span{font-size:4.375rem}}.c-cta_line{margin:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_line.-margin{margin-bottom:30px}.c-cta_line.is-inview{transform:scaleX(1)}.c-cta_content{margin:3.75rem 0}.c-cta_content_text{max-width:520px}.c-cta_content_text>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_content_text>:not(:first-child){margin-top:1.875rem}.c-cta_content_text.is-inview>*{opacity:1;transform:none}.c-cta_content_text.is-inview>:first-child{transition-delay:.06s}.c-cta_content_text.is-inview>:nth-child(2){transition-delay:.12s}.c-cta_content_text.is-inview>:nth-child(3){transition-delay:.18s}.c-cta_button{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1);margin-top:5.625rem}.c-cta_button.is-inview{opacity:1;transform:none}.c-cta_section{margin-bottom:11.25rem}.c-choochoo_item{padding:50vh 0;font-size:6.25rem}.c-choochoo_item span{display:block}.c-choochoo_item.-reverse span,html[data-direction=up] .c-choochoo_item span{transform:rotateY(180deg)}html[data-direction=up] .c-choochoo_item.-reverse span{transform:rotateY(0deg)}@media (max-width:1199px){.c-choochoo_item{display:none}}@media (max-width:999px){.c-damn{padding:150vh 0 0}}@media (min-width:1000px){.c-damn{padding:100vh 0 0}}.c-helicopter_wrapper{height:100%;position:relative;display:flex}.c-helicopter{align-self:center}.u-2\:1:before{padding-bottom:50%}.u-4\:3:before{padding-bottom:75%}.u-16\:9:before{padding-bottom:56.25%}.u-1\/1{width:100%!important}.u-1\/2{width:50%!important}.u-2\/2{width:100%!important}.u-1\/3{width:33.33333%!important}.u-2\/3{width:66.66667%!important}.u-3\/3{width:100%!important}.u-1\/4{width:25%!important}.u-2\/4{width:50%!important}.u-3\/4{width:75%!important}.u-4\/4{width:100%!important}.u-1\/5{width:20%!important}.u-2\/5{width:40%!important}.u-3\/5{width:60%!important}.u-4\/5{width:80%!important}.u-5\/5{width:100%!important}@media (min-width:700px){.u-1\/2\@from-small{width:50%}}@media (min-width:1000px){.u-1\/3\@from-medium{width:33.33333%}}@media (min-width:1000px){.u-1\/2\@from-medium{width:50%}}@media (min-width:1000px){.u-2\/5\@from-medium{width:40%}}@media (min-width:1000px){.u-3\/5\@from-medium{width:60%}}.u-float-left{float:left!important}.u-float-right{float:right!important}.u-text-center{text-align:center!important}.u-text-left{text-align:left!important}.u-text-right{text-align:right!important}.u-align-baseline{vertical-align:baseline!important}.u-align-bottom{vertical-align:bottom!important}.u-align-middle{vertical-align:middle!important}.u-align-top{vertical-align:top!important}.u-vertical-center{font-size:0}.u-vertical-center:before{display:inline-block;height:100%;content:"";vertical-align:middle}.u-vertical-center>*{display:inline-block;vertical-align:middle;font-size:1rem}.u-white{color:#fff}.u-label{font-size:1.5rem;text-transform:uppercase;font-weight:600}.u-icon{font-family:Lucida Grande;font-size:1.125rem}.u-text{font-size:.875rem}.u-clearfix:after{display:block;clear:both;content:""}.u-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;max-width:100%}[hidden][aria-hidden=false]{position:absolute;display:inherit;clip:rect(0,0,0,0)}[hidden][aria-hidden=false]:focus{clip:auto}.u-screen-reader-text{position:absolute!important;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;width:1px;height:1px;border:0}@media not print{.u-screen-reader-text\@screen{position:absolute!important;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;width:1px;height:1px;border:0}}.u-screen-reader-text.-focusable:active,.u-screen-reader-text.-focusable:focus{clip:auto;width:auto;height:auto} \ No newline at end of file +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}html{box-sizing:border-box}[hidden],template{display:none}*,:after,:before{box-sizing:inherit}address{font-style:inherit}cite,dfn,em,i{font-style:italic}b,strong{font-weight:700}a{text-decoration:none}a svg{pointer-events:none}ol,ul{list-style:none}figure,ol,p,ul{margin:0;padding:0}[tabindex],a,area,button,input,label,select,textarea{touch-action:manipulation}[hreflang]>abbr[title]{text-decoration:none}table{border-collapse:collapse;border-spacing:0}hr{border:0;border-top:1px solid #272727;display:block;height:1px;margin:1em 0;padding:0}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio:not([controls]){display:none;height:0}img,svg{height:auto;max-width:100%}img[height],img[width],svg[height],svg[width]{max-width:none}img{font-style:italic}svg{fill:currentColor}input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none transparent;border:0;border-radius:0;color:inherit;display:block;font:inherit;line-height:normal;margin:0;outline:0;padding:0;width:100%}select{text-transform:none}select::-ms-expand{display:none}select::-ms-value{background:none;color:inherit}textarea{overflow:auto;resize:vertical}.o-button,button{background:none transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0;outline:0;overflow:visible;padding:0;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.o-button,.o-button:focus,.o-button:hover,button,button:focus,button:hover{text-decoration:none}@font-face{font-family:Neue Montreal;font-style:normal;font-weight:500;src:url(../fonts/NeueMontreal-Medium.woff2) format("woff2"),url(../fonts/NeueMontreal-Medium.woff) format("woff")}html{color:#222;font-family:Neue Montreal;line-height:1.5}@media (max-width:699px){html{font-size:12px}}@media (min-width:700px) and (max-width:999px){html{font-size:13px}}@media (min-width:1000px) and (max-width:1199px){html{font-size:14px}}@media (min-width:1200px) and (max-width:1599px){html{font-size:16px}}@media (min-width:1600px) and (max-width:1999px){html{font-size:18px}}@media (min-width:2000px) and (max-width:2399px){html{font-size:21px}}@media (min-width:2400px){html{font-size:24px}}html:not(.has-scroll-init){cursor:wait;overflow:hidden}::-moz-selection{background-color:#272727;color:#fff;text-shadow:none}::selection{background-color:#272727;color:#fff;text-shadow:none}a{color:#272727;transition:color .3s cubic-bezier(.215,.61,.355,1)}@media (min-width:1200px){a:focus,a:hover{color:#fff}}a.-underline{text-decoration:underline}.o-h,.o-h1,.o-h2,.o-h3,.o-h4,.o-h5,.o-h6,h1,h2,h3,h4,h5,h6{font-weight:400;line-height:1.5;line-height:1;margin-bottom:0;margin-top:0}.o-h1,h1{line-height:.9;text-transform:uppercase}@media (max-width:699px){.o-h1,h1{font-size:12vw}}@media (min-width:700px) and (max-width:1599px){.o-h1,h1{font-size:13.5vw}.o-h1.-huge,h1.-huge{font-size:36vh}}@media (min-width:1600px){.o-h1,h1{font-size:12vw}}.o-h2,h2{font-size:2rem}.o-h3,h3{font-size:1.5rem}.o-h4,h4{line-height:1.2}.o-h4,.o-h5,h4,h5{font-size:1rem}.o-h6,h6{font-size:.9375rem}.o-container{margin-left:auto;margin-right:auto;max-width:95rem}@media (max-width:699px){.o-container{padding-left:20px;padding-right:20px}}@media (min-width:700px){.o-container{padding-left:2.5rem;padding-right:2.5rem}}.o-ratio{display:block;overflow:hidden;position:relative}.o-ratio:before{content:"";display:block;padding-bottom:100%;width:100%}.o-ratio>embed,.o-ratio>iframe,.o-ratio>img,.o-ratio>object,.o-ratio_content{bottom:0;left:0;position:absolute;top:0;width:100%}.o-layout{font-size:0;list-style:none;margin:0;padding:0}.o-layout.-gutter{margin-left:-3.75rem}.o-layout.-gutter-small{margin-left:-1.875rem}.o-layout.-center{text-align:center}.o-layout.-right{text-align:right}.o-layout.-reverse{direction:rtl}.o-layout.-reverse.-flex{flex-direction:row-reverse}.o-layout.-flex{display:flex}.o-layout.-flex.-top{align-items:flex-start}.o-layout.-flex.-middle{align-items:center}.o-layout.-flex.-bottom{align-items:flex-end}.o-layout.-stretch{align-items:stretch}.o-layout_item{display:inline-block;font-size:1rem;padding-left:0;vertical-align:top;width:100%}.o-layout.-gutter>.o-layout_item{padding-left:3.75rem}.o-layout.-gutter-small>.o-layout_item{padding-left:1.875rem}.o-layout.-middle>.o-layout_item{vertical-align:middle}.o-layout.-bottom>.o-layout_item{vertical-align:bottom}.o-layout.-center>.o-layout_item,.o-layout.-reverse>.o-layout_item,.o-layout.-right>.o-layout_item{text-align:left}.o-layout.-reverse>.o-layout_item{direction:ltr}.o-checkbox-label,.o-label,.o-radio-label{display:block;margin-bottom:.9375rem}.o-input,.o-select,.o-textarea{background-color:#fff;border:1px solid #d3d3d3;padding:.625rem}.o-input:focus,.o-select:focus,.o-textarea:focus{border-color:gray}.o-input::-moz-placeholder,.o-select::-moz-placeholder,.o-textarea::-moz-placeholder{color:gray}.o-input:-ms-input-placeholder,.o-select:-ms-input-placeholder,.o-textarea:-ms-input-placeholder{color:gray}.o-input::placeholder,.o-select::placeholder,.o-textarea::placeholder{color:gray}.o-checkbox,.o-radio{opacity:0;position:absolute;width:0}.o-checkbox:focus+.o-checkbox-label:before,.o-checkbox:focus+.o-radio-label:before,.o-radio:focus+.o-checkbox-label:before,.o-radio:focus+.o-radio-label:before{border-color:gray}.o-checkbox:checked+.o-checkbox-label:after,.o-checkbox:checked+.o-radio-label:after,.o-radio:checked+.o-checkbox-label:after,.o-radio:checked+.o-radio-label:after{opacity:1}.o-checkbox-label,.o-radio-label{display:inline-block;margin-right:.5em;padding-left:1.75rem;position:relative}.o-checkbox-label:after,.o-checkbox-label:before,.o-radio-label:after,.o-radio-label:before{content:"";display:inline-block;height:1.125rem;left:0;margin-top:-.5625rem;padding:0;position:absolute;top:50%;width:1.125rem}.o-checkbox-label:before,.o-radio-label:before{background-color:#fff}.o-checkbox-label:after,.o-radio-label:after{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10.5' xml:space='preserve'%3E%3Cpath fill='%23424242' d='M4.8 5.8 2.4 3.3 0 5.7l4.8 4.8L13 2.4 10.6 0 4.8 5.8z'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:.8125rem;border-color:transparent;opacity:0}.o-radio-label:after,.o-radio-label:before{border-radius:50%}.o-radio-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' xml:space='preserve'%3E%3Ccircle fill='%23424242' cx='6.5' cy='6.5' r='6.5'/%3E%3C/svg%3E");background-size:.5rem}.o-select{padding-right:2.5rem;z-index:1}.o-select,.o-select-wrap{position:relative}.o-select-wrap:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='11.3' xml:space='preserve'%3E%3Cpath fill='%23424242' d='M6.5 11.3 3.3 5.6 0 0h13L9.8 5.6z'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:.625rem;bottom:0;content:"";pointer-events:none;position:absolute;right:0;top:0;width:2.5rem;z-index:2}.o-textarea{min-height:6.25rem}.o-button{background-color:#272727;color:#fff;font-size:1.5rem;padding:2rem 2.1875rem;position:relative;text-align:left;transition:color .3s cubic-bezier(.215,.61,.355,1);width:100%;z-index:1}.o-button:before{background-color:#fff;bottom:0;content:"";left:0;position:absolute;right:0;top:0;transform:scaleY(0);transform-origin:center top;transition:transform .3s cubic-bezier(.215,.61,.355,1);z-index:-1}.o-button:focus,.o-button:hover{color:#272727}.o-button:focus:before,.o-button:hover:before{transform:scaleY(1);transform-origin:center bottom}.o-button_icon{display:inline-block;height:3.4375rem;margin-right:.9375rem;vertical-align:middle;width:3.4375rem}.o-button_icon svg{display:block;height:100%;width:100%}.o-button_arrow{position:absolute;right:2.1875rem;top:50%;transform:translateY(-50%)}.o-scroll{background-color:#d4c9c9;overflow:hidden}.o-title{margin:0;padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.o-title_line{display:block;font-size:0;opacity:0;transform:translateY(100%) rotateX(-80deg);transform-origin:center top;transform-style:preserve-3d;transition:opacity .8s cubic-bezier(.215,.61,.355,1),transform .8s cubic-bezier(.215,.61,.355,1)}.o-title.is-inview .o-title_line{opacity:1;transform:none}.o-title.is-inview .o-title_line:first-child{transition-delay:.4s}.o-title.is-inview .o-title_line:nth-child(2){transition-delay:.5s}.o-title.is-inview .o-title_line:nth-child(3){transition-delay:.6s}.o-title.is-inview .o-title_line:nth-child(4){transition-delay:.7s}.o-title_line span{display:inline-block;font-size:13.5vw;min-width:.05em}.o-image_wrapper{background-color:#d4c9c9;overflow:hidden;position:relative}.o-image_wrapper.-full{align-content:center;display:flex;height:100%;margin:0 6.25rem}@media (max-width:699px){.o-image_wrapper.-full{margin:1.875rem 0}}.o-image{mix-blend-mode:multiply;opacity:.75}.o-image img{opacity:0;transform:scale(1.4);transition:opacity 1.2s cubic-bezier(.215,.61,.355,1),transform 1.2s cubic-bezier(.215,.61,.355,1);width:100%}.o-image.is-inview img{opacity:1;transform:scale(1);transition-delay:.6s}.o-image_wrapper.-full .o-image{align-self:center}html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}.has-scroll-smooth [data-scroll-container]{min-height:100vh}[data-scroll-direction=horizontal] [data-scroll-container]{display:inline-block;height:100vh;white-space:nowrap}[data-scroll-direction=horizontal] [data-scroll-section]{display:inline-block;height:100%;vertical-align:top;white-space:nowrap}.c-scrollbar{height:100%;opacity:0;position:absolute;right:0;top:0;transform-origin:center right;transition:transform .3s,opacity .3s;width:11px}.c-scrollbar:hover{transform:scaleX(1.45)}.c-scrollbar:hover,.has-scroll-dragging .c-scrollbar,.has-scroll-scrolling .c-scrollbar{opacity:1}[data-scroll-direction=horizontal] .c-scrollbar{bottom:0;height:10px;top:auto;transform:scaleY(1);width:100%}[data-scroll-direction=horizontal] .c-scrollbar:hover{transform:scaleY(1.3)}.c-scrollbar_thumb{background-color:#000;border-radius:10px;cursor:-webkit-grab;cursor:grab;margin:2px;opacity:.5;position:absolute;right:0;top:0;width:7px}.has-scroll-dragging .c-scrollbar_thumb{cursor:-webkit-grabbing;cursor:grabbing}[data-scroll-direction=horizontal] .c-scrollbar_thumb{bottom:0;right:auto}.c-header{position:relative}@media (max-width:699px){.c-header{height:50vh;min-height:340px}}@media (min-width:700px) and (max-width:999px){.c-header{height:80vh;min-height:380px}}@media (min-width:1000px){.c-header{height:100vh;min-height:46.875rem}}.c-header_title{padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.c-header_line,.c-header_title{bottom:0;left:0;margin:0;position:absolute}.c-header_line{right:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-header_line.is-inview{transform:scaleX(1)}.c-header_title_line{display:block;opacity:0;transform:translateY(100%) rotateX(-80deg);transform-origin:center top;transform-style:preserve-3d;transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1)}html.is-ready .c-header_title_line{opacity:1;transform:none;transition-duration:.8s}html.is-ready .c-header_title_line:first-child{transition-delay:.1s}html.is-ready .c-header_title_line:nth-child(2){transition-delay:.2s}html.is-ready .c-header_title_line:nth-child(3){transition-delay:.3s}html.is-ready .c-header_title_line:nth-child(4){transition-delay:.4s}.c-header_title_line span{display:inline-block}.c-header_title_line.-version{font-size:0;text-transform:none}.c-header_heading{padding:1.875rem 0}.c-header_heading_label{display:block;transform:translateY(-60px);transition:transform 0s cubic-bezier(.215,.61,.355,1)}html.is-ready .c-header_heading_label{transform:none;transition-duration:.6s}html.is-ready .o-layout_item:nth-child(2) .c-header_heading_label{transition-delay:.1s}.c-header_logo{bottom:2.5rem;opacity:0;position:absolute;right:0;transform:translateY(120px);transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1)}@media (max-width:699px){.c-header_logo{height:66px;width:30px}}@media (min-width:700px){.c-header_logo{height:8.75rem;width:4rem}}.c-header_logo svg{display:block;height:100%;width:100%}html.is-ready .c-header_logo{opacity:1;transform:none;transition-delay:.6s;transition-duration:.6s}.c-fixed_wrapper{background-color:#d4c9c9;overflow:hidden;position:relative}@media (min-width:1000px){.c-fixed_wrapper{height:100vh}}@media (max-width:999px){.c-fixed_wrapper{height:50vh}}.c-fixed_target{bottom:-100vh}.c-fixed,.c-fixed_target{left:0;position:absolute;right:0;top:-100vh}.c-fixed{background-position:50%;background-size:cover;height:100%;mix-blend-mode:multiply;opacity:.75}html:not(.has-scroll-smooth) .c-fixed{top:0}.c-intro{font-size:2.1875rem;line-height:1.2;margin:7.5rem 0;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-intro.is-inview{opacity:1;transform:none;transition-delay:.3s}.c-features{padding:7.5rem 0}.c-features_item{background-color:rgba(0,0,0,.1);border-radius:20px;margin-bottom:3.75rem;padding:3.75rem}.c-summary{margin:3.75rem 0 7.5rem}.c-summary_text{font-size:1.125rem;font-weight:600;opacity:0;transform:translateY(60px);transition:transform 1s cubic-bezier(.215,.61,.355,1)}.c-summary.is-inview .c-summary_text{opacity:1;transform:none}@media (min-width:1000px){.c-summary_text{max-width:320px}}@media (max-width:999px){.c-summary_list{margin-top:1.875rem}}.c-summary_list_item{opacity:0;position:relative;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item:after{background-color:#272727;bottom:0;content:"";height:1px;left:0;position:absolute;right:0;transform:scaleX(0);transform-origin:center left;transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview{opacity:1;transform:none}.c-summary_list_item.is-inview:after{transform:scaleX(1)}.c-summary_list_item.is-inview:first-child{transition-delay:.1s}.c-summary_list_item.is-inview:first-child:after{transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(2){transition-delay:.2s}.c-summary_list_item.is-inview:nth-child(2):after{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(3){transition-delay:.3s}.c-summary_list_item.is-inview:nth-child(3):after{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(4){transition-delay:.4s}.c-summary_list_item.is-inview:nth-child(4):after{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(5){transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(5):after{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(6){transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(6):after{transition-delay:1s}.c-summary_list_item a{display:block;padding:8px 0}.c-summary_list_icon{opacity:0;position:absolute;right:0;top:50%;transform:translateY(-50%) translateX(30px) rotate(90deg);transition:opacity .4s cubic-bezier(.215,.61,.355,1),transform .4s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview .c-summary_list_icon{opacity:1;transform:translateY(-50%) rotate(0deg)}.c-summary_list_item.is-inview:first-child .c-summary_list_icon{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(2) .c-summary_list_icon{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(3) .c-summary_list_icon{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(4) .c-summary_list_icon{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(5) .c-summary_list_icon{transition-delay:1s}.c-summary_list_item.is-inview:nth-child(6) .c-summary_list_icon{transition-delay:1.1s}.c-section{position:relative}@media (max-width:1199px){.c-section{margin-bottom:10vh;padding-bottom:10vh}}@media (min-width:1200px){.c-section{margin-bottom:35vh}}.c-section_infos{max-width:320px;position:relative;z-index:0}@media (min-width:1000px){.c-section_infos{padding-top:7.5rem}.c-section_infos.-padding{padding-top:35vh}}@media (max-width:999px){.c-section_infos{margin-bottom:1.875rem}}.c-section_infos_inner>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-section_infos_inner.is-inview>*{opacity:1;transform:none}.c-section_infos_inner.is-inview>:first-child{transition-delay:.06s}.c-section_infos_inner.is-inview>:nth-child(2){transition-delay:.12s}.c-section_infos_inner.is-inview>:nth-child(3){transition-delay:.18s}.c-sections_infos_text{margin-top:1.25rem}.c-image{opacity:0;transition:opacity .6s cubic-bezier(.215,.61,.355,1)}.c-image.is-inview{opacity:1;transition-delay:.6s}.c-speed-block{position:relative}@media (min-width:1000px){.c-speed-block.-margin{margin-top:7.5rem}}@media (max-width:999px){.c-speed-block{margin:1.875rem 0}}@media (max-width:699px){.c-speed-block{margin:15px 0}}.c-speed-block_image{margin-bottom:-30px;margin-top:-30px}.c-speed-block_title{bottom:3.75rem;color:#fff;font-size:1.5rem;font-weight:600;left:0;opacity:0;position:absolute;right:0;text-align:center;text-transform:uppercase;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-speed-block_title.is-inview{opacity:1;transform:none;transition-delay:.3s}@media (max-width:1199px){.c-speed-block_title{display:none}}.c-speed-block_bubble{color:#d4c9c9;font-size:1.25rem;padding:1.5rem 2.5rem;position:absolute;right:20px;top:30%;z-index:1}.c-speed-block_bubble.-right{right:-30px}.c-speed-block_bubble.-left{left:-30px;right:auto}.c-speed-block_bubble.-top{top:-20%}.c-speed-block_bubble.-bottom{bottom:0;top:auto}.c-speed-block_bubble:before{background-color:#272727;border-radius:50%;bottom:0;content:"";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33);z-index:-1}.c-speed-block_bubble.is-inview:before{transform:scale(1);transition-delay:.3s}@media (max-width:1199px){.c-speed-block_bubble{display:none}}.c-direction-block_wrapper{margin-bottom:31.25rem}@media (min-width:1200px){.c-direction-block_wrapper{min-height:180vh}}@media (min-width:1000px) and (max-width:1199px){.c-direction-block_wrapper{min-height:130vh}}@media (min-width:700px) and (max-width:999px){.c-direction-block_wrapper{min-height:100vh}}@media (max-width:699px){.c-direction-block_wrapper{min-height:70vh}}@media (min-width:1000px){.c-direction-block_wrapper{margin-top:-35vh}}.c-direction-block{left:0;position:absolute;right:0;z-index:1}@media (min-width:1200px){.c-direction-block{bottom:-50vh;top:-50vh}}@media (min-width:700px) and (max-width:1199px){.c-direction-block{bottom:-50vh;top:-30vh}}@media (max-width:699px){.c-direction-block{bottom:0;top:-15vh}}@media (min-width:1000px) and (max-width:1199px){.c-direction-block{margin-top:6.25rem}}@media (min-width:1200px){.c-direction-block{margin-top:18.75rem}}.c-direction-block_item{font-size:10vw;font-weight:600;line-height:1;position:absolute;text-transform:uppercase;white-space:nowrap}.c-direction-block_item span{background-color:#fff;display:block;padding:0 20px;white-space:nowrap}.c-direction-block_item.-one{top:33%;transform:translateX(-50vw) rotate(26deg)}.c-direction-block_item.-two{top:45%}.c-direction-block_item.-three{top:55%;transform:rotate(9deg)}.c-direction-block_item.-four{top:68%;transform:translateX(-50vw) rotate(-19deg)}.c-direction-block_item.-five{top:63%;transform:translateX(-10vw) rotate(3deg)}.c-lerp-block{font-weight:700;margin-bottom:10rem;text-transform:uppercase}@media (min-width:1000px){.c-lerp-block:not(:first-child){margin-top:3.75rem}}@media (max-width:999px){.c-lerp-block{margin-top:1.875rem}}.c-lerp-block_index{align-items:center;color:#d4c9c9;display:inline-flex;font-size:1.25rem;height:2.8125rem;justify-content:center;position:relative;vertical-align:middle;width:3.75rem;z-index:1}.c-lerp-block_index:before{background-color:#272727;border-radius:50%;bottom:0;content:"";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33);z-index:-1}.c-lerp-block_index.is-inview:before{transform:scale(1);transition-delay:.3s}.c-lerp-block_title{display:inline-block;font-size:0;line-height:1.1;margin-left:1.25rem;vertical-align:middle}.c-lerp-block_title.is-inview>span:not([data-scroll]){opacity:1;transform:none;transition-delay:.4s}.c-lerp-block_title>span:not([data-scroll]){opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-lerp-block_title span{display:inline-block;min-width:.3em}@media (max-width:699px){.c-lerp-block_title span{font-size:1.5625rem}}@media (min-width:700px){.c-lerp-block_title span{font-size:4.375rem}}.c-cta_line{margin:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_line.-margin{margin-bottom:30px}.c-cta_line.is-inview{transform:scaleX(1)}.c-cta_content{margin:3.75rem 0}.c-cta_content_text{max-width:520px}.c-cta_content_text>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_content_text>:not(:first-child){margin-top:1.875rem}.c-cta_content_text.is-inview>*{opacity:1;transform:none}.c-cta_content_text.is-inview>:first-child{transition-delay:.06s}.c-cta_content_text.is-inview>:nth-child(2){transition-delay:.12s}.c-cta_content_text.is-inview>:nth-child(3){transition-delay:.18s}.c-cta_button{margin-top:5.625rem;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_button.is-inview{opacity:1;transform:none}.c-cta_section{margin-bottom:11.25rem}.c-choochoo_item{font-size:6.25rem;padding:50vh 0}.c-choochoo_item span{display:block}.c-choochoo_item.-reverse span,html[data-direction=up] .c-choochoo_item span{transform:rotateY(180deg)}html[data-direction=up] .c-choochoo_item.-reverse span{transform:rotateY(0deg)}@media (max-width:1199px){.c-choochoo_item{display:none}}@media (max-width:999px){.c-damn{padding:150vh 0 0}}@media (min-width:1000px){.c-damn{padding:100vh 0 0}}.c-helicopter_wrapper{display:flex;height:100%;position:relative}.c-helicopter{align-self:center}.u-2\:1:before{padding-bottom:50%}.u-4\:3:before{padding-bottom:75%}.u-16\:9:before{padding-bottom:56.25%}.u-1\/1{width:100%!important}.u-1\/2{width:50%!important}.u-2\/2{width:100%!important}.u-1\/3{width:33.33333%!important}.u-2\/3{width:66.66667%!important}.u-3\/3{width:100%!important}.u-1\/4{width:25%!important}.u-2\/4{width:50%!important}.u-3\/4{width:75%!important}.u-4\/4{width:100%!important}.u-1\/5{width:20%!important}.u-2\/5{width:40%!important}.u-3\/5{width:60%!important}.u-4\/5{width:80%!important}.u-5\/5{width:100%!important}@media (min-width:700px){.u-1\/2\@from-small{width:50%}}@media (min-width:1000px){.u-1\/3\@from-medium{width:33.33333%}.u-1\/2\@from-medium{width:50%}.u-2\/5\@from-medium{width:40%}.u-3\/5\@from-medium{width:60%}}.u-float-left{float:left!important}.u-float-right{float:right!important}.u-text-center{text-align:center!important}.u-text-left{text-align:left!important}.u-text-right{text-align:right!important}.u-align-baseline{vertical-align:baseline!important}.u-align-bottom{vertical-align:bottom!important}.u-align-middle{vertical-align:middle!important}.u-align-top{vertical-align:top!important}.u-vertical-center{font-size:0}.u-vertical-center:before{content:"";display:inline-block;height:100%;vertical-align:middle}.u-vertical-center>*{display:inline-block;font-size:1rem;vertical-align:middle}.u-white{color:#fff}.u-label{font-size:1.5rem;font-weight:600;text-transform:uppercase}.u-icon{font-family:Lucida Grande;font-size:1.125rem}.u-text{font-size:.875rem}.u-clearfix:after{clear:both;content:"";display:block}.u-truncate{word-wrap:normal;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[hidden][aria-hidden=false]{clip:rect(0,0,0,0);display:inherit;position:absolute}[hidden][aria-hidden=false]:focus{clip:auto}.u-screen-reader-text{clip:rect(0 0 0 0);border:0;height:1px;margin:0;overflow:hidden;padding:0;position:absolute!important;width:1px}@media not print{.u-screen-reader-text\@screen{clip:rect(0 0 0 0);border:0;height:1px;margin:0;overflow:hidden;padding:0;position:absolute!important;width:1px}}.u-screen-reader-text.-focusable:active,.u-screen-reader-text.-focusable:focus{clip:auto;height:auto;width:auto} \ No newline at end of file diff --git a/src/scripts/Native.js b/src/scripts/Native.js index 528c818d..ee73f54a 100644 --- a/src/scripts/Native.js +++ b/src/scripts/Native.js @@ -232,7 +232,9 @@ export default class extends Core { offset = target + offset; } - const isTargetReached = () => { return parseInt(window.pageYOffset) === parseInt(offset) } + const isTargetReached = () => { + return parseInt(window.pageYOffset) === parseInt(offset); + }; if (callback) { if (isTargetReached()) { callback(); diff --git a/src/scripts/Smooth.js b/src/scripts/Smooth.js index cc600c19..d56cf62a 100644 --- a/src/scripts/Smooth.js +++ b/src/scripts/Smooth.js @@ -93,11 +93,7 @@ export default class extends Core { this.instance.limit.y = this.el.offsetHeight - this.windowHeight; if (this.direction === 'horizontal') { - let totalWidth = 0; - let nodes = this.el.children; - for (let i = 0; i < nodes.length; i++) { - totalWidth += nodes[i].offsetWidth; - } + let totalWidth = this.el.scrollWidth; this.instance.limit.x = totalWidth - this.windowWidth; }