/*! * headroom.js v0.9.3 - Give your page some headroom. Hide your header until you need it * Copyright (c) 2016 Nick Williams - http://wicky.nillia.ms/headroom.js * License: MIT */ !function(t,o){"use strict";"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?module.exports=o():t.Headroom=o()}(this,function(){"use strict";function t(t){this.callback=t,this.ticking=!1}function o(t){return t&&"undefined"!=typeof window&&(t===window||t.nodeType)}function i(t){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var n,e,s=t||{};for(e=1;et,i=t+this.getScrollerPhysicalHeight()>this.getScrollerHeight();return o||i},toleranceExceeded:function(t,o){return Math.abs(t-this.lastKnownScrollY)>=this.tolerance[o]},shouldUnpin:function(t,o){var i=t>this.lastKnownScrollY,n=t>=this.offset;return i&&n&&o},shouldPin:function(t,o){var i=tthis.lastKnownScrollY?"down":"up",i=this.toleranceExceeded(t,o);this.isOutOfBounds(t)||(t<=this.offset?this.top():this.notTop(),t+this.getViewportHeight()>=this.getScrollerHeight()?this.bottom():this.notBottom(),this.shouldUnpin(t,i)?this.unpin():this.shouldPin(t,i)&&this.pin(),this.lastKnownScrollY=t)}},e.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},e.cutsTheMustard=void 0!==s&&s.rAF&&s.bind&&s.classList,e});