import{c as fn}from"./vendor-micromark-util-combine-extensions-d8XJZrgA.js";import{f as K}from"./vendor-micromark-factory-space-BM4zcA-B.js";import{m as V}from"./vendor-micromark-util-character-Cn8n62xE.js";import{s as G,p as dn}from"./vendor-micromark-util-chunked-DrRIdSP-.js";import{b as hn,c as pn,a as xn,l as b,d as mn,e as H,f as Z,t as Q,s as nn,h as gn,g as kn,i as rn,j as on,k as wn,m as J,n as bn,o as Cn,p as _n,q as vn,r as In,u as yn,v as U}from"./vendor-micromark-core-commonmark-BEN53qso.js";import{r as Sn}from"./vendor-micromark-util-resolve-all-PQCKh0dx.js";import{s as Tn}from"./vendor-micromark-util-subtokenize-BF1Jf29a.js";const An={tokenize:zn};function zn(n){const t=n.attempt(this.parser.constructs.contentInitial,e,o);let r;return t;function e(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),K(n,t,"linePrefix")}function o(l){return n.enter("paragraph"),i(l)}function i(l){const d=n.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,u(l)}function u(l){if(l===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(l);return}return V(l)?(n.consume(l),n.exit("chunkText"),i):(n.consume(l),u)}}const Fn={tokenize:En},en={tokenize:Bn};function En(n){const t=this,r=[];let e=0,o,i,u;return l;function l(a){if(eu))return;const C=t.events.length;let T=C,P,A;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(P){A=t.events[T][1].end;break}P=!0}for(S(e),m=C;ma;){const w=r[k];t.containerState=w[1],w[0].exit.call(t,n)}r.length=a}function F(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Bn(n,t,r){return K(n,n.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const On={tokenize:Pn};function Pn(n){const t=this,r=n.attempt(hn,e,n.attempt(this.parser.constructs.flowInitial,o,K(n,n.attempt(this.parser.constructs.flow,o,n.attempt(pn,o)),"linePrefix")));return r;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t.currentConstruct=void 0,r}}const jn={resolveAll:un()},Ln=sn("string"),$n=sn("text");function sn(n){return{resolveAll:un(n==="text"?Mn:void 0),tokenize:t};function t(r){const e=this,o=this.parser.constructs[n],i=r.attempt(o,u,l);return u;function u(h){return s(h)?i(h):l(h)}function l(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),d}function d(h){return s(h)?(r.exit("data"),i(h)):(r.consume(h),d)}function s(h){if(h===null)return!0;const p=o[h];let x=-1;if(p)for(;++x-1){const l=u[0];typeof l=="string"?u[0]=l.slice(e):u.shift()}i>0&&u.push(n[o].slice(0,i))}return u}function Xn(n,t){let r=-1;const e=[];let o;for(;++r