{"version":3,"sources":["site.js"],"names":["window","NodeList","prototype","forEach","Array","$","c","currentScrollTop","nav","$navbar","pos","document","documentElement","scrollTop","body","hasClass","addClass","removeClass","onIntersection","entries","entry","target","tagName","isIntersecting","classList","add","remove","querySelector","menu","getElementById","openBtns","querySelectorAll","closeBtn","activeBtn","style","display","addEventListener","e","preventDefault","removeClickListener","outsideClickListener","event","contains","removeEventListener","capture","btn","menutray","targets","slice","call","observer","IntersectionObserver","rootMargin","threshold","observe","observerInit","scroll","jQuery"],"mappings":"aACIA,OAAOC,WAAaA,SAASC,UAAUC,UAAUF,SAASC,UAAUC,QAAUC,MAAMF,UAAUC,SAElG,SAAUE,GAGN,IAAIC,EAAGC,EAAmB,EAC1B,SAASC,IACP,IAAIC,EAAUJ,EAAE,WACZK,EAAWC,SAASC,gBAAgBC,WAAWF,SAASG,KAAKD,UAajE,OAXAN,EAAmBG,EACdD,EAAQM,SAAS,YAChBT,EAAIC,GAAoBG,EAAM,IAAKD,EAAQO,SAAS,YAC/CV,EAAIC,KAAsBG,GAAO,MAAMD,EAAQQ,YAAY,YAEhEP,EAAM,GAAID,EAAQO,SAAS,YAC1BP,EAAQQ,YAAY,YAEzBX,EAAIC,IAGC,EAyET,SAASW,EAAeC,GACtBA,EAAQhB,SAAQ,SAAAiB,GACgB,WAAzBA,EAAMC,OAAOC,UACXF,EAAMG,eAAiBH,EAAMC,OAAOG,UAAUC,IAAI,WAClDL,EAAMC,OAAOG,UAAUE,OAAO,eAK3CrB,GAAE,YA9EA,WACE,IAAIS,EAAOH,SAASgB,cAAc,QAASC,EAAOjB,SAASkB,eAAe,YAE1E,GAAKD,EAAO,CACV,IAAIE,EAAYnB,SAASoB,iBAAiB,SACtCC,EAAYJ,EAAKD,cAAc,aAC/BM,GAAY,EAEhBL,EAAKM,MAAMC,QAAU,GAErBH,EAASI,iBAAiB,SAAS,SAASC,GAI1C,OAHAA,EAAEC,iBACFV,EAAKJ,UAAUE,OAAO,QACtBa,KACO,KAGT,IAAMC,EAAuB,SAAUC,GAC/Bb,EAAKc,SAASD,EAAMpB,SAAYY,EAAUS,SAASD,EAAMpB,UAC7DoB,EAAMH,iBACNC,MAGJA,EAAsB,WACpBzB,EAAKU,UAAUE,OAAO,eACtBE,EAAKJ,UAAUE,OAAO,QACtBf,SAASgC,oBAAoB,QAASH,EAAsB,CAACI,SAAQ,KAGvEd,EAAS3B,SAAQ,SAAU0C,GACzBA,EAAIT,iBAAiB,SAAS,SAAUK,GActC,OAbAA,EAAMH,iBACNL,EAAYY,EAEPJ,EAAMpB,QAAUwB,GAAOjB,EAAKJ,UAAUkB,SAAS,SAClDd,EAAKJ,UAAUE,OAAO,QACtBa,MAGAzB,EAAKU,UAAUC,IAAI,eACnBG,EAAKJ,UAAUC,IAAI,QACnBd,SAASyB,iBAAiB,QAASI,EAAsB,CAACI,SAAQ,MAG7D,SAmCfE,GACAtC,IA7BA,WACE,IAAIuC,EAAU,GAAGC,MAAMC,KAAKtC,SAASoB,iBAAiB,iBAMtD,GAAO,yBAA0B/B,OAI1B,CACL,IAAIkD,EAAW,IAAIC,qBAAqBjC,EAV7B,CACPkC,WAAY,MACZC,UAAW,KASfN,EAAQ5C,SAAQ,SAAAkB,GACd6B,EAASI,QAAQjC,WANnB0B,EAAQ5C,SAAQ,SAASkB,GACC,WAAnBA,EAAOC,SAAuBD,EAAOG,UAAUC,IAAI,cAqB9D8B,GAEAlD,EAAEL,QAAQwD,QAAO,WAAahD,UA1GlC,CA4GGiD","sourcesContent":["/* globals jQuery */\nif (window.NodeList && !NodeList.prototype.forEach) {NodeList.prototype.forEach = Array.prototype.forEach;}\n\n(function($){\n \n // Adds a class to navbar when user is no longer at the top of the page for targeting style changes for fixed navbars\n var c, currentScrollTop = 0;\n function nav() {\n var $navbar = $('#navbar'),\n pos = (document.documentElement.scrollTop||document.body.scrollTop);\n \n currentScrollTop = pos;\n if (!$navbar.hasClass('static')){\n if (c < currentScrollTop && pos > 100) $navbar.addClass(\"scrollUp\");\n else if (c > currentScrollTop && !(pos <= 100)) $navbar.removeClass(\"scrollUp\");\n \n if (pos > 10) $navbar.addClass(\"scrolled\");\n else $navbar.removeClass(\"scrolled\");\n \n c = currentScrollTop;\n }\n \n return false;\n }\n \n // Menu Tray\n function menutray() {\n var body = document.querySelector('body'), menu = document.getElementById('menutray');\n \n if ( menu ) {\n var openBtns = document.querySelectorAll('.more'),\n closeBtn = menu.querySelector('.closebtn'),\n activeBtn = false;\n \n menu.style.display = '';\n \n closeBtn.addEventListener('click', function(e) {\n e.preventDefault();\n menu.classList.remove('open');\n removeClickListener();\n return false;\n });\n \n const outsideClickListener = function( event ) {\n if ( !menu.contains(event.target) && !activeBtn.contains(event.target) ) {\n event.preventDefault();\n removeClickListener();\n }\n },\n removeClickListener = function() {\n body.classList.remove('scroll-lock');\n menu.classList.remove('open');\n document.removeEventListener('click', outsideClickListener, {capture:true})\n }\n \n openBtns.forEach(function( btn ) {\n btn.addEventListener('click', function( event ) {\n event.preventDefault();\n activeBtn = btn;\n \n if ( event.target == btn && menu.classList.contains('open') ) {\n menu.classList.remove('open');\n removeClickListener();\n }\n else {\n body.classList.add('scroll-lock');\n menu.classList.add('open');\n document.addEventListener('click', outsideClickListener, {capture:true});\n }\n \n return false;\n });\n });\n }\n }\n \n // Visibility observer for animation triggering\n function observerInit(){\n var targets = [].slice.call(document.querySelectorAll('.content > *')),\n config = {\n rootMargin: '0px',\n threshold: 0.1\n };\n \n if ( !('IntersectionObserver' in window) ) {\n targets.forEach(function(target) {\n if ( target.tagName !== 'FIGURE' ) target.classList.add('visible');\n });\n } else {\n let observer = new IntersectionObserver(onIntersection, config);\n targets.forEach(target => {\n observer.observe(target);\n });\n }\n }\n function onIntersection(entries) {\n entries.forEach(entry => {\n if ( entry.target.tagName !== 'FIGURE' ) {\n if ( entry.isIntersecting ) entry.target.classList.add('visible');\n else entry.target.classList.remove('visible');\n }\n });\n }\n \n $(function(){\n menutray();\n nav();\n observerInit();\n \n $(window).scroll(function() { nav(); });\n })\n})(jQuery);\n"]}