1import { B as o } from "./baseModule-BYgYF_2W.js"; 2import { m as s } from "./index-BcleJ2Xb.js"; 3import { u as n } from "./index-BBvUVmxt.js"; 4import { p as a } from "./pinia-DX3v98At.js"; 5import { s as c } from "./pinia-CiH11FLJ.js"; 6c(a); 7class h extends o { 8 socialMediaLinks; 9 links; 10 elem; 11 constructor(e) { 12 super(e, e.getAttribute("data-js-module")), this.elem = e, this.getElements([ 13 { 14 id: "dataPrivacyLink", 15 selector: "link-type-dataprivacy" 16 }, 17 { 18 id: "cty", 19 selector: "link-type-cty" 20 }, 21 { 22 id: "route", 23 selector: "link-type-route" 24 } 25 ]), this.init(); 26 } 27 async init() { 28 this.showFooterLinksByLogginStatus(), this.links = document.querySelectorAll( 29 ".t-footer__main-nav-desktop .a-link, .t-footer__main-nav-mobile .a-link" 30 ), this.socialMediaLinks = document.querySelectorAll(".t-footer__footer-social-icon"), this.links && this.onClickLink(this.links), this.socialMediaLinks && this.onClickSocialMediaLink(this.socialMediaLinks), this.addLinkTracking(); 31 } 32 addLinkTracking() { 33 this.getSession()?.accountCategory ? this.onLinkTracking() : window.addEventListener("app:status:getSessionDataSuccess", () => this.onLinkTracking()); 34 } 35 onLinkTracking() { 36 for (const [e, i] of Object.entries(this.elements)) 37 if (i && e !== "self") { 38 let t = ""; 39 e === "cty" && (t = "Bürkert Close-To-You"), e === "dataPrivacyLink" && (t = "Data Privacy Settings"), e === "route" && (t = "Get directions"), i.addEventListener("click", () => { 40 s.methods.track("Footer-Event", "Functions", t, "", { 41 accountCategory: this.getSession()?.accountCategory 42 }); 43 }); 44 } 45 } 46 onClickLink(e) { 47 for (const i of e) { 48 const t = i.querySelector(".a-link__label")?.innerHTML;
49 this.getSession()?.accountCategory ? i.addEventListener("click", () => { 50 s.methods.track("Footer-Event", "Navigation", t, "", { 51 accountCategory: this.getSession()?.accountCategory 52 }); 53 }) : window.addEventListener("app:status:getSessionDataSuccess", () => { 54 i.addEventListener("click", () => { 55 s.methods.track("Footer-Event", "Navigation", t, "", { 56 accountCategory: this.getSession()?.accountCategory 57 }); 58 }); 59 }); 60 } 61 } 62 onClickSocialMediaLink(e) { 63 for (const i of e) { 64 const t = i.href; 65 this.getSession()?.accountCategory ? i.addEventListener("click", () => { 66 s.methods.track("Footer-Event", "Social Media", t, "", { 67 accountCategory: this.getSession()?.accountCategory 68 }); 69 }) : window.addEventListener("app:status:getSessionDataSuccess", () => { 70 i.addEventListener("click", () => { 71 s.methods.track("Footer-Event", "Social Media", t, "", { 72 accountCategory: this.getSession()?.accountCategory 73 }); 74 }); 75 }); 76 } 77 } 78 showFooterLinksByLogginStatus() { 79 this.displayLinksByLogginStatus(this.getSession()?.isAnonymous), window.addEventListener("app:status:getSessionDataSuccess", () => { 80 this.displayLinksByLogginStatus(this.getSession()?.isAnonymous); 81 }); 82 } 83 displayLinksByLogginStatus(e) { 84 const i = this.elem.querySelectorAll("[data-href]"); 85 for (const t of i) 86 e === !1 && (t.href = t.dataset.href, t.innerHTML = t.dataset.text); 87 } 88 getSession() { 89 return n(); 90 } 91} 92export { 93 h as default 94};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.