import s from"node:path";import i from"node:os";import{fileURLToPath as m}from"node:url";var a={"A — AI":"ai","B — Devtools":"devtools","C — Web Platform":"web","D — Security":"security","E — Repos & Releases":"repos","Cross-Domain Discovery":"cross"},f=s.dirname(m(import.meta.url)),d=s.resolve(f,"..","references","sources.md");function p(r){return r&&(r==="~"?i.homedir():r.startsWith("~/")?s.join(i.homedir(),r.slice(2)):r)}function x(r){return s.resolve(p(r))}function D(r,e="cross"){if(!r)return e;if(/^Cross[-\s]Domain/i.test(r))return"cross";for(let[t,o]of Object.entries(a))if(r===t||r.startsWith(t))return o;return e}async function h(r,e,t){let o=new Array(r.length),u=0;async function c(){for(;;){let n=u++;if(n>=r.length)return;o[n]=await t(r[n],n)}}return await Promise.all(Array.from({length:Math.min(e,r.length)},()=>c())),o}export{d as DEFAULT_SOURCES,a as SECTION_DOMAIN_MAP,p as expandUser,h as mapConcurrent,x as resolvePath,D as sectionToDomain};
