- compaction automatique du contexte LLM quand la taille atteint le seuil (contexte max - taille de réponse max), par résumé de l'historique ancien - filtre textuel (?q=) et pagination (20/page) de l'historique des conversations - correctif ORM : offset de pagination en base 0 - suppression d'une conversation : messages associés supprimés, session en cours annulée, popup de confirmation (ConfirmDialog) - titres de conversation nettoyés du markdown - styles des listes markdown, variante danger du bouton - go.mod/go.sum : dépendances go-rod et stealth manquantes du commit précédent
72 lines
159 KiB
JavaScript
72 lines
159 KiB
JavaScript
import{$ as e,A as t,B as n,E as r,F as i,G as a,H as o,K as s,M as c,N as l,O as u,Q as d,R as f,S as p,T as m,U as h,Z as g,_,_t as v,a as y,at as b,b as x,bt as S,c as C,d as w,dt as ee,et as te,f as T,ft as ne,it as E,j as D,k as O,lt as k,m as A,nt as j,o as re,p as ie,pt as ae,q as M,r as N,s as P,st as oe,u as se,ut as ce,v as le,vt as F,w as I,y as ue,yt as L,z as R}from"../chunks/DGrvnoUE.js";import"../chunks/xihTtKlq.js";import{t as de}from"../chunks/5WAfNqs_.js";import{t as fe}from"../chunks/BYWIgY43.js";import{t as pe}from"../chunks/guSkOB4x.js";import"../chunks/B6JECYQD.js";var me=S({load:()=>he}),he=async({params:e})=>{let t=await pe.getChat(e.space,e.conversation);return{title:t.chat.title,spaceId:e.space,chatId:e.conversation,chatWithMessage:t}},ge=l(`<a><!></a>`);function _e(e,t){var n=ge();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ve=l(`<abbr><!></abbr>`);function ye(e,t){var n=ve();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var be=l(`<address><!></address>`);function xe(e,t){var n=be();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Se=l(`<article><!></article>`);function Ce(e,t){var n=Se();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var we=l(`<aside><!></aside>`);function Te(e,t){var n=we();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ee=l(`<audio><!></audio>`);function De(e,t){var n=Ee();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Oe=l(`<b><!></b>`);function ke(e,t){var n=Oe();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ae=l(`<bdi><!></bdi>`);function je(e,t){var n=Ae();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Me=l(`<bdo><!></bdo>`);function Ne(e,t){var n=Me();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Pe=l(`<blockquote><!></blockquote>`);function Fe(e,t){var n=Pe();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ie=l(`<br/>`);function Le(e,t){let n=y(t,`attributes`,19,()=>({}));var r=Ie();T(r,()=>({...n()})),D(e,r)}var Re=l(`<button><!></button>`);function ze(e,t){var n=Re();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Be=l(`<canvas><!></canvas>`);function Ve(e,t){var n=Be();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var He=l(`<cite><!></cite>`);function Ue(e,t){var n=He();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var We=l(`<code><!></code>`);function Ge(e,t){var n=We();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ke=l(`<datalist><!></datalist>`);function qe(e,t){var n=Ke();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Je=l(`<dd><!></dd>`);function Ye(e,t){var n=Je();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Xe=l(`<del><!></del>`);function Ze(e,t){var n=Xe();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Qe=l(`<details><!></details>`);function $e(e,t){var n=Qe();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var et=l(`<dfn><!></dfn>`);function tt(e,t){var n=et();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var nt=l(`<dialog><!></dialog>`);function rt(e,t){var n=nt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var it=l(`<div><!></div>`);function at(e,t){var n=it();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ot=l(`<dl><!></dl>`);function st(e,t){var n=ot();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ct=l(`<dt><!></dt>`);function lt(e,t){var n=ct();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ut=l(`<em><!></em>`);function dt(e,t){var n=ut();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ft=l(`<embed/>`);function pt(e,t){var n=ft();T(n,()=>({...t.attributes})),R(n),D(e,n)}var mt=l(`<fieldset><!></fieldset>`);function ht(e,t){var n=mt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var gt=l(`<footer><!></footer>`);function _t(e,t){var n=gt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var vt=l(`<form><!></form>`);function yt(e,t){var n=vt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var bt=l(`<h1><!></h1>`);function xt(e,t){var n=bt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var St=l(`<h2><!></h2>`);function Ct(e,t){var n=St();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var wt=l(`<h3><!></h3>`);function Tt(e,t){var n=wt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Et=l(`<h4><!></h4>`);function Dt(e,t){var n=Et();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ot=l(`<h5><!></h5>`);function kt(e,t){var n=Ot();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var At=l(`<h6><!></h6>`);function jt(e,t){var n=At();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Mt=l(`<header><!></header>`);function Nt(e,t){var n=Mt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Pt=l(`<hgroup><!></hgroup>`);function Ft(e,t){var n=Pt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var It=l(`<hr/>`);function Lt(e,t){var n=It();T(n,()=>({...t.attributes})),D(e,n)}var Rt=l(`<i><!></i>`);function zt(e,t){var n=Rt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Bt=l(`<iframe><!></iframe>`);function Vt(e,t){var n=Bt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),R(n),D(e,n)}var Ht=l(`<img/>`);function Ut(e,t){var n=Ht();T(n,()=>({...t.attributes})),R(n),D(e,n)}var Wt=l(`<input/>`);function Gt(e,t){var n=Wt();T(n,()=>({...t.attributes}),void 0,void 0,void 0,void 0,!0),D(e,n)}var Kt=l(`<kbd><!></kbd>`);function qt(e,t){var n=Kt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Jt=l(`<label><!></label>`);function Yt(e,t){var n=Jt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Xt=l(`<legend><!></legend>`);function Zt(e,t){var n=Xt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Qt=l(`<li><!></li>`);function $t(e,t){var n=Qt();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var en=l(`<main><!></main>`);function tn(e,t){var n=en();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var nn=l(`<mark><!></mark>`);function rn(e,t){var n=nn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var an=l(`<menu><!></menu>`);function on(e,t){var n=an();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var sn=l(`<meter><!></meter>`);function cn(e,t){var n=sn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ln=l(`<nav><!></nav>`);function un(e,t){var n=ln();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var dn=l(`<ol><!></ol>`);function fn(e,t){var n=dn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var pn=l(`<!>`,1),mn=l(`<optgroup><!></optgroup>`);function hn(e,t){var n=mn();T(n,()=>({...t.attributes})),w(n,()=>{var e=g(n),r=pn(),i=d(r);m(i,()=>t.children??L),D(e,r)}),D(e,n)}var gn=l(`<!>`,1),_n=l(`<option><!></option>`);function vn(e,t){var n=_n();T(n,()=>({...t.attributes})),w(n,()=>{var e=g(n),r=gn(),i=d(r);m(i,()=>t.children??L),D(e,r)}),D(e,n)}var yn=l(`<output><!></output>`);function bn(e,t){var n=yn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var xn=l(`<p><!></p>`);function Sn(e,t){var n=xn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Cn=l(`<param/>`);function wn(e,t){var n=Cn();T(n,()=>({...t.attributes})),D(e,n)}var Tn=l(`<picture><!></picture>`);function En(e,t){var n=Tn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Dn=l(`<pre><!></pre>`);function On(e,t){var n=Dn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var kn=l(`<progress><!></progress>`);function An(e,t){var n=kn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var jn=l(`<s><!></s>`);function Mn(e,t){var n=jn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Nn=l(`<samp><!></samp>`);function Pn(e,t){var n=Nn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Fn=l(`<section><!></section>`);function In(e,t){var n=Fn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ln=l(`<!>`,1),Rn=l(`<select><!></select>`);function zn(e,t){var n=Rn();T(n,()=>({...t.attributes})),w(n,()=>{var e=g(n),r=Ln(),i=d(r);m(i,()=>t.children??L),D(e,r)}),D(e,n)}var Bn=l(`<small><!></small>`);function Vn(e,t){var n=Bn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Hn=l(`<source/>`);function Un(e,t){var n=Hn();T(n,()=>({...t.attributes})),D(e,n)}var Wn=l(`<span><!></span>`);function Gn(e,t){var n=Wn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Kn=l(`<strong><!></strong>`);function qn(e,t){var n=Kn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Jn=l(`<sub><!></sub>`);function Yn(e,t){var n=Jn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Xn=l(`<summary><!></summary>`);function Zn(e,t){var n=Xn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Qn=l(`<sup><!></sup>`);function $n(e,t){var n=Qn();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var er=l(`<table><!></table>`);function tr(e,t){var n=er();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var nr=l(`<tbody><!></tbody>`);function rr(e,t){var n=nr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ir=l(`<td><!></td>`);function ar(e,t){var n=ir();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var or=l(`<textarea></textarea>`);function sr(e,t){var n=or();oe(n),T(n,()=>({...t.attributes})),D(e,n)}var cr=l(`<tfoot><!></tfoot>`);function lr(e,t){var n=cr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ur=l(`<th><!></th>`);function dr(e,t){var n=ur();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var fr=l(`<thead><!></thead>`);function pr(e,t){var n=fr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var mr=l(`<tr><!></tr>`);function hr(e,t){var n=mr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var gr=l(`<track/>`);function _r(e,t){var n=gr();T(n,()=>({...t.attributes})),R(n),D(e,n)}var vr=l(`<u><!></u>`);function yr(e,t){var n=vr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var br=l(`<ul><!></ul>`);function xr(e,t){var n=br();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Sr=l(`<var><!></var>`);function Cr(e,t){var n=Sr();T(n,()=>({...t.attributes}));var r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var wr={a:_e,abbr:ye,address:xe,article:Ce,aside:Te,audio:De,b:ke,bdi:je,bdo:Ne,blockquote:Fe,br:Le,button:ze,canvas:Ve,cite:Ue,code:Ge,datalist:qe,dd:Ye,del:Ze,details:$e,dfn:tt,dialog:rt,div:at,dl:st,dt:lt,em:dt,embed:pt,fieldset:ht,footer:_t,form:yt,h1:xt,h2:Ct,h3:Tt,h4:Dt,h5:kt,h6:jt,header:Nt,hgroup:Ft,hr:Lt,i:zt,iframe:Vt,img:Ut,input:Gt,kbd:qt,label:Yt,legend:Zt,li:$t,main:tn,mark:rn,menu:on,meter:cn,nav:un,ol:fn,optgroup:hn,option:vn,output:bn,p:Sn,param:wn,picture:En,pre:On,progress:An,s:Mn,samp:Pn,section:In,select:zn,small:Vn,source:Un,span:Gn,strong:qn,sub:Yn,summary:Zn,sup:$n,table:tr,tbody:rr,td:ar,textarea:sr,tfoot:lr,th:dr,thead:pr,tr:hr,track:_r,u:yr,ul:xr,var:Cr},Tr=new Set([`br`,`hr`,`img`,`input`,`link`,`meta`,`area`,`base`,`col`,`embed`,`keygen`,`param`,`source`,`track`,`wbr`]),Er=e=>Tr.has(e.toLowerCase()),Dr=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08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0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uAB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\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,Or=Object.hasOwnProperty,kr=class{constructor(){this.occurrences,this.reset()}slug(e,t){let n=this,r=Ar(e,t===!0),i=r;for(;Or.call(n.occurrences,r);)n.occurrences[i]++,r=i+`-`+n.occurrences[i];return n.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function Ar(e,t){return typeof e==`string`?(t||(e=e.toLowerCase()),e.replace(Dr,``).replace(/ /g,`-`)):``}function jr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=jr();function Nr(e){Mr=e}var Pr={exec:()=>null};function Fr(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function z(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(B.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ir=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),B={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Fr(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Fr(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Fr(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Fr(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Fr(e=>RegExp(`^ {0,${e}}(?:</?(?:${Zr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:Fr(e=>RegExp(`^ {0,${e}}>`))},Lr=/^(?:[ \t]*(?:\n|$))+/,Rr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Br=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ur=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wr=z(Ur).replace(/bull/g,Hr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Gr=z(Ur).replace(/bull/g,Hr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Kr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,qr=/^[^\n]+/,Jr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yr=z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Jr).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xr=z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Hr).getRegex(),Zr=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Qr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$r=z(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Qr).replace(`tag`,Zr).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ei=e=>z(Kr).replace(`hr`,Br).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zr).getRegex(),ti=ei(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ni=ei(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ri={blockquote:z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,ni).getRegex(),code:Rr,def:Yr,fences:zr,heading:Vr,hr:Br,html:$r,lheading:Wr,list:Xr,newline:Lr,paragraph:ti,table:Pr,text:qr},ii=z(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Br).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zr).getRegex(),ai={...ri,lheading:Gr,table:ii,paragraph:z(Kr).replace(`hr`,Br).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ii).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zr).getRegex()},oi={...ri,html:z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Qr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Pr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:z(Kr).replace(`hr`,Br).replace(`heading`,` *#{1,6} *[^
|
|
]`).replace(`lheading`,Wr).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},si=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ci=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,li=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ui=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,di=/[\p{P}\p{S}]/u,fi=/[\s\p{P}\p{S}]/u,pi=/[^\s\p{P}\p{S}]/u,mi=z(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,fi).getRegex(),hi=/[\p{Pi}\p{Ps}"']/u,gi=/(?!~)[\p{P}\p{S}]/u,_i=/(?!~)[\s\p{P}\p{S}]/u,vi=/(?:[^\s\p{P}\p{S}]|~)/u,yi=z(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ir?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),bi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,xi=z(bi,`u`).replace(/punct/g,di).getRegex(),Si=z(bi,`u`).replace(/punct/g,gi).getRegex(),Ci=z(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,hi).replace(/punct/g,di).getRegex(),wi=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ti=z(wi,`gu`).replace(/notPunctSpace/g,pi).replace(/punctSpace/g,fi).replace(/punct/g,di).getRegex(),Ei=z(wi,`gu`).replace(/notPunctSpace/g,vi).replace(/punctSpace/g,_i).replace(/punct/g,gi).getRegex(),Di=z(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pi).replace(/punctSpace/g,fi).replace(/punct/g,di).getRegex(),Oi=z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,pi).replace(/punctSpace/g,fi).replace(/punct/g,di).getRegex(),ki=z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pi).replace(/punctSpace/g,fi).replace(/punct/g,di).getRegex(),Ai=z(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,di).getRegex(),ji=z(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pi).replace(/punctSpace/g,fi).replace(/punct/g,di).getRegex(),Mi=z(/\\(punct)/,`gu`).replace(/punct/g,di).getRegex(),Ni=z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pi=z(Qr).replace(`(?:-->|$)`,`-->`).getRegex(),Fi=z(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Pi).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ii=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Li=z(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Ii).getRegex(),Ri=z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Li).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zi=z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Li).replace(`ref`,Jr).getRegex(),Bi=z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Jr).getRegex(),Vi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Hi=z(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Ii).getRegex(),Ui=z(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Hi).replace(`ref`,Vi).getRegex()).replace(`nolink`,z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Vi).getRegex()).getRegex(),Wi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gi=z(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Ki={_backpedal:Pr,anyPunctuation:Mi,autolink:Ni,blockSkip:yi,br:li,code:ci,del:Pr,delLDelim:Pr,delRDelim:Pr,emStrongLDelim:xi,emStrongRDelimAst:Ti,emStrongRDelimUnd:Oi,escape:si,link:Ri,nolink:Bi,punctuation:mi,reflink:zi,reflinkSearch:Ui,tag:Fi,text:ui,url:Pr},qi={...Ki,emStrongLDelim:Ci,emStrongRDelimAst:Di,emStrongRDelimUnd:ki,link:z(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Li).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Li).getRegex()},Ji={...Ki,emStrongRDelimAst:Ei,emStrongLDelim:Si,delLDelim:Ai,delRDelim:ji,url:z(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,Gi).replace(`protocol`,Wi).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:z(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,Wi).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Yi={...Ji,br:z(li).replace(`{2,}`,`*`).getRegex(),text:z(Ji.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Xi={normal:ri,gfm:ai,pedantic:oi},Zi={normal:Ki,gfm:Ji,breaks:Yi,pedantic:qi},Qi={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},$i=e=>Qi[e];function V(e,t){if(t){if(B.escapeTest.test(e))return e.replace(B.escapeReplace,$i)}else if(B.escapeTestNoEncode.test(e))return e.replace(B.escapeReplaceNoEncode,$i);return e}function ea(e){return e.replace(B.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function ta(e){try{e=encodeURI(e).replace(B.percentDecode,`%`)}catch{return null}return e}function na(e,t){let n=e.replace(B.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(B.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(B.slashPipe,`|`);return n}function ra(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ia(e){let t=e.split(`
|
|
`),n=t.length-1;for(;n>=0&&B.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
`)}function aa(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function oa(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function sa(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function ca(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function la(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
`)}function ua(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var da=class{options;rules;lexer;constructor(e){this.options=e||Mr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:ia(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=la(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ra(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:ra(t[0],`
|
|
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:ra(t[0],`
|
|
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ra(t[0],`
|
|
`).split(`
|
|
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
${s}`:s,r=r?`${r}
|
|
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
`),o=t.raw+`
|
|
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
${d.join(`
|
|
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
`+e.join(`
|
|
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
`,1)[0],l=t[1].length,u=this.options.pedantic?sa(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>sa(e,l)),d=e.split(`
|
|
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
`,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
|
|
`+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
|
|
`+d}f=!d.trim(),r+=l+`
|
|
`,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=ia(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=aa(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:ra(t[0],`
|
|
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=na(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
`):[],a={type:`table`,raw:ra(t[0],`
|
|
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(na(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:ra(t[0],`
|
|
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&ua(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=ra(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=oa(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),ca(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&ua(e,n[1],r,this.rules))return;let i=t[aa((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return ca(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:ea(t[0]),escaped:e}}}},H=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new da,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:B,block:Xi.normal,inline:Zi.normal};this.options.pedantic?(t.block=Xi.pedantic,t.inline=Zi.pedantic):this.options.gfm&&(t.block=Xi.gfm,t.inline=this.options.breaks?Zi.breaks:Zi.gfm),this.tokenizer.rules=t}static get rules(){return{block:Xi,inline:Zi}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(B.carriageReturn,`
|
|
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(B.tabCharGlobal,` `).replace(B.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
`)?``:`
|
|
`)+i.raw,n.text+=`
|
|
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
`)?``:`
|
|
`)+i.raw,n.text+=`
|
|
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
`)?``:`
|
|
`)+i.raw,r.text+=`
|
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
`)?``:`
|
|
`)+i.raw,n.text+=`
|
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(!(e.charAt(0)===`!`||!Object.hasOwn(this.tokens.links,aa(e.slice(n+1,-1))))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,aa(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},fa=class{options;parser;constructor(e){this.options=e||Mr}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(B.notSpaceStart)?.[0],i=e?e.replace(B.endingNewline,``)+`
|
|
`:``;return r?`<pre><code class="language-`+V(r)+`">`+(n?i:V(i,!0))+`</code></pre>
|
|
`:`<pre><code>`+(n?i:V(i,!0))+`</code></pre>
|
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
${this.parser.parse(e)}</blockquote>
|
|
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
`}hr(e){return`<hr>
|
|
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
`+r+`</`+i+`>
|
|
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
<thead>
|
|
`+t+`</thead>
|
|
`+r+`</table>
|
|
`}tablerow({text:e}){return`<tr>
|
|
${e}</tr>
|
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${V(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?V(n,!0):this.parser.parseInline(r),o=ta(e);if(o===null)return a;e=V(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+V(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ta(e);if(i===null)return V(n);e=i;let a=`<img src="${V(e)}" alt="${V(n)}"`;return t&&(a+=` title="${V(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:V(e.text)}},pa=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},U=class e{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new fa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pa}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},ma=class{options;block;constructor(e){this.options=e||Mr}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?H.lex:H.lexInline}provideParser(e=this.block){return e?U.parse:U.parseInline}},ha=class{defaults=jr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=U;Renderer=fa;TextRenderer=pa;Lexer=H;Tokenizer=da;Hooks=ma;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new fa(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new da(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ma;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=ma.passThroughHooks.has(n)?e=>{if(this.defaults.async&&ma.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return H.lex(e,t??this.defaults)}parser(e,t){return U.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?H.lex:H.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?U.parse:U.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?H.lex:H.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?U.parse:U.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+V(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},ga=new ha;function W(e,t){return ga.parse(e,t)}W.options=W.setOptions=function(e){return ga.setOptions(e),W.defaults=ga.defaults,Nr(W.defaults),W},W.getDefaults=jr,W.defaults=Mr;function _a(...e){return ga.use(...e),W.defaults=ga.defaults,Nr(W.defaults),W}W.use=_a,W.walkTokens=function(e,t){return ga.walkTokens(e,t)},W.parseInline=ga.parseInline,W.Parser=U,W.parser=U.parse,W.Renderer=fa,W.TextRenderer=pa,W.Lexer=H,W.lexer=H.lex,W.Tokenizer=da,W.Hooks=ma,W.parse=W,W.options,W.setOptions,W.walkTokens,W.parseInline,U.parse,H.lex;var va=l(`<blockquote><!></blockquote>`);function ya(e,t){var n=va(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var ba=l(`<br/>`);function xa(e){var t=ba();D(e,t)}var Sa=l(`<pre><code> </code></pre>`);function Ca(e,n){var r=Sa(),i=g(r),a=g(i,!0);F(i),F(r),s(()=>{le(r,1,ue(n.lang)),t(a,n.text)}),D(e,r)}var wa=l(`<code> </code>`);function Ta(e,n){ne(n,!0);var r=wa(),i=g(r,!0);F(r),s(e=>t(i,e),[()=>n.raw.replace(/`/g,``)]),D(e,r),ee()}var Ea=l(`<del><!></del>`);function Da(e,t){var n=Ea(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Oa=l(`<em><!></em>`);function ka(e,t){var n=Oa(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}function Aa(e,n){v();var r=i();s(()=>t(r,n.text)),D(e,r)}var ja=l(`<h1><!></h1>`),Ma=l(`<h2><!></h2>`),Na=l(`<h3><!></h3>`),Pa=l(`<h4><!></h4>`),Fa=l(`<h5><!></h5>`),Ia=l(`<h6><!></h6>`);function La(e,r){ne(r,!0);let a=y(r,`id`,3,void 0),o=b(()=>r.options.headerIds?a()??`${r.options.headerPrefix}${r.slug(r.text)}`:void 0);var l=c(),u=d(l),f=e=>{var t=ja(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},p=e=>{var t=Ma(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},h=e=>{var t=Na(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},_=e=>{var t=Pa(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},v=e=>{var t=Fa(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},x=e=>{var t=Ia(),i=g(t);m(i,()=>r.children??L),F(t),s(()=>A(t,`id`,n(o))),D(e,t)},S=e=>{var n=i();s(()=>t(n,r.raw)),D(e,n)};O(u,e=>{r.depth===1?e(f):r.depth===2?e(p,1):r.depth===3?e(h,2):r.depth===4?e(_,3):r.depth===5?e(v,4):r.depth===6?e(x,5):e(S,-1)}),D(e,l),ee()}var Ra=l(`<hr/>`);function za(e){var t=Ra();D(e,t)}var Ba=l(`<img/>`);function Va(e,t){ne(t,!0);let r=(e,t=L)=>{var r=Ba();let c;C(r,e=>j(g,e),()=>n(g)),x(r,(e,t)=>k?.(e,t),t),s(()=>{A(r,`src`,n(w)?t().source:void 0),A(r,`data-src`,i()),A(r,`title`,a()),A(r,`alt`,o()),A(r,`loading`,l()?`lazy`:`eager`),c=le(r,1,`svelte-1hoglcg`,null,c,{"fade-in":p()&&n(te)&&!n(T),visible:!p()&&n(te)&&!n(T),error:n(T)})}),f(`load`,r,re),f(`error`,r,ie),R(r),D(e,r)},i=y(t,`href`,3,void 0),a=y(t,`title`,3,void 0),o=y(t,`text`,3,``),l=y(t,`lazy`,3,!0),p=y(t,`fadeIn`,3,!0),m=b(()=>i()===``?void 0:i()),h=b(()=>({source:n(m)})),g=E(void 0),_=E(void 0),v=E(void 0),S=E(!1),w=b(()=>n(S)||!l()),te=b(()=>n(_)===n(h)),T=b(()=>n(v)===n(h)),O=new WeakMap,k=(e,t)=>(O.set(e,t),{update(t){O.set(e,t)},destroy(){O.delete(e)}});M(()=>{l()||j(S,!0)}),M(()=>{let e=n(g);if(n(w)||!e)return;if(typeof IntersectionObserver>`u`){j(S,!0);return}let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(j(S,!0),t.disconnect())},{rootMargin:`50px`});return t.observe(e),()=>{t.disconnect()}});let re=e=>{let t=O.get(e.currentTarget);t&&n(v)!==t&&j(_,t)},ie=e=>{let t=O.get(e.currentTarget);t&&(j(v,t),j(_,t))};var ae=c(),N=d(ae);u(N,()=>n(h),e=>{r(e,()=>n(h))}),D(e,ae),ee()}var Ha=l(`<a><!></a>`);function Ua(e,t){let n=y(t,`href`,3,void 0),r=y(t,`title`,3,void 0);var i=Ha(),a=g(i);m(a,()=>t.children??L),F(i),s(()=>{A(i,`href`,n()),A(i,`title`,r())}),D(e,i)}var Wa=l(`<ol><!></ol>`),Ga=l(`<ul><!></ul>`);function Ka(e,t){let n=y(t,`ordered`,3,!1),r=y(t,`start`,3,1);var i=c(),a=d(i),o=e=>{var n=Wa(),i=g(n);m(i,()=>t.children??L),F(n),s(()=>A(n,`start`,r())),D(e,n)},l=e=>{var n=Ga(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)};O(a,e=>{n()?e(o):e(l,-1)}),D(e,i)}var qa=l(`<li><!></li>`);function Ja(e,t){y(t,`listItemIndex`,3,void 0);var n=qa(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var Ya=l(`<p><!></p>`);function Xa(e,t){var n=Ya(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}function Za(e,n){v();var r=i();s(()=>t(r,n.text)),D(e,r)}var Qa=l(`<strong><!></strong>`);function $a(e,t){var n=Qa(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var eo=l(`<table><!></table>`);function to(e,t){var n=eo(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var no=l(`<tbody><!></tbody>`);function ro(e,t){var n=no(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var io=l(`<th><!></th>`),ao=l(`<td><!></td>`);function oo(e,t){let r=b(()=>t.align?`text-align: ${t.align}`:void 0);var i=c(),a=d(i),o=e=>{var i=io(),a=g(i);m(a,()=>t.children??L),F(i),s(()=>_(i,n(r))),D(e,i)},l=e=>{var i=ao(),a=g(i);m(a,()=>t.children??L),F(i),s(()=>_(i,n(r))),D(e,i)};O(a,e=>{t.header?e(o):e(l,-1)}),D(e,i)}var so=l(`<thead><!></thead>`);function co(e,t){var n=so(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}var lo=l(`<tr><!></tr>`);function uo(e,t){var n=lo(),r=g(n);m(r,()=>t.children??L),F(n),D(e,n)}function fo(e,t){var n=c(),r=d(n);m(r,()=>t.children??L),D(e,n)}var po={heading:La,paragraph:Xa,text:fo,image:Va,link:Ua,em:ka,escape:Aa,strong:$a,codespan:Ta,del:Da,table:to,tablehead:co,tablebody:ro,tablerow:uo,tablecell:oo,list:Ka,orderedlistitem:null,unorderedlistitem:null,listitem:Ja,hr:za,html:wr,blockquote:ya,code:Ca,br:xa,rawtext:Za},mo={async:!1,breaks:!1,gfm:!0,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null,headerIds:!0,headerPrefix:``},ho=new Set([`http:`,`https:`,`mailto:`,`tel:`]),go=new Set([`href`,`src`,`action`,`formaction`,`cite`,`data`,`poster`]),_o=/^https?:/i,vo=/^\s+/,yo=/^[#/?.]/,bo=(e,t)=>{if(!e)return``;let n=e.replace(vo,``);if(yo.test(n)||!n.includes(`:`)||_o.test(n))return n;try{let e=new URL(n,`http://localhost`);if(ho.has(e.protocol))return n}catch{}return``},xo=(e,t,n)=>{let r={};for(let[i,a]of Object.entries(e)){let e=i.toLowerCase();if(!(e.startsWith(`on`)||e===`srcdoc`)){if(go.has(e)){let e=n(a,t);e&&(r[i]=e);continue}r[i]=a}}return r},So=Symbol(`svelte-markdown.renderMetadata`),G=e=>Array.isArray(e)?e:void 0,Co=e=>typeof e.raw==`string`?e.raw:typeof e.text==`string`?e.text:``,wo=e=>typeof e.sourceLength==`number`?e.sourceLength:Co(e).length,To=e=>({...e}),Eo=e=>({headerIds:e.headerIds,headerPrefix:e.headerPrefix}),Do=(e,t)=>e!==void 0&&e.headerIds===t.headerIds&&e.headerPrefix===t.headerPrefix,Oo=()=>{let e=new WeakMap,t=new WeakMap,n=new WeakMap,r=[],i=[],a,o=[],s=(t,n)=>{e.set(t,n)},c=t=>typeof t==`object`&&t?e.get(t):void 0,l=(e,t)=>{let n=c(e);return n===void 0?typeof e==`object`&&e?e:`${t}:${String(e)}`:n},u=e=>n.get(e),d=(e,t=0,r=0,i=0)=>{if(!e)return;let a=i;for(let i=r;i<e.length;i++){let r=e[i],o=wo(r),c=t+a;n.set(r,c),o===0?s(r,`src:${c}:zero:${i}`):s(r,`src:${c}`),g(r,c),a+=o}},f=(e,t=new Set)=>{if(typeof e!=`object`||!e)return t;if(t.add(e),Array.isArray(e)){for(let n of e)f(n,t);return t}let n=e;return f(n.tokens,t),f(n.items,t),f(n.header,t),f(n.rows,t),t},p=(e,t)=>{let n=0,[r,i]=e.size<=t.size?[e,t]:[t,e];for(let e of r)i.has(e)&&n++;return n},m=(e,t,n)=>{let r=-1,i=0;for(let a=0;a<o.length;a++){if(n.has(a))continue;let s=o[a];if(s.type!==e.type)continue;let c=p(t,s.identities);c>i&&(r=a,i=c)}return r===-1?void 0:{index:r,record:o[r]}},h=e=>{if(!e){o=[];return}let t=[],n=new Set;for(let r of e){let e=f(r),i=c(r),a=i===void 0?m(r,e,n):void 0,o=i??a?.record.key??r;a&&n.add(a.index),i===void 0&&s(r,o),t.push({key:o,identities:e,type:r.type})}o=t},g=(e,t)=>{d(G(e.tokens),t),d(G(e.items),t),d(G(e.header),t);let n=G(e.rows);if(n)for(let e=0;e<n.length;e++){let r=n[e];s(r,`src:${t}:row:${e}`),d(G(r),t)}},_=(e,t,n,r,i,a=0)=>{if(e)for(let o=a;o<e.length;o++){let a=e[o];a.type===`heading`&&(v(a,t,n),y(a,n,r,i)),_(G(a.tokens),t,n,r,i),_(G(a.items),t,n,r,i),_(G(a.header),t,n,r,i);let s=G(a.rows);if(s)for(let e of s)_(G(e),t,n,r,i)}},v=(e,n,r)=>{t.set(e,n.headerIds&&typeof e.text==`string`?`${n.headerPrefix}${r.slug(e.text)}`:void 0)},y=(e,t,n,r)=>{n.push(e);let i=u(e);r.push(i===void 0?void 0:{offset:i,occurrences:To(t.occurrences)})},b=e=>{let t=0;for(let n of r){let r=u(n);if(r===void 0)return;if(r>=e)break;let a=i[t];if(!a||a.offset!==r)return;t++}return t},x=(e,t,n,o,s)=>{let c=Eo(t);if(!Do(a,c))return!1;let l=b(n);if(l===void 0)return!1;if(o.push(...r.slice(0,l)),s.push(...i.slice(0,l)),l===0)return!0;let u=i[l-1];return u?(e.occurrences=To(u.occurrences),!0):!1},S=(e,t,n,i,a)=>{for(let o of r){let r=u(o);r===void 0||r>=n||(v(o,t,e),y(o,e,i,a))}},C=(e,t,n)=>{let o=new kr,s=[],c=[];n?.source!==void 0&&n.startOffset!==void 0&&(x(o,t,n.startOffset,s,c)||S(o,t,n.startOffset,s,c)),_(e,t,o,s,c,n?.startIndex??0),r=s,i=c,a=Eo(t)};return{prepareTokensForRender:(e,t,n)=>{if(!e)return e;let r=e;return n?.source===void 0?h(r):(o=[],d(r,0,n.startIndex??0,n.startOffset??0)),C(r,t,n),e},getPreparedHeadingId:e=>typeof e==`object`&&e?t.get(e):void 0,getStableNodeKey:l,getStableRowKey:(e,t)=>{let n=c(e);return n===void 0?e&&e.length>0?l(e[0],t):e||t:n}}},ko=Object.freeze({}),Ao=new Set([`$$slots`,`$$events`,`$$legacy`,`type`,`tokens`,`header`,`rows`,`ordered`,`renderers`,`snippetOverrides`,`htmlSnippetOverrides`,`sanitizeUrl`,`sanitizeAttributes`,`footnoteMetadata`]),jo=l(`<!> <!>`,1);function Mo(a,o){ne(o,!0);let l=(e,a=L,u=L)=>{let f=b(a),m=b(()=>a().type===`html`&&!!n(f).tag&&!!o.renderers.html&&n(f).tag in wr&&o.renderers.html[n(f).tag]===wr[n(f).tag]&&!x()[n(f).tag]);var h=c(),g=d(h),_=e=>{},y=e=>{var n=i();s(()=>t(n,a().text??a().raw)),D(e,n)},ee=e=>{let t=b(()=>n(f).attributes?C()(n(f).attributes,{type:`html`,tag:n(f).tag},S()):void 0);var i=c(),a=d(i),o=e=>{var r=c(),i=d(r);p(i,()=>n(f).tag,!1,(e,r)=>{T(e,()=>({...n(t)}))}),D(e,r)},s=b(()=>Er(n(f).tag)),m=e=>{var i=c(),a=d(i);p(a,()=>n(f).tag,!1,(e,i)=>{T(e,()=>({...n(t)}));var a=c(),o=d(a),s=e=>{var t=c(),i=d(t);r(i,19,()=>n(f).tokens,(e,t)=>A.getStableNodeKey(e,t),(e,t)=>{l(e,()=>n(t),u)}),D(e,t)};O(o,e=>{n(f).tokens&&n(f).tokens.length&&e(s)}),D(i,a)}),D(e,i)};O(a,e=>{n(s)?e(o):e(m,-1)}),D(e,i)},te=e=>{let t=b(()=>a().type===`heading`?{id:A.getPreparedHeadingId(a())??a().id}:ko),r=b(()=>a().type===`footnoteRef`?w()?.referenceProps.get(a())??ko:a().type===`footnoteSection`?w()?.sectionProps.get(a())??ko:ko);Mo(e,P(u,a,()=>n(t),()=>n(r),{get renderers(){return o.renderers},get snippetOverrides(){return v()},get htmlSnippetOverrides(){return x()},get sanitizeUrl(){return S()},get sanitizeAttributes(){return C()},get footnoteMetadata(){return w()}}))};O(g,e=>{a().type===`space`&&n(ie)?e(_):a().type===`text`&&n(j)&&!a().tokens?e(y,1):n(m)&&n(f).tag?e(ee,2):e(te,-1)}),D(e,h)},u=y(o,`type`,3,void 0),f=y(o,`tokens`,3,void 0),h=y(o,`header`,3,void 0),g=y(o,`rows`,3,void 0),_=y(o,`ordered`,3,!1),v=y(o,`snippetOverrides`,19,()=>({})),x=y(o,`htmlSnippetOverrides`,19,()=>({})),S=y(o,`sanitizeUrl`,3,bo),C=y(o,`sanitizeAttributes`,3,xo),w=y(o,`footnoteMetadata`,3,void 0),te=re(o,Ao),E=ce(So),A=E?k(So):Oo();E||ae(So,A);let j=b(()=>o.renderers.text===po.text&&!v().text&&o.renderers.rawtext===po.rawtext&&!v().rawtext),ie=b(()=>!o.renderers.space&&!v().space),M=b(()=>{if((u()===`link`||u()===`image`)&&typeof o.href==`string`){let e=u()===`link`?`a`:`img`,t=S()(o.href,{type:u(),tag:e});return{...te,href:t||void 0}}if(u()===`html`&&o.attributes){let e=o.tag??``;return{...te,attributes:C()(o.attributes,{type:u(),tag:e},S())}}return te});var N=c(),oe=d(N),se=e=>{var t=c(),i=d(t),a=e=>{let t=b(()=>{let{text:e,raw:t,tokens:n,...r}=te;return{_text:e,_raw:t,_tokens:n,parserRest:r}});var i=c(),a=d(i);r(a,19,f,(e,t)=>A.getStableNodeKey(e,t),(e,r)=>{l(e,()=>n(r),()=>n(t).parserRest)}),D(e,i)};O(i,e=>{f()&&e(a)}),D(e,t)},le=t=>{var i=c(),a=d(i),s=t=>{var i=c(),a=d(i),s=t=>{let i=t=>{var i=jo(),a=d(i),u=e=>{let t=e=>{let t=e=>{var t=c(),i=d(t);r(i,19,()=>h()??[],(e,t)=>A.getStableNodeKey(e,t),(e,t,i)=>{let a=e=>{var i=c(),a=d(i);r(a,19,()=>n(t).tokens??[],(e,t)=>A.getStableNodeKey(e,t),(e,t)=>{l(e,()=>n(t),()=>({}))}),D(e,i)},s=b(()=>{let{align:e,...t}=n(M);return{_align:e,cellRest:t}});var u=c(),f=d(u),p=e=>{var t=c(),r=d(t);{let e=b(()=>({header:!0,align:n(M).align?.[n(i)]??null,...n(s).cellRest,children:a}));m(r,()=>n(_),()=>n(e))}D(e,t)},h=e=>{var t=c(),r=d(t);{let e=b(()=>n(M).align?.[n(i)]??null);I(r,()=>o.renderers.tablecell,(t,r)=>{r(t,P({header:!0,get align(){return n(e)}},()=>n(s).cellRest,{children:(e,t)=>{a(e)},$$slots:{default:!0}}))})}D(e,t)};O(f,e=>{n(_)?e(p):e(h,-1)}),D(e,u)}),D(e,t)};var i=c(),a=d(i),s=e=>{var r=c(),i=d(r);{let e=b(()=>({...n(M),children:t}));m(i,()=>n(p),()=>n(e))}D(e,r)},u=e=>{var r=c(),i=d(r);I(i,()=>o.renderers.tablerow,(e,r)=>{r(e,P(()=>n(M),{children:(e,n)=>{t(e)},$$slots:{default:!0}}))}),D(e,r)};O(a,e=>{n(p)?e(s):e(u,-1)}),D(e,i)};var i=c(),a=d(i),u=e=>{var r=c(),i=d(r);{let e=b(()=>({...n(M),children:t}));m(i,()=>n(s),()=>n(e))}D(e,r)},f=e=>{var r=c(),i=d(r);I(i,()=>o.renderers.tablehead,(e,r)=>{r(e,P(()=>n(M),{children:(e,n)=>{t(e)},$$slots:{default:!0}}))}),D(e,r)};O(a,e=>{n(s)?e(u):e(f,-1)}),D(e,i)};O(a,e=>{o.renderers.tablehead&&e(u)});var v=e(a,2),y=e=>{let t=e=>{var t=c(),i=d(t);r(i,19,()=>g()??[],(e,t)=>A.getStableRowKey(e,t),(e,t)=>{let i=e=>{var i=c(),a=d(i);r(a,19,()=>n(t)??[],(e,t)=>A.getStableNodeKey(e,t),(e,t,i)=>{let a=e=>{var i=c(),a=d(i);r(a,19,()=>n(t).tokens??[],(e,t)=>A.getStableNodeKey(e,t),(e,t)=>{l(e,()=>n(t),()=>n(s).cellRest)}),D(e,i)},s=b(()=>{let{align:e,...t}=n(M);return{_align:e,cellRest:t}});var u=c(),f=d(u),p=e=>{var t=c(),r=d(t);{let e=b(()=>({header:!1,align:n(M).align?.[n(i)]??null,...n(s).cellRest,children:a}));m(r,()=>n(_),()=>n(e))}D(e,t)},h=e=>{var t=c(),r=d(t);{let e=b(()=>n(M).align?.[n(i)]??null);I(r,()=>o.renderers.tablecell,(t,r)=>{r(t,P(()=>n(s).cellRest,{header:!1,get align(){return n(e)},children:(e,t)=>{a(e)},$$slots:{default:!0}}))})}D(e,t)};O(f,e=>{n(_)?e(p):e(h,-1)}),D(e,u)}),D(e,i)};var a=c(),s=d(a),u=e=>{var t=c(),r=d(t);{let e=b(()=>({...n(M),children:i}));m(r,()=>n(p),()=>n(e))}D(e,t)},f=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.tablerow,(e,t)=>{t(e,P(()=>n(M),{children:(e,t)=>{i(e)},$$slots:{default:!0}}))}),D(e,t)};O(s,e=>{n(p)?e(u):e(f,-1)}),D(e,a)}),D(e,t)};var i=c(),a=d(i),s=e=>{var r=c(),i=d(r);{let e=b(()=>({...n(M),children:t}));m(i,()=>n(f),()=>n(e))}D(e,r)},u=e=>{var r=c(),i=d(r);I(i,()=>o.renderers.tablebody,(e,r)=>{r(e,P(()=>n(M),{children:(e,n)=>{t(e)},$$slots:{default:!0}}))}),D(e,r)};O(a,e=>{n(f)?e(s):e(u,-1)}),D(e,i)};O(v,e=>{o.renderers.tablebody&&e(y)}),D(t,i)},a=b(()=>v()[u()]),s=b(()=>v().tablehead),f=b(()=>v().tablebody),p=b(()=>v().tablerow),_=b(()=>v().tablecell);var y=c(),x=d(y),S=e=>{var t=c(),r=d(t);{let e=b(()=>({...n(M),children:i}));m(r,()=>n(a),()=>n(e))}D(e,t)},C=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.table,(e,t)=>{t(e,P(()=>n(M),{children:(e,t)=>{i(e)},$$slots:{default:!0}}))}),D(e,t)};O(x,e=>{n(a)?e(S):e(C,-1)}),D(t,y)};O(a,e=>{o.renderers.table&&o.renderers.tablerow&&o.renderers.tablecell&&e(s)}),D(t,i)},p=e=>{let t=b(()=>v().list);var i=c(),a=d(i),s=e=>{let i=e=>{let t=b(()=>{let{items:e,...t}=n(M);return{_items:e,parserRest:t}}),i=b(()=>n(t)._items??[]);var a=c(),s=d(a);r(s,19,()=>n(i),(e,t)=>A.getStableNodeKey(e,t),(e,i)=>{let a=e=>{var a=c(),o=d(a);r(o,19,()=>n(i).tokens??[],(e,t)=>A.getStableNodeKey(e,t),(e,r)=>{l(e,()=>n(r),()=>n(t).parserRest)}),D(e,a)},s=b(()=>o.renderers.orderedlistitem||o.renderers.listitem),u=b(()=>v().orderedlistitem||v().listitem);var f=c(),p=d(f),h=e=>{var t=c(),r=d(t);{let e=b(()=>({...n(i),children:a}));m(r,()=>n(u),()=>n(e))}D(e,t)},g=e=>{var t=c(),r=d(t);I(r,()=>n(s),(e,t)=>{t(e,P(()=>n(i),{children:(e,t)=>{a(e)},$$slots:{default:!0}}))}),D(e,t)};O(p,e=>{n(u)?e(h):n(s)&&e(g,1)}),D(e,f)}),D(e,a)};var a=c(),s=d(a),u=e=>{var r=c(),a=d(r);{let e=b(()=>({ordered:_(),...n(M),children:i}));m(a,()=>n(t),()=>n(e))}D(e,r)},f=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.list,(e,t)=>{t(e,P({get ordered(){return _()}},()=>n(M),{children:(e,t)=>{i(e)},$$slots:{default:!0}}))}),D(e,t)};O(s,e=>{n(t)?e(u):e(f,-1)}),D(e,a)},u=e=>{let i=e=>{let t=b(()=>{let{items:e,...t}=n(M);return{_items:e,parserRest:t}}),i=b(()=>n(t)._items??[]);var a=c(),s=d(a);r(s,19,()=>n(i),(e,t)=>A.getStableNodeKey(e,t),(e,i)=>{let a=e=>{var a=c(),o=d(a);r(o,19,()=>n(i).tokens??[],(e,t)=>A.getStableNodeKey(e,t),(e,r)=>{l(e,()=>n(r),()=>n(t).parserRest)}),D(e,a)},s=b(()=>o.renderers.unorderedlistitem||o.renderers.listitem),u=b(()=>v().unorderedlistitem||v().listitem);var f=c(),p=d(f),h=e=>{var t=c(),r=d(t);{let e=b(()=>({...n(i),children:a}));m(r,()=>n(u),()=>n(e))}D(e,t)},g=e=>{var t=c(),r=d(t);I(r,()=>n(s),(e,t)=>{t(e,P(()=>n(i),{children:(e,t)=>{a(e)},$$slots:{default:!0}}))}),D(e,t)};O(p,e=>{n(u)?e(h):n(s)&&e(g,1)}),D(e,f)}),D(e,a)};var a=c(),s=d(a),u=e=>{var r=c(),a=d(r);{let e=b(()=>({ordered:_(),...n(M),children:i}));m(a,()=>n(t),()=>n(e))}D(e,r)},f=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.list,(e,t)=>{t(e,P({get ordered(){return _()}},()=>n(M),{children:(e,t)=>{i(e)},$$slots:{default:!0}}))}),D(e,t)};O(s,e=>{n(t)?e(u):e(f,-1)}),D(e,a)};O(a,e=>{_()?e(s):e(u,-1)}),D(e,i)},y=e=>{let t=e=>{var t=c(),i=d(t),a=e=>{var t=c(),i=d(t);r(i,19,f,(e,t)=>A.getStableNodeKey(e,t),(e,t)=>{l(e,()=>n(t),()=>n(u))}),D(e,t)},s=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.rawtext,(e,t)=>{t(e,P({get text(){return n(M).raw}},()=>n(M)))}),D(e,t)};O(i,e=>{f()&&f().length?e(a):f()||e(s,1)}),D(e,t)},i=b(()=>{let{tag:e,...t}=n(M);return{tag:e,localRest:t}}),a=b(()=>n(M).tag),s=b(()=>x()[n(a)]),u=b(()=>Object.fromEntries(Object.entries(n(i).localRest).filter(([e])=>e!==`attributes`)));var p=c(),h=d(p),g=e=>{var r=c(),i=d(r);m(i,()=>n(s),()=>({attributes:n(M).attributes,children:t})),D(e,r)},_=e=>{let r=b(()=>o.renderers.html[n(a)]);var i=c(),s=d(i),l=e=>{var i=c(),a=d(i);I(a,()=>n(r),(e,r)=>{r(e,P(()=>n(M),{children:(e,n)=>{t(e)},$$slots:{default:!0}}))}),D(e,i)};O(s,e=>{n(r)&&e(l)}),D(e,i)},v=b(()=>o.renderers.html&&Object.hasOwn(o.renderers.html,n(a))),y=e=>{let t=b(()=>Object.fromEntries(Object.entries(n(i).localRest).filter(([e])=>e!==`tokens`))),a=b(()=>f()??[]);var o=c(),s=d(o);r(s,19,()=>n(a),(e,t)=>A.getStableNodeKey(e,t),(e,r)=>{l(e,()=>n(r),()=>n(t))}),D(e,o)};O(h,e=>{n(s)?e(g):n(v)?e(_,1):e(y,-1)}),D(e,p)},S=e=>{let t=e=>{var t=c(),i=d(t),a=e=>{let t=b(()=>{let{text:e,raw:t,...r}=n(M);return{_text:e,_raw:t,parserRest:r}});var i=c(),a=d(i);r(a,19,f,(e,t)=>A.getStableNodeKey(e,t),(e,r)=>{l(e,()=>n(r),()=>n(t).parserRest)}),D(e,i)},s=e=>{var t=c(),r=d(t);I(r,()=>o.renderers.rawtext,(e,t)=>{t(e,P({get text(){return n(M).raw}},()=>n(M)))}),D(e,t)};O(i,e=>{f()?e(a):e(s,-1)}),D(e,t)},i=b(()=>o.renderers[u()]),a=b(()=>v()[u()]);var s=c(),p=d(s),h=e=>{var r=c(),i=d(r);{let e=b(()=>({...n(M),children:t}));m(i,()=>n(a),()=>n(e))}D(e,r)},g=e=>{var r=c(),a=d(r);I(a,()=>n(i),(e,r)=>{r(e,P(()=>n(M),{children:(e,n)=>{t(e)},$$slots:{default:!0}}))}),D(e,r)};O(p,e=>{n(a)?e(h):n(i)&&e(g,1)}),D(e,s)};O(a,e=>{u()===`table`?e(s):u()===`list`&&o.renderers.list?e(p,1):u()===`html`?e(y,2):e(S,-1)}),D(t,i)};O(oe,e=>{u()?(u()in o.renderers||u()in v())&&e(le,1):e(se)}),D(a,N),ee()}var No=Object.keys(po).filter(e=>e!==`html`);Object.keys(wr);var Po=e=>({...po.html,...Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLowerCase(),t]))}),Fo=e=>({...po,...e,html:e.html?Po(e.html):po.html}),Io=e=>[...No,...e],Lo=(e,t)=>Object.fromEntries(t.filter(t=>t in e&&e[t]!=null).map(t=>[t,e[t]])),Ro=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>e.startsWith(`html_`)&&t!=null).map(([e,t])=>[e.slice(5).toLowerCase(),t])),zo=(e,t)=>{let n=new Set([...t,...Object.keys(e).filter(e=>e.startsWith(`html_`))]);return Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))},Bo=0,Vo=new WeakMap,Ho=e=>{let t=Vo.get(e);return t||(t=++Bo,Vo.set(e,t)),t},Uo=e=>typeof e==`function`?Ho(e):null,Wo=e=>e.flatMap(e=>e.extensions?.map(e=>e.name)??[]),Go=e=>e.length>0?new ha(...e).defaults:{},Ko=e=>e.some(e=>e.async===!0),qo=e=>e.map(e=>({extension:Ho(e),async:e.async??!1,extensions:e.extensions?.map(e=>{let t=e;return{token:Ho(e),name:e.name,level:t.level??null,childTokens:t.childTokens??null,start:Uo(t.start),tokenizer:Uo(t.tokenizer),renderer:Uo(t.renderer)}})??null,hooks:e.hooks?Ho(e.hooks):null,renderer:e.renderer?Ho(e.renderer):null,tokenizer:e.tokenizer?Ho(e.tokenizer):null,walkTokens:Uo(e.walkTokens)})),Jo=(e,t)=>{let n=Go(t),r=t.length>0?qo(t):void 0;return{...mo,...n,...e,...r?{_svelteMarkdownExtensionCacheSignature:r}:{}}},Yo=class e extends Error{constructor(t){super(t),this.name=`CacheConfigError`,Object.setPrototypeOf(this,e.prototype)}},Xo=Symbol(`CACHED_UNDEFINED`),Zo=Symbol(`CACHED_NULL`),Qo=class{constructor(e={}){this.cache=new Map,this.inFlight=new Map,this.totalWeight=0,this.stats={hits:0,misses:0,evictions:0,expirations:0},this.expirationQueue=[],this.compactionScheduled=!1;let t=e.maxSize??100,n=e.maxWeight??0,r=e.ttl??3e5;if(t<0)throw new Yo(`maxSize must be a non-negative number`);if(r<0)throw new Yo(`ttl must be a non-negative number`);if(n<0||Number.isNaN(n))throw new Yo(`maxWeight must be a non-negative number`);if(n>0&&!e.sizeCalculation)throw new Yo(`sizeCalculation is required when maxWeight is greater than 0`);this.maxSize=t,this.maxWeight=n,this.sizeCalculation=e.sizeCalculation,this.ttl=r,this.hooks=e.hooks??{}}callHook(e,t){if(e)try{e(t)}catch{}}unwrapValue(e){if(e!==Xo)return e===Zo?null:e}removeEntry(e){let t=this.cache.get(e);if(!(!t||!this.cache.delete(e)))return this.totalWeight-=t.weight,this.cache.size===0&&(this.totalWeight=0),t}evictEntry(e){let t=this.removeEntry(e);return t?(this.stats.evictions++,this.callHook(this.hooks.onEvict,{key:e,value:this.unwrapValue(t.value)}),!0):!1}exceedsCapacity(e,t){let n=this.cache.size+ +(t===void 0),r=this.totalWeight-(t??0)+e;return this.maxSize>0&&n>this.maxSize||this.maxWeight>0&&r>this.maxWeight}read(e,t,n){let r=this.cache.get(e);if(!r)return n&&(this.stats.misses++,this.callHook(this.hooks.onMiss,{key:e,reason:`not_found`})),{found:!1,reason:`not_found`};if(this.ttl>0&&Date.now()-r.timestamp>this.ttl){let i=this.unwrapValue(r.value);return this.removeEntry(e),this.stats.expirations++,this.callHook(this.hooks.onExpire,{key:e,value:i,source:t}),n&&(this.stats.misses++,this.callHook(this.hooks.onMiss,{key:e,reason:`expired`})),{found:!1,reason:`expired`}}n&&(this.cache.delete(e),this.cache.set(e,r),this.stats.hits++);let i=this.unwrapValue(r.value);return n&&this.callHook(this.hooks.onHit,{key:e,value:i}),{found:!0,value:i}}get(e){let t=this.read(e,`get`,!0);return t.found?t.value:void 0}async getOrSet(e,t){let n=this.inFlight.get(e);if(n)return n;let r=this.read(e,`get`,!0);if(r.found)return r.value;let i=(async()=>{try{let n=await t();return this.set(e,n),n}finally{this.inFlight.delete(e)}})();return this.inFlight.set(e,i),i}has(e){return this.read(e,`has`,!1).found}set(e,t){let n=0;if(this.maxWeight>0&&(n=this.sizeCalculation(t,e),!Number.isFinite(n)||n<0))throw RangeError(`sizeCalculation must return a finite, non-negative number`);let r=this.cache.get(e);if(this.maxWeight>0&&n>this.maxWeight){r&&this.evictEntry(e);return}this.exceedsCapacity(n,r?.weight)&&this.prune();let i=this.cache.get(e);for(;this.exceedsCapacity(n,i?.weight);){let t;for(let n of this.cache.keys())if(n!==e){t=n;break}if(t===void 0||!this.evictEntry(t))break;i=this.cache.get(e)}let a=i!==void 0;a&&this.removeEntry(e);let o;o=t===void 0?Xo:t===null?Zo:t;let s=Date.now();if(this.cache.set(e,{value:o,timestamp:s,weight:n}),this.totalWeight+=n,this.ttl>0){let t=this.expirationQueue,n=t[t.length-1];n?.key===e?n.timestamp=s:t.push({key:e,timestamp:s})}this.callHook(this.hooks.onSet,{key:e,value:t,isUpdate:a})}delete(e){let t=this.removeEntry(e);if(t){let n=this.unwrapValue(t.value);this.callHook(this.hooks.onDelete,{key:e,value:n,source:`delete`})}return t!==void 0}async deleteAsync(e){let t=this.removeEntry(e);if(t){let n=this.unwrapValue(t.value);this.callHook(this.hooks.onDelete,{key:e,value:n,source:`deleteAsync`})}return Promise.resolve(t!==void 0)}clear(){for(let[e,t]of this.cache.entries()){let n=this.unwrapValue(t.value);this.removeEntry(e),this.callHook(this.hooks.onDelete,{key:e,value:n,source:`clear`})}this.expirationQueue=[],this.compactionScheduled=!1}deleteByPrefix(e){let t=0;for(let[n,r]of this.cache.entries())if(n.startsWith(e)){let e=this.unwrapValue(r.value);this.removeEntry(n),this.callHook(this.hooks.onDelete,{key:n,value:e,source:`deleteByPrefix`}),t++}return t}deleteByMagicString(e){let t=0,n=e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`),r=RegExp(`^${n}$`);for(let[e,n]of this.cache.entries())if(r.test(e)){let r=this.unwrapValue(n.value);this.removeEntry(e),this.callHook(this.hooks.onDelete,{key:e,value:r,source:`deleteByMagicString`}),t++}return t}size(){return this.prune(),this.cache.size}keys(){return this.prune(),Array.from(this.cache.keys())}values(){this.prune();let e=[];for(let t of this.cache.values())t.value===Xo?e.push(void 0):t.value===Zo?e.push(null):e.push(t.value);return e}entries(){this.prune();let e=[];for(let[t,n]of this.cache.entries()){let r;r=n.value===Xo?void 0:n.value===Zo?null:n.value,e.push([t,r])}return e}getStats(){return this.prune(),{hits:this.stats.hits,misses:this.stats.misses,evictions:this.stats.evictions,expirations:this.stats.expirations,size:this.cache.size,weight:this.totalWeight}}resetStats(){this.stats.hits=0,this.stats.misses=0,this.stats.evictions=0,this.stats.expirations=0}prune(){if(this.ttl<=0)return 0;let e=0,t=Date.now(),n=this.expirationQueue,r=0;for(;r<n.length&&t-n[r].timestamp>this.ttl;){let{key:t,timestamp:i}=n[r];r++;let a=this.cache.get(t);if(a&&a.timestamp===i){let n=this.unwrapValue(a.value);this.removeEntry(t),this.stats.expirations++,this.callHook(this.hooks.onExpire,{key:t,value:n,source:`prune`}),e++}}return r>0&&n.splice(0,r),!this.compactionScheduled&&this.expirationQueue.length>2*this.cache.size&&(this.compactionScheduled=!0,queueMicrotask(()=>{this.compactionScheduled=!1,this.expirationQueue=this.expirationQueue.filter(e=>{let t=this.cache.get(e.key);return t!==void 0&&t.timestamp===e.timestamp})})),e}},$o=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return(t>>>0).toString(36)},es=new WeakMap,ts=(e,t)=>{let n=$o(e),r=es.get(t);if(!r){let e=new WeakSet;r=$o(JSON.stringify(t,(t,n)=>{if(typeof n==`function`)return n.name||n.toString();if(n&&typeof n==`object`){if(e.has(n))return`[Circular]`;e.add(n)}return n})),es.set(t,r)}return`${n}:${r}`},ns=new class extends Qo{constructor(e){super({maxSize:50,ttl:3e5,...e})}getTokens(e,t){let n=ts(e,t),r=this.get(n);if(r!==void 0&&r.source===e)return r.tokens}setTokens(e,t,n){let r=ts(e,t);this.set(r,{source:e,tokens:n})}hasTokens(e,t){return this.getTokens(e,t)!==void 0}deleteTokens(e,t){let n=ts(e,t);return this.delete(n)}clearAllTokens(){this.clear()}},rs=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function is(e){return e===0||e>=55296&&e<=57343||e>1114111}function as(e){return is(e)?65533:e>=128&&e<=159&&rs[e-128]||e}function os(e){return is(e)?65533:e}var K=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function ss(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=K[e.charCodeAt(c++)];return t<a?t:t*91-s+K[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=K[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=K[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=K[e.charCodeAt(c++)];r+=89+(t<90?t*91+K[e.charCodeAt(c++)]:K[e.charCodeAt(c++)]*8281+K[e.charCodeAt(c++)]*91+K[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),C=0;for(;c<o;){let t=K[e.charCodeAt(c++)];t>=a&&(t=t*91-s+K[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[C++]=b[e++]}else S[C++]=n}return S}var cs=ss("!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Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),ls=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]),q;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(q||={});var J;(function(e){e[e.AMP=38]=`AMP`,e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_X=120]=`LOWER_X`})(J||={});var us=32;function ds(e){return e-J.ZERO>>>0<=9}function fs(e){return(e|us)-J.LOWER_A>>>0<=5}function ps(e){return(e|us)-J.LOWER_A>>>0<=25}function ms(e){return e===J.EQUALS||ps(e)||ds(e)}var Y;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Y||={});var hs;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(hs||={});var gs=class{decodeTree;emitCodePoint;errors;state=Y.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=hs.Strict;runConsumed=0;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}startEntity(e){this.decodeMode=e,this.state=Y.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Y.EntityStart:return e.charCodeAt(t)===J.NUM?(this.state=Y.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Y.NamedEntity,this.stateNamedEntity(e,t));case Y.NumericStart:return this.stateNumericStart(e,t);case Y.NumericDecimal:return this.stateNumericDecimal(e,t);case Y.NumericHex:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|us)===J.LOWER_X?(this.state=Y.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Y.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t);if(ds(n)||fs(n)){let e=n<=J.NINE?n-J.ZERO:(n|us)-J.LOWER_A+10;r=r*16+e,i+=1,t+=1}else return this.result=r,this.consumed=i,this.emitNumericEntity(n,3)}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t)-J.ZERO;if(n>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(n+J.ZERO,2);r=r*10+n,i+=1,t+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===J.SEMI)this.consumed+=1;else if(this.decodeMode===hs.Strict)return 0;return this.emitCodePoint((this.decodeTree===ls?os:as)(this.result),this.consumed),this.errors&&(e!==J.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(e,t,n,r){return this.consumed=e,this.excess=t,this.result===0||this.decodeMode===hs.Attribute&&(r===0||t>1||ms(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(e,t){let{decodeTree:n}=this,r=e.length,i=this.decodeMode===hs.Strict,{treeIndex:a}=this,{excess:o}=this,{consumed:s}=this,c=n[a];for(;t<r;){for(;(c&(q.VALUE_LENGTH|q.FLAG13))===0&&(c&q.JUMP_TABLE)!==0;){let i=e.charCodeAt(t),l=c&q.JUMP_TABLE,u=(c&q.BRANCH_LENGTH)>>7;if(u===0){if(i!==l)return this.flushAndEmitLegacyOrReject(s,o,i,0);a+=1}else{let e=i-l;if(e>>>0>=u)return this.flushAndEmitLegacyOrReject(s,o,i,0);let t=n[a+1+e];if(t===0)return this.flushAndEmitLegacyOrReject(s,o,i,0);a=a+u+t&65535}if(c=n[a],t+=1,o+=1,t>=r)break}if(t>=r)break;if((c&(q.VALUE_LENGTH|q.FLAG13))===q.FLAG13){let i=(c&q.BRANCH_LENGTH)>>7,{runConsumed:l}=this;if(l===0){let n=e.charCodeAt(t);if(n!==(c&q.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(s,o,n,0);t+=1,o+=1,l=1}for(;l<i;){if(t>=r)return this.treeIndex=a,this.excess=o,this.consumed=s,this.runConsumed=l,-1;let i=l-1,c=n[a+1+(i>>1)]>>((i&1)<<3)&255,u=e.charCodeAt(t);if(u!==c)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(s,o,u,0);t+=1,o+=1,l+=1}this.runConsumed=0,a+=1+(i>>1),c=n[a];continue}let l=c>>>14,u=e.charCodeAt(t);if(l!==0){if(!i&&(c&q.FLAG13)===0&&(this.result=a,s+=o-1,o=1),u===J.SEMI)return this.emitNamedEntityData(a,l,s+o);if(l===1)return this.flushAndEmitLegacyOrReject(s,o,u,l)}let d=_s(n,c,a+(l||1),u);if(d<0)return this.flushAndEmitLegacyOrReject(s,o,u,l);a=d,c=n[a],t+=1,o+=1}return!i&&c>>>14&&(c&q.FLAG13)===0&&(this.result=a,s+=o-1,o=1),this.treeIndex=a,this.excess=o,this.consumed=s,-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=t[e]>>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&q.VALUE_MASK:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Y.NamedEntity:return this.result!==0&&(this.decodeMode!==hs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Y.NumericDecimal:return this.emitNumericEntity(0,2);case Y.NumericHex:return this.emitNumericEntity(0,3);case Y.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function _s(e,t,n,r){let i=(t&q.BRANCH_LENGTH)>>7,a=t&q.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}var X;(function(e){e[e.Tab=9]=`Tab`,e[e.NewLine=10]=`NewLine`,e[e.FormFeed=12]=`FormFeed`,e[e.CarriageReturn=13]=`CarriageReturn`,e[e.Space=32]=`Space`,e[e.ExclamationMark=33]=`ExclamationMark`,e[e.Number=35]=`Number`,e[e.Amp=38]=`Amp`,e[e.SingleQuote=39]=`SingleQuote`,e[e.DoubleQuote=34]=`DoubleQuote`,e[e.Dash=45]=`Dash`,e[e.Slash=47]=`Slash`,e[e.Zero=48]=`Zero`,e[e.Nine=57]=`Nine`,e[e.Semi=59]=`Semi`,e[e.Lt=60]=`Lt`,e[e.Eq=61]=`Eq`,e[e.Gt=62]=`Gt`,e[e.Questionmark=63]=`Questionmark`,e[e.UpperA=65]=`UpperA`,e[e.LowerA=97]=`LowerA`,e[e.UpperF=70]=`UpperF`,e[e.LowerF=102]=`LowerF`,e[e.UpperZ=90]=`UpperZ`,e[e.LowerZ=122]=`LowerZ`,e[e.LowerX=120]=`LowerX`,e[e.OpeningSquareBracket=91]=`OpeningSquareBracket`})(X||={});var Z;(function(e){e[e.Text=1]=`Text`,e[e.BeforeTagName=2]=`BeforeTagName`,e[e.InTagName=3]=`InTagName`,e[e.InSelfClosingTag=4]=`InSelfClosingTag`,e[e.BeforeClosingTagName=5]=`BeforeClosingTagName`,e[e.InClosingTagName=6]=`InClosingTagName`,e[e.AfterClosingTagName=7]=`AfterClosingTagName`,e[e.BeforeAttributeName=8]=`BeforeAttributeName`,e[e.InAttributeName=9]=`InAttributeName`,e[e.AfterAttributeName=10]=`AfterAttributeName`,e[e.BeforeAttributeValue=11]=`BeforeAttributeValue`,e[e.InAttributeValueDq=12]=`InAttributeValueDq`,e[e.InAttributeValueSq=13]=`InAttributeValueSq`,e[e.InAttributeValueNq=14]=`InAttributeValueNq`,e[e.BeforeDeclaration=15]=`BeforeDeclaration`,e[e.InDeclaration=16]=`InDeclaration`,e[e.InProcessingInstruction=17]=`InProcessingInstruction`,e[e.BeforeComment=18]=`BeforeComment`,e[e.CDATASequence=19]=`CDATASequence`,e[e.DeclarationSequence=20]=`DeclarationSequence`,e[e.InSpecialComment=21]=`InSpecialComment`,e[e.InCommentLike=22]=`InCommentLike`,e[e.SpecialStartSequence=23]=`SpecialStartSequence`,e[e.InSpecialTag=24]=`InSpecialTag`,e[e.InPlainText=25]=`InPlainText`,e[e.InEntity=26]=`InEntity`})(Z||={});function vs(e){return e===X.Space||e===X.NewLine||e===X.Tab||e===X.FormFeed||e===X.CarriageReturn}function ys(e){return e===X.Slash||e===X.Gt||vs(e)}function bs(e){return e>=X.LowerA&&e<=X.LowerZ||e>=X.UpperA&&e<=X.UpperZ}var xs;(function(e){e[e.NoValue=0]=`NoValue`,e[e.Unquoted=1]=`Unquoted`,e[e.Single=2]=`Single`,e[e.Double=3]=`Double`})(xs||={});var Q={Empty:new Uint8Array,Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},Ss=new Map([[Q.IframeEnd[2],Q.IframeEnd],[Q.NoembedEnd[2],Q.NoembedEnd],[Q.Plaintext[2],Q.Plaintext],[Q.ScriptEnd[2],Q.ScriptEnd],[Q.TitleEnd[2],Q.TitleEnd],[Q.XmpEnd[2],Q.XmpEnd]]),Cs=class{cbs;state=Z.Text;buffer=``;sectionStart=0;index=0;entityStart=0;baseState=Z.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:e=!1,decodeEntities:t=!0,recognizeSelfClosing:n=e},r){this.cbs=r,this.xmlMode=e,this.decodeEntities=t,this.recognizeSelfClosing=n,this.entityDecoder=new gs(e?ls:cs,(e,t)=>this.emitCodePoint(e,t))}reset(){this.state=Z.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=Z.Text,this.isSpecial=!1,this.currentSequence=Q.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(e){e===X.Lt||!this.decodeEntities&&this.fastForwardTo(X.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=Z.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===X.Amp&&this.startEntity()}currentSequence=Q.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===Q.Plaintext?(this.currentSequence=Q.Empty,this.state=Z.InPlainText):this.isSpecial?(this.state=Z.InSpecialTag,this.sequenceIndex=0):this.state=Z.Text}stateSpecialStartSequence(e){let t=e|32;if(this.sequenceIndex<this.currentSequence.length){if(t===this.currentSequence[this.sequenceIndex]){this.sequenceIndex++;return}if(this.sequenceIndex===3){if(this.currentSequence===Q.ScriptEnd&&t===Q.StyleEnd[3]){this.currentSequence=Q.StyleEnd,this.sequenceIndex=4;return}if(this.currentSequence===Q.TitleEnd&&t===Q.TextareaEnd[3]){this.currentSequence=Q.TextareaEnd,this.sequenceIndex=4;return}}else if(this.sequenceIndex===4&&this.currentSequence===Q.NoembedEnd&&t===Q.NoframesEnd[4]){this.currentSequence=Q.NoframesEnd,this.sequenceIndex=5;return}}else if(ys(e)){this.sequenceIndex=0,this.state=Z.InTagName,this.stateInTagName(e);return}this.isSpecial=!1,this.currentSequence=Q.Empty,this.sequenceIndex=0,this.state=Z.InTagName,this.stateInTagName(e)}stateCDATASequence(e){e===Q.Cdata[this.sequenceIndex]?++this.sequenceIndex===Q.Cdata.length&&(this.state=Z.InCommentLike,this.currentSequence=Q.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.xmlMode?(this.state=Z.InDeclaration,this.stateInDeclaration(e)):(this.state=Z.InSpecialComment,this.stateInSpecialComment(e)))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}emitComment(e){this.cbs.oncomment(this.sectionStart,this.index,e),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Z.Text}stateInCommentLike(e){!this.xmlMode&&this.currentSequence===Q.CommentEnd&&this.sequenceIndex<=1&&this.index===this.sectionStart+this.sequenceIndex&&e===X.Gt?this.emitComment(this.sequenceIndex):this.currentSequence===Q.CommentEnd&&this.sequenceIndex===2&&e===X.Gt?this.emitComment(2):this.currentSequence===Q.CommentEnd&&this.sequenceIndex===this.currentSequence.length-1&&e!==X.Gt?this.sequenceIndex=Number(e===X.Dash):e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Q.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,3),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Z.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!ys(e):bs(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(ys(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.isSpecial=!1,this.sectionStart=t+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Q.TitleEnd||this.currentSequence===Q.TextareaEnd?this.decodeEntities&&e===X.Amp&&this.startEntity():this.fastForwardTo(X.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===X.Lt)}stateBeforeTagName(e){if(e===X.ExclamationMark)this.state=Z.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===X.Questionmark)this.xmlMode?(this.state=Z.InProcessingInstruction,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.state=Z.InSpecialComment,this.sectionStart=this.index);else if(this.isTagStartChar(e)){this.sectionStart=this.index;let t=this.xmlMode||this.cbs.isInForeignContext?.()?void 0:Ss.get(e|32);t===void 0?this.state=Z.InTagName:(this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=3,this.state=Z.SpecialStartSequence)}else e===X.Slash?this.state=Z.BeforeClosingTagName:(this.state=Z.Text,this.stateText(e))}stateInTagName(e){ys(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){vs(e)?this.xmlMode||(this.state=Z.InSpecialComment,this.sectionStart=this.index):e===X.Gt?(this.state=Z.Text,this.xmlMode||(this.sectionStart=this.index+1)):(this.state=this.isTagStartChar(e)?Z.InClosingTagName:Z.InSpecialComment,this.sectionStart=this.index)}stateInClosingTagName(e){ys(e)&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Z.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===X.Gt||this.fastForwardTo(X.Gt))&&(this.state=Z.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===X.Gt?(this.cbs.onopentagend(this.index),this.enterTagBody(),this.sectionStart=this.index+1):e===X.Slash?this.state=Z.InSelfClosingTag:vs(e)||(this.state=Z.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){if(e===X.Gt){if(this.cbs.onselfclosingtag(this.index),this.sectionStart=this.index+1,!this.recognizeSelfClosing){this.enterTagBody();return}this.state=Z.Text,this.isSpecial=!1,this.currentSequence=Q.Empty}else vs(e)||(this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===X.Eq||ys(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=Z.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===X.Eq?this.state=Z.BeforeAttributeValue:e===X.Slash||e===X.Gt?(this.cbs.onattribend(xs.NoValue,this.sectionStart),this.sectionStart=-1,this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(e)):vs(e)||(this.cbs.onattribend(xs.NoValue,this.sectionStart),this.state=Z.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===X.DoubleQuote?(this.state=Z.InAttributeValueDq,this.sectionStart=this.index+1):e===X.SingleQuote?(this.state=Z.InAttributeValueSq,this.sectionStart=this.index+1):vs(e)||(this.sectionStart=this.index,this.state=Z.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===X.DoubleQuote?xs.Double:xs.Single,this.index+1),this.state=Z.BeforeAttributeName):this.decodeEntities&&e===X.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,X.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,X.SingleQuote)}stateInAttributeValueNoQuotes(e){vs(e)||e===X.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(xs.Unquoted,this.index),this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===X.Amp&&this.startEntity()}stateBeforeDeclaration(e){e===X.OpeningSquareBracket?(this.state=Z.CDATASequence,this.sequenceIndex=0):this.xmlMode?this.state=e===X.Dash?Z.BeforeComment:Z.InDeclaration:(e|32)===Q.Doctype[0]?(this.state=Z.DeclarationSequence,this.currentSequence=Q.Doctype,this.sequenceIndex=1):e===X.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Z.Text,this.sectionStart=this.index+1):this.state=e===X.Dash?Z.BeforeComment:Z.InSpecialComment}stateDeclarationSequence(e){this.sequenceIndex===this.currentSequence.length?(this.state=Z.InDeclaration,this.stateInDeclaration(e)):(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:e===X.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Z.Text,this.sectionStart=this.index+1):this.state=Z.InSpecialComment}stateInDeclaration(e){(e===X.Gt||this.fastForwardTo(X.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Z.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){e===X.Questionmark?this.sequenceIndex=1:e===X.Gt&&this.sequenceIndex===1?(this.cbs.onprocessinginstruction(this.sectionStart,this.index-1),this.sequenceIndex=0,this.state=Z.Text,this.sectionStart=this.index+1):this.sequenceIndex=Number(this.fastForwardTo(X.Questionmark))}stateBeforeComment(e){e===X.Dash?(this.state=Z.InCommentLike,this.currentSequence=Q.CommentEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):this.xmlMode?this.state=Z.InDeclaration:e===X.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Z.Text,this.sectionStart=this.index+1):this.state=Z.InSpecialComment}stateInSpecialComment(e){(e===X.Gt||this.fastForwardTo(X.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Z.Text,this.sectionStart=this.index+1)}startEntity(){this.baseState=this.state,this.state=Z.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?hs.Strict:this.baseState===Z.Text||this.baseState===Z.InSpecialTag?hs.Legacy:hs.Attribute)}stateInEntity(){let e=this.index-this.offset,t=this.entityDecoder.write(this.buffer,e);if(t>=0)this.state=this.baseState,t===0&&--this.index;else{if(e<this.buffer.length&&this.buffer.charCodeAt(e)===X.Amp){this.state=this.baseState,--this.index;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===Z.Text||this.state===Z.InPlainText||this.state===Z.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===Z.InAttributeValueDq||this.state===Z.InAttributeValueSq||this.state===Z.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case Z.Text:this.stateText(e);break;case Z.InPlainText:this.index=this.buffer.length+this.offset-1;break;case Z.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case Z.InSpecialTag:this.stateInSpecialTag(e);break;case Z.CDATASequence:this.stateCDATASequence(e);break;case Z.DeclarationSequence:this.stateDeclarationSequence(e);break;case Z.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case Z.InAttributeName:this.stateInAttributeName(e);break;case Z.InCommentLike:this.stateInCommentLike(e);break;case Z.InSpecialComment:this.stateInSpecialComment(e);break;case Z.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case Z.InTagName:this.stateInTagName(e);break;case Z.InClosingTagName:this.stateInClosingTagName(e);break;case Z.BeforeTagName:this.stateBeforeTagName(e);break;case Z.AfterAttributeName:this.stateAfterAttributeName(e);break;case Z.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case Z.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case Z.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case Z.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case Z.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case Z.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case Z.InDeclaration:this.stateInDeclaration(e);break;case Z.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case Z.BeforeComment:this.stateBeforeComment(e);break;case Z.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case Z.InEntity:this.stateInEntity()}this.index++}this.cleanup()}finish(){this.state===Z.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingCommentLikeData(e){if(this.state!==Z.InCommentLike)return!1;if(this.currentSequence===Q.CdataEnd)if(this.xmlMode)this.sectionStart<e&&this.cbs.oncdata(this.sectionStart,e,0);else{let t=this.sectionStart-Q.Cdata.length-1;this.cbs.oncomment(t,e,0)}else{let t=this.xmlMode?0:Math.min(this.sequenceIndex,Q.CommentEnd.length-1);this.cbs.oncomment(this.sectionStart,e,t)}return!0}handleTrailingMarkupDeclaration(e){if(this.xmlMode)switch(this.state){case Z.InSpecialComment:case Z.BeforeComment:case Z.CDATASequence:case Z.DeclarationSequence:case Z.InDeclaration:return this.cbs.ontext(this.sectionStart,e),!0;default:return!1}switch(this.state){case Z.BeforeDeclaration:case Z.InSpecialComment:case Z.BeforeComment:case Z.CDATASequence:return this.cbs.oncomment(this.sectionStart,e,0),!0;case Z.DeclarationSequence:return this.sequenceIndex!==Q.Doctype.length&&this.cbs.oncomment(this.sectionStart,e,0),!0;case Z.InDeclaration:return!0;default:return!1}}handleTrailingData(){let e=this.buffer.length+this.offset;if(!(this.handleTrailingCommentLikeData(e)||this.handleTrailingMarkupDeclaration(e))&&!(this.sectionStart>=e))switch(this.state){case Z.InTagName:case Z.BeforeAttributeName:case Z.BeforeAttributeValue:case Z.AfterAttributeName:case Z.InAttributeName:case Z.InAttributeValueSq:case Z.InAttributeValueDq:case Z.InAttributeValueNq:case Z.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,e)}}emitCodePoint(e,t){this.baseState!==Z.Text&&this.baseState!==Z.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.onattribentity(e)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.ontextentity(e,this.sectionStart))}},{fromCodePoint:ws}=String,Ts=new Set([`input`,`option`,`optgroup`,`select`,`button`,`datalist`,`textarea`]),$=new Set([`p`]),Es=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`p`]),Ds=new Set([`thead`,`tbody`]),Os=new Set([`dd`,`dt`]),ks=new Set([`rt`,`rp`]),As=new Map([[`tr`,new Set([`tr`,`th`,`td`])],[`th`,new Set([`th`])],[`td`,new Set([`thead`,`th`,`td`])],[`body`,new Set([`head`,`link`,`script`])],[`a`,new Set([`a`])],[`li`,new Set([`li`])],[`p`,$],[`h1`,Es],[`h2`,Es],[`h3`,Es],[`h4`,Es],[`h5`,Es],[`h6`,Es],[`select`,Ts],[`input`,Ts],[`output`,Ts],[`button`,Ts],[`datalist`,Ts],[`textarea`,Ts],[`option`,new Set([`option`])],[`optgroup`,new Set([`optgroup`,`option`])],[`dd`,Os],[`dt`,Os],[`address`,$],[`article`,$],[`aside`,$],[`blockquote`,$],[`details`,$],[`div`,$],[`dl`,$],[`fieldset`,$],[`figcaption`,$],[`figure`,$],[`footer`,$],[`form`,$],[`header`,$],[`hr`,$],[`main`,$],[`nav`,$],[`ol`,$],[`pre`,$],[`section`,$],[`table`,$],[`ul`,$],[`rt`,ks],[`rp`,ks],[`tbody`,Ds],[`tfoot`,Ds]]),js=`doctype`,Ms=new Set([`area`,`base`,`basefont`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`img`,`input`,`isindex`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),Ns=new Set([`math`,`svg`]),Ps=new Set([`mi`,`mo`,`mn`,`ms`,`mtext`,`annotation-xml`,`foreignObject`,`desc`,`title`]),Fs=new Map([[`altglyph`,`altGlyph`],[`altglyphdef`,`altGlyphDef`],[`altglyphitem`,`altGlyphItem`],[`animatecolor`,`animateColor`],[`animatemotion`,`animateMotion`],[`animatetransform`,`animateTransform`],[`clippath`,`clipPath`],[`feblend`,`feBlend`],[`fecolormatrix`,`feColorMatrix`],[`fecomponenttransfer`,`feComponentTransfer`],[`fecomposite`,`feComposite`],[`feconvolvematrix`,`feConvolveMatrix`],[`fediffuselighting`,`feDiffuseLighting`],[`fedisplacementmap`,`feDisplacementMap`],[`fedistantlight`,`feDistantLight`],[`fedropshadow`,`feDropShadow`],[`feflood`,`feFlood`],[`fefunca`,`feFuncA`],[`fefuncb`,`feFuncB`],[`fefuncg`,`feFuncG`],[`fefuncr`,`feFuncR`],[`fegaussianblur`,`feGaussianBlur`],[`feimage`,`feImage`],[`femerge`,`feMerge`],[`femergenode`,`feMergeNode`],[`femorphology`,`feMorphology`],[`feoffset`,`feOffset`],[`fepointlight`,`fePointLight`],[`fespecularlighting`,`feSpecularLighting`],[`fespotlight`,`feSpotLight`],[`fetile`,`feTile`],[`feturbulence`,`feTurbulence`],[`foreignobject`,`foreignObject`],[`glyphref`,`glyphRef`],[`lineargradient`,`linearGradient`],[`radialgradient`,`radialGradient`],[`textpath`,`textPath`]]),Is;(function(e){e[e.None=0]=`None`,e[e.Svg=1]=`Svg`,e[e.MathML=2]=`MathML`})(Is||={});var Ls=/\s|\//,Rs=class{options;startIndex=0;endIndex=0;openTagStart=0;tagname=``;attribname=``;attribvalue=``;attribs=null;stack=[];foreignContext;cbs;lowerCaseTagNames;lowerCaseAttributeNames;recognizeSelfClosing;htmlMode;tokenizer;buffers=[];bufferOffset=0;writeIndex=0;ended=!1;constructor(e,t={}){this.options=t,this.cbs=e??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=t.lowerCaseTags??this.htmlMode,this.lowerCaseAttributeNames=t.lowerCaseAttributeNames??this.htmlMode,this.recognizeSelfClosing=t.recognizeSelfClosing??!this.htmlMode,this.tokenizer=new(t.Tokenizer??Cs)(this.options,this),this.foreignContext=[Is.None],this.cbs.onparserinit?.(this)}ontext(e,t){let n=this.getSlice(e,t);this.endIndex=t-1,this.cbs.ontext?.(n),this.startIndex=t}ontextentity(e,t){this.endIndex=t-1,this.cbs.ontext?.(ws(e)),this.startIndex=t}isInForeignContext(){return this.foreignContext[0]!==Is.None}isVoidElement(e){return this.htmlMode&&Ms.has(e)}readTagName(e,t){let n=this.lowerCaseTagNames?this.getSlice(e,t).toLowerCase():this.getSlice(e,t);if(!(this.lowerCaseTagNames&&this.htmlMode))return n;if(this.foreignContext[0]===Is.Svg)return Fs.get(n)??n;if(this.foreignContext.length>1){let e=Fs.get(n);if(e!==void 0&&this.stack.includes(e))return e}return this.isInForeignContext()?n:n===`image`?`img`:n}onopentagname(e,t){this.endIndex=t,this.emitOpenTag(this.readTagName(e,t))}emitOpenTag(e){if(this.openTagStart=this.startIndex,this.tagname=e,this.htmlMode&&e===`form`&&this.stack.includes(`form`)){this.tagname=``;return}let t=this.htmlMode&&As.get(e);if(t)for(;this.stack.length>0&&t.has(this.stack[0]);)this.popElement(!0);this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(e===`svg`?this.foreignContext.unshift(Is.Svg):e===`math`?this.foreignContext.unshift(Is.MathML):Ps.has(e)&&this.foreignContext.unshift(Is.None))),this.cbs.onopentagname?.(e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){this.startIndex=this.openTagStart,this.attribs&&=(this.cbs.onopentag?.(this.tagname,this.attribs,e),null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=``}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){this.endIndex=t;let n=this.readTagName(e,t);if(this.isVoidElement(n))this.htmlMode&&n===`br`&&(this.cbs.onopentagname?.(`br`),this.cbs.onopentag?.(`br`,{},!0),this.cbs.onclosetag?.(`br`,!1));else{let e=this.stack.indexOf(n);if(e!==-1){for(let t=0;t<e;t++)this.popElement(!0);this.popElement(!1)}else this.htmlMode&&n===`p`&&(this.emitOpenTag(`p`),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.recognizeSelfClosing||this.isInForeignContext()?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}popElement(e){let t=this.stack.shift();this.htmlMode&&(Ns.has(t)||Ps.has(t))&&this.foreignContext.shift(),this.cbs.onclosetag?.(t,e)}closeCurrentTag(e){let t=this.tagname;this.endOpenTag(e),this.stack[0]===t&&this.popElement(!e)}onattribname(e,t){this.startIndex=e;let n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=ws(e)}onattribend(e,t){this.endIndex=t,this.cbs.onattribute?.(this.attribname,this.attribvalue,e===xs.Double?`"`:e===xs.Single?`'`:e===xs.NoValue?void 0:null),this.attribs&&!Object.hasOwn(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=``}getInstructionName(e){let t=e.search(Ls),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.htmlMode?this.lowerCaseTagNames?js:n.slice(0,7):this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){this.endIndex=t,this.cbs.oncomment?.(this.getSlice(e,t-n)),this.cbs.oncommentend?.(),this.startIndex=t+1}oncdata(e,t,n){this.endIndex=t;let r=this.getSlice(e,t-n);!this.htmlMode||this.options.recognizeCDATA?(this.cbs.oncdatastart?.(),this.cbs.ontext?.(r),this.cbs.oncdataend?.()):this.isInForeignContext()?this.cbs.ontext?.(r):(this.cbs.oncomment?.(`[CDATA[${r}]]`),this.cbs.oncommentend?.()),this.startIndex=t+1}onend(){if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=0;e<this.stack.length;e++)this.cbs.onclosetag(this.stack[e],!0)}this.cbs.onend?.()}reset(){this.cbs.onreset?.(),this.tokenizer.reset(),this.tagname=``,this.attribname=``,this.attribvalue=``,this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,this.cbs.onparserinit?.(this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(Is.None),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){if(e===t)return``;for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){if(this.ended){this.cbs.onerror?.(Error(`.write() after done!`));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){if(this.ended){this.cbs.onerror?.(Error(`.end() after done!`));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}},zs=/<\/?([a-zA-Z][a-zA-Z0-9-]{0,})(?:\s+[^>]*)?>/,Bs=e=>{let t=zs.exec(e);return t?{tag:t[1].toLowerCase(),isOpening:!e.startsWith(`</`)}:null},Vs=e=>{if(!e.endsWith(`/>`))return!1;let t=e.slice(0,-2);return/^<[a-zA-Z][^\s/>]*$/.test(t)?!0:/[\s"']$/.test(t)},Hs=e=>{let t=e.raw.match(/<\/?([a-zA-Z][a-zA-Z0-9-]*)/i);if(!t||e.raw.startsWith(`</`))return e;let n=t[1].toLowerCase();if(!Vs(e.raw)&&!Er(n))return e;let r=e.raw.endsWith(`/>`)?e.raw:e.raw.replace(/\s*>$/,`/>`);return{...e,raw:r,tag:n,attributes:Us(e.raw),tokens:[]}},Us=e=>{let t={},n=/([a-zA-Z][\w-]*)=(?:"([^"]*)(?:"|$)|'([^']*)(?:'|$))/g,r;for(;(r=n.exec(e))!==null;){let e=r[1];t[e]=(r[2]??r[3]??``).trim()}let i=e.replace(/[a-zA-Z][\w-]*=(?:"[^"]*(?:"|$)|'[^']*(?:'|$))/g,` `),a=/(?:^|\s)([a-zA-Z][\w-]*?)(?=[\s>]|$)/g;for(;(r=a.exec(i))!==null;){let[,e]=r;e&&!t[e]&&(t[e]=``)}return t},Ws=e=>Object.entries(e).map(([e,t])=>` ${e}="${t.replace(/"/g,`"`)}"`).join(``),Gs=e=>{let t=e.indexOf(`>`);return t!==-1&&e.indexOf(`<`,t+1)!==-1},Ks=e=>{let t=[],n=[t],r=[],i=``,a=()=>{i.length!==0&&(i.trim()&&n[n.length-1].push({type:`text`,raw:i,text:i}),i=``)},o=new Rs({onopentag:(t,i)=>{if(a(),Er(t)||Vs(e.slice(o.startIndex,o.endIndex+1))){n[n.length-1].push({type:`html`,raw:`<${t}${Ws(i)}/>`,tag:t,attributes:i,tokens:[]}),r.push({tag:t,selfClosed:!0});return}let s=[],c={type:`html`,raw:`<${t}${Ws(i)}>`,tag:t,attributes:i};n[n.length-1].push(c),n.push(s),r.push({tag:t,opening:c,childTokens:s,startIndex:o.startIndex})},ontext:e=>{i+=e},onclosetag:(e,t)=>{if(a(),r.length===0)return;let i=r[r.length-1];if(i.tag===e&&(r.pop(),!i.selfClosed))if(n.pop(),t){let e=n[n.length-1];for(let t of i.childTokens)e.push(t)}else{let e=i.opening;e.sourceLength=o.endIndex-i.startIndex+1,e.tokens=i.childTokens}}},{xmlMode:!1,recognizeSelfClosing:!0});return o.write(e),o.end(),a(),t},qs=e=>Gs(e.raw)?Ks(e.raw):[Hs(e)],Js=e=>{let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type!==`html`){t.push(i);continue}if(`tokens`in i&&Array.isArray(i.tokens)){t.push(i);continue}let a=Bs(i.raw);if(!a){t.push(i);continue}if(Vs(i.raw)){t.push(i);continue}if(a.isOpening)n.push({tag:a.tag,startIndex:t.length}),t.push(i);else{let e=n.pop();if(!e||e.tag!==a.tag){t.push(i);continue}let r=e.startIndex,o=t.splice(r+1,t.length-r-1),s=t.pop(),c=s.raw.length+o.reduce((e,t)=>e+(t.sourceLength??t.raw.length),0)+i.raw.length;t.push({type:`html`,raw:s.raw,tag:e.tag,tokens:o,attributes:Us(s.raw),sourceLength:c})}}return t},Ys=(e,t)=>!e||e.length!==t.length?!1:e.every((e,n)=>e===t[n]),Xs=(e,t)=>{let n=e.tokens?Qs(e.tokens):[],r=e;return r.listItemIndex===t&&Ys(e.tokens,n)?r:{...e,listItemIndex:t,tokens:n}},Zs=e=>{let t=e.tokens?Qs(e.tokens):[];return Ys(e.tokens,t)?e:{...e,tokens:t}},Qs=e=>{let t=[];for(let n of e)if(n.type!==`html`&&`tokens`in n&&Array.isArray(n.tokens)){let e=n;e.tokens=Qs(e.tokens),t.push(n)}else if(n.type===`list`)n.items=n.items.map(Xs),t.push(n);else if(n.type===`table`){let e=n;e.header&&=e.header.map(Zs),e.rows&&=e.rows.map(e=>e.map(Zs)),t.push(n)}else if(n.type===`html`){let e=qs(n);for(let n of e)t.push(n)}else t.push(n);return Js(t)},$s=(e,t,n)=>{let r=new H({...t});return Qs(n?r.inlineTokens(e):r.lex(e))},ec=(e,t,n)=>{let r=ns.getTokens(e,t);if(r)return r;let i=$s(e,t,n);if(typeof t.walkTokens==`function`)for(let e of i)t.walkTokens(e);return ns.setTokens(e,t,i),i},tc=async(e,t,n)=>{let r=ns.getTokens(e,t);if(r)return r;let i=$s(e,t,n);if(typeof t.walkTokens==`function`){let e=new ha;e.defaults={...e.defaults,...t};let n=e.walkTokens(i,t.walkTokens);await Promise.all(n)}return ns.setTokens(e,t,i),i},nc=e=>typeof e==`object`&&!!e&&!Array.isArray(e),rc=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)?rc(e):nc(e)),ic=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return Array.isArray(e)||Array.isArray(r)?Array.isArray(e)&&Array.isArray(r)&&ic(e,r):oc(e,r)}),ac=(e,t)=>{let n=new Set([...Object.keys(e),...Object.keys(t)]),r=e,i=t;for(let e of n){let t=r[e],n=i[e],a=rc(t),o=rc(n);if(!(!a&&!o)&&(!a||!o||!ic(t,n)))return!1}return!0},oc=(e,t)=>{if(e.type!==t.type)return!1;if(typeof e.raw==`string`||typeof t.raw==`string`){if(e.raw!==t.raw)return!1}else if(typeof e.text==`string`||typeof t.text==`string`){if(e.text!==t.text)return!1}else return!1;return ac(e,t)},sc=(e,t)=>{let n=Math.min(e.length,t.length),r;for(let i=0;i<n;i++){let n=e[i],a=t[i],o=a;Array.isArray(n)&&Array.isArray(a)?o=sc(n,a):nc(n)&&nc(a)&&(o=cc(n,a)),o!==a&&(r??=t.slice(),r[i]=o)}return r??t},cc=(e,t)=>{if(oc(e,t))return e;let n,r=e,i=t;for(let e of Object.keys(t)){let a=r[e],o=i[e];if(!rc(a)||!rc(o))continue;let s=sc(a,o);if(s!==o){n??={...t};let r=n;r[e]=s}}return n??t},lc=(e,t,n)=>{let r=Math.min(n,e.length,t.length),i;if(r>0){i=Array(t.length);for(let t=0;t<r;t++)i[t]=e[t];for(let e=r;e<t.length;e++)i[e]=t[e]}if(r<e.length&&r<t.length){let n=cc(e[r],t[r]);n!==t[r]&&(i??=t.slice(),i[r]=n)}return i??t},uc=Symbol.for(`svelte-markdown.tailWindowSafe`),dc=e=>typeof e==`function`&&e[uc]===!0,fc=/^ {0,3}(`{3,}|~{3,}).*\n[\s\S]*\n {0,3}\1[ \t]*\n*$/,pc=/\[[^\]\n]+\]\[[^\]\n]*\]/,mc=/\[[^\]\n]+\](?![[(])/,hc=/^\s{0,3}\[[^\]\n]+\]:/m,gc=class{prevTokens=[];prevSource=``;options;tailWindowDisabled;prevHasHtmlSpanMismatch=!1;prevTailWindowBoundary={prefixCount:0,reparseOffset:0};prevHasPotentialReferenceUse=!1;prevHasReferenceDefinition=!1;constructor(e){this.options=e;let t=e.extensions,n=[...t?.block??[],...t?.inline??[]];this.tailWindowDisabled=typeof e.walkTokens==`function`||e.tokenizer!=null||n.some(e=>!dc(e))}getTailWindowBoundary=()=>this.prevTailWindowBoundary;hasHtmlSpanMismatch=e=>{if(e.type!==`html`)return!1;let t=e;return!t.tag||t.raw.endsWith(`/>`)||t.raw.startsWith(`</`)?!1:t.sourceLength==null};getTokenSourceLength=e=>e.sourceLength??e.raw.length;isStableAtSourceEnd=e=>{if(e.type===`space`)return!1;if(e.type===`code`)return fc.test(e.raw);if(e.raw.endsWith(`
|
|
|
|
`))return!0;switch(e.type){case`heading`:case`hr`:return e.raw.endsWith(`
|
|
`);default:return!1}};hasPotentialReferenceUse=e=>!e.includes(`[`)||!e.includes(`]`)?!1:pc.test(e)||mc.test(e);hasPotentialReferenceUseOutsideDefinitions=e=>{if(!e.includes(`[`)||!e.includes(`]`))return!1;for(let t of e.split(`
|
|
`))if(!hc.test(t)&&this.hasPotentialReferenceUse(t))return!0;return!1};hasReferenceDefinition=e=>!e.includes(`[`)||!e.includes(`]`)?!1:hc.test(e);appendIntroducesMatch=(e,t)=>{if(t(e.slice(this.prevSource.length)))return!0;let n=this.prevSource.lastIndexOf(`
|
|
`)+1;return!t(this.prevSource.slice(n))&&t(e.slice(n))};isAppendOnlyUpdate=e=>this.prevSource!==``&&e.startsWith(this.prevSource);hasNewReferenceDefinition=e=>e.startsWith(this.prevSource)?this.appendIntroducesMatch(e,this.hasReferenceDefinition):!1;appendedDefinitionInvalidatesTail=e=>this.prevHasPotentialReferenceUse&&this.hasNewReferenceDefinition(e);canUseTailWindow=(e,t,n=this.isAppendOnlyUpdate(e),r=this.appendedDefinitionInvalidatesTail(e))=>{if(this.tailWindowDisabled||this.prevSource===``||this.prevTokens.length===0||!n||t.reparseOffset<=0||r)return!1;if(this.prevHasReferenceDefinition){let n=e.slice(t.reparseOffset);if(this.hasPotentialReferenceUseOutsideDefinitions(n))return!1}return!0};parseSource=(e,t,n,r)=>{if(!this.canUseTailWindow(e,t,n,r))return{tokens:$s(e,this.options,!1),tailTokens:[],usedTailWindow:!1};let i=$s(e.slice(t.reparseOffset),this.options,!1);return{tokens:[...this.prevTokens.slice(0,t.prefixCount),...i],tailTokens:i,usedTailWindow:!0}};hasAnyHtmlSpanMismatch=e=>e.some(this.hasHtmlSpanMismatch);getNextTailWindowBoundary=(e,t,n)=>{if(e.length===0||n)return{prefixCount:0,reparseOffset:0};let r=e[e.length-1];return this.isStableAtSourceEnd(r)?{prefixCount:e.length,reparseOffset:t}:{prefixCount:e.length-1,reparseOffset:t-this.getTokenSourceLength(r)}};updateCachedState=(e,t,n,r)=>{let i=t.usedTailWindow?this.prevHasHtmlSpanMismatch||this.hasAnyHtmlSpanMismatch(t.tailTokens):this.hasAnyHtmlSpanMismatch(t.tokens);this.prevHasPotentialReferenceUse=n?this.prevHasPotentialReferenceUse||this.appendIntroducesMatch(e,this.hasPotentialReferenceUseOutsideDefinitions):this.hasPotentialReferenceUseOutsideDefinitions(e),this.prevHasReferenceDefinition=n?this.prevHasReferenceDefinition||r:this.hasReferenceDefinition(e),this.prevSource=e,this.prevTokens=t.tokens,this.prevHasHtmlSpanMismatch=i,this.prevTailWindowBoundary=this.getNextTailWindowBoundary(t.tokens,e.length,i)};isReferenceSensitiveUpdate=(e,t,n)=>t?n:(this.prevHasReferenceDefinition||this.hasReferenceDefinition(e))&&(this.hasPotentialReferenceUse(this.prevSource)||this.hasPotentialReferenceUse(e));update=e=>{let t=this.getTailWindowBoundary(),n=this.isAppendOnlyUpdate(e),r=n&&this.appendIntroducesMatch(e,this.hasReferenceDefinition),i=this.prevHasPotentialReferenceUse&&r,a=this.parseSource(e,t,n,i),o=a.tokens;if(typeof this.options.walkTokens==`function`)for(let e of o)this.options.walkTokens(e);let s=this.isReferenceSensitiveUpdate(e,n,i),c=n&&!s,l=0,u=a.usedTailWindow?t.reparseOffset:0;if(!s){let e=Math.min(this.prevTokens.length,o.length);for(;l<e;){let e=this.prevTokens[l],n=o[l];if(!oc(e,n))break;a.usedTailWindow?u!==void 0&&l>=t.prefixCount&&(u+=this.getTokenSourceLength(n)):u!==void 0&&(this.hasHtmlSpanMismatch(n)?u=void 0:u+=this.getTokenSourceLength(n)),l++}}return this.updateCachedState(e,a,n,r),{tokens:o,divergeAt:l,divergeOffset:u,canReuse:c,usedTailWindow:a.usedTailWindow}}},_c=e=>typeof e==`object`&&!!e,vc=e=>_c(e)&&typeof e.id==`string`&&typeof e.text==`string`,yc=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n),i=e[n];t+=/[A-Za-z0-9_-]/.test(i)?i:`~${r.toString(16).padStart(4,`0`)}`}return t},bc=(e,t=1)=>{let n=`fnref-${yc(e)}`;return t===1?n:`${n}:ref:${t}`},xc=e=>{let t=new WeakMap,n=new WeakMap,r=new Map,i=new Map,a=new Set,o=[],s=e=>{if(Array.isArray(e))for(let t of e)Array.isArray(t)?s(t):_c(t)&&c(t)},c=e=>{if(e.type===`footnoteRef`&&typeof e.id==`string`){let n=(r.get(e.id)??0)+1,a=bc(e.id,n);r.set(e.id,n),t.set(e,Object.freeze({referenceId:a}));let o=i.get(e.id);o?o.push(a):i.set(e.id,[a])}else if(e.type===`footnoteSection`&&Array.isArray(e.footnotes)){let t=[];for(let n of e.footnotes)!vc(n)||a.has(n.id)||(a.add(n.id),t.push({id:n.id,text:n.text}));o.push({token:e,footnotes:t})}e.type!==`image`&&e.type!==`code`&&e.type!==`codespan`&&(s(e.tokens),s(e.items),s(e.header),s(e.rows))};s(e);for(let e of o){let t=e.footnotes.map(e=>Object.freeze({...e,backrefs:Object.freeze([...i.get(e.id)??[]])}));n.set(e.token,Object.freeze({footnotes:Object.freeze(t)}))}return Object.freeze({referenceProps:t,sectionProps:n})},Sc=1e6,Cc=e=>typeof e==`object`&&!!e&&`offset`in e,wc=(e,t,{currentBufferLength:n=0,maxOffsetGap:r=Sc}={})=>typeof e==`string`?t===`offset`?{kind:`drop`,message:`offset mode active, string chunk dropped. Call resetStream() before switching streaming input modes.`}:{kind:`append`,value:e,nextMode:`append`}:!Cc(e)||typeof e.value!=`string`?{kind:`drop`,message:`Invalid chunk object passed to writeChunk(); expected { value: string, offset: number }.`}:!Number.isSafeInteger(e.offset)||e.offset<0?{kind:`drop`,message:`Invalid offset chunk passed to writeChunk(); offset must be a non-negative safe integer.`}:t===`append`?{kind:`drop`,message:`append mode active, offset chunk dropped. Call resetStream() before switching streaming input modes.`}:e.offset-n>r?{kind:`drop`,message:`offset chunk skipped: offset ${e.offset} is more than ${r} chars beyond the current buffer length (${n}).`}:{kind:`offset`,chunk:e,nextMode:`offset`},Tc=(e,t)=>e+t,Ec=(e,t)=>t===``?{committed:!1,sourceBuffer:e,pendingBuffer:t}:{committed:!0,sourceBuffer:e+t,pendingBuffer:``},Dc=(e,t=256)=>e.length>=t,Oc=(e,{value:t,offset:n},{maxOffsetGap:r=Sc}={})=>{let i=Math.max(0,n-e.length),a=Math.min(i,Math.max(0,r)),o=n>e.length?e.length+a:n,s=a>0?e+` `.repeat(a):e,c=s.slice(0,o),l=s.slice(o+t.length);return c+t+l},kc=new Set([`$$slots`,`$$events`,`$$legacy`,`source`,`streaming`,`streamId`,`renderers`,`options`,`isInline`,`parsed`,`extensions`,`sanitizeUrl`,`sanitizeAttributes`]);function Ac(e,t){ne(t,!0);let r=y(t,`source`,19,()=>[]),i=y(t,`streaming`,3,!1),a=y(t,`streamId`,3,void 0),o=y(t,`renderers`,19,()=>({})),s=y(t,`options`,19,()=>({})),c=y(t,`isInline`,3,!1),l=y(t,`parsed`,3,()=>{}),u=y(t,`extensions`,19,()=>[]),d=y(t,`sanitizeUrl`,3,bo),f=y(t,`sanitizeAttributes`,3,xo),p=re(t,kc),m=b(()=>Wo(u())),h=b(()=>Jo(s(),u())),g=new kr,_=Oo();ae(So,_);let v=b(()=>Ko(u())),x,S,C,w,T,D=``,O=``,k=null,A=null,ie=null,N=E(te([])),oe=0,se=0,ce=e=>{console.warn(`[svelte-markdown] ${e}`)},le=()=>{x=void 0,S=void 0,C=void 0},F=()=>{A&&=(A.kind===`raf`&&typeof cancelAnimationFrame==`function`?cancelAnimationFrame(A.id):A.kind===`timeout`&&clearTimeout(A.id),null)},I=()=>!x||S!==s()||C!==u(),ue=(e,t=!1)=>{(t||I())&&(x=new gc(n(h)),S=s(),C=u());let r=x;if(!r)return;let{tokens:i,divergeAt:a,divergeOffset:o,canReuse:c}=r.update(e);j(N,c?lc(n(N),i,a):i,!0);let l=c&&o!==void 0;oe=l?a:0,se=l?o:0},L=()=>{let e=Ec(D,O);return e.committed?(D=e.sourceBuffer,O=e.pendingBuffer,!0):!1},R=(e=!1)=>{if(F(),k!==null){let t=k;k=null,O=``,D=t,ue(t,e);return}L()&&ue(D,e)},de=()=>{if(!(A||O===``&&k===null)){if(typeof window<`u`&&typeof window.requestAnimationFrame==`function`){A={kind:`raf`,id:window.requestAnimationFrame(()=>{A=null,R()})};return}A={kind:`timeout`,id:setTimeout(()=>{A=null,R()},16)}}},fe=()=>{F(),O=``,k=null,ie=null,D=``,oe=0,se=0},pe=(e=``)=>{if(fe(),D=e,e===``){le(),j(N,[],!0);return}ue(e,!0)},me=e=>{if(w=e,Array.isArray(e)){fe(),le(),j(N,[...e],!0);return}let t=e,n=x!==void 0&&D!==``&&t!==``&&t.length>D.length&&t.startsWith(D);if(n){O=``,k=t,de();return}if(fe(),t===``){le(),j(N,[],!0);return}D=t,ue(t,!n)},he=()=>{if(Array.isArray(r())){me(r());return}w=r(),pe(r())},ge=e=>i()?n(v)?(ce(`${e}() is unavailable when async extensions are used; call dropped.`),!1):!Array.isArray(r())||(ce(`${e}() requires a string-backed source; token array sources are not supported.`),!1):(ce(`${e}() is only available when streaming={true}; call dropped.`),!1),_e=e=>{if(k!==null&&R(),O=Tc(O,e),Dc(O)){R();return}de()},ve=e=>{D=Oc(D,e,{maxOffsetGap:Sc}),ue(D)};function ye(e){if(!ge(`writeChunk`))return;T!==a()&&(T=a(),he()),k!==null&&R();let t=wc(e,ie,{currentBufferLength:D.length,maxOffsetGap:Sc});if(t.kind===`drop`){ce(t.message);return}if(ie=t.nextMode,t.kind===`append`){_e(t.value);return}ve(t.chunk)}function be(e=``){ge(`resetStream`)&&pe(e)}M(()=>()=>{F()}),M(()=>{if(!i()||n(v)){fe(),x&&le(),w=r(),T=a(),i()&&n(v)&&ce(`streaming prop is ignored when async extensions are used. Remove async extensions or set streaming={false} to silence this warning.`);return}if(T!==a()){T=a(),he();return}if(w!==r()){me(r());return}if(!Array.isArray(r())&&I()){if(k!==null){R(!0);return}if(O!==``){R(!0);return}if(D===``){le(),j(N,[],!0);return}ue(D,!0)}});let xe=b(()=>{if(!n(v)&&!i())return Array.isArray(r())?r():r()===``?[]:ec(r(),n(h),c())}),Se=E(void 0),Ce=0;M(()=>{if(!n(v))return;if(Array.isArray(r())){j(Se,r(),!0);return}if(r()===``){j(Se,[],!0);return}let e=r(),t=n(h),i=c(),a=++Ce;tc(e,t,i).then(e=>{a===Ce&&j(Se,e,!0)}).catch(e=>{a===Ce&&(console.error(`[svelte-markdown] async walkTokens failed:`,e),j(Se,[],!0))})});let we=b(()=>i()&&!n(v)?n(N):n(v)?n(Se):n(xe)),Te=b(()=>{if(!n(we))return n(we);let e=Array.isArray(r())?void 0:i()&&!n(v)?D:r(),t=i()&&!n(v)?{startIndex:oe,startOffset:se}:{};return _.prepareTokensForRender(n(we),n(h),{source:e,...t})}),Ee=b(()=>{if(!n(Te))return;let e=n(m).includes(`footnoteRef`)||n(m).includes(`footnoteSection`);if(!(!Array.isArray(r())&&!e))return xc(n(Te))});M(()=>{n(Te)&&l()(n(Te))});let De=b(()=>Fo(o())),Oe=b(()=>Io(n(m))),ke=b(()=>Lo(p,n(Oe))),Ae=b(()=>Ro(p)),je=b(()=>zo(p,n(Oe)));var Me={writeChunk:ye,resetStream:be};return Mo(e,P({get tokens(){return n(Te)},get footnoteMetadata(){return n(Ee)}},()=>n(je),{get options(){return n(h)},slug:e=>g.slug(e),get renderers(){return n(De)},get snippetOverrides(){return n(ke)},get htmlSnippetOverrides(){return n(Ae)},get sanitizeUrl(){return d()},get sanitizeAttributes(){return f()}})),ee(Me)}var jc=Ac,Mc=l(`<div class="message-content reasoning"><!></div>`),Nc=l(`<div class="tool text-sm mt-2 py-1 px-2 rounded"> </div>`),Pc=l(`<div class="message-content"><!></div>`),Fc=l(`<div><!> <!></div>`),Ic=l(`<div class="animate-pulse">...</div>`),Lc=l(`<div class="h-full flex flex-col gap-2"><div id="history" class="flex-1 container overflow-auto"><!> <!></div> <div id="prompt" class="container"><form class="request flex w-full"><input class="chatinput w-full flex-1 focus:outline-hidden focus:shadow-none focus:ring-0" type="text" placeholder="..."/> <button class="chatbutton">Go</button></form></div></div>`);function Rc(i,c){ne(c,!0);let l=E(``),u=te(h(()=>c.data.chatWithMessage.messages??[])),d=E(!1);N(async()=>{de.state.prompt&&(console.log(de.state.prompt),await _(de.state.prompt)),await o(),p.scrollTop=p.scrollHeight});let p,m,_=async e=>{j(l,``);let t=``,r=``;j(d,!0);for await(let i of pe.createChatMessage(c.data.spaceId,c.data.chatId,{prompt:e})){if(n(d)&&i.role===`assistant`&&j(d,!1),i.done){document.querySelectorAll(`div.reasoning:not(.hidden)`).forEach(e=>e.classList.add(`hidden`));return}if(i.role!=t||i.toolName!=r){let e={id:``+new Date().getTime(),role:i.role,content:``,reasoning:``};i.toolName&&(e.toolcalls=[{ID:`0`,Type:`Function`,Function:{Name:i.toolName,Arguments:``}}]),i.reasoning?e.reasoning=i.content:e.content=i.content,u.push(e),t=i.role,r=i.toolName}else i.reasoning?u[u.length-1].reasoning+=i.content:u[u.length-1].content+=i.content;i.done&&document.querySelectorAll(`div.reasoning:not(.hidden)`).forEach(e=>e.classList.add(`hidden`)),p.scrollTop=p.scrollHeight}},y=async()=>{p.scrollTop=p.scrollHeight,await _(n(l)),m.focus()};var b=Lc(),S=g(b),w=g(S);r(w,17,()=>u,e=>e.id,(r,i)=>{var a=Fc(),o=g(a),c=e=>{var t=Mc();jc(g(t),{get source(){return n(i).reasoning},streaming:!0}),F(t),D(e,t)};O(o,e=>{n(i).reasoning&&e(c)});var l=e(o,2),u=e=>{var r=Nc(),a=g(r);F(r),s(()=>t(a,`⚒️ Appel de l'outil ${n(i).toolcalls[0].Function.Name??``}`)),D(e,r)},d=e=>{var t=Pc();jc(g(t),{get source(){return n(i).content},streaming:!0}),F(t),D(e,t)};O(l,e=>{n(i).toolcalls!=null&&n(i).toolcalls.length>0?e(u):e(d,-1)}),F(a),s(()=>le(a,1,ue([`message`,`rounded`,n(i).role]))),D(r,a)});var T=e(w,2),k=e=>{var t=Ic();D(e,t)};O(T,e=>{n(d)&&e(k)}),F(S),C(S,e=>p=e,()=>p);var A=e(S,2),re=g(A),ae=g(re);ie(ae),a(()=>se(ae,()=>n(l),e=>j(l,e))),x(ae,e=>fe?.(e)),C(ae,e=>m=e,()=>m),v(2),F(re),F(A),F(b),f(`submit`,re,y),D(i,b),ee()}export{Rc as component,me as universal}; |