{"version":3,"sources":["animations.js","mobile-swipe.js","site.js"],"names":["document","addEventListener","event","gsap","registerPlugin","ScrollTrigger","animationVariables","elements","querySelectorAll","forEach","element","scrollTriggerElement","split","fromTo","y","opacity","duration","scrollTrigger","x","fromLeft","fromRight","fadeIn","fromTop","scale","transformOrigin","scaleUp","articleWrappers","articleWrapper","querySelector","startTouch","articleSwipe","initialX","initialY","e","touches","clientX","clientY","controls","this","articles","currentX","currentY","diffX","diffY","Math","abs","preventDefault","nextIndex","activeIndex","article","index","classList","contains","length","animateSwipe","remove","add","currentIndex","direction","currentArticle","nextArticle","set","zIndex","timeline","to","ease","classToggle","elementClass","alertStatus","alert","alertMessage","innerHTML","navigation","body","overlay","navBtn","setAttribute","dropdownNav","dropdownFocusHover","dropdownItems","target","i","k","key","innerText","focus","video","watchBtn","parentNode","options","player","Vimeo","Player","stopImmediatePropagation","setVolume","setCurrentTime","play","pause","carousels","carouselElement","nextControl","prevControl","carouselNumber","position","opacityIncrement","opacityItem","updateCarouselStatus","items","updateControls","disabled","style","parseFloat","activeItem","nextItem","nextElementSibling","prevItem","previousElementSibling","accordions","moveElementToTopWithOffset","offset","window","scrollTo","top","getBoundingClientRect","scrollY","behavior","accordion","accordionHeader","accordionText","isActive","tabWrapper","tabs","hash","location","tabLinks","history","replaceState","href","documentElement","scrollTop","tabId","substring","tab","getElementById","parentElement","tabLink","linkHref","tabBtn","scrollIntoView","headerHeight","height","innerWidth","setTimeout","lastScrollTopNav","siteHeader","setHeaderHeight","setProperty","st","removeAttribute","getAttribute","console","log","includes","sharingOptions","sharingOptionsArry","sharePageUrl","soLinkedin","soFacebook","soTwitter","soPage","setLinks","pageLink","val","copiedSuccess","parentEl","linkEl","linkOffset","msgEl","createElement","appendChild","updateClipboard","newClip","cb","navigator","clipboard","writeText","then","sharingOption","permissions","query","name","result","state","navigationItem","pathname","touchendX","touchendY","touchstartY","touchstartX","wrapper","controlWrapper","articleControl","control","controlBtn"],"mappings":"AAMAA,SAAAC,iBAA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6I,EAAA9I,UAAAC,SAAA,eACA6I,EAAAxD,KAAAyB,SAAA,GAAA7B,SAAA6D,aACA,MAAA7D,SAAA6D,UAEAD,EAAA9I,UAAAK,IAAA,kBACA,GAEA,CAKA,GAAAxD,SAAA4B,cAAA,qBAAA,CAEA,IAAAuK,UAAA,EACAC,UAAA,EACAC,YAAA,EACAC,YAAA,EAJAtM,SAAAQ,iBAAA,qBAMAC,SAAA8L,IACA,MAAAhK,EAAAgK,EAAA/L,iBAAA,YACAgM,EAAAD,EAAA3K,cAAA,qBAGAW,EAAA9B,SAAA,CAAAwC,EAAAC,KACA,MAAAuJ,EAAAzM,SAAAkL,cAAA,UACAuB,EAAAlI,UAAA,iCAAArB,EAAA,QACAX,EAAAc,gBAEAoJ,EAAAtJ,UAAAK,IAAA,mBACAP,EAAAE,UAAAC,SAAA,sBACAqJ,EAAAtJ,UAAAK,IAAA,qBAEAgJ,EAAArB,YAAAsB,EAAA,IAGA,MAAApK,EAAAkK,EAAA/L,iBAAA,oBAEA6B,EAAA5B,SAAA,CAAAiM,EAAAxJ,KACAwJ,EAAAzM,iBAAA,SAAA,KACAoC,EAAA5B,SAAAkM,IACAA,EAAAxJ,UAAAI,OAAA,oBAAA,IAEAhB,EAAA9B,SAAAwC,IACAA,EAAAE,UAAAC,SAAA,sBACAH,EAAAE,UAAAI,OAAA,oBACA,IAEAhB,EAAAW,GAAAC,UAAAK,IAAA,qBACAkJ,EAAAvJ,UAAAK,IAAA,oBAAA,GACA,GACA,GAEA","file":"../app.js","sourcesContent":["// ---------------------------------------------\n// ======---------------------------------======\n// Animations JS\n// ======---------------------------------======\n// ---------------------------------------------\n\ndocument.addEventListener('DOMContentLoaded', (event) => {\n\tgsap.registerPlugin(ScrollTrigger);\n\n\tconst animationVariables = {\n\t\topacityStart: 0,\n\t\topacityEnd: 1,\n\t\tduration: 2,\n\t\ttranslationStart: 0,\n\t\tnegativeTranslation: '-10rem',\n\t\tpositiveTranslation: '10rem'\n\t};\n\n\tfunction fromLeft(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\topacity: animationVariables.opacityStart,\n\t\t\t\t\t\tx: animationVariables.negativeTranslation\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement,\n\t\t\t\t\t\topacity: animationVariables.opacityEnd,\n\t\t\t\t\t\tx: animationVariables.translationStart,\n\t\t\t\t\t\tduration: animationVariables.duration\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction fromRight(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\topacity: animationVariables.opacityStart,\n\t\t\t\t\t\tx: animationVariables.positiveTranslation\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement,\n\t\t\t\t\t\topacity: animationVariables.opacityEnd,\n\t\t\t\t\t\tx: animationVariables.translationStart,\n\t\t\t\t\t\tduration: animationVariables.duration\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction fromBottom(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\ty: animationVariables.positiveTranslation,\n\t\t\t\t\t\topacity: animationVariables.opacityStart\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ty: animationVariables.translationStart,\n\t\t\t\t\t\topacity: animationVariables.opacityEnd,\n\t\t\t\t\t\tduration: animationVariables.duration,\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction fromTop(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\topacity: animationVariables.opacityStart,\n\t\t\t\t\t\ty: animationVariables.negativeTranslation\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement,\n\t\t\t\t\t\topacity: animationVariables.opacityEnd,\n\t\t\t\t\t\ty: animationVariables.translationStart,\n\t\t\t\t\t\tduration: animationVariables.duration\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction fadeIn(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\topacity: animationVariables.opacityStart\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\topacity: animationVariables.opacityEnd,\n\t\t\t\t\t\tduration: animationVariables.duration,\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction scaleUp(elements) {\n\t\tif (document.querySelectorAll(elements)) {\n\t\t\telements.forEach((element) => {\n\t\t\t\tconst scrollTriggerElement = element.split(' ')[0];\n\t\t\t\tgsap.fromTo(\n\t\t\t\t\telement,\n\t\t\t\t\t{\n\t\t\t\t\t\tscale: 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tscale: 1.5,\n\t\t\t\t\t\ttransformOrigin: 'top left',\n\t\t\t\t\t\tduration: animationVariables.duration,\n\t\t\t\t\t\tscrollTrigger: scrollTriggerElement\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}\n\n\t// I am thinking that we can end up using these kind of formulas as an embed element in the actual page for future pages?\n\tfromBottom([\n\t\t'.js-banner-landing .inner > *:not(img)',\n\t\t'.js-banner-about .inner > *:not(img)',\n\t\t'.js-yes p',\n\t\t'.js-carousel h3',\n\t\t'.js-contact',\n\t\t'.js-responsibility .callout-group',\n\t\t'.js-overlay img',\n\t\t'.js-tabs-nav .tab-content',\n\t\t'.js-intro'\n\t]);\n\tfromLeft([\n\t\t'.js-yes h2',\n\t\t'.js-contact .col-left',\n\t\t'.js-carousel .carousel-content',\n\t\t'.js-accordions .col-left',\n\t\t'#articles',\n\t\t'.js-dei .col-left',\n\t\t'.js-responsibility .content',\n\t\t'.js-tabs-stack .tab-btn'\n\t]);\n\tfromRight([\n\t\t'.js-yes h3',\n\t\t'.js-contact .col-right',\n\t\t'.js-carousel .carousel-img',\n\t\t'.js-accordions .col-right',\n\t\t'.js-dei .col-right',\n\t\t'.js-responsibility img',\n\t\t'.js-tabs-stack .tab-content'\n\t]);\n\tfadeIn(['.js-banner-about img', '.js-banner-insights']);\n\tfromTop(['.js-yes .more-arrow', '.js-dei .headline', '.js-overlay blockquote']);\n\tscaleUp(['.js-banner-landing img']);\n});\n","const articleWrappers = document.querySelectorAll('.articles-wrapper');\nif (articleWrappers) {\n\tarticleWrappers.forEach((articleWrapper) => {\n\t\tif (articleWrapper.querySelector('.article-controls')) {\n\t\t\tarticleWrapper.addEventListener('touchstart', startTouch, false);\n\t\t\tarticleWrapper.addEventListener('touchmove', articleSwipe, false);\n\t\t}\n\t});\n\n\t// Swipe Up / Down / Left / Right\n\tvar initialX = null;\n\tvar initialY = null;\n\n\tfunction startTouch(e) {\n\t\tinitialX = e.touches[0].clientX;\n\t\tinitialY = e.touches[0].clientY;\n\t}\n\n\tfunction articleSwipe(e) {\n\t\tconst controls = this.querySelectorAll('.article-control'),\n\t\t\tarticles = this.querySelectorAll('.article');\n\n\t\tif (initialX === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (initialY === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar currentX = e.touches[0].clientX;\n\t\tvar currentY = e.touches[0].clientY;\n\n\t\tvar diffX = initialX - currentX;\n\t\tvar diffY = initialY - currentY;\n\n\t\tif (Math.abs(diffX) > Math.abs(diffY)) {\n\t\t\te.preventDefault();\n\n\t\t\tlet activeIndex = 0;\n\n\t\t\t// removing the active article class on left swipe and setting whatever that index was to the activeIndex\n\t\t\tarticles.forEach((article, index) => {\n\t\t\t\tif (article.classList.contains('js-article-active')) {\n\t\t\t\t\tactiveIndex = index;\n\t\t\t\t}\n\t\t\t});\n\t\t\tlet nextIndex;\n\n\t\t\tif (diffX > 0) {\n\t\t\t\tnextIndex = (activeIndex + 1) % articles.length;\n\n\t\t\t\tanimateSwipe(articles, activeIndex, nextIndex, 'left');\n\t\t\t} else {\n\t\t\t\tnextIndex = activeIndex - 1 < 0 ? articles.length - 1 : activeIndex - 1;\n\n\t\t\t\tanimateSwipe(articles, activeIndex, nextIndex, 'right');\n\t\t\t}\n\n\t\t\tarticles[activeIndex].classList.remove('js-article-active');\n\t\t\tarticles[nextIndex].classList.add('js-article-active');\n\t\t\tcontrols[activeIndex].classList.remove('js-article-active');\n\t\t\tcontrols[nextIndex].classList.add('js-article-active');\n\t\t}\n\n\t\tinitialX = null;\n\t\tinitialY = null;\n\t}\n}\n\nfunction animateSwipe(articles, currentIndex, nextIndex, direction) {\n\tconst currentArticle = articles[currentIndex],\n\t\tnextArticle = articles[nextIndex];\n\n\tgsap.set(nextArticle, {\n\t\tx: direction === 'left' ? '100%' : '-100%',\n\t\tzIndex: 2,\n\t\topacity: 0\n\t});\n\n\tconst swipeTimeline = gsap.timeline();\n\n\tswipeTimeline\n\t\t.to(currentArticle, {\n\t\t\tx: direction === 'left' ? '-100%' : '100%',\n\t\t\tduration: 1,\n\t\t\tease: 'power2.out'\n\t\t})\n\t\t.to(\n\t\t\tnextArticle,\n\t\t\t{\n\t\t\t\tx: '0%',\n\t\t\t\tduration: 1,\n\t\t\t\tease: 'power2.out',\n\t\t\t\topacity: 1\n\t\t\t},\n\t\t\t'<'\n\t\t)\n\t\t.to(\n\t\t\tnextArticle,\n\t\t\t{\n\t\t\t\topacity: 1,\n\t\t\t\tduration: 0.5,\n\t\t\t\tease: 'power2.inOut'\n\t\t\t},\n\t\t\t'-=0.3'\n\t\t);\n}\n","// ---------------------------------------------\n// ======---------------------------------======\n// Site JS\n// ======---------------------------------======\n// ---------------------------------------------\n\n//===-----------------===\n// Reusable functions\n//===-----------------===\nconst classToggle = function (elements, elementClass) {\n\telements.forEach((element) => {\n\t\tif (!element.classList.contains(`${elementClass}`)) {\n\t\t\telement.classList.add(`${elementClass}`);\n\t\t} else {\n\t\t\telement.classList.remove(`${elementClass}`);\n\t\t}\n\t});\n};\n\nconst alertStatus = function (alert, alertMessage) {\n\tdocument.querySelector(alert).innerHTML = `
${alertMessage}
`;\n};\n\n//===-----------------===\n// Mobile menu\n//===-----------------===\nconst navigation = document.querySelector('.site-nav--mobile');\n// Checking for the navigation\nif (navigation) {\n\tconst body = document.querySelector('body'),\n\t\toverlay = document.querySelector('.overlay'),\n\t\tnavBtn = document.querySelector('.site-nav__btn');\n\n\tnavBtn.addEventListener('click', function () {\n\t\t// Toggling the classes for the menu, overlay, and body\n\t\tclassToggle([body, navigation, overlay], 'js-menu-open');\n\t\t// Setting an alert status for the menu, overlay, and body\n\t\tif (navigation.classList.contains('js-menu-open')) {\n\t\t\talertStatus('#nav-status', 'Menu opened');\n\t\t} else {\n\t\t\talertStatus('#nav-status', 'Menu closed');\n\t\t}\n\t\t// Checking to see if the menu is openened or closed to change the buttons text and aria-expanded values\n\t\tif (navigation.classList.contains('js-menu-open')) {\n\t\t\tnavBtn.querySelector('#site-nav__txt').innerHTML = 'Close';\n\t\t\tnavBtn.setAttribute('aria-expanded', true);\n\t\t} else {\n\t\t\tnavBtn.querySelector('#site-nav__txt').innerHTML = 'Menu';\n\t\t\tnavBtn.setAttribute('aria-expanded', false);\n\t\t}\n\t});\n\n\toverlay.addEventListener('click', () => {\n\t\tbody.classList.remove('js-menu-open');\n\t\toverlay.classList.remove('js-menu-open');\n\t\tnavigation.classList.remove('js-menu-open');\n\t});\n}\n\n//===-----------------===\n// Dropdown menu keyboard accessibility\n//===-----------------===\nconst dropdownNav = document.querySelector('.site-nav__item--dropdown');\nif (dropdownNav) {\n\tconst dropdownNavs = document.querySelectorAll('.site-nav__item--dropdown');\n\n\tfunction dropdownFocusHover(e) {\n\t\tconst dropdownItems = e.target.querySelectorAll('.dropdown-nav li a');\n\t\tlet i = -1;\n\t\te.target.addEventListener('keydown', (k) => {\n\t\t\tif (k.key === 'ArrowDown') {\n\t\t\t\tif (i < dropdownItems.length - 1) {\n\t\t\t\t\tk.preventDefault();\n\t\t\t\t\te.target.classList.add('js-dropdown-open');\n\n\t\t\t\t\ti++;\n\t\t\t\t\talertStatus(\n\t\t\t\t\t\t'#nav-status',\n\t\t\t\t\t\t`${dropdownItems[i].innerText} link is in focus. Viewing ${i + 1} of ${\n\t\t\t\t\t\t\tdropdownItems.length\n\t\t\t\t\t\t} sublinks`\n\t\t\t\t\t);\n\t\t\t\t\tdropdownItems[i].focus();\n\t\t\t\t}\n\t\t\t} else if (k.key === 'ArrowUp') {\n\t\t\t\tk.preventDefault();\n\t\t\t\tif (i > 0) {\n\t\t\t\t\ti--;\n\t\t\t\t\talertStatus(\n\t\t\t\t\t\t'#nav-status',\n\t\t\t\t\t\t`${dropdownItems[i].innerText} link is in focus. Viewing ${i + 1} of ${\n\t\t\t\t\t\t\tdropdownItems.length\n\t\t\t\t\t\t} sublinks`\n\t\t\t\t\t);\n\t\t\t\t\tdropdownItems[i].focus();\n\t\t\t\t}\n\t\t\t} else if (k.key === 'Tab') {\n\t\t\t\te.target.classList.remove('js-dropdown-open');\n\t\t\t\talertStatus('#nav-status', `Dropdown navigation is closed`);\n\t\t\t}\n\t\t});\n\t}\n\n\tdropdownNavs.forEach((dropdownNav) => {\n\t\tdropdownNav.addEventListener('focusin', dropdownFocusHover);\n\t});\n}\n\n//===-----------------===\n// Video player\n//===-----------------===\nconst video = document.querySelector('#skai-video');\n\nif (video) {\n\tconst watchBtn = video.parentNode.querySelector('.video-controls');\n\tconst options = {};\n\tconst player = new Vimeo.Player(video, options);\n\n\twatchBtn.classList.add('js-video-looping');\n\twatchBtn.addEventListener('click', function (e) {\n\t\te.stopImmediatePropagation();\n\t\tif (watchBtn.classList.contains('js-video-looping')) {\n\t\t\tclassToggle([watchBtn], 'js-video-playing');\n\t\t\t//unmuting the video\n\t\t\tplayer.setVolume(1);\n\t\t\t// starting the video over at the beginning (its looping and muted to start)\n\t\t\tplayer.setCurrentTime(0);\n\t\t\tplayer.play();\n\t\t}\n\t});\n\tvideo.parentNode.addEventListener('click', function (e) {\n\t\te.stopImmediatePropagation();\n\t\tif (!watchBtn.classList.contains('js-video-playing')) {\n\t\t\tplayer.play();\n\t\t\tclassToggle([watchBtn], 'js-video-playing');\n\t\t\twatchBtn.innerHTML = 'Pause';\n\t\t} else {\n\t\t\tplayer.pause();\n\t\t\twatchBtn.classList.remove('js-video-playing');\n\t\t}\n\t});\n}\n\n//===-----------------===\n// Carousel\n//===-----------------===\nconst carousels = document.querySelectorAll('.carousel-wrapper');\n\nif (carousels) {\n\tcarousels.forEach((carouselElement) => {\n\t\tconst nextControl = carouselElement.querySelector('.control-next');\n\t\tconst prevControl = carouselElement.querySelector('.control-prev');\n\t\tconst carouselNumber = carouselElement.querySelector('.carousel-number');\n\t\tlet position = 1;\n\t\tconst opacityIncrement = 0.25;\n\t\tconst opacityItem = document.querySelector('.color-change');\n\n\t\tfunction updateCarouselStatus() {\n\t\t\tcarouselNumber.innerHTML = `${position}/${items.length}`;\n\t\t\talertStatus('#carousel-status', `Viewing carousel item ${position} of ${items.length}`);\n\t\t}\n\n\t\tfunction updateControls() {\n\t\t\tprevControl.disabled = position === 1;\n\t\t\tnextControl.disabled = position === items.length;\n\t\t}\n\n\t\tfunction increaseOpacity() {\n\t\t\topacityItem.style.opacity = parseFloat(opacityItem.style.opacity) + opacityIncrement;\n\t\t}\n\n\t\tfunction decreaseOpacity() {\n\t\t\topacityItem.style.opacity = parseFloat(opacityItem.style.opacity) - opacityIncrement;\n\t\t}\n\n\t\tfunction goToNext() {\n\t\t\tposition++;\n\n\t\t\tincreaseOpacity();\n\t\t\tupdateCarouselStatus();\n\t\t\tupdateControls();\n\n\t\t\tconst activeItem = carouselElement.querySelector('.carousel-item.js-carousel-active');\n\t\t\tconst nextItem = activeItem.nextElementSibling;\n\t\t\tif (nextItem && nextItem.classList.contains('carousel-item')) {\n\t\t\t\tactiveItem.classList.remove('js-carousel-active');\n\t\t\t\tnextItem.classList.add('js-carousel-active');\n\t\t\t}\n\t\t}\n\n\t\tfunction goToPrevious() {\n\t\t\tposition--;\n\t\t\tdecreaseOpacity();\n\t\t\tupdateCarouselStatus();\n\t\t\tupdateControls();\n\n\t\t\tconst activeItem = carouselElement.querySelector('.carousel-item.js-carousel-active');\n\t\t\tconst prevItem = activeItem.previousElementSibling;\n\t\t\tif (prevItem && prevItem.classList.contains('carousel-item')) {\n\t\t\t\tactiveItem.classList.remove('js-carousel-active');\n\t\t\t\tprevItem.classList.add('js-carousel-active');\n\t\t\t}\n\t\t}\n\n\t\tnextControl.addEventListener('click', goToNext);\n\t\tprevControl.addEventListener('click', goToPrevious);\n\n\t\tconst items = carouselElement.querySelectorAll('.carousel-item');\n\n\t\tupdateCarouselStatus();\n\t\tupdateControls();\n\t});\n}\n\n//===-----------------===\n// Accordions\n//===-----------------===\nconst accordions = document.querySelectorAll('.accordion');\n\nif (accordions) {\n\taccordions.forEach((accordion) => {\n\t\tconst accordionHeader = accordion.querySelector('.accordion-header');\n\t\taccordionHeader.addEventListener('click', function () {\n\t\t\tconst accordionText = accordionHeader.innerText;\n\t\t\tconst isActive = accordion.classList.contains('js-accordion-active');\n\n\t\t\taccordions.forEach((element) => {\n\t\t\t\telement.classList.remove('js-accordion-active');\n\t\t\t\telement.setAttribute('aria-expanded', false);\n\t\t\t\talertStatus('#accordion-status', `${accordionText} accordion is closed`);\n\t\t\t});\n\t\t\tif (!isActive) {\n\t\t\t\taccordion.classList.add('js-accordion-active');\n\t\t\t\taccordion.setAttribute('aria-expanded', true);\n\t\t\t\talertStatus('#accordion-status', `${accordionText} accordion is open`);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction moveElementToTopWithOffset(elementClass, offset) {\n\tconst element = document.querySelector(elementClass);\n\tif (element) {\n\t\twindow.scrollTo({\n\t\t\ttop: element.getBoundingClientRect().top + window.scrollY - offset,\n\t\t\tbehavior: 'smooth'\n\t\t});\n\t}\n}\n\n//===-----------------===\n// Tabs - Page Navigation\n//===-----------------===\nif (document.querySelector('.tab-wrapper')) {\n\tconst tabWrappers = document.querySelectorAll('.tab-wrapper');\n\n\t// If the window is size for desktop making sure that the first tab is always open\n\ttabWrappers.forEach((tabWrapper) => {\n\t\tconst tabs = tabWrapper.querySelectorAll('.tab');\n\n\t\twindow.addEventListener('load', (e) => {\n\t\t\tconst hash = window.location.hash,\n\t\t\t\ttabLinks = document.querySelectorAll('.dropdown-nav--tabs a');\n\t\t\tif (hash) {\n\t\t\t\thistory.replaceState(null, null, window.location.href.split('#')[0]);\n\t\t\t\tdocument.documentElement.scrollTop = 0;\n\t\t\t\tdocument.body.scrollTop = 0;\n\n\t\t\t\tif (document.querySelector('.tab-wrapper--nav')) {\n\t\t\t\t\tconst tabId = hash.substring(1),\n\t\t\t\t\t\ttab = document.getElementById(tabId).parentElement,\n\t\t\t\t\t\ttabs = tabWrapper.querySelectorAll('.tab');\n\n\t\t\t\t\ttabs.forEach((tab) => {\n\t\t\t\t\t\ttab.classList.remove('js-tab-open');\n\t\t\t\t\t});\n\n\t\t\t\t\ttab.classList.add('js-tab-open');\n\n\t\t\t\t\ttabLinks.forEach((tabLink) => {\n\t\t\t\t\t\ttabLink.addEventListener('click', (e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\ttabs.forEach((tab) => {\n\t\t\t\t\t\t\t\ttab.classList.remove('js-tab-open');\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tconst linkHref = tabLink.href.split('#')[1],\n\t\t\t\t\t\t\t\tnewTab = document.getElementById(linkHref).parentElement;\n\t\t\t\t\t\t\tnewTab.classList.add('js-tab-open');\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!tabs[0].classList.contains('js-tab-open')) {\n\t\t\t\t\tconst tab = document.querySelector('js-tab-open');\n\t\t\t\t\tconst tabBtn = tabs[0].querySelector('.tab-btn');\n\n\t\t\t\t\tlet currentIndex = 0;\n\n\t\t\t\t\ttab.querySelector('tab-content h3').scrollIntoView({ behavior: 'smooth' });\n\t\t\t\t\ttabs[0].classList.add('js-tab-open');\n\t\t\t\t\ttabBtn.setAttribute('aria-selected', 'true');\n\n\t\t\t\t\talertStatus(\n\t\t\t\t\t\t'#tab-status',\n\t\t\t\t\t\t`${tabBtn.innerText} tab is open. Viewing tab ${currentIndex + 1} of ${tabs.length}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttabs.forEach((tab, index) => {\n\t\t\tconst tabBtn = tab.querySelector('.tab-btn'),\n\t\t\t\theader = document.querySelector('.site-header'),\n\t\t\t\theaderHeight = header.getBoundingClientRect().height;\n\n\t\t\ttabBtn.addEventListener('click', () => {\n\t\t\t\tif (window.innerWidth >= 992) {\n\t\t\t\t\tif (!tabBtn.classList.contains('js-tab-open')) {\n\t\t\t\t\t\ttabs.forEach((tab) => {\n\t\t\t\t\t\t\ttab.classList.remove('js-tab-open');\n\t\t\t\t\t\t});\n\t\t\t\t\t\ttab.classList.add('js-tab-open');\n\t\t\t\t\t\talertStatus(\n\t\t\t\t\t\t\t'#tab-status',\n\t\t\t\t\t\t\t`${tabBtn.innerText} tab is open. Viewing tab ${index + 1} of ${tabs.length}`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (tab.classList.contains('js-tab-open')) {\n\t\t\t\t\t\ttab.classList.remove('js-tab-open');\n\t\t\t\t\t\talertStatus('#tab-status', `All tabs closed`);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttabs.forEach((tab) => {\n\t\t\t\t\t\t\ttab.classList.remove('js-tab-open');\n\t\t\t\t\t\t});\n\t\t\t\t\t\ttab.classList.add('js-tab-open');\n\n\t\t\t\t\t\talertStatus(\n\t\t\t\t\t\t\t'#tab-status',\n\t\t\t\t\t\t\t`${tabBtn.innerText} tab is open. Viewing tab ${index + 1} of ${tabs.length}`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\twindow.scrollTo({\n\t\t\t\t\t\t\t\ttop: tabBtn.getBoundingClientRect().top + window.scrollY - headerHeight,\n\t\t\t\t\t\t\t\tbehavior: 'smooth'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}\n\n//===-----------------===\n// Sticky desktop nav\n//===-----------------===\nif (typeof document.querySelector('.site-header') !== 'undefined') {\n\tlet lastScrollTopNav = 0;\n\tconst body = document.querySelector('body');\n\tconst siteHeader = document.querySelector('.site-header');\n\n\tfunction setHeaderHeight() {\n\t\tconst headerHeight = siteHeader.getBoundingClientRect().height;\n\t\tbody.style.setProperty('--js-header-height', `${headerHeight}px`);\n\t}\n\tsetHeaderHeight();\n\n\tsetTimeout(() => {\n\t\twindow.addEventListener(\n\t\t\t'scroll',\n\t\t\tfunction () {\n\t\t\t\tconst st = window.scrollY || document.documentElement.scrollTop;\n\t\t\t\tconst headerHeight = siteHeader.getBoundingClientRect().height;\n\t\t\t\tsetHeaderHeight();\n\n\t\t\t\tif (st <= headerHeight) {\n\t\t\t\t\tbody.classList.remove('sticky-header');\n\t\t\t\t\tbody.removeAttribute('data-sticky');\n\t\t\t\t} else if (lastScrollTopNav <= headerHeight) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tbody.getAttribute('data-sticky') === 'header' &&\n\t\t\t\t\t\tbody.getAttribute('data-menu-status') != 'open'\n\t\t\t\t\t) {\n\t\t\t\t\t\tbody.setAttribute('data-sticky', 'header-out');\n\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tbody.removeAttribute('data-sticky');\n\t\t\t\t\t\t\tbody.classList.remove('sticky-header');\n\t\t\t\t\t\t\tconsole.log('this is the timeout');\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (body.getAttribute('data-sticky') !== 'header') {\n\t\t\t\t\t\tbody.classList.add('sticky-header');\n\t\t\t\t\t\tbody.setAttribute('data-sticky', 'header-in');\n\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tif (lastScrollTopNav <= headerHeight) {\n\t\t\t\t\t\t\t\tbody.removeAttribute('data-sticky');\n\t\t\t\t\t\t\t\tbody.classList.add('sticky-header');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tbody.setAttribute('data-sticky', 'header');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (location.href.includes('/insights/articles/')) {\n\t\t\t\t\tdocument.querySelector('body').classList.add('sticky-header');\n\t\t\t\t}\n\n\t\t\t\tlastScrollTopNav = st <= 0 ? 0 : st;\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}, 50);\n}\n\n// ====---------------====\n// Social Share\n// ====---------------====\nconst sharingOptions = document.querySelector('.social-share');\nif (sharingOptions) {\n\tconst sharingOptionsArry = document.querySelectorAll('.social-share');\n\tconst sharePageUrl = window.location.href;\n\tlet soLinkedin = `https://www.linkedin.com/shareArticle?mini=true&url=${sharePageUrl}`;\n\tlet soFacebook = `https://www.facebook.com/sharer/sharer.php?u=#${sharePageUrl}`;\n\tlet soTwitter = `http://www.twitter.com/share?url=${sharePageUrl}`;\n\tlet soPage = `${sharePageUrl}`;\n\n\tfunction setLinks(pageLink, val) {\n\t\tpageLink.setAttribute('href', val);\n\t}\n\n\tfunction copiedSuccess(parentEl, linkEl) {\n\t\tconst msg = 'link copied';\n\t\tconst linkOffset = linkEl.getBoundingClientRect().top - parentEl.getBoundingClientRect().top;\n\n\t\tlet msgEl = document.createElement('div');\n\t\tmsgEl.innerHTML = msg;\n\t\tmsgEl.classList.add('share-options__msg', 'share-options__msg--success');\n\t\tmsgEl.style.setProperty('--msg-offset', `${linkOffset}px`);\n\t\tparentEl.appendChild(msgEl);\n\n\t\tsetTimeout(() => {\n\t\t\tmsgEl.remove();\n\t\t}, 800);\n\t}\n\n\tfunction updateClipboard(newClip, cb) {\n\t\tnavigator.clipboard.writeText(newClip).then(\n\t\t\t() => {\n\t\t\t\t/* clipboard successfully set */\n\t\t\t\tconsole.log('success');\n\t\t\t\tcb;\n\t\t\t},\n\t\t\t() => {\n\t\t\t\t/* clipboard write failed */\n\t\t\t\tconsole.log('failed');\n\t\t\t}\n\t\t);\n\t}\n\n\tsharingOptionsArry.forEach((sharingOption) => {\n\t\tconst soPageLinks = sharingOption.querySelectorAll('a[data-link=\"page-url\"]');\n\t\tsoPageLinks.forEach((pageLink) => {\n\t\t\tsetLinks(pageLink, soPage);\n\t\t\tpageLink.addEventListener('click', (e) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tnavigator.permissions.query({ name: 'clipboard-write' }).then((result) => {\n\t\t\t\t\tif (result.state === 'granted' || result.state === 'prompt') {\n\t\t\t\t\t\tupdateClipboard(soPage, copiedSuccess(sharingOption, pageLink));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tconst soLinkedinLinks = sharingOption.querySelectorAll('[data-link=\"linkedin\"]');\n\t\tsoLinkedinLinks.forEach((pageLink) => setLinks(pageLink, soLinkedin));\n\n\t\tconst soFacebookLinks = sharingOption.querySelectorAll('[data-link=\"facebook\"]');\n\t\tsoFacebookLinks.forEach((pageLink) => setLinks(pageLink, soFacebook));\n\n\t\tconst soTwitterLinks = sharingOption.querySelectorAll('[data-link=\"twitter\"]');\n\t\tsoTwitterLinks.forEach((pageLink) => setLinks(pageLink, soTwitter));\n\t});\n}\n\n//===-----------------===\n// Active page\n//===-----------------===\nif (document.querySelector('.site-nav--desktop')) {\n\tconst navigationItems = document.querySelectorAll('.site-nav--desktop li a');\n\n\tnavigationItems.forEach((navigationItem) => {\n\t\tnavigationItem.classList.remove('js-current-page');\n\n\t\tif (\n\t\t\t!navigationItem.classList.contains('btn') &&\n\t\t\t!navigationItem.classList.contains('site-logo') &&\n\t\t\tnavigationItem.href.includes(`${location.pathname}`) &&\n\t\t\tlocation.pathname !== '/'\n\t\t) {\n\t\t\tnavigationItem.classList.add('js-current-page');\n\t\t}\n\t});\n}\n\n//===-----------------===\n// Articles (carousel like)\n//===-----------------===\nif (document.querySelector('.articles-wrapper')) {\n\tconst articleWrappers = document.querySelectorAll('.articles-wrapper');\n\tvar touchendX = 0;\n\tvar touchendY = 0;\n\tvar touchstartY = 0;\n\tvar touchstartX = 0;\n\n\tarticleWrappers.forEach((wrapper) => {\n\t\tconst articles = wrapper.querySelectorAll('.article'),\n\t\t\tcontrolWrapper = wrapper.querySelector('.article-controls');\n\t\tlet position = 1;\n\n\t\tarticles.forEach((article, index) => {\n\t\t\tconst articleControl = document.createElement('button');\n\t\t\tarticleControl.innerHTML = `${index + 1} of ${\n\t\t\t\tarticles.length\n\t\t\t}`;\n\t\t\tarticleControl.classList.add('article-control');\n\t\t\tif (article.classList.contains('js-article-active')) {\n\t\t\t\tarticleControl.classList.add('js-article-active');\n\t\t\t}\n\t\t\tcontrolWrapper.appendChild(articleControl);\n\t\t});\n\n\t\tconst controls = wrapper.querySelectorAll('.article-control');\n\n\t\tcontrols.forEach((control, index) => {\n\t\t\tcontrol.addEventListener('click', () => {\n\t\t\t\tcontrols.forEach((controlBtn) => {\n\t\t\t\t\tcontrolBtn.classList.remove('js-article-active');\n\t\t\t\t});\n\t\t\t\tarticles.forEach((article) => {\n\t\t\t\t\tif (article.classList.contains('js-article-active')) {\n\t\t\t\t\t\tarticle.classList.remove('js-article-active');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tarticles[index].classList.add('js-article-active');\n\t\t\t\tcontrol.classList.add('js-article-active');\n\t\t\t});\n\t\t});\n\t});\n}\n"]}