document.addEventListener("DOMContentLoaded",function(){var n=null;function t(){n&&(n.remove(),n=null)}document.addEventListener("selectionchange",function(){var e=window.getSelection();if(0!==e.rangeCount){var o=e.getRangeAt(0).commonAncestorContainer,i=o.nodeType===Node.ELEMENT_NODE?o.closest('a[data-linkcentral-id-sync], a[href^="#linkcentral-sync-to-"]'):o.parentElement.closest('a[data-linkcentral-id-sync], a[href^="#linkcentral-sync-to-"]'),a=document.querySelector(".elementor-editor-active .pen-menu");if(a&&a.querySelector('.pen-icon[data-action="createlink"]'))if(i){a.style.display="none";var l=i.getBoundingClientRect(),c="".concat(l.top,",").concat(l.left);n&&n.getAttribute("data-linkcentral-position")===c||function(e,o){t();var i=e.getAttribute("data-linkcentral-id-sync");if(!i){var a=e.getAttribute("href").match(/#linkcentral-sync-to-(\d+)/);a&&(i=a[1])}var l=document.createElement("div");l.className="linkcentral-elementor-tooltip",l.setAttribute("data-linkcentral-position",o),l.innerHTML='\n            <img src="'.concat(linkcentral_data.plugin_url,'assets/images/linkcentral-logo.svg" alt="LinkCentral Logo" class="linkcentral-logo">\n            <div class="linkcentral-tooltip-content">\n                <strong>LinkCentral - synchronized with ID: ').concat(i,"</strong>\n                Please use the Text Editor for editing.\n            </div>\n        "),document.body.appendChild(l);var c=e.getBoundingClientRect(),r=l.getBoundingClientRect();l.style.top="".concat(c.bottom+window.scrollY+10,"px"),l.style.left="".concat(c.left+window.scrollX+c.width/2-r.width/2,"px"),setTimeout(function(){return l.style.opacity="1"},10),n=l}(i,c)}else t()}}),document.addEventListener("focusout",t);var e=document.createElement("style");e.textContent="\n        .linkcentral-elementor-tooltip {\n            position: absolute;\n            background-color: #f6f7f7;\n            color: #595959;\n            padding: 10px;\n            border: 1px solid #a7aaad;\n            border-radius: 2px;\n            box-shadow: 0 1px 3px rgba(0, 0, 0, .15);\n            font-size: 14px;\n            z-index: 9999;\n            opacity: 0;\n            transition: opacity 0.2s ease-in-out;\n            display: flex;\n            align-items: flex-start;\n            font-family: var(--e-global-typography-text-font-family), Sans-serif;\n        }\n        .linkcentral-elementor-tooltip .linkcentral-logo {\n            width: 20px;\n            height: 20px;\n            margin-right: 10px;\n            margin-top: 3px;\n        }\n        .linkcentral-tooltip-content {\n            display: flex;\n            flex-direction: column;\n        }\n    ",document.head.appendChild(e)});