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KAGc,GAAHH,OAAAV,EACRnE,SAASX,iBAAiB,uCAAqC8E,EAC/DnE,SAASX,iBAAiB,2BAAyB8E,EACnDnE,SAASX,iBAAiB,gCAGvBO,SAAQ,SAACqF,GACXA,EAAMC,QAAQC,gBAAkB7E,EAChC2E,EAAM7D,UAAUe,IAAI,UAEpB8C,EAAM7D,UAAUC,OAAO,SAE/B,GACJ,CACJ,CAAE,MAAO+D,GACLd,QAAQc,MAAM,8BAA+BA,EACjD,CACJ,GAAC,CAAAvE,IAAA,oBAAAC,MAED,SAAkBL,GACd,IACI,IACI4E,EAEJ,GAAIC,SAASC,SAASC,SAAS,KAAM,CACjC,IAAMC,EAAQH,SAASC,SAASG,MAAM,KACtCL,EAASI,EAAMA,EAAMf,OAAS,GAAK,IAAMe,EAAMA,EAAMf,OAAS,EAClE,MACIW,EAASC,SAASC,UAGtBI,EAAAA,EAAAA,IAVuB,eAUalF,EAAsB,IAAK4E,EACnE,CAAE,MAAOD,GACLd,QAAQc,MAAM,iCAAkCA,EACpD,CACJ,GAAC,CAAAvE,IAAA,oBAAAC,MAED,SAAkB8E,GACd,KAEIC,EAAAA,EAAAA,IADuB,WACGD,EAAc,IAC5C,CAAE,MAAOR,GACLd,QAAQc,MAAM,iCAAkCA,EACpD,CACJ,I,gFAAC,CApSS,E","sources":["webpack://@hero-digital/zoom/./src/components/product-hub-components/Footer-v1/Footer-v1.js"],"sourcesContent":["import { setCookieWithDomain, setCookie } from '../../../js/utilities/utilities'\r\nimport { callPricingAPI } from '../../../js/utilities/pricing'\r\n\r\nclass FooterV1 {\r\n constructor(el) {\r\n this.el = el;\r\n this.domMap = {\r\n titles: this.el.querySelectorAll(\".zdcm-module-footer-nav__title\"),\r\n dropdown: this.el.querySelectorAll('.zdcm-module-footer-dropdown')\r\n };\r\n this.accordionClickHandlers = [];\r\n \r\n this.footerAccordion();\r\n this.openDropdown();\r\n \r\n const languageBtn = this.el.querySelectorAll('.zdcm-module-footer-dropdown__btn[data-template=\"js-language-content\"], .zdcm-module-footer-dropdown__btn[data-template=\"js-language-mobile-content\"]');\r\n const currencyBtn = this.el.querySelectorAll('.zdcm-module-footer-dropdown__btn[data-template=\"js-currency-content\"], .zdcm-module-footer-dropdown__btn[data-template=\"js-currency-mobile-content\"]');\r\n languageBtn.forEach((btn) => {\r\n btn.addEventListener('click', () => this.bindDropdownLogic());\r\n });\r\n currencyBtn.forEach((btn) => {\r\n btn.addEventListener('click', () => this.bindDropdownLogic());\r\n });\r\n \r\n document.addEventListener(\"currencySync\", (data) => this.onChangeCurrencyD(data));\r\n if (typeof allCurrencyList !== 'undefined' && allCurrencyList) {\r\n let currencyCurrency = allCurrencyList.find(currency => currency.isSelected == true);\r\n if (currencyCurrency) {\r\n this.setCurrencyCookie(currencyCurrency?.currencyAbbreviation);\r\n }\r\n }\r\n \r\n window.addEventListener(\"resize\", this.handleResize.bind(this));\r\n }\r\n\r\n footerAccordion() {\r\n if (window.innerWidth > 1024) {\r\n this.domMap.titles.forEach((title) => {\r\n const panel = title.nextElementSibling;\r\n title.classList.remove(\"active\");\r\n \r\n if (panel && panel.classList.contains(\"zdcm-module-footer-nav__panel\")) {\r\n panel.style.maxHeight = \"\";\r\n panel.style.opacity = \"\";\r\n panel.style.overflow = \"\";\r\n panel.style.transition = \"\";\r\n panel.style.marginBottom = \"\";\r\n panel.style.display = \"\";\r\n }\r\n });\r\n } else {\r\n this.domMap.titles.forEach((title) => {\r\n const clonedTitle = title.cloneNode(true);\r\n title.parentNode.replaceChild(clonedTitle, title);\r\n });\r\n \r\n this.domMap.titles = this.el.querySelectorAll(\".zdcm-module-footer-nav__title\");\r\n \r\n this.domMap.titles.forEach((title, index) => {\r\n const panel = title.nextElementSibling;\r\n\r\n if (panel && panel.classList.contains(\"zdcm-module-footer-nav__panel\")) {\r\n panel.style.overflow = \"hidden\";\r\n panel.style.transition = \"max-height 0.4s ease, opacity 0.3s ease\";\r\n \r\n if (index === 0) {\r\n title.classList.add(\"active\");\r\n panel.style.maxHeight = panel.scrollHeight + \"px\";\r\n panel.style.opacity = \"1\";\r\n panel.style.marginBottom = '40px';\r\n } else {\r\n title.classList.remove(\"active\");\r\n panel.style.maxHeight = \"0px\";\r\n panel.style.opacity = \"0\";\r\n panel.style.marginBottom = '0px';\r\n }\r\n }\r\n const clickHandler = (e) => {\r\n e.preventDefault();\r\n\r\n const isAlreadyOpen = title.classList.contains(\"active\");\r\n this.domMap.titles.forEach((t) => {\r\n const otherPanel = t.nextElementSibling;\r\n if (t !== title) {\r\n t.classList.remove(\"active\");\r\n if (otherPanel && otherPanel.classList.contains(\"zdcm-module-footer-nav__panel\")) {\r\n otherPanel.style.maxHeight = \"0px\";\r\n otherPanel.style.opacity = \"0\";\r\n otherPanel.style.marginBottom = '0px';\r\n }\r\n }\r\n });\r\n const currentPanel = title.nextElementSibling;\r\n \r\n if (currentPanel && currentPanel.classList.contains(\"zdcm-module-footer-nav__panel\")) {\r\n if (isAlreadyOpen) {\r\n title.classList.remove(\"active\");\r\n currentPanel.style.maxHeight = \"0px\";\r\n currentPanel.style.opacity = \"0\";\r\n currentPanel.style.marginBottom = '0px';\r\n } else {\r\n title.classList.add(\"active\");\r\n currentPanel.style.maxHeight = currentPanel.scrollHeight + \"px\";\r\n currentPanel.style.opacity = \"1\";\r\n currentPanel.style.marginBottom = '40px';\r\n }\r\n }\r\n };\r\n \r\n title.addEventListener(\"click\", clickHandler);\r\n });\r\n }\r\n }\r\n\r\n openDropdown() {\r\n this.domMap.dropdown.forEach((button) => {\r\n button.addEventListener('click', (event) => {\r\n event.stopPropagation(); // Prevent triggering document click\r\n\r\n const targetId = button.getAttribute('data-target');\r\n const dropdown = document.getElementById(targetId);\r\n const parent = button.closest('.zdcm-module-footer-dropdown');\r\n\r\n if (parent) {\r\n parent.classList.toggle('open');\r\n\r\n // Close other dropdowns\r\n document.querySelectorAll('.zdcm-module-footer-dropdown').forEach(drop => {\r\n if (drop !== parent) {\r\n drop.classList.remove('open');\r\n }\r\n });\r\n }\r\n });\r\n });\r\n\r\n // Handle click outside to close all dropdowns\r\n document.addEventListener('click', (event) => {\r\n const isInsideDropdown = event.target.closest('.zdcm-module-footer-dropdown');\r\n if (!isInsideDropdown) {\r\n document.querySelectorAll('.zdcm-module-footer-dropdown').forEach(drop => {\r\n drop.classList.remove('open');\r\n });\r\n }\r\n });\r\n}\r\n\r\n\r\n handleResize() {\r\n requestAnimationFrame(() => {\r\n if (window.innerWidth > 1024) {\r\n this.domMap.titles.forEach((title) => {\r\n const panel = title.nextElementSibling;\r\n title.classList.remove(\"active\");\r\n\r\n if (panel && panel.classList.contains(\"zdcm-module-footer-nav__panel\")) {\r\n panel.style.maxHeight = \"\";\r\n panel.style.opacity = \"\";\r\n panel.style.overflow = \"\";\r\n panel.style.transition = \"\";\r\n panel.style.marginBottom = \"\";\r\n panel.style.display = \"\";\r\n }\r\n });\r\n } else {\r\n this.footerAccordion();\r\n }\r\n });\r\n }\r\n\r\n bindDropdownLogic() {\r\n const languageLinks = document.querySelectorAll(\r\n '#js-language-content .zdcm-module-footer-dropdown__link, #js-language-mobile-content .zdcm-module-footer-dropdown__link'\r\n );\r\n \r\n languageLinks.forEach(link => {\r\n link.addEventListener('click', e => {\r\n const locale = link.getAttribute('data-locale');\r\n if (locale) {\r\n this.setLanguageCookie(locale);\r\n \r\n languageLinks.forEach(l => {\r\n if (l.getAttribute('data-locale') === locale) {\r\n l.classList.add('active');\r\n } else {\r\n l.classList.remove('active');\r\n }\r\n });\r\n }\r\n });\r\n });\r\n \r\n const currencyItems = document.querySelectorAll(\r\n '#js-currency-content .zdcm-module-footer-dropdown__item, #js-currency-mobile-content .zdcm-module-footer-dropdown__item'\r\n );\r\n \r\n currencyItems.forEach((item) => {\r\n item.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n const currency = item.getAttribute('data-currency-value');\r\n if (currency) {\r\n document.dispatchEvent(new CustomEvent(\"currencySync\", { \r\n detail: { currency }, \r\n bubbles: true \r\n }));\r\n }\r\n });\r\n });\r\n }\r\n\r\n onChangeCurrencyD(data) {\r\n try {\r\n let currencyAbbreviation = data.detail.currency;\r\n let currency = currencyAbbreviation;\r\n \r\n const currencyItems = document.querySelectorAll(\r\n '#js-currency-content .zdcm-module-footer-dropdown__item, #js-currency-mobile-content .zdcm-module-footer-dropdown__item'\r\n );\r\n \r\n let item = [...currencyItems].find(li => li.id === currencyAbbreviation);\r\n \r\n if (!item) {\r\n console.warn('Currency item not found:', currencyAbbreviation);\r\n return;\r\n }\r\n \r\n const button = item.querySelector('.zdcm-module-footer-dropdown__link');\r\n const currencyButtons = document.querySelectorAll('[data-template=\"js-currency-content\"], [data-template=\"js-currency-mobile-content\"]');\r\n\r\n if (button && currencyButtons.length > 0) {\r\n document\r\n .querySelectorAll('#js-currency-content .zdcm-module-footer-dropdown__link, #js-currency-mobile-content .zdcm-module-footer-dropdown__link')\r\n .forEach((el) => el.classList.remove('active'));\r\n\r\n button.classList.add('active');\r\n\r\n currencyButtons.forEach((currencyButton) => {\r\n currencyButton.innerHTML = `${button.innerText}`;\r\n });\r\n }\r\n\r\n if (currency) {\r\n this.setCurrencyCookie(currency);\r\n \r\n const flag = document.querySelector(\"#IsIncludeCurrencyFilter\");\r\n if (flag && flag.value === \"1\") {\r\n document.dispatchEvent(new CustomEvent(\"currencyChanged\", { detail: { currency } }));\r\n } else {\r\n callPricingAPI();\r\n }\r\n\r\n const allPrices = [\r\n ...document.querySelectorAll('.fdn-pricing-card__price-container'),\r\n ...document.querySelectorAll('.fdn-event-card__price'),\r\n ...document.querySelectorAll('.fdn-expanding-card__price')\r\n ];\r\n\r\n allPrices.forEach((price) => {\r\n if (price.dataset.currencyValue === currency) {\r\n price.classList.add('active');\r\n } else {\r\n price.classList.remove('active');\r\n }\r\n });\r\n }\r\n } catch (error) {\r\n console.error('Error in onChangeCurrencyD:', error);\r\n }\r\n }\r\n\r\n setCurrencyCookie(currencyAbbreviation) {\r\n try {\r\n const currencyCookie = \"_zm_currency\";\r\n let domain;\r\n \r\n if (location.hostname.includes('.')) {\r\n const parts = location.hostname.split('.');\r\n domain = parts[parts.length - 2] + '.' + parts[parts.length - 1];\r\n } else {\r\n domain = location.hostname;\r\n }\r\n \r\n setCookieWithDomain(currencyCookie, currencyAbbreviation, 365, domain);\r\n } catch (error) {\r\n console.error('Error setting currency cookie:', error);\r\n }\r\n }\r\n\r\n setLanguageCookie(languageCode) {\r\n try {\r\n const languageCookie = \"_zm_lang\";\r\n setCookie(languageCookie, languageCode, 365);\r\n } catch (error) {\r\n console.error('Error setting language cookie:', error);\r\n }\r\n }\r\n}\r\n\r\nexport default FooterV1;"],"names":["FooterV1","el","_this","_classCallCheck","this","domMap","titles","querySelectorAll","dropdown","accordionClickHandlers","footerAccordion","openDropdown","languageBtn","currencyBtn","forEach","btn","addEventListener","bindDropdownLogic","document","data","onChangeCurrencyD","allCurrencyList","currencyCurrency","find","currency","isSelected","setCurrencyCookie","currencyAbbreviation","window","handleResize","bind","key","value","_this2","innerWidth","title","panel","nextElementSibling","classList","remove","contains","style","maxHeight","opacity","overflow","transition","marginBottom","display","clonedTitle","cloneNode","parentNode","replaceChild","index","add","scrollHeight","e","preventDefault","isAlreadyOpen","t","otherPanel","currentPanel","button","event","stopPropagation","targetId","getAttribute","parent","getElementById","closest","toggle","drop","target","_this3","requestAnimationFrame","_this4","languageLinks","link","locale","setLanguageCookie","l","item","dispatchEvent","CustomEvent","detail","bubbles","_toConsumableArray","li","id","console","warn","querySelector","currencyButtons","length","currencyButton","innerHTML","concat","innerText","flag","callPricingAPI","price","dataset","currencyValue","error","domain","location","hostname","includes","parts","split","setCookieWithDomain","languageCode","setCookie"],"sourceRoot":""}