{"version":3,"file":"site.min.js","sources":["../../node_modules/bows/dist/bows.min.js","../js/base/_size.js","../js/base/_isTouch.js","../js/base/_keyboardFocus.js","../js/base/_smoothScroll.js","../js/base/_share.js","../js/base/_loadScripts.js","../js/base/_tracking.js","../js/_general.js","../js/_accordions.js","../js/base/_tabs.js","../js/_mmenu.js","../js/_slick.js","../js/site.js","../js/base/_fitvid.js"],"sourcesContent":["!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var n;\"undefined\"!=typeof window?n=window:\"undefined\"!=typeof global?n=global:\"undefined\"!=typeof self&&(n=self),n.bows=e()}}(function(){return function e(n,o,r){function t(f,d){if(!o[f]){if(!n[f]){var u=\"function\"==typeof require&&require;if(!d&&u)return u(f,!0);if(i)return i(f,!0);var a=new Error(\"Cannot find module '\"+f+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var s=o[f]={exports:{}};n[f][0].call(s.exports,function(e){var o=n[f][1][e];return t(o||e)},s,s.exports,e,n,o,r)}return o[f].exports}for(var i=\"function\"==typeof require&&require,f=0;f=31||t}(),v=null,h=null,y=!1,m={};d&&\"!\"===d[0]&&\"/\"===d[1]&&(y=!0,d=d.slice(1)),h=d&&\"/\"===d[0]&&new RegExp(d.substring(1,d.length-1));for(var b=[\"log\",\"debug\",\"warn\",\"error\",\"info\"],x=0,E=b.length;x1){var v=Array.prototype.slice.call(arguments,1);d=d.concat(v)}return t=a.apply(u.log,d),b.forEach(function(e){t[e]=a.apply(u[e]||t,d)}),t},v.config=function(e){e.padLength&&(p=e.padLength),\"boolean\"==typeof e.padding&&(c=e.padding),e.separator?l=e.separator:!1!==e.separator&&\"\"!==e.separator||(l=\"\")},void 0!==n?n.exports=v:window.bows=v}).call()}).call(this,e(\"_process\"))},{_process:3,andlog:2}],2:[function(e,n,o){!function(){var e=\"undefined\"==typeof window,r=!e&&function(){var e;try{e=window.localStorage}catch(e){}return e}(),t={};if(e||!r)return void(n.exports=console);var i=r.andlogKey||\"debug\";if(r&&r[i]&&window.console)t=window.console;else for(var f=\"assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn\".split(\",\"),d=f.length,u=function(){};d--;)t[f[d]]=u;void 0!==o?n.exports=t:window.console=t}()},{}],3:[function(e,n,o){function r(){}var t=n.exports={};t.nextTick=function(){var e=\"undefined\"!=typeof window&&window.setImmediate,n=\"undefined\"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(n){var o=[];return window.addEventListener(\"message\",function(e){var n=e.source;if((n===window||null===n)&&\"process-tick\"===e.data&&(e.stopPropagation(),o.length>0)){o.shift()()}},!0),function(e){o.push(e),window.postMessage(\"process-tick\",\"*\")}}return function(e){setTimeout(e,0)}}(),t.title=\"browser\",t.browser=!0,t.env={},t.argv=[],t.on=r,t.addListener=r,t.once=r,t.off=r,t.removeListener=r,t.removeAllListeners=r,t.emit=r,t.binding=function(e){throw new Error(\"process.binding is not supported\")},t.cwd=function(){return\"/\"},t.chdir=function(e){throw new Error(\"process.chdir is not supported\")}},{}]},{},[1])(1)});","\nimport debug from 'bows/dist/bows.min.js';\n\nconst sizeResize = {\n\txlarge: [],\n\tlarge: [],\n\tmedium: [],\n\tsmall: [],\n\tany: [],\n\tbody: document.body,\n\tsmall_max: 640,\n\tmedium_max: 1000,\n\tlarge_max: 1200,\n\tpause: 100,\n\tcurrentSize: '',\n\tpreviousSize: ''\n};\n\n\nexport function addXlarge(func, params) {\n\tsizeResize.xlarge.push([func, params]);\n}\n\nexport function addLarge(func, params) {\n\tsizeResize.large.push([func, params]);\n}\n\nexport function addMedium(func, params) {\n\tsizeResize.medium.push([func, params]);\n}\n\nexport function addSmall(func, params) {\n\tsizeResize.small.push([func, params]);\n}\n\nexport function addAny(func, params) {\n\tsizeResize.any.push([func, params]);\n}\n\nexport function getWidth() {\n\treturn sizeResize.body.clientWidth;\n}\n\nexport function getCurrent(width) {\n\tsizeResize.previousSize = sizeResize.currentSize;\n\tif (width <= sizeResize.small_max) {\n\t\tsizeResize.currentSize = 'small';\n\t} else if (width > sizeResize.small_max && width <= sizeResize.medium_max) {\n\t\tsizeResize.currentSize = 'medium';\n\t} else if (width > sizeResize.medium_max && width <= sizeResize.large_max) {\n\t\tsizeResize.currentSize = 'large';\n\t} else {\n\t\tsizeResize.currentSize = 'xlarge';\n\t}\n\treturn sizeResize.currentSize;\n}\n\nexport function runFunctions() {\n\tsizeResize.body.classList.remove('size--xlarge');\n\tsizeResize.body.classList.remove('size--large');\n\tsizeResize.body.classList.remove('size--medium');\n\tsizeResize.body.classList.remove('size--small');\n\tif (sizeResize.currentSize === 'small') {\n\t\tsizeResize.body.classList.add('size--small');\n\t\tfor (var i = 0; i < sizeResize.small.length; i++) {\n\t\t\tsizeResize.small[i][0].apply(this, sizeResize.small[i][1]);\n\t\t}\n\t} else if (sizeResize.currentSize === 'medium') {\n\t\tsizeResize.body.classList.add('size--medium');\n\t\tfor (var i = 0; i < sizeResize.medium.length; i++) {\n\t\t\tsizeResize.medium[i][0].apply(this, sizeResize.medium[i][1]);\n\t\t}\n\t} else if (sizeResize.currentSize === 'large') {\n\t\tsizeResize.body.classList.add('size--large');\n\t\tfor (var i = 0; i < sizeResize.large.length; i++) {\n\t\t\tsizeResize.large[i][0].apply(this, sizeResize.large[i][1]);\n\t\t}\n\t} else if (sizeResize.currentSize === 'xlarge') {\n\t\tsizeResize.body.classList.add('size--xlarge');\n\t\tfor (var i = 0; i < sizeResize.xlarge.length; i++) {\n\t\t\tsizeResize.xlarge[i][0].apply(this, sizeResize.xlarge[i][1]);\n\t\t}\n\t}\n\n\tfor (var i = 0; i < sizeResize.any.length; i++) {\n\t\tsizeResize.any[i][0].apply(this, sizeResize.any[i][1]);\n\t}\n}\n\nexport function sizeCheck() {\n\tconst _this = this;\n\tif (_this.getCurrent(_this.getWidth()) === sizeResize.previousSize) {\n\t\treturn false;\n\t}\n\n\t_this.runFunctions();\n}\n\nexport function init() {\n\tconst _this = this;\n\t_this.getCurrent(_this.getWidth());\n\t_this.runFunctions();\n\n\tvar endResizeEvent;\n\twindow.onresize = function () {\n\t\tclearTimeout(endResizeEvent);\n\t\tendResizeEvent = setTimeout(function () {\n\t\t\t// Run code here, resizing has \"stopped\"\n\t\t\t_this.sizeCheck();\n\t\t}, sizeResize.pause);\n\t}\n}\n\n\nexport default {\n\tinit: init,\n\taddXlarge: addXlarge,\n\taddLarge: addLarge,\n\taddMedium: addMedium,\n\taddSmall: addSmall,\n\taddAny: addAny,\n\tgetWidth: getWidth,\n\tgetCurrent: getCurrent,\n\trunFunctions: runFunctions,\n\tsizeCheck: sizeCheck\n};\n","let istouch = {\n $html: ''\n};\n\nexport function is_touch_device() {\n return (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));\n}\n\nexport function init() {\n const _this = this;\n istouch.$html = document.querySelector('html');\n if (!_this.is_touch_device()) {\n istouch.$html.classList.add('no-touchevents');\n } else {\n istouch.$html.classList.add('touchevents');\n }\n}\n\n\nexport default {\n init: init,\n is_touch_device: is_touch_device\n};\n","import debug from 'bows/dist/bows.min.js';\n\nconst log = debug('keyboardFocus');\nconst keyboardFocusClass = 'keyboard--focus';\n\n// Internal flag\nlet keyboardFocus = false;\n\nexport function init() {\n\t// Keydown event trigger\n\twindow.addEventListener('keydown', (e) => {\n\t\tif (e.defaultPrevented || keyboardFocus) {\n\t\t\treturn; // Do nothing\n\t\t}\n\t\t// Capture certain keys (or alt key press)\n\t\tif ('Tab' === e.key || 'Enter' === e.key || e.altKey) {\n\t\t\tkeyboardFocus = true;\n\t\t\tdocument.body.classList.add(keyboardFocusClass);\n\t\t\tlog('site.keyboardFocus', keyboardFocus);\n\t\t}\n\t});\n\n\t// Mousedown event cancel\n\twindow.addEventListener('mousedown', (e) => {\n\t\tif (e.defaultPrevented || !keyboardFocus) {\n\t\t\treturn; // Do nothing\n\t\t}\n\t\t// Cancel keyboard active\n\t\tkeyboardFocus = false;\n\t\tdocument.body.classList.remove(keyboardFocusClass);\n\t\tlog('site.keyboardFocus', keyboardFocus);\n\t});\n};\n\nexport default {\n\tinit: init\n};\n","//import $ from \"jquery\";\nimport debug from 'bows/dist/bows.min.js';\n\nconst linksToAnchors = document.querySelectorAll('a[href^=\"#\"]');\n\nconst log = debug(\"scroll\");\n\nexport function anchorLinkHandler(e) {\n\tconst distanceToTop = el => Math.floor(el.getBoundingClientRect().top);\n\n\te.preventDefault();\n\tconst targetID = this.getAttribute(\"href\");\n\tconst split = targetID.split('#');\n\tif (split[1] === '') return;\n\tconst targetAnchor = document.querySelector(targetID);\n\tif (!targetAnchor) return;\n\tconst originalTop = distanceToTop(targetAnchor);\n\n\twindow.scrollBy({ top: originalTop, left: 0, behavior: \"smooth\" });\n\n\tconst checkIfDone = setInterval(function () {\n\t\tconst atBottom =\n\t\t\twindow.innerHeight + window.pageYOffset >= document.body.offsetHeight - 2;\n\t\tif (distanceToTop(targetAnchor) === 0 || atBottom) {\n\t\t\ttargetAnchor.tabIndex = \"-1\";\n\t\t\ttargetAnchor.focus();\n\n\t\t\twindow.history.pushState(\"\", \"\", targetID);\n\t\t\tclearInterval(checkIfDone);\n\t\t}\n\t\ttargetAnchor.addEventListener(\"blur\", function () {\n\t\t\ttargetAnchor.removeAttribute('tabIndex');\n\t\t});\n\t}, 100);\n}\n\nexport function init() {\n\tlog(`scroll init`);\n\tif (linksToAnchors !== undefined) {\n\t\tlinksToAnchors.forEach(each => (each.onclick = anchorLinkHandler));\n\t}\n}\n\nexport default {\n\tinit: init,\n\tanchorLinkHandler: anchorLinkHandler\n};\n","//import $ from \"jquery\";\nimport debug from 'bows/dist/bows.min.js';\nimport ClipboardJS from 'ClipboardJS';\n\nconst elem = document.querySelectorAll(\".share__link--modal\");\nconst log = debug(\"share\");\n\nexport function sharePop(e) {\n\t//elem.addEventListener(\"click\", function(e) {\n\n\tconst href = $(this).attr(\"href\");\n\tconst t = (window.screen.height - 350) / 2;\n\tconst l = (window.screen.width - 550) / 2;\n\tlog(l);\n\tconst opts = [\n\t\t\"scrollbars=yes\",\n\t\t\"resizable=yes\",\n\t\t\"toolbar=no\",\n\t\t\"location=yes\",\n\t\t\"width=550\",\n\t\t\"height=350\",\n\t\t\"top=\" + t,\n\t\t\"left=\" + l\n\t];\n\treturn window.open(href, \"sharer\", opts.join(\",\"));\n\t//});\n}\n\nexport function init() {\n\tlog(`share init`);\n\tif (elem !== undefined) {\n\t\tfor (let i = 0; i < elem.length; i++) {\n\t\t\telem[i].addEventListener(\"click\", sharePop);\n\t\t}\n\t}\n\n\tlet clipboard = new ClipboardJS('[data-clipboard-text]');\n\tlet copied = document.querySelector('.share__copied');\n\n\tclipboard.on('success', function (e) {\n\t\tcopied.textContent = \"Page URL Copied\";\n\t\tcopied.classList.add('share__copied--success');\n\t\tsetTimeout(() => {\n\t\t\tcopied.classList.remove('share__copied--success');\n\t\t}, 3000);\n\t\tsetTimeout(() => {\n\t\t\tcopied.textContent = \"\";\n\t\t}, 3500);\n\t});\n\n\tclipboard.on('error', function (e) {\n\t\tcopied.textContent = \"URL not copied\";\n\t\tcopied.classList.add('share__copied--error');\n\t\tsetTimeout(() => {\n\t\t\tcopied.classList.remove('share__copied--error');\n\t\t}, 1000);\n\t\tsetTimeout(() => {\n\t\t\tcopied.textContent = \"\";\n\t\t}, 1250);\n\t});\n}\n\nexport default {\n\tinit: init,\n\tsharePop: sharePop\n};\n","import debug from 'bows/dist/bows.min.js';\nconst log = debug(\"loadScripts\");\n\nfunction inject(url, callback, options) {\n\t// Adding the script tag to the head as suggested before\n\tvar head = document.getElementsByTagName('head')[0];\n\tvar script = document.createElement('script');\n\tscript.type = 'text/javascript';\n\tscript.src = url;\n\n\tif (typeof options !== 'undefined') {\n\t\tif (typeof options.async !== 'undefined' && options.async) {\n\t\t\tscript.async = true;\n\t\t}\n\t\tif (typeof options.defer !== 'undefined' && options.defer) {\n\t\t\tscript.defer = true;\n\t\t}\n\t\tif (typeof options.id !== 'undefined' && options.id) {\n\t\t\tscript.id = options.id;\n\t\t}\n\t}\n\n\t// Then bind the event to the callback function.\n\t// There are several events for cross browser compatibility.\n\tscript.onreadystatechange = callback;\n\tscript.onload = callback;\n\n\t// Fire the loading\n\thead.appendChild(script);\n}\n\n\nvar loadScriptsObj = {\n\tdelay: 100,\n\tname: null,\n\turl: null,\n\tip: null,\n\tips: [],\n\tenv: null,\n\tenvs: [],\n\tua: [],\n\tmatchIP: function () {\n\t\treturn this.ips.indexOf(this.ip) !== -1;\n\t},\n\tmatchENV: function () {\n\t\treturn this.envs.indexOf(this.env) !== -1;\n\t},\n\tmatchUA: function () {\n\t\treturn this.ua.filter(function (item) {\n\t\t\treturn navigator.userAgent.indexOf(item) !== -1;\n\t\t}).length > 0;\n\t},\n\tblocked: function () {\n\t\tif (this.matchUA()) {\n\t\t\tlog(this.name, ': Blocked UA');\n\t\t\treturn true;\n\t\t}\n\t\tif (this.matchENV()) {\n\t\t\tlog(this.name, ': Blocked ENV');\n\t\t\treturn true;\n\t\t}\n\t\tif (this.matchIP()) {\n\t\t\tlog(this.name, ': Blocked IP');\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\tinit: function () {\n\t\tthis.ip = app.clientIp || null;\n\t\tthis.env = app.env || null;\n\t\tsetTimeout(() => {\n\t\t\tif (!this.blocked()) {\n\t\t\t\tthis.run();\n\t\t\t}\n\t\t}, this.delay);\n\t}\n};\n\nfunction loadScripts(Obj) {\n\n\tvar newObj = Object.create(loadScriptsObj);\n\n\treturn Object.assign(newObj, Obj);\n\n}\n\n\nexport default {\n\tload: loadScripts,\n\tinject\n}\n","import $ from \"jquery\";\nimport debug from 'bows/dist/bows.min.js';\n\nconst log = debug(\"tracking\");\nlet trackingType = 'testing';\n\nexport function trackEvent(action, category, label, value) {\n\tif (trackingType === 'gtag') {\n\t\tgtag('event', action, {\n\t\t\t'event_category': category,\n\t\t\t'event_label': label,\n\t\t\t'value': value\n\t\t});\n\t} else if (trackingType === 'gtm') {\n\t\tdataLayer.push({\n\t\t\t'event': 'GAEvent',\n\t\t\t'eventCategory': category,\n\t\t\t'eventAction': action,\n\t\t\t'eventLabel': label,\n\t\t\t'eventValue': value\n\t\t});\n\t} else if (trackingType === 'testing') {\n\t\tlog(`Action: ${action}`);\n\t\tlog(`Category: ${category}`);\n\t\tlog(`Label: ${label}`);\n\t\tlog(`Value: ${value}`);\n\t}\n}\n\nfunction fireTracking() {\n\t// $('.hello__title').on('click', function () {\n\t// \ttrackEvent('Footer Email Link', 'engagement', $(this).text().trim());\n\t// });\n\n}\n\nexport function init(type) {\n\tif (type !== undefined) {\n\t\ttrackingType = type;\n\t}\n\n\tfireTracking();\n}\n\nexport default {\n\tinit,\n\ttrackEvent\n};\n","import $ from \"jquery\";\nimport debug from 'bows/dist/bows.min.js';\n\nconst log = debug(\"general\");\nconst body = $('body');\n\nexport function init() {\n\t/*\n\t* For each nav item with children\n\t*\t\tif it has 3 navs add three col\n\t*\t\t\t\t\t\t\t2 navs add two col\n\t*\t\t\t\t\t\t\telse add one col\n\t*\n\t*/\n\n\t$('.nav__menu-item--has-children .nav__menu--level-1').each(function () {\n\t\tif ($(this).find('.nav__menu--level-3').length !== 0) {\n\t\t\t// add our three col class\n\t\t\t$(this).addClass('three-col-menu');\n\n\t\t\t// set some vars\n\t\t\tvar navMenu3 = $(this).find('.nav__menu--level-3').height(),\n\t\t\t\tnavMenu2 = $(this).find('.nav__menu--level-2').height(),\n\t\t\t\tnavMenu1 = $(this).height(),\n\t\t\t\tnavMinHeight = (Math.max(navMenu3, navMenu2, navMenu1));\n\n\t\t\t// min height!\n\t\t\t$(this).find('.nav__menu--level-3').css('min-height', navMinHeight + 40 + 'px');\n\t\t\t$(this).find('.nav__menu--level-2').css('min-height', navMinHeight + 40 + 'px');\n\t\t\t$(this).css('min-height', navMinHeight + 80 + 'px');\n\t\t}\n\n\t\telse if ($(this).find('.nav__menu--level-2').length !== 0) {\n\t\t\t$(this).addClass('two-col-menu');\n\n\t\t\tvar twoNavMenu2 = $(this).find('.nav__menu--level-2').height(),\n\t\t\t\ttwoNavMenu1 = $(this).height(),\n\t\t\t\ttwoNavMinHeight = (Math.max(twoNavMenu2, twoNavMenu1));\n\n\t\t\t// min height!\n\t\t\t$(this).find('.nav__menu--level-2').css('min-height', twoNavMinHeight + 'px');\n\t\t\t$(this).css('min-height', twoNavMinHeight + 40 + 'px');\n\t\t}\n\n\t\telse {\n\t\t\t$(this).addClass('one-col-menu');\n\t\t}\n\t});\n\n\t/*\n\t*\n\t* function siblingClassGetter\n\t* \tsearches an items sibling for a background class\n\t* \tand adds a prefixed class as needed\n\t*\n\t* @param context - where you want to add your class\n\t* @param sibling - the sibling of context you want to check\n\t* @param prefix - next / prev prefix designation\n\t*\n\t*/\n\tfunction siblingClassGetter(context, sibling, prefix) {\n\t\tif (sibling.classList.contains('gray-background')) {\n\t\t\tcontext.classList.add(`${prefix}gray-background`);\n\t\t}\n\n\t\telse if (sibling.classList.contains('white-background')) {\n\t\t\tcontext.classList.add(`${prefix}white-background`);\n\t\t}\n\n\t\telse if (sibling.classList.contains('dark-blue-background')) {\n\t\t\tcontext.classList.add(`${prefix}dark-blue-background`);\n\t\t}\n\n\t}\n\n\t/*\n\t*\n\t* Mock Large Image Hero Overlay\n\t*\n\t* for each instance,\n\t* \tget needed classes from next sibling\n\t*\n\t*/\n\tvar $heroLarge = $('.hero--large');\n\n\tif ($heroLarge) {\n\t\t$heroLarge.each(function () {\n\t\t\tsiblingClassGetter(this, this.nextElementSibling, 'next-');\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Mock Component Images Background Split\n\t* \tused on WYSIWYG components &\n\t*\n\t* for each instance,\n\t* \tget needed classes from next sibling\n\t*\n\t*/\n\tvar $componentImages = $('.component--image');\n\n\tif ($componentImages) {\n\t\t$componentImages.each(function () {\n\t\t\tif (this.classList.contains('component--video') && this.previousElementSibling) {\n\t\t\t\tsiblingClassGetter(this, this.previousElementSibling, '');\n\t\t\t}\n\n\t\t\t// if our image comes first and it's not next to another image, get the prior background color for the split\n\t\t\tif (this.classList.contains('image-first') && this.previousElementSibling && !this.previousElementSibling.classList.contains('component--image')) {\n\t\t\t\tsiblingClassGetter(this, this.previousElementSibling, 'prev-');\n\t\t\t} else {\n\t\t\t\tif (this.nextElementSibling) {\n\t\t\t\t\tsiblingClassGetter(this, this.nextElementSibling, 'next-');\n\t\t\t\t} else {\n\t\t\t\t\tthis.classList.add('final-image');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Mock CTA Images Overlaps\n\t*\n\t* for each instance,\n\t* \tif top overlap\n\t* \t\tget needed classes from previous sibling\n\t*\n\t* \tif bottom overlap\n\t* \t\tget needed classes from next sibling\n\t*\n\t*/\n\tvar $overlapImages = $('.image-overlap');\n\n\tif ($overlapImages) {\n\t\t$overlapImages.each(function () {\n\n\t\t\tif (this.classList.contains('top-overlap')) {\n\n\t\t\t\tif (this.previousElementSibling.classList.contains('component--image')) {\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tsiblingClassGetter(this, this.previousElementSibling, 'prev-');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.classList.contains('bottom-overlap') && this.nextElementSibling) {\n\t\t\t\tsiblingClassGetter(this, this.nextElementSibling, 'next-');\n\t\t\t}\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Map Component Accordion Image Swap\n\t*\n\t* for each instance when clicked or keypressed\n\t*\t\tget the clicked elements background data\n\t* \tremove old styling class\n\t*\t\tadd the new one!\n\t*\n\t*/\n\tvar $mapComponent = $('.component--map-content');\n\n\tif ($mapComponent) {\n\n\t\t$('.component--map-content .accordion-trigger').on('click keypress', function () {\n\t\t\tvar $container = $('.component--map-content .container'),\n\t\t\t\tnewBgClass = $(this).data('background');\n\n\t\t\t$container.removeClass(function (index, css) {\n\t\t\t\treturn (css.match(/(^|\\s)bg\\S+/g) || []).join(' ');\n\t\t\t});\n\n\t\t\t$container.addClass(newBgClass);\n\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* function sliverSlickSlider\n\t* \tadds a slick slider that's auto sized\n\t* and mobile shows a little sliver of the next one\n\t*\n\t* @param componentSlider - component context for the slider\n\t* @param previousButton - component's previous button\n\t* @param nextButton - component's next button\n\t* @param buttonContainer - component context next / prev button container\n\t*\n\t*/\n\tfunction sliverSlickSlider(componentSlider, previousButton, nextButton, buttonContainer) {\n\n\t\tcomponentSlider.on('init', function (event, slick) {\n\t\t\tbuttonContainer.show();\n\t\t});\n\n\t\tcomponentSlider.on('destroy', function (event, slick) {\n\t\t\tbuttonContainer.hide();\n\t\t});\n\n\t\tcomponentSlider.slick({\n\t\t\tprevArrow: previousButton,\n\t\t\tnextArrow: nextButton,\n\t\t\tinfinite: false,\n\t\t\tspeed: 300,\n\t\t\tslidesToScroll: 1,\n\t\t\tvariableWidth: true,\n\t\t\tresponsive: [\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 500,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 1.05,\n\t\t\t\t\t\tvariableWidth: false,\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t]\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Related Content Slick Slider\n\t*\n\t* for each instance\n\t*\t\tgather our needed vars scoped to our instance\n\t* \ton slider init, show our slider nav buttons\n\t*\t\ton slider destroy, hide our slider nav buttons\n\t*\n\t*\t\tinitiate slick!\n\t*\t\t\tuse our custom prev / next buttons\n\t*\t\t\tadvance one slide at a time\n\t*\t\t\tuse the width of the content items,\n\t*\t\t\tuntil we are under 500 px then we show 1 + a sliver of the next\n\t*\n\t*/\n\tvar $relatedSlideContent = $('.component--related-content-slider');\n\n\tif ($relatedSlideContent) {\n\n\t\t$relatedSlideContent.each(function () {\n\n\t\t\tvar $rcsSlider = $(this).find('.component-slider'),\n\t\t\t\t$rcsPrevBtn = $(this).find('.slick-prev'),\n\t\t\t\t$rcsNextBtn = $(this).find('.slick-next'),\n\t\t\t\t$rcsButtonContainer = $(this).find('.slick-button-container');\n\n\t\t\tsliverSlickSlider($rcsSlider, $rcsPrevBtn, $rcsNextBtn, $rcsButtonContainer);\n\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Timeline Content Slick Slider\n\t*\n\t* for each instance\n\t*\t\tgather our needed vars scoped to our instance\n\t* \ton slider init, show our slider nav buttons\n\t*\t\ton slider destroy, hide our slider nav buttons\n\t*\n\t*\t\tinitiate slick!\n\t*\t\t\tuse our custom prev / next buttons\n\t*\t\t\tadvance one slide at a time\n\t*\t\t\tuse the width of the content items,\n\t*\t\t\tuntil we are under 500 px then we show 1 + a sliver of the next\n\t*\n\t*/\n\tvar $timelineSlideContent = $('.component--timeline-content-slider');\n\n\tif ($timelineSlideContent) {\n\n\t\t$timelineSlideContent.each(function () {\n\n\t\t\tvar $timeSlider = $(this).find('.component-slider'),\n\t\t\t\t$timePrevBtn = $(this).find('.slick-prev'),\n\t\t\t\t$timeNextBtn = $(this).find('.slick-next'),\n\t\t\t\t$timeButtonContainer = $(this).find('.slick-button-container');\n\n\t\t\tsliverSlickSlider($timeSlider, $timePrevBtn, $timeNextBtn, $timeButtonContainer);\n\n\t\t});\n\t}\n\n\t/* Historic Timeline Slick Sliders\n\t*/\n\tvar $historicTimelineSlideContent = $('.component--historic-timeline-content-slider');\n\n\tif ($historicTimelineSlideContent) {\n\n\t\t$historicTimelineSlideContent.each(function () {\n\n\t\t\tvar $historicTimeline = $(this).find('.component-slider'),\n\t\t\t\t$historticYearline = $(this).find('.component-slider-nav'),\n\t\t\t\t$multipleImageSlider = $(this).find('.image-group-slider'),\n\t\t\t\t$yearsPrevBtn = $(this).find('.slick-prev'),\n\t\t\t\t$yearsNextBtn = $(this).find('.slick-next');\n\n\t\t\t$historicTimeline.slick({\n\t\t\t\tarrows: false,\n\t\t\t\tinfinite: false,\n\t\t\t\tspeed: 400,\n\t\t\t\tslidesToShow: 1,\n\t\t\t\tslidesToScroll: 1,\n\t\t\t\tvariableWidth: false,\n\t\t\t\tasNavFor: $historticYearline,\n\t\t\t\tresponsive: [\n\t\t\t\t\t{\n\t\t\t\t\t\tbreakpoint: 768,\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tadaptiveHeight: true,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t});\n\n\t\t\tlet $slider = $historticYearline.slick({\n\t\t\t\tfocusOnSelect: true,\n\t\t\t\tprevArrow: $yearsPrevBtn,\n\t\t\t\tnextArrow: $yearsNextBtn,\n\t\t\t\tinfinite: false,\n\t\t\t\tspeed: 400,\n\t\t\t\tslidesToShow: 10,\n\t\t\t\tslidesToScroll: 5,\n\t\t\t\tasNavFor: $historicTimeline,\n\t\t\t\tresponsive: [\n\t\t\t\t\t{\n\t\t\t\t\t\tbreakpoint: 1100,\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tslidesToShow: 7,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbreakpoint: 900,\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tslidesToShow: 5,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbreakpoint: 620,\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tslidesToShow: 3,\n\t\t\t\t\t\t\tslidesToScroll: 3,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbreakpoint: 420,\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tslidesToShow: 2,\n\t\t\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t// You can unslick at a given breakpoint now by adding:\n\t\t\t\t\t// settings: \"unslick\"\n\t\t\t\t\t// instead of a settings object\n\t\t\t\t]\n\t\t\t});\n\t\t\tlet overrideSlide = true;\n\t\t\t$slider.on('beforeChange', function (event, slick, currentSlide, nextSlide) {\n\t\t\t\toverrideSlide = false;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\toverrideSlide = true;\n\t\t\t\t}, 250);\n\t\t\t});\n\n\t\t\t$yearsPrevBtn.on('click', function () {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (overrideSlide === true) {\n\t\t\t\t\t\toverrideSlide = false;\n\t\t\t\t\t\t$slider.slick('slickGoTo', 0);\n\t\t\t\t\t}\n\t\t\t\t}, 10);\n\t\t\t});\n\n\t\t\tif ($multipleImageSlider) {\n\t\t\t\t//console.log($multipleImageSlider);\n\t\t\t\t$multipleImageSlider.slick({\n\t\t\t\t\tinfinite: false,\n\t\t\t\t\tslidesToShow: 1,\n\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\tdots: true,\n\t\t\t\t\tarrows: false,\n\t\t\t\t\tresponsive: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreakpoint: 768,\n\t\t\t\t\t\t\tsettings: 'unslick',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t}\n\n\n\t/*\n\t*\n\t* Filter Bar Filtering\n\t*\n\t* If we have a filter bar\n\t* \tget all our filter buttons\n\t*\t\tget all our staff members\n\t*\n\t*\t\tbased on button clicked, add / remove active class\n\t*\t\tfor each staff member\n\t*\t\t\tif all, show all\n\t*\t\t\telse if class and filter match, show\n\t*\t\t\telse hide\n\t*\n\t*/\n\tvar $filterBar = $('.all-staff--filter-bar');\n\n\tif ($filterBar) {\n\t\tvar $filterBtn = $('.filter-bar--button a');\n\t\t//var $allStaffMembers = $('.all-staff--member');\n\n\t\t// on clicking a filter button\n\t\t$filterBtn.on('click keypress', function (e) {\n\t\t\te.preventDefault();\n\n\t\t\tlet selectedFilter = $(this).data('filter');\n\t\t\t$('.all-staff--member').hide();\n\n\t\t\t// active buttons\n\t\t\t$filterBtn.removeClass('active');\n\t\t\t$(this).addClass('active');\n\n\t\t\tif (selectedFilter === 'all') {\n\t\t\t\t$('.all-staff--member').show();\n\t\t\t} else {\n\t\t\t\t//$('.all-staff--member:not(.' + selectedFilter + ')').hide();\n\t\t\t\t$('.all-staff--member.' + selectedFilter).show();\n\t\t\t}\n\n\t\t});\n\t}\n\n\t/*\n\t*\n\t* Video Swapper\n\t*\n\t* If we have a video component\n\t* \tget our video list\n\t*\t\tget our video embed area\n\t*\n\t*\t\tbased on video list item clicked,\n\t*\t\t\tget our video data\n\t*\t\t\tif not the video currently playing\n\t*\t\t\t\tmake it play!\n\t*\n\t*/\n\tvar $videoContainer = $('.component--video');\n\n\tif ($videoContainer) {\n\t\tvar $vidListItem = $('.video--list--container a'),\n\t\t\t$vidEmbed = $('.video--container .embed-video--container .embed-video');\n\n\t\t$vidListItem.on('click keypress', function (e) {\n\t\t\te.preventDefault();\n\t\t\tlet vidSrc = $(this).data('video');\n\n\t\t\tif ($vidEmbed.attr('src') != vidSrc) {\n\t\t\t\t$vidEmbed.attr('src', vidSrc);\n\t\t\t}\n\t\t});\n\t}\n\n}\n\nexport default {\n\tinit\n};\n","/*\n* This content is licensed according to the W3C Software License at\n* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n*\n* Simple accordion pattern example\n*/\n\n'use strict';\n\nArray.prototype.slice.call(document.querySelectorAll('.accordion-group')).forEach(function (accordion) {\n\n // Allow for multiple accordion sections to be expanded at the same time\n var allowMultiple = accordion.hasAttribute('data-allow-multiple');\n // Allow for each toggle to both open and close individually\n var allowToggle = (allowMultiple) ? allowMultiple : accordion.hasAttribute('data-allow-toggle');\n\n // Create the array of toggle elements for the accordion group\n var triggers = Array.prototype.slice.call(accordion.querySelectorAll('.accordion-trigger'));\n var panels = Array.prototype.slice.call(accordion.querySelectorAll('.accordion-panel'));\n\n\n accordion.addEventListener('click', function (event) {\n var target = event.target;\n\n if (target.classList.contains('accordion-trigger')) {\n // Check if the current toggle is expanded.\n var isExpanded = target.getAttribute('aria-expanded') == 'true';\n var active = accordion.querySelector('[aria-expanded=\"true\"]');\n\n // without allowMultiple, close the open accordion\n if (!allowMultiple && active && active !== target) {\n // Set the expanded state on the triggering element\n active.setAttribute('aria-expanded', 'false');\n // Hide the accordion sections, using aria-controls to specify the desired section\n document.getElementById(active.getAttribute('aria-controls')).setAttribute('hidden', '');\n\n // When toggling is not allowed, clean up disabled state\n if (!allowToggle) {\n active.removeAttribute('aria-disabled');\n }\n }\n\n if (!isExpanded) {\n // Set the expanded state on the triggering element\n target.setAttribute('aria-expanded', 'true');\n // Hide the accordion sections, using aria-controls to specify the desired section\n document.getElementById(target.getAttribute('aria-controls')).removeAttribute('hidden');\n\n // If toggling is not allowed, set disabled state on trigger\n if (!allowToggle) {\n target.setAttribute('aria-disabled', 'true');\n }\n }\n else if (allowToggle && isExpanded) {\n // Set the expanded state on the triggering element\n target.setAttribute('aria-expanded', 'false');\n // Hide the accordion sections, using aria-controls to specify the desired section\n document.getElementById(target.getAttribute('aria-controls')).setAttribute('hidden', '');\n }\n\n event.preventDefault();\n }\n });\n\n // Bind keyboard behaviors on the main accordion container\n accordion.addEventListener('keydown', function (event) {\n var target = event.target;\n var key = event.which.toString();\n\n var isExpanded = target.getAttribute('aria-expanded') == 'true';\n var allowToggle = (allowMultiple) ? allowMultiple : accordion.hasAttribute('data-allow-toggle');\n\n // 33 = Page Up, 34 = Page Down\n var ctrlModifier = (event.ctrlKey && key.match(/33|34/));\n\n // Is this coming from an accordion header?\n if (target.classList.contains('accordion-trigger')) {\n // Up/ Down arrow and Control + Page Up/ Page Down keyboard operations\n // 38 = Up, 40 = Down\n if (key.match(/38|40/) || ctrlModifier) {\n var index = triggers.indexOf(target);\n var direction = (key.match(/34|40/)) ? 1 : -1;\n var length = triggers.length;\n var newIndex = (index + length + direction) % length;\n\n triggers[newIndex].focus();\n\n event.preventDefault();\n }\n else if (key.match(/35|36/)) {\n // 35 = End, 36 = Home keyboard operations\n switch (key) {\n // Go to first accordion\n case '36':\n triggers[0].focus();\n break;\n // Go to last accordion\n case '35':\n triggers[triggers.length - 1].focus();\n break;\n }\n event.preventDefault();\n\n }\n\n }\n });\n\n // These are used to style the accordion when one of the buttons has focus\n accordion.querySelectorAll('.accordion-trigger').forEach(function (trigger) {\n\n trigger.addEventListener('focus', function (event) {\n accordion.classList.add('focus');\n });\n\n trigger.addEventListener('blur', function (event) {\n accordion.classList.remove('focus');\n });\n\n });\n\n // Minor setup: will set disabled state, via aria-disabled, to an\n // expanded/ active accordion which is not allowed to be toggled close\n if (!allowToggle) {\n // Get the first expanded/ active accordion\n var expanded = accordion.querySelector('[aria-expanded=\"true\"]');\n\n // If an expanded/ active accordion is found, disable\n if (expanded) {\n expanded.setAttribute('aria-disabled', 'true');\n }\n }\n\n});","// https://codepen.io/heydon/pen/veeaEa\n// import $ from \"jquery\";\n// Get relevant elements and collections\nconst tabbed = document.querySelectorAll('.js-wikit-tabbed');\nconst accordionTitle = document.querySelectorAll('.accordion-toggle-tab');\nlet switchTab = '';\nfunction toggleTabFix(toggleTab) {\n\t// console.log(toggleTab);\n\ttoggleTab.forEach(tt => {\n\t\tlet href = `#${tt.getAttribute('aria-controls')}`;;\n\t\tlet tab = document.querySelector(`.tab-nav__link[href=\"${href}\"]`);\n\t\tif (tab) {\n\t\t\tlet newText = tab.innerHTML;\n\t\t\tlet jwat = tt.querySelector('.js-wikit-accordion__title');\n\t\t\tif (jwat) {\n\t\t\t\tjwat.innerHTML = newText;\n\t\t\t}\n\t\t}\n\t});\n}\nfunction doEachTab(tablist, tabs, panels) {\n\t// The tab switching function\n\n\tswitchTab = (theTabs, thePanels, oldTab, newTab, isFocus) => {\n\t\tif (isFocus !== false) {\n\t\t\tnewTab.focus();\n\t\t} else\n\t\t\t// Make the active tab focusable by the user (Tab key)\n\t\t\tnewTab.removeAttribute('tabindex');\n\t\t// Set the selected state\n\t\tnewTab.setAttribute('aria-selected', 'true');\n\t\tnewTab.removeAttribute('tabindex');\n\t\toldTab.removeAttribute('aria-selected');\n\t\toldTab.setAttribute('tabindex', '-1');\n\t\toldTab.setAttribute('aria-selected', 'false');\n\t\t// Get the indices of the new and old tabs to find the correct\n\t\t// tab panels to show and hide\n\t\tlet index = Array.prototype.indexOf.call(theTabs, newTab);\n\t\tlet oldIndex = Array.prototype.indexOf.call(theTabs, oldTab);\n\n\t\tthePanels[oldIndex].hidden = true;\n\t\tthePanels[index].hidden = false;\n\t\t// Code for updating accordions\n\t\tlet oldAtt = oldTab.getAttribute('href').split('#');\n\t\tlet newAtt = newTab.getAttribute('href').split('#');\n\t\toldAtt = document.querySelector(`.accordion-toggle-tab[aria-controls=\"${oldAtt[1]}\"]`);\n\t\tnewAtt = document.querySelector(`.accordion-toggle-tab[aria-controls=\"${newAtt[1]}\"]`);\n\t\tif (oldAtt) {\n\t\t\toldAtt.setAttribute('aria-expanded', 'false');\n\t\t}\n\t\tif (newAtt) {\n\t\t\tnewAtt.setAttribute('aria-expanded', 'true');\n\t\t}\n\t\t// Trigger resize event for sliders\n\t\twindow.dispatchEvent(new Event('resize'));\n\t}\n\t// Add the tablist role to the first