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AAM9D,UAAUC,OAAO,SAE/B,GACJ,CACJ,CAAE,MAAOgE,GACLd,QAAQc,MAAM,8BAA+BA,EACjD,CACJ,GAAC,CAAAvE,IAAA,oBAAAC,MAED,SAAkBJ,GACd,IACI,IACI2E,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,eAUajF,EAAsB,IAAK2E,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,CAxRS,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.isMobile = window.innerWidth <= 1024;\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(); \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 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 handleResize() {\r\n requestAnimationFrame(() => {\r\n const newIsMobile = window.innerWidth <= 1024;\r\n if (newIsMobile !== this.isMobile) {\r\n this.isMobile = newIsMobile; \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;\r\n\r\n"],"names":["FooterV1","el","_this","_classCallCheck","this","domMap","titles","querySelectorAll","dropdown","accordionClickHandlers","isMobile","window","innerWidth","footerAccordion","openDropdown","languageBtn","currencyBtn","forEach","btn","addEventListener","bindDropdownLogic","document","data","onChangeCurrencyD","allCurrencyList","currencyCurrency","find","currency","isSelected","setCurrencyCookie","currencyAbbreviation","handleResize","bind","key","value","_this2","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","newIsMobile","_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":""}