{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/components/_1_header.js","webpack:///./app/javascript/packs/components/_1_custom-select.js","webpack:///./app/javascript/packs/components/_1_anim-menu-btn.js","webpack:///./app/javascript/packs/components/_1_sub-navigation.js","webpack:///./app/javascript/packs/components/_1_date-picker.js","webpack:///./app/javascript/packs/components/_1_expandable-table.js","webpack:///./app/javascript/packs/components/_1_responsive-sidebar.js","webpack:///./app/javascript/packs/components/_1_alert.js","webpack:///./app/javascript/packs/components/_1_progress-bar.js","webpack:///./app/javascript/packs/components/_1_swipe-content.js","webpack:///./app/javascript/packs/components/_2_flexi-header.js","webpack:///./app/javascript/packs/application.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","document","ready","mainHeader","getElementsByClassName","trigger","nav","focusMenu","addEventListener","event","preventDefault","ariaExpanded","Util","hasClass","toggleClass","setAttribute","querySelectorAll","focus","window","keyCode","toLowerCase","getAttribute","isVisible","click","activeElement","closest","element","offsetWidth","offsetHeight","getClientRects","length","CustomSelect","select","this","getElementsByTagName","optGroups","options","selectedOption","label","selectedIndex","text","querySelector","getSelectedOptionText","selectId","dropdown","customOptions","arrowIcon","insertAdjacentHTML","customClasses","innerHTML","textContent","button","outerHTML","clone","cloneNode","removeClass","initButtonSelect","list","getSelectLabelSR","optGroupList","getOptionsList","initListSelect","addClass","style","display","option","target","hasAttribute","updateNativeSelect","updateTriggerAria","selectOption","initSelection","toggleCustomSelect","moveFocus","keyboardCustomSelect","initCustomSelectEvents","bool","getSelectedOption","cb","removeEventListener","triggerBoundingRect","getBoundingClientRect","innerWidth","left","moveUp","innerHeight","bottom","top","maxHeight","width","placeDropdown","direction","index","getIndexInArray","selected","customSelect","selectArray","push","forEach","contains","menuBtns","btn","status","CustomEvent","detail","dispatchEvent","SideNav","sidenav","control","navList","closeBtn","firstFocusable","focusableEle","getFirstFocusable","showClass","collapsedLayoutClass","checkSideNavLayout","selectedTrigger","openSideNav","closeSideNav","initSideNavToggle","layout","getComputedStyle","getPropertyValue","replace","sideNav","SideNavArray","j","beforeContent","doneResizing","customEvent","resizingId","clearTimeout","setTimeout","requestAnimationFrame","DatePicker","opts","extend","defaults","input","datePicker","body","navigation","heading","pickerVisible","dateIndexes","dateFormat","indexOf","getDateIndexes","resetCalendar","dateSelected","selectedDay","selectedMonth","selectedYear","lastFocusable","resetLabelCalendarTrigger","srLiveReagion","createElement","appendChild","initCalendarAria","toggleCalendar","day","innerText","currentMonth","currentYear","dateArray","getReadableDate","dateSeparator","setInputValue","showPrev","showNext","hideCalendar","currentDay","resetDayValue","getDayOfWeek","shiftKey","trapFocus","initCalendarEvents","checkDayInMonth","showCalendar","months","daysInMonth","year","month","Date","getDate","currentDate","selectedDate","date","split","getDateFromInput","getUTCDate","getCurrentDay","getUTCMonth","getCurrentMonth","getUTCFullYear","getCurrentYear","firstDay","calendar","classListDate","tabindexValue","getFocusableElements","weekDay","getDay","totDays","newMonth","buttons","toDateString","allFocusable","elements","getLastFocusable","showNextMonth","showPrevMonth","flexSupported","cssSupports","map","item","trim","ExTable","rows","getTableLayout","table","moreButtons","rowExpanded","tableExpandedLayoutClass","checkTableLayout","resetTableStyle","tableRow","parentNode","showMore","resetRowStyle","initTable","row","showBool","content","cells","children","parseFloat","offsetTop","resetCompressedRowStyle","resetExpandedRowStyle","removeAttribute","tables","arrayTables","Sidebar","triggers","staticClass","readyClass","sidebar","checkSidebarLayour","initSidebarResize","showSidebar","initSidebarEvents","initSidebar","getFirstVisible","getLastVisible","closeSidebar","handleEvent","cancelSidebarEvents","type","initClick","initKeyDown","resetLayout","alertClose","ProgressBar","progressBar","fill","getProgressBarValue","osHasReducedMotion","animate","animationDuration","canAnimate","IntersectionObserverEntry","ariaLabel","changeColor","colorThresholds","thresholds","isNaN","parseInt","getProgressBarColorThresholds","updateProgressBarColor","setProgressBarValue","observer","IntersectionObserver","progressBarObserve","threshold","observe","animateProgressBar","animationId","cancelAnimationFrame","final","duration","start","updateProgressBar","emitProgressBarEvents","initProgressBar","entries","self","intersectionRatio","toFixed","animationTriggered","to","change","currentTime","animateFill","timestamp","progress","val","className","classes","filter","lastIndexOf","join","removeProgressBarColorClasses","eventName","progressBars","SwipeContent","delta","dragging","intervalId","initDragging","unify","clientX","clientY","emitSwipeEvents","startDrag","emitDrag","drag","clearInterval","cancelDragging","dx","dy","getSign","Math","abs","y","endDrag","changedTouches","el","x","origin","sign","swipe","flexHeader","menuTrigger","firstFocusableElement","getMenuFirstFocusable"],"mappings":"aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,CAAC,GAUX,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,OACf,CAIAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,GAEhE,EAGAZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,GACvD,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAM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ACzEqV,EAgCF,WAGE,IAFA,IAAIzO,EAAeuO,EAAW,GAAGnV,uBAAuB,iBAAiB,GAAGY,iBAAiB,iOAC3F+F,GAAiB,EACX/I,EAAI,EAAGA,EAAIgJ,EAAalF,OAAQ9D,IACtC,GAAIgJ,EAAahJ,GAAG2D,aAAeqF,EAAahJ,GAAG4D,cAAgBoF,EAAahJ,GAAG6D,iBAAiBC,OAAS,CAC3GiF,EAAiBC,EAAahJ,GAC9B,KACF,CAGF,OAAO+I,CACT,CA3C0B2O,GAGtBnV,GAAY,EAEhBiV,EAAYhV,iBAAiB,yBAAyB,SAASC,GAC7DG,KAAKE,YAAYb,SAASG,uBAAuB,iBAAiB,GAAI,4BAA6BK,EAAM+F,QACzGgP,EAAYzU,aAAa,gBAAiBN,EAAM+F,QAC7C/F,EAAM+F,OAAQiP,EAAsBxU,QAC/BV,IACNA,EAAUU,QACVV,GAAY,EAEhB,IAGAW,OAAOV,iBAAiB,SAAS,SAASC,IAEnCA,EAAMU,SAA4B,IAAjBV,EAAMU,SAAmBV,EAAMlB,KAAkC,UAA3BkB,EAAMlB,IAAI6B,gBAEpB,QAA7CoU,EAAYnU,aAAa,kBAA8BC,EAAUkU,KAClEjV,EAAYiV,EACZA,EAAYjU,UAIXd,EAAMU,SAA4B,GAAjBV,EAAMU,SAAkBV,EAAMlB,KAAkC,OAA3BkB,EAAMlB,IAAI6B,gBAEnB,QAA7CoU,EAAYnU,aAAa,kBAA8BC,EAAUkU,KAAiBvV,SAASuB,cAAcC,QAAQ,iBAAiB+T,EAAYjU,OAErJ,GAkBF,CACF,G,gCCvDA,oE","file":"js/application-0ac02e9c3677c7cb9def.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","// File#: _1_header\n// Usage: codyhouse.co/license\n\n$(document).ready(function() {\n var mainHeader = document.getElementsByClassName('js-header')[0];\n if( mainHeader ) {\n var trigger = mainHeader.getElementsByClassName('js-header__trigger')[0],\n nav = mainHeader.getElementsByClassName('js-header__nav')[0];\n\n // we'll use these to store the node that needs to receive focus when the mobile menu is closed\n var focusMenu = false;\n\n //detect click on nav trigger\n trigger.addEventListener(\"click\", function(event) {\n event.preventDefault();\n var ariaExpanded = !Util.hasClass(nav, 'header__nav--is-visible');\n //show nav and update button aria value\n Util.toggleClass(nav, 'header__nav--is-visible', ariaExpanded);\n trigger.setAttribute('aria-expanded', ariaExpanded);\n if(ariaExpanded) { //opening menu -> move focus to first element inside nav\n nav.querySelectorAll('[href], input:not([disabled]), button:not([disabled])')[0].focus();\n } else if(focusMenu) {\n focusMenu.focus();\n focusMenu = false;\n }\n });\n // listen for key events\n window.addEventListener('keyup', function(event){\n // listen for esc key\n if( (event.keyCode && event.keyCode == 27) || (event.key && event.key.toLowerCase() == 'escape' )) {\n // close navigation on mobile if open\n if(trigger.getAttribute('aria-expanded') == 'true' && isVisible(trigger)) {\n focusMenu = trigger; // move focus to menu trigger when menu is close\n trigger.click();\n }\n }\n // listen for tab key\n if( (event.keyCode && event.keyCode == 9) || (event.key && event.key.toLowerCase() == 'tab' )) {\n // close navigation on mobile if open when nav loses focus\n if(trigger.getAttribute('aria-expanded') == 'true' && isVisible(trigger) && !document.activeElement.closest('.js-header')) trigger.click();\n }\n });\n }\n\n function isVisible(element) {\n return (element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n };\n \n});\n","// File#: _1_custom-select\n// Usage: codyhouse.co/license\n$(document).ready(function(){\n // NOTE: you need the js code only when using the --custom-dropdown variation of the Custom Select component. Default version does nor require JS.\n \n var CustomSelect = function(element) {\n this.element = element;\n this.select = this.element.getElementsByTagName('select')[0];\n this.optGroups = this.select.getElementsByTagName('optgroup');\n this.options = this.select.getElementsByTagName('option');\n this.selectedOption = getSelectedOptionText(this);\n this.selectId = this.select.getAttribute('id');\n this.trigger = false;\n this.dropdown = false;\n this.customOptions = false;\n this.arrowIcon = this.element.getElementsByTagName('svg');\n this.label = document.querySelector('[for=\"'+this.selectId+'\"]');\n\n initCustomSelect(this); // init markup\n initCustomSelectEvents(this); // init event listeners\n };\n \n function initCustomSelect(select) {\n // create the HTML for the custom dropdown element\n select.element.insertAdjacentHTML('beforeend', initButtonSelect(select) + initListSelect(select));\n \n // save custom elements\n select.dropdown = select.element.getElementsByClassName('js-select__dropdown')[0];\n select.trigger = select.element.getElementsByClassName('js-select__button')[0];\n select.customOptions = select.dropdown.getElementsByClassName('js-select__item');\n \n // hide default select\n Util.addClass(select.select, 'is-hidden');\n if(select.arrowIcon.length > 0 ) select.arrowIcon[0].style.display = 'none';\n };\n\n function initCustomSelectEvents(select) {\n // option selection in dropdown\n initSelection(select);\n\n // click events\n select.trigger.addEventListener('click', function(){\n toggleCustomSelect(select, false);\n });\n if(select.label) {\n // move focus to custom trigger when clicking on element _ arai-label of trigger ';\n\n };\n\n function initListSelect(select) { // create custom select dropdown\n var list = '
';\n list = list + getSelectLabelSR(select);\n if(select.optGroups.length > 0) {\n for(var i = 0; i < select.optGroups.length; i++) {\n var optGroupList = select.optGroups[i].getElementsByTagName('option'),\n optGroupLabel = '
  • '+select.optGroups[i].getAttribute('label')+'
  • ';\n list = list + '';\n }\n } else {\n list = list + '';\n }\n return list;\n };\n\n function getSelectLabelSR(select) {\n if(select.label) {\n return '

    '+select.label.textContent+'

    '\n } else {\n return '';\n }\n };\n\n function getOptionsList(options) {\n var list = '';\n for(var i = 0; i < options.length; i++) {\n var selected = options[i].hasAttribute('selected') ? ' aria-selected=\"true\"' : ' aria-selected=\"false\"';\n list = list + '
  • ';\n };\n return list;\n };\n\n function getSelectedOption(select) {\n var option = select.dropdown.querySelector('[aria-selected=\"true\"]');\n if(option) return option;\n else return select.dropdown.getElementsByClassName('js-select__item')[0];\n };\n\n function moveFocusToSelectTrigger(select) {\n if(!document.activeElement.closest('.js-select')) return\n select.trigger.focus();\n };\n \n function checkCustomSelectClick(select, target) { // close select when clicking outside it\n if( !select.element.contains(target) ) toggleCustomSelect(select, 'false');\n };\n \n //initialize the CustomSelect objects\n var customSelect = document.getElementsByClassName('js-select');\n if( customSelect.length > 0 ) {\n var selectArray = [];\n for( var i = 0; i < customSelect.length; i++) {\n (function(i){selectArray.push(new CustomSelect(customSelect[i]));})(i);\n }\n\n // listen for key events\n window.addEventListener('keyup', function(event){\n if( event.keyCode && event.keyCode == 27 || event.key && event.key.toLowerCase() == 'escape' ) {\n // close custom select on 'Esc'\n selectArray.forEach(function(element){\n moveFocusToSelectTrigger(element); // if focus is within dropdown, move it to dropdown trigger\n toggleCustomSelect(element, 'false'); // close dropdown\n });\n } \n });\n // close custom select when clicking outside it\n window.addEventListener('click', function(event){\n selectArray.forEach(function(element){\n checkCustomSelectClick(element, event.target);\n });\n });\n }\n});","// File#: _1_anim-menu-btn\n// Usage: codyhouse.co/license\n$(document).ready(function(){\n var menuBtns = document.getElementsByClassName('js-anim-menu-btn');\n if( menuBtns.length > 0 ) {\n for(var i = 0; i < menuBtns.length; i++) {(function(i){\n initMenuBtn(menuBtns[i]);\n })(i);}\n\n function initMenuBtn(btn) {\n btn.addEventListener('click', function(event){\t\n event.preventDefault();\n var status = !Util.hasClass(btn, 'anim-menu-btn--state-b');\n Util.toggleClass(btn, 'anim-menu-btn--state-b', status);\n // emit custom event\n var event = new CustomEvent('anim-menu-btn-clicked', {detail: status});\n btn.dispatchEvent(event);\n });\n };\n }\n});","// File#: _1_sub-navigation\n// Usage: codyhouse.co/license\n$(document).ready(function() {\n var SideNav = function(element) {\n this.element = element;\n this.control = this.element.getElementsByClassName('js-subnav__control');\n this.navList = this.element.getElementsByClassName('js-subnav__wrapper');\n this.closeBtn = this.element.getElementsByClassName('js-subnav__close-btn');\n this.firstFocusable = getFirstFocusable(this);\n this.showClass = 'subnav__wrapper--is-visible';\n this.collapsedLayoutClass = 'subnav--collapsed';\n initSideNav(this);\n };\n\n function getFirstFocusable(sidenav) { // get first focusable element inside the subnav\n if(sidenav.navList.length == 0) return;\n var focusableEle = sidenav.navList[0].querySelectorAll('[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex=\"-1\"]), [contenteditable], audio[controls], video[controls], summary'),\n firstFocusable = false;\n for(var i = 0; i < focusableEle.length; i++) {\n if( focusableEle[i].offsetWidth || focusableEle[i].offsetHeight || focusableEle[i].getClientRects().length ) {\n firstFocusable = focusableEle[i];\n break;\n }\n }\n\n return firstFocusable;\n };\n\n function initSideNav(sidenav) {\n checkSideNavLayout(sidenav); // switch from --compressed to --expanded layout\n initSideNavToggle(sidenav); // mobile behavior + layout update on resize\n };\n\n function initSideNavToggle(sidenav) { \n // custom event emitted when window is resized\n sidenav.element.addEventListener('update-sidenav', function(event){\n checkSideNavLayout(sidenav);\n });\n\n // mobile only\n if(sidenav.control.length == 0 || sidenav.navList.length == 0) return;\n sidenav.control[0].addEventListener('click', function(event){ // open sidenav\n openSideNav(sidenav, event);\n });\n sidenav.element.addEventListener('click', function(event) { // close sidenav when clicking on close button/bg layer\n if(event.target.closest('.js-subnav__close-btn') || Util.hasClass(event.target, 'js-subnav__wrapper')) {\n closeSideNav(sidenav, event);\n }\n });\n };\n\n function openSideNav(sidenav, event) { // open side nav - mobile only\n event.preventDefault();\n sidenav.selectedTrigger = event.target;\n event.target.setAttribute('aria-expanded', 'true');\n Util.addClass(sidenav.navList[0], sidenav.showClass);\n sidenav.navList[0].addEventListener('transitionend', function cb(event){\n sidenav.navList[0].removeEventListener('transitionend', cb);\n sidenav.firstFocusable.focus();\n });\n };\n\n function closeSideNav(sidenav, event, bool) { // close side sidenav - mobile only\n if( !Util.hasClass(sidenav.navList[0], sidenav.showClass) ) return;\n if(event) event.preventDefault();\n Util.removeClass(sidenav.navList[0], sidenav.showClass);\n if(!sidenav.selectedTrigger) return;\n sidenav.selectedTrigger.setAttribute('aria-expanded', 'false');\n if(!bool) sidenav.selectedTrigger.focus();\n sidenav.selectedTrigger = false; \n };\n\n function checkSideNavLayout(sidenav) { // switch from --compressed to --expanded layout\n var layout = getComputedStyle(sidenav.element, ':before').getPropertyValue('content').replace(/\\'|\"/g, '');\n if(layout != 'expanded' && layout != 'collapsed') return;\n Util.toggleClass(sidenav.element, sidenav.collapsedLayoutClass, layout != 'expanded');\n };\n \n var sideNav = document.getElementsByClassName('js-subnav'),\n SideNavArray = [],\n j = 0;\n if( sideNav.length > 0) {\n for(var i = 0; i < sideNav.length; i++) {\n var beforeContent = getComputedStyle(sideNav[i], ':before').getPropertyValue('content');\n if(beforeContent && beforeContent !='' && beforeContent !='none') {\n j = j + 1;\n }\n (function(i){SideNavArray.push(new SideNav(sideNav[i]));})(i);\n }\n\n if(j > 0) { // on resize - update sidenav layout\n var resizingId = false,\n customEvent = new CustomEvent('update-sidenav');\n window.addEventListener('resize', function(event){\n clearTimeout(resizingId);\n resizingId = setTimeout(doneResizing, 300);\n });\n\n function doneResizing() {\n for( var i = 0; i < SideNavArray.length; i++) {\n (function(i){SideNavArray[i].element.dispatchEvent(customEvent)})(i);\n };\n };\n\n (window.requestAnimationFrame) // init table layout\n ? window.requestAnimationFrame(doneResizing)\n : doneResizing();\n }\n\n // listen for key events\n window.addEventListener('keyup', function(event){\n if( (event.keyCode && event.keyCode == 27) || (event.key && event.key.toLowerCase() == 'escape' )) {// listen for esc key - close navigation on mobile if open\n for(var i = 0; i < SideNavArray.length; i++) {\n (function(i){closeSideNav(SideNavArray[i], event);})(i);\n };\n }\n if( (event.keyCode && event.keyCode == 9) || (event.key && event.key.toLowerCase() == 'tab' )) { // listen for tab key - close navigation on mobile if open when nav loses focus\n if( document.activeElement.closest('.js-subnav__wrapper')) return;\n for(var i = 0; i < SideNavArray.length; i++) {\n (function(i){closeSideNav(SideNavArray[i], event, true);})(i);\n };\n }\n });\n }\n});","// File#: _1_date-picker\n// Usage: codyhouse.co/license\n$(document).ready(function(){\n var DatePicker = function(opts) {\n this.options = Util.extend(DatePicker.defaults , opts);\n this.element = this.options.element;\n this.input = this.element.getElementsByClassName('js-date-input__text')[0];\n this.trigger = this.element.getElementsByClassName('js-date-input__trigger')[0];\n this.datePicker = this.element.getElementsByClassName('js-date-picker')[0];\n this.body = this.datePicker.getElementsByClassName('js-date-picker__dates')[0];\n this.navigation = this.datePicker.getElementsByClassName('js-date-picker__month-nav')[0];\n this.heading = this.datePicker.getElementsByClassName('js-date-picker__month-label')[0];\n this.pickerVisible = false;\n // date format\n this.dateIndexes = getDateIndexes(this); // store indexes of date parts (d, m, y)\n // set initial date\n resetCalendar(this);\n // selected date\n this.dateSelected = false;\n this.selectedDay = false;\n this.selectedMonth = false;\n this.selectedYear = false;\n // focus trap\n this.firstFocusable = false;\n this.lastFocusable = false;\n initCalendarAria(this);\n initCalendarEvents(this);\n };\n\n DatePicker.prototype.showCalendar = function() {\n showCalendar(this);\n };\n\n DatePicker.prototype.showNextMonth = function() {\n showNext(this, true);\n };\n\n DatePicker.prototype.showPrevMonth = function() {\n showPrev(this, true);\n };\n\n function initCalendarAria(datePicker) {\n // reset calendar button label\n resetLabelCalendarTrigger(datePicker);\n // create a live region used to announce new month selection to SR\n var srLiveReagion = document.createElement('div');\n srLiveReagion.setAttribute('aria-live', 'polite');\n Util.addClass(srLiveReagion, 'sr-only js-date-input__sr-live');\n datePicker.element.appendChild(srLiveReagion);\n datePicker.srLiveReagion = datePicker.element.getElementsByClassName('js-date-input__sr-live')[0];\n };\n\n function initCalendarEvents(datePicker) {\n datePicker.input.addEventListener('focus', function(event){\n toggleCalendar(datePicker, true); // toggle calendar when focus is on input\n });\n if(datePicker.trigger) {\n datePicker.trigger.addEventListener('click', function(event){ // open calendar when clicking on calendar button\n datePicker.pickerVisible = false;\n toggleCalendar(datePicker);\n datePicker.trigger.setAttribute('aria-expanded', 'true');\n });\n }\n\n // select a date inside the date picker\n datePicker.body.addEventListener('click', function(event){\n event.preventDefault();\n var day = event.target.closest('button');\n if(day) {\n datePicker.dateSelected = true;\n datePicker.selectedDay = day.innerText;\n datePicker.selectedMonth = datePicker.currentMonth;\n datePicker.selectedYear = datePicker.currentYear;\n setInputValue(datePicker);\n datePicker.input.focus(); // focus on the input element and close picker\n resetLabelCalendarTrigger(datePicker);\n }\n });\n\n // navigate using month nav\n datePicker.navigation.addEventListener('click', function(event){\n event.preventDefault();\n var btn = event.target.closest('.js-date-picker__month-nav-btn');\n if(btn) {\n Util.hasClass(btn, 'js-date-picker__month-nav-btn--prev') ? showPrev(datePicker, true) : showNext(datePicker, true);\n }\n });\n\n // hide calendar\n window.addEventListener('keydown', function(event){ // close calendar on esc\n if(event.keyCode && event.keyCode == 27 || event.key && event.key.toLowerCase() == 'escape') {\n if(document.activeElement. closest('.js-date-picker')) {\n datePicker.input.focus(); //if focus is inside the calendar -> move the focus to the input element\n } else { // do not move focus -> only close calendar\n hideCalendar(datePicker);\n }\n }\n });\n window.addEventListener('click', function(event){\n if(!event.target.closest('.js-date-picker') && !event.target.closest('.js-date-input') && datePicker.pickerVisible) {\n hideCalendar(datePicker);\n }\n });\n\n // navigate through days of calendar\n datePicker.body.addEventListener('keydown', function(event){\n var day = datePicker.currentDay;\n if(event.keyCode && event.keyCode == 40 || event.key && event.key.toLowerCase() == 'arrowdown') {\n day = day + 7;\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 39 || event.key && event.key.toLowerCase() == 'arrowright') {\n day = day + 1;\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 37 || event.key && event.key.toLowerCase() == 'arrowleft') {\n day = day - 1;\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 38 || event.key && event.key.toLowerCase() == 'arrowup') {\n day = day - 7;\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 35 || event.key && event.key.toLowerCase() == 'end') { // move focus to last day of week\n event.preventDefault();\n day = day + 6 - getDayOfWeek(datePicker.currentYear, datePicker.currentMonth, day);\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 36 || event.key && event.key.toLowerCase() == 'home') { // move focus to first day of week\n event.preventDefault();\n day = day - getDayOfWeek(datePicker.currentYear, datePicker.currentMonth, day);\n resetDayValue(day, datePicker);\n } else if(event.keyCode && event.keyCode == 34 || event.key && event.key.toLowerCase() == 'pagedown') {\n event.preventDefault();\n showNext(datePicker); // show next month\n } else if(event.keyCode && event.keyCode == 33 || event.key && event.key.toLowerCase() == 'pageup') {\n event.preventDefault();\n showPrev(datePicker); // show prev month\n }\n });\n\n // trap focus inside calendar\n datePicker.datePicker.addEventListener('keydown', function(event){\n if( event.keyCode && event.keyCode == 9 || event.key && event.key == 'Tab' ) {\n //trap focus inside modal\n trapFocus(event, datePicker);\n }\n });\n\n datePicker.input.addEventListener('keydown', function(event){\n if(event.keyCode && event.keyCode == 13 || event.key && event.key.toLowerCase() == 'enter') {\n // update calendar on input enter\n resetCalendar(datePicker);\n resetLabelCalendarTrigger(datePicker);\n hideCalendar(datePicker);\n } else if(event.keyCode && event.keyCode == 40 || event.key && event.key.toLowerCase() == 'arrowdown' && datePicker.pickerVisible) { // move focus to calendar using arrow down\n datePicker.body.querySelector('button[tabindex=\"0\"]').focus();\n };\n });\n };\n\n function getCurrentDay(date) {\n return (date)\n ? new Date(date).getUTCDate()\n : new Date().getUTCDate();\n };\n\n function getCurrentMonth(date) {\n return (date)\n ? new Date(date).getUTCMonth()\n : new Date().getUTCMonth();\n };\n\n function getCurrentYear(date) {\n return (date)\n ? new Date(date).getUTCFullYear()\n : new Date().getUTCFullYear();\n };\n\n function showNext(datePicker, bool) {\n // show next month\n datePicker.currentYear = (datePicker.currentMonth === 11) ? datePicker.currentYear + 1 : datePicker.currentYear;\n datePicker.currentMonth = (datePicker.currentMonth + 1) % 12;\n datePicker.currentDay = checkDayInMonth(datePicker);\n showCalendar(datePicker, bool);\n datePicker.srLiveReagion.textContent = datePicker.options.months[datePicker.currentMonth] + ' ' + datePicker.currentYear;\n };\n\n function showPrev(datePicker, bool) {\n // show prev month\n datePicker.currentYear = (datePicker.currentMonth === 0) ? datePicker.currentYear - 1 : datePicker.currentYear;\n datePicker.currentMonth = (datePicker.currentMonth === 0) ? 11 : datePicker.currentMonth - 1;\n datePicker.currentDay = checkDayInMonth(datePicker);\n showCalendar(datePicker, bool);\n datePicker.srLiveReagion.textContent = datePicker.options.months[datePicker.currentMonth] + ' ' + datePicker.currentYear;\n };\n\n function checkDayInMonth(datePicker) {\n return (datePicker.currentDay > daysInMonth(datePicker.currentYear, datePicker.currentMonth)) ? 1 : datePicker.currentDay;\n };\n\n function daysInMonth(year, month) {\n return 32 - new Date(year, month, 32).getDate();\n };\n\n function resetCalendar(datePicker) {\n var currentDate = false,\n selectedDate = datePicker.input.value;\n\n datePicker.dateSelected = false;\n if( selectedDate != '') {\n var date = getDateFromInput(datePicker);\n datePicker.dateSelected = true;\n currentDate = date;\n }\n datePicker.currentDay = getCurrentDay(currentDate);\n datePicker.currentMonth = getCurrentMonth(currentDate);\n datePicker.currentYear = getCurrentYear(currentDate);\n\n datePicker.selectedDay = datePicker.dateSelected ? datePicker.currentDay : false;\n datePicker.selectedMonth = datePicker.dateSelected ? datePicker.currentMonth : false;\n datePicker.selectedYear = datePicker.dateSelected ? datePicker.currentYear : false;\n };\n\n function showCalendar(datePicker, bool) {\n // show calendar element\n var firstDay = getDayOfWeek(datePicker.currentYear, datePicker.currentMonth, '01');\n datePicker.body.innerHTML = '';\n datePicker.heading.innerHTML = datePicker.options.months[datePicker.currentMonth] + ' ' + datePicker.currentYear;\n\n // creating all cells\n var date = 1,\n calendar = '';\n for (var i = 0; i < 6; i++) {\n for (var j = 0; j < 7; j++) {\n if (i === 0 && j < firstDay) {\n calendar = calendar + '
  • ';\n } else if (date > daysInMonth(datePicker.currentYear, datePicker.currentMonth)) {\n break;\n } else {\n var classListDate = '',\n tabindexValue = '-1';\n if (date === datePicker.currentDay) {\n tabindexValue = '0';\n }\n if (datePicker.dateSelected && date === datePicker.selectedDay && datePicker.currentYear === datePicker.selectedYear && datePicker.currentMonth === datePicker.selectedMonth) {\n classListDate = classListDate+' date-picker__date--selected';\n }\n calendar = calendar + '
  • ';\n date++;\n }\n }\n }\n datePicker.body.innerHTML = calendar; // appending days into calendar body\n\n // show calendar\n if(!datePicker.pickerVisible) Util.addClass(datePicker.datePicker, 'date-picker--is-visible');\n datePicker.pickerVisible = true;\n\n // if bool is false, move focus to calendar day\n if(!bool) datePicker.body.querySelector('button[tabindex=\"0\"]').focus();\n\n // store first/last focusable elements\n getFocusableElements(datePicker);\n };\n\n function hideCalendar(datePicker) {\n Util.removeClass(datePicker.datePicker, 'date-picker--is-visible');\n datePicker.pickerVisible = false;\n\n // reset first/last focusable\n datePicker.firstFocusable = false;\n datePicker.lastFocusable = false;\n\n // reset trigger aria-expanded attribute\n if(datePicker.trigger) datePicker.trigger.setAttribute('aria-expanded', 'false');\n };\n\n function toggleCalendar(datePicker, bool) {\n if(!datePicker.pickerVisible) {\n resetCalendar(datePicker);\n showCalendar(datePicker, bool);\n } else {\n hideCalendar(datePicker);\n }\n };\n\n function getDayOfWeek(year, month, day) {\n var weekDay = (new Date(year, month, day)).getDay() - 1;\n if(weekDay < 0) weekDay = 6;\n return weekDay;\n };\n\n function getDateIndexes(datePicker) {\n var dateFormat = datePicker.options.dateFormat.toLowerCase().replace(/-/g, '');\n return [dateFormat.indexOf('d'), dateFormat.indexOf('m'), dateFormat.indexOf('y')];\n };\n\n function setInputValue(datePicker) {\n var dateArray = [];\n dateArray[datePicker.dateIndexes[0]] = getReadableDate(datePicker.selectedDay);\n dateArray[datePicker.dateIndexes[1]] = getReadableDate(datePicker.selectedMonth+1);\n dateArray[datePicker.dateIndexes[2]] = datePicker.selectedYear;\n datePicker.input.value = dateArray[0]+datePicker.options.dateSeparator+dateArray[1]+datePicker.options.dateSeparator+dateArray[2];\n };\n\n function getDateFromInput(datePicker) {\n var dateArray = datePicker.input.value.split(datePicker.options.dateSeparator);\n return dateArray[datePicker.dateIndexes[2]]+'-'+dateArray[datePicker.dateIndexes[1]]+'-'+dateArray[datePicker.dateIndexes[0]];\n };\n\n function getReadableDate(date) {\n return (date < 10) ? '0'+date : date;\n };\n\n function resetDayValue(day, datePicker) {\n var totDays = daysInMonth(datePicker.currentYear, datePicker.currentMonth);\n if( day > totDays) {\n datePicker.currentDay = day - totDays;\n showNext(datePicker, false);\n } else if(day < 1) {\n var newMonth = datePicker.currentMonth == 0 ? 11 : datePicker.currentMonth - 1;\n datePicker.currentDay = daysInMonth(datePicker.currentYear, newMonth) + day;\n showPrev(datePicker, false);\n } else {\n datePicker.currentDay = day;\n datePicker.body.querySelector('button[tabindex=\"0\"]').setAttribute('tabindex', '-1');\n // set new tabindex to selected item\n var buttons = datePicker.body.getElementsByTagName(\"button\");\n for (var i = 0; i < buttons.length; i++) {\n if (buttons[i].textContent == datePicker.currentDay) {\n buttons[i].setAttribute('tabindex', '0');\n buttons[i].focus();\n break;\n }\n }\n getFocusableElements(datePicker); // update first focusable/last focusable element\n }\n };\n\n function resetLabelCalendarTrigger(datePicker) {\n if(!datePicker.trigger) return;\n // reset accessible label of the calendar trigger\n (datePicker.selectedYear && datePicker.selectedMonth && datePicker.selectedDay)\n ? datePicker.trigger.setAttribute('aria-label', 'Choose date, selected date is '+ new Date(datePicker.selectedYear, datePicker.selectedMonth, datePicker.selectedDay).toDateString())\n : datePicker.trigger.setAttribute('aria-label', 'Choose date');\n };\n\n function getFocusableElements(datePicker) {\n var allFocusable = datePicker.datePicker.querySelectorAll('[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex=\"-1\"]), [contenteditable], audio[controls], video[controls], summary');\n getFirstFocusable(allFocusable, datePicker);\n getLastFocusable(allFocusable, datePicker);\n }\n\n function getFirstFocusable(elements, datePicker) {\n for(var i = 0; i < elements.length; i++) {\n if( (elements[i].offsetWidth || elements[i].offsetHeight || elements[i].getClientRects().length) && elements[i].getAttribute('tabindex') != '-1') {\n datePicker.firstFocusable = elements[i];\n return true;\n }\n }\n };\n\n function getLastFocusable(elements, datePicker) {\n //get last visible focusable element inside the modal\n for(var i = elements.length - 1; i >= 0; i--) {\n if( (elements[i].offsetWidth || elements[i].offsetHeight || elements[i].getClientRects().length) && elements[i].getAttribute('tabindex') != '-1' ) {\n datePicker.lastFocusable = elements[i];\n return true;\n }\n }\n };\n\n function trapFocus(event, datePicker) {\n if( datePicker.firstFocusable == document.activeElement && event.shiftKey) {\n //on Shift+Tab -> focus last focusable element when focus moves out of calendar\n event.preventDefault();\n datePicker.lastFocusable.focus();\n }\n if( datePicker.lastFocusable == document.activeElement && !event.shiftKey) {\n //on Tab -> focus first focusable element when focus moves out of calendar\n event.preventDefault();\n datePicker.firstFocusable.focus();\n }\n };\n\n DatePicker.defaults = {\n element : '',\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n dateFormat: 'm-d-y',\n dateSeparator: '/'\n };\n\n window.DatePicker = DatePicker;\n\n var datePicker = document.getElementsByClassName('js-date-input'),\n flexSupported = Util.cssSupports('align-items', 'stretch');\n if( datePicker.length > 0 ) {\n for( var i = 0; i < datePicker.length; i++) {(function(i){\n if(!flexSupported) {\n Util.addClass(datePicker[i], 'date-input--hide-calendar');\n return;\n }\n var opts = {element: datePicker[i]};\n if(datePicker[i].getAttribute('data-date-format')) {\n opts.dateFormat = datePicker[i].getAttribute('data-date-format');\n }\n if(datePicker[i].getAttribute('data-date-separator')) {\n opts.dateSeparator = datePicker[i].getAttribute('data-date-separator');\n }\n if(datePicker[i].getAttribute('data-months')) {\n opts.months = datePicker[i].getAttribute('data-months').split(',').map(function(item) {return item.trim();});\n }\n new DatePicker(opts);\n })(i);}\n }\n});\n\n","// File#: _1_expandable-table\n// Usage: codyhouse.co/license\n\n$(document).ready(function() {\n var ExTable = function(element) {\n this.element = element;\n this.rows = this.element.getElementsByClassName('js-ex-table__body')[0].getElementsByTagName('tr');\n this.layout = '';\n getTableLayout(this);\n initTable(this);\n };\n\n function initTable(table) {\n // init aria-expanded attributes for 'More' buttons\n var moreButtons = table.element.getElementsByClassName('js-ex-table__btn');\n for(var i = 0; i < moreButtons.length; i++) {\n var rowExpanded = moreButtons[i].closest('.ex-table__row--show-more-content') ? true : false;\n moreButtons[i].setAttribute('aria-expanded', rowExpanded);\n }\n \n // custom event emitted when window is resized\n table.element.addEventListener('update-table', function(event){\n checkTableLayout(table);\n resetTableStyle(table);\n });\n\n // detect click on more Button - toggle additional table content\n table.element.addEventListener('click', function(event){\n var button = event.target.closest('.js-ex-table__btn');\n if(!button) return;\n var tableRow = button.parentNode.parentNode,\n showMore = !Util.hasClass(tableRow, 'ex-table__row--show-more-content');\n Util.toggleClass(tableRow, 'ex-table__row--show-more-content', showMore);\n button.setAttribute('aria-expanded', showMore);\n if(!showMore) resetRowStyle(table, tableRow, showMore);\n resetTableStyle(table);\n });\n };\n\n function getTableLayout(table) {\n table.layout = getComputedStyle(table.element, ':before').getPropertyValue('content').replace(/\\'|\"/g, '');\n };\n\n function checkTableLayout(table) { // check table layout\n getTableLayout(table);\n Util.toggleClass(table.element, tableExpandedLayoutClass, table.layout != 'collapsed');\n Util.addClass(table.element, 'ex-table--loaded');\n };\n\n function resetTableStyle(table) { // update table style according to layout\n for(var i = 0; i < table.rows.length; i++) {\n if( Util.hasClass(table.rows[i], 'ex-table__row--show-more-content')) {\n resetRowStyle(table, table.rows[i], true);\n }\n }\n };\n\n function resetRowStyle(table, row, showBool) {\n var content = row.getElementsByClassName('js-ex-table__more-content');\n if(content.length== 0 ) return;\n if(table.layout == 'expanded') {\n resetExpandedRowStyle(table, row, content[0], showBool);\n } else {\n resetCompressedRowStyle(row, content[0]);\n }\n };\n\n function resetExpandedRowStyle(table, row, content, showBool) {\n // row style applied when table layout is expanded\n if(showBool) {\n var offsetHeight = content.offsetHeight,\n cells = row.children;\n for(var i = 0; i < cells.length; i++) {\n cells[i].setAttribute('style', 'border-bottom-width:'+offsetHeight+'px;');\n }\n content.setAttribute('style', 'top: '+parseFloat(row.offsetHeight + row.offsetTop - offsetHeight)+'px;');\n } else {\n resetCompressedRowStyle(row, content);\n }\n };\n\n function resetCompressedRowStyle(row, content) {\n // row style applied when table layout is compressed\n content.removeAttribute('style');\n var cells = row.children;\n for(var i = 0; i < cells.length; i++) {\n cells[i].removeAttribute('style');\n }\n };\n\n var tables = document.getElementsByClassName('js-ex-table'),\n tableExpandedLayoutClass = 'ex-table--expanded';\n if( tables.length > 0 ) {\n var j = 0,\n arrayTables = [];\n for( var i = 0; i < tables.length; i++) {\n var beforeContent = getComputedStyle(tables[i], ':before').getPropertyValue('content');\n if(beforeContent && beforeContent !='' && beforeContent !='none') {\n (function(i){ arrayTables.push(new ExTable(tables[i]));})(i);\n j = j + 1;\n } else {\n Util.addClass(tables[i], 'ex-table--loaded');\n }\n }\n \n if(j > 0) {\n var resizingId = false,\n customEvent = new CustomEvent('update-table');\n window.addEventListener('resize', function(event){ // update table layout on resize\n clearTimeout(resizingId);\n resizingId = setTimeout(doneResizing, 300);\n });\n\n function doneResizing() {\n for( var i = 0; i < arrayTables.length; i++) {\n (function(i){arrayTables[i].element.dispatchEvent(customEvent)})(i);\n };\n };\n\n (window.requestAnimationFrame) // init tables\n ? window.requestAnimationFrame(doneResizing)\n : doneResizing();\n }\n }\n});","// File#: _1_responsive-sidebar\n// Usage: codyhouse.co/license\n$(document).ready(function() {\n var Sidebar = function(element) {\n this.element = element;\n this.triggers = document.querySelectorAll('[aria-controls=\"'+this.element.getAttribute('id')+'\"]');\n this.firstFocusable = null;\n this.lastFocusable = null;\n this.selectedTrigger = null;\n this.showClass = \"sidebar--is-visible\";\n this.staticClass = \"sidebar--static\";\n this.readyClass = \"sidebar--loaded\";\n this.layout = false; // this will be static or mobile\n initSidebar(this);\n };\n \n function initSidebar(sidebar) {\n initSidebarResize(sidebar); // handle changes in layout -> mobile to static and viceversa\n \n if ( sidebar.triggers ) { // open sidebar when clicking on trigger buttons - mobile layout only\n for(var i = 0; i < sidebar.triggers.length; i++) {\n sidebar.triggers[i].addEventListener('click', function(event) {\n event.preventDefault();\n if(Util.hasClass(sidebar.element, sidebar.showClass)) return;\n sidebar.selectedTrigger = event.target;\n showSidebar(sidebar);\n initSidebarEvents(sidebar);\n });\n }\n }\n };\n\n function showSidebar(sidebar) { // mobile layout only\n Util.addClass(sidebar.element, sidebar.showClass);\n getFocusableElements(sidebar);\n Util.moveFocus(sidebar.element);\n };\n\n function closeSidebar(sidebar) { // mobile layout only\n Util.removeClass(sidebar.element, sidebar.showClass);\n sidebar.firstFocusable = null;\n sidebar.lastFocusable = null;\n if(sidebar.selectedTrigger) sidebar.selectedTrigger.focus();\n sidebar.element.removeAttribute('tabindex');\n //remove listeners\n cancelSidebarEvents(sidebar);\n };\n\n function initSidebarEvents(sidebar) { // mobile layout only\n //add event listeners\n sidebar.element.addEventListener('keydown', handleEvent.bind(sidebar));\n sidebar.element.addEventListener('click', handleEvent.bind(sidebar));\n };\n\n function cancelSidebarEvents(sidebar) { // mobile layout only\n //remove event listeners\n sidebar.element.removeEventListener('keydown', handleEvent.bind(sidebar));\n sidebar.element.removeEventListener('click', handleEvent.bind(sidebar));\n };\n\n function handleEvent(event) { // mobile layout only\n switch(event.type) {\n case 'click': {\n initClick(this, event);\n }\n case 'keydown': {\n initKeyDown(this, event);\n }\n }\n };\n\n function initKeyDown(sidebar, event) { // mobile layout only\n if( event.keyCode && event.keyCode == 27 || event.key && event.key == 'Escape' ) {\n //close sidebar window on esc\n closeSidebar(sidebar);\n } else if( event.keyCode && event.keyCode == 9 || event.key && event.key == 'Tab' ) {\n //trap focus inside sidebar\n trapFocus(sidebar, event);\n }\n };\n\n function initClick(sidebar, event) { // mobile layout only\n //close sidebar when clicking on close button or sidebar bg layer \n if( !event.target.closest('.js-sidebar__close-btn') && !Util.hasClass(event.target, 'js-sidebar') ) return;\n event.preventDefault();\n closeSidebar(sidebar);\n };\n\n function trapFocus(sidebar, event) { // mobile layout only\n if( sidebar.firstFocusable == document.activeElement && event.shiftKey) {\n //on Shift+Tab -> focus last focusable element when focus moves out of sidebar\n event.preventDefault();\n sidebar.lastFocusable.focus();\n }\n if( sidebar.lastFocusable == document.activeElement && !event.shiftKey) {\n //on Tab -> focus first focusable element when focus moves out of sidebar\n event.preventDefault();\n sidebar.firstFocusable.focus();\n }\n };\n\n function initSidebarResize(sidebar) {\n // custom event emitted when window is resized - detect only if the sidebar--static@{breakpoint} class was added\n var beforeContent = getComputedStyle(sidebar.element, ':before').getPropertyValue('content');\n if(beforeContent && beforeContent !='' && beforeContent !='none') {\n checkSidebarLayour(sidebar);\n\n sidebar.element.addEventListener('update-sidebar', function(event){\n checkSidebarLayour(sidebar);\n });\n } \n Util.addClass(sidebar.element, sidebar.readyClass);\n };\n\n function checkSidebarLayour(sidebar) {\n var layout = getComputedStyle(sidebar.element, ':before').getPropertyValue('content').replace(/\\'|\"/g, '');\n if(layout == sidebar.layout) return;\n sidebar.layout = layout;\n if(layout != 'static') Util.addClass(sidebar.element, 'is-hidden');\n Util.toggleClass(sidebar.element, sidebar.staticClass, layout == 'static');\n if(layout != 'static') setTimeout(function(){Util.removeClass(sidebar.element, 'is-hidden')});\n // reset element role \n (layout == 'static') ? sidebar.element.removeAttribute('role', 'alertdialog') : sidebar.element.setAttribute('role', 'alertdialog');\n // reset mobile behaviour\n if(layout == 'static' && Util.hasClass(sidebar.element, sidebar.showClass)) closeSidebar(sidebar);\n };\n\n function getFocusableElements(sidebar) {\n //get all focusable elements inside the drawer\n var allFocusable = sidebar.element.querySelectorAll('[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex=\"-1\"]), [contenteditable], audio[controls], video[controls], summary');\n getFirstVisible(sidebar, allFocusable);\n getLastVisible(sidebar, allFocusable);\n };\n\n function getFirstVisible(sidebar, elements) {\n //get first visible focusable element inside the sidebar\n for(var i = 0; i < elements.length; i++) {\n if( elements[i].offsetWidth || elements[i].offsetHeight || elements[i].getClientRects().length ) {\n sidebar.firstFocusable = elements[i];\n return true;\n }\n }\n };\n\n function getLastVisible(sidebar, elements) {\n //get last visible focusable element inside the sidebar\n for(var i = elements.length - 1; i >= 0; i--) {\n if( elements[i].offsetWidth || elements[i].offsetHeight || elements[i].getClientRects().length ) {\n sidebar.lastFocusable = elements[i];\n return true;\n }\n }\n };\n\n //initialize the Sidebar objects\n var sidebar = document.getElementsByClassName('js-sidebar');\n if( sidebar.length > 0 ) {\n for( var i = 0; i < sidebar.length; i++) {\n (function(i){new Sidebar(sidebar[i]);})(i);\n }\n // switch from mobile to static layout\n var customEvent = new CustomEvent('update-sidebar');\n window.addEventListener('resize', function(event){\n (!window.requestAnimationFrame) ? setTimeout(function(){resetLayout();}, 250) : window.requestAnimationFrame(resetLayout);\n });\n\n function resetLayout() {\n for( var i = 0; i < sidebar.length; i++) {\n (function(i){sidebar[i].dispatchEvent(customEvent)})(i);\n };\n };\n }\n});","// File#: _1_alert\n// Usage: codyhouse.co/license\n$(document).ready(function() {\n var alertClose = document.getElementsByClassName('js-alert__close-btn');\n if( alertClose.length > 0 ) {\n for( var i = 0; i < alertClose.length; i++) {\n (function(i){initAlertEvent(alertClose[i]);})(i);\n }\n };\n});\n\nfunction initAlertEvent(element) {\n element.addEventListener('click', function(event){\n event.preventDefault();\n Util.removeClass(element.closest('.js-alert'), 'alert--is-visible');\n });\n};","// File#: _1_progress-bar\n// Usage: codyhouse.co/license\n$(document).ready(function() {\n var ProgressBar = function(element) {\n this.element = element;\n this.fill = this.element.getElementsByClassName('progress-bar__fill')[0];\n this.label = this.element.getElementsByClassName('progress-bar__value');\n this.value = getProgressBarValue(this);\n // before checking if data-animation is set -> check for reduced motion\n updatedProgressBarForReducedMotion(this);\n this.animate = this.element.hasAttribute('data-animation') && this.element.getAttribute('data-animation') == 'on';\n this.animationDuration = this.element.hasAttribute('data-duration') ? this.element.getAttribute('data-duration') : 1000;\n // animation will run only on browsers supporting IntersectionObserver\n this.canAnimate = ('IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype);\n // this element is used to announce the percentage value to SR\n this.ariaLabel = this.element.getElementsByClassName('js-progress-bar__aria-value');\n // check if we need to update the bar color\n this.changeColor = Util.hasClass(this.element, 'progress-bar--color-update') && Util.cssSupports('color', 'var(--color-value)');\n if(this.changeColor) {\n this.colorThresholds = getProgressBarColorThresholds(this);\n }\n initProgressBar(this);\n // store id to reset animation\n this.animationId = false;\n }; \n\n function getProgressBarValue(progressBar) { // get progress value\n // return (fill width/total width) * 100\n return parseInt(progressBar.fill.offsetWidth*100/progressBar.element.getElementsByClassName('progress-bar__bg')[0].offsetWidth);\n };\n\n function getProgressBarColorThresholds(progressBar) {\n var thresholds = [];\n var i = 1;\n while (!isNaN(parseInt(getComputedStyle(progressBar.element).getPropertyValue('--progress-bar-color-'+i)))) {\n thresholds.push(parseInt(getComputedStyle(progressBar.element).getPropertyValue('--progress-bar-color-'+i)));\n i = i + 1;\n }\n return thresholds;\n };\n\n function updatedProgressBarForReducedMotion(progressBar) {\n // if reduced motion is supported and set to reduced -> remove animations\n if(osHasReducedMotion) progressBar.element.removeAttribute('data-animation');\n };\n\n function initProgressBar(progressBar) {\n // set initial bar color\n if(progressBar.changeColor) updateProgressBarColor(progressBar, progressBar.value);\n // if data-animation is on -> reset the progress bar and animate when entering the viewport\n if(progressBar.animate && progressBar.canAnimate) animateProgressBar(progressBar);\n // reveal fill and label -> --animate and --color-update variations only\n setTimeout(function(){Util.addClass(progressBar.element, 'progress-bar--init');}, 30);\n\n // dynamically update value of progress bar\n progressBar.element.addEventListener('updateProgress', function(event){\n // cancel request animation frame if it was animating\n if(progressBar.animationId) window.cancelAnimationFrame(progressBar.animationId);\n \n var final = event.detail.value,\n duration = (event.detail.duration) ? event.detail.duration : progressBar.animationDuration;\n var start = getProgressBarValue(progressBar);\n // trigger update animation\n updateProgressBar(progressBar, start, final, duration, function(){\n emitProgressBarEvents(progressBar, 'progressCompleted', progressBar.value+'%');\n // update value of label for SR\n if(progressBar.ariaLabel.length > 0) progressBar.ariaLabel[0].textContent = final+'%';\n });\n });\n };\n\n function animateProgressBar(progressBar) {\n // reset inital values\n setProgressBarValue(progressBar, 0);\n \n // listen for the element to enter the viewport -> start animation\n var observer = new IntersectionObserver(progressBarObserve.bind(progressBar), { threshold: [0, 0.1] });\n observer.observe(progressBar.element);\n };\n\n function progressBarObserve(entries, observer) { // observe progressBar position -> start animation when inside viewport\n var self = this;\n if(entries[0].intersectionRatio.toFixed(1) > 0 && !this.animationTriggered) {\n updateProgressBar(this, 0, this.value, this.animationDuration, function(){\n emitProgressBarEvents(self, 'progressCompleted', self.value+'%');\n });\n }\n };\n\n function updateProgressBar(progressBar, start, to, duration, cb) {\n var change = to - start,\n currentTime = null;\n\n var animateFill = function(timestamp){ \n if (!currentTime) currentTime = timestamp; \n var progress = timestamp - currentTime;\n var val = parseInt((progress/duration)*change + start);\n // make sure value is in correct range\n if(change > 0 && val > to) val = to;\n if(change < 0 && val < to) val = to;\n\n setProgressBarValue(progressBar, val);\n if(progress < duration) {\n progressBar.animationId = window.requestAnimationFrame(animateFill);\n } else {\n progressBar.animationId = false;\n cb();\n }\n };\n if ( window.requestAnimationFrame && !osHasReducedMotion ) {\n progressBar.animationId = window.requestAnimationFrame(animateFill);\n } else {\n setProgressBarValue(progressBar, to);\n cb();\n }\n };\n\n function setProgressBarValue(progressBar, value) {\n progressBar.fill.style.width = value+'%';\n if(progressBar.label.length > 0 ) progressBar.label[0].textContent = value+'%';\n if(progressBar.changeColor) updateProgressBarColor(progressBar, value);\n };\n\n function updateProgressBarColor(progressBar, value) {\n var className = 'progress-bar--fill-color-'+ progressBar.colorThresholds.length;\n for(var i = progressBar.colorThresholds.length; i > 0; i--) {\n if( !isNaN(progressBar.colorThresholds[i - 1]) && value <= progressBar.colorThresholds[i - 1]) {\n className = 'progress-bar--fill-color-' + i;\n } \n }\n \n removeProgressBarColorClasses(progressBar);\n Util.addClass(progressBar.element, className);\n };\n\n function removeProgressBarColorClasses(progressBar) {\n var classes = progressBar.element.className.split(\" \").filter(function(c) {\n return c.lastIndexOf('progress-bar--fill-color-', 0) !== 0;\n });\n progressBar.element.className = classes.join(\" \").trim();\n };\n\n function emitProgressBarEvents(progressBar, eventName, detail) {\n progressBar.element.dispatchEvent(new CustomEvent(eventName, {detail: detail}));\n };\n\n window.ProgressBar = ProgressBar;\n\n //initialize the ProgressBar objects\n var progressBars = document.getElementsByClassName('js-progress-bar');\n var osHasReducedMotion = Util.osHasReducedMotion();\n if( progressBars.length > 0 ) {\n for( var i = 0; i < progressBars.length; i++) {\n (function(i){new ProgressBar(progressBars[i]);})(i);\n }\n }\n});","// File#: _1_swipe-content\n(function() {\n var SwipeContent = function(element) {\n this.element = element;\n this.delta = [false, false];\n this.dragging = false;\n this.intervalId = false;\n initSwipeContent(this);\n };\n\n function initSwipeContent(content) {\n content.element.addEventListener('mousedown', handleEvent.bind(content));\n content.element.addEventListener('touchstart', handleEvent.bind(content));\n };\n\n function initDragging(content) {\n //add event listeners\n content.element.addEventListener('mousemove', handleEvent.bind(content));\n content.element.addEventListener('touchmove', handleEvent.bind(content));\n content.element.addEventListener('mouseup', handleEvent.bind(content));\n content.element.addEventListener('mouseleave', handleEvent.bind(content));\n content.element.addEventListener('touchend', handleEvent.bind(content));\n };\n\n function cancelDragging(content) {\n //remove event listeners\n if(content.intervalId) {\n (!window.requestAnimationFrame) ? clearInterval(content.intervalId) : window.cancelAnimationFrame(content.intervalId);\n content.intervalId = false;\n }\n content.element.removeEventListener('mousemove', handleEvent.bind(content));\n content.element.removeEventListener('touchmove', handleEvent.bind(content));\n content.element.removeEventListener('mouseup', handleEvent.bind(content));\n content.element.removeEventListener('mouseleave', handleEvent.bind(content));\n content.element.removeEventListener('touchend', handleEvent.bind(content));\n };\n\n function handleEvent(event) {\n switch(event.type) {\n case 'mousedown':\n case 'touchstart':\n startDrag(this, event);\n break;\n case 'mousemove':\n case 'touchmove':\n drag(this, event);\n break;\n case 'mouseup':\n case 'mouseleave':\n case 'touchend':\n endDrag(this, event);\n break;\n }\n };\n\n function startDrag(content, event) {\n content.dragging = true;\n // listen to drag movements\n initDragging(content);\n content.delta = [parseInt(unify(event).clientX), parseInt(unify(event).clientY)];\n // emit drag start event\n emitSwipeEvents(content, 'dragStart', content.delta, event.target);\n };\n\n function endDrag(content, event) {\n cancelDragging(content);\n // credits: https://css-tricks.com/simple-swipe-with-vanilla-javascript/\n var dx = parseInt(unify(event).clientX),\n dy = parseInt(unify(event).clientY);\n\n // check if there was a left/right swipe\n if(content.delta && (content.delta[0] || content.delta[0] === 0)) {\n var s = getSign(dx - content.delta[0]);\n\n if(Math.abs(dx - content.delta[0]) > 30) {\n (s < 0) ? emitSwipeEvents(content, 'swipeLeft', [dx, dy]) : emitSwipeEvents(content, 'swipeRight', [dx, dy]);\n }\n\n content.delta[0] = false;\n }\n // check if there was a top/bottom swipe\n if(content.delta && (content.delta[1] || content.delta[1] === 0)) {\n \tvar y = getSign(dy - content.delta[1]);\n\n \tif(Math.abs(dy - content.delta[1]) > 30) {\n \t(y < 0) ? emitSwipeEvents(content, 'swipeUp', [dx, dy]) : emitSwipeEvents(content, 'swipeDown', [dx, dy]);\n }\n\n content.delta[1] = false;\n }\n // emit drag end event\n emitSwipeEvents(content, 'dragEnd', [dx, dy]);\n content.dragging = false;\n };\n\n function drag(content, event) {\n if(!content.dragging) return;\n // emit dragging event with coordinates\n (!window.requestAnimationFrame)\n ? content.intervalId = setTimeout(function(){emitDrag.bind(content, event);}, 250)\n : content.intervalId = window.requestAnimationFrame(emitDrag.bind(content, event));\n };\n\n function emitDrag(event) {\n emitSwipeEvents(this, 'dragging', [parseInt(unify(event).clientX), parseInt(unify(event).clientY)]);\n };\n\n function unify(event) {\n // unify mouse and touch events\n return event.changedTouches ? event.changedTouches[0] : event;\n };\n\n function emitSwipeEvents(content, eventName, detail, el) {\n var trigger = false;\n if(el) trigger = el;\n // emit event with coordinates\n var event = new CustomEvent(eventName, {detail: {x: detail[0], y: detail[1], origin: trigger}});\n content.element.dispatchEvent(event);\n };\n\n function getSign(x) {\n if(!Math.sign) {\n return ((x > 0) - (x < 0)) || +x;\n } else {\n return Math.sign(x);\n }\n };\n\n window.SwipeContent = SwipeContent;\n\n //initialize the SwipeContent objects\n var swipe = document.getElementsByClassName('js-swipe-content');\n if( swipe.length > 0 ) {\n for( var i = 0; i < swipe.length; i++) {\n (function(i){new SwipeContent(swipe[i]);})(i);\n }\n }\n}());","// File#: _2_flexi-header\n// Usage: codyhouse.co/license\n$(document).ready(function() {\n var flexHeader = document.getElementsByClassName('js-f-header');\n if(flexHeader.length > 0) {\n var menuTrigger = flexHeader[0].getElementsByClassName('js-anim-menu-btn')[0],\n firstFocusableElement = getMenuFirstFocusable();\n\n // we'll use these to store the node that needs to receive focus when the mobile menu is closed \n var focusMenu = false;\n\n menuTrigger.addEventListener('anim-menu-btn-clicked', function(event){ // toggle menu visibility an small devices\n Util.toggleClass(document.getElementsByClassName('f-header__nav')[0], 'f-header__nav--is-visible', event.detail);\n menuTrigger.setAttribute('aria-expanded', event.detail);\n if(event.detail) firstFocusableElement.focus(); // move focus to first focusable element\n else if(focusMenu) {\n focusMenu.focus();\n focusMenu = false;\n }\n });\n\n // listen for key events\n window.addEventListener('keyup', function(event){\n // listen for esc key\n if( (event.keyCode && event.keyCode == 27) || (event.key && event.key.toLowerCase() == 'escape' )) {\n // close navigation on mobile if open\n if(menuTrigger.getAttribute('aria-expanded') == 'true' && isVisible(menuTrigger)) {\n focusMenu = menuTrigger; // move focus to menu trigger when menu is close\n menuTrigger.click();\n }\n }\n // listen for tab key\n if( (event.keyCode && event.keyCode == 9) || (event.key && event.key.toLowerCase() == 'tab' )) {\n // close navigation on mobile if open when nav loses focus\n if(menuTrigger.getAttribute('aria-expanded') == 'true' && isVisible(menuTrigger) && !document.activeElement.closest('.js-f-header')) menuTrigger.click();\n }\n });\n\n function getMenuFirstFocusable() {\n var focusableEle = flexHeader[0].getElementsByClassName('f-header__nav')[0].querySelectorAll('[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex=\"-1\"]), [contenteditable], audio[controls], video[controls], summary'),\n firstFocusable = false;\n for(var i = 0; i < focusableEle.length; i++) {\n if( focusableEle[i].offsetWidth || focusableEle[i].offsetHeight || focusableEle[i].getClientRects().length ) {\n firstFocusable = focusableEle[i];\n break;\n }\n }\n\n return firstFocusable;\n };\n \n function isVisible(element) {\n return (element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n };\n }\n});","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\nimport './components/_1_header'\nimport './components/_1_custom-select'\nimport './components/_1_anim-menu-btn'\nimport './components/_1_sub-navigation'\nimport './components/_1_date-picker'\nimport './components/_1_expandable-table'\nimport './components/_1_responsive-sidebar'\nimport './components/_1_alert'\nimport './components/_1_modal-window'\nimport './components/_1_progress-bar'\nimport './components/_1_swipe-content'\nimport './components/_2_flexi-header'"],"sourceRoot":""}