const e=(e,t,n)=>{let r=e(`html`).attr(`lang`)??`not found`,i=r!==`not found`,a=e(`html`).attr(`dir`)??null,o=!!a,s=r;s&&s!==`not found`&&n.add(s);let c=[];e(`link[rel='alternate']`).each((t,n)=>{let r=e(n).attr(`hreflang`),i=e(n).attr(`href`);r&&i&&c.push({hreflang:r,href:i})});let l=new Set(c.map(e=>e.hreflang)).size,u=c.some(e=>e.hreflang===`x-default`),d=[];for(let e of c)try{let r=new URL(e.href,t).href;d.push(r);let i=e.hreflang;i&&i!==`x-default`&&n.add(i)}catch{}return{langTag:r,htmlLangPresent:i,dirTag:a,htmlDirPresent:o,currentLocale:s,hreflangs:c,hreflangDiversity:l,hasXDefault:u,alternates:d}};export{e as analyzeLinguisticStructure};
//# sourceMappingURL=analyzeLinguisticStructure.mjs.map