text: (function(){"use strict";var t=BX.namespace("BX.Crm.Tracking");if(t.B24Site){return}function e(){this.context=null}e.prototype.init=function(t){this.context=BX(t.containerId);this.sources=t.sources||[];this.sites=t.sites||[];this.mess=t.mess||{};BX.convert.nodeListToArray(this.context.querySelectorAll("[data-site-id]")).forEach(function(t){BX.bind(t,"click",this.openSite.bind(this,t))},this);BX.bind(window,"beforeunload",this.onWindowClose.bind(this));if(BX.SidePanel.Instance){BX.addCustomEvent("SidePanel.Slider:onClose",this.onWindowClose.bind(this))}};e.prototype.editSite=function(t){if(this.editingWindow){this.editingWindow.close()}var e=document.createElement("a");e.href=t;var i=e.protocol+"//"+e.hostname+(e.port?":"+e.port:"");this.editingWindow=window.open(t+"?utm_source=&b24_tracker_edit_enabled=y","editingWindow");this.connector=new window.b24Tracker.Connector({addressee:i,responders:{"tracking.editor.getData":this.getData.bind(this)}})};e.prototype.getData=function(){return{enabled:true,sources:this.sources,sites:[{host:this.sites.map(function(t){return t.DOMAIN_NAME}),replaceText:false,enrichText:false,resolveDup:false,replacement:"all"}]}};e.prototype.openSite=function(t){var e=t.getAttribute("data-site-id");if(!e){return}var i=this.sites.filter(function(t){return t.ID===e})[0];if(!i){return}this.editSite(i.DOMAIN_PROTOCOL+"://"+i.DOMAIN_NAME)};e.prototype.onWindowClose=function(){if(this.editingWindow){this.editingWindow.close()}this.editingWindow=null};t.B24Site=new e})();
  //# sourceMappingURL=script.map.js