let a=null,i=null;async function A(){return a||i||(i=fetch("/img/RAE_Exported_Table.tab").then(t=>t.text()).then(t=>{const e=new Map,s=t.split(`
`);for(const n of s){if(!n.trim())continue;const r=n.split("	");if(r.length<3)continue;const o=parseInt(r[0],10);if(isNaN(o))continue;const c=r[1]||"FFFFFF",p=r[2]||"",l=r[3]||"",{description:u,descriptionColor:f}=m(l);e.set(o,{id:o,color:c,name:g(p),description:u,descriptionColor:f,rawDescription:l})}return a=e,e}).catch(t=>new Map),i)}function g(t){return t.replace(/^N\/A/,"").trim()}function m(t){const e=t.match(/^\^([0-9a-fA-F]{6})/),s=e?e[1].toUpperCase():"AAAAAA";return{description:t.replace(/\^[0-9a-fA-F]{6}/g,"").replace(/\\r/g,`
`).trim(),descriptionColor:s}}function d(t){return a?.get(t)}function h(t){return`/img/Icons/${t}.png`}function x(t){if(!t)return[];const e=[],s=/\^([0-9a-fA-F]{6})/g;let n=0,r="AAAAAA",o;for(;(o=s.exec(t))!==null;){if(o.index>n){const c=t.substring(n,o.index).replace(/\\r/g,`
`).replace(/\r/g,`
`);c&&e.push({text:c,color:r})}r=o[1].toUpperCase(),n=s.lastIndex}if(n<t.length){const c=t.substring(n).replace(/\\r/g,`
`).replace(/\r/g,`
`);c&&e.push({text:c,color:r})}return e}export{h as a,d as g,A as l,x as p};
