TrackingConsentManager=(function(){var consentCookieName="sf-tracking-consent"; var consentDialogHtml=""; var consentDialog=null; var eventListeners={AfterDialogDisplayed:[],BeforeDialogClosed:[],ConsentChanged:[],}; function closeConsentDialog(){if(consentDialog==null){return; }invokeEventListeners("BeforeDialogClosed",[consentDialog]); document.body.removeChild(consentDialog); consentDialog=null; }function openConsentDialog(){if(!document.body){return; }closeConsentDialog(); consentDialog=document.createElement("div"); var dialogHtml=document.getElementById("sf-tracking-consent-manager"); if(!dialogHtml||!dialogHtml.textContent){console.error("TrackingConsentManager is initialized with an empty value. This may mean that consent dialog file is missing or invalid. Please check server side logs for more details."); }consentDialogHtml=dialogHtml.textContent; consentDialog.innerHTML=consentDialogHtml; document.body.insertBefore(consentDialog,document.body.childNodes[0]); var scripts=consentDialog.getElementsByTagName("script"); for(var idx=0; idx