Xdg.Directories/public/chunk-LXB37CFX.min.js
2024-07-10 19:39:30 +00:00

8 lines
57 KiB
JavaScript
Executable file

import{Ga as gt,a as xt,bb as dt}from"./chunk-YEACHCAA.min.js";import{c as ue}from"./chunk-XUHMPXWX.min.js";var ae={};function Un(n,r){let t=r||ae,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return yt(n,e,u)}function yt(n,r,t){if(oe(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return kt(n.children,r,t)}return Array.isArray(n)?kt(n,r,t):""}function kt(n,r,t){let e=[],u=-1;for(;++u<n.length;)e[u]=yt(n[u],r,t);return e.join("")}function oe(n){return!!(n&&typeof n=="object")}function Z(n,r,t,e){let u=n.length,a=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)i=Array.from(e),i.unshift(r,t),[].splice.apply(n,i);else for(t&&[].splice.apply(n,[r,t]);a<e.length;)i=e.slice(a,a+1e4),i.unshift(r,0),[].splice.apply(n,i),a+=1e4,r+=1e4}function J(n,r){return n.length>0?(Z(n,n.length,0,r),n):r}var bt={}.hasOwnProperty;function St(n){let r={},t=-1;for(;++t<n.length;)le(r,n[t]);return r}function le(n,r){let t;for(t in r){let u=(bt.call(n,t)?n[t]:void 0)||(n[t]={}),a=r[t],i;for(i in a){bt.call(u,i)||(u[i]=[]);let o=a[i];se(u[i],Array.isArray(o)?o:o?[o]:[])}}}function se(n,r){let t=-1,e=[];for(;++t<r.length;)(r[t].add==="after"?n:e).push(r[t]);Z(n,0,0,e)}var Et=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var v=sn(/[A-Za-z]/),zn=sn(/\d/),wt=sn(/[\dA-Fa-f]/),K=sn(/[\dA-Za-z]/),Ft=sn(/[!-/:-@[-`{-~]/),$n=sn(/[#-'*+\--9=?A-Z^-~]/);function In(n){return n!==null&&(n<32||n===127)}function V(n){return n!==null&&(n<0||n===32)}function S(n){return n!==null&&n<-2}function I(n){return n===-2||n===-1||n===32}var Ct=sn(/\s/),At=sn(Et);function sn(n){return r;function r(t){return t!==null&&n.test(String.fromCharCode(t))}}function C(n,r,t,e){let u=e?e-1:Number.POSITIVE_INFINITY,a=0;return i;function i(p){return I(p)?(n.enter(t),o(p)):r(p)}function o(p){return I(p)&&a++<u?(n.consume(p),o):(n.exit(t),r(p))}}var zt={tokenize:ce};function ce(n){let r=n.attempt(this.parser.constructs.contentInitial,e,u),t;return r;function e(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),C(n,r,"linePrefix")}function u(o){return n.enter("paragraph"),a(o)}function a(o){let p=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(o);return}return S(o)?(n.consume(o),n.exit("chunkText"),a):(n.consume(o),i)}}var Tt={tokenize:pe},It={tokenize:me};function pe(n){let r=this,t=[],e=0,u,a,i;return o;function o(w){if(e<t.length){let P=t[e];return r.containerState=P[1],n.attempt(P[0].continuation,p,m)(w)}return m(w)}function p(w){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&R();let P=r.events.length,_=P,d;for(;_--;)if(r.events[_][0]==="exit"&&r.events[_][1].type==="chunkFlow"){d=r.events[_][1].end;break}b(e);let j=P;for(;j<r.events.length;)r.events[j][1].end=Object.assign({},d),j++;return Z(r.events,_+1,0,r.events.slice(P)),r.events.length=j,m(w)}return o(w)}function m(w){if(e===t.length){if(!u)return h(w);if(u.currentConstruct&&u.currentConstruct.concrete)return g(w);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(It,c,y)(w)}function c(w){return u&&R(),b(e),h(w)}function y(w){return r.parser.lazy[r.now().line]=e!==t.length,i=r.now().offset,g(w)}function h(w){return r.containerState={},n.attempt(It,x,g)(w)}function x(w){return e++,t.push([r.currentConstruct,r.containerState]),h(w)}function g(w){if(w===null){u&&R(),b(0),n.consume(w);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:u}),L(w)}function L(w){if(w===null){O(n.exit("chunkFlow"),!0),b(0),n.consume(w);return}return S(w)?(n.consume(w),O(n.exit("chunkFlow")),e=0,r.interrupt=void 0,o):(n.consume(w),L)}function O(w,P){let _=r.sliceStream(w);if(P&&_.push(null),w.previous=a,a&&(a.next=w),a=w,u.defineSkip(w.start),u.write(_),r.parser.lazy[w.start.line]){let d=u.events.length;for(;d--;)if(u.events[d][1].start.offset<i&&(!u.events[d][1].end||u.events[d][1].end.offset>i))return;let j=r.events.length,H=j,M,Q;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(M){Q=r.events[H][1].end;break}M=!0}for(b(e),d=j;d<r.events.length;)r.events[d][1].end=Object.assign({},Q),d++;Z(r.events,H+1,0,r.events.slice(j)),r.events.length=d}}function b(w){let P=t.length;for(;P-- >w;){let _=t[P];r.containerState=_[1],_[0].exit.call(r,n)}t.length=w}function R(){u.write([null]),a=void 0,u=void 0,r.containerState._closeFlow=void 0}}function me(n,r,t){return C(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zn(n){if(n===null||V(n)||Ct(n))return 1;if(At(n))return 2}function yn(n,r,t){let e=[],u=-1;for(;++u<n.length;){let a=n[u].resolveAll;a&&!e.includes(a)&&(r=a(r,t),e.push(a))}return r}var Tn={name:"attention",tokenize:fe,resolveAll:he};function he(n,r){let t=-1,e,u,a,i,o,p,m,c;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(e=t;e--;)if(n[e][0]==="exit"&&n[e][1].type==="attentionSequence"&&n[e][1]._open&&r.sliceSerialize(n[e][1]).charCodeAt(0)===r.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[e][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[e][1].end.offset-n[e][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;p=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;let y=Object.assign({},n[e][1].end),h=Object.assign({},n[t][1].start);Lt(y,-p),Lt(h,p),i={type:p>1?"strongSequence":"emphasisSequence",start:y,end:Object.assign({},n[e][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:h},a={type:p>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},n[e][1].end=Object.assign({},i.start),n[t][1].start=Object.assign({},o.end),m=[],n[e][1].end.offset-n[e][1].start.offset&&(m=J(m,[["enter",n[e][1],r],["exit",n[e][1],r]])),m=J(m,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",a,r]]),m=J(m,yn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),m=J(m,[["exit",a,r],["enter",o,r],["exit",o,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(c=2,m=J(m,[["enter",n[t][1],r],["exit",n[t][1],r]])):c=0,Z(n,e-1,t-e+3,m),t=e+m.length-c-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function fe(n,r){let t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=Zn(e),a;return i;function i(p){return n.enter("attentionSequence"),a=p,o(p)}function o(p){if(p===a)return n.consume(p),o;let m=n.exit("attentionSequence"),c=Zn(p),y=!c||c===2&&u||t.includes(p),h=!u||u===2&&c||t.includes(e);return m._open=!!(a===42?y:y&&(u||!h)),m._close=!!(a===42?h:h&&(c||!y)),r(p)}}function Lt(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}var Yn={name:"autolink",tokenize:xe};function xe(n,r,t){let e=1;return u;function u(g){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),a}function a(g){return v(g)?(n.consume(g),i):$n(g)?m(g):t(g)}function i(g){return g===43||g===45||g===46||K(g)?o(g):m(g)}function o(g){return g===58?(n.consume(g),p):(g===43||g===45||g===46||K(g))&&e++<32?(n.consume(g),o):m(g)}function p(g){return g===62?(n.exit("autolinkProtocol"),x(g)):g===null||g===32||g===60||In(g)?t(g):(n.consume(g),p)}function m(g){return g===64?(n.consume(g),e=0,c):$n(g)?(n.consume(g),m):t(g)}function c(g){return K(g)?y(g):t(g)}function y(g){return g===46?(n.consume(g),e=0,c):g===62?(n.exit("autolinkProtocol").type="autolinkEmail",x(g)):h(g)}function h(g){return(g===45||K(g))&&e++<63?(n.consume(g),g===45?h:y):t(g)}function x(g){return n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.exit("autolink"),r}}var cn={tokenize:ge,partial:!0};function ge(n,r,t){return C(n,e,"linePrefix");function e(u){return u===null||S(u)?r(u):t(u)}}var On={name:"blockQuote",tokenize:de,continuation:{tokenize:ke},exit:ye};function de(n,r,t){let e=this;return u;function u(i){if(i===62){let o=e.containerState;return o.open||(n.enter("blockQuote",{_container:!0}),o.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(i),n.exit("blockQuoteMarker"),a}return t(i)}function a(i){return I(i)?(n.enter("blockQuotePrefixWhitespace"),n.consume(i),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(i))}}function ke(n,r,t){return C(n,n.attempt(On,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ye(n){n.exit("blockQuote")}var Dn={name:"characterEscape",tokenize:be};function be(n,r,t){return e;function e(a){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(a),n.exit("escapeMarker"),u}function u(a){return Ft(a)?(n.enter("characterEscapeValue"),n.consume(a),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(a)}}var Bt=document.createElement("i");function bn(n){let r="&"+n+";";Bt.innerHTML=r;let t=Bt.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===r?!1:t}var Pn={name:"characterReference",tokenize:Se};function Se(n,r,t){let e=this,u=0,a,i;return o;function o(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),p}function p(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),a=31,i=K,c(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),a=6,i=wt,c):(n.enter("characterReferenceValue"),a=7,i=zn,c(y))}function c(y){let h;return y===59&&u?(h=n.exit("characterReferenceValue"),i===K&&!bn(e.sliceSerialize(h))?t(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)):i(y)&&u++<a?(n.consume(y),c):t(y)}}var _n={name:"codeFenced",tokenize:Ee,concrete:!0};function Ee(n,r,t){let e=this,u={tokenize:_,partial:!0},a={tokenize:P,partial:!0},i=this.events[this.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,p=0,m;return c;function c(d){return n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m=d,y(d)}function y(d){return d===m?(n.consume(d),p++,y):(n.exit("codeFencedFenceSequence"),p<3?t(d):C(n,h,"whitespace")(d))}function h(d){return d===null||S(d)?O(d):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),x(d))}function x(d){return d===null||V(d)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),C(n,g,"whitespace")(d)):d===96&&d===m?t(d):(n.consume(d),x)}function g(d){return d===null||S(d)?O(d):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),L(d))}function L(d){return d===null||S(d)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),O(d)):d===96&&d===m?t(d):(n.consume(d),L)}function O(d){return n.exit("codeFencedFence"),e.interrupt?r(d):b(d)}function b(d){return d===null?w(d):S(d)?n.attempt(a,n.attempt(u,w,o?C(n,b,"linePrefix",o+1):b),w)(d):(n.enter("codeFlowValue"),R(d))}function R(d){return d===null||S(d)?(n.exit("codeFlowValue"),b(d)):(n.consume(d),R)}function w(d){return n.exit("codeFenced"),r(d)}function P(d,j,H){let M=this;return Q;function Q(D){return d.enter("lineEnding"),d.consume(D),d.exit("lineEnding"),A}function A(D){return M.parser.lazy[M.now().line]?H(D):j(D)}}function _(d,j,H){let M=0;return C(d,Q,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Q(E){return d.enter("codeFencedFence"),d.enter("codeFencedFenceSequence"),A(E)}function A(E){return E===m?(d.consume(E),M++,A):M<p?H(E):(d.exit("codeFencedFenceSequence"),C(d,D,"whitespace")(E))}function D(E){return E===null||S(E)?(d.exit("codeFencedFence"),j(E)):H(E)}}}var Ln={name:"codeIndented",tokenize:Fe},we={tokenize:Ce,partial:!0};function Fe(n,r,t){let e=this;return u;function u(m){return n.enter("codeIndented"),C(n,a,"linePrefix",5)(m)}function a(m){let c=e.events[e.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(m):t(m)}function i(m){return m===null?p(m):S(m)?n.attempt(we,i,p)(m):(n.enter("codeFlowValue"),o(m))}function o(m){return m===null||S(m)?(n.exit("codeFlowValue"),i(m)):(n.consume(m),o)}function p(m){return n.exit("codeIndented"),r(m)}}function Ce(n,r,t){let e=this;return u;function u(i){return e.parser.lazy[e.now().line]?t(i):S(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),u):C(n,a,"linePrefix",5)(i)}function a(i){let o=e.events[e.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):S(i)?u(i):t(i)}}var Gn={name:"codeText",tokenize:Ie,resolve:Ae,previous:ze};function Ae(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e<r;)if(n[e][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(e=t-1,r++;++e<=r;)u===void 0?e!==r&&n[e][1].type!=="lineEnding"&&(u=e):(e===r||n[e][1].type==="lineEnding")&&(n[u][1].type="codeTextData",e!==u+2&&(n[u][1].end=n[e-1][1].end,n.splice(u+2,e-u-2),r-=e-u-2,e=u+2),u=void 0);return n}function ze(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ie(n,r,t){let e=this,u=0,a,i;return o;function o(h){return n.enter("codeText"),n.enter("codeTextSequence"),p(h)}function p(h){return h===96?(n.consume(h),u++,p):(n.exit("codeTextSequence"),m(h))}function m(h){return h===null?t(h):h===96?(i=n.enter("codeTextSequence"),a=0,y(h)):h===32?(n.enter("space"),n.consume(h),n.exit("space"),m):S(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),m):(n.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||S(h)?(n.exit("codeTextData"),m(h)):(n.consume(h),c)}function y(h){return h===96?(n.consume(h),a++,y):a===u?(n.exit("codeTextSequence"),n.exit("codeText"),r(h)):(i.type="codeTextData",c(h))}}function Mn(n){let r={},t=-1,e,u,a,i,o,p,m;for(;++t<n.length;){for(;t in r;)t=r[t];if(e=n[t],t&&e[1].type==="chunkFlow"&&n[t-1][1].type==="listItemPrefix"&&(p=e[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,Te(n,t)),t=r[t],m=!0);else if(e[1]._container){for(a=t,u=void 0;a--&&(i=n[a],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(n[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=a);u&&(e[1].end=Object.assign({},n[u][1].start),o=n.slice(u,t),o.unshift(e),Z(n,u,t-u+1,o))}}return!m}function Te(n,r){let t=n[r][1],e=n[r][2],u=r-1,a=[],i=t._tokenizer||e.parser[t.contentType](t.start),o=i.events,p=[],m={},c,y,h=-1,x=t,g=0,L=0,O=[L];for(;x;){for(;n[++u][1]!==x;);a.push(u),x._tokenizer||(c=e.sliceStream(x),x.next||c.push(null),y&&i.defineSkip(x.start),x._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),x._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=t;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(L=h+1,O.push(L),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(i.events=[],x?(x._tokenizer=void 0,x.previous=void 0):O.pop(),h=O.length;h--;){let b=o.slice(O[h],O[h+1]),R=a.pop();p.unshift([R,R+b.length-1]),Z(n,R,2,b)}for(h=-1;++h<p.length;)m[g+p[h][0]]=g+p[h][1],g+=p[h][1]-p[h][0]-1;return m}var Jn={tokenize:Oe,resolve:Be},Le={tokenize:De,partial:!0};function Be(n){return Mn(n),n}function Oe(n,r){let t;return e;function e(o){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?a(o):S(o)?n.check(Le,i,a)(o):(n.consume(o),u)}function a(o){return n.exit("chunkContent"),n.exit("content"),r(o)}function i(o){return n.consume(o),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function De(n,r,t){let e=this;return u;function u(i){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),C(n,a,"linePrefix")}function a(i){if(i===null||S(i))return t(i);let o=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):n.interrupt(e.parser.constructs.flow,t,r)(i)}}function Rn(n,r,t,e,u,a,i,o,p){let m=p||Number.POSITIVE_INFINITY,c=0;return y;function y(b){return b===60?(n.enter(e),n.enter(u),n.enter(a),n.consume(b),n.exit(a),h):b===null||b===41||In(b)?t(b):(n.enter(e),n.enter(i),n.enter(o),n.enter("chunkString",{contentType:"string"}),L(b))}function h(b){return b===62?(n.enter(a),n.consume(b),n.exit(a),n.exit(u),n.exit(e),r):(n.enter(o),n.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===62?(n.exit("chunkString"),n.exit(o),h(b)):b===null||b===60||S(b)?t(b):(n.consume(b),b===92?g:x)}function g(b){return b===60||b===62||b===92?(n.consume(b),x):x(b)}function L(b){return b===40?++c>m?t(b):(n.consume(b),L):b===41?c--?(n.consume(b),L):(n.exit("chunkString"),n.exit(o),n.exit(i),n.exit(e),r(b)):b===null||V(b)?c?t(b):(n.exit("chunkString"),n.exit(o),n.exit(i),n.exit(e),r(b)):In(b)?t(b):(n.consume(b),b===92?O:L)}function O(b){return b===40||b===41||b===92?(n.consume(b),L):L(b)}}function jn(n,r,t,e,u,a){let i=this,o=0,p;return m;function m(x){return n.enter(e),n.enter(u),n.consume(x),n.exit(u),n.enter(a),c}function c(x){return x===null||x===91||x===93&&!p||x===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs||o>999?t(x):x===93?(n.exit(a),n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):S(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),c):(n.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||S(x)||o++>999?(n.exit("chunkString"),c(x)):(n.consume(x),p=p||!I(x),x===92?h:y)}function h(x){return x===91||x===92||x===93?(n.consume(x),o++,y):y(x)}}function qn(n,r,t,e,u,a){let i;return o;function o(h){return n.enter(e),n.enter(u),n.consume(h),n.exit(u),i=h===40?41:h,p}function p(h){return h===i?(n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):(n.enter(a),m(h))}function m(h){return h===i?(n.exit(a),p(i)):h===null?t(h):S(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),C(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===i||h===null||S(h)?(n.exit("chunkString"),m(h)):(n.consume(h),h===92?y:c)}function y(h){return h===i||h===92?(n.consume(h),c):c(h)}}function fn(n,r){let t;return e;function e(u){return S(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):I(u)?C(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function on(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Kn={name:"definition",tokenize:_e},Pe={tokenize:Me,partial:!0};function _e(n,r,t){let e=this,u;return a;function a(p){return n.enter("definition"),jn.call(e,n,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function i(p){return u=on(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),p===58?(n.enter("definitionMarker"),n.consume(p),n.exit("definitionMarker"),fn(n,Rn(n,n.attempt(Pe,C(n,o,"whitespace"),C(n,o,"whitespace")),t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):t(p)}function o(p){return p===null||S(p)?(n.exit("definition"),e.parser.defined.includes(u)||e.parser.defined.push(u),r(p)):t(p)}}function Me(n,r,t){return e;function e(i){return V(i)?fn(n,u)(i):t(i)}function u(i){return i===34||i===39||i===40?qn(n,C(n,a,"whitespace"),t,"definitionTitle","definitionTitleMarker","definitionTitleString")(i):t(i)}function a(i){return i===null||S(i)?r(i):t(i)}}var Xn={name:"hardBreakEscape",tokenize:Re};function Re(n,r,t){return e;function e(a){return n.enter("hardBreakEscape"),n.enter("escapeMarker"),n.consume(a),u}function u(a){return S(a)?(n.exit("escapeMarker"),n.exit("hardBreakEscape"),r(a)):t(a)}}var vn={name:"headingAtx",tokenize:qe,resolve:je};function je(n,r){let t=n.length-2,e=3,u,a;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},a={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},Z(n,e,t-e+1,[["enter",u,r],["enter",a,r],["exit",a,r],["exit",u,r]])),n}function qe(n,r,t){let e=this,u=0;return a;function a(c){return n.enter("atxHeading"),n.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&u++<6?(n.consume(c),i):c===null||V(c)?(n.exit("atxHeadingSequence"),e.interrupt?r(c):o(c)):t(c)}function o(c){return c===35?(n.enter("atxHeadingSequence"),p(c)):c===null||S(c)?(n.exit("atxHeading"),r(c)):I(c)?C(n,o,"whitespace")(c):(n.enter("atxHeadingText"),m(c))}function p(c){return c===35?(n.consume(c),p):(n.exit("atxHeadingSequence"),o(c))}function m(c){return c===null||c===35||V(c)?(n.exit("atxHeadingText"),o(c)):(n.consume(c),m)}}var Ot=["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","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nt=["pre","script","style","textarea"];var tt={name:"htmlFlow",tokenize:Ve,resolveTo:Ne,concrete:!0},He={tokenize:We,partial:!0};function Ne(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Ve(n,r,t){let e=this,u,a,i,o,p;return m;function m(l){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(l),c}function c(l){return l===33?(n.consume(l),y):l===47?(n.consume(l),g):l===63?(n.consume(l),u=3,e.interrupt?r:G):v(l)?(n.consume(l),i=String.fromCharCode(l),a=!0,L):t(l)}function y(l){return l===45?(n.consume(l),u=2,h):l===91?(n.consume(l),u=5,i="CDATA[",o=0,x):v(l)?(n.consume(l),u=4,e.interrupt?r:G):t(l)}function h(l){return l===45?(n.consume(l),e.interrupt?r:G):t(l)}function x(l){return l===i.charCodeAt(o++)?(n.consume(l),o===i.length?e.interrupt?r:A:x):t(l)}function g(l){return v(l)?(n.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){return l===null||l===47||l===62||V(l)?l!==47&&a&&nt.includes(i.toLowerCase())?(u=1,e.interrupt?r(l):A(l)):Ot.includes(i.toLowerCase())?(u=6,l===47?(n.consume(l),O):e.interrupt?r(l):A(l)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(l):a?R(l):b(l)):l===45||K(l)?(n.consume(l),i+=String.fromCharCode(l),L):t(l)}function O(l){return l===62?(n.consume(l),e.interrupt?r:A):t(l)}function b(l){return I(l)?(n.consume(l),b):M(l)}function R(l){return l===47?(n.consume(l),M):l===58||l===95||v(l)?(n.consume(l),w):I(l)?(n.consume(l),R):M(l)}function w(l){return l===45||l===46||l===58||l===95||K(l)?(n.consume(l),w):P(l)}function P(l){return l===61?(n.consume(l),_):I(l)?(n.consume(l),P):R(l)}function _(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(n.consume(l),p=l,d):I(l)?(n.consume(l),_):(p=null,j(l))}function d(l){return l===null||S(l)?t(l):l===p?(n.consume(l),H):(n.consume(l),d)}function j(l){return l===null||l===34||l===39||l===60||l===61||l===62||l===96||V(l)?P(l):(n.consume(l),j)}function H(l){return l===47||l===62||I(l)?R(l):t(l)}function M(l){return l===62?(n.consume(l),Q):t(l)}function Q(l){return I(l)?(n.consume(l),Q):l===null||S(l)?A(l):t(l)}function A(l){return l===45&&u===2?(n.consume(l),U):l===60&&u===1?(n.consume(l),X):l===62&&u===4?(n.consume(l),N):l===63&&u===3?(n.consume(l),G):l===93&&u===5?(n.consume(l),W):S(l)&&(u===6||u===7)?n.check(He,N,D)(l):l===null||S(l)?D(l):(n.consume(l),A)}function D(l){return n.exit("htmlFlowData"),E(l)}function E(l){return l===null?s(l):S(l)?n.attempt({tokenize:z,partial:!0},E,s)(l):(n.enter("htmlFlowData"),A(l))}function z(l,En,mn){return dn;function dn(en){return l.enter("lineEnding"),l.consume(en),l.exit("lineEnding"),wn}function wn(en){return e.parser.lazy[e.now().line]?mn(en):En(en)}}function U(l){return l===45?(n.consume(l),G):A(l)}function X(l){return l===47?(n.consume(l),i="",nn):A(l)}function nn(l){return l===62&&nt.includes(i.toLowerCase())?(n.consume(l),N):v(l)&&i.length<8?(n.consume(l),i+=String.fromCharCode(l),nn):A(l)}function W(l){return l===93?(n.consume(l),G):A(l)}function G(l){return l===62?(n.consume(l),N):l===45&&u===2?(n.consume(l),G):A(l)}function N(l){return l===null||S(l)?(n.exit("htmlFlowData"),s(l)):(n.consume(l),N)}function s(l){return n.exit("htmlFlow"),r(l)}}function We(n,r,t){return e;function e(u){return n.exit("htmlFlowData"),n.enter("lineEndingBlank"),n.consume(u),n.exit("lineEndingBlank"),n.attempt(cn,r,t)}}var et={name:"htmlText",tokenize:Qe};function Qe(n,r,t){let e=this,u,a,i,o;return p;function p(s){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(s),m}function m(s){return s===33?(n.consume(s),c):s===47?(n.consume(s),j):s===63?(n.consume(s),_):v(s)?(n.consume(s),Q):t(s)}function c(s){return s===45?(n.consume(s),y):s===91?(n.consume(s),a="CDATA[",i=0,O):v(s)?(n.consume(s),P):t(s)}function y(s){return s===45?(n.consume(s),h):t(s)}function h(s){return s===null||s===62?t(s):s===45?(n.consume(s),x):g(s)}function x(s){return s===null||s===62?t(s):g(s)}function g(s){return s===null?t(s):s===45?(n.consume(s),L):S(s)?(o=g,W(s)):(n.consume(s),g)}function L(s){return s===45?(n.consume(s),N):g(s)}function O(s){return s===a.charCodeAt(i++)?(n.consume(s),i===a.length?b:O):t(s)}function b(s){return s===null?t(s):s===93?(n.consume(s),R):S(s)?(o=b,W(s)):(n.consume(s),b)}function R(s){return s===93?(n.consume(s),w):b(s)}function w(s){return s===62?N(s):s===93?(n.consume(s),w):b(s)}function P(s){return s===null||s===62?N(s):S(s)?(o=P,W(s)):(n.consume(s),P)}function _(s){return s===null?t(s):s===63?(n.consume(s),d):S(s)?(o=_,W(s)):(n.consume(s),_)}function d(s){return s===62?N(s):_(s)}function j(s){return v(s)?(n.consume(s),H):t(s)}function H(s){return s===45||K(s)?(n.consume(s),H):M(s)}function M(s){return S(s)?(o=M,W(s)):I(s)?(n.consume(s),M):N(s)}function Q(s){return s===45||K(s)?(n.consume(s),Q):s===47||s===62||V(s)?A(s):t(s)}function A(s){return s===47?(n.consume(s),N):s===58||s===95||v(s)?(n.consume(s),D):S(s)?(o=A,W(s)):I(s)?(n.consume(s),A):N(s)}function D(s){return s===45||s===46||s===58||s===95||K(s)?(n.consume(s),D):E(s)}function E(s){return s===61?(n.consume(s),z):S(s)?(o=E,W(s)):I(s)?(n.consume(s),E):A(s)}function z(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),u=s,U):S(s)?(o=z,W(s)):I(s)?(n.consume(s),z):(n.consume(s),u=void 0,nn)}function U(s){return s===u?(n.consume(s),X):s===null?t(s):S(s)?(o=U,W(s)):(n.consume(s),U)}function X(s){return s===62||s===47||V(s)?A(s):t(s)}function nn(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===62||V(s)?A(s):(n.consume(s),nn)}function W(s){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),C(n,G,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function G(s){return n.enter("htmlTextData"),o(s)}function N(s){return s===62?(n.consume(s),n.exit("htmlTextData"),n.exit("htmlText"),r):t(s)}}var xn={name:"labelEnd",tokenize:Je,resolveTo:Ge,resolveAll:Ye},Ue={tokenize:Ke},$e={tokenize:Xe},Ze={tokenize:ve};function Ye(n){let r=-1,t;for(;++r<n.length;)t=n[r][1],(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(n.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++);return n}function Ge(n,r){let t=n.length,e=0,u,a,i,o;for(;t--;)if(u=n[t][1],a){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(a=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(i=t);let p={type:n[a][1].type==="labelLink"?"link":"image",start:Object.assign({},n[a][1].start),end:Object.assign({},n[n.length-1][1].end)},m={type:"label",start:Object.assign({},n[a][1].start),end:Object.assign({},n[i][1].end)},c={type:"labelText",start:Object.assign({},n[a+e+2][1].end),end:Object.assign({},n[i-2][1].start)};return o=[["enter",p,r],["enter",m,r]],o=J(o,n.slice(a+1,a+e+3)),o=J(o,[["enter",c,r]]),o=J(o,yn(r.parser.constructs.insideSpan.null,n.slice(a+e+4,i-3),r)),o=J(o,[["exit",c,r],n[i-2],n[i-1],["exit",m,r]]),o=J(o,n.slice(i+1)),o=J(o,[["exit",p,r]]),Z(n,a,n.length,o),n}function Je(n,r,t){let e=this,u=e.events.length,a,i;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){a=e.events[u][1];break}return o;function o(c){return a?a._inactive?m(c):(i=e.parser.defined.includes(on(e.sliceSerialize({start:a.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(c),n.exit("labelMarker"),n.exit("labelEnd"),p):t(c)}function p(c){return c===40?n.attempt(Ue,r,i?r:m)(c):c===91?n.attempt($e,r,i?n.attempt(Ze,r,m):m)(c):i?r(c):m(c)}function m(c){return a._balanced=!0,t(c)}}function Ke(n,r,t){return e;function e(p){return n.enter("resource"),n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),fn(n,u)}function u(p){return p===41?o(p):Rn(n,a,t,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return V(p)?fn(n,i)(p):o(p)}function i(p){return p===34||p===39||p===40?qn(n,fn(n,o),t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):o(p)}function o(p){return p===41?(n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),n.exit("resource"),r):t(p)}}function Xe(n,r,t){let e=this;return u;function u(i){return jn.call(e,n,a,t,"reference","referenceMarker","referenceString")(i)}function a(i){return e.parser.defined.includes(on(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(i):t(i)}}function ve(n,r,t){return e;function e(a){return n.enter("reference"),n.enter("referenceMarker"),n.consume(a),n.exit("referenceMarker"),u}function u(a){return a===93?(n.enter("referenceMarker"),n.consume(a),n.exit("referenceMarker"),n.exit("reference"),r):t(a)}}var rt={name:"labelStartImage",tokenize:nr,resolveAll:xn.resolveAll};function nr(n,r,t){let e=this;return u;function u(o){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(o),n.exit("labelImageMarker"),a}function a(o){return o===91?(n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(o):r(o)}}var it={name:"labelStartLink",tokenize:tr,resolveAll:xn.resolveAll};function tr(n,r,t){let e=this;return u;function u(i){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(i),n.exit("labelMarker"),n.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(i):r(i)}}var Bn={name:"lineEnding",tokenize:er};function er(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),C(n,r,"linePrefix")}}var gn={name:"thematicBreak",tokenize:rr};function rr(n,r,t){let e=0,u;return a;function a(p){return n.enter("thematicBreak"),u=p,i(p)}function i(p){return p===u?(n.enter("thematicBreakSequence"),o(p)):I(p)?C(n,i,"whitespace")(p):e<3||p!==null&&!S(p)?t(p):(n.exit("thematicBreak"),r(p))}function o(p){return p===u?(n.consume(p),e++,o):(n.exit("thematicBreakSequence"),i(p))}}var Y={name:"list",tokenize:ar,continuation:{tokenize:or},exit:sr},ir={tokenize:cr,partial:!0},ur={tokenize:lr,partial:!0};function ar(n,r,t){let e=this,u=e.events[e.events.length-1],a=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(x){let g=e.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!e.containerState.marker||x===e.containerState.marker:zn(x)){if(e.containerState.type||(e.containerState.type=g,n.enter(g,{_container:!0})),g==="listUnordered")return n.enter("listItemPrefix"),x===42||x===45?n.check(gn,t,m)(x):m(x);if(!e.interrupt||x===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(x)}return t(x)}function p(x){return zn(x)&&++i<10?(n.consume(x),p):(!e.interrupt||i<2)&&(e.containerState.marker?x===e.containerState.marker:x===41||x===46)?(n.exit("listItemValue"),m(x)):t(x)}function m(x){return n.enter("listItemMarker"),n.consume(x),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||x,n.check(cn,e.interrupt?t:c,n.attempt(ir,h,y))}function c(x){return e.containerState.initialBlankLine=!0,a++,h(x)}function y(x){return I(x)?(n.enter("listItemPrefixWhitespace"),n.consume(x),n.exit("listItemPrefixWhitespace"),h):t(x)}function h(x){return e.containerState.size=a+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(x)}}function or(n,r,t){let e=this;return e.containerState._closeFlow=void 0,n.check(cn,u,a);function u(o){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,C(n,r,"listItemIndent",e.containerState.size+1)(o)}function a(o){return e.containerState.furtherBlankLines||!I(o)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,i(o)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(ur,r,i)(o))}function i(o){return e.containerState._closeFlow=!0,e.interrupt=void 0,C(n,n.attempt(Y,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function lr(n,r,t){let e=this;return C(n,u,"listItemIndent",e.containerState.size+1);function u(a){let i=e.events[e.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===e.containerState.size?r(a):t(a)}}function sr(n){n.exit(this.containerState.type)}function cr(n,r,t){let e=this;return C(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(a){let i=e.events[e.events.length-1];return!I(a)&&i&&i[1].type==="listItemPrefixWhitespace"?r(a):t(a)}}var Hn={name:"setextUnderline",tokenize:mr,resolveTo:pr};function pr(n,r){let t=n.length,e,u,a;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!a&&n[t][1].type==="definition"&&(a=t);let i={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",a?(n.splice(u,0,["enter",i,r]),n.splice(a+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[a][1].end)):n[e][1]=i,n.push(["exit",i,r]),n}function mr(n,r,t){let e=this,u=e.events.length,a,i;for(;u--;)if(e.events[u][1].type!=="lineEnding"&&e.events[u][1].type!=="linePrefix"&&e.events[u][1].type!=="content"){i=e.events[u][1].type==="paragraph";break}return o;function o(c){return!e.parser.lazy[e.now().line]&&(e.interrupt||i)?(n.enter("setextHeadingLine"),n.enter("setextHeadingLineSequence"),a=c,p(c)):t(c)}function p(c){return c===a?(n.consume(c),p):(n.exit("setextHeadingLineSequence"),C(n,m,"lineSuffix")(c))}function m(c){return c===null||S(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}var Dt={tokenize:hr};function hr(n){let r=this,t=n.attempt(cn,e,n.attempt(this.parser.constructs.flowInitial,u,C(n,n.attempt(this.parser.constructs.flow,u,n.attempt(Jn,u)),"linePrefix")));return t;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEndingBlank"),n.consume(a),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),r.currentConstruct=void 0,t}}var Pt={resolveAll:jt()},_t=Rt("string"),Mt=Rt("text");function Rt(n){return{tokenize:r,resolveAll:jt(n==="text"?fr:void 0)};function r(t){let e=this,u=this.parser.constructs[n],a=t.attempt(u,i,o);return i;function i(c){return m(c)?a(c):o(c)}function o(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),p}function p(c){return m(c)?(t.exit("data"),a(c)):(t.consume(c),p)}function m(c){if(c===null)return!0;let y=u[c],h=-1;if(y)for(;++h<y.length;){let x=y[h];if(!x.previous||x.previous.call(e,e.previous))return!0}return!1}}}function jt(n){return r;function r(t,e){let u=-1,a;for(;++u<=t.length;)a===void 0?t[u]&&t[u][1].type==="data"&&(a=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==a+2&&(t[a][1].end=t[u-1][1].end,t.splice(a+2,u-a-2),u=a+2),a=void 0);return n?n(t,e):t}}function fr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){let e=n[t-1][1],u=r.sliceStream(e),a=u.length,i=-1,o=0,p;for(;a--;){let m=u[a];if(typeof m=="string"){for(i=m.length;m.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(m===-2)p=!0,o++;else if(m!==-1){a++;break}}if(o){let m={type:t===n.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:e.end.line,column:e.end.column-o,offset:e.end.offset-o,_index:e.start._index+a,_bufferIndex:a?i:e.start._bufferIndex+i},end:Object.assign({},e.end)};e.end=Object.assign({},m.start),e.start.offset===e.end.offset?Object.assign(e,m):(n.splice(t,0,["enter",m,r],["exit",m,r]),t+=2)}t++}return n}function qt(n,r,t){let e=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),u={},a=[],i=[],o=[],p=!0,m={consume:P,enter:_,exit:d,attempt:M(j),check:M(H),interrupt:M(H,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:n,sliceStream:L,sliceSerialize:g,now:O,defineSkip:b,write:x},y=r.tokenize.call(c,m),h;return r.resolveAll&&a.push(r),c;function x(E){return i=J(i,E),R(),i[i.length-1]!==null?[]:(Q(r,0),c.events=yn(a,c.events,c),c.events)}function g(E,z){return gr(L(E),z)}function L(E){return xr(i,E)}function O(){return Object.assign({},e)}function b(E){u[E.line]=E.column,D()}function R(){let E;for(;e._index<i.length;){let z=i[e._index];if(typeof z=="string")for(E=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===E&&e._bufferIndex<z.length;)w(z.charCodeAt(e._bufferIndex));else w(z)}}function w(E){p=void 0,h=E,y=y(E)}function P(E){S(E)?(e.line++,e.column=1,e.offset+=E===-3?2:1,D()):E!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===i[e._index].length&&(e._bufferIndex=-1,e._index++)),c.previous=E,p=!0}function _(E,z){let U=z||{};return U.type=E,U.start=O(),c.events.push(["enter",U,c]),o.push(U),U}function d(E){let z=o.pop();return z.end=O(),c.events.push(["exit",z,c]),z}function j(E,z){Q(E,z.from)}function H(E,z){z.restore()}function M(E,z){return U;function U(X,nn,W){let G,N,s,l;return Array.isArray(X)?mn(X):"tokenize"in X?mn([X]):En(X);function En($){return Fn;function Fn(rn){let kn=rn!==null&&$[rn],hn=rn!==null&&$.null,Wn=[...Array.isArray(kn)?kn:kn?[kn]:[],...Array.isArray(hn)?hn:hn?[hn]:[]];return mn(Wn)(rn)}}function mn($){return G=$,N=0,$.length===0?W:dn($[N])}function dn($){return Fn;function Fn(rn){return l=A(),s=$,$.partial||(c.currentConstruct=$),$.name&&c.parser.constructs.disable.null.includes($.name)?en(rn):$.tokenize.call(z?Object.assign(Object.create(c),z):c,m,wn,en)(rn)}}function wn($){return p=!0,E(s,l),nn}function en($){return p=!0,l.restore(),++N<G.length?dn(G[N]):W}}}function Q(E,z){E.resolveAll&&!a.includes(E)&&a.push(E),E.resolve&&Z(c.events,z,c.events.length-z,E.resolve(c.events.slice(z),c)),E.resolveTo&&(c.events=E.resolveTo(c.events,c))}function A(){let E=O(),z=c.previous,U=c.currentConstruct,X=c.events.length,nn=Array.from(o);return{restore:W,from:X};function W(){e=E,c.previous=z,c.currentConstruct=U,c.events.length=X,o=nn,D()}}function D(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function xr(n,r){let t=r.start._index,e=r.start._bufferIndex,u=r.end._index,a=r.end._bufferIndex,i;return t===u?i=[n[t].slice(e,a)]:(i=n.slice(t,u),e>-1&&(i[0]=i[0].slice(e)),a>0&&i.push(n[u].slice(0,a))),i}function gr(n,r){let t=-1,e=[],u;for(;++t<n.length;){let a=n[t],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
`;break}case-3:{i=`\r
`;break}case-2:{i=r?" ":" ";break}case-1:{if(!r&&u)continue;i=" ";break}default:i=String.fromCharCode(a)}u=a===-2,e.push(i)}return e.join("")}var ut={};ue(ut,{attentionMarkers:()=>Fr,contentInitial:()=>kr,disable:()=>Cr,document:()=>dr,flow:()=>br,flowInitial:()=>yr,insideSpan:()=>wr,string:()=>Sr,text:()=>Er});var dr={42:Y,43:Y,45:Y,48:Y,49:Y,50:Y,51:Y,52:Y,53:Y,54:Y,55:Y,56:Y,57:Y,62:On},kr={91:Kn},yr={[-2]:Ln,[-1]:Ln,32:Ln},br={35:vn,42:gn,45:[Hn,gn],60:tt,61:Hn,95:gn,96:_n,126:_n},Sr={38:Pn,92:Dn},Er={[-5]:Bn,[-4]:Bn,[-3]:Bn,33:rt,38:Pn,42:Tn,60:[Yn,et],91:it,92:[Xn,Dn],93:xn,95:Tn,96:Gn},wr={null:[Tn,Pt]},Fr={null:[42,95]},Cr={null:[]};function Ht(n={}){let r=St([ut].concat(n.extensions||[])),t={defined:[],lazy:{},constructs:r,content:e(zt),document:e(Tt),flow:e(Dt),string:e(_t),text:e(Mt)};return t;function e(u){return a;function a(i){return qt(t,u,i)}}}var Nt=/[\0\t\n\r]/g;function Vt(){let n=1,r="",t=!0,e;return u;function u(a,i,o){let p=[],m,c,y,h,x;for(a=r+a.toString(i),y=0,r="",t&&(a.charCodeAt(0)===65279&&y++,t=void 0);y<a.length;){if(Nt.lastIndex=y,m=Nt.exec(a),h=m&&m.index!==void 0?m.index:a.length,x=a.charCodeAt(h),!m){r=a.slice(y);break}if(x===10&&y===h&&e)p.push(-3),e=void 0;else switch(e&&(p.push(-5),e=void 0),y<h&&(p.push(a.slice(y,h)),n+=h-y),x){case 0:{p.push(65533),n++;break}case 9:{for(c=Math.ceil(n/4)*4,p.push(-2);n++<c;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:e=!0,n=1}y=h+1}return o&&(e&&p.push(-5),r&&p.push(r),p.push(null)),p}}function Wt(n){for(;!Mn(n););return n}function Nn(n,r){let t=Number.parseInt(n,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCharCode(t)}var Ar=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qt(n){return n.replace(Ar,zr)}function zr(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){let u=t.charCodeAt(1),a=u===120||u===88;return Nn(t.slice(a?2:1),a?16:10)}return bn(t)||n}function Sn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Ut(n.position):"start"in n||"end"in n?Ut(n):"line"in n||"column"in n?at(n):""}function at(n){return $t(n&&n.line)+":"+$t(n&&n.column)}function Ut(n){return at(n&&n.start)+"-"+at(n&&n.end)}function $t(n){return n&&typeof n=="number"?n:1}var Yt={}.hasOwnProperty,Vn=function(n,r,t){return typeof r!="string"&&(t=r,r=void 0),Ir(t)(Wt(Ht(t).document().write(Vt()(n,r,!0))))};function Ir(n){let r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ht),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(ct),blockQuote:o(kn),characterEscape:A,characterReference:A,codeFenced:o(hn),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:o(hn,p),codeText:o(Wn,p),codeTextData:A,data:A,codeFlowValue:A,definition:o(Kt),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:o(Xt),hardBreakEscape:o(pt),hardBreakTrailing:o(pt),htmlFlow:o(mt,p),htmlFlowData:A,htmlText:o(mt,p),htmlTextData:A,image:o(vt),label:p,link:o(ht),listItem:o(ne),listItemValue:g,listOrdered:o(ft,x),listUnordered:o(ft),paragraph:o(te),reference:dn,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:o(ct),strong:o(ee),thematicBreak:o(ie)},exit:{atxHeading:c(),atxHeadingSequence:j,autolink:c(),autolinkEmail:rn,autolinkProtocol:Fn,blockQuote:c(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:en,characterReferenceMarkerNumeric:en,characterReferenceValue:$,codeFenced:c(R),codeFencedFence:b,codeFencedFenceInfo:L,codeFencedFenceMeta:O,codeFlowValue:D,codeIndented:c(w),codeText:c(nn),codeTextData:D,data:D,definition:c(),definitionDestinationString:d,definitionLabelString:P,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(U),htmlFlowData:D,htmlText:c(X),htmlTextData:D,image:c(G),label:s,labelText:N,lineEnding:E,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:wn,resourceDestinationString:l,resourceTitleString:En,resource:mn,setextHeading:c(Q),setextHeadingLineSequence:M,setextHeadingText:H,strong:c(),thematicBreak:c()}};Gt(r,(n||{}).mdastExtensions||[]);let t={};return e;function e(f){let k={type:"root",children:[]},F={stack:[k],tokenStack:[],config:r,enter:m,exit:y,buffer:p,resume:h,setData:a,getData:i},T=[],B=-1;for(;++B<f.length;)if(f[B][1].type==="listOrdered"||f[B][1].type==="listUnordered")if(f[B][0]==="enter")T.push(B);else{let tn=T.pop();B=u(f,tn,B)}for(B=-1;++B<f.length;){let tn=r[f[B][0]];Yt.call(tn,f[B][1].type)&&tn[f[B][1].type].call(Object.assign({sliceSerialize:f[B][2].sliceSerialize},F),f[B][1])}if(F.tokenStack.length>0){let tn=F.tokenStack[F.tokenStack.length-1];(tn[1]||Zt).call(F,void 0,tn[0])}for(k.position={start:pn(f.length>0?f[0][1].start:{line:1,column:1,offset:0}),end:pn(f.length>0?f[f.length-2][1].end:{line:1,column:1,offset:0})},B=-1;++B<r.transforms.length;)k=r.transforms[B](k)||k;return k}function u(f,k,F){let T=k-1,B=-1,tn=!1,ln,un,Cn,An;for(;++T<=F;){let q=f[T];if(q[1].type==="listUnordered"||q[1].type==="listOrdered"||q[1].type==="blockQuote"?(q[0]==="enter"?B++:B--,An=void 0):q[1].type==="lineEndingBlank"?q[0]==="enter"&&(ln&&!An&&!B&&!Cn&&(Cn=T),An=void 0):q[1].type==="linePrefix"||q[1].type==="listItemValue"||q[1].type==="listItemMarker"||q[1].type==="listItemPrefix"||q[1].type==="listItemPrefixWhitespace"||(An=void 0),!B&&q[0]==="enter"&&q[1].type==="listItemPrefix"||B===-1&&q[0]==="exit"&&(q[1].type==="listUnordered"||q[1].type==="listOrdered")){if(ln){let Qn=T;for(un=void 0;Qn--;){let an=f[Qn];if(an[1].type==="lineEnding"||an[1].type==="lineEndingBlank"){if(an[0]==="exit")continue;un&&(f[un][1].type="lineEndingBlank",tn=!0),an[1].type="lineEnding",un=Qn}else if(!(an[1].type==="linePrefix"||an[1].type==="blockQuotePrefix"||an[1].type==="blockQuotePrefixWhitespace"||an[1].type==="blockQuoteMarker"||an[1].type==="listItemIndent"))break}Cn&&(!un||Cn<un)&&(ln._spread=!0),ln.end=Object.assign({},un?f[un][1].start:q[1].end),f.splice(un||T,0,["exit",ln,q[2]]),T++,F++}q[1].type==="listItemPrefix"&&(ln={type:"listItem",_spread:!1,start:Object.assign({},q[1].start)},f.splice(T,0,["enter",ln,q[2]]),T++,F++,Cn=void 0,An=!0)}}return f[k][1]._spread=tn,F}function a(f,k){t[f]=k}function i(f){return t[f]}function o(f,k){return F;function F(T){m.call(this,f(T),T),k&&k.call(this,T)}}function p(){this.stack.push({type:"fragment",children:[]})}function m(f,k,F){return this.stack[this.stack.length-1].children.push(f),this.stack.push(f),this.tokenStack.push([k,F]),f.position={start:pn(k.start)},f}function c(f){return k;function k(F){f&&f.call(this,F),y.call(this,F)}}function y(f,k){let F=this.stack.pop(),T=this.tokenStack.pop();if(T)T[0].type!==f.type&&(k?k.call(this,f,T[0]):(T[1]||Zt).call(this,f,T[0]));else throw new Error("Cannot close `"+f.type+"` ("+Sn({start:f.start,end:f.end})+"): it\u2019s not open");return F.position.end=pn(f.end),F}function h(){return Un(this.stack.pop())}function x(){a("expectingFirstListItemValue",!0)}function g(f){if(i("expectingFirstListItemValue")){let k=this.stack[this.stack.length-2];k.start=Number.parseInt(this.sliceSerialize(f),10),a("expectingFirstListItemValue")}}function L(){let f=this.resume(),k=this.stack[this.stack.length-1];k.lang=f}function O(){let f=this.resume(),k=this.stack[this.stack.length-1];k.meta=f}function b(){i("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function R(){let f=this.resume(),k=this.stack[this.stack.length-1];k.value=f.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function w(){let f=this.resume(),k=this.stack[this.stack.length-1];k.value=f.replace(/(\r?\n|\r)$/g,"")}function P(f){let k=this.resume(),F=this.stack[this.stack.length-1];F.label=k,F.identifier=on(this.sliceSerialize(f)).toLowerCase()}function _(){let f=this.resume(),k=this.stack[this.stack.length-1];k.title=f}function d(){let f=this.resume(),k=this.stack[this.stack.length-1];k.url=f}function j(f){let k=this.stack[this.stack.length-1];if(!k.depth){let F=this.sliceSerialize(f).length;k.depth=F}}function H(){a("setextHeadingSlurpLineEnding",!0)}function M(f){let k=this.stack[this.stack.length-1];k.depth=this.sliceSerialize(f).charCodeAt(0)===61?1:2}function Q(){a("setextHeadingSlurpLineEnding")}function A(f){let k=this.stack[this.stack.length-1],F=k.children[k.children.length-1];(!F||F.type!=="text")&&(F=re(),F.position={start:pn(f.start)},k.children.push(F)),this.stack.push(F)}function D(f){let k=this.stack.pop();k.value+=this.sliceSerialize(f),k.position.end=pn(f.end)}function E(f){let k=this.stack[this.stack.length-1];if(i("atHardBreak")){let F=k.children[k.children.length-1];F.position.end=pn(f.end),a("atHardBreak");return}!i("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(k.type)&&(A.call(this,f),D.call(this,f))}function z(){a("atHardBreak",!0)}function U(){let f=this.resume(),k=this.stack[this.stack.length-1];k.value=f}function X(){let f=this.resume(),k=this.stack[this.stack.length-1];k.value=f}function nn(){let f=this.resume(),k=this.stack[this.stack.length-1];k.value=f}function W(){let f=this.stack[this.stack.length-1];if(i("inReference")){let k=i("referenceType")||"shortcut";f.type+="Reference",f.referenceType=k,delete f.url,delete f.title}else delete f.identifier,delete f.label;a("referenceType")}function G(){let f=this.stack[this.stack.length-1];if(i("inReference")){let k=i("referenceType")||"shortcut";f.type+="Reference",f.referenceType=k,delete f.url,delete f.title}else delete f.identifier,delete f.label;a("referenceType")}function N(f){let k=this.sliceSerialize(f),F=this.stack[this.stack.length-2];F.label=Qt(k),F.identifier=on(k).toLowerCase()}function s(){let f=this.stack[this.stack.length-1],k=this.resume(),F=this.stack[this.stack.length-1];if(a("inReference",!0),F.type==="link"){let T=f.children;F.children=T}else F.alt=k}function l(){let f=this.resume(),k=this.stack[this.stack.length-1];k.url=f}function En(){let f=this.resume(),k=this.stack[this.stack.length-1];k.title=f}function mn(){a("inReference")}function dn(){a("referenceType","collapsed")}function wn(f){let k=this.resume(),F=this.stack[this.stack.length-1];F.label=k,F.identifier=on(this.sliceSerialize(f)).toLowerCase(),a("referenceType","full")}function en(f){a("characterReferenceType",f.type)}function $(f){let k=this.sliceSerialize(f),F=i("characterReferenceType"),T;F?(T=Nn(k,F==="characterReferenceMarkerNumeric"?10:16),a("characterReferenceType")):T=bn(k);let B=this.stack.pop();B.value+=T,B.position.end=pn(f.end)}function Fn(f){D.call(this,f);let k=this.stack[this.stack.length-1];k.url=this.sliceSerialize(f)}function rn(f){D.call(this,f);let k=this.stack[this.stack.length-1];k.url="mailto:"+this.sliceSerialize(f)}function kn(){return{type:"blockquote",children:[]}}function hn(){return{type:"code",lang:null,meta:null,value:""}}function Wn(){return{type:"inlineCode",value:""}}function Kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xt(){return{type:"emphasis",children:[]}}function ct(){return{type:"heading",depth:void 0,children:[]}}function pt(){return{type:"break"}}function mt(){return{type:"html",value:""}}function vt(){return{type:"image",title:null,url:"",alt:null}}function ht(){return{type:"link",title:null,url:"",children:[]}}function ft(f){return{type:"list",ordered:f.type==="listOrdered",start:null,spread:f._spread,children:[]}}function ne(f){return{type:"listItem",spread:f._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function ee(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function ie(){return{type:"thematicBreak"}}}function pn(n){return{line:n.line,column:n.column,offset:n.offset}}function Gt(n,r){let t=-1;for(;++t<r.length;){let e=r[t];Array.isArray(e)?Gt(n,e):Tr(n,e)}}function Tr(n,r){let t;for(t in r)if(Yt.call(r,t)){if(t==="canContainEols"){let e=r[t];e&&n[t].push(...e)}else if(t==="transforms"){let e=r[t];e&&n[t].push(...e)}else if(t==="enter"||t==="exit"){let e=r[t];e&&Object.assign(n[t],e)}}}function Zt(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Sn({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Sn({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Sn({start:r.start,end:r.end})+") is still open")}function Lr(n){let r=n.replace(/\n{2,}/g,`
`);return xt(r)}function Br(n){let r=Lr(n),{children:t}=Vn(r),e=[[]],u=0;function a(i,o="normal"){i.type==="text"?i.value.split(`
`).forEach((m,c)=>{c!==0&&(u++,e.push([])),m.split(" ").forEach(y=>{y&&e[u].push({content:y,type:o})})}):(i.type==="strong"||i.type==="emphasis")&&i.children.forEach(p=>{a(p,i.type)})}return t.forEach(i=>{i.type==="paragraph"&&i.children.forEach(o=>{a(o)})}),e}function Or(n){let{children:r}=Vn(n);function t(e){return e.type==="text"?e.value.replace(/\n/g,"<br/>"):e.type==="strong"?`<strong>${e.children.map(t).join("")}</strong>`:e.type==="emphasis"?`<em>${e.children.map(t).join("")}</em>`:e.type==="paragraph"?`<p>${e.children.map(t).join("")}</p>`:`Unsupported markdown: ${e.type}`}return r.map(t).join("")}function Dr(n){return Intl.Segmenter?[...new Intl.Segmenter().segment(n)].map(r=>r.segment):[...n]}function Pr(n,r){let t=Dr(r.content);return Jt(n,[],t,r.type)}function Jt(n,r,t,e){if(t.length===0)return[{content:r.join(""),type:e},{content:"",type:e}];let[u,...a]=t,i=[...r,u];return n([{content:i.join(""),type:e}])?Jt(n,i,a,e):(r.length===0&&u&&(r.push(u),t.shift()),[{content:r.join(""),type:e},{content:t.join(""),type:e}])}function _r(n,r){if(n.some(({content:t})=>t.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ot(n,r)}function ot(n,r,t=[],e=[]){if(n.length===0)return e.length>0&&t.push(e),t.length>0?t:[];let u="";n[0].content===" "&&(u=" ",n.shift());let a=n.shift()??{content:" ",type:"normal"},i=[...e];if(u!==""&&i.push({content:u,type:"normal"}),i.push(a),r(i))return ot(n,r,t,i);if(e.length>0)t.push(e),n.unshift(a);else if(a.content){let[o,p]=Pr(r,a);t.push([o]),p.content&&n.unshift(p)}return ot(n,r,t)}function Mr(n,r){r&&n.attr("style",r)}function Rr(n,r,t,e,u=!1){let a=n.append("foreignObject"),i=a.append("xhtml:div"),o=r.label,p=r.isNode?"nodeLabel":"edgeLabel";i.html(`
<span class="${p} ${e}" `+(r.labelStyle?'style="'+r.labelStyle+'"':"")+">"+o+"</span>"),Mr(i,r.labelStyle),i.style("display","table-cell"),i.style("white-space","nowrap"),i.style("max-width",t+"px"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),u&&i.attr("class","labelBkg");let m=i.node().getBoundingClientRect();return m.width===t&&(i.style("display","table"),i.style("white-space","break-spaces"),i.style("width",t+"px"),m=i.node().getBoundingClientRect()),a.style("width",m.width),a.style("height",m.height),a.node()}function lt(n,r,t){return n.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",r*t-.1+"em").attr("dy",t+"em")}function jr(n,r,t){let e=n.append("text"),u=lt(e,1,r);st(u,t);let a=u.node().getComputedTextLength();return e.remove(),a}function to(n,r,t){var e;let u=n.append("text"),a=lt(u,1,r);st(a,[{content:t,type:"normal"}]);let i=(e=a.node())==null?void 0:e.getBoundingClientRect();return i&&u.remove(),i}function qr(n,r,t,e=!1){let a=r.append("g"),i=a.insert("rect").attr("class","background"),o=a.append("text").attr("y","-10.1"),p=0;for(let m of t){let c=h=>jr(a,1.1,h)<=n,y=c(m)?[m]:_r(m,c);for(let h of y){let x=lt(o,p,1.1);st(x,h),p++}}if(e){let m=o.node().getBBox(),c=2;return i.attr("x",-c).attr("y",-c).attr("width",m.width+2*c).attr("height",m.height+2*c),a.node()}else return o.node()}function st(n,r){n.text(""),r.forEach((t,e)=>{let u=n.append("tspan").attr("font-style",t.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",t.type==="strong"?"bold":"normal");e===0?u.text(t.content):u.text(" "+t.content)})}var eo=(n,r="",{style:t="",isTitle:e=!1,classes:u="",useHtmlLabels:a=!0,isNode:i=!0,width:o=200,addSvgBackground:p=!1}={})=>{if(gt.info("createText",r,t,e,u,a,i,p),a){let m=Or(r),c={isNode:i,label:dt(m).replace(/fa[blrs]?:fa-[\w-]+/g,h=>`<i class='${h.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return Rr(n,c,o,u,p)}else{let m=Br(r);return qr(o,n,m,p)}};export{to as a,eo as b};
//# sourceMappingURL=chunk-LXB37CFX.min.js.map