{"version":3,"sources":["webpack:///./src/components/pmicom/widgets/ir-search-results/controller.js"],"names":["trackGtm4","require","module","exports","init","links","root","querySelectorAll","navLinks","navLinkFirst","querySelector","navLinkLast","forEach","link","title","innerHTML","addEventListener","event","widget_name","widget_title","link_text","link_url","href","button_type","navLink","navLinkText","trim","widget_type","interaction_type","navigationArrowTrackingGa4","mainItem","interactionType"],"mappings":";;;;;;;;;AAAA,MAAM;EAAEA;AAAF,IAAgBC,mBAAO,CAAC,6CAAD,CAA7B;;AAEAC,MAAM,CAACC,OAAP,GAAiB;EAChBC,IAAI,GAAG;IACN,MAAMC,KAAK,GAAG,KAAKC,IAAL,CAAUC,gBAAV,CAA2B,0BAA3B,CAAd;IACA,MAAMC,QAAQ,GAAG,KAAKF,IAAL,CAAUC,gBAAV,CAA2B,oBAA3B,CAAjB;IACA,MAAME,YAAY,GAAG,KAAKH,IAAL,CAAUI,aAAV,CAAwB,mBAAxB,CAArB;IACA,MAAMC,WAAW,GAAG,KAAKL,IAAL,CAAUI,aAAV,CAAwB,kBAAxB,CAApB;IAEAL,KAAK,CAACO,OAAN,CAAcC,IAAI,IAAI;MACrB,MAAMC,KAAK,GAAGD,IAAI,CAACH,aAAL,CAAmB,2BAAnB,EAAgDK,SAA9D;MACAF,IAAI,CAACG,gBAAL,CAAsB,OAAtB,EAA+B,MAAM;QACpChB,SAAS,CAAC;UACTiB,KAAK,EAAE,iBADE;UAETC,WAAW,EAAE,4BAFJ;UAGTC,YAAY,EAAEL,KAHL;UAITM,SAAS,EAAE,2BAJF;UAKTC,QAAQ,EAAER,IAAI,CAACS,IALN;UAMTC,WAAW,EAAE;QANJ,CAAD,CAAT;MAQA,CATD;IAUA,CAZD;IAcAf,QAAQ,CAACI,OAAT,CAAiBY,OAAO,IAAI;MAC3BA,OAAO,CAACR,gBAAR,CAAyB,OAAzB,EAAkC,MAAM;QACvC,MAAMS,WAAW,GAAGD,OAAO,GAAGA,OAAO,CAACT,SAAR,CAAkBW,IAAlB,EAAH,GAA8B,SAAzD;QACA1B,SAAS,CAAC;UACTiB,KAAK,EAAE,sCADE;UAETC,WAAW,EAAE,4BAFJ;UAGTC,YAAY,EAAE,UAHL;UAITQ,WAAW,EAAE,QAJJ;UAKTP,SAAS,EAAEK,WALF;UAMTJ,QAAQ,EAAEG,OAAO,CAACF,IAAR,GAAeE,OAAO,CAACF,IAAvB,GAA8B,QAN/B;UAOTM,gBAAgB,EAAG,QAAOH,WAAY;QAP7B,CAAD,CAAT;MASA,CAXD;IAYA,CAbD;IAeAhB,YAAY,CAACO,gBAAb,CAA8B,OAA9B,EAAuC,MAAM;MAC5C,KAAKa,0BAAL,CAAgCpB,YAAhC,EAA8C,OAA9C;IACA,CAFD;IAIAE,WAAW,CAACK,gBAAZ,CAA6B,OAA7B,EAAsC,MAAM;MAC3C,KAAKa,0BAAL,CAAgClB,WAAhC,EAA6C,MAA7C;IACA,CAFD;EAGA,CA3Ce;;EA4ChBkB,0BAA0B,CAACC,QAAD,EAAWC,eAAX,EAA4B;IACrD/B,SAAS,CAAC;MACTiB,KAAK,EAAE,sCADE;MAETC,WAAW,EAAE,4BAFJ;MAGTC,YAAY,EAAE,UAHL;MAITQ,WAAW,EAAE,QAJJ;MAKTP,SAAS,EAAEU,QAAQ,GAAGA,QAAQ,CAACf,SAAT,CAAmBW,IAAnB,EAAH,GAA+B,SALzC;MAMTL,QAAQ,EAAES,QAAQ,CAACR,IAAT,GAAgBQ,QAAQ,CAACR,IAAzB,GAAgC,QANjC;MAOTM,gBAAgB,EAAEG;IAPT,CAAD,CAAT;EASA;;AAtDe,CAAjB,C","file":"components--ir-search-results299af21d05a0f2fe6759.js","sourcesContent":["const { trackGtm4 } = require('util/functions');\n\nmodule.exports = {\n\tinit() {\n\t\tconst links = this.root.querySelectorAll('.ir-search-results--link');\n\t\tconst navLinks = this.root.querySelectorAll('.pages-nav--number');\n\t\tconst navLinkFirst = this.root.querySelector('.pages-nav--first');\n\t\tconst navLinkLast = this.root.querySelector('.pages-nav--last');\n\n\t\tlinks.forEach(link => {\n\t\t\tconst title = link.querySelector('.ir-search-results--title').innerHTML;\n\t\t\tlink.addEventListener('click', () => {\n\t\t\t\ttrackGtm4({\n\t\t\t\t\tevent: 'GA4_event_c_cta',\n\t\t\t\t\twidget_name: 'V3-Investor Search Results',\n\t\t\t\t\twidget_title: title,\n\t\t\t\t\tlink_text: 'No label: clickable title',\n\t\t\t\t\tlink_url: link.href,\n\t\t\t\t\tbutton_type: '',\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tnavLinks.forEach(navLink => {\n\t\t\tnavLink.addEventListener('click', () => {\n\t\t\t\tconst navLinkText = navLink ? navLink.innerHTML.trim() : 'No text';\n\t\t\t\ttrackGtm4({\n\t\t\t\t\tevent: 'GA4_event_c_content_navigation_click',\n\t\t\t\t\twidget_name: 'V3-Investor-search-results',\n\t\t\t\t\twidget_title: 'No title',\n\t\t\t\t\twidget_type: 'search',\n\t\t\t\t\tlink_text: navLinkText,\n\t\t\t\t\tlink_url: navLink.href ? navLink.href : 'No url',\n\t\t\t\t\tinteraction_type: `page ${navLinkText}`,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tnavLinkFirst.addEventListener('click', () => {\n\t\t\tthis.navigationArrowTrackingGa4(navLinkFirst, 'first');\n\t\t});\n\n\t\tnavLinkLast.addEventListener('click', () => {\n\t\t\tthis.navigationArrowTrackingGa4(navLinkLast, 'last');\n\t\t});\n\t},\n\tnavigationArrowTrackingGa4(mainItem, interactionType) {\n\t\ttrackGtm4({\n\t\t\tevent: 'GA4_event_c_content_navigation_click',\n\t\t\twidget_name: 'V3-Investor-search-results',\n\t\t\twidget_title: 'No title',\n\t\t\twidget_type: 'search',\n\t\t\tlink_text: mainItem ? mainItem.innerHTML.trim() : 'No text',\n\t\t\tlink_url: mainItem.href ? mainItem.href : 'No url',\n\t\t\tinteraction_type: interactionType,\n\t\t});\n\t},\n};\n"],"sourceRoot":""}