{"version":3,"sources":["../../../dev/j/components/aa-helper.js"],"names":["sendButton","link","id","trackCustomDownload","toUpperCase","document","querySelectorAll","forEach","button","addEventListener","this","href","getAttribute","window","e","detail","element"],"mappings":"CACA,WACI,YAiBH,SAASA,GAAWC,EAAMC,GACS,kBAAxBC,sBACTA,oBAAoBF,EAAMC,EAAGE,cAAe,IAjB9CC,SAASC,iBAAiB,+BAA+BC,QAAQ,SAASC,GACzEA,EAAOC,iBAAiB,QAAS,WAChCT,EAAWU,KAAKC,KAAMD,KAAKE,aAAa,2BAK1CC,OAAOJ,iBAAiB,oBAAqB,SAASK,GACrDA,EAAEC,OAAOC,QAAQV,iBAAiB,+BAA+BC,QAAQ,SAASC,GACjFA,EAAOC,iBAAiB,QAAS,WAChCT,EAAWU,KAAKC,KAAMD,KAAKE,aAAa","file":"aa-helper.js","sourcesContent":["// helper script for adobe analytics - download buttons tracking\n(function() {\n 'use scrict';\n\n\tdocument.querySelectorAll('[data-role=\"download-link\"]').forEach(function(button) {\n\t\tbutton.addEventListener('click', function() {\n\t\t\tsendButton(this.href, this.getAttribute('data-download-name'));\n\t\t})\n\t})\n\n\t// event listener for change in actionbox\n\twindow.addEventListener('actionbox-updated', function(e) {\n\t\te.detail.element.querySelectorAll('[data-role=\"download-link\"]').forEach(function(button) {\n\t\t\tbutton.addEventListener('click', function() {\n\t\t\t\tsendButton(this.href, this.getAttribute('data-download-name'));\n\t\t\t})\n\t\t});\n\t});\n\n\tfunction sendButton(link, id) {\n\t\tif(typeof trackCustomDownload === 'function') {\n\t\t\ttrackCustomDownload(link, id.toUpperCase(), '');\n\t\t}\n\t}\n\n})();\n"]}