import{i as e}from"./Brnt5OaR.js";function t(t){let n=t.replace(/^\[\[|\]\]$/g,``).split(`|`)[0].trim();if(!n)return null;for(let t of e.repos){let e=t.entities.find(e=>e.id===n);if(e)return{id:e.id,title:e.title,entityType:e.entityType,repo:t.name,url:`/${t.name}/${e.entityType}/${e.id}`}}return null}function n(e){if(!e)return[];let n=e.replace(/\[\[|\]\]/g,``).split(`,`).map(e=>e.trim()).filter(Boolean),r=[];for(let e of n){let n=t(e);n&&r.push(n)}return r}function r(e){let t=e.replace(/^\[\[|\]\]$/g,``),n=t.indexOf(`|`);if(n!==-1){let e=t.slice(n+1).trim();if(e)return e}return t.split(`|`)[0].trim().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}export{t as n,n as r,r as t};