var SZ=Object.create,{getPrototypeOf:gZ,defineProperty:X$,getOwnPropertyNames:K6,getOwnPropertyDescriptor:EZ}=Object,G6=Object.prototype.hasOwnProperty;function q6($){return this[$]}var xZ,TZ,fZ=($,J,Z)=>{var Q=$!=null&&typeof $=="object";if(Q){var V=J?xZ??=new WeakMap:TZ??=new WeakMap,X=V.get($);if(X)return X}Z=$!=null?SZ(gZ($)):{};let Y=J||!$||!$.k?X$(Z,"default",{value:$,enumerable:!0}):Z;for(let G of K6($))G6.call(Y,G)||X$(Y,G,{get:q6.bind($,G),enumerable:!0});return Q&&V.set($,Y),Y},CZ=$=>{var J=(Y6??=new WeakMap).get($),Z;if(J)return J;if(J=X$({},"__esModule",{value:!0}),$&&typeof $=="object"||typeof $=="function")for(var Q of K6($))G6.call(J,Q)||X$(J,Q,{get:q6.bind($,Q),enumerable:!(Z=EZ($,Q))||Z.enumerable});return Y6.set($,J),J},Y6,hZ=$=>$;function mZ($,J){this[$]=hZ.bind(null,J)}var uZ=($,J)=>{for(var Z in J)X$($,Z,{get:J[Z],enumerable:!0,configurable:!0,set:mZ.bind(J,Z)})},RJ={};uZ(RJ,{slugify:()=>x0,sanitizer:()=>g9,parser:()=>P$,default:()=>yJ,compiler:()=>QZ,astToJSX:()=>i$,RuleType:()=>v,MarkdownProvider:()=>wJ,MarkdownContext:()=>a$,Markdown:()=>VZ}),module.exports=CZ(RJ);var P9=require("solid-js"),r$=fZ(require("solid-js/h")),I=32,w=9,H9=13,E=10,a=96,M0=126,W0=91,a0=94,d=62,Y9=35,Y$=37,u=45,T0=61,_0=92,O0=42,G0=95,e=60,K$=64,u0=93,S0=33,E$=38,g0=58,x$=70,D9=102,h9=104,F9=119,m9=116,H$=112,T$=115,U6=160,F6=12,W6=44,f$=59,a9=63,p0=46,H0=47,L9=39,B9=34,j9=43,N0=124,S9=123,D$=125,n0=40,s0=41,n9=30,B$=31,o=48,r=57,p=65,c=90,Y0=97,q0=122,s9=128,o0=32,pZ={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},v=pZ,h$=require("markdown-to-jsx/entities");function M6($){if(!O6($,"---"))return null;let J=3;for(;J<$.length&&($[J]===" "||$[J]==="	");)J++;if(J<$.length&&$[J]==="\r"&&J++,J>=$.length||$[J]!==`
`)return null;J++;let Z=!1;for(;J<$.length;){let Q=J;for(;J<$.length&&$[J]!==`
`&&$[J]!=="\r";)J++;if(J>=$.length)break;let V=J;if($[J]==="\r"&&J++,J<$.length&&$[J]===`
`&&J++,O6($,"---",Q))return{endPos:J,hasValidYaml:Z};if(!Z){let X=aZ($,Q,V);if(X<V){let Y=$.charCodeAt(X);if(Y>=Y0&&Y<=q0||Y>=p&&Y<=c||Y>=o&&Y<=r||Y===G0){for(X++;X<V&&(Y=$.charCodeAt(X),Y>=Y0&&Y<=q0||Y>=p&&Y<=c||Y>=o&&Y<=r||Y===G0||Y===u||Y===p0);)X++;X<V&&$.charCodeAt(X)===g0&&(X++,X>=V?Z=!0:(Y=$.charCodeAt(X),(Y===I||Y===w)&&(Z=!0)))}}}}return null}var dZ=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,cZ={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",viewbox:"viewBox"};function gJ($){var J={};for(var Z in $){var Q=Z.toLowerCase(),V=cZ[Q];if(V)J[V]=$[Z];else{var X=Z.indexOf(":");X!==-1?J[Z.slice(0,X)+Z[X+1].toUpperCase()+Z.slice(X+2)]=$[Z]:J[Z]=$[Z]}}return J}var A6=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function t9($){return $.indexOf("&")===-1?$:$.replace(dZ,(J,Z)=>{var Q=h$.decodeEntity(Z);if(Q)return Q;if(Z[0]==="#"){var V=Z[1]==="x"||Z[1]==="X"?parseInt(Z.slice(2),16):parseInt(Z.slice(1),10);return V===0||V>=55296&&V<=57343||V>1114111?"\uFFFD":V<=65535?String.fromCharCode(V):String.fromCharCode(55296+(V-65536>>10),56320+(V-65536&1023))}return J})}var z6=/(javascript|vbscript|data(?!:image)):/i;function g9($){if(z6.test($))return null;if($.indexOf("%")===-1)return $;try{let J=decodeURIComponent($).replace(/[^A-Za-z0-9/:]/g,"");if(z6.test(J))return null}catch{return null}return $}var E0={},f0,w0;for(f0=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],w0=0;w0<f0.length;w0++)E0[f0[w0]]="a";for(E0[231]=E0[199]="c",E0[240]=E0[208]="d",f0=[200,201,202,203,233,232,234,235],w0=0;w0<f0.length;w0++)E0[f0[w0]]="e";for(f0=[207,239,206,238,205,237,204,236],w0=0;w0<f0.length;w0++)E0[f0[w0]]="i";for(E0[209]=E0[241]="n",f0=[248,216,339,338,213,245,212,244,211,243,210,242],w0=0;w0<f0.length;w0++)E0[f0[w0]]="o";for(f0=[220,252,219,251,218,250,217,249],w0=0;w0<f0.length;w0++)E0[f0[w0]]="u";E0[376]=E0[255]=E0[221]=E0[253]="y";function x0($){for(var J="",Z=-1,Q=$.length,V=0;V<Q;V++){var X=$.charCodeAt(V);if(X>=Y0&&X<=q0||X>=o&&X<=r){Z<0&&(Z=V);continue}if(X>=p&&X<=c){Z>=0&&(J+=$.slice(Z,V),Z=-1),J+=String.fromCharCode(X+o0);continue}if(X===I||X===u){Z>=0&&(J+=$.slice(Z,V),Z=-1),J+="-";continue}Z>=0&&(J+=$.slice(Z,V),Z=-1);var Y=E0[X];Y&&(J+=Y)}return Z>=0&&(J+=$.slice(Z)),J}function O6($,J,Z){return $.startsWith(J,Z)}var H6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","set"]);function d9($){let J=$.toLowerCase();if(H6.has(J))return!0;let Z=J.indexOf(":");return Z!==-1?(J=J.slice(Z+1),H6.has(J)):!1}var M9=1,D6=2,p9=4,B6=8,lZ=16,t0=32,A9=64,j6=1,oZ=2,rZ=3,iZ=4,_6=(function(){var $=new Uint8Array(128),J;for($[w]=M9,$[E]=M9|D6,$[F6]=M9,$[H9]=M9|D6,$[I]=M9,J=S0;J<=H0;J++)$[J]=p9;for(J=g0;J<=K$;J++)$[J]=p9;for(J=W0;J<=a;J++)$[J]=p9;for(J=S9;J<=M0;J++)$[J]=p9;for(J=o;J<=r;J++)$[J]=lZ;for(J=p;J<=c;J++)$[J]=B6;for(J=Y0;J<=q0;J++)$[J]=B6;return $})(),EJ=(function(){let $=new Uint8Array(128);return $[_0]=oZ,$[W0]=iZ,$[O0]=$[G0]=$[M0]=$[T0]=rZ,$[a]=$[e]=$[K$]=$[u0]=$[E]=$[I]=$[S0]=j6,$[D9]=$[h9]=$[F9]=j6,$})(),v6=/[\p{P}\p{S}]/u,N6=/\p{Zs}/u,u9=[];function m$($){var J=$.indexOf("\r"),Z=$.indexOf("\0");if(J===-1&&Z===-1)return $;var Q=$.length;u9.length=0;var V=0,X=0;for(J===-1?X=Z:Z===-1?X=J:X=J<Z?J:Z;X<Q;X++){var Y=$.charCodeAt(X);Y===H9?(V<X&&u9.push($.slice(V,X)),X+1<Q&&$.charCodeAt(X+1)===E&&X++,u9.push(`
`),V=X+1):Y===0&&(V<X&&u9.push($.slice(V,X)),u9.push("\uFFFD"),V=X+1)}return V<Q&&u9.push($.slice(V)),u9.join("")}function aZ($,J,Z){let Q=Z??$.length;for(;J<Q&&($[J]===" "||$[J]==="	");)J++;return J}function xJ($){if(!$)return!1;for(var J in $)return!0;return!1}function e9($,J,Z){for(var Q=$,V=J.split("."),X=0;X<V.length&&(Q=Q?.[V[X]],Q!==void 0);)X++;return Q||Z}function I6($){for(var J=!1,Z=0;Z<$.length;Z++){var Q=$.charCodeAt(Z);if(Q<=I||Q===B9||Q===Y$||Q===e||Q===d||Q===W0||Q===_0||Q===u0||Q===a0||Q===a||Q>=123){J=!0;break}}if(!J)return $;for(var V="",Z=0;Z<$.length;Z++){var Q=$.charCodeAt(Z);if(Q===Y$&&Z+2<$.length){var X=$.charCodeAt(Z+1),Y=$.charCodeAt(Z+2);if((X>=o&&X<=r||X>=p&&X<=x$||X>=Y0&&X<=D9)&&(Y>=o&&Y<=r||Y>=p&&Y<=x$||Y>=Y0&&Y<=D9)){V+=$[Z]+$[Z+1]+$[Z+2],Z+=2;continue}}V+=encodeURI($[Z])}return V}function P6(...$){return $.filter(Boolean).join(" ")}function TJ($,J){if(!J)return $;let Z=e9(J,$,void 0);return typeof Z=="string"?Z:typeof Z=="object"&&Z.component?Z.component:$}function fJ($,J){if(!J)return{};let Z=e9(J,$,void 0);return typeof Z=="object"&&Z.props?Z.props:{}}var nZ=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),j$=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function u$($){return nZ.has($.toLowerCase())}function CJ($){return j$.lastIndex=0,j$.test($)}function p$($){return j$.lastIndex=0,$.replace(j$,function(J,Z,Q,V){return"&lt;"+Z+Q+V})}var h6=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,m6=/^<[A-Z]/,d$=["script","pre","style","textarea"],U$=new Set(d$),sZ=/<(?:pre|script|style|textarea)\b/i,w6=/<(?:pre|script|style|textarea)\b/iy,R6=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,y6=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,u6=new Uint8Array(128);(function(){for(var $=[a,O0,G0,M0,T0,W0,S0,e,_0,B$,h9,F9,D9],J=0;J<$.length;J++)u6[$[J]]=1})();var k6=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function p6($){return U$.has($)}function cJ($){return sZ.test($)}function d6($,J,Z){for(var Q=J,V=Z;Q<V&&($.charCodeAt(Q)===I||$.charCodeAt(Q)===w);)Q++;if(Q>=V)return!1;$.charCodeAt(Q)===N0&&Q++;for(var X=0;Q<V;){for(;Q<V&&($.charCodeAt(Q)===I||$.charCodeAt(Q)===w);)Q++;if(Q>=V)break;if($.charCodeAt(Q)===N0&&X>0){for(var Y=Q+1;Y<V&&($.charCodeAt(Y)===I||$.charCodeAt(Y)===w);)Y++;if(Y>=V)return!0}if($.charCodeAt(Q)===g0&&Q++,Q>=V||$.charCodeAt(Q)!==u)return!1;for(;Q<V&&$.charCodeAt(Q)===u;)Q++;for(Q<V&&$.charCodeAt(Q)===g0&&Q++,X++;Q<V&&($.charCodeAt(Q)===I||$.charCodeAt(Q)===w);)Q++;if(Q<V)if($.charCodeAt(Q)===N0)Q++;else return!1}return X>0}function v9($,J){if($.charCodeAt(J)!==e)return null;let Z=J+1,Q=$.length,V=!1;$.charCodeAt(Z)===H0&&(Z++,V=!0);let X=Z,Y=$.charCodeAt(Z);if(!(Y>=Y0&&Y<=q0||Y>=p&&Y<=c))return null;for(;Z<Q&&($.charCodeAt(Z)>=Y0&&$.charCodeAt(Z)<=q0||$.charCodeAt(Z)>=p&&$.charCodeAt(Z)<=c||$.charCodeAt(Z)>=o&&$.charCodeAt(Z)<=r||$.charCodeAt(Z)===u);)Z++;let G=$.slice(X,Z);if(!G)return null;let K=Z;for(;Z<Q&&($.charCodeAt(Z)===I||$.charCodeAt(Z)===w||$.charCodeAt(Z)===E);)Z++;let q=$.slice(K,Z);if(Z===K&&Z<Q){var U=$.charCodeAt(Z);if(U!==d&&U!==H0)return null}let F=Z,O={},z=!1;for(;Z<Q;){let L=$.charCodeAt(Z);if(L===d){let k=$.slice(F,Z);return{tag:G,attrs:O,selfClosing:!1,end:Z+1,rawAttrs:k,whitespaceBeforeAttrs:q,isClosing:V,hasSpaceBeforeSlash:z}}if(L===I||L===w||L===E){Z++;continue}if(L===H0&&Z+1<Q&&$.charCodeAt(Z+1)===d){let k=$.slice(F,Z);return z=Z>F&&$.charCodeAt(Z-1)===I,{tag:G,attrs:O,selfClosing:!0,end:Z+2,rawAttrs:k,whitespaceBeforeAttrs:q,isClosing:V,hasSpaceBeforeSlash:z}}var j=Z,D=$.charCodeAt(Z);if(!(D>=Y0&&D<=q0||D>=p&&D<=c||D===G0||D===g0))return null;for(Z++;Z<Q;){var W=$.charCodeAt(Z);if(W>=Y0&&W<=q0||W>=p&&W<=c||W>=o&&W<=r||W===G0||W===p0||W===g0||W===u)Z++;else break}for(var B=$.slice(j,Z);Z<Q&&($.charCodeAt(Z)===I||$.charCodeAt(Z)===w);)Z++;if($.charCodeAt(Z)!==T0){O[B]="";continue}for(Z++;Z<Q&&($.charCodeAt(Z)===I||$.charCodeAt(Z)===w);)Z++;var H=$.charCodeAt(Z);if(H===B9||H===L9){Z++;for(var M=Z;Z<Q&&$.charCodeAt(Z)!==H;)Z++;if(Z>=Q)return null;if(O[B]=$.slice(M,Z),Z++,Z<Q){var R=$.charCodeAt(Z);if(R!==I&&R!==w&&R!==E&&R!==d&&R!==H0)return null}}else if(H===S9){var N=1,M=Z;for(Z++;Z<Q&&N>0;){var W=$.charCodeAt(Z);W===S9?N++:W===D$&&N--,Z++}O[B]=$.slice(M,Z)}else{for(var M=Z;Z<Q;){var A=$.charCodeAt(Z);if(A===I||A===w||A===d||A===E||A===B9||A===L9||A===T0||A===e||A===a)break;Z++}if(Z===M)return null;O[B]=$.slice(M,Z)}}return null}function c6($,J,Z){if(!Z.streaming&&!Z.optimizeForStreaming&&$.indexOf("[")===-1)return!1;for(var Q=0,V=$.length,X=!1,Y=!1;Q<V;){for(var G=$.indexOf(`
`,Q),K=G<0?V:G,q=Q,U=0;q<K&&U<4;)if($.charCodeAt(q)===I)U++,q++;else if($.charCodeAt(q)===w)U+=4,q++;else break;if(q>=K){X=!1,Q=G<0?V:G+1;continue}if(U<4){var F=$.charCodeAt(q);if(F===a||F===M0){for(var O=F,z=0,j=q;j<K&&$.charCodeAt(j)===O;)z++,j++;if(z>=3){var D=!0;if(O===a){for(var W=j;W<K;W++)if($.charCodeAt(W)===a){D=!1;break}}if(D){X=!1;for(var B=G<0?V:G+1;B<V;){for(var H=B,M=0;H<V&&M<4;){var R=$.charCodeAt(H);if(R===I)M++,H++;else if(R===w)M+=4,H++;else break}if(M<4&&H<V&&$.charCodeAt(H)===O){for(var N=0;H<V&&$.charCodeAt(H)===O;)N++,H++;if(N>=z){for(;H<V&&($.charCodeAt(H)===I||$.charCodeAt(H)===w);)H++;if(H>=V||$.charCodeAt(H)===E){Q=H>=V?V:H+1;break}}}for(;B<V&&$.charCodeAt(B)!==E;)B++;B<V&&B++}B>=V&&(Q=V,Y=!0);continue}}}}for(var A=q;A<K&&$.charCodeAt(A)===d;){A++,A<K&&$.charCodeAt(A)===I&&A++;for(var L=0;A<K&&L<4;)if($.charCodeAt(A)===I)L++,A++;else if($.charCodeAt(A)===w)L+=4,A++;else break;if(L>=4)break;X=!1}if(!X&&U<4&&A<K&&$.charCodeAt(A)===W0&&!(A+1<V&&$.charCodeAt(A+1)===a0)){var k=l6($,A,J);if(k){Q=k,X=!1;continue}}var P=$.charCodeAt(q);if(P===Y9&&U<4)X=!1;else if(U<4&&(P===u||P===O0||P===G0)){for(var b=q,y=0;b<K;){var S=$.charCodeAt(b);if(S===P)y++;else if(S!==I&&S!==w)break;b++}X=!(y>=3&&b>=K)}else X=!0;Q=G<0?V:G+1}return Y}function l6($,J,Z){let Q=$.length;if($.charCodeAt(J)!==W0)return null;let V=J+1<Q&&$.charCodeAt(J+1)===a0,X=J+1;for(;X<Q;){var Y=$.charCodeAt(X);if(Y===u0){X++;break}if(Y===W0)return null;Y===_0&&X+1<Q&&X++,X++}if(X>Q||$.charCodeAt(X-1)!==u0)return null;let G=$.slice(J+1,X-1);if(G.length>999)return null;let K=M$(G);if(!K||X>=Q||$.charCodeAt(X)!==g0)return null;X++;let q=!1;for(;X<Q;){let T=$.charCodeAt(X);if(T===I||T===w)X++;else if(T===E&&!q)q=!0,X++;else break}if(V){let T=$.indexOf(`
`,X),C=T<0?Q:T,f=$.slice(X,C).trim();return Z[K]={target:f,title:void 0},T<0?Q:T+1}var U;if(X<Q&&$.charCodeAt(X)===e){X++;for(var F=X;X<Q&&$.charCodeAt(X)!==d&&$.charCodeAt(X)!==E;)$.charCodeAt(X)===_0&&X+1<Q&&X++,X++;if(X>=Q||$.charCodeAt(X)!==d)return null;U=$.slice(F,X),X++;for(var O=$.indexOf(`
`,X),z=O<0?Q:O,j=X;j<z&&($.charCodeAt(j)===I||$.charCodeAt(j)===w);)j++;if(j<z){if(j===X)return null;var D=$.charCodeAt(j);if(D!==B9&&D!==L9&&D!==n0)return null}}else{for(var F=X,W=0;X<Q;){var Y=$.charCodeAt(X);if(Y===n0)W++;else if(Y===s0){if(W===0)break;W--}else{if(Y===I||Y===w||Y===E)break;Y===_0&&X+1<Q&&X++}X++}if(U=$.slice(F,X),!U)return null}for(;X<Q&&($.charCodeAt(X)===I||$.charCodeAt(X)===w);)X++;var B=$.indexOf(`
`,X),H=B<0?Q:B,M,R=!1,N=X,A=X;if(X===H&&X<Q)for(A=X+1;A<Q&&($.charCodeAt(A)===I||$.charCodeAt(A)===w);)A++;if(A<Q){var L=$.charCodeAt(A);if(L===B9||L===L9||L===n0){for(var k=L===n0?41:L,P=A+1,b=P;P<Q;){var y=$.charCodeAt(P);if(y===k){for(var S=P+1;S<Q&&($.charCodeAt(S)===I||$.charCodeAt(S)===w);)S++;(S>=Q||$.charCodeAt(S)===E)&&(M=$.slice(b,P),R=!0,N=S<Q?S+1:Q);break}if(y===_0&&P+1<Q){P+=2;continue}if(y===E&&P+1<Q&&$.charCodeAt(P+1)===E)break;P++}if(!R&&A===X)return null}}if(R)return Z[K]||(Z[K]={target:Z$(U),title:M!==void 0?t9(Z$(M)):M}),N;for(;X<H&&($.charCodeAt(X)===I||$.charCodeAt(X)===w);)X++;return X<H?null:(Z[K]||(Z[K]={target:Z$(U),title:M}),B<0?Q:B+1)}var h0=new Uint8Array(_6);for(h0[B$]=M9,h0[Y9]|=t0,h0[d]|=t0,h0[u]|=t0|A9,h0[j9]|=t0,h0[O0]|=t0|A9,h0[G0]|=t0|A9,h0[a]|=t0|A9,h0[M0]|=t0|A9,h0[e]|=t0|A9,h0[W0]|=A9,h0[S0]|=A9,h0[N0]|=t0,G$=o;G$<=r;G$++)h0[G$]|=t0;var G$;function L6($){if($.indexOf("[")<0&&$.indexOf("]")<0)return!1;for(var J=0;J<$.length;J++){if($.charCodeAt(J)===_0){J++;continue}if($.charCodeAt(J)===W0||$.charCodeAt(J)===u0)return!0}return!1}function M$($){var J=$.replace(/\s+/g," ").trim();return J.indexOf("\u1E9E")!==-1?J.replace(/\u1E9E/g,"ss").toLowerCase():J.toLowerCase()}function o$($){return $<s9?h0[$]:$===U6?M9:0}function Z$($){return $.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}var o6=null,r6=-1,i6=-1;function J0($,J){if(J===r6&&$===o6)return i6;var Z=$.indexOf(`
`,J);return Z<0?$.length:Z}function i($,J){let Z=J0($,J);return Z<$.length?Z+1:Z}function q$($,J,Z){for(;J<Z;){let Q=$.charCodeAt(J);if(Q!==I&&Q!==w)break;J++}return J}function S6($,J){let Z=i($,J);for(;Z<$.length;){let Q=J0($,Z);if(d0($,Z,Q))return Z;Z=i($,Z)}return $.length}function I9($,J,Z,Q){let V=0;for(;J+V<Z&&$.charCodeAt(J+V)===Q;)V++;return V}var $0=0,t=0;function A0($,J,Z){for($0=0,t=0;J+t<Z;){let Q=$.charCodeAt(J+t);if(Q===w)$0+=4-$0%4;else if(Q===I)$0++;else break;t++}}function d0($,J,Z){return q$($,J,Z)>=Z}function a6($,J,Z,Q){let V=J0($,J);if(A0($,J,V),$0>3)return null;let X=J+t;if($.charCodeAt(X)!==Y9)return null;let Y=I9($,X,V,35);if(Y<1||Y>6||(X+=Y,X<V&&$.charCodeAt(X)!==I&&$.charCodeAt(X)!==w))return null;X=q$($,X,V);for(var G=V;G>X&&$.charCodeAt(G-1)===I;)G--;for(var K=G;G>X&&$.charCodeAt(G-1)===Y9;)G--;if(G<K)if(G===X||$.charCodeAt(G-1)===I)for(;G>X&&$.charCodeAt(G-1)===I;)G--;else G=K;let q=$.slice(X,G),U=C0(q,0,q.length,Z,Q),O=(Q?.slugify||x0)(q);return{node:{type:v.heading,level:Y,children:U,id:O},end:i($,V)}}function tZ($,J,Z){var Q=$.charCodeAt(J);if(Q!==T0&&Q!==u)return!1;for(var V=J;V<Z&&$.charCodeAt(V)===Q;)V++;for(;V<Z&&($.charCodeAt(V)===I||$.charCodeAt(V)===w);)V++;return V>=Z}function T9($,J){let Z=J0($,J);if(A0($,J,Z),$0>3)return null;let Q=J+t,V=$.charCodeAt(Q);if(V!==u&&V!==O0&&V!==G0)return null;let X=0;for(;Q<Z;){let Y=$.charCodeAt(Q);if(Y===V)X++;else if(Y!==I&&Y!==w)return null;Q++}return X<3?null:{node:{type:v.breakThematic},end:i($,Z)}}function eZ($,J,Z){let Q=J0($,J);if(A0($,J,Q),$0>3)return null;let V=$0,X=t,Y=J+t,G=$.charCodeAt(Y);if(G!==a&&G!==M0)return null;let K=I9($,Y,Q,G);if(K<3)return null;Y+=K;let q=q$($,Y,Q),U=Q;if(G===a){for(let P=q;P<Q;P++)if($.charCodeAt(P)===a)return null}for(;U>q&&($.charCodeAt(U-1)===I||$.charCodeAt(U-1)===w);)U--;let F=$.slice(q,U),O="",z="",j=F.indexOf(" ");j===-1?O=F:(O=F.slice(0,j),z=F.slice(j+1).trim()),O=Z$(O);var D=void 0;if(z){k6.lastIndex=0;for(var W;(W=k6.exec(z))!==null;)D||(D={}),D[W[1]]=W[2]!==void 0?W[2]:W[3]}let B=i($,Q),H=B,M=$.length;for(;H<$.length;){let P=J0($,H);if(A0($,H,P),$0<4){let b=H+t;var R=I9($,b,P,G);if(R>=K){let y=b+R;if(d0($,y,P)){M=i($,P);break}}}H=i($,P)}var N;if(V===0)N=H>B&&$.charCodeAt(H-1)===E?$.slice(B,H-1):$.slice(B,H);else{N="";for(var A=B;A<H;){var L=J0($,A);A0($,A,L);var k=Math.min(t,V);N+=$.slice(A+k,L)+`
`,A=i($,L)}N.length>0&&N.charCodeAt(N.length-1)===E&&(N=N.slice(0,-1))}return{node:{type:v.codeBlock,lang:O||void 0,text:N,infoString:z||void 0,attrs:D},end:M}}function $J($,J){let Z=J0($,J);if(A0($,J,Z),$0<4)return null;let Q="",V=J;for(;V<$.length;){let z=J0($,V);if(A0($,V,z),d0($,V,z)){for(var X=0,Y=i($,z);Y<$.length;){var G=J0($,Y);if(d0($,Y,G)){X++,Y=i($,G);continue}if(A0($,Y,G),$0>=4){for(var K=0;K<=X;K++)Q+=`
`;V=Y;break}break}if(V!==Y)break;continue}if($0<4)break;let j=0,D=0;var q=0;for(let W=V;W<z&&D<4;W++){if($.charCodeAt(W)===w){var U=4-D%4;D+U>4&&(q=D+U-4),D+=U}else D++;j++}var F="";if(q>0)for(var O=0;O<q;O++)F+=" ";F+=$.slice(V+j,z),Q+=F+`
`,V=i($,z)}for(;Q.length>0&&Q.charCodeAt(Q.length-1)===E;)Q=Q.slice(0,-1);for(;Q.length>0&&Q.charCodeAt(Q.length-1)===E;)Q=Q.slice(0,-1);return Q?{node:{type:v.codeBlock,lang:void 0,text:Q,infoString:void 0,attrs:void 0},end:V}:null}function ZJ($,J,Z,Q){let V=J0($,J);if(A0($,J,V),$0>3)return null;let X=J+t;if($.charCodeAt(X)!==d)return null;let Y="",G=J,K,q=!1,U=!1,F=!1;for(;G<$.length;){let g=J0($,G);A0($,G,g);let D0=G+t;if($.charCodeAt(D0)===d){let Q0=D0+1;var O=$0+1,z=!1;if(Q0<g){var j=$.charCodeAt(Q0);j===I?(Q0++,O++,z=!0):j===w&&(z=!0)}for(var D="",W=!1,B=Q0;B<g;B++)if($.charCodeAt(B)===w){W=!0;break}if(W){var H=O;if(z&&Q0<g&&$.charCodeAt(Q0)===w){for(var M=4-H%4,R=0;R<M-1;R++)D+=" ";H+=M,Q0++}for(var N=Q0;N<g;N++)if($.charCodeAt(N)===w){for(var A=4-H%4,L=0;L<A;L++)D+=" ";H+=A}else D+=$[N],H++}else D=$.slice(Q0,g);if(!Y&&!K){let m=D.match(/^\[!([A-Za-z]+)\]\s*$/);if(m){K=m[1].toUpperCase(),G=i($,g);continue}}Y+=D+`
`;var k=D.trimStart();k.startsWith("```")||k.startsWith("~~~")?F=!F:D.startsWith("    ")||D.startsWith("	")?F=!0:k.length>0&&!F&&(F=!1),U=k.length>0,G=i($,g)}else if(Y&&!d0($,G,g)&&U){if($0<4){var P=G+t,b=P<g?$.charCodeAt(P):0;if(b===Y9||b===d||b===a||b===M0||b===e||(b===u||b===O0||b===G0)&&T9($,G)||(b===u||b===O0||b===j9)&&P+1<g&&($.charCodeAt(P+1)===I||$.charCodeAt(P+1)===w))break;if(b>=o&&b<=r){for(var y=P;y<g&&$.charCodeAt(y)>=o&&$.charCodeAt(y)<=r;)y++;if(y<g&&($.charCodeAt(y)===p0||$.charCodeAt(y)===s0))break}}if(F)break;Y+=$.slice(G,g)+`
`,q=!0,G=i($,g)}else break}if(!Y&&!K)return null;var{inBlockQuote:S,g:T}=Z;Z.inBlockQuote=!0,q&&(Z.g=!0);let C=N9(Y||"",Z,Q);return Z.inBlockQuote=S,Z.g=T,{node:{type:v.blockQuote,children:C,alert:K||void 0},end:G}}function n6($,J,Z){for(var Q=0,V=J;V<Z;V++)$.charCodeAt(V)===w?Q+=4-Q%4:Q++;return Q}function E9($,J,Z){if(A0($,J,Z),$0>3)return null;var Q=J+t;if(Q>=Z)return null;var V=$.charCodeAt(Q),X=$0,Y=Q;if(V===u||V===O0||V===j9){if(Y=Q+1,Y<Z&&$.charCodeAt(Y)!==I&&$.charCodeAt(Y)!==w&&$.charCodeAt(Y)!==E)return null}else if(V>=o&&V<=r){for(var G=Q;G<Z&&G-Q<9;){var K=$.charCodeAt(G);if(K<o||K>r)break;G++}if(G>Q&&G<Z){var q=$.charCodeAt(G);if(q===p0||q===s0){if(Y=G+1,Y<Z&&$.charCodeAt(Y)!==I&&$.charCodeAt(Y)!==w&&$.charCodeAt(Y)!==E)return null}else return null}else return null}else return null;var U=Y,F=n6($,J,Y),O=0,z=U,j=F;if(U>=Z)return{ordered:V>=o&&V<=r,marker:V>=o&&V<=r?$[G]:$[Q],start:V>=o&&V<=r?parseInt($.slice(Q,G),10):void 0,contentStart:U,contentCol:F+1,markerCol:X,isEmpty:!0};for(;z<Z&&($.charCodeAt(z)===I||$.charCodeAt(z)===w);){if($.charCodeAt(z)===w){var D=4-j%4;j+=D}else j++;z++,O++}var W=z>=Z,B=j-F;return W||B>4?(j=F+1,z=U+1,O=1):O===0&&(j=F+1,z=U,O=1),{ordered:V>=o&&V<=r,marker:V>=o&&V<=r?$[G]:$[Q],start:V>=o&&V<=r?parseInt($.slice(Q,G),10):void 0,contentStart:z,contentCol:j,markerCol:X,isEmpty:W}}var A$=0;function JJ($,J,Z,Q){var V=0,X=J;for(A$=0;X<Z&&V<Q;){var Y=$.charCodeAt(X);if(Y===w){var G=4-V%4;if(V+G>Q){A$=V+G-Q,X++,V=Q;break}V+=G}else if(Y===I)V++;else break;X++}return X}function g6($,J,Z,Q){var V=J0($,J),X=E9($,J,V);if(!X)return null;var Y=[],G=J,K=X.contentCol,q="",U=X.isEmpty,F=!1,O=!1;if(!X.isEmpty){for(var z=!1,j=X.contentStart;j<V;j++)if($.charCodeAt(j)===w){z=!0;break}if(z){var D="",W=n6($,J,X.contentStart),B=W-X.contentCol;if(B>0)for(var H=0;H<B;H++)D+=" ";for(var M=X.contentStart;M<V;M++)if($.charCodeAt(M)===w){for(var R=4-W%4,N=0;N<R;N++)D+=" ";W+=R}else D+=$[M],W++;q=D+`
`}else q=$.slice(X.contentStart,V)+`
`}for(G=i($,V);G<$.length;){var A=J0($,G);A0($,G,A);var L=$.charCodeAt(G+t);if($0<K&&(L===u||L===O0||L===G0)&&$0<=3&&T9($,G))break;var k=E9($,G,A);if(k&&k.ordered===X.ordered&&k.marker===X.marker&&k.markerCol<K){Y.push({contentCol:K,raw:q,hasBlankAfter:F,isEmpty:U}),F&&(O=!0),K=k.contentCol,U=k.isEmpty,F=!1,q=k.isEmpty?"":$.slice(k.contentStart,A)+`
`,G=i($,A);continue}if(d0($,G,A)){q+=`
`,G=i($,A);for(var P=!1,b=0;b<q.length;b++){var y=q.charCodeAt(b);if(y!==E&&y!==H9&&y!==I&&y!==w){P=!0;break}}if(U&&!P)if(G<$.length){var S=J0($,G),T=E9($,G,S);if(!T||T.ordered!==X.ordered||T.marker!==X.marker)break;F=!0}else break;if(G<$.length){var C=J0($,G);A0($,G,C);var f=$.charCodeAt(G+t);if((f===u||f===O0||f===G0)&&$0<=3&&T9($,G))break;var g=E9($,G,C);if(g&&g.ordered===X.ordered&&g.marker===X.marker&&g.markerCol<K){F=!0;continue}if(!d0($,G,C)&&$0<K)break}continue}if($0>=K){var D0=JJ($,G,A,K);if(A$>0){for(var Q0="",m=K,n=0;n<A$;n++)Q0+=" ",m++;for(var y0=D0;y0<A;y0++)if($.charCodeAt(y0)===w){for(var c0=4-m%4,m0=0;m0<c0;m0++)Q0+=" ";m+=c0}else Q0+=$[y0],m++;q+=Q0+`
`}else q+=$.slice(D0,A)+`
`;G=i($,A);continue}for(var z0=!1,h=0;h<q.length;h++){var B0=q.charCodeAt(h);if(B0!==E&&B0!==H9&&B0!==I&&B0!==w){z0=!0;break}}if(!F&&z0&&!U){var Z0=G+t,K0=$.charCodeAt(Z0),K9=K0===Y9||K0===d||K0===e||K0===a||K0===M0||(K0===u||K0===O0||K0===G0||K0===j9)&&(T9($,G)!==null||E9($,G,A)!==null)||K0>=o&&K0<=r&&E9($,G,A)!==null;if(!K9){q+=""+$.slice(Z0,A)+`
`,G=i($,A);continue}}break}if(Y.push({contentCol:K,raw:q,hasBlankAfter:F,isEmpty:U}),Y.length===0)return null;var V0=O;if(!V0)for(var j0=0;j0<Y.length;j0++){if(Y[j0].hasBlankAfter&&j0<Y.length-1){V0=!0;break}if(!Y[j0].isEmpty){for(var v0=Y[j0].raw,s=v0.length,U0=0,_=!1,l=!1,I0=!1,P0=!1,$9=0,k0=0,X0=-1;U0<s;){var x=v0.indexOf(`
`,U0);if(x<0&&(x=s),P0){A0(v0,U0,x);for(var R0=v0.slice(U0+t,x),F0=0;F0<R0.length&&R0.charCodeAt(F0)===$9;)F0++;F0>=k0&&R0.slice(F0).trim()===""&&(P0=!1),U0=x<s?x+1:s;continue}if(d0(v0,U0,x)){X0>=0?I0=!0:_&&(l=!0),U0=x<s?x+1:s;continue}if(A0(v0,U0,x),X0>=0){if($0>=X0){U0=x<s?x+1:s;continue}var G9=E9(v0,U0,x);if(G9&&G9.markerCol<X0&&G9.contentCol<=X0){U0=x<s?x+1:s;continue}if(G9){U0=x<s?x+1:s;continue}X0=-1,I0&&(l=!0,I0=!1)}var l9=v0.slice(U0+t,x),b9=l9.charCodeAt(0);if((b9===a||b9===M0)&&$0<=3){for(var W9=0;W9<l9.length&&l9.charCodeAt(W9)===b9;)W9++;if(W9>=3){if(l&&_){V0=!0;break}P0=!0,$9=b9,k0=W9,_=!0,U0=x<s?x+1:s;continue}}var q9=$0<=3?E9(v0,U0,x):null;if(q9&&_){if(l){V0=!0;break}X0=q9.contentCol,I0=!1,U0=x<s?x+1:s,_=!0;continue}if(l){V0=!0;break}_=!0,U0=x<s?x+1:s}if(V0)break}}for(var z9=[],f9=0;f9<Y.length;f9++){for(var J$=Y[f9],O9=J$.raw,Z9=O9.length;Z9>0&&O9.charCodeAt(Z9-1)===E;)Z9--;var J9=Z9<O9.length?O9.slice(0,Z9):O9,Q9=null;if(J9.length>=3&&J9.charCodeAt(0)===W0){var r0=J9[1];(r0===" "||r0==="x"||r0==="X")&&J9.charCodeAt(2)===u0&&(Q9={type:v.gfmTask,completed:r0==="x"||r0==="X"},J9=J9.slice(3))}var b0;if(J$.isEmpty&&J9.trim()==="")b0=[];else if(V0){var w9=Z.inList;Z.inList=!0,b0=N9(J9,Z,Q),Z.inList=w9}else{var U9=Z.inList;if(Z.inList=!0,b0=N9(J9,Z,Q),Z.inList=U9,b0.length===1&&b0[0].type===v.paragraph)b0=b0[0].children;else{for(var V9=[],R9=0;R9<b0.length;R9++)if(b0[R9].type===v.paragraph)for(var o9=b0[R9].children,X9=0;X9<o9.length;X9++)V9.push(o9[X9]);else V9.push(b0[R9]);b0=V9}}Q9?z9.push([Q9,{type:v.text,text:" "},...b0]):z9.push(b0)}return{node:{type:X.ordered?v.orderedList:v.unorderedList,start:X.ordered?X.start:void 0,items:z9},end:G}}var _$=new Set(["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]);function _9($,J,Z){let Q={};for(let[Y,G]of Object.entries($)){let K=Y,q=Y.toLowerCase();if(q==="style"&&typeof G=="string"){let U={},F=[],O=0,z=0;for(let D=0;D<G.length;D++){let W=G.charCodeAt(D);W===n0?O++:W===s0?O--:W===f$&&O===0&&(F.push(G.slice(z,D)),z=D+1)}z<G.length&&F.push(G.slice(z));let j=!1;F.forEach(D=>{let W=D.indexOf(":");if(W===-1)return;let B=D.slice(0,W).trim(),H=D.slice(W+1).trim();if(B&&H){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(H)){j=!0;return}let M=B.indexOf("-")!==-1?B.replace(/-([a-z])/g,(R,N)=>N.toUpperCase()):B;U[M]=H}}),!j&&Object.keys(U).length>0&&(Q[K]=U)}else if((q==="href"||q==="src")&&Z?.sanitizer){let U=Z.sanitizer(G,J,q);U!==null&&(Q[K]=U)}else if(G==="")Q[K]=!0;else if(G.length>=2&&G.charCodeAt(0)===S9&&G.charCodeAt(G.length-1)===D$){var V=G.slice(1,-1);if(V.length>0){var X=V.charCodeAt(0);if(X===W0||X===S9)try{Q[K]=JSON.parse(V);continue}catch{}}if(V==="true"){Q[K]=!0;continue}if(V==="false"){Q[K]=!1;continue}if(Z?.evalUnserializableExpressions)try{Q[K]=(0,eval)("("+V+")");continue}catch{}Q[K]=V}else Q[K]=G}return Q}function x9($,J,Z){let Q=J.length;if(Q===0)return Z;var V=J.charCodeAt(0),X=V>=p&&V<=c||V>=Y0&&V<=q0;if(!X){for(var Y=String.fromCharCode(V),G=$.length-Q,K=Z;K<=G;){var q=$.indexOf(Y,K);if(q===-1||q>G)return-1;for(var U=!0,F=1;F<Q;F++){var O=$.charCodeAt(q+F),z=J.charCodeAt(F);if(O>=p&&O<=c&&(O+=o0),z>=p&&z<=c&&(z+=o0),O!==z){U=!1;break}}if(U)return q;K=q+1}return-1}V>=p&&V<=c&&(V+=o0);for(let D=Z;D<=$.length-Q;D++){var j=$.charCodeAt(D);if(j>=p&&j<=c&&(j+=o0),j!==V)continue;let W=!0;for(let B=1;B<Q;B++){let H=$.charCodeAt(D+B),M=J.charCodeAt(B);if(H>=p&&H<=c&&(H+=o0),M>=p&&M<=c&&(M+=o0),H!==M){W=!1;break}}if(W)return D}return-1}function QJ($,J,Z){let Q=J.length;var V=J.charCodeAt(0);V>=p&&V<=c&&(V+=o0);for(let Y=Math.min(Z,$.length-Q);Y>=0;Y--){var X=$.charCodeAt(Y);if(X>=p&&X<=c&&(X+=o0),X!==V)continue;let G=!0;for(let K=1;K<Q;K++){let q=$.charCodeAt(Y+K),U=J.charCodeAt(K);if(q>=p&&q<=c&&(q+=o0),U>=p&&U<=c&&(U+=o0),q!==U){G=!1;break}}if(G)return Y}return-1}var v$=-1;function c$($,J,Z){let Q=Z.toLowerCase(),V="<"+Q,X="</"+Q,Y=1,G=J,K=$.length;for(v$=-1;G<K&&Y>0;){let F=x9($,V,G),O=x9($,X,G);if(O===-1)return-1;if(F!==-1&&F<O){let z=v9($,F);z?(z.tag.toLowerCase()===Q&&!z.isClosing&&!z.selfClosing&&!d9(z.tag)&&Y++,G=z.end):G=F+1}else{var q=O+X.length,U=q<K?$.charCodeAt(q):62;if((U===d||U===I||U===w||U===E)&&(Y--,Y===0)){v$=O;let z=O+X.length;for(;z<K&&$.charCodeAt(z)!==d;)z++;return z+1}G=O+1}}return-1}function s6($,J,Z,Q){if(Q.ignoreHTMLBlocks||Q.disableParsingRawHTML)return null;var V=J0($,J);if(A0($,J,V),$0>3&&!Z.inHTML)return null;var X=J+t;if($.charCodeAt(X)!==e)return null;var Y=$.indexOf(">",X+1);if(Y!==-1&&Y<V){var G=$.slice(X+1,Y);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(G)||/^[^\s@]+@[^\s@]+$/.test(G))return null}var K=VJ($,X);if(K>=1&&K<=5){var q=$.length;if(K===1){for(var U=$.length,F=0;F<d$.length;F++){var O=x9($,"</"+d$[F]+">",X);O>=0&&O<U&&(U=O)}if(U<$.length){var z=$.indexOf(">",U);q=z>=0?i($,z+1):$.length}}else{var j=K===2?"-->":K===3?"?>":K===4?">":"]]>",D=$.indexOf(j,X);D>=0&&(q=i($,D+j.length))}var W=$.slice(X,q);if(K>=2)return{node:{type:v.htmlComment,text:W,h:!1,raw:!0,endPos:q},end:q};var B="div",H=W.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);H&&(B=H[1]);var M=v9($,X),R={},N;M&&!M.isClosing&&(R=_9(M.attrs,B,Q),N=M.whitespaceBeforeAttrs+M.rawAttrs);var A=[],L=B.toLowerCase(),k="</"+L,P=x9(W,k,0),b=W,y="";if(M&&M.isClosing)for(b=W.slice(M.end-X);b.length>0&&b.charCodeAt(b.length-1)===E;)b=b.slice(0,-1);else if(M&&!M.isClosing){var S=M.end-X;if(P!==-1)for(b=W.slice(S),b.charCodeAt(0)===E&&(b=b.slice(1));b.length>0&&b.charCodeAt(b.length-1)===E;)b=b.slice(0,-1);else for(b=W;b.length>0&&b.charCodeAt(b.length-1)===E;)b=b.slice(0,-1);if(P!==-1){var T=W.slice(S,P);y=T.trim()}}var C=M?M.isClosing:!1;return{node:{type:v.htmlBlock,tag:B,attrs:R,f:N,children:A,a:b,text:y,d:!0,b:C,endPos:q,e:!0},end:q}}if(K===6||K===7){var f=S6($,J),g=f<$.length?f:$.length,D0=$.slice(X,g),Q0=f<$.length?i($,f):$.length,m=v9($,X);if(m){var n=m.tag,y0=n.toLowerCase(),c0=m.isClosing;if(c0){var m0=$.slice(m.end,g);return{node:{type:v.htmlBlock,tag:n,attrs:{},children:[],a:m0,text:m0,d:!0,b:!0,endPos:g,e:K===6},end:Q0}}if(m.selfClosing||d9(n))return{node:{type:v.htmlBlock,tag:n,attrs:_9(m.attrs,n,Q),f:m.whitespaceBeforeAttrs+m.rawAttrs,children:[],a:"",text:"",d:!1,b:!1,endPos:m.end,e:K===6},end:m.end<$.length&&$.charCodeAt(m.end)===E?m.end+1:m.end};var z0=Z.c||0,h=$.slice(X,g),B0=-1,Z0=-1;if(z0<10){for(var K0="</"+y0,K9=m.end-X,V0=1,j0=K9;j0<h.length&&V0>0;){var v0=x9(h,"<"+y0,j0),s=x9(h,K0,j0);if(s===-1)break;if(v0!==-1&&v0<s){var U0=v0+y0.length+1;if(U0<h.length){var _=h.charCodeAt(U0);(_===I||_===w||_===E||_===d||_===H0)&&V0++}j0=v0+1}else{var l=s+K0.length;if(l<h.length){var I0=h.charCodeAt(l);if((I0===d||I0===I||I0===w||I0===E)&&(V0--,V0===0)){B0=s;for(var P0=l;P0<h.length&&h.charCodeAt(P0)!==d;)P0++;Z0=P0+1;break}}else if(V0--,V0===0){B0=s,Z0=h.length;break}j0=s+1}}var $9=!1;if(B0===-1&&K===6&&!m.isClosing){var k0=c$($,m.end,y0);if(k0!==-1){for(var X0=v$,x=m.end,R0=!1,F0=!1,G9=!1,l9=0,b9=!1,W9=!1,q9=x;q9<X0;){var z9=$.charCodeAt(q9);if(z9===E)W9&&(R0=!0),b9||l9++,W9=!0,q9++;else if(z9===I||z9===w)q9++;else{if(!b9&&(b9=!0,l9>=2&&z9===e)){G9=!0;break}if(W9=!1,z9===e){var f9=$.charCodeAt(q9+1)|32;if((f9===H$||f9===T$||f9===m9)&&(w6.lastIndex=q9,w6.test($))){F0=!0;break}}q9++}}if(R0&&!G9&&!F0){var J$=J0($,k0);g=J$,Q0=i($,J$),h=$.slice(X,g),D0=$.slice(X,g),B0=X0-X,Z0=k0-X,$9=!0}}}}var O9=m.rawAttrs.indexOf(`
`)!==-1||m.whitespaceBeforeAttrs.indexOf(`
`)!==-1,Z9=!1;if(B0!==-1){var J9=h.slice(Z0).trim();Z9=J9.length===0}var Q9=!1,r0=g,b0=Q0;if(B0!==-1){var w9=X+Z0,U9=J0($,w9-1);if(w9<U9){for(var V9=w9;V9<U9&&($.charCodeAt(V9)===I||$.charCodeAt(V9)===w);)V9++;if(V9<U9&&$.charCodeAt(V9)===e){var R9=v9($,V9);R9&&!R9.isClosing&&(Q9=!0,r0=w9,b0=w9,Z9=!0)}}if(!Q9){var o9=i($,U9);if(o9<g){for(var X9=o9;X9<g&&($.charCodeAt(X9)===I||$.charCodeAt(X9)===w);)X9++;if(X9<g&&$.charCodeAt(X9)===e){var XZ=v9($,X9);XZ&&(Q9=!0,r0=U9,b0=o9,Z9=!0)}}}if(!Q9&&Z.inHTML){Q9=!0,r0=U9,b0=i($,U9);var YZ=$.slice(w9,U9).trim();Z9=YZ.length===0}}var r9=[],i0="";if(B0!==-1){i0=h.slice(m.end-X,B0);var y9=i0.trim();if(y9){var{inline:KZ,inHTML:GZ,c:qZ}=Z;Z.inHTML=!0,Z.c=z0+1;var UZ=y0==="p";if(UZ)Z.inline=!0,r9=C0(y9,0,y9.length,Z,Q);else{var n$=i0.indexOf(`

`)!==-1,s$=R6.test(y9),w$=y6.test(y9),FZ=n$||s$||Z.inHTML&&w$,WZ=i0.length>=2&&i0.charCodeAt(0)===E&&i0.charCodeAt(i0.length-1)===E&&!n$;WZ&&!s$&&!w$?r9=[{type:v.text,text:y9}]:FZ||w$?(Z.inline=!1,r9=N9(i0,Z,Q)):(Z.inline=!0,r9=C0(y9,0,y9.length,Z,Q))}Z.inline=KZ,Z.inHTML=GZ,Z.c=qZ}}var t$=!1;if(K===6&&B0!==-1&&!Z.inHTML&&!O9){var R$=i0,zZ=/<[a-zA-Z][^>]*>/.test(R$),OZ=/\n\n/.test(R$)||/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(R$);zZ&&!OZ&&(t$=!0)}var HZ=!$9&&(Z.inHTML||K===7||O9||!Z9||t$);if(HZ){var l0,e$=!1;if(B0!==-1&&Q9){var $6=!1;if(Z.inHTML&&Z0<h.length){for(var F$=Z0;F$<h.length&&h.charCodeAt(F$)!==E;)F$++;var y$=h.slice(Z0,F$).trim();$6=y$.length>1&&y$.charCodeAt(0)===e&&y$.charCodeAt(1)!==H0}l0=$6?h.slice(m.end-X):i0,e$=!0}else(K===7||Z.inHTML)&&B0!==-1?(l0=h.slice(m.end-X),l0.charCodeAt(0)===E&&(l0=l0.slice(1))):Q9?l0=$.slice(X,r0):O9?l0=D0:(l0=h.slice(m.end-X),l0.charCodeAt(0)===E&&(l0=l0.slice(1)));var Z6={type:v.htmlBlock,tag:n,attrs:_9(m.attrs,n,Q),f:m.whitespaceBeforeAttrs+m.rawAttrs,children:r9,a:l0,text:l0,d:!0,b:!1,endPos:r0,e:K===6};return e$&&(Z6.l=!0),{node:Z6,end:b0}}return{node:{type:v.htmlBlock,tag:n,attrs:_9(m.attrs,n,Q),f:m.whitespaceBeforeAttrs+m.rawAttrs,children:r9,a:$9?"":i0,text:i0,d:!1,b:!1,endPos:r0,e:K===6},end:b0}}var W$=D0.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),DZ=W$?W$[2]:"div",J6=W$?W$[1]==="/":!1,k$=D0;if(J6){var Q6=D0.indexOf(">");Q6!==-1&&(k$=D0.slice(Q6+1))}return{node:{type:v.htmlBlock,tag:DZ,attrs:{},children:[],a:k$,text:k$,d:!0,b:J6,endPos:g,e:K===6},end:Q0}}var L0=v9($,X);if(!L0)return null;var k9=L0.tag,L$=k9.toLowerCase(),V6=k9.charCodeAt(0),z$=V6>=p&&V6<=c;if(!z$&&!_$.has(L$)&&!U$.has(L$)&&!L$.includes("-"))return null;if(L0.isClosing)return{node:{type:v.htmlSelfClosing,tag:k9,attrs:{},a:$.slice(X,L0.end),b:!0,endPos:L0.end},end:L0.end};var kJ=!0,C9=c$($,L0.end,k9),Q$=[];if(C9!==-1){var BZ=v$,O$=$.slice(L0.end,BZ),V$=O$.trim();if(V$){var jZ=O$.indexOf(`

`)!==-1,MZ=R6.test(V$),AZ=y6.test(V$),_Z=Z.inline,vZ=Z.inHTML,NZ=Z.c;Z.inHTML=!0,Z.c=(Z.c||0)+1,jZ||MZ||AZ?(Z.inline=!1,Q$=N9(O$,Z,Q)):(Z.inline=!0,Q$=C0(V$,0,V$.length,Z,Q)),Z.inline=_Z,Z.inHTML=vZ,Z.c=NZ}var IZ=J0($,C9),PZ=$.slice(C9,IZ).trim(),S$=PZ?C9:i($,C9),X6=z$?$.slice(X,C9):$.slice(X,S$),bZ=z$?C9:S$;return{node:{type:v.htmlBlock,tag:k9,attrs:_9(L0.attrs,k9,Q),f:L0.whitespaceBeforeAttrs+L0.rawAttrs,children:Q$,a:X6,text:z$?O$:X6,d:!0,b:!1,endPos:bZ,e:!1},end:S$}}var i9=S6($,L0.end),wZ=i9<$.length?i($,i9):i9,g$=$.slice(L0.end,i9);if(g$.trim()){var{inline:RZ,inHTML:yZ,c:kZ}=Z;Z.inline=!1,Z.inHTML=!0,Z.c=(Z.c||0)+1,Q$=N9(g$,Z,Q),Z.inline=RZ,Z.inHTML=yZ,Z.c=kZ}var LZ=$.slice(L0.end,i9);return{node:{type:v.htmlBlock,tag:k9,attrs:_9(L0.attrs,k9,Q),f:L0.whitespaceBeforeAttrs+L0.rawAttrs,children:Q$,a:LZ,text:g$,d:!0,b:!1,endPos:i9,e:!1},end:wZ}}function VJ($,J){if($.charCodeAt(J)!==e)return 0;var Z=J+1,Q=$.length;if($.charCodeAt(Z)===S0&&$.charCodeAt(Z+1)===u&&$.charCodeAt(Z+2)===u)return 2;if($.charCodeAt(Z)===a9)return 3;if($.charCodeAt(Z)===S0){var V=$.charCodeAt(Z+1);if(V>=p&&V<=c)return 4;if($.slice(Z+1,Z+8)==="[CDATA[")return 5}for(var X=$.charCodeAt(Z)===H0,Y=X?Z+1:Z,G=Y;G<Q;){var K=$.charCodeAt(G);if(K>=p&&K<=c||K>=Y0&&K<=q0||K>=o&&K<=r||K===u)G++;else break}if(G===Y)return 0;var q=$.slice(Y,G);if(U$.has(q.toLowerCase())){if(X)return 0;var U=$.charCodeAt(G);return U===I||U===w||U===d||U===E||G>=Q?1:0}if(_$.has(q.toLowerCase())){if(X){for(var F=G;F<Q&&($.charCodeAt(F)===I||$.charCodeAt(F)===w);)F++;return F<Q&&$.charCodeAt(F)===d?6:0}var O=G<Q?$.charCodeAt(G):-1;return O===I||O===w||O===d||O===E||O===H0||O===-1?6:0}if(X){for(var W=G;W<Q&&($.charCodeAt(W)===I||$.charCodeAt(W)===w);)W++;if(W<Q&&$.charCodeAt(W)===d){var B=J0($,J),H=$.slice(W+1,B).trim();if(H==="")return 7}}else{var z=J0($,J),j=v9($,J);if(j&&j.end<=z){var D=$.slice(j.end,z).trim();if(D==="")return 7}}return 0}function E6($,J,Z){for(var Q=0,V=$.length;Q<V&&($.charCodeAt(Q)===I||$.charCodeAt(Q)===w);)Q++;for(;V>Q&&($.charCodeAt(V-1)===I||$.charCodeAt(V-1)===w);)V--;Q<V&&$.charCodeAt(Q)===N0&&Q++,V>Q&&$.charCodeAt(V-1)===N0&&(V-2<Q||$.charCodeAt(V-2)!==_0)&&V--;for(var X=[],Y=Q,G=!1,K=[],q=Q;q<V;){var U=$.charCodeAt(q);if(U===_0&&q+1<V){$.charCodeAt(q+1)===N0?(G||(G=!0,K=[]),K.push($.slice(Y,q)),K.push("|"),q+=2,Y=q):q+=2;continue}if(U===a){for(var F=0;q<V&&$.charCodeAt(q)===a;)F++,q++;for(var O=!1;q<V&&!O;){for(var z=0;q<V&&$.charCodeAt(q)===a;)z++,q++;z===F?O=!0:z===0&&q++}continue}if(U===N0){var j=G?(K.push($.slice(Y,q)),K.join("")):$.slice(Y,q);X.push(j.trim()),q++,Y=q,G=!1,K=[];continue}q++}var D=G?(K.push($.slice(Y,V)),K.join("")):$.slice(Y,V);return X.push(D.trim()),X.map(function(W){var B=W.indexOf("\\|")!==-1?W.replace(/\\\|/g,"|"):W;return C0(B,0,B.length,J,Z)})}function x6($,J,Z,Q){let V=J0($,J);var X=$.indexOf("|",J);if(X<0||X>=V)return null;let Y=i($,V);if(Y>=$.length)return null;let G=J0($,Y);if(!d6($,Y,G))return null;let K=$.slice(J,V),q=$.slice(Y,G);for(var U=[],F=0,O=q.length;F<O&&(q.charCodeAt(F)===I||q.charCodeAt(F)===w);)F++;for(F<O&&q.charCodeAt(F)===N0&&F++;F<O;){for(;F<O&&(q.charCodeAt(F)===I||q.charCodeAt(F)===w);)F++;if(F>=O||q.charCodeAt(F)===N0)break;var z=q.charCodeAt(F)===g0;for(z&&F++;F<O&&q.charCodeAt(F)===u;)F++;var j=F<O&&q.charCodeAt(F)===g0;for(j&&F++,U.push(z&&j?"center":j?"right":z?"left":null);F<O&&(q.charCodeAt(F)===I||q.charCodeAt(F)===w);)F++;F<O&&q.charCodeAt(F)===N0&&F++}let D=E6(K,Z,Q);if(U.length!==D.length)return null;let W=[],B=i($,G);for(;B<$.length;){let L=J0($,B),k=$.slice(B,L);if(d0($,B,L))break;if(A0($,B,L),$0<4){var H=$.charCodeAt(B+t);if(H===d||H===Y9||(H===u||H===O0||H===G0)&&T9($,B))break;if(H===a||H===M0){for(var M=B+t,R=0;M<L&&$.charCodeAt(M)===H;)R++,M++;if(R>=3)break}}W.push(E6(k,Z,Q)),B=i($,L)}if((Q.streaming||Q.optimizeForStreaming)&&W.length===0)return null;for(var N=D.length,A=0;A<W.length;A++)if(W[A].length<N)for(;W[A].length<N;)W[A].push([]);else W[A].length>N&&(W[A].length=N);return{node:{type:v.table,header:D,cells:W,align:U},end:B}}function XJ($,J,Z){var Q=J0($,J);if(A0($,J,Q),$0>3)return null;var V=J+t;if($.charCodeAt(V)!==W0)return null;if(V+1<$.length&&$.charCodeAt(V+1)===a0){var X=YJ($,V,Z);return X||null}Z.refs||(Z.refs={});var Y=l6($,V,Z.refs);return Y===null?null:{node:{type:v.refCollection},end:Y}}function YJ($,J,Z){var Q=$.length;if($.charCodeAt(J)!==W0||J+1>=Q||$.charCodeAt(J+1)!==a0)return null;for(var V=J+2,X=V;V<Q&&$.charCodeAt(V)!==u0;){if($.charCodeAt(V)===E)return null;V++}if(V>=Q)return null;var Y=("^"+$.slice(X,V)).toLowerCase();if(V++,V>=Q||$.charCodeAt(V)!==g0)return null;for(V++;V<Q&&($.charCodeAt(V)===I||$.charCodeAt(V)===w);)V++;if(V<Q&&$.charCodeAt(V)===E)for(V++;V<Q&&($.charCodeAt(V)===I||$.charCodeAt(V)===w);)V++;var G=$.indexOf(`
`,V);G<0&&(G=Q);for(var K=$.slice(V,G).trim(),q=G<Q?G+1:Q;q<Q;){var U=J0($,q);if(A0($,q,U),$0>=2&&!d0($,q,U))K+=`
`+$.slice(q,U),q=i($,U);else if(d0($,q,U)){var F=i($,U);if(F<Q){var O=J0($,F);if(A0($,F,O),$0>=2){K+=`
`,q=i($,U);continue}}break}else break}return Z.refs[Y]||(Z.refs[Y]={target:K,title:void 0}),{node:{type:v.footnote},end:q}}function KJ($,J,Z,Q){let V=J,X=0,Y=0,G=-1;for(;V<$.length;){let y=G>=0?G:J0($,V);if(G=-1,d0($,V,y))break;if(A0($,V,y),$0<4&&Y>0&&!Z.g){let T=$.charCodeAt(V+t);if(T===T0||T===u){let C=V+t;for(;C<y&&$.charCodeAt(C)===T;)C++;for(;C<y&&($.charCodeAt(C)===I||$.charCodeAt(C)===w);)C++;if(C>=y){X=T===T0?1:2,V=i($,y);break}}}Y=y;let S=i($,y);if(S<$.length){if($.charCodeAt(S)===n9){var K=J0($,S);V=i($,K),Y=K;continue}let T=J0($,S);if(G=T,A0($,S,T),$0<4){let C=$.charCodeAt(S+t);if(C===d){V=S;break}if(C===Y9&&a6($,S,Z,Q)){V=S;break}if(C===a||C===M0){for(var q=S+t,U=0;q<T&&$.charCodeAt(q)===C;)U++,q++;if(U>=3){V=S;break}}if(C===e){var F=S+t+1,O=F<T?$.charCodeAt(F):0,z=O===S0||O===a9;if(!z&&O===H0){for(var j=F+1,D=j;D<T&&($.charCodeAt(D)>=p&&$.charCodeAt(D)<=c||$.charCodeAt(D)>=Y0&&$.charCodeAt(D)<=q0||$.charCodeAt(D)>=o&&$.charCodeAt(D)<=r||$.charCodeAt(D)===u);)D++;D>j&&(z=_$.has($.slice(j,D).toLowerCase()))}else if(!z){for(var W=F;W<T&&($.charCodeAt(W)>=p&&$.charCodeAt(W)<=c||$.charCodeAt(W)>=Y0&&$.charCodeAt(W)<=q0||$.charCodeAt(W)>=o&&$.charCodeAt(W)<=r||$.charCodeAt(W)===u);)W++;if(W>F){var B=$.slice(F,W).toLowerCase();z=_$.has(B)||U$.has(B)}}if(z&&s6($,S,Z,Q)){V=S;break}}if(C===u||C===O0||C===j9){let f=S+t+1;if(f<T&&($.charCodeAt(f)===I||$.charCodeAt(f)===w)){var H=q$($,f,T);if(H<T&&!T9($,S)){V=S;break}}}if(C>=o&&C<=r){let f=S+t;for(;f<T&&$.charCodeAt(f)>=o&&$.charCodeAt(f)<=r;)f++;if(f<T&&($.charCodeAt(f)===p0||$.charCodeAt(f)===s0)&&f-(S+t)===1&&$.charCodeAt(S+t)===49){var M=f+1;if(M<T&&($.charCodeAt(M)===I||$.charCodeAt(M)===w)){var R=q$($,M,T);if(R<T){V=S;break}}}}if(C===N0){let f=i($,T);if(f<$.length){let g=J0($,f);if(d6($,f,g)){V=S;break}}}if((C===u||C===O0||C===G0)&&T9($,S)){if(C!==u){V=S;break}let f=0,g=S+t;for(;g<T&&$.charCodeAt(g)===u;)f++,g++;for(;g<T&&($.charCodeAt(g)===I||$.charCodeAt(g)===w);)g++;if(g<T){V=S;break}}}}V=i($,y)}for(var N=X?Y:V;N>J&&($.charCodeAt(N-1)===E||$.charCodeAt(N-1)===H9||$.charCodeAt(N-1)===I||$.charCodeAt(N-1)===w);)N--;for(var A=J;A<N&&($.charCodeAt(A)===I||$.charCodeAt(A)===w);)A++;if(A>=N)return null;for(var L=!1,k=A;k<N;k++)if($.charCodeAt(k)===n9){L=!0;break}var P=L?$.slice(A,N).replace(/\u001E/g,""):$.slice(A,N);if(!P)return null;let b=GJ(P,0,P.length,Z,Q);if(X){let S=(Q?.slugify||x0)(P);return{node:{type:v.heading,level:X,children:b,id:S},end:V}}return{node:{type:v.paragraph,children:b},end:V}}function GJ($,J,Z,Q,V){var X=$.indexOf(`
`,J);if(X<0||X>=Z)return C0($,J,Z,Q,V);for(var Y="",G=J,K=J;K<Z;){var q=$.charCodeAt(K);if(q===a){var U=I$($,K,Z);if(U>K){for(var F=!1,O=K;O<U;O++)if($.charCodeAt(O)===E){F=!0;break}F&&(Y+=$.slice(G,K),Y+=$.slice(K,U).replace(/\n/g," "),G=U),K=U;continue}}if(q===e){var z=t6($,K,Z);if(z>K){K=z;continue}}if(q===E){var j=!1,D=0;if(K>J&&$.charCodeAt(K-1)===_0)j=!0,D=1;else{for(var W=0,B=K-1;B>=J&&$.charCodeAt(B)===I;)W++,B--;W>=2&&(j=!0,D=W)}if(j)Y+=$.slice(G,K-D),Y+="";else{for(var H=K;H>G&&$.charCodeAt(H-1)===I;)H--;Y+=$.slice(G,H)+`
`}for(K++;K<Z&&$.charCodeAt(K)===I;)K++;G=K;continue}K++}return G<Z&&(Y+=$.slice(G,Z)),C0(Y,0,Y.length,Q,V)}function qJ($,J,Z){if($.charCodeAt(J)!==a)return null;let Q=I9($,J,Z,96),V=J+Q;for(;V<Z;){let X=$.indexOf("`",V);if(X<0||X>=Z)return null;let Y=I9($,X,Z,96);if(Y===Q){let G=$.slice(J+Q,X);return G=G.replace(/\n/g," "),G.length>0&&G[0]===" "&&G[G.length-1]===" "&&G.trim().length>0&&(G=G.slice(1,-1)),{node:{type:v.codeInline,text:G},end:X+Y}}V=X+Y}return null}function I$($,J,Z){if($.charCodeAt(J)!==a)return J;let Q=I9($,J,Z,96),V=J+Q;for(;V<Z;){let X=$.indexOf("`",V);if(X<0||X>=Z)return J;let Y=I9($,X,Z,96);if(Y===Q)return X+Y;V=X+Y}return J}function t6($,J,Z){if($.charCodeAt(J)!==e)return J;if(J+1<Z&&$.charCodeAt(J+1)===H0){let q=J+2;for(;q<Z&&$.charCodeAt(q)!==d;)q++;return q<Z?q+1:J}if(J+3<Z&&$.charCodeAt(J+1)===S0&&$.charCodeAt(J+2)===u&&$.charCodeAt(J+3)===u){let q=$.indexOf("-->",J+4);return q>=0?q+3:J}let Q=J+1,V=Q;for(;Q<Z;){let q=$.charCodeAt(Q);if(q>=p&&q<=c||q>=Y0&&q<=q0||q>=o&&q<=r||q===u)Q++;else break}if(Q===V)return J;let X=$.slice(V,Q).toLowerCase(),Y=!1;for(;Q<Z;){let q=$.charCodeAt(Q);if(q===d){Q++;break}if(q===H0&&Q+1<Z&&$.charCodeAt(Q+1)===d){Q+=2,Y=!0;break}if(q===B9||q===L9){var G=q;for(Q++;Q<Z&&$.charCodeAt(Q)!==G;)Q++;Q<Z&&Q++;continue}if(q===E)return J;Q++}if(Y||d9(X))return Q;let K=1;for(;Q<Z&&K>0;)if($.charCodeAt(Q)===e)if(Q+1<Z&&$.charCodeAt(Q+1)===H0){let q=Q+2,U=q;for(;U<Z&&($.charCodeAt(U)>=p&&$.charCodeAt(U)<=c||$.charCodeAt(U)>=Y0&&$.charCodeAt(U)<=q0);)U++;if($.slice(q,U).toLowerCase()===X){for(;U<Z&&$.charCodeAt(U)!==d;)U++;if(U<Z&&U++,K--,K===0)return U}Q=U}else{let q=Q+1,U=q;for(;U<Z&&($.charCodeAt(U)>=p&&$.charCodeAt(U)<=c||$.charCodeAt(U)>=Y0&&$.charCodeAt(U)<=q0);)U++;$.slice(q,U).toLowerCase()===X&&K++,Q++}else Q++;return Q}function UJ($,J,Z,Q,V){if($.charCodeAt(J)!==M0||J+1>=Z||$.charCodeAt(J+1)!==M0)return null;let X=J+2;for(;X+1<Z;){let Y=$.charCodeAt(X);if(Y===a){let G=I$($,X,Z);if(G>X){X=G;continue}}if(Y===M0&&$.charCodeAt(X+1)===M0){let G=$.slice(J+2,X),K=C0(G,0,G.length,Q,V);return{node:{type:v.textFormatted,tag:"del",children:K},end:X+2}}Y===_0&&X+1<Z&&X++,X++}return null}function FJ($,J,Z,Q,V){if($.charCodeAt(J)!==T0||J+1>=Z||$.charCodeAt(J+1)!==T0)return null;let X=J+2;for(;X+1<Z;){let Y=$.charCodeAt(X);if(Y===a){let G=I$($,X,Z);if(G>X){X=G;continue}}if(Y===T0&&$.charCodeAt(X+1)===T0&&X>J+2){let G=$.slice(J+2,X),K=C0(G,0,G.length,Q,V);return{node:{type:v.textFormatted,tag:"mark",children:K},end:X+2}}Y===_0&&X+1<Z&&X++,X++}return null}function T6($,J,Z){return $<s9?!!(o$($)&p9):v6.test(J[Z])}function f6($,J,Z){return $<s9?!!(o$($)&M9):N6.test(J[Z])}function WJ($,J,Z){var Q=$.charCodeAt(J);if(Q!==O0&&Q!==G0)return null;var V=I9($,J,Z,Q);if(V===0)return null;var X=J>0?$.charCodeAt(J-1):32,Y=J+V<Z?$.charCodeAt(J+V):32,G=f6(X,$,J-1),K=f6(Y,$,J+V),q=J>0?T6(X,$,J-1):!1,U=J+V<Z?T6(Y,$,J+V):!1,F=!K&&(!U||G||q),O=!G&&(!q||K||U),z,j;return Q===O0?(z=F,j=O):(z=F&&(!O||q),j=O&&(!F||U)),{len:V,canOpen:z,canClose:j}}function zJ($,J,Z,Q){if(J.length!==0){for(var V=[],X=0;X<12;X++)V[X]=-1;for(var Y=0;Y<J.length;){var G=J[Y];if(!G.active||!G.canClose){Y++;continue}for(var K=G.ch===O0?0:1,q=K*6+G.len%3*2+(G.canOpen?1:0),U=V[q]!==void 0?V[q]:-1,F=-1,O=Y-1;O>U;O--){var z=J[O];if(!(!z.active||z.ch!==G.ch||!z.canOpen)&&!((G.canOpen||z.canClose)&&(z.len+G.len)%3===0&&z.len%3!==0)){F=O;break}}if(F<0){V[q]=Y-1,!G.canOpen&&(G.active=!1),Y++;continue}var j=J[F],D=j.len>=2&&G.len>=2,W=D?2:1;j.len-=W,G.len-=W;var B=$[j.idx],H=$[G.idx];B.text=B.text.slice(0,B.text.length-W),H.text=H.text.slice(W);var M=j.idx+1,R=G.idx,N=$.slice(M,R),A={type:v.textFormatted,tag:D?"strong":"em",children:N};$.splice(M,R-M,A);for(var L=R-M-1,k=0;k<J.length;k++)J[k].idx>j.idx&&(J[k].idx-=L);for(var P=F+1;P<Y;P++)J[P].active=!1;if(j.len===0&&(j.active=!1,B.text==="")){$.splice(j.idx,1);for(var b=0;b<J.length;b++)J[b].idx>j.idx?J[b].idx--:J[b].idx===j.idx&&(J[b].idx=-1)}if(G.len===0){G.active=!1;var y=G.idx;if(H.text===""){$.splice(y,1);for(var S=0;S<J.length;S++)J[S].idx>y?J[S].idx--:J[S].idx===y&&(J[S].idx=-1)}}else continue;Y++}for(var T=0,C=0;C<$.length;C++){var f=$[C];if(f.type===v.text){var g=f;if(g.text==="")continue;if(T>0&&$[T-1].type===v.text){$[T-1].text+=g.text;continue}}$[T++]=f}$.length=T}}function C6($,J,Z,Q,V){let X=$.charCodeAt(J)===S0,Y=X?J+1:J;if($.charCodeAt(Y)!==W0)return null;var G=$.indexOf("]",Y+1);if(G<0||G>=Z)return null;for(var K=Y+1,q=-1,U=1;K<Z&&U>0;){var F=$.charCodeAt(K);if(F===_0&&K+1<Z){K+=2;continue}if(F===a){var O=I$($,K,Z);if(O>K){K=O;continue}}if(F===e){var z=e6($,K,Z);if(z){K=z.end;continue}var j=t6($,K,Z);if(j>K){K=j;continue}}F===W0?U++:F===u0&&U--,K++}if(U!==0)return null;var D=K-1,W=$.slice(Y+1,D),B=K<Z?$.charCodeAt(K):0,H=!1;if(B===n0){var M=!0;for(K++;K<Z&&($.charCodeAt(K)===I||$.charCodeAt(K)===E);)K++;var R="",N=K;if(K<Z&&$.charCodeAt(K)===e){for(K++,N=K;N<Z&&$.charCodeAt(N)!==d;){if($.charCodeAt(N)===_0&&N+1<Z){N+=2;continue}if($.charCodeAt(N)===E){M=!1;break}N++}M&&(N>=Z||$.charCodeAt(N)!==d)&&(M=!1),M&&(R=$.slice(K,N),N++)}else if(M){for(var A=0;N<Z;){var L=$.charCodeAt(N);if(L===_0&&N+1<Z){N+=2;continue}if(L===n0)A++;else if(L===s0){if(A===0)break;A--}else if(L===I||L===E)break;N++}R=$.slice(K,N)}if(M){for(K=N;K<Z&&($.charCodeAt(K)===I||$.charCodeAt(K)===E);)K++;var k;if(K<Z){var P=$.charCodeAt(K);if(P===B9||P===L9||P===n0){var b=P===n0?41:P;K++;for(var y=K;K<Z&&$.charCodeAt(K)!==b;)$.charCodeAt(K)===_0&&K+1<Z&&K++,K++;K>=Z?M=!1:(k=$.slice(y,K),K++)}}if(M){for(;K<Z&&($.charCodeAt(K)===I||$.charCodeAt(K)===E);)K++;(K>=Z||$.charCodeAt(K)!==s0)&&(M=!1)}}if(M){K++,R=Z$(R),k!==void 0&&(k=t9(Z$(k)));var S=V?.sanitizer||g9,T=S(R,X?"img":"a",X?"src":"href"),C=T===null?null:R;if(X){var f=C0(W,0,W.length,Q,V),g=N$(f);return{node:{type:v.image,target:C,alt:g,title:k},end:K}}else{var D0=Q.inAnchor;Q.inAnchor=!0;var Q0=D0?[{type:v.text,text:W}]:C0(W,0,W.length,Q,V);return Q.inAnchor=D0,!Q.inAnchor&&l$(Q0)?null:{node:{type:v.link,target:C,title:k,children:Q0},end:K}}}else K=D+1,H=!0}var m="",n=K;if(!H&&B===W0){var y0=K+1;n=y0;for(var c0=!1;n<Z&&$.charCodeAt(n)!==u0;){if($.charCodeAt(n)===_0&&n+1<Z){n+=2;continue}if($.charCodeAt(n)===W0){c0=!0;break}n++}if(c0||n>=Z)return null;var m0=$.slice(y0,n);if(m0.trim())m=M$(m0);else{if(L6(W))return null;m=M$(W)}n=n+1}else{if(L6(W))return null;m=M$(W)}var z0=Q.refs[m];if(!z0)return null;if(X)return{node:{type:v.image,target:z0.target,alt:N$(C0(W,0,W.length,Q,V)),title:z0.title},end:n};var h=Q.inAnchor;Q.inAnchor=!0;var Q0=h?[{type:v.text,text:W}]:C0(W,0,W.length,Q,V);return Q.inAnchor=h,!Q.inAnchor&&l$(Q0)?null:{node:{type:v.link,target:z0.target,title:z0.title,children:Q0},end:n}}function e6($,J,Z){if($.charCodeAt(J)!==e)return null;for(var Q=J+1;Q<Z;){var V=$.charCodeAt(Q);if(V===d)break;if(V===I||V===E||V===H9||V===e)return null;Q++}if(Q>=Z||$.charCodeAt(Q)!==d)return null;var X=$.slice(J+1,Q),Y=X.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/);return Y?{node:{type:v.link,target:X,title:void 0,children:[{type:v.text,text:X}]},end:Q+1}:X.indexOf("@")!==-1&&/^[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])?)*$/.test(X)?{node:{type:v.link,target:"mailto:"+X,title:void 0,children:[{type:v.text,text:X}]},end:Q+1}:null}function OJ($,J,Z,Q){if($.charCodeAt(J)!==W0||J+1>=Z||$.charCodeAt(J+1)!==a0)return null;let V=J+2;for(;V<Z&&$.charCodeAt(V)!==u0&&$.charCodeAt(V)!==E;)V++;if(V>=Z||$.charCodeAt(V)!==u0)return null;let X=$.slice(J+2,V);return X?{node:{type:v.footnoteReference,target:"#"+x0(X),text:X},end:V+1}:null}function HJ($,J,Z,Q){if(Q.disableBareUrls)return null;var V="",X=!1,Y=$.charCodeAt(J);if(Y===h9||Y===72?J+8<=Z&&$.charCodeAt(J+1)===m9&&$.charCodeAt(J+2)===m9&&$.charCodeAt(J+3)===H$&&($.charCodeAt(J+4)===T$&&$.charCodeAt(J+5)===g0&&$.charCodeAt(J+6)===H0&&$.charCodeAt(J+7)===H0?V="https://":$.charCodeAt(J+4)===g0&&$.charCodeAt(J+5)===H0&&$.charCodeAt(J+6)===H0&&(V="http://")):Y===D9||Y===70?J+6<=Z&&$.charCodeAt(J+1)===m9&&$.charCodeAt(J+2)===H$&&$.charCodeAt(J+3)===g0&&$.charCodeAt(J+4)===H0&&$.charCodeAt(J+5)===H0&&(V="ftp://"):(Y===F9||Y===87)&&J+4<=Z&&$.charCodeAt(J+1)===F9&&$.charCodeAt(J+2)===F9&&$.charCodeAt(J+3)===p0&&(V="www.",X=!0),!V)return null;let G=J+V.length;for(;G<Z;){let A=$.charCodeAt(G);if(A===I||A===E||A===w||A===H9||A===e||A===d)break;G++}for(var K=0,q=0,U=J;U<G;U++){var F=$.charCodeAt(U);F===n0?K++:F===s0&&q++}let O=G;for(;O>J+V.length;){let A=$.charCodeAt(O-1);if(A===p0||A===W6||A===g0||A===S0||A===a9||A===s0||A===O0||A===G0||A===M0){if(A===s0){if(K>=q)break;q--}O--}else if(A===f$){for(var z=O-2;z>J&&($.charCodeAt(z)>=p&&$.charCodeAt(z)<=c||$.charCodeAt(z)>=Y0&&$.charCodeAt(z)<=q0||$.charCodeAt(z)>=o&&$.charCodeAt(z)<=r);)z--;z>=J&&$.charCodeAt(z)===E$?O=z:O--}else break}if(O<=J+V.length)return null;var j=J+(X?4:V.length),D=$.indexOf("/",j);if((D<0||D>O)&&(D=O),X&&$.indexOf(".",j)===-1)return null;for(var W=-1,B=-1,H=D-1;H>=j;H--)if($.charCodeAt(H)===p0)if(W<0)W=H;else{B=H;break}for(var M=B>=0?B+1:j,H=M;H<D;H++)if($.charCodeAt(H)===G0)return null;var R=$.slice(J,O),N=X?"http://"+R:R;return{node:{type:v.link,target:N,title:void 0,children:[{type:v.text,text:R}]},end:O}}function DJ($,J,Z,Q){if(Q.disableBareUrls)return null;for(var V=J,X=V;V<Z;){var Y=$.charCodeAt(V);if(Y>=p&&Y<=c||Y>=Y0&&Y<=q0||Y>=o&&Y<=r||Y===p0||Y===S0||Y===Y9||Y===36||Y===Y$||Y===E$||Y===L9||Y===O0||Y===j9||Y===H0||Y===T0||Y===a9||Y===a0||Y===G0||Y===a||Y===S9||Y===N0||Y===D$||Y===M0||Y===u)V++;else break}if(V===X||V>=Z||$.charCodeAt(V)!==K$)return null;V++;for(var G=V,K=-1,q=V;V<Z;){var Y=$.charCodeAt(V);if(Y>=p&&Y<=c||Y>=Y0&&Y<=q0||Y>=o&&Y<=r)V++;else if((Y===u||Y===G0)&&V>G)V++;else if(Y===p0){if(V===G)break;var U=$.charCodeAt(V-1);if(U===u||U===G0||V-q>63)break;if(V+1<Z){var F=$.charCodeAt(V+1);if(F>=p&&F<=c||F>=Y0&&F<=q0||F>=o&&F<=r)K=V,q=V+1,V++;else break}else break}else break}if(V-q>63||K<0)return null;var O=$.charCodeAt(V-1);if(!(O>=p&&O<=c||O>=Y0&&O<=q0||O>=o&&O<=r)||V<=K+1)return null;for(var z=-1,j=K-1;j>=G;j--)if($.charCodeAt(j)===p0){z=j;break}for(var D=z>=0?z+1:G,j=D;j<V;j++)if($.charCodeAt(j)===G0)return null;var W=$.slice(J,V);return{node:{type:v.link,target:"mailto:"+W,title:void 0,children:[{type:v.text,text:W}]},end:V}}function l$($){for(var J=0;J<$.length;J++)if($[J].type===v.link||"children"in $[J]&&Array.isArray($[J].children)&&l$($[J].children))return!0;return!1}function N$($){for(var J="",Z=0;Z<$.length;Z++){var Q=$[Z];Q.type===v.text?J+=Q.text:Q.type===v.breakLine?J+=" ":Q.type===v.codeInline?J+=Q.text:"children"in Q&&Array.isArray(Q.children)?J+=N$(Q.children):Q.type===v.image?J+=Q.alt||"":Q.type===v.link&&(J+=N$(Q.children))}return J}function c9($){let J=$.includes("&")?t9($):$;return{type:v.text,text:J}}function BJ($,J,Z,Q,V){if($.charCodeAt(J)!==e)return null;var X=J+1;if(X>=Z)return null;var Y=$.charCodeAt(X);if(Y===S0&&X+1<Z&&$.charCodeAt(X+1)===u&&X+2<Z&&$.charCodeAt(X+2)===u){var G=X+3;if(G<Z&&$.charCodeAt(G)===d)return{node:{type:v.htmlComment,text:"",h:!0},end:G+1};if(G+1<Z&&$.charCodeAt(G)===u&&$.charCodeAt(G+1)===d)return{node:{type:v.htmlComment,text:"-",h:!0},end:G+2};var K=$.indexOf("-->",G);return K!==-1&&K<=Z-3?{node:{type:v.htmlComment,text:$.slice(J+4,K),h:!1},end:K+3}:null}if(Y===a9){var q=$.indexOf("?>",X+1);return q!==-1&&q<Z?{node:{type:v.htmlSelfClosing,tag:"?",attrs:{},a:$.slice(J,q+2),b:!1},end:q+2}:null}if(Y===S0&&X+1<Z){var U=$.charCodeAt(X+1);if(U===W0&&$.slice(X+1,X+8)==="[CDATA["){var F=$.indexOf("]]>",X+8);return F!==-1&&F<Z?{node:{type:v.htmlSelfClosing,tag:"![CDATA[",attrs:{},a:$.slice(J,F+3),b:!1},end:F+3}:null}if(U>=p&&U<=c){var O=$.indexOf(">",X+2);return O!==-1&&O<Z?{node:{type:v.htmlSelfClosing,tag:"!"+$.slice(X+1,O),attrs:{},a:$.slice(J,O+1),b:!1},end:O+1}:null}}if(Y===H0){var z=X+1;if(z>=Z)return null;var j=$.charCodeAt(z);if(!(j>=p&&j<=c||j>=Y0&&j<=q0))return null;for(z++;z<Z;){var D=$.charCodeAt(z);if(D>=p&&D<=c||D>=Y0&&D<=q0||D>=o&&D<=r||D===u)z++;else break}for(;z<Z&&($.charCodeAt(z)===I||$.charCodeAt(z)===w||$.charCodeAt(z)===E);)z++;if(z<Z&&$.charCodeAt(z)===d){var W=$.slice(X+1,z).trim();return{node:{type:v.htmlSelfClosing,tag:W,attrs:{},a:$.slice(J,z+1),b:!0},end:z+1}}return null}if(!(Y>=p&&Y<=c||Y>=Y0&&Y<=q0))return null;var B=v9($,J);if(!B)return null;var H=B.tag,M=H.toLowerCase(),R=B.selfClosing;if(R||d9(H))return{node:{type:v.htmlSelfClosing,tag:H,attrs:_9(B.attrs,H,V),a:$.slice(J,B.end),b:!1},end:B.end};var N=U$.has(M),A=c$($.slice(0,Z),B.end,H);if(A===-1)return{node:{type:v.htmlSelfClosing,tag:H,attrs:_9(B.attrs,H,V),a:$.slice(J,B.end),b:!1},end:B.end};var L=QJ($,"</"+M,A),k=$.slice(B.end,L),P=[];if(N)k.trim()&&(P=[{type:v.text,text:k}]);else{var b=k.trim();if(b){var{inAnchor:y,inline:S}=Q;M==="a"&&(Q.inAnchor=!0);var T=b.indexOf(`

`)!==-1||/^#{1,6}\s/.test(b);T?(Q.inline=!1,P=N9(b,Q,V)):P=C0(b,0,b.length,Q,V),Q.inAnchor=y,Q.inline=S}}return{node:{type:v.htmlBlock,tag:H,attrs:_9(B.attrs,H,V),f:B.rawAttrs,children:P,a:void 0,text:k,d:!1,b:!1,endPos:A,e:!1},end:A}}var jJ=200,$$=0;function C0($,J,Z,Q,V){if($$++,$$>jJ)return $$--,[{type:v.text,text:$.slice(J,Z)}];let X=Q;if(V.streaming||V.optimizeForStreaming){let $9=function(X0,x){for(var R0=1,F0=x+1;F0<X0.length;F0++){var G9=X0.charCodeAt(F0);if(G9===W0)R0++;else if(G9===u0&&(R0--,R0===0))return F0}return-1},_=$.slice(J,Z),l=_;for(var Y=0,G=0,K=0,q=0,U=0,F=-1,O=-1,z=-1,j=-1,D=-1,W=0;W<_.length;W++){var B=_.charCodeAt(W);B===O0?W+1<_.length&&_.charCodeAt(W+1)===O0?(Y++,F=W,W++):(G++,O=W):B===G0?W+1<_.length&&_.charCodeAt(W+1)===G0?(K++,z=W,W++):(q++,j=W):B===M0&&W+1<_.length&&_.charCodeAt(W+1)===M0&&(U++,D=W,W++)}var H=[];U%2===1&&D>=0&&H.push([D,2]),K%2===1&&z>=0&&H.push([z,2]),q%2===1&&j>=0&&H.push([j,1]),Y%2===1&&F>=0&&H.push([F,2]),G%2===1&&O>=0&&H.push([O,1]),H.sort(function(X0,x){return x[0]-X0[0]});for(var M=0;M<H.length;M++){var R=H[M][0],N=H[M][1];_=_.slice(0,R)+_.slice(R+N)}let I0=0,P0=-1;for(let X0=0;X0<_.length;X0++)_.charCodeAt(X0)===a&&(I0++,P0=X0);if(I0%2===1&&P0!==-1){let X0=!1,x=-1,R0=0;for(;R0<_.length;)_.charCodeAt(R0)===a&&(X0?(X0=!1,x=-1):(x=R0,X0=!0)),R0++;X0&&x!==-1&&(_=_.slice(0,x))}for(var A=!0;A;){A=!1;for(var L=-1,k=-1,P=-1,b=!1,y=0;y<_.length;y++){var S=_.charCodeAt(y);if(S===W0&&(y===0||_.charCodeAt(y-1)!==_0)){var T=y>0&&_.charCodeAt(y-1)===S0,C=T?y-1:y,f=$9(_,y);if(f===-1)L=C,b=T,k=y+1,P=_.length;else{var g=f+1;if(g>=_.length)L=C,b=T,k=y+1,P=f;else if(_.charCodeAt(g)===n0){var D0=_.indexOf(")",g+1);D0===-1?(L=C,b=T,k=y+1,P=f,y=_.length):y=D0}else if(_.charCodeAt(g)===W0){var Q0=_.indexOf("]",g+1);Q0===-1?(L=C,b=T,k=y+1,P=f,y=_.length):y=Q0}else y=f}}}if(L>=0){var m=b?"":_.slice(k,P);_=_.slice(0,L)+m,A=!0}}let k0=_.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(k0&&k0.index!==void 0){var n=k0[0].length-k0[2].length,y0=n>=2&&k0[0].charCodeAt(n-2)===H0;if(!y0){for(var c0=!1,m0=0,z0=0;z0<k0.index;z0++)_.charCodeAt(z0)===a&&m0++;if(c0=m0%2===1,!c0){let X0=k0[1];x9(_,"</"+X0,0)===-1&&(_=_.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/,"$1"))}}}_!==l&&($=$.slice(0,J)+_,Z=J+_.length)}let h=[];var B0=[];let Z0=J;var K0=V.disableAutoLink||V.disableBareUrls||X.inAnchor?-1:$.indexOf("@",J);for(K0>=Z&&(K0=-1);J<Z;){let _=$.charCodeAt(J),l=null;if(_===a){if(l=qJ($,J,Z),!l){var K9=I9($,J,Z,a);J+=K9-1}}else if(_===O0||_===G0){var V0=WJ($,J,Z);if(V0){if(V0.canOpen||V0.canClose){J>Z0&&h.push(c9($.slice(Z0,J)));var j0=$.slice(J,J+V0.len),v0=c9(j0);B0.push({idx:h.length,ch:_,len:V0.len,canOpen:V0.canOpen,canClose:V0.canClose,active:!0}),h.push(v0),J+=V0.len,Z0=J;continue}J+=V0.len-1}}else if(_===M0)l=UJ($,J,Z,X,V);else if(_===T0)l=FJ($,J,Z,X,V);else if(_===W0)J+1<Z&&$.charCodeAt(J+1)===a0&&(l=OJ($,J,Z,X)),l||(l=C6($,J,Z,X,V));else if(_===S0&&J+1<Z&&$.charCodeAt(J+1)===W0)l=C6($,J,Z,X,V);else if(_===e)l=e6($,J,Z),!l&&!V.disableParsingRawHTML&&!V.ignoreHTMLBlocks&&(l=BJ($,J,Z,X,V));else if((_===h9||_===F9||_===D9)&&!X.inAnchor&&!V.disableAutoLink&&(J===0||$.charCodeAt(J-1)!==e)){var s=J+1<Z?$.charCodeAt(J+1):0;(_===h9&&s===m9||_===D9&&s===m9||_===F9&&s===F9)&&(l=HJ($,J,Z,V))}if(!l&&K0>=0&&K0-J<=64&&!X.inAnchor&&!V.disableAutoLink&&!V.disableBareUrls&&(_>=p&&_<=c||_>=Y0&&_<=q0||_>=o&&_<=r)&&(l=DJ($,J,Z,V),!l&&J>=K0&&(K0=$.indexOf("@",J+1),K0>=Z&&(K0=-1))),_===B$){J>Z0&&h.push(c9($.slice(Z0,J))),h.push({type:v.breakLine}),J++,Z0=J;continue}if(l)J>Z0&&h.push(c9($.slice(Z0,J))),h.push(l.node),J=l.end,Z0=J;else{if(_===_0&&J+1<Z){let I0=$.charCodeAt(J+1);if(o$(I0)&p9){J>Z0&&h.push(c9($.slice(Z0,J))),h.push(c9($[J+1])),J+=2,Z0=J;continue}}if(J++,K0<0||K0-J>64)for(;J<Z;){var U0=$.charCodeAt(J);if(U0<s9&&!u6[U0])J++;else break}}}if(Z>Z0){let _=$.slice(Z0,Z);_&&h.push(c9(_))}return B0.length>0&&zJ(h,B0,Q,V),$$--,h}var MJ=500;function N9($,J,Z){var Q=J.i||0;if(Q>MJ)return[{type:v.text,text:$}];J.i=Q+1;let V=J;if((Z.streaming||Z.optimizeForStreaming)&&!J.j){var X=$.length;X>0&&$.charCodeAt(X-1)===E&&X--;for(var Y=X;Y>0&&$.charCodeAt(Y-1)!==E;)Y--;if(Y>0&&$.charCodeAt(Y)===N0){for(var G=!0,K=Y;K<X;K++){var q=$.charCodeAt(K);if(q!==I&&q!==w&&q!==u&&q!==g0&&q!==N0){G=!1;break}}if(G){for(var U=Y-1;U>0&&$.charCodeAt(U-1)!==E;)U--;$.charCodeAt(U)===N0&&($=$.slice(0,U).trimEnd())}}var F=$.trim(),O=F.lastIndexOf(`
`),z=O===-1?F:F.slice(O+1);if(z.length>0&&z.charCodeAt(0)===N0){for(var j=!1,D=!1,W=1;W<z.length;W++){var B=z.charCodeAt(W);B===N0&&(j=!0),B===u&&(D=!0)}j&&D&&($=O===-1?"":$.slice(0,$.lastIndexOf(z)).trimEnd())}for(var H=-1,M=-1,R=-1,N=$.length-1;N>=0;N--)if($.charCodeAt(N)===e){var A=N+1<$.length?$.charCodeAt(N+1):0;if(A>=p&&A<=c||A>=Y0&&A<=q0){for(var L=N+2;L<$.length;){var k=$.charCodeAt(L);if(k>=p&&k<=c||k>=Y0&&k<=q0||k>=o&&k<=r)L++;else break}for(var P=L;P<$.length&&$.charCodeAt(P)!==d;)P++;if(P<$.length&&$.charCodeAt(P-1)!==H0){for(var b=!1,y=P+1;y<$.length;y++)if($.charCodeAt(y)===e){b=!0;break}b||(H=N,M=L,R=P+1)}}break}if(H>=0){for(var S=0,T=0;T<H;T++)$.charCodeAt(T)===a&&S++;if(S%2===0){var C=$.slice(H+1,M);x9($,"</"+C,0)===-1&&($=$.slice(0,H)+$.slice(R))}}for(var f=$.length;f>0&&$.charCodeAt(f-1)===E;)f--;if(f>0){for(var g=f;g>0&&$.charCodeAt(g-1)!==E;)g--;for(var D0=g,Q0=0;D0<f&&$.charCodeAt(D0)===I&&Q0<3;)D0++,Q0++;if(g>0&&D0<f&&tZ($,D0,f)){for(var m=g-1,n=m;n>0&&$.charCodeAt(n-1)!==E;)n--;d0($,n,m)||($=$.slice(0,g).trimEnd())}}var y0=$.length;if(y0>0){for(var c0=$.lastIndexOf(`
`),m0=c0===-1?0:c0+1,z0=y0,h=m0,B0=0;h<z0&&$.charCodeAt(h)===I&&B0<3;)h++,B0++;if(h<z0){var Z0=$.charCodeAt(h),K0=!1;if(Z0===O0||Z0===u||Z0===j9){var K9=h+1;if(K9>=z0||$.charCodeAt(K9)===I||$.charCodeAt(K9)===w){for(var V0=K9;V0<z0&&($.charCodeAt(V0)===I||$.charCodeAt(V0)===w);)V0++;V0>=z0&&(K0=!0)}}else if(Z0>=o&&Z0<=r){for(var j0=h;j0<z0&&$.charCodeAt(j0)>=o&&$.charCodeAt(j0)<=r;)j0++;if(j0<z0&&($.charCodeAt(j0)===p0||$.charCodeAt(j0)===s0)){var v0=j0+1;if(v0>=z0||$.charCodeAt(v0)===I||$.charCodeAt(v0)===w){for(var s=v0;s<z0&&($.charCodeAt(s)===I||$.charCodeAt(s)===w);)s++;s>=z0&&(K0=!0)}}}K0&&($=$.slice(0,m0).trimEnd())}}}if(J.inline)return C0($,0,$.length,J,Z);let U0=[],_=0,l=$.length;if(_===0&&!Z.disableFrontmatter&&$.startsWith("---")){let x=M6($);if(x&&x.hasValidYaml){if(Z.preserveFrontmatter!==!1){let R0=$.slice(0,x.endPos).trimEnd();U0.push({type:v.frontmatter,text:R0})}_=x.endPos}}for(;_<l;){for(var I0=$.indexOf(`
`,_),P0=I0<0?l:I0;_<l&&d0($,_,P0);)_=P0<l?P0+1:P0,_<l&&(I0=$.indexOf(`
`,_),P0=I0<0?l:I0);if(_>=l)break;$.charCodeAt(_),A0($,_,P0);let x=null;if(o6=$,r6=_,i6=P0,$.charCodeAt(_)!==n9&&$0>=4&&!J.inHTML)x=$J($,_);else if($.charCodeAt(_)!==n9){let R0=_+t,F0=$.charCodeAt(R0);F0===Y9?x=a6($,_,J,Z):F0===d?x=ZJ($,_,J,Z):F0===a||F0===M0?x=eZ($,_,J):F0===u||F0===O0||F0===G0?(x=T9($,_),!x&&(x=g6($,_,J,Z))):F0===j9||F0>=o&&F0<=r?x=g6($,_,J,Z):F0===e?x=s6($,_,J,Z):F0===N0?x=x6($,_,J,Z):F0===W0&&(x=XJ($,_,J))}if(!x){for(var $9=!1,k0=_;k0<P0;k0++)if($.charCodeAt(k0)===N0){$9=!0;break}$9&&(x=x6($,_,J,Z))}if(x||(x=KJ($,_,J,Z)),x)x.node.type!==v.refCollection&&U0.push(x.node),_=x.end;else{var X0=$.indexOf(`
`,_);_=X0<0?l:X0+1}}return J.i=Q,U0}function P$($,J){$$=0,$.charCodeAt(0)===65279&&($=$.slice(1)),$=m$($);let Z={inline:!1,inAnchor:!1,inHTML:!1,inList:!1,inBlockQuote:!1,refs:{}},Q={...J,slugify:J?.slugify?X=>J.slugify(X,x0):x0,sanitizer:J?.sanitizer||g9,tagfilter:J?.tagfilter!==!1};Z.j=c6($,Z.refs,Q);let V=N9($,Z,Q);return Z.refs&&Object.keys(Z.refs).length>0?[{type:v.refCollection,refs:Z.refs},...V]:V}function $Z($,J,Z,Q){var V=v9($,J);return V?{tagName:V.tag,tagLower:V.tag.toLowerCase(),attrs:V.rawAttrs,whitespaceBeforeAttrs:V.whitespaceBeforeAttrs,isSelfClosing:V.selfClosing,hasSpaceBeforeSlash:V.hasSpaceBeforeSlash,isClosing:V.isClosing,hasNewline:V.whitespaceBeforeAttrs.includes(`
`)||V.rawAttrs.includes(`
`),endPos:V.end}:null}function b$($,J,Z){$$=0,$=m$($),!J.refs&&(J.refs={}),J.j=c6($,J.refs,Z);let Q=N9($,J,Z);return J.refs&&Object.keys(J.refs).length>0?[{type:v.refCollection,refs:J.refs},...Q]:Q}var _J=/^\n+/,vJ=typeof document<"u",e0=$=>Array.isArray($)?$:[$],ZZ=$=>typeof $=="function"||typeof $=="object"&&$!==null&&"render"in $;function JZ($){if(!$)return"";let J="";for(let[Z,Q]of Object.entries($))Q===!0?J+=` ${Z}`:Q!=null&&Q!==!1&&(J+=` ${Z}="${String(Q)}"`);return J}function NJ($,J,Z,Q,V,X,Y,G){switch($.type){case v.blockQuote:{let K={},q=$.children;return $.alert&&(K.class="markdown-alert-"+X($.alert.toLowerCase(),x0),q=[{attrs:{},children:[{type:v.text,text:$.alert}],d:!0,type:v.htmlBlock,tag:"header"},...q]),Q("blockquote",K,...e0(J(q,Z)))}case v.breakLine:return Q("br",{});case v.breakThematic:return Q("hr",{});case v.frontmatter:return G.preserveFrontmatter?Q("pre",{},$.text):null;case v.codeBlock:{let K=$.lang?t9($.lang):"",q={...$.attrs||{},class:K?`language-${K} lang-${K}`:""};return Q("pre",{},Q("code",q,$.text))}case v.codeInline:return Q("code",{},$.text);case v.footnoteReference:return Q("a",{href:V($.target,"a","href")},Q("sup",{},$.text));case v.gfmTask:return Q("input",{checked:$.completed,readOnly:!0,type:"checkbox"});case v.heading:return Q(`h${$.level}`,{id:$.id},...e0(J($.children,Z)));case v.htmlBlock:{let K=$;if(G.tagfilter&&u$(K.tag)){let q=typeof K.a=="string"?K.a:`<${K.tag}${JZ(K.attrs)}>`;return Q("span",{},q)}if(K.a&&K.d){let z=function(M){if((M.type===v.htmlSelfClosing||M.type===v.htmlBlock)&&M.b)return[];if(M.type===v.paragraph){let R=M.children;return R?R.flatMap(z):[]}return M.type===v.text?M.text?.trim()?[M]:[]:M.type===v.htmlBlock&&M.children?[{...M,children:M.children?.flatMap(z)}]:[M]},q=K.tag.toLowerCase(),U=p6(q),F=/<[a-z][^>]{0,100}>/i.test(K.a);if(U){let M=K.a.replace(new RegExp("\\s*</"+q+">\\s*$","i"),"");return G.tagfilter&&(M=p$(M)),F?Q($.tag,{...$.attrs,innerHTML:M}):Q($.tag,{...$.attrs},M)}if(/<\/?pre\b/i.test(K.a)){let M=G.tagfilter?p$(K.a):K.a;return Q($.tag,{...$.attrs,innerHTML:M})}if(K.children&&K.children.length>0)return Q($.tag,{...$.attrs},J(K.children.flatMap(z),Z));let j={slugify:M=>X(M,x0),sanitizer:V,tagfilter:!0},D=K.a.replace(/>\s+</g,"><").replace(/\n+/g," ").trim();if(new RegExp(`^<${K.tag}(\\s[^>]*)?>(\\s*</${K.tag}>)?$`,"i").test(D))return Q($.tag,{...$.attrs});let B=b$(D,{inline:!1,refs:Y,inHTML:!1},j),H=J(B.flatMap(z),Z);return Q($.tag,{...$.attrs},...e0(H))}return d9($.tag)?Q($.tag,{...$.attrs}):Q($.tag,{...$.attrs},...$.children?e0(J($.children,Z)):[])}case v.htmlSelfClosing:{let K=$;if(G.tagfilter&&u$(K.tag)){let q=typeof K.a=="string"?K.a:`<${K.tag}${JZ(K.attrs)} />`;return Q("span",{},q)}return Q(K.tag,{...K.attrs})}case v.image:return Q("img",{alt:$.alt&&$.alt.length>0?$.alt:void 0,title:$.title||void 0,src:V($.target,"img","src")});case v.link:{let K={};return $.target!=null&&(K.href=I6($.target)),$.title&&(K.title=$.title),Q("a",K,...e0(J($.children,Z)))}case v.table:{let K=$;return Q("table",{},Q("thead",{},Q("tr",{},...K.header.map(function(U,F){return Q("th",{style:K.align[F]==null?{}:{textAlign:K.align[F]}},...e0(J(U,Z)))}))),K.cells.length>0?Q("tbody",{},...K.cells.map(function(U,F){return Q("tr",{},...U.map(function(z,j){return Q("td",{style:K.align[j]==null?{}:{textAlign:K.align[j]}},...e0(J(z,Z)))}))})):null)}case v.text:return $.text;case v.textFormatted:return Q($.tag,{},...e0(J($.children,Z)));case v.orderedList:case v.unorderedList:{let K=$.type===v.orderedList?"ol":"ul";return Q(K,{start:$.type===v.orderedList?$.start:void 0},...$.items.map(function(U,F){return Q("li",{},...e0(J(U,Z)))}))}case v.paragraph:return Q("p",{},...e0(J($.children,Z)));case v.ref:return null;default:return null}}var IJ=($,J,Z,Q,V,X)=>{let Y=(q,U,F)=>{let O=()=>NJ(q,z=>U(e0(z)),F,J,Z,Q,V,X);return $?$(O,q,U,F):O()},G=q=>q.map(U=>"text"in U?U.text:""),K=(q,U={})=>{let F=(U.renderDepth||0)+1;if(F>2500)return G(q);let O=[],z=!1;for(let j=0;j<q.length;j++){let D=Y(q[j],K,{...U,renderDepth:F}),W=typeof D=="string";if(W&&z)O[O.length-1]+=D;else if(D!==null)if(Array.isArray(D))for(let B=0;B<D.length;B++)O.push(D[B]);else O.push(D);z=W}return O};return K},PJ=($,J)=>{let Z=e9(J,$,void 0);if(!Z)return $;if(ZZ(Z))return Z;let Q=e9(J,`${$}.component`,$);return ZZ(Q),Q};function i$($,J){let Z={...J||{}};Z.overrides=Z.overrides||{};let Q=Z.slugify||x0,V=Z.sanitizer||g9,X=W=>QZ(W,{...Z,wrapper:null});function Y(W,B,...H){if(!vJ){let R=H.length===0?void 0:H.length===1?H[0]:H,N=R===void 0?B:{...B,children:R};return typeof W=="function"?W(N):{t:W,p:N}}let M=r$.default(W,B,...H);return typeof M=="function"?M():M}function G(W,B,...H){let M=e9(Z.overrides,`${W}.props`,{}),R=B||{};for(let k in R){let P=R[k];if(typeof P=="string"&&P.length>0&&P[0]==="<"&&(h6.test(P)||m6.test(P)||$Z(P,0))){let b=X(P.trim());R[k]=k==="innerHTML"&&Array.isArray(b)?b[0]:b}}let N=PJ(W,Z.overrides),A=P6(R?.class,M.class||void 0)||void 0,L={...R,...M};return A&&(L.class=A),R.innerHTML&&M.innerHTML===void 0&&(L.innerHTML=R.innerHTML,delete R.innerHTML),Y(N,L,...H)}let K=Z.createElement||((W,B,...H)=>Y(W,B||{},...H)),q={slugify:W=>Q(W,x0),sanitizer:V,tagfilter:Z.tagfilter!==!1,disableAutoLink:Z.disableAutoLink,disableParsingRawHTML:Z.disableParsingRawHTML,enforceAtxHeadings:Z.enforceAtxHeadings,forceBlock:Z.forceBlock,forceInline:Z.forceInline,preserveFrontmatter:Z.preserveFrontmatter},U=$[0]&&$[0].type===v.refCollection?$[0].refs:{},F=IJ(Z.renderRule,G,V,Q,U,Z),O=F($,{inline:Z.forceInline,refs:U}),z=[];for(let W in U)W.charCodeAt(0)===a0&&z.push({identifier:W,footnote:U[W].target});if(z.length&&O.push(G("footer",{},...z.map(function(B){let H=B.identifier.slice(1),M=b$(B.footnote,{inline:!0,refs:U},q),R=F(M,{inline:!0,refs:U});return G("div",{id:Q(H,x0)},H+": ",...e0(R))}))),Z.wrapper===null)return O.length===0?null:O.length===1?O[0]:O;let j=Z.wrapper||(Z.forceInline?"span":"div"),D;if(O.length>1||Z.forceWrapper)D=O;else return O.length===1?O[0]:null;return K(j,{...Z.wrapperProps},D)}function QZ($="",J={}){let Z={...J||{}};Z.overrides=Z.overrides||{};let Q=Z.slugify||x0,V=Z.sanitizer||g9;function X(K){let q=Z.forceInline||!Z.forceBlock&&!A6.test(K),U={slugify:z=>Q(z,x0),sanitizer:V,tagfilter:Z.tagfilter!==!1,disableAutoLink:Z.disableAutoLink,disableParsingRawHTML:Z.disableParsingRawHTML,enforceAtxHeadings:Z.enforceAtxHeadings,forceBlock:Z.forceBlock,forceInline:q,preserveFrontmatter:Z.preserveFrontmatter},F=K;if(!q){let z=F.length;for(;z>0&&(F[z-1]===`
`||F[z-1]==="\r");)z--;F=F.slice(0,z),F=`${F.replace(_J,"")}

`}let O=b$(q?K:F,{inline:q,refs:Y},U);return i$(O,{...Z,forceInline:q})}let Y={};return X($)}var a$=P9.createContext(void 0);function bJ($,J,...Z){if(typeof document>"u"){let V=Z.length===0?void 0:Z.length===1?Z[0]:Z,X=V===void 0?J:{...J,children:V};return typeof $=="function"?$(X):{t:$,p:X}}let Q=r$.default($,J,...Z);return typeof Q=="function"?Q():Q}var wJ=$=>{let J={value:$.options};return bJ(a$.Provider,J,$.children)},VZ=$=>{let J=P9.useContext(a$),Z=P9.createMemo(()=>({...J,...$.options})),Q=P9.createMemo(()=>{let Y=typeof $.children=="function"?$.children():$.children;return Y??""}),V=P9.createMemo(()=>P$(Q(),Z()));return P9.createMemo(()=>i$(V(),{...Z(),wrapperProps:{...Z()?.wrapperProps,...Object.fromEntries(Object.entries($).filter(([Y])=>Y!=="children"&&Y!=="options"))}}))()},yJ=VZ;
