import{h as r}from"./p-a599f720.js";import{M as e,e as n,s,p as t}from"./p-0fa0e7d1.js";const l=e=>e.map((e=>{switch(e.type){case"a":if("string"==typeof e.content)return r("a",{class:"link",href:n=e.content,target:"_blank",rel:"noopener noreferrer"},n);case"b":return(e=>r("b",null,"string"==typeof e?e:l(e)))(e.content);case"i":return(e=>r("i",null,"string"==typeof e?e:l(e)))(e.content);case"s":return(e=>"string"==typeof e?r("s",null,e):r("b",null,l(e)))(e.content);case"q":return r("span",{class:"block-quote"});default:return(e=>"string"==typeof e?e:r("p",null,l(e)))(e.content)}var n})),a=({message:a})=>{const o=a.slice(0,e),u=n(o,!0),p=s(o);return r("p",null,0!==u.length&&r("blockquote",null,u.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))}))),p.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))})))};export{a as T}