(self["webpackJsonp@lyrio/ui"]=self["webpackJsonp@lyrio/ui"]||[]).push([[176],{1723:function(t,e,n){"use strict";n.r(e);var i=n(50),a=n(79),r=n(907),c=n(822),o=n(823),s=n(775),u=function(){function t(e,n){var a=this;if(Object(i.a)(this,t),Object(o.b)(e,o.a.OUTBOUND_LINK_TRACKER),window.addEventListener){var c={events:["click"],linkSelector:"a, area",shouldTrackOutboundLink:this.shouldTrackOutboundLink,fieldsObj:{},attributePrefix:"ga-"};this.opts=Object(s.a)(c,n),this.tracker=e,this.handleLinkInteractions=this.handleLinkInteractions.bind(this),this.delegates={},this.opts.events.forEach((function(t){a.delegates[t]=Object(r.a)(document,t,a.opts.linkSelector,a.handleLinkInteractions,{composed:!0,useCapture:!0})}))}}return Object(a.a)(t,[{key:"handleLinkInteractions",value:function(t,e){var n=this;if(this.opts.shouldTrackOutboundLink(e,r.c)){var i=e.getAttribute("href")||e.getAttribute("xlink:href"),a=Object(r.c)(i),c={transport:"beacon",eventCategory:"Outbound Link",eventAction:t.type,eventLabel:a.href},o=Object(s.a)({},this.opts.fieldsObj,Object(s.d)(e,this.opts.attributePrefix)),u=Object(s.c)(c,o,this.tracker,this.opts.hitFilter,e,t);if(!navigator.sendBeacon&&function(t,e){return!("click"!=t.type||"_blank"==e.target||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.which>1)}(t,e)){window.addEventListener("click",(function e(){if(window.removeEventListener("click",e),!t.defaultPrevented){t.preventDefault();var a=u.hitCallback;u.hitCallback=Object(s.e)((function(){"function"==typeof a&&a(),location.href=i}))}n.tracker.send("event",u)}))}else this.tracker.send("event",u)}}},{key:"shouldTrackOutboundLink",value:function(t,e){var n=e(t.getAttribute("href")||t.getAttribute("xlink:href"));return n.hostname!=location.hostname&&"http"==n.protocol.slice(0,4)}},{key:"remove",value:function(){var t=this;Object.keys(this.delegates).forEach((function(e){t.delegates[e].destroy()}))}}]),t}();Object(c.a)("outboundLinkTracker",u)}}]);
//# sourceMappingURL=176.77b12433.chunk.js.map