window.jSelectArticle=(t,e,a,n,o,i)=>{let r="";if(!Joomla.getOptions("xtd-articles"))return!1;const{editor:l}=Joomla.getOptions("xtd-articles");""!==i&&(r=`hreflang="${i}"`);const d=`<a ${r} href="${o}">${e}</a>`;return window.parent.Joomla.editors.instances[l].replaceSelection(d),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close(),!0},document.addEventListener("DOMContentLoaded",(()=>{const t=document.querySelectorAll(".select-link");for(let e=0,a=t.length;a>e;e+=1)t[e].addEventListener("click",(t=>{t.preventDefault();const{target:e}=t,a=e.getAttribute("data-function");"jSelectArticle"===a?window[a](e.getAttribute("data-id"),e.getAttribute("data-title"),e.getAttribute("data-cat-id"),null,e.getAttribute("data-uri"),e.getAttribute("data-language")):window.parent[a](e.getAttribute("data-id"),e.getAttribute("data-title"),e.getAttribute("data-cat-id"),null,e.getAttribute("data-uri"),e.getAttribute("data-language")),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close()}))}));