import{t as C,B as d,C as v,D as i,E as M,F as N,G as _,H as T,I as E,J as m,K as p,L as w,M as H,N as O,O as g,P as L}from"./CiQWViEs.js";function D(h,y,u=!1,f=!1,t=!1,R=!1){var n=h,a="";if(u){var l=h;d&&(n=v(i(l)))}C(()=>{var s=N;if(a===(a=y()??"")){d&&M();return}if(u&&!d){s.nodes=null,l.innerHTML=a,a!==""&&_(i(l),l.lastChild);return}if(s.nodes!==null&&(T(s.nodes.start,s.nodes.end),s.nodes=null),a!==""){if(d){E.data;for(var e=M(),c=e;e!==null&&(e.nodeType!==m||e.data!=="");)c=e,e=p(e);if(e===null)throw w(),H;_(E,c),n=v(e);return}var A=f?g:t?L:void 0,o=O(f?"svg":t?"math":"template",A);o.innerHTML=a;var r=f||t?o:o.content;if(_(i(r),r.lastChild),f||t)for(;i(r);)n.before(i(r));else n.before(r)}})}export{D as h};
