{"version":3,"names":["transformHeaderOnScroll","target","threshold","document","documentElement","scrollTop","body","classList","add","remove","elements","selector","offset","multiple","window","addEventListener","callback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","el","querySelector","querySelectorAll","observe","header","secondaryHeader","menuTrigger","trigger","toggle","radio","checked","parentElement","event","nav","dropDown","contains","menu","insertAdjacentHTML","icon"],"sources":["header.js","animateOnScroll.js","app.js","join.js"],"sourcesContent":["/**\n* @param {Element} element target element\n* @param {Number} threshold distance threshold in pixels\n*/\nexport function transformHeaderOnScroll(target, threshold) {\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n if (scrollTop >= threshold) {\n target.classList.add(\"scrolledHeader\");\n } else {\n target.classList.remove(\"scrolledHeader\");\n }\n}\n\n/**\n* @param {Element} target target element\n* @param {Element} trigger trigger element\n*/\nexport function toggleMobileMenu(target, trigger) {\n target.classList.toggle('activeMenu');\n trigger.classList.toggle('isActive');\n}","export default function (elements) {\n window.addEventListener(\"load\", () => {\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n entry.target.classList.add(\"animate\");\n }\n });\n };\n \n const observer = (threshold) => {\n return new IntersectionObserver(callback, {\n threshold: [threshold]\n });\n };\n \n elements.forEach((el) => {\n if (document.querySelector(el.selector)) {\n if (el.multiple) {\n document.querySelectorAll(el.selector).forEach(multiple => {\n observer(el.offset).observe(multiple);\n })\n } else {\n observer(el.offset).observe(document.querySelector(el.selector));\n }\n }\n });\n });\n}","//import SmoothScroll from 'smooth-scroll';\n//import Rellax from 'rellax';\nimport { transformHeaderOnScroll, toggleMobileMenu } from \"./header.js\"\nimport { joinRadio } from \"./join.js\"\n//import Plyr from 'plyr';\nimport animateOnScroll from \"./animateOnScroll\"\n\nanimateOnScroll([\n /* { selector: \".fact img\", offset: 0.25, multiple: true }, */\n /* { selector: \".hero svg.logo\", offset: 0.25, multiple: true }, */\n /* { selector: \".about .text-wrap h3\", offset: 0.25, multiple: true }, */\n /* { selector: \"#AboutChart\", offset: 0.25, multiple: true }, */\n /* { selector: \".highlight-main\", offset: 0.25, multiple: true }, */\n { selector: \".highlight-red\", offset: 0.25, multiple: true },\n /* { selector: \".highlight-red-offset\", offset: 0.25, multiple: true }, */\n\n]);\n//Init Rellax\n//new Rellax('.rellax');\n\n//Init SmoothScroll\n/* new SmoothScroll('a[href*=\"#\"], a.scroll, li.scroll', {\n header: '[data-scroll-header]'\n}); */\n\nconst header = document.querySelector(\"header\");\nconst secondaryHeader = document.querySelector(\".logo-outer-wrapper\");\nconst threshold = 40;\nconst menuTrigger = document.querySelector('.hamburger');\n\n//Init Header Scroll Animation Event\nif (header && threshold) window.addEventListener('scroll', function () { transformHeaderOnScroll(header, threshold); } );\n\nif (secondaryHeader && threshold) window.addEventListener('scroll', function () { transformHeaderOnScroll(secondaryHeader, threshold); } );\n\n//Init Mobile Menu Event\nif (menuTrigger && header) menuTrigger.addEventListener('click', function () { toggleMobileMenu(header, menuTrigger); });\njoinRadio();\n\n//Closes mobile menu when link with class scroll is clicked\nif (document.querySelectorAll('.scroll')) {\n const scrollNav = document.querySelectorAll('.scroll a');\n scrollNav.forEach(function (nav) {\n nav.addEventListener(\"click\", () => { \n\n //If child submenu is active remove active class\n if (document.querySelectorAll('.menu-item-has-children.active')) {\n document.querySelectorAll('.menu-item-has-children.active').forEach(function (dropDown) {\n dropDown.classList.remove('active');\n });\n }\n //If mobile menu is active toggle activeMenu and isActive classes\n if (header.classList.contains('activeMenu')) {\n header.classList.toggle('activeMenu');\n menuTrigger.classList.toggle('isActive');\n }\n });\n });\n}\n\n// Sub Menu for Mobile\nlet plusIcon = ''\n\ndocument.querySelectorAll('.menu-item-has-children a').forEach(function (menu) {\n if (menu.parentElement.classList.contains('menu-item-has-children')) {\n menu.insertAdjacentHTML('beforebegin', plusIcon);\n }\n});\n\ndocument.querySelectorAll('.dropIcon').forEach(function (icon) {\n icon.addEventListener(\"click\", () => {\n if (icon.parentElement.classList.contains('active')) {\n icon.parentElement.classList.remove('active');\n } else {\n icon.parentElement.classList.add('active');\n }\n });\n});\n\n//global video player plugin\n/* window.addEventListener('DOMContentLoaded', () => {\n\tconst players = Array.from(document.querySelectorAll('.js-player')).map((p) => new Plyr(p, {\n\t\tclickToPlay: true,\n\t\tposter: p.dataset.plyrPoster,\n\t\tcontrols: ['play-large'],\n\t\tyoutube: {\n\t\t\tnoCookie: false\n\t\t},\n\t\tfullscreen: {\n\t\t\tenabled: true,\n\t\t\tfallback: true,\n\t\t\tiosNative: true\n\t\t}\n\t}));\n\tplayers.forEach((player) => {\n\t\tplayer.on('ended', function () {\n\t\t\tplayer.stop();\n\t\t});\n\t});\n}); */","export function joinRadio(){\n document.querySelectorAll('.iAM .gchoice input[type=\"radio\"]').forEach(function (radio) { \n // Find Radio that is Checked add Class\n if (radio.checked == true) {\n radio.parentElement.classList.toggle('checked')\n }\n // On Click Toggle Class\n radio.addEventListener(\"click\", event => {\n //console.log(event)\n document.querySelector('.iAM .gchoice.checked').classList.remove('checked');\n radio.parentElement.classList.toggle('checked') \n })\n })\n}"],"mappings":"yBAIO,SAASA,EAAwBC,EAAQC,IAC1BC,SAASC,gBAAgBC,WAAaF,SAASG,KAAKD,YACrDH,EACbD,EAAOM,UAAUC,IAAI,kBAErBP,EAAOM,UAAUE,OAAO,iBAEhC,CCXe,IAAUC,ICOT,CAMZ,CAAEC,SAAU,iBAAkBC,OAAQ,IAAMC,UAAU,IDZtDC,OAAOC,iBAAiB,QAAQ,KAC5B,MAAMC,EAAYC,IACdA,EAAQC,SAASC,IACTA,EAAMC,gBACND,EAAMlB,OAAOM,UAAUC,IAAI,UAC/B,GACF,EAGAa,EAAYnB,GACP,IAAIoB,qBAAqBN,EAAU,CACtCd,UAAW,CAACA,KAIpBQ,EAASQ,SAASK,IACVpB,SAASqB,cAAcD,EAAGZ,YACtBY,EAAGV,SACHV,SAASsB,iBAAiBF,EAAGZ,UAAUO,SAAQL,IAC3CQ,EAASE,EAAGX,QAAQc,QAAQb,EAAS,IAGz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