Hey 👋, this is a gist which stores the final bundle results of the bundlejs api, learn more on the website https://bundlejs.com. This is the result of https://deno.bundlejs.com/?q=remark-gfm.
Created
October 31, 2023 18:52
-
-
Save bundle-js/0ba0ec14f61d0655ae8fdf7a172d4dbe to your computer and use it in GitHub Desktop.
Result of https://deno.bundlejs.com/?q=remark-gfm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function te(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}var jt=v(/\p{P}/u),_=v(/[A-Za-z]/),G=v(/[\dA-Za-z]/),br=v(/[#-'*+\--9=?A-Z^-~]/);function $e(e){return e!==null&&(e<32||e===127)}var dr=v(/\d/),wr=v(/[\dA-Fa-f]/),Ht=v(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function y(e){return e!==null&&(e<0||e===32)}function A(e){return e===-2||e===-1||e===32}function M(e){return Ht(e)||jt(e)}var L=v(/\s/);function v(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ne(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var z=function(e){if(e==null)return Ut;if(typeof e=="function")return X(e);if(typeof e=="object")return Array.isArray(e)?Nt(e):Wt(e);if(typeof e=="string")return qt(e);throw new Error("Expected function, string, or object as test")};function Nt(e){let n=[],t=-1;for(;++t<e.length;)n[t]=z(e[t]);return X(i);function i(...o){let l=-1;for(;++l<n.length;)if(n[l].apply(this,o))return!0;return!1}}function Wt(e){let n=e;return X(t);function t(i){let o=i,l;for(l in e)if(o[l]!==n[l])return!1;return!0}}function qt(e){return X(n);function n(t){return t&&t.type===e}}function X(e){return n;function n(t,i,o){return!!($t(t)&&e.call(this,t,typeof i=="number"?i:void 0,o||void 0))}}function Ut(){return!0}function $t(e){return e!==null&&typeof e=="object"&&"type"in e}var Qe=[],Z=!0,P=!1,K="skip";function q(e,n,t,i){let o;typeof n=="function"&&typeof t!="function"?(i=t,t=n):o=n;let l=z(o),r=i?-1:1;u(e,void 0,[])();function u(a,f,p){let s=a&&typeof a=="object"?a:{};if(typeof s.type=="string"){let g=typeof s.tagName=="string"?s.tagName:typeof s.name=="string"?s.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(g?"<"+g+">":""))+")"})}return h;function h(){let g=Qe,m,x,k;if((!n||l(a,f,p[p.length-1]||void 0))&&(g=Qt(t(a,p)),g[0]===P))return g;if("children"in a&&a.children){let b=a;if(b.children&&g[0]!==K)for(x=(i?b.children.length:-1)+r,k=p.concat(b);x>-1&&x<b.children.length;){let d=b.children[x];if(m=u(d,x,k)(),m[0]===P)return m;x=typeof m[1]=="number"?m[1]:x+r}}return g}}}function Qt(e){return Array.isArray(e)?e:typeof e=="number"?[Z,e]:e==null?Qe:[e]}function re(e,n,t){let o=z((t||{}).ignore||[]),l=Vt(n),r=-1;for(;++r<l.length;)q(e,"text",u);function u(f,p){let s=-1,h;for(;++s<p.length;){let g=p[s],m=h?h.children:void 0;if(o(g,m?m.indexOf(g):void 0,h))return;h=g}if(h)return a(f,p)}function a(f,p){let s=p[p.length-1],h=l[r][0],g=l[r][1],m=0,k=s.children.indexOf(f),b=!1,d=[];h.lastIndex=0;let w=h.exec(f.value);for(;w;){let C=w.index,F={index:w.index,input:w.input,stack:[...p,f]},T=g(...w,F);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?h.lastIndex=C+1:(m!==C&&d.push({type:"text",value:f.value.slice(m,C)}),Array.isArray(T)?d.push(...T):T&&d.push(T),m=C+w[0].length,b=!0),!h.global)break;w=h.exec(f.value)}return b?(m<f.value.length&&d.push({type:"text",value:f.value.slice(m)}),s.children.splice(k,1,...d)):d=[f],k+d.length}}function Vt(e){let n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!e[0]||Array.isArray(e[0])?e:[e],i=-1;for(;++i<t.length;){let o=t[i];n.push([Gt(o[0]),Xt(o[1])])}return n}function Gt(e){return typeof e=="string"?new RegExp(ne(e),"g"):e}function Xt(e){return typeof e=="function"?e:function(){return e}}var ie="phrasing",oe=["autolink","link","image","label"];function ae(){return{transforms:[tn],enter:{literalAutolink:Zt,literalAutolinkEmail:le,literalAutolinkHttp:le,literalAutolinkWww:le},exit:{literalAutolink:en,literalAutolinkEmail:Jt,literalAutolinkHttp:Kt,literalAutolinkWww:Yt}}}function ue(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ie,notInConstruct:oe},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ie,notInConstruct:oe},{character:":",before:"[ps]",after:"\\/",inConstruct:ie,notInConstruct:oe}]}}function Zt(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function le(e){this.config.enter.autolinkProtocol.call(this,e)}function Kt(e){this.config.exit.autolinkProtocol.call(this,e)}function Yt(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Jt(e){this.config.exit.autolinkEmail.call(this,e)}function en(e){this.exit(e)}function tn(e){re(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nn],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,rn]],{ignore:["link","linkReference"]})}function nn(e,n,t,i,o){let l="";if(!Ve(o)||(/^w/i.test(n)&&(t=n+t,n="",l="http://"),!on(t)))return!1;let r=ln(t+i);if(!r[0])return!1;let u={type:"link",title:null,url:l+n+r[0],children:[{type:"text",value:n+r[0]}]};return r[1]?[u,{type:"text",value:r[1]}]:u}function rn(e,n,t,i){return!Ve(i,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function on(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function ln(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")"),o=te(e,"("),l=te(e,")");for(;i!==-1&&o>l;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),l++;return[e,t]}function Ve(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||L(t)||M(t))&&(!n||t!==47)}function R(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Ge.peek=gn;function fe(){return{enter:{gfmFootnoteDefinition:an,gfmFootnoteDefinitionLabelString:un,gfmFootnoteCall:cn,gfmFootnoteCallString:mn},exit:{gfmFootnoteDefinition:sn,gfmFootnoteDefinitionLabelString:fn,gfmFootnoteCall:hn,gfmFootnoteCallString:pn}}}function se(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:kn,footnoteReference:Ge}}}function an(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function un(){this.buffer()}function fn(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=R(this.sliceSerialize(e)).toLowerCase()}function sn(e){this.exit(e)}function cn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mn(){this.buffer()}function pn(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=n,t.identifier=R(this.sliceSerialize(e)).toLowerCase()}function hn(e){this.exit(e)}function Ge(e,n,t,i){let o=t.createTracker(i),l=o.move("[^"),r=t.enter("footnoteReference"),u=t.enter("reference");return l+=o.move(t.safe(t.associationId(e),{...o.current(),before:l,after:"]"})),u(),r(),l+=o.move("]"),l}function gn(){return"["}function kn(e,n,t,i){let o=t.createTracker(i),l=o.move("[^"),r=t.enter("footnoteDefinition"),u=t.enter("label");return l+=o.move(t.safe(t.associationId(e),{...o.current(),before:l,after:"]"})),u(),l+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),l+=o.move(t.indentLines(t.containerFlow(e,o.current()),xn)),r(),l}function xn(e,n,t){return n===0?e:(t?"":" ")+e}var bn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xe.peek=yn;function ce(){return{canContainEols:["delete"],enter:{strikethrough:dn},exit:{strikethrough:wn}}}function me(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bn}],handlers:{delete:Xe}}}function dn(e){this.enter({type:"delete",children:[]},e)}function wn(e){this.exit(e)}function Xe(e,n,t,i){let o=t.createTracker(i),l=t.enter("strikethrough"),r=o.move("~~");return r+=t.containerPhrasing(e,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),l(),r}function yn(){return"~"}function Ke(e,n={}){let t=(n.align||[]).concat(),i=n.stringLength||An,o=[],l=[],r=[],u=[],a=0,f=-1;for(;++f<e.length;){let m=[],x=[],k=-1;for(e[f].length>a&&(a=e[f].length);++k<e[f].length;){let b=Cn(e[f][k]);if(n.alignDelimiters!==!1){let d=i(b);x[k]=d,(u[k]===void 0||d>u[k])&&(u[k]=d)}m.push(b)}l[f]=m,r[f]=x}let p=-1;if(typeof t=="object"&&"length"in t)for(;++p<a;)o[p]=Ze(t[p]);else{let m=Ze(t);for(;++p<a;)o[p]=m}p=-1;let s=[],h=[];for(;++p<a;){let m=o[p],x="",k="";m===99?(x=":",k=":"):m===108?x=":":m===114&&(k=":");let b=n.alignDelimiters===!1?1:Math.max(1,u[p]-x.length-k.length),d=x+"-".repeat(b)+k;n.alignDelimiters!==!1&&(b=x.length+b+k.length,b>u[p]&&(u[p]=b),h[p]=b),s[p]=d}l.splice(1,0,s),r.splice(1,0,h),f=-1;let g=[];for(;++f<l.length;){let m=l[f],x=r[f];p=-1;let k=[];for(;++p<a;){let b=m[p]||"",d="",w="";if(n.alignDelimiters!==!1){let C=u[p]-(x[p]||0),F=o[p];F===114?d=" ".repeat(C):F===99?C%2?(d=" ".repeat(C/2+.5),w=" ".repeat(C/2-.5)):(d=" ".repeat(C/2),w=d):w=" ".repeat(C)}n.delimiterStart!==!1&&!p&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||p)&&k.push(" "),n.alignDelimiters!==!1&&k.push(d),k.push(b),n.alignDelimiters!==!1&&k.push(w),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||p!==a-1)&&k.push("|")}g.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return g.join(` | |
| `)}function Cn(e){return e==null?"":String(e)}function An(e){return e.length}function Ze(e){let n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Ye(e,n,t,i){let o=t.enter("blockquote"),l=t.createTracker(i);l.move("> "),l.shift(2);let r=t.indentLines(t.containerFlow(e,l.current()),Sn);return o(),r}function Sn(e,n,t){return">"+(t?"":" ")+e}function et(e,n){return Je(e,n.inConstruct,!0)&&!Je(e,n.notInConstruct,!1)}function Je(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function pe(e,n,t,i){let o=-1;for(;++o<t.unsafe.length;)if(t.unsafe[o].character===` | |
| `&&et(t.stack,t.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\ | |
| `}function tt(e,n){let t=String(e),i=t.indexOf(n),o=i,l=0,r=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>r&&(r=l):l=1,o=i+n.length,i=t.indexOf(n,o);return r}function nt(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function rt(e){let n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function it(e,n,t,i){let o=rt(t),l=e.value||"",r=o==="`"?"GraveAccent":"Tilde";if(nt(e,t)){let s=t.enter("codeIndented"),h=t.indentLines(l,Tn);return s(),h}let u=t.createTracker(i),a=o.repeat(Math.max(tt(l,o)+1,3)),f=t.enter("codeFenced"),p=u.move(a);if(e.lang){let s=t.enter(`codeFencedLang${r}`);p+=u.move(t.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),s()}if(e.lang&&e.meta){let s=t.enter(`codeFencedMeta${r}`);p+=u.move(" "),p+=u.move(t.safe(e.meta,{before:p,after:` | |
| `,encode:["`"],...u.current()})),s()}return p+=u.move(` | |
| `),l&&(p+=u.move(l+` | |
| `)),p+=u.move(a),f(),p}function Tn(e,n,t){return(t?"":" ")+e}function B(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function ot(e,n,t,i){let o=B(t),l=o==='"'?"Quote":"Apostrophe",r=t.enter("definition"),u=t.enter("label"),a=t.createTracker(i),f=a.move("[");return f+=a.move(t.safe(t.associationId(e),{before:f,after:"]",...a.current()})),f+=a.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(t.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(u=t.enter("destinationRaw"),f+=a.move(t.safe(e.url,{before:f,after:e.title?" ":` | |
| `,...a.current()}))),u(),e.title&&(u=t.enter(`title${l}`),f+=a.move(" "+o),f+=a.move(t.safe(e.title,{before:f,after:o,...a.current()})),f+=a.move(o),u()),r(),f}function lt(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}he.peek=Fn;function he(e,n,t,i){let o=lt(t),l=t.enter("emphasis"),r=t.createTracker(i),u=r.move(o);return u+=r.move(t.containerPhrasing(e,{before:u,after:o,...r.current()})),u+=r.move(o),l(),u}function Fn(e,n,t){return t.options.emphasis||"*"}function ge(e,n,t,i){let o,l,r;typeof n=="function"&&typeof t!="function"?(l=void 0,r=n,o=t):(l=n,r=t,o=i),q(e,l,u,o);function u(a,f){let p=f[f.length-1],s=p?p.children.indexOf(a):void 0;return r(a,s,p)}}var Ln={};function U(e,n){let t=n||Ln,i=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,o=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return ut(e,i,o)}function ut(e,n,t){if(In(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return at(e.children,n,t)}return Array.isArray(e)?at(e,n,t):""}function at(e,n,t){let i=[],o=-1;for(;++o<e.length;)i[o]=ut(e[o],n,t);return i.join("")}function In(e){return!!(e&&typeof e=="object")}function ft(e,n){let t=!1;return ge(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,P}),!!((!e.depth||e.depth<3)&&U(e)&&(n.options.setext||t))}function st(e,n,t,i){let o=Math.max(Math.min(6,e.depth||1),1),l=t.createTracker(i);if(ft(e,t)){let p=t.enter("headingSetext"),s=t.enter("phrasing"),h=t.containerPhrasing(e,{...l.current(),before:` | |
| `,after:` | |
| `});return s(),p(),h+` | |
| `+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` | |
| `))+1))}let r="#".repeat(o),u=t.enter("headingAtx"),a=t.enter("phrasing");l.move(r+" ");let f=t.containerPhrasing(e,{before:"# ",after:` | |
| `,...l.current()});return/^[\t ]/.test(f)&&(f="&#x"+f.charCodeAt(0).toString(16).toUpperCase()+";"+f.slice(1)),f=f?r+" "+f:r,t.options.closeAtx&&(f+=" "+r),a(),u(),f}ke.peek=Dn;function ke(e){return e.value||""}function Dn(){return"<"}xe.peek=En;function xe(e,n,t,i){let o=B(t),l=o==='"'?"Quote":"Apostrophe",r=t.enter("image"),u=t.enter("label"),a=t.createTracker(i),f=a.move("![");return f+=a.move(t.safe(e.alt,{before:f,after:"]",...a.current()})),f+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(t.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(u=t.enter("destinationRaw"),f+=a.move(t.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=t.enter(`title${l}`),f+=a.move(" "+o),f+=a.move(t.safe(e.title,{before:f,after:o,...a.current()})),f+=a.move(o),u()),f+=a.move(")"),r(),f}function En(){return"!"}be.peek=vn;function be(e,n,t,i){let o=e.referenceType,l=t.enter("imageReference"),r=t.enter("label"),u=t.createTracker(i),a=u.move("!["),f=t.safe(e.alt,{before:a,after:"]",...u.current()});a+=u.move(f+"]["),r();let p=t.stack;t.stack=[],r=t.enter("reference");let s=t.safe(t.associationId(e),{before:a,after:"]",...u.current()});return r(),t.stack=p,l(),o==="full"||!f||f!==s?a+=u.move(s+"]"):o==="shortcut"?a=a.slice(0,-1):a+=u.move("]"),a}function vn(){return"!"}de.peek=zn;function de(e,n,t){let i=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<t.unsafe.length;){let r=t.unsafe[l],u=t.compilePattern(r),a;if(r.atBreak)for(;a=u.exec(i);){let f=a.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(a.index+1)}}return o+i+o}function zn(){return"`"}function we(e,n){let t=U(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ye.peek=Mn;function ye(e,n,t,i){let o=B(t),l=o==='"'?"Quote":"Apostrophe",r=t.createTracker(i),u,a;if(we(e,t)){let p=t.stack;t.stack=[],u=t.enter("autolink");let s=r.move("<");return s+=r.move(t.containerPhrasing(e,{before:s,after:">",...r.current()})),s+=r.move(">"),u(),t.stack=p,s}u=t.enter("link"),a=t.enter("label");let f=r.move("[");return f+=r.move(t.containerPhrasing(e,{before:f,after:"](",...r.current()})),f+=r.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),f+=r.move("<"),f+=r.move(t.safe(e.url,{before:f,after:">",...r.current()})),f+=r.move(">")):(a=t.enter("destinationRaw"),f+=r.move(t.safe(e.url,{before:f,after:e.title?" ":")",...r.current()}))),a(),e.title&&(a=t.enter(`title${l}`),f+=r.move(" "+o),f+=r.move(t.safe(e.title,{before:f,after:o,...r.current()})),f+=r.move(o),a()),f+=r.move(")"),u(),f}function Mn(e,n,t){return we(e,t)?"<":"["}Ce.peek=Pn;function Ce(e,n,t,i){let o=e.referenceType,l=t.enter("linkReference"),r=t.enter("label"),u=t.createTracker(i),a=u.move("["),f=t.containerPhrasing(e,{before:a,after:"]",...u.current()});a+=u.move(f+"]["),r();let p=t.stack;t.stack=[],r=t.enter("reference");let s=t.safe(t.associationId(e),{before:a,after:"]",...u.current()});return r(),t.stack=p,l(),o==="full"||!f||f!==s?a+=u.move(s+"]"):o==="shortcut"?a=a.slice(0,-1):a+=u.move("]"),a}function Pn(){return"["}function j(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function ct(e){let n=j(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function mt(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Y(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function pt(e,n,t,i){let o=t.enter("list"),l=t.bulletCurrent,r=e.ordered?mt(t):j(t),u=e.ordered?r==="."?")":".":ct(t),a=n&&t.bulletLastUsed?r===t.bulletLastUsed:!1;if(!e.ordered){let p=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&p&&(!p.children||!p.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(a=!0),Y(t)===r&&p){let s=-1;for(;++s<e.children.length;){let h=e.children[s];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(r=u),t.bulletCurrent=r;let f=t.containerFlow(e,i);return t.bulletLastUsed=r,t.bulletCurrent=l,o(),f}function ht(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function gt(e,n,t,i){let o=ht(t),l=t.bulletCurrent||j(t);n&&n.type==="list"&&n.ordered&&(l=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+l);let r=l.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(r=Math.ceil(r/4)*4);let u=t.createTracker(i);u.move(l+" ".repeat(r-l.length)),u.shift(r);let a=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,u.current()),p);return a(),f;function p(s,h,g){return h?(g?"":" ".repeat(r))+s:(g?l:l+" ".repeat(r-l.length))+s}}function kt(e,n,t,i){let o=t.enter("paragraph"),l=t.enter("phrasing"),r=t.containerPhrasing(e,i);return l(),o(),r}var Ae=z(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function xt(e,n,t,i){return(e.children.some(function(r){return Ae(r)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function bt(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Se.peek=Rn;function Se(e,n,t,i){let o=bt(t),l=t.enter("strong"),r=t.createTracker(i),u=r.move(o+o);return u+=r.move(t.containerPhrasing(e,{before:u,after:o,...r.current()})),u+=r.move(o+o),l(),u}function Rn(e,n,t){return t.options.strong||"*"}function dt(e,n,t,i){return t.safe(e.value,i)}function wt(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function yt(e,n,t){let i=(Y(t)+(t.options.ruleSpaces?" ":"")).repeat(wt(t));return t.options.ruleSpaces?i.slice(0,-1):i}var $={blockquote:Ye,break:pe,code:it,definition:ot,emphasis:he,hardBreak:pe,heading:st,html:ke,image:xe,imageReference:be,inlineCode:de,link:ye,linkReference:Ce,list:pt,listItem:gt,paragraph:kt,root:xt,strong:Se,text:dt,thematicBreak:yt};function Fe(){return{enter:{table:On,tableData:Ct,tableHeader:Ct,tableRow:Bn},exit:{codeText:jn,table:_n,tableData:Te,tableHeader:Te,tableRow:Te}}}function On(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function _n(e){this.exit(e),this.data.inTable=void 0}function Bn(e){this.enter({type:"tableRow",children:[]},e)}function Te(e){this.exit(e)}function Ct(e){this.enter({type:"tableCell",children:[]},e)}function jn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Hn));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Hn(e,n){return n==="|"?n:e}function Le(e){let n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,o=n.stringLength,l=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` | |
| `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:r,tableCell:a,tableRow:u}};function r(g,m,x,k){return f(p(g,x,k),g.align)}function u(g,m,x,k){let b=s(g,x,k),d=f([b]);return d.slice(0,d.indexOf(` | |
| `))}function a(g,m,x,k){let b=x.enter("tableCell"),d=x.enter("phrasing"),w=x.containerPhrasing(g,{...k,before:l,after:l});return d(),b(),w}function f(g,m){return Ke(g,{align:m,alignDelimiters:i,padding:t,stringLength:o})}function p(g,m,x){let k=g.children,b=-1,d=[],w=m.enter("table");for(;++b<k.length;)d[b]=s(k[b],m,x);return w(),d}function s(g,m,x){let k=g.children,b=-1,d=[],w=m.enter("tableRow");for(;++b<k.length;)d[b]=a(k[b],g,m,x);return w(),d}function h(g,m,x){let k=$.inlineCode(g,m,x);return x.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Ie(){return{exit:{taskListCheckValueChecked:At,taskListCheckValueUnchecked:At,paragraph:Nn}}}function De(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wn}}}function At(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Nn(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let i=t.children[0];if(i&&i.type==="text"){let o=n.children,l=-1,r;for(;++l<o.length;){let u=o[l];if(u.type==="paragraph"){r=u;break}}r===t&&(i.value=i.value.slice(1),i.value.length===0?t.children.shift():t.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,t.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function Wn(e,n,t,i){let o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",u=t.createTracker(i);l&&u.move(r);let a=$.listItem(e,n,t,{...i,...u.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),a;function f(p){return p+r}}function Ee(){return[ae(),fe(),ce(),Fe(),Ie()]}function ve(e){return{extensions:[ue(),se(),me(),Le(e),De()]}}function H(e,n,t,i){let o=e.length,l=0,r;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,t=t>0?t:0,i.length<1e4)r=Array.from(i),r.unshift(n,t),e.splice(...r);else for(t&&e.splice(n,t);l<i.length;)r=i.slice(l,l+1e4),r.unshift(n,0),e.splice(...r),l+=1e4,n+=1e4}var St={}.hasOwnProperty;function Tt(e){let n={},t=-1;for(;++t<e.length;)qn(n,e[t]);return n}function qn(e,n){let t;for(t in n){let o=(St.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t],r;if(l)for(r in l){St.call(o,r)||(o[r]=[]);let u=l[r];Un(o[r],Array.isArray(u)?u:u?[u]:[])}}}function Un(e,n){let t=-1,i=[];for(;++t<n.length;)(n[t].add==="after"?e:i).push(n[t]);H(e,0,0,i)}var $n={tokenize:Zn,partial:!0},Ft={tokenize:Kn,partial:!0},Lt={tokenize:Yn,partial:!0},It={tokenize:Jn,partial:!0},Qn={tokenize:er,partial:!0},Dt={tokenize:Gn,previous:vt},Et={tokenize:Xn,previous:zt},E={tokenize:Vn,previous:Mt},I={};function Me(){return{text:I}}var O=48;for(;O<123;)I[O]=E,O++,O===58?O=65:O===91&&(O=97);I[43]=E;I[45]=E;I[46]=E;I[95]=E;I[72]=[E,Et];I[104]=[E,Et];I[87]=[E,Dt];I[119]=[E,Dt];function Vn(e,n,t){let i=this,o,l;return r;function r(s){return!ze(s)||!Mt.call(i,i.previous)||Pe(i.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(s))}function u(s){return ze(s)?(e.consume(s),u):s===64?(e.consume(s),a):t(s)}function a(s){return s===46?e.check(Qn,p,f)(s):s===45||s===95||G(s)?(l=!0,e.consume(s),a):p(s)}function f(s){return e.consume(s),o=!0,a}function p(s){return l&&o&&_(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(s)):t(s)}}function Gn(e,n,t){let i=this;return o;function o(r){return r!==87&&r!==119||!vt.call(i,i.previous)||Pe(i.events)?t(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($n,e.attempt(Ft,e.attempt(Lt,l),t),t)(r))}function l(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(r)}}function Xn(e,n,t){let i=this,o="",l=!1;return r;function r(s){return(s===72||s===104)&&zt.call(i,i.previous)&&!Pe(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(s),e.consume(s),u):t(s)}function u(s){if(_(s)&&o.length<5)return o+=String.fromCodePoint(s),e.consume(s),u;if(s===58){let h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(s),a}return t(s)}function a(s){return s===47?(e.consume(s),l?f:(l=!0,a)):t(s)}function f(s){return s===null||$e(s)||y(s)||L(s)||M(s)?t(s):e.attempt(Ft,e.attempt(Lt,p),t)(s)}function p(s){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(s)}}function Zn(e,n,t){let i=0;return o;function o(r){return(r===87||r===119)&&i<3?(i++,e.consume(r),o):r===46&&i===3?(e.consume(r),l):t(r)}function l(r){return r===null?t(r):n(r)}}function Kn(e,n,t){let i,o,l;return r;function r(f){return f===46||f===95?e.check(It,a,u)(f):f===null||y(f)||L(f)||f!==45&&M(f)?a(f):(l=!0,e.consume(f),r)}function u(f){return f===95?i=!0:(o=i,i=void 0),e.consume(f),r}function a(f){return o||i||!l?t(f):n(f)}}function Yn(e,n){let t=0,i=0;return o;function o(r){return r===40?(t++,e.consume(r),o):r===41&&i<t?l(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(It,n,l)(r):r===null||y(r)||L(r)?n(r):(e.consume(r),o)}function l(r){return r===41&&i++,e.consume(r),o}}function Jn(e,n,t){return i;function i(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),i):u===38?(e.consume(u),l):u===93?(e.consume(u),o):u===60||u===null||y(u)||L(u)?n(u):t(u)}function o(u){return u===null||u===40||u===91||y(u)||L(u)?n(u):i(u)}function l(u){return _(u)?r(u):t(u)}function r(u){return u===59?(e.consume(u),i):_(u)?(e.consume(u),r):t(u)}}function er(e,n,t){return i;function i(l){return e.consume(l),o}function o(l){return G(l)?t(l):n(l)}}function vt(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||y(e)}function zt(e){return!_(e)}function Mt(e){return!(e===47||ze(e))}function ze(e){return e===43||e===45||e===46||e===95||G(e)}function Pe(e){let n=e.length,t=!1;for(;n--;){let i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){t=!0;break}if(i._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function Re(e){if(e===null||y(e)||L(e))return 1;if(M(e))return 2}function Pt(e,n,t){let i=[],o=-1;for(;++o<e.length;){let l=e[o].resolveAll;l&&!i.includes(l)&&(n=l(n,t),i.push(l))}return n}function S(e,n,t,i){let o=i?i-1:Number.POSITIVE_INFINITY,l=0;return r;function r(a){return A(a)?(e.enter(t),u(a)):n(a)}function u(a){return A(a)&&l++<o?(e.consume(a),u):(e.exit(t),n(a))}}var Oe={tokenize:tr,partial:!0};function tr(e,n,t){return i;function i(l){return A(l)?S(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||D(l)?n(l):t(l)}}var nr={tokenize:fr,partial:!0};function _e(){return{document:{91:{tokenize:lr,continuation:{tokenize:ar},exit:ur}},text:{91:{tokenize:or},93:{add:"after",tokenize:rr,resolveTo:ir}}}}function rr(e,n,t){let i=this,o=i.events.length,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),r;for(;o--;){let a=i.events[o][1];if(a.type==="labelImage"){r=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return u;function u(a){if(!r||!r._balanced)return t(a);let f=R(i.sliceSerialize({start:r.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?t(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),n(a))}}function ir(e,n){let t=e.length,i;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){i=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let o={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;let r={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},a=[e[t+1],e[t+2],["enter",o,n],e[t+3],e[t+4],["enter",l,n],["exit",l,n],["enter",r,n],["enter",u,n],["exit",u,n],["exit",r,n],e[e.length-2],e[e.length-1],["exit",o,n]];return e.splice(t,e.length-t+1,...a),e}function or(e,n,t){let i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),l=0,r;return u;function u(s){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),a}function a(s){return s!==94?t(s):(e.enter("gfmFootnoteCallMarker"),e.consume(s),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(s){if(l>999||s===93&&!r||s===null||s===91||y(s))return t(s);if(s===93){e.exit("chunkString");let h=e.exit("gfmFootnoteCallString");return o.includes(R(i.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return y(s)||(r=!0),l++,e.consume(s),s===92?p:f}function p(s){return s===91||s===92||s===93?(e.consume(s),l++,f):f(s)}}function lr(e,n,t){let i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),l,r=0,u;return a;function a(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):t(m)}function p(m){if(r>999||m===93&&!u||m===null||m===91||y(m))return t(m);if(m===93){e.exit("chunkString");let x=e.exit("gfmFootnoteDefinitionLabelString");return l=R(i.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return y(m)||(u=!0),r++,e.consume(m),m===92?s:p}function s(m){return m===91||m===92||m===93?(e.consume(m),r++,p):p(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(l)||o.push(l),S(e,g,"gfmFootnoteDefinitionWhitespace")):t(m)}function g(m){return n(m)}}function ar(e,n,t){return e.check(Oe,n,e.attempt(nr,n,t))}function ur(e){e.exit("gfmFootnoteDefinition")}function fr(e,n,t){let i=this;return S(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(l){let r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?n(l):t(l)}}function Be(e){let t=(e||{}).singleTilde,i={tokenize:l,resolveAll:o};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(r,u){let a=-1;for(;++a<r.length;)if(r[a][0]==="enter"&&r[a][1].type==="strikethroughSequenceTemporary"&&r[a][1]._close){let f=a;for(;f--;)if(r[f][0]==="exit"&&r[f][1].type==="strikethroughSequenceTemporary"&&r[f][1]._open&&r[a][1].end.offset-r[a][1].start.offset===r[f][1].end.offset-r[f][1].start.offset){r[a][1].type="strikethroughSequence",r[f][1].type="strikethroughSequence";let p={type:"strikethrough",start:Object.assign({},r[f][1].start),end:Object.assign({},r[a][1].end)},s={type:"strikethroughText",start:Object.assign({},r[f][1].end),end:Object.assign({},r[a][1].start)},h=[["enter",p,u],["enter",r[f][1],u],["exit",r[f][1],u],["enter",s,u]],g=u.parser.constructs.insideSpan.null;g&&H(h,h.length,0,Pt(g,r.slice(f+1,a),u)),H(h,h.length,0,[["exit",s,u],["enter",r[a][1],u],["exit",r[a][1],u],["exit",p,u]]),H(r,f-1,a-f+3,h),a=f+h.length-2;break}}for(a=-1;++a<r.length;)r[a][1].type==="strikethroughSequenceTemporary"&&(r[a][1].type="data");return r}function l(r,u,a){let f=this.previous,p=this.events,s=0;return h;function h(m){return f===126&&p[p.length-1][1].type!=="characterEscape"?a(m):(r.enter("strikethroughSequenceTemporary"),g(m))}function g(m){let x=Re(f);if(m===126)return s>1?a(m):(r.consume(m),s++,g);if(s<2&&!t)return a(m);let k=r.exit("strikethroughSequenceTemporary"),b=Re(m);return k._open=!b||b===2&&!!x,k._close=!x||x===2&&!!b,u(m)}}}var J=class{constructor(){this.map=[]}add(n,t,i){sr(this,n,t,i)}consume(n){if(this.map.sort(function(l,r){return l[0]-r[0]}),this.map.length===0)return;let t=this.map.length,i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push([...n]),n.length=0;let o=i.pop();for(;o;)n.push(...o),o=i.pop();this.map.length=0}};function sr(e,n,t,i){let o=0;if(!(t===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=t,e.map[o][2].push(...i);return}o+=1}e.map.push([n,t,i])}}function Rt(e,n){let t=!1,i=[];for(;n<e.length;){let o=e[n];if(t){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return i}function je(){return{flow:{null:{tokenize:cr,resolveAll:mr}}}}function cr(e,n,t){let i=this,o=0,l=0,r;return u;function u(c){let W=i.events.length-1;for(;W>-1;){let Ue=i.events[W][1].type;if(Ue==="lineEnding"||Ue==="linePrefix")W--;else break}let We=W>-1?i.events[W][1].type:null,qe=We==="tableHead"||We==="tableRow"?T:a;return qe===T&&i.parser.lazy[i.now().line]?t(c):qe(c)}function a(c){return e.enter("tableHead"),e.enter("tableRow"),f(c)}function f(c){return c===124||(r=!0,l+=1),p(c)}function p(c){return c===null?t(c):D(c)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),g):t(c):A(c)?S(e,p,"whitespace")(c):(l+=1,r&&(r=!1,o+=1),c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),r=!0,p):(e.enter("data"),s(c)))}function s(c){return c===null||c===124||y(c)?(e.exit("data"),p(c)):(e.consume(c),c===92?h:s)}function h(c){return c===92||c===124?(e.consume(c),s):s(c)}function g(c){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(c):(e.enter("tableDelimiterRow"),r=!1,A(c)?S(e,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):m(c))}function m(c){return c===45||c===58?k(c):c===124?(r=!0,e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),x):F(c)}function x(c){return A(c)?S(e,k,"whitespace")(c):k(c)}function k(c){return c===58?(l+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),b):c===45?(l+=1,b(c)):c===null||D(c)?C(c):F(c)}function b(c){return c===45?(e.enter("tableDelimiterFiller"),d(c)):F(c)}function d(c){return c===45?(e.consume(c),d):c===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(c),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(c))}function w(c){return A(c)?S(e,C,"whitespace")(c):C(c)}function C(c){return c===124?m(c):c===null||D(c)?!r||o!==l?F(c):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(c)):F(c)}function F(c){return t(c)}function T(c){return e.enter("tableRow"),Q(c)}function Q(c){return c===124?(e.enter("tableCellDivider"),e.consume(c),e.exit("tableCellDivider"),Q):c===null||D(c)?(e.exit("tableRow"),n(c)):A(c)?S(e,Q,"whitespace")(c):(e.enter("data"),V(c))}function V(c){return c===null||c===124||y(c)?(e.exit("data"),Q(c)):(e.consume(c),c===92?Bt:V)}function Bt(c){return c===92||c===124?(e.consume(c),V):V(c)}}function mr(e,n){let t=-1,i=!0,o=0,l=[0,0,0,0],r=[0,0,0,0],u=!1,a=0,f,p,s,h=new J;for(;++t<e.length;){let g=e[t],m=g[1];g[0]==="enter"?m.type==="tableHead"?(u=!1,a!==0&&(Ot(h,n,a,f,p),p=void 0,a=0),f={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",f,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(i=!0,s=void 0,l=[0,0,0,0],r=[0,t+1,0,0],u&&(u=!1,p={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",p,n]])),o=m.type==="tableDelimiterRow"?2:p?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(l[1]!==0&&(r[0]=r[1],s=ee(h,n,l,o,void 0,s),l=[0,0,0,0]),r[2]=t)):m.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(r[0]=r[1],s=ee(h,n,l,o,void 0,s)),l=r,r=[l[1],t,0,0])):m.type==="tableHead"?(u=!0,a=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(a=t,l[1]!==0?(r[0]=r[1],s=ee(h,n,l,o,t,s)):r[1]!==0&&(s=ee(h,n,r,o,t,s)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(r[3]=t)}for(a!==0&&Ot(h,n,a,f,p),h.consume(n.events),t=-1;++t<n.events.length;){let g=n.events[t];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=Rt(n.events,t))}return e}function ee(e,n,t,i,o,l){let r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";t[0]!==0&&(l.end=Object.assign({},N(n.events,t[0])),e.add(t[0],0,[["exit",l,n]]));let a=N(n.events,t[1]);if(l={type:r,start:Object.assign({},a),end:Object.assign({},a)},e.add(t[1],0,[["enter",l,n]]),t[2]!==0){let f=N(n.events,t[2]),p=N(n.events,t[3]),s={type:u,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(t[2],0,[["enter",s,n]]),i!==2){let h=n.events[t[2]],g=n.events[t[3]];if(h[1].end=Object.assign({},g[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){let m=t[2]+1,x=t[3]-t[2]-1;e.add(m,x,[])}}e.add(t[3]+1,0,[["exit",s,n]])}return o!==void 0&&(l.end=Object.assign({},N(n.events,o)),e.add(o,0,[["exit",l,n]]),l=void 0),l}function Ot(e,n,t,i,o){let l=[],r=N(n.events,t);o&&(o.end=Object.assign({},r),l.push(["exit",o,n])),i.end=Object.assign({},r),l.push(["exit",i,n]),e.add(t+1,0,l)}function N(e,n){let t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}var pr={tokenize:hr};function He(){return{text:{91:pr}}}function hr(e,n,t){let i=this;return o;function o(a){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return y(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),r):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),r):t(a)}function r(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):t(a)}function u(a){return D(a)?n(a):A(a)?e.check({tokenize:gr},n,t)(a):t(a)}}function gr(e,n,t){return S(e,i,"whitespace");function i(o){return o===null?t(o):n(o)}}function _t(e){return Tt([Me(),_e(),Be(e),je(),He()])}var kr={};function Ne(e){let n=this,t=e||kr,i=n.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(_t(t)),l.push(Ee()),r.push(ve(t))}export{Ne as default}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment