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,QAAQ,WAAW,CAC1D,CAEA,yBAA0B,CACxB,KAAK,IAAI,gBAAgB,OAAO,EAC3B,KAAK,IAAI,aAAa,aAGzB,KAAK,IAAI,aAAa,MAAM,KAAK,IAAI,eAAe,EAFpD,KAAK,IAAI,UAAU,MAAM,KAAK,IAAI,eAAe,CAIrD,CACF,CAEA,UAAeH,C","file":"Areas/SunriseSeniorLiving/Scripts/4041.b3e8f8ba806c998f1299.bundle.js","sourcesContent":["import { Component } from '@verndale/core';\nimport { debounce } from 'lodash';\n\nclass Module extends Component {\n setupDefaults() {\n this.dom = {\n utilityLanguage: this.el._$('.monogram-footer__utility-language-item'),\n dropDown: this.el._$('.monogram-footer__utility-language-dropdown'),\n additionalLinks: this.el._$('.footer__additional-links'),\n copyRight: this.el._$('.monogram-footer__copyright'),\n copyRightInd: this.el._$('.monogram-footer__copyright--independent'),\n subLinks: this.el._$$('.monogram-footer__privacy-sublink-item')\n };\n this.classes = {\n utilityOpen: 'monogram-footer__utility-language-dropdown-open'\n }\n\n if (this.dom.subLinks.length == 0) {\n this.el.classList.add('monogram-footer__sky-active');\n }\n }\n\n addListeners() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n if (this.dom.utilityLanguage != null) {\n this.dom.utilityLanguage._on('click', this.handleToggleUtilityNavDropdown.bind(this));\n }\n window.addEventListener('resize', debounce(this.additionalLinksPosition.bind(this), 300));\n this.additionalLinksPosition();\n }\n\n handleClickOutside(e) {\n if (this.dom.dropDown !== e.target && this.dom.utilityLanguage !== null && !this.dom.utilityLanguage.contains(e.target)) {\n this.dom.dropDown.classList.remove(this.classes.utilityOpen);\n }\n }\n\n\n handleToggleUtilityNavDropdown(e) {\n e.preventDefault();\n if (this.dom.dropDown.classList.contains(this.classes.utilityOpen)) {\n this.dom.dropDown.classList.remove(this.classes.utilityOpen);\n return;\n }\n this.dom.dropDown.classList.remove(this.classes.utilityOpen);\n this.dom.dropDown.classList.add(this.classes.utilityOpen);\n }\n\n additionalLinksPosition() {\n this.dom.additionalLinks.remove();\n if (!this.dom.copyRightInd.offsetHeight) {\n this.dom.copyRight.after(this.dom.additionalLinks);\n } else {\n this.dom.copyRightInd.after(this.dom.additionalLinks);\n }\n }\n}\n\nexport default Module;\n"],"sourceRoot":""}