1function e(e){return`<sup class="inline-ref inline-ref--active" data-ref="${e}" aria-hidden="true">${e}</sup>`}function t(t,n){return n===void 0?t:`${t} ${e(n)}`}function n(e){switch(e.kind){case`paragraph`:return t(e.text,e.cite);case`question`:return e.text;case`list`:return e.items.map((n,r)=>`${e.ordered?`${r+1}.`:`-`} ${t(n.text,n.cite)}`).join(` 2`);case`equation`:return`$$\n${e.latex}\n$$`;case`table`:return`${`| ${e.headers.join(` | `)} |`}\n${`| ${e.headers.map(()=>`---`).join(` | `)} |`}\n${e.rows.map(e=>`| ${e.map(e=>typeof e==`string`?e:t(e.text,e.cite)).join(` | `)} |`).join(` 3`)}`;case`code`:return["```"+e.language,...e.lines,"```"].join(` 4`)}}function r(e){return e.map(n).join(` 5 6`)}function i(e){let t=[],n=0;for(;n<e.length;){let r=e.indexOf(`[[`,n);if(r===-1)break;let i=e.indexOf(`]]`,r+2);if(i===-1)break;let a=e.slice(r+2,i);a.length>0&&!a.includes(`]`)?(t.push({index:r,end:i+2,name:a}),n=i+2):n=r+2}return t}function a(e){let t=e.attachments??[],n=new Map(t.map(e=>[e.name,e])),r=new Set,a=[],o=0;for(let t of i(e.text)){let i=n.get(t.name);if(!i)continue;let s=e.text.slice(o,t.index);s&&a.push({kind:`text`,text:s}),a.push({kind:`attachment`,attachment:i}),r.add(i.name),o=t.end}let s=e.text.slice(o);return s&&a.push({kind:`text`,text:s}),[...t.filter(e=>!r.has(e.name)).flatMap(e=>[{kind:`attachment`,attachment:e},{kind:`text`,text:` `}]),...a]}function o(e){let t=[e.page===void 0?``:`p.${e.page}`,e.paragraph===void 0?``:`¶${e.paragraph}`,e.line===void 0?``:`L${e.line}`].filter(Boolean).join(` `);return t?`${t} - ${e.collection}`:e.collection}export{r as n,a as r,o as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.