@tempots/beatui 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-CKyH3jwP.cjs → index-BS31JX7x.cjs} +1 -1
- package/dist/{index-Bv2gn_kV.cjs → index-BZYWyjM_.cjs} +3 -3
- package/dist/{index-DjShJtXp.js → index-DKl26ILa.js} +1 -1
- package/dist/{index-BI5w0jSz.js → index-wPyoqxuj.js} +66 -60
- package/dist/markdown/index.cjs.js +1 -1
- package/dist/markdown/index.es.js +1 -1
- package/dist/types/components/form/control/control.d.ts +2 -2
- package/dist/types/components/form/input/combobox-tags-input.d.ts +2 -2
- package/dist/types/components/form/input/select-tags-input.d.ts +2 -2
- package/dist/types/markdown/index.d.ts +7 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-Bv2gn_kV.cjs"),K={tokenize:rt,partial:!0},q={tokenize:at,partial:!0},U={tokenize:lt,partial:!0},V={tokenize:ut,partial:!0},v={tokenize:ot,partial:!0},G={name:"wwwAutolink",tokenize:nt,previous:J},$={name:"protocolAutolink",tokenize:it,previous:Q},d={name:"emailAutolink",tokenize:et,previous:X},w={};function tt(){return{text:w}}let S=48;for(;S<123;)w[S]=d,S++,S===58?S=65:S===91&&(S=97);w[43]=d;w[45]=d;w[46]=d;w[95]=d;w[72]=[d,$];w[104]=[d,$];w[87]=[d,G];w[119]=[d,G];function et(t,i,e){const r=this;let s,h;return n;function n(a){return!O(a)||!X.call(r,r.previous)||T(r.events)?e(a):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(a))}function u(a){return O(a)?(t.consume(a),u):a===64?(t.consume(a),o):e(a)}function o(a){return a===46?t.check(v,p,g)(a):a===45||a===95||f.asciiAlphanumeric(a)?(h=!0,t.consume(a),o):p(a)}function g(a){return t.consume(a),s=!0,o}function p(a){return h&&s&&f.asciiAlpha(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(a)):e(a)}}function nt(t,i,e){const r=this;return s;function s(n){return n!==87&&n!==119||!J.call(r,r.previous)||T(r.events)?e(n):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(K,t.attempt(q,t.attempt(U,h),e),e)(n))}function h(n){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(n)}}function it(t,i,e){const r=this;let s="",h=!1;return n;function n(a){return(a===72||a===104)&&Q.call(r,r.previous)&&!T(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(a),t.consume(a),u):e(a)}function u(a){if(f.asciiAlpha(a)&&s.length<5)return s+=String.fromCodePoint(a),t.consume(a),u;if(a===58){const b=s.toLowerCase();if(b==="http"||b==="https")return t.consume(a),o}return e(a)}function o(a){return a===47?(t.consume(a),h?g:(h=!0,o)):e(a)}function g(a){return a===null||f.asciiControl(a)||f.markdownLineEndingOrSpace(a)||f.unicodeWhitespace(a)||f.unicodePunctuation(a)?e(a):t.attempt(q,t.attempt(U,p),e)(a)}function p(a){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(a)}}function rt(t,i,e){let r=0;return s;function s(n){return(n===87||n===119)&&r<3?(r++,t.consume(n),s):n===46&&r===3?(t.consume(n),h):e(n)}function h(n){return n===null?e(n):i(n)}}function at(t,i,e){let r,s,h;return n;function n(g){return g===46||g===95?t.check(V,o,u)(g):g===null||f.markdownLineEndingOrSpace(g)||f.unicodeWhitespace(g)||g!==45&&f.unicodePunctuation(g)?o(g):(h=!0,t.consume(g),n)}function u(g){return g===95?r=!0:(s=r,r=void 0),t.consume(g),n}function o(g){return s||r||!h?e(g):i(g)}}function lt(t,i){let e=0,r=0;return s;function s(n){return n===40?(e++,t.consume(n),s):n===41&&r<e?h(n):n===33||n===34||n===38||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===60||n===63||n===93||n===95||n===126?t.check(V,i,h)(n):n===null||f.markdownLineEndingOrSpace(n)||f.unicodeWhitespace(n)?i(n):(t.consume(n),s)}function h(n){return n===41&&r++,t.consume(n),s}}function ut(t,i,e){return r;function r(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?(t.consume(u),r):u===38?(t.consume(u),h):u===93?(t.consume(u),s):u===60||u===null||f.markdownLineEndingOrSpace(u)||f.unicodeWhitespace(u)?i(u):e(u)}function s(u){return u===null||u===40||u===91||f.markdownLineEndingOrSpace(u)||f.unicodeWhitespace(u)?i(u):r(u)}function h(u){return f.asciiAlpha(u)?n(u):e(u)}function n(u){return u===59?(t.consume(u),r):f.asciiAlpha(u)?(t.consume(u),n):e(u)}}function ot(t,i,e){return r;function r(h){return t.consume(h),s}function s(h){return f.asciiAlphanumeric(h)?e(h):i(h)}}function J(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||f.markdownLineEndingOrSpace(t)}function Q(t){return!f.asciiAlpha(t)}function X(t){return!(t===47||O(t))}function O(t){return t===43||t===45||t===46||t===95||f.asciiAlphanumeric(t)}function T(t){let i=t.length,e=!1;for(;i--;){const r=t[i][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){e=!0;break}if(r._gfmAutolinkLiteralWalkedInto){e=!1;break}}return t.length>0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}function st(){return{exit:{literalAutolinkEmail:mt,literalAutolinkHttp:gt,literalAutolinkWww:ht}}}function ht(t){R.call(this,t,"http://")}function mt(t){R.call(this,t,"mailto:")}function gt(t){R.call(this,t)}function R(t,i){const e=this.sliceSerialize(t);this.tag('<a href="'+f.sanitizeUri((i||"")+e)+'">'),this.raw(this.encode(e)),this.tag("</a>")}const ft={tokenize:yt,partial:!0};function pt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wt,continuation:{tokenize:Dt},exit:dt}},text:{91:{name:"gfmFootnoteCall",tokenize:ct},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bt,resolveTo:kt}}}}function bt(t,i,e){const r=this;let s=r.events.length;const h=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let n;for(;s--;){const o=r.events[s][1];if(o.type==="labelImage"){n=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!n||!n._balanced)return e(o);const g=f.normalizeIdentifier(r.sliceSerialize({start:n.end,end:r.now()}));return g.codePointAt(0)!==94||!h.includes(g.slice(1))?e(o):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),i(o))}}function kt(t,i){let e=t.length;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},n={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},u=[t[e+1],t[e+2],["enter",r,i],t[e+3],t[e+4],["enter",s,i],["exit",s,i],["enter",h,i],["enter",n,i],["exit",n,i],["exit",h,i],t[t.length-2],t[t.length-1],["exit",r,i]];return t.splice(e,t.length-e+1,...u),t}function ct(t,i,e){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let h=0,n;return u;function u(a){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(a),t.exit("gfmFootnoteCallLabelMarker"),o}function o(a){return a!==94?e(a):(t.enter("gfmFootnoteCallMarker"),t.consume(a),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",g)}function g(a){if(h>999||a===93&&!n||a===null||a===91||f.markdownLineEndingOrSpace(a))return e(a);if(a===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return s.includes(f.normalizeIdentifier(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(a),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):e(a)}return f.markdownLineEndingOrSpace(a)||(n=!0),h++,t.consume(a),a===92?p:g}function p(a){return a===91||a===92||a===93?(t.consume(a),h++,g):g(a)}}function wt(t,i,e){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let h,n=0,u;return o;function o(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",p):e(m)}function p(m){if(n>999||m===93&&!u||m===null||m===91||f.markdownLineEndingOrSpace(m))return e(m);if(m===93){t.exit("chunkString");const c=t.exit("gfmFootnoteDefinitionLabelString");return h=f.normalizeIdentifier(r.sliceSerialize(c)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return f.markdownLineEndingOrSpace(m)||(u=!0),n++,t.consume(m),m===92?a:p}function a(m){return m===91||m===92||m===93?(t.consume(m),n++,p):p(m)}function b(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),s.includes(h)||s.push(h),f.factorySpace(t,k,"gfmFootnoteDefinitionWhitespace")):e(m)}function k(m){return i(m)}}function Dt(t,i,e){return t.check(f.blankLine,i,t.attempt(ft,i,e))}function dt(t){t.exit("gfmFootnoteDefinition")}function yt(t,i,e){const r=this;return f.factorySpace(t,s,"gfmFootnoteDefinitionIndent",5);function s(h){const n=r.events[r.events.length-1];return n&&n[1].type==="gfmFootnoteDefinitionIndent"&&n[2].sliceSerialize(n[1],!0).length===4?i(h):e(h)}}const St={}.hasOwnProperty,Ct={};function At(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function Ft(t){const i=t||Ct,e=i.label||"Footnotes",r=i.labelTagName||"h2",s=i.labelAttributes===null||i.labelAttributes===void 0?'class="sr-only"':i.labelAttributes,h=i.backLabel||At,n=i.clobberPrefix===null||i.clobberPrefix===void 0?"user-content-":i.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let u=this.getData("gfmFootnoteDefinitions");const o=this.getData("gfmFootnoteDefinitionStack"),g=this.getData("tightStack"),p=o.pop(),a=this.resume();u||this.setData("gfmFootnoteDefinitions",u={}),St.call(u,p)||(u[p]=a),g.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(u){let o=this.getData("gfmFootnoteDefinitionStack");o||this.setData("gfmFootnoteDefinitionStack",o=[]),o.push(f.normalizeIdentifier(this.sliceSerialize(u))),this.resume(),this.buffer()},gfmFootnoteCallString(u){let o=this.getData("gfmFootnoteCallOrder"),g=this.getData("gfmFootnoteCallCounts");const p=f.normalizeIdentifier(this.sliceSerialize(u));let a;this.resume(),o||this.setData("gfmFootnoteCallOrder",o=[]),g||this.setData("gfmFootnoteCallCounts",g={});const b=o.indexOf(p),k=f.sanitizeUri(p.toLowerCase());b===-1?(o.push(p),g[p]=1,a=o.length):(g[p]++,a=b+1);const m=g[p];this.tag('<sup><a href="#'+n+"fn-"+k+'" id="'+n+"fnref-"+k+(m>1?"-"+m:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(a)+"</a></sup>")},null(){const u=this.getData("gfmFootnoteCallOrder")||[],o=this.getData("gfmFootnoteCallCounts")||{},g=this.getData("gfmFootnoteDefinitions")||{};let p=-1;for(u.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+r+' id="footnote-label"'+(s?" "+s:"")+">"),this.raw(this.encode(e)),this.tag("</"+r+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++p<u.length;){const a=u[p],b=f.sanitizeUri(a.toLowerCase());let k=0;const m=[];for(;++k<=o[a];)m.push('<a href="#'+n+"fnref-"+b+(k>1?"-"+k:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof h=="string"?h:h(p,k))+'" class="data-footnote-backref">↩'+(k>1?"<sup>"+k+"</sup>":"")+"</a>");const c=m.join(" ");let D=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+n+"fn-"+b+'">'),this.lineEndingIfNeeded(),this.tag(g[a].replace(/<\/p>(?:\r?\n|\r)?$/,function(y){return D=!0," "+c+y})),D||(this.lineEndingIfNeeded(),this.tag(c)),this.lineEndingIfNeeded(),this.tag("</li>")}u.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}function Lt(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}function xt(t){let e=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:h,resolveAll:s};return e==null&&(e=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(n,u){let o=-1;for(;++o<n.length;)if(n[o][0]==="enter"&&n[o][1].type==="strikethroughSequenceTemporary"&&n[o][1]._close){let g=o;for(;g--;)if(n[g][0]==="exit"&&n[g][1].type==="strikethroughSequenceTemporary"&&n[g][1]._open&&n[o][1].end.offset-n[o][1].start.offset===n[g][1].end.offset-n[g][1].start.offset){n[o][1].type="strikethroughSequence",n[g][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},n[g][1].start),end:Object.assign({},n[o][1].end)},a={type:"strikethroughText",start:Object.assign({},n[g][1].end),end:Object.assign({},n[o][1].start)},b=[["enter",p,u],["enter",n[g][1],u],["exit",n[g][1],u],["enter",a,u]],k=u.parser.constructs.insideSpan.null;k&&f.splice(b,b.length,0,f.resolveAll(k,n.slice(g+1,o),u)),f.splice(b,b.length,0,[["exit",a,u],["enter",n[o][1],u],["exit",n[o][1],u],["exit",p,u]]),f.splice(n,g-1,o-g+3,b),o=g+b.length-2;break}}for(o=-1;++o<n.length;)n[o][1].type==="strikethroughSequenceTemporary"&&(n[o][1].type="data");return n}function h(n,u,o){const g=this.previous,p=this.events;let a=0;return b;function b(m){return g===126&&p[p.length-1][1].type!=="characterEscape"?o(m):(n.enter("strikethroughSequenceTemporary"),k(m))}function k(m){const c=f.classifyCharacter(g);if(m===126)return a>1?o(m):(n.consume(m),a++,k);if(a<2&&!e)return o(m);const D=n.exit("strikethroughSequenceTemporary"),y=f.classifyCharacter(m);return D._open=!y||y===2&&!!c,D._close=!c||c===2&&!!y,u(m)}}}const I={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function zt(){return{enter:{table(t){const i=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",i)},tableBody(){this.tag("<tbody>")},tableData(){const t=this.getData("tableAlign"),i=this.getData("tableColumn"),e=I[t[i]];e===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+e+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){const t=this.getData("tableAlign"),i=this.getData("tableColumn"),e=I[t[i]];this.lineEndingIfNeeded(),this.tag("<th"+e+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let i=this.sliceSerialize(t);this.getData("tableAlign")&&(i=i.replace(/\\([\\|])/g,Et)),this.raw(this.encode(i))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){const t=this.getData("tableAlign"),i=this.getData("tableColumn");i in t?(this.tag("</td>"),this.setData("tableColumn",i+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){const t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){const t=this.getData("tableAlign");let i=this.getData("tableColumn");for(;i<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+I[t[i]]+"></td>"),i++;this.setData("tableColumn",i),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}function Et(t,i){return i==="|"?i:t}class It{constructor(){this.map=[]}add(i,e,r){Ot(this,i,e,r)}consume(i){if(this.map.sort(function(h,n){return h[0]-n[0]}),this.map.length===0)return;let e=this.map.length;const r=[];for(;e>0;)e-=1,r.push(i.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),i.length=this.map[e][0];r.push(i.slice()),i.length=0;let s=r.pop();for(;s;){for(const h of s)i.push(h);s=r.pop()}this.map.length=0}}function Ot(t,i,e,r){let s=0;if(!(e===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=e,t.map[s][2].push(...r);return}s+=1}t.map.push([i,e,r])}}function Tt(t,i){let e=!1;const r=[];for(;i<t.length;){const s=t[i];if(e){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const h=r.length-1;r[h]=r[h]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(e=!0);i+=1}return r}function Rt(){return{flow:{null:{name:"table",tokenize:Mt,resolveAll:Pt}}}}function Mt(t,i,e){const r=this;let s=0,h=0,n;return u;function u(l){let F=r.events.length-1;for(;F>-1;){const B=r.events[F][1].type;if(B==="lineEnding"||B==="linePrefix")F--;else break}const H=F>-1?r.events[F][1].type:null,N=H==="tableHead"||H==="tableRow"?j:o;return N===j&&r.parser.lazy[r.now().line]?e(l):N(l)}function o(l){return t.enter("tableHead"),t.enter("tableRow"),g(l)}function g(l){return l===124||(n=!0,h+=1),p(l)}function p(l){return l===null?e(l):f.markdownLineEnding(l)?h>1?(h=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),k):e(l):f.markdownSpace(l)?f.factorySpace(t,p,"whitespace")(l):(h+=1,n&&(n=!1,s+=1),l===124?(t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),n=!0,p):(t.enter("data"),a(l)))}function a(l){return l===null||l===124||f.markdownLineEndingOrSpace(l)?(t.exit("data"),p(l)):(t.consume(l),l===92?b:a)}function b(l){return l===92||l===124?(t.consume(l),a):a(l)}function k(l){return r.interrupt=!1,r.parser.lazy[r.now().line]?e(l):(t.enter("tableDelimiterRow"),n=!1,f.markdownSpace(l)?f.factorySpace(t,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):m(l))}function m(l){return l===45||l===58?D(l):l===124?(n=!0,t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),c):A(l)}function c(l){return f.markdownSpace(l)?f.factorySpace(t,D,"whitespace")(l):D(l)}function D(l){return l===58?(h+=1,n=!0,t.enter("tableDelimiterMarker"),t.consume(l),t.exit("tableDelimiterMarker"),y):l===45?(h+=1,y(l)):l===null||f.markdownLineEnding(l)?E(l):A(l)}function y(l){return l===45?(t.enter("tableDelimiterFiller"),M(l)):A(l)}function M(l){return l===45?(t.consume(l),M):l===58?(n=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(l),t.exit("tableDelimiterMarker"),P):(t.exit("tableDelimiterFiller"),P(l))}function P(l){return f.markdownSpace(l)?f.factorySpace(t,E,"whitespace")(l):E(l)}function E(l){return l===124?m(l):l===null||f.markdownLineEnding(l)?!n||s!==h?A(l):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(l)):A(l)}function A(l){return e(l)}function j(l){return t.enter("tableRow"),L(l)}function L(l){return l===124?(t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),L):l===null||f.markdownLineEnding(l)?(t.exit("tableRow"),i(l)):f.markdownSpace(l)?f.factorySpace(t,L,"whitespace")(l):(t.enter("data"),x(l))}function x(l){return l===null||l===124||f.markdownLineEndingOrSpace(l)?(t.exit("data"),L(l)):(t.consume(l),l===92?Z:x)}function Z(l){return l===92||l===124?(t.consume(l),x):x(l)}}function Pt(t,i){let e=-1,r=!0,s=0,h=[0,0,0,0],n=[0,0,0,0],u=!1,o=0,g,p,a;const b=new It;for(;++e<t.length;){const k=t[e],m=k[1];k[0]==="enter"?m.type==="tableHead"?(u=!1,o!==0&&(W(b,i,o,g,p),p=void 0,o=0),g={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},b.add(e,0,[["enter",g,i]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,a=void 0,h=[0,0,0,0],n=[0,e+1,0,0],u&&(u=!1,p={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},b.add(e,0,[["enter",p,i]])),s=m.type==="tableDelimiterRow"?2:p?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,n[2]===0&&(h[1]!==0&&(n[0]=n[1],a=z(b,i,h,s,void 0,a),h=[0,0,0,0]),n[2]=e)):m.type==="tableCellDivider"&&(r?r=!1:(h[1]!==0&&(n[0]=n[1],a=z(b,i,h,s,void 0,a)),h=n,n=[h[1],e,0,0])):m.type==="tableHead"?(u=!0,o=e):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=e,h[1]!==0?(n[0]=n[1],a=z(b,i,h,s,e,a)):n[1]!==0&&(a=z(b,i,n,s,e,a)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(n[3]=e)}for(o!==0&&W(b,i,o,g,p),b.consume(i.events),e=-1;++e<i.events.length;){const k=i.events[e];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=Tt(i.events,e))}return t}function z(t,i,e,r,s,h){const n=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";e[0]!==0&&(h.end=Object.assign({},C(i.events,e[0])),t.add(e[0],0,[["exit",h,i]]));const o=C(i.events,e[1]);if(h={type:n,start:Object.assign({},o),end:Object.assign({},o)},t.add(e[1],0,[["enter",h,i]]),e[2]!==0){const g=C(i.events,e[2]),p=C(i.events,e[3]),a={type:u,start:Object.assign({},g),end:Object.assign({},p)};if(t.add(e[2],0,[["enter",a,i]]),r!==2){const b=i.events[e[2]],k=i.events[e[3]];if(b[1].end=Object.assign({},k[1].end),b[1].type="chunkText",b[1].contentType="text",e[3]>e[2]+1){const m=e[2]+1,c=e[3]-e[2]-1;t.add(m,c,[])}}t.add(e[3]+1,0,[["exit",a,i]])}return s!==void 0&&(h.end=Object.assign({},C(i.events,s)),t.add(s,0,[["exit",h,i]]),h=void 0),h}function W(t,i,e,r,s){const h=[],n=C(i.events,e);s&&(s.end=Object.assign({},n),h.push(["exit",s,i])),r.end=Object.assign({},n),h.push(["exit",r,i]),t.add(e+1,0,h)}function C(t,i){const e=t[i],r=e[0]==="enter"?"start":"end";return e[1][r]}const Y=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,jt=new RegExp("^"+Y.source,"i");function Ht(){return{exit:{htmlFlowData(t){_.call(this,t,Y)},htmlTextData(t){_.call(this,t,jt)}}}}function _(t,i){let e=this.sliceSerialize(t);this.options.allowDangerousHtml&&(e=e.replace(i,"<$1$2")),this.raw(this.encode(e))}function Nt(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}const Bt={name:"tasklistCheck",tokenize:_t};function Wt(){return{text:{91:Bt}}}function _t(t,i,e){const r=this;return s;function s(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?e(o):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),h)}function h(o){return f.markdownLineEndingOrSpace(o)?(t.enter("taskListCheckValueUnchecked"),t.consume(o),t.exit("taskListCheckValueUnchecked"),n):o===88||o===120?(t.enter("taskListCheckValueChecked"),t.consume(o),t.exit("taskListCheckValueChecked"),n):e(o)}function n(o){return o===93?(t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):e(o)}function u(o){return f.markdownLineEnding(o)?i(o):f.markdownSpace(o)?t.check({tokenize:qt},i,e)(o):e(o)}}function qt(t,i,e){return f.factorySpace(t,r,"whitespace");function r(s){return s===null?e(s):i(s)}}function Ut(t){return f.combineExtensions([tt(),pt(),xt(t),Rt(),Wt()])}function Vt(t){return f.combineHtmlExtensions([st(),Ft(t),Lt(),zt(),Ht(),Nt()])}exports.gfm=Ut;exports.gfmHtml=Vt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-BZYWyjM_.cjs"),K={tokenize:rt,partial:!0},q={tokenize:at,partial:!0},U={tokenize:lt,partial:!0},V={tokenize:ut,partial:!0},v={tokenize:ot,partial:!0},G={name:"wwwAutolink",tokenize:nt,previous:J},$={name:"protocolAutolink",tokenize:it,previous:Q},d={name:"emailAutolink",tokenize:et,previous:X},w={};function tt(){return{text:w}}let S=48;for(;S<123;)w[S]=d,S++,S===58?S=65:S===91&&(S=97);w[43]=d;w[45]=d;w[46]=d;w[95]=d;w[72]=[d,$];w[104]=[d,$];w[87]=[d,G];w[119]=[d,G];function et(t,i,e){const r=this;let s,h;return n;function n(a){return!O(a)||!X.call(r,r.previous)||T(r.events)?e(a):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(a))}function u(a){return O(a)?(t.consume(a),u):a===64?(t.consume(a),o):e(a)}function o(a){return a===46?t.check(v,p,g)(a):a===45||a===95||f.asciiAlphanumeric(a)?(h=!0,t.consume(a),o):p(a)}function g(a){return t.consume(a),s=!0,o}function p(a){return h&&s&&f.asciiAlpha(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(a)):e(a)}}function nt(t,i,e){const r=this;return s;function s(n){return n!==87&&n!==119||!J.call(r,r.previous)||T(r.events)?e(n):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(K,t.attempt(q,t.attempt(U,h),e),e)(n))}function h(n){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(n)}}function it(t,i,e){const r=this;let s="",h=!1;return n;function n(a){return(a===72||a===104)&&Q.call(r,r.previous)&&!T(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(a),t.consume(a),u):e(a)}function u(a){if(f.asciiAlpha(a)&&s.length<5)return s+=String.fromCodePoint(a),t.consume(a),u;if(a===58){const b=s.toLowerCase();if(b==="http"||b==="https")return t.consume(a),o}return e(a)}function o(a){return a===47?(t.consume(a),h?g:(h=!0,o)):e(a)}function g(a){return a===null||f.asciiControl(a)||f.markdownLineEndingOrSpace(a)||f.unicodeWhitespace(a)||f.unicodePunctuation(a)?e(a):t.attempt(q,t.attempt(U,p),e)(a)}function p(a){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(a)}}function rt(t,i,e){let r=0;return s;function s(n){return(n===87||n===119)&&r<3?(r++,t.consume(n),s):n===46&&r===3?(t.consume(n),h):e(n)}function h(n){return n===null?e(n):i(n)}}function at(t,i,e){let r,s,h;return n;function n(g){return g===46||g===95?t.check(V,o,u)(g):g===null||f.markdownLineEndingOrSpace(g)||f.unicodeWhitespace(g)||g!==45&&f.unicodePunctuation(g)?o(g):(h=!0,t.consume(g),n)}function u(g){return g===95?r=!0:(s=r,r=void 0),t.consume(g),n}function o(g){return s||r||!h?e(g):i(g)}}function lt(t,i){let e=0,r=0;return s;function s(n){return n===40?(e++,t.consume(n),s):n===41&&r<e?h(n):n===33||n===34||n===38||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===60||n===63||n===93||n===95||n===126?t.check(V,i,h)(n):n===null||f.markdownLineEndingOrSpace(n)||f.unicodeWhitespace(n)?i(n):(t.consume(n),s)}function h(n){return n===41&&r++,t.consume(n),s}}function ut(t,i,e){return r;function r(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?(t.consume(u),r):u===38?(t.consume(u),h):u===93?(t.consume(u),s):u===60||u===null||f.markdownLineEndingOrSpace(u)||f.unicodeWhitespace(u)?i(u):e(u)}function s(u){return u===null||u===40||u===91||f.markdownLineEndingOrSpace(u)||f.unicodeWhitespace(u)?i(u):r(u)}function h(u){return f.asciiAlpha(u)?n(u):e(u)}function n(u){return u===59?(t.consume(u),r):f.asciiAlpha(u)?(t.consume(u),n):e(u)}}function ot(t,i,e){return r;function r(h){return t.consume(h),s}function s(h){return f.asciiAlphanumeric(h)?e(h):i(h)}}function J(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||f.markdownLineEndingOrSpace(t)}function Q(t){return!f.asciiAlpha(t)}function X(t){return!(t===47||O(t))}function O(t){return t===43||t===45||t===46||t===95||f.asciiAlphanumeric(t)}function T(t){let i=t.length,e=!1;for(;i--;){const r=t[i][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){e=!0;break}if(r._gfmAutolinkLiteralWalkedInto){e=!1;break}}return t.length>0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}function st(){return{exit:{literalAutolinkEmail:mt,literalAutolinkHttp:gt,literalAutolinkWww:ht}}}function ht(t){R.call(this,t,"http://")}function mt(t){R.call(this,t,"mailto:")}function gt(t){R.call(this,t)}function R(t,i){const e=this.sliceSerialize(t);this.tag('<a href="'+f.sanitizeUri((i||"")+e)+'">'),this.raw(this.encode(e)),this.tag("</a>")}const ft={tokenize:yt,partial:!0};function pt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wt,continuation:{tokenize:Dt},exit:dt}},text:{91:{name:"gfmFootnoteCall",tokenize:ct},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bt,resolveTo:kt}}}}function bt(t,i,e){const r=this;let s=r.events.length;const h=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let n;for(;s--;){const o=r.events[s][1];if(o.type==="labelImage"){n=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!n||!n._balanced)return e(o);const g=f.normalizeIdentifier(r.sliceSerialize({start:n.end,end:r.now()}));return g.codePointAt(0)!==94||!h.includes(g.slice(1))?e(o):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),i(o))}}function kt(t,i){let e=t.length;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},n={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},u=[t[e+1],t[e+2],["enter",r,i],t[e+3],t[e+4],["enter",s,i],["exit",s,i],["enter",h,i],["enter",n,i],["exit",n,i],["exit",h,i],t[t.length-2],t[t.length-1],["exit",r,i]];return t.splice(e,t.length-e+1,...u),t}function ct(t,i,e){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let h=0,n;return u;function u(a){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(a),t.exit("gfmFootnoteCallLabelMarker"),o}function o(a){return a!==94?e(a):(t.enter("gfmFootnoteCallMarker"),t.consume(a),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",g)}function g(a){if(h>999||a===93&&!n||a===null||a===91||f.markdownLineEndingOrSpace(a))return e(a);if(a===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return s.includes(f.normalizeIdentifier(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(a),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):e(a)}return f.markdownLineEndingOrSpace(a)||(n=!0),h++,t.consume(a),a===92?p:g}function p(a){return a===91||a===92||a===93?(t.consume(a),h++,g):g(a)}}function wt(t,i,e){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let h,n=0,u;return o;function o(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",p):e(m)}function p(m){if(n>999||m===93&&!u||m===null||m===91||f.markdownLineEndingOrSpace(m))return e(m);if(m===93){t.exit("chunkString");const c=t.exit("gfmFootnoteDefinitionLabelString");return h=f.normalizeIdentifier(r.sliceSerialize(c)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return f.markdownLineEndingOrSpace(m)||(u=!0),n++,t.consume(m),m===92?a:p}function a(m){return m===91||m===92||m===93?(t.consume(m),n++,p):p(m)}function b(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),s.includes(h)||s.push(h),f.factorySpace(t,k,"gfmFootnoteDefinitionWhitespace")):e(m)}function k(m){return i(m)}}function Dt(t,i,e){return t.check(f.blankLine,i,t.attempt(ft,i,e))}function dt(t){t.exit("gfmFootnoteDefinition")}function yt(t,i,e){const r=this;return f.factorySpace(t,s,"gfmFootnoteDefinitionIndent",5);function s(h){const n=r.events[r.events.length-1];return n&&n[1].type==="gfmFootnoteDefinitionIndent"&&n[2].sliceSerialize(n[1],!0).length===4?i(h):e(h)}}const St={}.hasOwnProperty,Ct={};function At(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function Ft(t){const i=t||Ct,e=i.label||"Footnotes",r=i.labelTagName||"h2",s=i.labelAttributes===null||i.labelAttributes===void 0?'class="sr-only"':i.labelAttributes,h=i.backLabel||At,n=i.clobberPrefix===null||i.clobberPrefix===void 0?"user-content-":i.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let u=this.getData("gfmFootnoteDefinitions");const o=this.getData("gfmFootnoteDefinitionStack"),g=this.getData("tightStack"),p=o.pop(),a=this.resume();u||this.setData("gfmFootnoteDefinitions",u={}),St.call(u,p)||(u[p]=a),g.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(u){let o=this.getData("gfmFootnoteDefinitionStack");o||this.setData("gfmFootnoteDefinitionStack",o=[]),o.push(f.normalizeIdentifier(this.sliceSerialize(u))),this.resume(),this.buffer()},gfmFootnoteCallString(u){let o=this.getData("gfmFootnoteCallOrder"),g=this.getData("gfmFootnoteCallCounts");const p=f.normalizeIdentifier(this.sliceSerialize(u));let a;this.resume(),o||this.setData("gfmFootnoteCallOrder",o=[]),g||this.setData("gfmFootnoteCallCounts",g={});const b=o.indexOf(p),k=f.sanitizeUri(p.toLowerCase());b===-1?(o.push(p),g[p]=1,a=o.length):(g[p]++,a=b+1);const m=g[p];this.tag('<sup><a href="#'+n+"fn-"+k+'" id="'+n+"fnref-"+k+(m>1?"-"+m:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(a)+"</a></sup>")},null(){const u=this.getData("gfmFootnoteCallOrder")||[],o=this.getData("gfmFootnoteCallCounts")||{},g=this.getData("gfmFootnoteDefinitions")||{};let p=-1;for(u.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+r+' id="footnote-label"'+(s?" "+s:"")+">"),this.raw(this.encode(e)),this.tag("</"+r+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++p<u.length;){const a=u[p],b=f.sanitizeUri(a.toLowerCase());let k=0;const m=[];for(;++k<=o[a];)m.push('<a href="#'+n+"fnref-"+b+(k>1?"-"+k:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof h=="string"?h:h(p,k))+'" class="data-footnote-backref">↩'+(k>1?"<sup>"+k+"</sup>":"")+"</a>");const c=m.join(" ");let D=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+n+"fn-"+b+'">'),this.lineEndingIfNeeded(),this.tag(g[a].replace(/<\/p>(?:\r?\n|\r)?$/,function(y){return D=!0," "+c+y})),D||(this.lineEndingIfNeeded(),this.tag(c)),this.lineEndingIfNeeded(),this.tag("</li>")}u.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}function Lt(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}function xt(t){let e=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:h,resolveAll:s};return e==null&&(e=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(n,u){let o=-1;for(;++o<n.length;)if(n[o][0]==="enter"&&n[o][1].type==="strikethroughSequenceTemporary"&&n[o][1]._close){let g=o;for(;g--;)if(n[g][0]==="exit"&&n[g][1].type==="strikethroughSequenceTemporary"&&n[g][1]._open&&n[o][1].end.offset-n[o][1].start.offset===n[g][1].end.offset-n[g][1].start.offset){n[o][1].type="strikethroughSequence",n[g][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},n[g][1].start),end:Object.assign({},n[o][1].end)},a={type:"strikethroughText",start:Object.assign({},n[g][1].end),end:Object.assign({},n[o][1].start)},b=[["enter",p,u],["enter",n[g][1],u],["exit",n[g][1],u],["enter",a,u]],k=u.parser.constructs.insideSpan.null;k&&f.splice(b,b.length,0,f.resolveAll(k,n.slice(g+1,o),u)),f.splice(b,b.length,0,[["exit",a,u],["enter",n[o][1],u],["exit",n[o][1],u],["exit",p,u]]),f.splice(n,g-1,o-g+3,b),o=g+b.length-2;break}}for(o=-1;++o<n.length;)n[o][1].type==="strikethroughSequenceTemporary"&&(n[o][1].type="data");return n}function h(n,u,o){const g=this.previous,p=this.events;let a=0;return b;function b(m){return g===126&&p[p.length-1][1].type!=="characterEscape"?o(m):(n.enter("strikethroughSequenceTemporary"),k(m))}function k(m){const c=f.classifyCharacter(g);if(m===126)return a>1?o(m):(n.consume(m),a++,k);if(a<2&&!e)return o(m);const D=n.exit("strikethroughSequenceTemporary"),y=f.classifyCharacter(m);return D._open=!y||y===2&&!!c,D._close=!c||c===2&&!!y,u(m)}}}const I={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};function zt(){return{enter:{table(t){const i=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",i)},tableBody(){this.tag("<tbody>")},tableData(){const t=this.getData("tableAlign"),i=this.getData("tableColumn"),e=I[t[i]];e===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+e+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){const t=this.getData("tableAlign"),i=this.getData("tableColumn"),e=I[t[i]];this.lineEndingIfNeeded(),this.tag("<th"+e+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let i=this.sliceSerialize(t);this.getData("tableAlign")&&(i=i.replace(/\\([\\|])/g,Et)),this.raw(this.encode(i))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){const t=this.getData("tableAlign"),i=this.getData("tableColumn");i in t?(this.tag("</td>"),this.setData("tableColumn",i+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){const t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){const t=this.getData("tableAlign");let i=this.getData("tableColumn");for(;i<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+I[t[i]]+"></td>"),i++;this.setData("tableColumn",i),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}function Et(t,i){return i==="|"?i:t}class It{constructor(){this.map=[]}add(i,e,r){Ot(this,i,e,r)}consume(i){if(this.map.sort(function(h,n){return h[0]-n[0]}),this.map.length===0)return;let e=this.map.length;const r=[];for(;e>0;)e-=1,r.push(i.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),i.length=this.map[e][0];r.push(i.slice()),i.length=0;let s=r.pop();for(;s;){for(const h of s)i.push(h);s=r.pop()}this.map.length=0}}function Ot(t,i,e,r){let s=0;if(!(e===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=e,t.map[s][2].push(...r);return}s+=1}t.map.push([i,e,r])}}function Tt(t,i){let e=!1;const r=[];for(;i<t.length;){const s=t[i];if(e){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const h=r.length-1;r[h]=r[h]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(e=!0);i+=1}return r}function Rt(){return{flow:{null:{name:"table",tokenize:Mt,resolveAll:Pt}}}}function Mt(t,i,e){const r=this;let s=0,h=0,n;return u;function u(l){let F=r.events.length-1;for(;F>-1;){const B=r.events[F][1].type;if(B==="lineEnding"||B==="linePrefix")F--;else break}const H=F>-1?r.events[F][1].type:null,N=H==="tableHead"||H==="tableRow"?j:o;return N===j&&r.parser.lazy[r.now().line]?e(l):N(l)}function o(l){return t.enter("tableHead"),t.enter("tableRow"),g(l)}function g(l){return l===124||(n=!0,h+=1),p(l)}function p(l){return l===null?e(l):f.markdownLineEnding(l)?h>1?(h=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),k):e(l):f.markdownSpace(l)?f.factorySpace(t,p,"whitespace")(l):(h+=1,n&&(n=!1,s+=1),l===124?(t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),n=!0,p):(t.enter("data"),a(l)))}function a(l){return l===null||l===124||f.markdownLineEndingOrSpace(l)?(t.exit("data"),p(l)):(t.consume(l),l===92?b:a)}function b(l){return l===92||l===124?(t.consume(l),a):a(l)}function k(l){return r.interrupt=!1,r.parser.lazy[r.now().line]?e(l):(t.enter("tableDelimiterRow"),n=!1,f.markdownSpace(l)?f.factorySpace(t,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):m(l))}function m(l){return l===45||l===58?D(l):l===124?(n=!0,t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),c):A(l)}function c(l){return f.markdownSpace(l)?f.factorySpace(t,D,"whitespace")(l):D(l)}function D(l){return l===58?(h+=1,n=!0,t.enter("tableDelimiterMarker"),t.consume(l),t.exit("tableDelimiterMarker"),y):l===45?(h+=1,y(l)):l===null||f.markdownLineEnding(l)?E(l):A(l)}function y(l){return l===45?(t.enter("tableDelimiterFiller"),M(l)):A(l)}function M(l){return l===45?(t.consume(l),M):l===58?(n=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(l),t.exit("tableDelimiterMarker"),P):(t.exit("tableDelimiterFiller"),P(l))}function P(l){return f.markdownSpace(l)?f.factorySpace(t,E,"whitespace")(l):E(l)}function E(l){return l===124?m(l):l===null||f.markdownLineEnding(l)?!n||s!==h?A(l):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(l)):A(l)}function A(l){return e(l)}function j(l){return t.enter("tableRow"),L(l)}function L(l){return l===124?(t.enter("tableCellDivider"),t.consume(l),t.exit("tableCellDivider"),L):l===null||f.markdownLineEnding(l)?(t.exit("tableRow"),i(l)):f.markdownSpace(l)?f.factorySpace(t,L,"whitespace")(l):(t.enter("data"),x(l))}function x(l){return l===null||l===124||f.markdownLineEndingOrSpace(l)?(t.exit("data"),L(l)):(t.consume(l),l===92?Z:x)}function Z(l){return l===92||l===124?(t.consume(l),x):x(l)}}function Pt(t,i){let e=-1,r=!0,s=0,h=[0,0,0,0],n=[0,0,0,0],u=!1,o=0,g,p,a;const b=new It;for(;++e<t.length;){const k=t[e],m=k[1];k[0]==="enter"?m.type==="tableHead"?(u=!1,o!==0&&(W(b,i,o,g,p),p=void 0,o=0),g={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},b.add(e,0,[["enter",g,i]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,a=void 0,h=[0,0,0,0],n=[0,e+1,0,0],u&&(u=!1,p={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},b.add(e,0,[["enter",p,i]])),s=m.type==="tableDelimiterRow"?2:p?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,n[2]===0&&(h[1]!==0&&(n[0]=n[1],a=z(b,i,h,s,void 0,a),h=[0,0,0,0]),n[2]=e)):m.type==="tableCellDivider"&&(r?r=!1:(h[1]!==0&&(n[0]=n[1],a=z(b,i,h,s,void 0,a)),h=n,n=[h[1],e,0,0])):m.type==="tableHead"?(u=!0,o=e):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=e,h[1]!==0?(n[0]=n[1],a=z(b,i,h,s,e,a)):n[1]!==0&&(a=z(b,i,n,s,e,a)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(n[3]=e)}for(o!==0&&W(b,i,o,g,p),b.consume(i.events),e=-1;++e<i.events.length;){const k=i.events[e];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=Tt(i.events,e))}return t}function z(t,i,e,r,s,h){const n=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";e[0]!==0&&(h.end=Object.assign({},C(i.events,e[0])),t.add(e[0],0,[["exit",h,i]]));const o=C(i.events,e[1]);if(h={type:n,start:Object.assign({},o),end:Object.assign({},o)},t.add(e[1],0,[["enter",h,i]]),e[2]!==0){const g=C(i.events,e[2]),p=C(i.events,e[3]),a={type:u,start:Object.assign({},g),end:Object.assign({},p)};if(t.add(e[2],0,[["enter",a,i]]),r!==2){const b=i.events[e[2]],k=i.events[e[3]];if(b[1].end=Object.assign({},k[1].end),b[1].type="chunkText",b[1].contentType="text",e[3]>e[2]+1){const m=e[2]+1,c=e[3]-e[2]-1;t.add(m,c,[])}}t.add(e[3]+1,0,[["exit",a,i]])}return s!==void 0&&(h.end=Object.assign({},C(i.events,s)),t.add(s,0,[["exit",h,i]]),h=void 0),h}function W(t,i,e,r,s){const h=[],n=C(i.events,e);s&&(s.end=Object.assign({},n),h.push(["exit",s,i])),r.end=Object.assign({},n),h.push(["exit",r,i]),t.add(e+1,0,h)}function C(t,i){const e=t[i],r=e[0]==="enter"?"start":"end";return e[1][r]}const Y=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,jt=new RegExp("^"+Y.source,"i");function Ht(){return{exit:{htmlFlowData(t){_.call(this,t,Y)},htmlTextData(t){_.call(this,t,jt)}}}}function _(t,i){let e=this.sliceSerialize(t);this.options.allowDangerousHtml&&(e=e.replace(i,"<$1$2")),this.raw(this.encode(e))}function Nt(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}const Bt={name:"tasklistCheck",tokenize:_t};function Wt(){return{text:{91:Bt}}}function _t(t,i,e){const r=this;return s;function s(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?e(o):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),h)}function h(o){return f.markdownLineEndingOrSpace(o)?(t.enter("taskListCheckValueUnchecked"),t.consume(o),t.exit("taskListCheckValueUnchecked"),n):o===88||o===120?(t.enter("taskListCheckValueChecked"),t.consume(o),t.exit("taskListCheckValueChecked"),n):e(o)}function n(o){return o===93?(t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):e(o)}function u(o){return f.markdownLineEnding(o)?i(o):f.markdownSpace(o)?t.check({tokenize:qt},i,e)(o):e(o)}}function qt(t,i,e){return f.factorySpace(t,r,"whitespace");function r(s){return s===null?e(s):i(s)}}function Ut(t){return f.combineExtensions([tt(),pt(),xt(t),Rt(),Wt()])}function Vt(t){return f.combineHtmlExtensions([st(),Ft(t),Lt(),zt(),Ht(),Nt()])}exports.gfm=Ut;exports.gfmHtml=Vt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const an=require("@tempots/dom"),Mt=require("./link-portal-_tiDFZqh.cjs"),
|
|
2
|
-
`)}function T(){const k=u[u.length-1],w=k[k.length-1],Q=w?w.charCodeAt(w.length-1):null;Q===10||Q===13||Q===null||P()}function x(k){return E("ignoreEncode")?k:Jn(k)}function L(){S()}function N(k){l.push(!k._loose),T(),I("<ol"),b("expectFirstItem",!0)}function q(k){l.push(!k._loose),T(),I("<ul"),b("expectFirstItem",!0)}function D(k){if(E("expectFirstItem")){const w=Number.parseInt(this.sliceSerialize(k),10);w!==1&&I(' start="'+x(String(w))+'"')}}function z(){E("expectFirstItem")?I(">"):M(),T(),I("<li>"),b("expectFirstItem"),b("lastWasTag")}function C(){M(),l.pop(),P(),I("</ol>")}function O(){M(),l.pop(),P(),I("</ul>")}function M(){E("lastWasTag")&&!E("slurpAllLineEndings")&&T(),I("</li>"),b("slurpAllLineEndings")}function A(){l.push(!1),T(),I("<blockquote>")}function V(){l.pop(),T(),I("</blockquote>"),b("slurpAllLineEndings")}function R(){l[l.length-1]||(T(),I("<p>")),b("slurpAllLineEndings")}function Y(){l[l.length-1]?b("slurpAllLineEndings",!0):I("</p>")}function tn(){T(),I("<pre><code"),b("fencesCount",0)}function o(){const k=S();I(' class="language-'+k+'"')}function Z(){const k=E("fencesCount")||0;k||(I(">"),b("slurpOneLineEnding",!0)),b("fencesCount",k+1)}function en(){T(),I("<pre><code>")}function s(){const k=E("fencesCount");k!==void 0&&k<2&&h.tightStack.length>0&&!E("lastWasTag")&&P(),E("flowCodeSeenData")&&T(),I("</code></pre>"),k!==void 0&&k<2&&T(),b("flowCodeSeenData"),b("fencesCount"),b("slurpOneLineEnding")}function G(){i.push({image:!0}),t=void 0}function on(){i.push({})}function H(k){i[i.length-1].labelId=this.sliceSerialize(k)}function fn(){i[i.length-1].label=S()}function un(k){i[i.length-1].referenceId=this.sliceSerialize(k)}function sn(){F(),i[i.length-1].destination=""}function cn(){F(),b("ignoreEncode",!0)}function In(){i[i.length-1].destination=S(),b("ignoreEncode")}function ot(){i[i.length-1].title=S()}function An(){let k=i.length-1;const w=i[k],Q=w.referenceId||w.labelId,J=w.destination===void 0?e[hn(Q)]:w;for(t=!0;k--;)if(i[k].image){t=void 0;break}w.image?(I('<img src="'+gn(J.destination,r.allowDangerousProtocol?void 0:jt)+'" alt="'),d(w.label),I('"')):I('<a href="'+gn(J.destination,r.allowDangerousProtocol?void 0:Rn)+'"'),I(J.title?' title="'+J.title+'"':""),w.image?I(" />"):(I(">"),d(w.label),I("</a>")),i.pop()}function st(){F(),i.push({})}function ct(k){S(),i[i.length-1].labelId=this.sliceSerialize(k)}function ht(){F(),b("ignoreEncode",!0)}function ft(){i[i.length-1].destination=S(),b("ignoreEncode")}function pt(){i[i.length-1].title=S()}function mt(){const k=i[i.length-1],w=hn(k.labelId);S(),Dn.call(e,w)||(e[w]=i[i.length-1]),i.pop()}function gt(){b("slurpAllLineEndings",!0)}function xt(k){E("headingRank")||(b("headingRank",this.sliceSerialize(k).length),T(),I("<h"+E("headingRank")+">"))}function kt(){F(),b("slurpAllLineEndings")}function St(){b("slurpAllLineEndings",!0)}function bt(){I("</h"+E("headingRank")+">"),b("headingRank")}function dt(k){b("headingRank",this.sliceSerialize(k).charCodeAt(0)===61?1:2)}function It(){const k=S();T(),I("<h"+E("headingRank")+">"),d(k),I("</h"+E("headingRank")+">"),b("slurpAllLineEndings"),b("headingRank")}function pn(k){d(x(this.sliceSerialize(k)))}function wt(k){if(!E("slurpAllLineEndings")){if(E("slurpOneLineEnding")){b("slurpOneLineEnding");return}if(E("inCodeText")){d(" ");return}d(x(this.sliceSerialize(k)))}}function Ct(k){d(x(this.sliceSerialize(k))),b("flowCodeSeenData",!0)}function _n(){I("<br />")}function zt(){T(),Pn()}function Ln(){b("ignoreEncode")}function Pn(){r.allowDangerousHtml&&b("ignoreEncode",!0)}function yt(){I("<em>")}function Et(){I("<strong>")}function Tt(){b("inCodeText",!0),I("<code>")}function Ft(){b("inCodeText"),I("</code>")}function At(){I("</em>")}function _t(){I("</strong>")}function Lt(){T(),I("<hr />")}function Bn(k){b("characterReferenceType",k.type)}function Pt(k){const w=this.sliceSerialize(k),Q=E("characterReferenceType")?Rt(w,E("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):Yn(w);d(x(Q)),b("characterReferenceType")}function Bt(k){const w=this.sliceSerialize(k);I('<a href="'+gn(w,r.allowDangerousProtocol?void 0:Rn)+'">'),d(x(w)),I("</a>")}function Ot(k){const w=this.sliceSerialize(k);I('<a href="'+gn("mailto:"+w)+'">'),d(x(w)),I("</a>")}}function B(n,r,t,e){const u=e?e-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(m){return _(m)?(n.enter(t),a(m)):r(m)}function a(m){return _(m)&&i++<u?(n.consume(m),a):(n.exit(t),r(m))}}const Yt={tokenize:Zt};function Zt(n){const r=n.attempt(this.parser.constructs.contentInitial,e,u);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),B(n,r,"linePrefix")}function u(a){return n.enter("paragraph"),i(a)}function i(a){const m=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=m),t=m,l(a)}function l(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return y(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),l)}}const Gt={tokenize:Jt},Hn={tokenize:Kt};function Jt(n){const r=this,t=[];let e=0,u,i,l;return a;function a(d){if(e<t.length){const P=t[e];return r.containerState=P[1],n.attempt(P[0].continuation,m,h)(d)}return h(d)}function m(d){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&I();const P=r.events.length;let T=P,x;for(;T--;)if(r.events[T][0]==="exit"&&r.events[T][1].type==="chunkFlow"){x=r.events[T][1].end;break}S(e);let L=P;for(;L<r.events.length;)r.events[L][1].end={...x},L++;return X(r.events,T+1,0,r.events.slice(P)),r.events.length=L,h(d)}return a(d)}function h(d){if(e===t.length){if(!u)return g(d);if(u.currentConstruct&&u.currentConstruct.concrete)return b(d);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Hn,p,f)(d)}function p(d){return u&&I(),S(e),g(d)}function f(d){return r.parser.lazy[r.now().line]=e!==t.length,l=r.now().offset,b(d)}function g(d){return r.containerState={},n.attempt(Hn,c,b)(d)}function c(d){return e++,t.push([r.currentConstruct,r.containerState]),g(d)}function b(d){if(d===null){u&&I(),S(0),n.consume(d);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:i}),E(d)}function E(d){if(d===null){F(n.exit("chunkFlow"),!0),S(0),n.consume(d);return}return y(d)?(n.consume(d),F(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(d),E)}function F(d,P){const T=r.sliceStream(d);if(P&&T.push(null),d.previous=i,i&&(i.next=d),i=d,u.defineSkip(d.start),u.write(T),r.parser.lazy[d.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<l&&(!u.events[x][1].end||u.events[x][1].end.offset>l))return;const L=r.events.length;let N=L,q,D;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(q){D=r.events[N][1].end;break}q=!0}for(S(e),x=L;x<r.events.length;)r.events[x][1].end={...D},x++;X(r.events,N+1,0,r.events.slice(L)),r.events.length=x}}function S(d){let P=t.length;for(;P-- >d;){const T=t[P];r.containerState=T[1],T[0].exit.call(r,n)}t.length=d}function I(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Kt(n,r,t){return B(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function En(n){if(n===null||U(n)||Xn(n))return 1;if(Kn(n))return 2}function dn(n,r,t){const e=[];let u=-1;for(;++u<n.length;){const i=n[u].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}const Tn={name:"attention",resolveAll:Xt,tokenize:vt};function Xt(n,r){let t=-1,e,u,i,l,a,m,h,p;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;m=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f={...n[e][1].end},g={...n[t][1].start};Vn(f,-m),Vn(g,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:{...n[e][1].end}},a={type:m>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:g},i={type:m>1?"strongText":"emphasisText",start:{...n[e][1].end},end:{...n[t][1].start}},u={type:m>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},n[e][1].end={...l.start},n[t][1].start={...a.end},h=[],n[e][1].end.offset-n[e][1].start.offset&&(h=W(h,[["enter",n[e][1],r],["exit",n[e][1],r]])),h=W(h,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),h=W(h,dn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),h=W(h,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,h=W(h,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,X(n,e-1,t-e+3,h),t=e+h.length-p-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function vt(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=En(e);let i;return l;function l(m){return i=m,n.enter("attentionSequence"),a(m)}function a(m){if(m===i)return n.consume(m),a;const h=n.exit("attentionSequence"),p=En(m),f=!p||p===2&&u||t.includes(m),g=!u||u===2&&p||t.includes(e);return h._open=!!(i===42?f:f&&(u||!g)),h._close=!!(i===42?g:g&&(p||!f)),r(m)}}function Vn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const ne={name:"autolink",tokenize:te};function te(n,r,t){let e=0;return u;function u(c){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(c){return K(c)?(n.consume(c),l):c===64?t(c):h(c)}function l(c){return c===43||c===45||c===46||$(c)?(e=1,a(c)):h(c)}function a(c){return c===58?(n.consume(c),e=0,m):(c===43||c===45||c===46||$(c))&&e++<32?(n.consume(c),a):(e=0,h(c))}function m(c){return c===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):c===null||c===32||c===60||bn(c)?t(c):(n.consume(c),m)}function h(c){return c===64?(n.consume(c),p):Vt(c)?(n.consume(c),h):t(c)}function p(c){return $(c)?f(c):t(c)}function f(c){return c===46?(n.consume(c),e=0,p):c===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):g(c)}function g(c){if((c===45||$(c))&&e++<63){const b=c===45?g:f;return n.consume(c),b}return t(c)}}const kn={partial:!0,tokenize:ee};function ee(n,r,t){return e;function e(i){return _(i)?B(n,u,"linePrefix")(i):u(i)}function u(i){return i===null||y(i)?r(i):t(i)}}const vn={continuation:{tokenize:ie},exit:ue,name:"blockQuote",tokenize:re};function re(n,r,t){const e=this;return u;function u(l){if(l===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),i}return t(l)}function i(l){return _(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(l))}}function ie(n,r,t){const e=this;return u;function u(l){return _(l)?B(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return n.attempt(vn,r,t)(l)}}function ue(n){n.exit("blockQuote")}const nt={name:"characterEscape",tokenize:le};function le(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),u}function u(i){return Wt(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const tt={name:"characterReference",tokenize:ae};function ae(n,r,t){const e=this;let u=0,i,l;return a;function a(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),m}function m(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),i=31,l=$,p(f))}function h(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,l=Qt,p):(n.enter("characterReferenceValue"),i=7,l=yn,p(f))}function p(f){if(f===59&&u){const g=n.exit("characterReferenceValue");return l===$&&!Yn(e.sliceSerialize(g))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return l(f)&&u++<i?(n.consume(f),p):t(f)}}const Qn={partial:!0,tokenize:se},Wn={concrete:!0,name:"codeFenced",tokenize:oe};function oe(n,r,t){const e=this,u={partial:!0,tokenize:T};let i=0,l=0,a;return m;function m(x){return h(x)}function h(x){const L=e.events[e.events.length-1];return i=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=x,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(x)}function p(x){return x===a?(l++,n.consume(x),p):l<3?t(x):(n.exit("codeFencedFenceSequence"),_(x)?B(n,f,"whitespace")(x):f(x))}function f(x){return x===null||y(x)?(n.exit("codeFencedFence"),e.interrupt?r(x):n.check(Qn,E,P)(x)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(x)):_(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),B(n,c,"whitespace")(x)):x===96&&x===a?t(x):(n.consume(x),g)}function c(x){return x===null||y(x)?f(x):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(x)):x===96&&x===a?t(x):(n.consume(x),b)}function E(x){return n.attempt(u,P,F)(x)}function F(x){return n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),S}function S(x){return i>0&&_(x)?B(n,I,"linePrefix",i+1)(x):I(x)}function I(x){return x===null||y(x)?n.check(Qn,E,P)(x):(n.enter("codeFlowValue"),d(x))}function d(x){return x===null||y(x)?(n.exit("codeFlowValue"),I(x)):(n.consume(x),d)}function P(x){return n.exit("codeFenced"),r(x)}function T(x,L,N){let q=0;return D;function D(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),z}function z(A){return x.enter("codeFencedFence"),_(A)?B(x,C,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):C(A)}function C(A){return A===a?(x.enter("codeFencedFenceSequence"),O(A)):N(A)}function O(A){return A===a?(q++,x.consume(A),O):q>=l?(x.exit("codeFencedFenceSequence"),_(A)?B(x,M,"whitespace")(A):M(A)):N(A)}function M(A){return A===null||y(A)?(x.exit("codeFencedFence"),L(A)):N(A)}}}function se(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const wn={name:"codeIndented",tokenize:he},ce={partial:!0,tokenize:fe};function he(n,r,t){const e=this;return u;function u(h){return n.enter("codeIndented"),B(n,i,"linePrefix",5)(h)}function i(h){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):t(h)}function l(h){return h===null?m(h):y(h)?n.attempt(ce,l,m)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||y(h)?(n.exit("codeFlowValue"),l(h)):(n.consume(h),a)}function m(h){return n.exit("codeIndented"),r(h)}}function fe(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):B(n,i,"linePrefix",5)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):y(l)?u(l):t(l)}}const pe={name:"codeText",previous:ge,resolve:me,tokenize:xe};function me(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 ge(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xe(n,r,t){let e=0,u,i;return l;function l(f){return n.enter("codeText"),n.enter("codeTextSequence"),a(f)}function a(f){return f===96?(n.consume(f),e++,a):(n.exit("codeTextSequence"),m(f))}function m(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),m):f===96?(i=n.enter("codeTextSequence"),u=0,p(f)):y(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(f))}function h(f){return f===null||f===32||f===96||y(f)?(n.exit("codeTextData"),m(f)):(n.consume(f),h)}function p(f){return f===96?(n.consume(f),u++,p):u===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(f)):(i.type="codeTextData",h(f))}}class ke{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,t){const e=t??Number.POSITIVE_INFINITY;return e<this.left.length?this.left.slice(r,e):r>this.left.length?this.right.slice(this.right.length-e+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-e+this.left.length).reverse())}splice(r,t,e){const u=t||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return e&&mn(this.left,e),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),mn(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),mn(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const t=this.left.splice(r,Number.POSITIVE_INFINITY);mn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);mn(this.left,t.reverse())}}}function mn(n,r){let t=0;if(r.length<1e4)n.push(...r);else for(;t<r.length;)n.push(...r.slice(t,t+1e4)),t+=1e4}function et(n){const r={};let t=-1,e,u,i,l,a,m,h;const p=new ke(n);for(;++t<p.length;){for(;t in r;)t=r[t];if(e=p.get(t),t&&e[1].type==="chunkFlow"&&p.get(t-1)[1].type==="listItemPrefix"&&(m=e[1]._tokenizer.events,i=0,i<m.length&&m[i][1].type==="lineEndingBlank"&&(i+=2),i<m.length&&m[i][1].type==="content"))for(;++i<m.length&&m[i][1].type!=="content";)m[i][1].type==="chunkText"&&(m[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,Se(p,t)),t=r[t],h=!0);else if(e[1]._container){for(i=t,u=void 0;i--;)if(l=p.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(u&&(p.get(u)[1].type="lineEndingBlank"),l[1].type="lineEnding",u=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;u&&(e[1].end={...p.get(u)[1].start},a=p.slice(u,t),a.unshift(e),p.splice(u,t-u+1,a))}}return X(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Se(n,r){const t=n.get(r)[1],e=n.get(r)[2];let u=r-1;const i=[];let l=t._tokenizer;l||(l=e.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,m=[],h={};let p,f,g=-1,c=t,b=0,E=0;const F=[E];for(;c;){for(;n.get(++u)[1]!==c;);i.push(u),c._tokenizer||(p=e.sliceStream(c),c.next||p.push(null),f&&l.defineSkip(c.start),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=c,c=c.next}for(c=t;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(E=g+1,F.push(E),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(l.events=[],c?(c._tokenizer=void 0,c.previous=void 0):F.pop(),g=F.length;g--;){const S=a.slice(F[g],F[g+1]),I=i.pop();m.push([I,I+S.length-1]),n.splice(I,2,S)}for(m.reverse(),g=-1;++g<m.length;)h[b+m[g][0]]=b+m[g][1],b+=m[g][1]-m[g][0]-1;return h}const be={resolve:Ie,tokenize:we},de={partial:!0,tokenize:Ce};function Ie(n){return et(n),n}function we(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(a)}function u(a){return a===null?i(a):y(a)?n.check(de,l,i)(a):(n.consume(a),u)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function l(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function Ce(n,r,t){const e=this;return u;function u(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),B(n,i,"linePrefix")}function i(l){if(l===null||y(l))return t(l);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function rt(n,r,t,e,u,i,l,a,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(S){return S===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(S),n.exit(i),g):S===null||S===32||S===41||bn(S)?t(S):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),E(S))}function g(S){return S===62?(n.enter(i),n.consume(S),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),c(S))}function c(S){return S===62?(n.exit("chunkString"),n.exit(a),g(S)):S===null||S===60||y(S)?t(S):(n.consume(S),S===92?b:c)}function b(S){return S===60||S===62||S===92?(n.consume(S),c):c(S)}function E(S){return!p&&(S===null||S===41||U(S))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(S)):p<h&&S===40?(n.consume(S),p++,E):S===41?(n.consume(S),p--,E):S===null||S===32||S===40||bn(S)?t(S):(n.consume(S),S===92?F:E)}function F(S){return S===40||S===41||S===92?(n.consume(S),E):E(S)}}function it(n,r,t,e,u,i){const l=this;let a=0,m;return h;function h(c){return n.enter(e),n.enter(u),n.consume(c),n.exit(u),n.enter(i),p}function p(c){return a>999||c===null||c===91||c===93&&!m||c===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(c):c===93?(n.exit(i),n.enter(u),n.consume(c),n.exit(u),n.exit(e),r):y(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(c))}function f(c){return c===null||c===91||c===93||y(c)||a++>999?(n.exit("chunkString"),p(c)):(n.consume(c),m||(m=!_(c)),c===92?g:f)}function g(c){return c===91||c===92||c===93?(n.consume(c),a++,f):f(c)}}function ut(n,r,t,e,u,i){let l;return a;function a(g){return g===34||g===39||g===40?(n.enter(e),n.enter(u),n.consume(g),n.exit(u),l=g===40?41:g,m):t(g)}function m(g){return g===l?(n.enter(u),n.consume(g),n.exit(u),n.exit(e),r):(n.enter(i),h(g))}function h(g){return g===l?(n.exit(i),m(l)):g===null?t(g):y(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),B(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||y(g)?(n.exit("chunkString"),h(g)):(n.consume(g),g===92?f:p)}function f(g){return g===l||g===92?(n.consume(g),p):p(g)}}function xn(n,r){let t;return e;function e(u){return y(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):_(u)?B(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}const ze={name:"definition",tokenize:Ee},ye={partial:!0,tokenize:Te};function Ee(n,r,t){const e=this;let u;return i;function i(c){return n.enter("definition"),l(c)}function l(c){return it.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function a(c){return u=hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),c===58?(n.enter("definitionMarker"),n.consume(c),n.exit("definitionMarker"),m):t(c)}function m(c){return U(c)?xn(n,h)(c):h(c)}function h(c){return rt(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function p(c){return n.attempt(ye,f,f)(c)}function f(c){return _(c)?B(n,g,"whitespace")(c):g(c)}function g(c){return c===null||y(c)?(n.exit("definition"),e.parser.defined.push(u),r(c)):t(c)}}function Te(n,r,t){return e;function e(a){return U(a)?xn(n,u)(a):t(a)}function u(a){return ut(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return _(a)?B(n,l,"whitespace")(a):l(a)}function l(a){return a===null||y(a)?r(a):t(a)}}const Fe={name:"hardBreakEscape",tokenize:Ae};function Ae(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return y(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const _e={name:"headingAtx",resolve:Le,tokenize:Pe};function Le(n,r){let t=n.length-2,e=3,u,i;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},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},X(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function Pe(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||U(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||y(p)?(n.exit("atxHeading"),r(p)):_(p)?B(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||U(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),h)}}const Be=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Un=["pre","script","style","textarea"],Oe={concrete:!0,name:"htmlFlow",resolveTo:qe,tokenize:De},Me={partial:!0,tokenize:He},Ne={partial:!0,tokenize:Re};function qe(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 De(n,r,t){const e=this;let u,i,l,a,m;return h;function h(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),g):s===47?(n.consume(s),i=!0,E):s===63?(n.consume(s),u=3,e.interrupt?r:o):K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function g(s){return s===45?(n.consume(s),u=2,c):s===91?(n.consume(s),u=5,a=0,b):K(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function c(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function b(s){const G="CDATA[";return s===G.charCodeAt(a++)?(n.consume(s),a===G.length?e.interrupt?r:C:b):t(s)}function E(s){return K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function F(s){if(s===null||s===47||s===62||U(s)){const G=s===47,on=l.toLowerCase();return!G&&!i&&Un.includes(on)?(u=1,e.interrupt?r(s):C(s)):Be.includes(l.toLowerCase())?(u=6,G?(n.consume(s),S):e.interrupt?r(s):C(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?I(s):d(s))}return s===45||$(s)?(n.consume(s),l+=String.fromCharCode(s),F):t(s)}function S(s){return s===62?(n.consume(s),e.interrupt?r:C):t(s)}function I(s){return _(s)?(n.consume(s),I):D(s)}function d(s){return s===47?(n.consume(s),D):s===58||s===95||K(s)?(n.consume(s),P):_(s)?(n.consume(s),d):D(s)}function P(s){return s===45||s===46||s===58||s===95||$(s)?(n.consume(s),P):T(s)}function T(s){return s===61?(n.consume(s),x):_(s)?(n.consume(s),T):d(s)}function x(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,L):_(s)?(n.consume(s),x):N(s)}function L(s){return s===m?(n.consume(s),m=null,q):s===null||y(s)?t(s):(n.consume(s),L)}function N(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||U(s)?T(s):(n.consume(s),N)}function q(s){return s===47||s===62||_(s)?d(s):t(s)}function D(s){return s===62?(n.consume(s),z):t(s)}function z(s){return s===null||y(s)?C(s):_(s)?(n.consume(s),z):t(s)}function C(s){return s===45&&u===2?(n.consume(s),V):s===60&&u===1?(n.consume(s),R):s===62&&u===4?(n.consume(s),Z):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),tn):y(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Me,en,O)(s)):s===null||y(s)?(n.exit("htmlFlowData"),O(s)):(n.consume(s),C)}function O(s){return n.check(Ne,M,en)(s)}function M(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),A}function A(s){return s===null||y(s)?O(s):(n.enter("htmlFlowData"),C(s))}function V(s){return s===45?(n.consume(s),o):C(s)}function R(s){return s===47?(n.consume(s),l="",Y):C(s)}function Y(s){if(s===62){const G=l.toLowerCase();return Un.includes(G)?(n.consume(s),Z):C(s)}return K(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),Y):C(s)}function tn(s){return s===93?(n.consume(s),o):C(s)}function o(s){return s===62?(n.consume(s),Z):s===45&&u===2?(n.consume(s),o):C(s)}function Z(s){return s===null||y(s)?(n.exit("htmlFlowData"),en(s)):(n.consume(s),Z)}function en(s){return n.exit("htmlFlow"),r(s)}}function Re(n,r,t){const e=this;return u;function u(l){return y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function He(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(kn,r,t)}}const Ve={name:"htmlText",tokenize:Qe};function Qe(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),h):o===47?(n.consume(o),T):o===63?(n.consume(o),d):K(o)?(n.consume(o),N):t(o)}function h(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,b):K(o)?(n.consume(o),I):t(o)}function p(o){return o===45?(n.consume(o),c):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),g):y(o)?(l=f,R(o)):(n.consume(o),f)}function g(o){return o===45?(n.consume(o),c):f(o)}function c(o){return o===62?V(o):o===45?g(o):f(o)}function b(o){const Z="CDATA[";return o===Z.charCodeAt(i++)?(n.consume(o),i===Z.length?E:b):t(o)}function E(o){return o===null?t(o):o===93?(n.consume(o),F):y(o)?(l=E,R(o)):(n.consume(o),E)}function F(o){return o===93?(n.consume(o),S):E(o)}function S(o){return o===62?V(o):o===93?(n.consume(o),S):E(o)}function I(o){return o===null||o===62?V(o):y(o)?(l=I,R(o)):(n.consume(o),I)}function d(o){return o===null?t(o):o===63?(n.consume(o),P):y(o)?(l=d,R(o)):(n.consume(o),d)}function P(o){return o===62?V(o):d(o)}function T(o){return K(o)?(n.consume(o),x):t(o)}function x(o){return o===45||$(o)?(n.consume(o),x):L(o)}function L(o){return y(o)?(l=L,R(o)):_(o)?(n.consume(o),L):V(o)}function N(o){return o===45||$(o)?(n.consume(o),N):o===47||o===62||U(o)?q(o):t(o)}function q(o){return o===47?(n.consume(o),V):o===58||o===95||K(o)?(n.consume(o),D):y(o)?(l=q,R(o)):_(o)?(n.consume(o),q):V(o)}function D(o){return o===45||o===46||o===58||o===95||$(o)?(n.consume(o),D):z(o)}function z(o){return o===61?(n.consume(o),C):y(o)?(l=z,R(o)):_(o)?(n.consume(o),z):q(o)}function C(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,O):y(o)?(l=C,R(o)):_(o)?(n.consume(o),C):(n.consume(o),M)}function O(o){return o===u?(n.consume(o),u=void 0,A):o===null?t(o):y(o)?(l=O,R(o)):(n.consume(o),O)}function M(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||U(o)?q(o):(n.consume(o),M)}function A(o){return o===47||o===62||U(o)?q(o):t(o)}function V(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function R(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Y}function Y(o){return _(o)?B(n,tn,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):tn(o)}function tn(o){return n.enter("htmlTextData"),l(o)}}const Fn={name:"labelEnd",resolveAll:$e,resolveTo:Ye,tokenize:Ze},We={tokenize:Ge},Ue={tokenize:Je},je={tokenize:Ke};function $e(n){let r=-1;const t=[];for(;++r<n.length;){const e=n[r][1];if(t.push(n[r]),e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd"){const u=e.type==="labelImage"?4:2;e.type="data",r+=u}}return n.length!==t.length&&X(n,0,n.length,t),n}function Ye(n,r){let t=n.length,e=0,u,i,l,a;for(;t--;)if(u=n[t][1],i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(l=t);const m={type:n[i][1].type==="labelLink"?"link":"image",start:{...n[i][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[i][1].start},end:{...n[l][1].end}},p={type:"labelText",start:{...n[i+e+2][1].end},end:{...n[l-2][1].start}};return a=[["enter",m,r],["enter",h,r]],a=W(a,n.slice(i+1,i+e+3)),a=W(a,[["enter",p,r]]),a=W(a,dn(r.parser.constructs.insideSpan.null,n.slice(i+e+4,l-3),r)),a=W(a,[["exit",p,r],n[l-2],n[l-1],["exit",h,r]]),a=W(a,n.slice(l+1)),a=W(a,[["exit",m,r]]),X(n,i,n.length,a),n}function Ze(n,r,t){const e=this;let u=e.events.length,i,l;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){i=e.events[u][1];break}return a;function a(g){return i?i._inactive?f(g):(l=e.parser.defined.includes(hn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelEnd"),m):t(g)}function m(g){return g===40?n.attempt(We,p,l?p:f)(g):g===91?n.attempt(Ue,p,l?h:f)(g):l?p(g):f(g)}function h(g){return n.attempt(je,p,f)(g)}function p(g){return r(g)}function f(g){return i._balanced=!0,t(g)}}function Ge(n,r,t){return e;function e(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),u}function u(f){return U(f)?xn(n,i)(f):i(f)}function i(f){return f===41?p(f):rt(n,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return U(f)?xn(n,m)(f):p(f)}function a(f){return t(f)}function m(f){return f===34||f===39||f===40?ut(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):p(f)}function h(f){return U(f)?xn(n,p)(f):p(f)}function p(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),r):t(f)}}function Je(n,r,t){const e=this;return u;function u(a){return it.call(e,n,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function l(a){return t(a)}}function Ke(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),u}function u(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const Xe={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:ve};function ve(n,r,t){const e=this;return u;function u(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const nr={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:tr};function tr(n,r,t){const e=this;return u;function u(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(l):r(l)}}const Cn={name:"lineEnding",tokenize:er};function er(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),B(n,r,"linePrefix")}}const Sn={name:"thematicBreak",tokenize:rr};function rr(n,r,t){let e=0,u;return i;function i(h){return n.enter("thematicBreak"),l(h)}function l(h){return u=h,a(h)}function a(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):e>=3&&(h===null||y(h))?(n.exit("thematicBreak"),r(h)):t(h)}function m(h){return h===u?(n.consume(h),e++,m):(n.exit("thematicBreakSequence"),_(h)?B(n,a,"whitespace")(h):a(h))}}const j={continuation:{tokenize:ar},exit:sr,name:"list",tokenize:lr},ir={partial:!0,tokenize:cr},ur={partial:!0,tokenize:or};function lr(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(c){const b=e.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!e.containerState.marker||c===e.containerState.marker:yn(c)){if(e.containerState.type||(e.containerState.type=b,n.enter(b,{_container:!0})),b==="listUnordered")return n.enter("listItemPrefix"),c===42||c===45?n.check(Sn,t,h)(c):h(c);if(!e.interrupt||c===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(c)}return t(c)}function m(c){return yn(c)&&++l<10?(n.consume(c),m):(!e.interrupt||l<2)&&(e.containerState.marker?c===e.containerState.marker:c===41||c===46)?(n.exit("listItemValue"),h(c)):t(c)}function h(c){return n.enter("listItemMarker"),n.consume(c),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||c,n.check(kn,e.interrupt?t:p,n.attempt(ir,g,f))}function p(c){return e.containerState.initialBlankLine=!0,i++,g(c)}function f(c){return _(c)?(n.enter("listItemPrefixWhitespace"),n.consume(c),n.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(c)}}function ar(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(kn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,B(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!_(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(ur,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,B(n,n.attempt(j,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function or(n,r,t){const e=this;return B(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function sr(n){n.exit(this.containerState.type)}function cr(n,r,t){const e=this;return B(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(i){const l=e.events[e.events.length-1];return!_(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const jn={name:"setextUnderline",resolveTo:hr,tokenize:fr};function hr(n,r){let t=n.length,e,u,i;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),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...n[e][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end={...n[i][1].end}):n[e][1]=l,n.push(["exit",l,r]),n}function fr(n,r,t){const e=this;let u;return i;function i(h){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=h,l(h)):t(h)}function l(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===u?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),_(h)?B(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||y(h)?(n.exit("setextHeadingLine"),r(h)):t(h)}}const pr={tokenize:mr};function mr(n){const r=this,t=n.attempt(kn,e,n.attempt(this.parser.constructs.flowInitial,u,B(n,n.attempt(this.parser.constructs.flow,u,n.attempt(be,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const gr={resolveAll:at()},xr=lt("string"),kr=lt("text");function lt(n){return{resolveAll:at(n==="text"?Sr:void 0),tokenize:r};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return h(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return h(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function h(p){if(p===null)return!0;const f=u[p];let g=-1;if(f)for(;++g<f.length;){const c=f[g];if(!c.previous||c.previous.call(e,e.previous))return!0}return!1}}}function at(n){return r;function r(t,e){let u=-1,i;for(;++u<=t.length;)i===void 0?t[u]&&t[u][1].type==="data"&&(i=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==i+2&&(t[i][1].end=t[u-1][1].end,t.splice(i+2,u-i-2),u=i+2),i=void 0);return n?n(t,e):t}}function Sr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],u=r.sliceStream(e);let i=u.length,l=-1,a=0,m;for(;i--;){const h=u[i];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(h===-2)m=!0,a++;else if(h!==-1){i++;break}}if(r._contentTypeTextTrailing&&t===n.length&&(a=0),a){const h={type:t===n.length||m||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:e.start._bufferIndex+l,_index:e.start._index+i,line:e.end.line,column:e.end.column-a,offset:e.end.offset-a},end:{...e.end}};e.end={...h.start},e.start.offset===e.end.offset?Object.assign(e,h):(n.splice(t,0,["enter",h,r],["exit",h,r]),t+=2)}t++}return n}const br={42:j,43:j,45:j,48:j,49:j,50:j,51:j,52:j,53:j,54:j,55:j,56:j,57:j,62:vn},dr={91:ze},Ir={[-2]:wn,[-1]:wn,32:wn},wr={35:_e,42:Sn,45:[jn,Sn],60:Oe,61:jn,95:Sn,96:Wn,126:Wn},Cr={38:tt,92:nt},zr={[-5]:Cn,[-4]:Cn,[-3]:Cn,33:Xe,38:tt,42:Tn,60:[ne,Ve],91:nr,92:[Fe,nt],93:Fn,95:Tn,96:pe},yr={null:[Tn,gr]},Er={null:[42,95]},Tr={null:[]},Fr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Er,contentInitial:dr,disable:Tr,document:br,flow:wr,flowInitial:Ir,insideSpan:yr,string:Cr,text:zr},Symbol.toStringTag,{value:"Module"}));function Ar(n,r,t){let e={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const u={},i=[];let l=[],a=[];const m={attempt:L(T),check:L(x),consume:I,enter:d,exit:P,interrupt:L(x,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:n,previous:null,sliceSerialize:g,sliceStream:c,write:f};let p=r.tokenize.call(h,m);return r.resolveAll&&i.push(r),h;function f(z){return l=W(l,z),F(),l[l.length-1]!==null?[]:(N(r,0),h.events=dn(i,h.events,h),h.events)}function g(z,C){return Lr(c(z),C)}function c(z){return _r(l,z)}function b(){const{_bufferIndex:z,_index:C,line:O,column:M,offset:A}=e;return{_bufferIndex:z,_index:C,line:O,column:M,offset:A}}function E(z){u[z.line]=z.column,D()}function F(){let z;for(;e._index<l.length;){const C=l[e._index];if(typeof C=="string")for(z=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===z&&e._bufferIndex<C.length;)S(C.charCodeAt(e._bufferIndex));else S(C)}}function S(z){p=p(z)}function I(z){y(z)?(e.line++,e.column=1,e.offset+=z===-3?2:1,D()):z!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===l[e._index].length&&(e._bufferIndex=-1,e._index++)),h.previous=z}function d(z,C){const O=C||{};return O.type=z,O.start=b(),h.events.push(["enter",O,h]),a.push(O),O}function P(z){const C=a.pop();return C.end=b(),h.events.push(["exit",C,h]),C}function T(z,C){N(z,C.from)}function x(z,C){C.restore()}function L(z,C){return O;function O(M,A,V){let R,Y,tn,o;return Array.isArray(M)?en(M):"tokenize"in M?en([M]):Z(M);function Z(H){return fn;function fn(un){const sn=un!==null&&H[un],cn=un!==null&&H.null,In=[...Array.isArray(sn)?sn:sn?[sn]:[],...Array.isArray(cn)?cn:cn?[cn]:[]];return en(In)(un)}}function en(H){return R=H,Y=0,H.length===0?V:s(H[Y])}function s(H){return fn;function fn(un){return o=q(),tn=H,H.partial||(h.currentConstruct=H),H.name&&h.parser.constructs.disable.null.includes(H.name)?on():H.tokenize.call(C?Object.assign(Object.create(h),C):h,m,G,on)(un)}}function G(H){return z(tn,o),A}function on(H){return o.restore(),++Y<R.length?s(R[Y]):V}}}function N(z,C){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&X(h.events,C,h.events.length-C,z.resolve(h.events.slice(C),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function q(){const z=b(),C=h.previous,O=h.currentConstruct,M=h.events.length,A=Array.from(a);return{from:M,restore:V};function V(){e=z,h.previous=C,h.currentConstruct=O,h.events.length=M,a=A,D()}}function D(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function _r(n,r){const t=r.start._index,e=r.start._bufferIndex,u=r.end._index,i=r.end._bufferIndex;let l;if(t===u)l=[n[t].slice(e,i)];else{if(l=n.slice(t,u),e>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function Lr(n,r){let t=-1;const e=[];let u;for(;++t<n.length;){const i=n[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
1
|
+
"use strict";const an=require("@tempots/dom"),Mt=require("./link-portal-_tiDFZqh.cjs"),Nn=document.createElement("i");function Yn(n){const r="&"+n+";";Nn.innerHTML=r;const t=Nn.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===r?!1:t}function X(n,r,t,e){const u=n.length;let i=0,l;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i<e.length;)l=e.slice(i,i+1e4),l.unshift(r,0),n.splice(...l),i+=1e4,r+=1e4}function W(n,r){return n.length>0?(X(n,n.length,0,r),n):r}const zn={}.hasOwnProperty;function Zn(n){const r={};let t=-1;for(;++t<n.length;)Dt(r,n[t]);return r}function Dt(n,r){let t;for(t in r){const u=(zn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let l;if(i)for(l in i){zn.call(u,l)||(u[l]=[]);const a=i[l];Nt(u[l],Array.isArray(a)?a:a?[a]:[])}}}function Nt(n,r){let t=-1;const e=[];for(;++t<r.length;)(r[t].add==="after"?n:e).push(r[t]);X(n,0,0,e)}function Gn(n){const r={};let t=-1;for(;++t<n.length;)qt(r,n[t]);return r}function qt(n,r){let t;for(t in r){const u=(zn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let l;if(i)for(l in i)u[l]=i[l]}}function Rt(n,r){const 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?"�":String.fromCodePoint(t)}const Ht={'"':"quot","&":"amp","<":"lt",">":"gt"};function Jn(n){return n.replace(/["&<>]/g,r);function r(t){return"&"+Ht[t]+";"}}function hn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const K=ln(/[A-Za-z]/),$=ln(/[\dA-Za-z]/),Vt=ln(/[#-'*+\--9=?A-Z^-~]/);function bn(n){return n!==null&&(n<32||n===127)}const yn=ln(/\d/),Qt=ln(/[\dA-Fa-f]/),Wt=ln(/[!-/:-@[-`{-~]/);function y(n){return n!==null&&n<-2}function U(n){return n!==null&&(n<0||n===32)}function _(n){return n===-2||n===-1||n===32}const Kn=ln(new RegExp("\\p{P}|\\p{S}","u")),Xn=ln(/\s/);function ln(n){return r;function r(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function gn(n,r){const t=Jn(Ut(n||""));if(!r)return t;const e=t.indexOf(":"),u=t.indexOf("?"),i=t.indexOf("#"),l=t.indexOf("/");return e<0||l>-1&&e>l||u>-1&&e>u||i>-1&&e>i||r.test(t.slice(0,e))?t:""}function Ut(n){const r=[];let t=-1,e=0,u=0;for(;++t<n.length;){const i=n.charCodeAt(t);let l="";if(i===37&&$(n.charCodeAt(t+1))&&$(n.charCodeAt(t+2)))u=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const a=n.charCodeAt(t+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),u=1):l="�"}else l=String.fromCharCode(i);l&&(r.push(n.slice(e,t),encodeURIComponent(l)),e=t+u+1,l=""),u&&(t+=u,u=0)}return r.join("")+n.slice(e)}const qn={}.hasOwnProperty,Rn=/^(https?|ircs?|mailto|xmpp)$/i,jt=/^https?$/i;function $t(n){const r=n||{};let t=!0;const e={},u=[[]],i=[],l=[],m=Gn([{enter:{blockQuote:A,codeFenced:tn,codeFencedFenceInfo:F,codeFencedFenceMeta:F,codeIndented:en,codeText:Tt,content:gt,definition:st,definitionDestinationString:ht,definitionLabelString:F,definitionTitleString:F,emphasis:yt,htmlFlow:zt,htmlText:Pn,image:G,label:F,link:on,listItemMarker:z,listItemValue:q,listOrdered:D,listUnordered:N,paragraph:R,reference:F,resource:sn,resourceDestinationString:cn,resourceTitleString:F,setextHeading:kt,strong:Et},exit:{atxHeading:bt,atxHeadingSequence:xt,autolinkEmail:Ot,autolinkProtocol:Bt,blockQuote:V,characterEscapeValue:pn,characterReferenceMarkerHexadecimal:Bn,characterReferenceMarkerNumeric:Bn,characterReferenceValue:Pt,codeFenced:s,codeFencedFence:Z,codeFencedFenceInfo:o,codeFencedFenceMeta:L,codeFlowValue:Ct,codeIndented:s,codeText:Ft,codeTextData:pn,data:pn,definition:mt,definitionDestinationString:ft,definitionLabelString:ct,definitionTitleString:pt,emphasis:At,hardBreakEscape:_n,hardBreakTrailing:_n,htmlFlow:Ln,htmlFlowData:pn,htmlText:Ln,htmlTextData:pn,image:An,label:fn,labelText:H,lineEnding:wt,link:An,listOrdered:C,listUnordered:O,paragraph:Y,reference:L,referenceString:un,resource:L,resourceDestinationString:In,resourceTitleString:ot,setextHeading:It,setextHeadingLineSequence:dt,setextHeadingText:St,strong:_t,thematicBreak:Lt}},...r.htmlExtensions||[]]),h={definitions:e,tightStack:l},p={buffer:F,encode:x,getData:E,lineEndingIfNeeded:T,options:r,raw:d,resume:S,setData:b,tag:I};let f=r.defaultLineEnding;return g;function g(k){let w=-1,Q=0;const J=[];let v=[],rn=[];for(;++w<k.length;)!f&&(k[w][1].type==="lineEnding"||k[w][1].type==="lineEndingBlank")&&(f=k[w][2].sliceSerialize(k[w][1])),(k[w][1].type==="listOrdered"||k[w][1].type==="listUnordered")&&(k[w][0]==="enter"?J.push(w):c(k.slice(J.pop(),w))),k[w][1].type==="definition"&&(k[w][0]==="enter"?(rn=W(rn,k.slice(Q,w)),Q=w):(v=W(v,k.slice(Q,w+1)),Q=w+1));v=W(v,rn),v=W(v,k.slice(Q)),w=-1;const nn=v;for(m.enter.null&&m.enter.null.call(p);++w<k.length;){const On=m[nn[w][0]],Mn=nn[w][1].type,Dn=On[Mn];qn.call(On,Mn)&&Dn&&Dn.call({sliceSerialize:nn[w][2].sliceSerialize,...p},nn[w][1])}return m.exit.null&&m.exit.null.call(p),u[0].join("")}function c(k){const w=k.length;let Q=0,J=0,v=!1,rn;for(;++Q<w;){const nn=k[Q];if(nn[1]._container)rn=void 0,nn[0]==="enter"?J++:J--;else switch(nn[1].type){case"listItemPrefix":{nn[0]==="exit"&&(rn=!0);break}case"linePrefix":break;case"lineEndingBlank":{nn[0]==="enter"&&!J&&(rn?rn=void 0:v=!0);break}default:rn=void 0}}k[0][1]._loose=v}function b(k,w){h[k]=w}function E(k){return h[k]}function F(){u.push([])}function S(){return u.pop().join("")}function I(k){t&&(b("lastWasTag",!0),u[u.length-1].push(k))}function d(k){b("lastWasTag"),u[u.length-1].push(k)}function P(){d(f||`
|
|
2
|
+
`)}function T(){const k=u[u.length-1],w=k[k.length-1],Q=w?w.charCodeAt(w.length-1):null;Q===10||Q===13||Q===null||P()}function x(k){return E("ignoreEncode")?k:Jn(k)}function L(){S()}function D(k){l.push(!k._loose),T(),I("<ol"),b("expectFirstItem",!0)}function N(k){l.push(!k._loose),T(),I("<ul"),b("expectFirstItem",!0)}function q(k){if(E("expectFirstItem")){const w=Number.parseInt(this.sliceSerialize(k),10);w!==1&&I(' start="'+x(String(w))+'"')}}function z(){E("expectFirstItem")?I(">"):M(),T(),I("<li>"),b("expectFirstItem"),b("lastWasTag")}function C(){M(),l.pop(),P(),I("</ol>")}function O(){M(),l.pop(),P(),I("</ul>")}function M(){E("lastWasTag")&&!E("slurpAllLineEndings")&&T(),I("</li>"),b("slurpAllLineEndings")}function A(){l.push(!1),T(),I("<blockquote>")}function V(){l.pop(),T(),I("</blockquote>"),b("slurpAllLineEndings")}function R(){l[l.length-1]||(T(),I("<p>")),b("slurpAllLineEndings")}function Y(){l[l.length-1]?b("slurpAllLineEndings",!0):I("</p>")}function tn(){T(),I("<pre><code"),b("fencesCount",0)}function o(){const k=S();I(' class="language-'+k+'"')}function Z(){const k=E("fencesCount")||0;k||(I(">"),b("slurpOneLineEnding",!0)),b("fencesCount",k+1)}function en(){T(),I("<pre><code>")}function s(){const k=E("fencesCount");k!==void 0&&k<2&&h.tightStack.length>0&&!E("lastWasTag")&&P(),E("flowCodeSeenData")&&T(),I("</code></pre>"),k!==void 0&&k<2&&T(),b("flowCodeSeenData"),b("fencesCount"),b("slurpOneLineEnding")}function G(){i.push({image:!0}),t=void 0}function on(){i.push({})}function H(k){i[i.length-1].labelId=this.sliceSerialize(k)}function fn(){i[i.length-1].label=S()}function un(k){i[i.length-1].referenceId=this.sliceSerialize(k)}function sn(){F(),i[i.length-1].destination=""}function cn(){F(),b("ignoreEncode",!0)}function In(){i[i.length-1].destination=S(),b("ignoreEncode")}function ot(){i[i.length-1].title=S()}function An(){let k=i.length-1;const w=i[k],Q=w.referenceId||w.labelId,J=w.destination===void 0?e[hn(Q)]:w;for(t=!0;k--;)if(i[k].image){t=void 0;break}w.image?(I('<img src="'+gn(J.destination,r.allowDangerousProtocol?void 0:jt)+'" alt="'),d(w.label),I('"')):I('<a href="'+gn(J.destination,r.allowDangerousProtocol?void 0:Rn)+'"'),I(J.title?' title="'+J.title+'"':""),w.image?I(" />"):(I(">"),d(w.label),I("</a>")),i.pop()}function st(){F(),i.push({})}function ct(k){S(),i[i.length-1].labelId=this.sliceSerialize(k)}function ht(){F(),b("ignoreEncode",!0)}function ft(){i[i.length-1].destination=S(),b("ignoreEncode")}function pt(){i[i.length-1].title=S()}function mt(){const k=i[i.length-1],w=hn(k.labelId);S(),qn.call(e,w)||(e[w]=i[i.length-1]),i.pop()}function gt(){b("slurpAllLineEndings",!0)}function xt(k){E("headingRank")||(b("headingRank",this.sliceSerialize(k).length),T(),I("<h"+E("headingRank")+">"))}function kt(){F(),b("slurpAllLineEndings")}function St(){b("slurpAllLineEndings",!0)}function bt(){I("</h"+E("headingRank")+">"),b("headingRank")}function dt(k){b("headingRank",this.sliceSerialize(k).charCodeAt(0)===61?1:2)}function It(){const k=S();T(),I("<h"+E("headingRank")+">"),d(k),I("</h"+E("headingRank")+">"),b("slurpAllLineEndings"),b("headingRank")}function pn(k){d(x(this.sliceSerialize(k)))}function wt(k){if(!E("slurpAllLineEndings")){if(E("slurpOneLineEnding")){b("slurpOneLineEnding");return}if(E("inCodeText")){d(" ");return}d(x(this.sliceSerialize(k)))}}function Ct(k){d(x(this.sliceSerialize(k))),b("flowCodeSeenData",!0)}function _n(){I("<br />")}function zt(){T(),Pn()}function Ln(){b("ignoreEncode")}function Pn(){r.allowDangerousHtml&&b("ignoreEncode",!0)}function yt(){I("<em>")}function Et(){I("<strong>")}function Tt(){b("inCodeText",!0),I("<code>")}function Ft(){b("inCodeText"),I("</code>")}function At(){I("</em>")}function _t(){I("</strong>")}function Lt(){T(),I("<hr />")}function Bn(k){b("characterReferenceType",k.type)}function Pt(k){const w=this.sliceSerialize(k),Q=E("characterReferenceType")?Rt(w,E("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):Yn(w);d(x(Q)),b("characterReferenceType")}function Bt(k){const w=this.sliceSerialize(k);I('<a href="'+gn(w,r.allowDangerousProtocol?void 0:Rn)+'">'),d(x(w)),I("</a>")}function Ot(k){const w=this.sliceSerialize(k);I('<a href="'+gn("mailto:"+w)+'">'),d(x(w)),I("</a>")}}function B(n,r,t,e){const u=e?e-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(m){return _(m)?(n.enter(t),a(m)):r(m)}function a(m){return _(m)&&i++<u?(n.consume(m),a):(n.exit(t),r(m))}}const Yt={tokenize:Zt};function Zt(n){const r=n.attempt(this.parser.constructs.contentInitial,e,u);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),B(n,r,"linePrefix")}function u(a){return n.enter("paragraph"),i(a)}function i(a){const m=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=m),t=m,l(a)}function l(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return y(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),l)}}const Gt={tokenize:Jt},Hn={tokenize:Kt};function Jt(n){const r=this,t=[];let e=0,u,i,l;return a;function a(d){if(e<t.length){const P=t[e];return r.containerState=P[1],n.attempt(P[0].continuation,m,h)(d)}return h(d)}function m(d){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&I();const P=r.events.length;let T=P,x;for(;T--;)if(r.events[T][0]==="exit"&&r.events[T][1].type==="chunkFlow"){x=r.events[T][1].end;break}S(e);let L=P;for(;L<r.events.length;)r.events[L][1].end={...x},L++;return X(r.events,T+1,0,r.events.slice(P)),r.events.length=L,h(d)}return a(d)}function h(d){if(e===t.length){if(!u)return g(d);if(u.currentConstruct&&u.currentConstruct.concrete)return b(d);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Hn,p,f)(d)}function p(d){return u&&I(),S(e),g(d)}function f(d){return r.parser.lazy[r.now().line]=e!==t.length,l=r.now().offset,b(d)}function g(d){return r.containerState={},n.attempt(Hn,c,b)(d)}function c(d){return e++,t.push([r.currentConstruct,r.containerState]),g(d)}function b(d){if(d===null){u&&I(),S(0),n.consume(d);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:i}),E(d)}function E(d){if(d===null){F(n.exit("chunkFlow"),!0),S(0),n.consume(d);return}return y(d)?(n.consume(d),F(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(d),E)}function F(d,P){const T=r.sliceStream(d);if(P&&T.push(null),d.previous=i,i&&(i.next=d),i=d,u.defineSkip(d.start),u.write(T),r.parser.lazy[d.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<l&&(!u.events[x][1].end||u.events[x][1].end.offset>l))return;const L=r.events.length;let D=L,N,q;for(;D--;)if(r.events[D][0]==="exit"&&r.events[D][1].type==="chunkFlow"){if(N){q=r.events[D][1].end;break}N=!0}for(S(e),x=L;x<r.events.length;)r.events[x][1].end={...q},x++;X(r.events,D+1,0,r.events.slice(L)),r.events.length=x}}function S(d){let P=t.length;for(;P-- >d;){const T=t[P];r.containerState=T[1],T[0].exit.call(r,n)}t.length=d}function I(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Kt(n,r,t){return B(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function En(n){if(n===null||U(n)||Xn(n))return 1;if(Kn(n))return 2}function dn(n,r,t){const e=[];let u=-1;for(;++u<n.length;){const i=n[u].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}const Tn={name:"attention",resolveAll:Xt,tokenize:vt};function Xt(n,r){let t=-1,e,u,i,l,a,m,h,p;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;m=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f={...n[e][1].end},g={...n[t][1].start};Vn(f,-m),Vn(g,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:{...n[e][1].end}},a={type:m>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:g},i={type:m>1?"strongText":"emphasisText",start:{...n[e][1].end},end:{...n[t][1].start}},u={type:m>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},n[e][1].end={...l.start},n[t][1].start={...a.end},h=[],n[e][1].end.offset-n[e][1].start.offset&&(h=W(h,[["enter",n[e][1],r],["exit",n[e][1],r]])),h=W(h,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),h=W(h,dn(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),h=W(h,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,h=W(h,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,X(n,e-1,t-e+3,h),t=e+h.length-p-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function vt(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=En(e);let i;return l;function l(m){return i=m,n.enter("attentionSequence"),a(m)}function a(m){if(m===i)return n.consume(m),a;const h=n.exit("attentionSequence"),p=En(m),f=!p||p===2&&u||t.includes(m),g=!u||u===2&&p||t.includes(e);return h._open=!!(i===42?f:f&&(u||!g)),h._close=!!(i===42?g:g&&(p||!f)),r(m)}}function Vn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const ne={name:"autolink",tokenize:te};function te(n,r,t){let e=0;return u;function u(c){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(c){return K(c)?(n.consume(c),l):c===64?t(c):h(c)}function l(c){return c===43||c===45||c===46||$(c)?(e=1,a(c)):h(c)}function a(c){return c===58?(n.consume(c),e=0,m):(c===43||c===45||c===46||$(c))&&e++<32?(n.consume(c),a):(e=0,h(c))}function m(c){return c===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):c===null||c===32||c===60||bn(c)?t(c):(n.consume(c),m)}function h(c){return c===64?(n.consume(c),p):Vt(c)?(n.consume(c),h):t(c)}function p(c){return $(c)?f(c):t(c)}function f(c){return c===46?(n.consume(c),e=0,p):c===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(c),n.exit("autolinkMarker"),n.exit("autolink"),r):g(c)}function g(c){if((c===45||$(c))&&e++<63){const b=c===45?g:f;return n.consume(c),b}return t(c)}}const kn={partial:!0,tokenize:ee};function ee(n,r,t){return e;function e(i){return _(i)?B(n,u,"linePrefix")(i):u(i)}function u(i){return i===null||y(i)?r(i):t(i)}}const vn={continuation:{tokenize:ie},exit:ue,name:"blockQuote",tokenize:re};function re(n,r,t){const e=this;return u;function u(l){if(l===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),i}return t(l)}function i(l){return _(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(l))}}function ie(n,r,t){const e=this;return u;function u(l){return _(l)?B(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return n.attempt(vn,r,t)(l)}}function ue(n){n.exit("blockQuote")}const nt={name:"characterEscape",tokenize:le};function le(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),u}function u(i){return Wt(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const tt={name:"characterReference",tokenize:ae};function ae(n,r,t){const e=this;let u=0,i,l;return a;function a(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),m}function m(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),i=31,l=$,p(f))}function h(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,l=Qt,p):(n.enter("characterReferenceValue"),i=7,l=yn,p(f))}function p(f){if(f===59&&u){const g=n.exit("characterReferenceValue");return l===$&&!Yn(e.sliceSerialize(g))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return l(f)&&u++<i?(n.consume(f),p):t(f)}}const Qn={partial:!0,tokenize:se},Wn={concrete:!0,name:"codeFenced",tokenize:oe};function oe(n,r,t){const e=this,u={partial:!0,tokenize:T};let i=0,l=0,a;return m;function m(x){return h(x)}function h(x){const L=e.events[e.events.length-1];return i=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=x,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(x)}function p(x){return x===a?(l++,n.consume(x),p):l<3?t(x):(n.exit("codeFencedFenceSequence"),_(x)?B(n,f,"whitespace")(x):f(x))}function f(x){return x===null||y(x)?(n.exit("codeFencedFence"),e.interrupt?r(x):n.check(Qn,E,P)(x)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(x)):_(x)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),B(n,c,"whitespace")(x)):x===96&&x===a?t(x):(n.consume(x),g)}function c(x){return x===null||y(x)?f(x):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||y(x)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(x)):x===96&&x===a?t(x):(n.consume(x),b)}function E(x){return n.attempt(u,P,F)(x)}function F(x){return n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),S}function S(x){return i>0&&_(x)?B(n,I,"linePrefix",i+1)(x):I(x)}function I(x){return x===null||y(x)?n.check(Qn,E,P)(x):(n.enter("codeFlowValue"),d(x))}function d(x){return x===null||y(x)?(n.exit("codeFlowValue"),I(x)):(n.consume(x),d)}function P(x){return n.exit("codeFenced"),r(x)}function T(x,L,D){let N=0;return q;function q(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),z}function z(A){return x.enter("codeFencedFence"),_(A)?B(x,C,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):C(A)}function C(A){return A===a?(x.enter("codeFencedFenceSequence"),O(A)):D(A)}function O(A){return A===a?(N++,x.consume(A),O):N>=l?(x.exit("codeFencedFenceSequence"),_(A)?B(x,M,"whitespace")(A):M(A)):D(A)}function M(A){return A===null||y(A)?(x.exit("codeFencedFence"),L(A)):D(A)}}}function se(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const wn={name:"codeIndented",tokenize:he},ce={partial:!0,tokenize:fe};function he(n,r,t){const e=this;return u;function u(h){return n.enter("codeIndented"),B(n,i,"linePrefix",5)(h)}function i(h){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):t(h)}function l(h){return h===null?m(h):y(h)?n.attempt(ce,l,m)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||y(h)?(n.exit("codeFlowValue"),l(h)):(n.consume(h),a)}function m(h){return n.exit("codeIndented"),r(h)}}function fe(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):B(n,i,"linePrefix",5)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):y(l)?u(l):t(l)}}const pe={name:"codeText",previous:ge,resolve:me,tokenize:xe};function me(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 ge(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xe(n,r,t){let e=0,u,i;return l;function l(f){return n.enter("codeText"),n.enter("codeTextSequence"),a(f)}function a(f){return f===96?(n.consume(f),e++,a):(n.exit("codeTextSequence"),m(f))}function m(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),m):f===96?(i=n.enter("codeTextSequence"),u=0,p(f)):y(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(f))}function h(f){return f===null||f===32||f===96||y(f)?(n.exit("codeTextData"),m(f)):(n.consume(f),h)}function p(f){return f===96?(n.consume(f),u++,p):u===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(f)):(i.type="codeTextData",h(f))}}class ke{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,t){const e=t??Number.POSITIVE_INFINITY;return e<this.left.length?this.left.slice(r,e):r>this.left.length?this.right.slice(this.right.length-e+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-e+this.left.length).reverse())}splice(r,t,e){const u=t||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return e&&mn(this.left,e),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),mn(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),mn(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const t=this.left.splice(r,Number.POSITIVE_INFINITY);mn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);mn(this.left,t.reverse())}}}function mn(n,r){let t=0;if(r.length<1e4)n.push(...r);else for(;t<r.length;)n.push(...r.slice(t,t+1e4)),t+=1e4}function et(n){const r={};let t=-1,e,u,i,l,a,m,h;const p=new ke(n);for(;++t<p.length;){for(;t in r;)t=r[t];if(e=p.get(t),t&&e[1].type==="chunkFlow"&&p.get(t-1)[1].type==="listItemPrefix"&&(m=e[1]._tokenizer.events,i=0,i<m.length&&m[i][1].type==="lineEndingBlank"&&(i+=2),i<m.length&&m[i][1].type==="content"))for(;++i<m.length&&m[i][1].type!=="content";)m[i][1].type==="chunkText"&&(m[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,Se(p,t)),t=r[t],h=!0);else if(e[1]._container){for(i=t,u=void 0;i--;)if(l=p.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(u&&(p.get(u)[1].type="lineEndingBlank"),l[1].type="lineEnding",u=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;u&&(e[1].end={...p.get(u)[1].start},a=p.slice(u,t),a.unshift(e),p.splice(u,t-u+1,a))}}return X(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Se(n,r){const t=n.get(r)[1],e=n.get(r)[2];let u=r-1;const i=[];let l=t._tokenizer;l||(l=e.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,m=[],h={};let p,f,g=-1,c=t,b=0,E=0;const F=[E];for(;c;){for(;n.get(++u)[1]!==c;);i.push(u),c._tokenizer||(p=e.sliceStream(c),c.next||p.push(null),f&&l.defineSkip(c.start),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),c._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=c,c=c.next}for(c=t;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(E=g+1,F.push(E),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(l.events=[],c?(c._tokenizer=void 0,c.previous=void 0):F.pop(),g=F.length;g--;){const S=a.slice(F[g],F[g+1]),I=i.pop();m.push([I,I+S.length-1]),n.splice(I,2,S)}for(m.reverse(),g=-1;++g<m.length;)h[b+m[g][0]]=b+m[g][1],b+=m[g][1]-m[g][0]-1;return h}const be={resolve:Ie,tokenize:we},de={partial:!0,tokenize:Ce};function Ie(n){return et(n),n}function we(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(a)}function u(a){return a===null?i(a):y(a)?n.check(de,l,i)(a):(n.consume(a),u)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function l(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function Ce(n,r,t){const e=this;return u;function u(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),B(n,i,"linePrefix")}function i(l){if(l===null||y(l))return t(l);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function rt(n,r,t,e,u,i,l,a,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(S){return S===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(S),n.exit(i),g):S===null||S===32||S===41||bn(S)?t(S):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),E(S))}function g(S){return S===62?(n.enter(i),n.consume(S),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),c(S))}function c(S){return S===62?(n.exit("chunkString"),n.exit(a),g(S)):S===null||S===60||y(S)?t(S):(n.consume(S),S===92?b:c)}function b(S){return S===60||S===62||S===92?(n.consume(S),c):c(S)}function E(S){return!p&&(S===null||S===41||U(S))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(S)):p<h&&S===40?(n.consume(S),p++,E):S===41?(n.consume(S),p--,E):S===null||S===32||S===40||bn(S)?t(S):(n.consume(S),S===92?F:E)}function F(S){return S===40||S===41||S===92?(n.consume(S),E):E(S)}}function it(n,r,t,e,u,i){const l=this;let a=0,m;return h;function h(c){return n.enter(e),n.enter(u),n.consume(c),n.exit(u),n.enter(i),p}function p(c){return a>999||c===null||c===91||c===93&&!m||c===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(c):c===93?(n.exit(i),n.enter(u),n.consume(c),n.exit(u),n.exit(e),r):y(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(c))}function f(c){return c===null||c===91||c===93||y(c)||a++>999?(n.exit("chunkString"),p(c)):(n.consume(c),m||(m=!_(c)),c===92?g:f)}function g(c){return c===91||c===92||c===93?(n.consume(c),a++,f):f(c)}}function ut(n,r,t,e,u,i){let l;return a;function a(g){return g===34||g===39||g===40?(n.enter(e),n.enter(u),n.consume(g),n.exit(u),l=g===40?41:g,m):t(g)}function m(g){return g===l?(n.enter(u),n.consume(g),n.exit(u),n.exit(e),r):(n.enter(i),h(g))}function h(g){return g===l?(n.exit(i),m(l)):g===null?t(g):y(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),B(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||y(g)?(n.exit("chunkString"),h(g)):(n.consume(g),g===92?f:p)}function f(g){return g===l||g===92?(n.consume(g),p):p(g)}}function xn(n,r){let t;return e;function e(u){return y(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):_(u)?B(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}const ze={name:"definition",tokenize:Ee},ye={partial:!0,tokenize:Te};function Ee(n,r,t){const e=this;let u;return i;function i(c){return n.enter("definition"),l(c)}function l(c){return it.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function a(c){return u=hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),c===58?(n.enter("definitionMarker"),n.consume(c),n.exit("definitionMarker"),m):t(c)}function m(c){return U(c)?xn(n,h)(c):h(c)}function h(c){return rt(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function p(c){return n.attempt(ye,f,f)(c)}function f(c){return _(c)?B(n,g,"whitespace")(c):g(c)}function g(c){return c===null||y(c)?(n.exit("definition"),e.parser.defined.push(u),r(c)):t(c)}}function Te(n,r,t){return e;function e(a){return U(a)?xn(n,u)(a):t(a)}function u(a){return ut(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return _(a)?B(n,l,"whitespace")(a):l(a)}function l(a){return a===null||y(a)?r(a):t(a)}}const Fe={name:"hardBreakEscape",tokenize:Ae};function Ae(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return y(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const _e={name:"headingAtx",resolve:Le,tokenize:Pe};function Le(n,r){let t=n.length-2,e=3,u,i;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},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},X(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function Pe(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||U(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||y(p)?(n.exit("atxHeading"),r(p)):_(p)?B(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||U(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),h)}}const Be=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Un=["pre","script","style","textarea"],Oe={concrete:!0,name:"htmlFlow",resolveTo:Ne,tokenize:qe},Me={partial:!0,tokenize:He},De={partial:!0,tokenize:Re};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 qe(n,r,t){const e=this;let u,i,l,a,m;return h;function h(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),g):s===47?(n.consume(s),i=!0,E):s===63?(n.consume(s),u=3,e.interrupt?r:o):K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function g(s){return s===45?(n.consume(s),u=2,c):s===91?(n.consume(s),u=5,a=0,b):K(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function c(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function b(s){const G="CDATA[";return s===G.charCodeAt(a++)?(n.consume(s),a===G.length?e.interrupt?r:C:b):t(s)}function E(s){return K(s)?(n.consume(s),l=String.fromCharCode(s),F):t(s)}function F(s){if(s===null||s===47||s===62||U(s)){const G=s===47,on=l.toLowerCase();return!G&&!i&&Un.includes(on)?(u=1,e.interrupt?r(s):C(s)):Be.includes(l.toLowerCase())?(u=6,G?(n.consume(s),S):e.interrupt?r(s):C(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?I(s):d(s))}return s===45||$(s)?(n.consume(s),l+=String.fromCharCode(s),F):t(s)}function S(s){return s===62?(n.consume(s),e.interrupt?r:C):t(s)}function I(s){return _(s)?(n.consume(s),I):q(s)}function d(s){return s===47?(n.consume(s),q):s===58||s===95||K(s)?(n.consume(s),P):_(s)?(n.consume(s),d):q(s)}function P(s){return s===45||s===46||s===58||s===95||$(s)?(n.consume(s),P):T(s)}function T(s){return s===61?(n.consume(s),x):_(s)?(n.consume(s),T):d(s)}function x(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,L):_(s)?(n.consume(s),x):D(s)}function L(s){return s===m?(n.consume(s),m=null,N):s===null||y(s)?t(s):(n.consume(s),L)}function D(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||U(s)?T(s):(n.consume(s),D)}function N(s){return s===47||s===62||_(s)?d(s):t(s)}function q(s){return s===62?(n.consume(s),z):t(s)}function z(s){return s===null||y(s)?C(s):_(s)?(n.consume(s),z):t(s)}function C(s){return s===45&&u===2?(n.consume(s),V):s===60&&u===1?(n.consume(s),R):s===62&&u===4?(n.consume(s),Z):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),tn):y(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Me,en,O)(s)):s===null||y(s)?(n.exit("htmlFlowData"),O(s)):(n.consume(s),C)}function O(s){return n.check(De,M,en)(s)}function M(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),A}function A(s){return s===null||y(s)?O(s):(n.enter("htmlFlowData"),C(s))}function V(s){return s===45?(n.consume(s),o):C(s)}function R(s){return s===47?(n.consume(s),l="",Y):C(s)}function Y(s){if(s===62){const G=l.toLowerCase();return Un.includes(G)?(n.consume(s),Z):C(s)}return K(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),Y):C(s)}function tn(s){return s===93?(n.consume(s),o):C(s)}function o(s){return s===62?(n.consume(s),Z):s===45&&u===2?(n.consume(s),o):C(s)}function Z(s){return s===null||y(s)?(n.exit("htmlFlowData"),en(s)):(n.consume(s),Z)}function en(s){return n.exit("htmlFlow"),r(s)}}function Re(n,r,t){const e=this;return u;function u(l){return y(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function He(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(kn,r,t)}}const Ve={name:"htmlText",tokenize:Qe};function Qe(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),h):o===47?(n.consume(o),T):o===63?(n.consume(o),d):K(o)?(n.consume(o),D):t(o)}function h(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,b):K(o)?(n.consume(o),I):t(o)}function p(o){return o===45?(n.consume(o),c):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),g):y(o)?(l=f,R(o)):(n.consume(o),f)}function g(o){return o===45?(n.consume(o),c):f(o)}function c(o){return o===62?V(o):o===45?g(o):f(o)}function b(o){const Z="CDATA[";return o===Z.charCodeAt(i++)?(n.consume(o),i===Z.length?E:b):t(o)}function E(o){return o===null?t(o):o===93?(n.consume(o),F):y(o)?(l=E,R(o)):(n.consume(o),E)}function F(o){return o===93?(n.consume(o),S):E(o)}function S(o){return o===62?V(o):o===93?(n.consume(o),S):E(o)}function I(o){return o===null||o===62?V(o):y(o)?(l=I,R(o)):(n.consume(o),I)}function d(o){return o===null?t(o):o===63?(n.consume(o),P):y(o)?(l=d,R(o)):(n.consume(o),d)}function P(o){return o===62?V(o):d(o)}function T(o){return K(o)?(n.consume(o),x):t(o)}function x(o){return o===45||$(o)?(n.consume(o),x):L(o)}function L(o){return y(o)?(l=L,R(o)):_(o)?(n.consume(o),L):V(o)}function D(o){return o===45||$(o)?(n.consume(o),D):o===47||o===62||U(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),V):o===58||o===95||K(o)?(n.consume(o),q):y(o)?(l=N,R(o)):_(o)?(n.consume(o),N):V(o)}function q(o){return o===45||o===46||o===58||o===95||$(o)?(n.consume(o),q):z(o)}function z(o){return o===61?(n.consume(o),C):y(o)?(l=z,R(o)):_(o)?(n.consume(o),z):N(o)}function C(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,O):y(o)?(l=C,R(o)):_(o)?(n.consume(o),C):(n.consume(o),M)}function O(o){return o===u?(n.consume(o),u=void 0,A):o===null?t(o):y(o)?(l=O,R(o)):(n.consume(o),O)}function M(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||U(o)?N(o):(n.consume(o),M)}function A(o){return o===47||o===62||U(o)?N(o):t(o)}function V(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function R(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Y}function Y(o){return _(o)?B(n,tn,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):tn(o)}function tn(o){return n.enter("htmlTextData"),l(o)}}const Fn={name:"labelEnd",resolveAll:$e,resolveTo:Ye,tokenize:Ze},We={tokenize:Ge},Ue={tokenize:Je},je={tokenize:Ke};function $e(n){let r=-1;const t=[];for(;++r<n.length;){const e=n[r][1];if(t.push(n[r]),e.type==="labelImage"||e.type==="labelLink"||e.type==="labelEnd"){const u=e.type==="labelImage"?4:2;e.type="data",r+=u}}return n.length!==t.length&&X(n,0,n.length,t),n}function Ye(n,r){let t=n.length,e=0,u,i,l,a;for(;t--;)if(u=n[t][1],i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(l=t);const m={type:n[i][1].type==="labelLink"?"link":"image",start:{...n[i][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[i][1].start},end:{...n[l][1].end}},p={type:"labelText",start:{...n[i+e+2][1].end},end:{...n[l-2][1].start}};return a=[["enter",m,r],["enter",h,r]],a=W(a,n.slice(i+1,i+e+3)),a=W(a,[["enter",p,r]]),a=W(a,dn(r.parser.constructs.insideSpan.null,n.slice(i+e+4,l-3),r)),a=W(a,[["exit",p,r],n[l-2],n[l-1],["exit",h,r]]),a=W(a,n.slice(l+1)),a=W(a,[["exit",m,r]]),X(n,i,n.length,a),n}function Ze(n,r,t){const e=this;let u=e.events.length,i,l;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){i=e.events[u][1];break}return a;function a(g){return i?i._inactive?f(g):(l=e.parser.defined.includes(hn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelEnd"),m):t(g)}function m(g){return g===40?n.attempt(We,p,l?p:f)(g):g===91?n.attempt(Ue,p,l?h:f)(g):l?p(g):f(g)}function h(g){return n.attempt(je,p,f)(g)}function p(g){return r(g)}function f(g){return i._balanced=!0,t(g)}}function Ge(n,r,t){return e;function e(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),u}function u(f){return U(f)?xn(n,i)(f):i(f)}function i(f){return f===41?p(f):rt(n,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return U(f)?xn(n,m)(f):p(f)}function a(f){return t(f)}function m(f){return f===34||f===39||f===40?ut(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):p(f)}function h(f){return U(f)?xn(n,p)(f):p(f)}function p(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),r):t(f)}}function Je(n,r,t){const e=this;return u;function u(a){return it.call(e,n,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(hn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function l(a){return t(a)}}function Ke(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),u}function u(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const Xe={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:ve};function ve(n,r,t){const e=this;return u;function u(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const nr={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:tr};function tr(n,r,t){const e=this;return u;function u(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(l):r(l)}}const Cn={name:"lineEnding",tokenize:er};function er(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),B(n,r,"linePrefix")}}const Sn={name:"thematicBreak",tokenize:rr};function rr(n,r,t){let e=0,u;return i;function i(h){return n.enter("thematicBreak"),l(h)}function l(h){return u=h,a(h)}function a(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):e>=3&&(h===null||y(h))?(n.exit("thematicBreak"),r(h)):t(h)}function m(h){return h===u?(n.consume(h),e++,m):(n.exit("thematicBreakSequence"),_(h)?B(n,a,"whitespace")(h):a(h))}}const j={continuation:{tokenize:ar},exit:sr,name:"list",tokenize:lr},ir={partial:!0,tokenize:cr},ur={partial:!0,tokenize:or};function lr(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(c){const b=e.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!e.containerState.marker||c===e.containerState.marker:yn(c)){if(e.containerState.type||(e.containerState.type=b,n.enter(b,{_container:!0})),b==="listUnordered")return n.enter("listItemPrefix"),c===42||c===45?n.check(Sn,t,h)(c):h(c);if(!e.interrupt||c===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(c)}return t(c)}function m(c){return yn(c)&&++l<10?(n.consume(c),m):(!e.interrupt||l<2)&&(e.containerState.marker?c===e.containerState.marker:c===41||c===46)?(n.exit("listItemValue"),h(c)):t(c)}function h(c){return n.enter("listItemMarker"),n.consume(c),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||c,n.check(kn,e.interrupt?t:p,n.attempt(ir,g,f))}function p(c){return e.containerState.initialBlankLine=!0,i++,g(c)}function f(c){return _(c)?(n.enter("listItemPrefixWhitespace"),n.consume(c),n.exit("listItemPrefixWhitespace"),g):t(c)}function g(c){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(c)}}function ar(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(kn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,B(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!_(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(ur,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,B(n,n.attempt(j,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function or(n,r,t){const e=this;return B(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function sr(n){n.exit(this.containerState.type)}function cr(n,r,t){const e=this;return B(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(i){const l=e.events[e.events.length-1];return!_(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const jn={name:"setextUnderline",resolveTo:hr,tokenize:fr};function hr(n,r){let t=n.length,e,u,i;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),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...n[e][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end={...n[i][1].end}):n[e][1]=l,n.push(["exit",l,r]),n}function fr(n,r,t){const e=this;let u;return i;function i(h){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=h,l(h)):t(h)}function l(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===u?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),_(h)?B(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||y(h)?(n.exit("setextHeadingLine"),r(h)):t(h)}}const pr={tokenize:mr};function mr(n){const r=this,t=n.attempt(kn,e,n.attempt(this.parser.constructs.flowInitial,u,B(n,n.attempt(this.parser.constructs.flow,u,n.attempt(be,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const gr={resolveAll:at()},xr=lt("string"),kr=lt("text");function lt(n){return{resolveAll:at(n==="text"?Sr:void 0),tokenize:r};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return h(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return h(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function h(p){if(p===null)return!0;const f=u[p];let g=-1;if(f)for(;++g<f.length;){const c=f[g];if(!c.previous||c.previous.call(e,e.previous))return!0}return!1}}}function at(n){return r;function r(t,e){let u=-1,i;for(;++u<=t.length;)i===void 0?t[u]&&t[u][1].type==="data"&&(i=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==i+2&&(t[i][1].end=t[u-1][1].end,t.splice(i+2,u-i-2),u=i+2),i=void 0);return n?n(t,e):t}}function Sr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],u=r.sliceStream(e);let i=u.length,l=-1,a=0,m;for(;i--;){const h=u[i];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(h===-2)m=!0,a++;else if(h!==-1){i++;break}}if(r._contentTypeTextTrailing&&t===n.length&&(a=0),a){const h={type:t===n.length||m||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:e.start._bufferIndex+l,_index:e.start._index+i,line:e.end.line,column:e.end.column-a,offset:e.end.offset-a},end:{...e.end}};e.end={...h.start},e.start.offset===e.end.offset?Object.assign(e,h):(n.splice(t,0,["enter",h,r],["exit",h,r]),t+=2)}t++}return n}const br={42:j,43:j,45:j,48:j,49:j,50:j,51:j,52:j,53:j,54:j,55:j,56:j,57:j,62:vn},dr={91:ze},Ir={[-2]:wn,[-1]:wn,32:wn},wr={35:_e,42:Sn,45:[jn,Sn],60:Oe,61:jn,95:Sn,96:Wn,126:Wn},Cr={38:tt,92:nt},zr={[-5]:Cn,[-4]:Cn,[-3]:Cn,33:Xe,38:tt,42:Tn,60:[ne,Ve],91:nr,92:[Fe,nt],93:Fn,95:Tn,96:pe},yr={null:[Tn,gr]},Er={null:[42,95]},Tr={null:[]},Fr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Er,contentInitial:dr,disable:Tr,document:br,flow:wr,flowInitial:Ir,insideSpan:yr,string:Cr,text:zr},Symbol.toStringTag,{value:"Module"}));function Ar(n,r,t){let e={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const u={},i=[];let l=[],a=[];const m={attempt:L(T),check:L(x),consume:I,enter:d,exit:P,interrupt:L(x,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:n,previous:null,sliceSerialize:g,sliceStream:c,write:f};let p=r.tokenize.call(h,m);return r.resolveAll&&i.push(r),h;function f(z){return l=W(l,z),F(),l[l.length-1]!==null?[]:(D(r,0),h.events=dn(i,h.events,h),h.events)}function g(z,C){return Lr(c(z),C)}function c(z){return _r(l,z)}function b(){const{_bufferIndex:z,_index:C,line:O,column:M,offset:A}=e;return{_bufferIndex:z,_index:C,line:O,column:M,offset:A}}function E(z){u[z.line]=z.column,q()}function F(){let z;for(;e._index<l.length;){const C=l[e._index];if(typeof C=="string")for(z=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===z&&e._bufferIndex<C.length;)S(C.charCodeAt(e._bufferIndex));else S(C)}}function S(z){p=p(z)}function I(z){y(z)?(e.line++,e.column=1,e.offset+=z===-3?2:1,q()):z!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===l[e._index].length&&(e._bufferIndex=-1,e._index++)),h.previous=z}function d(z,C){const O=C||{};return O.type=z,O.start=b(),h.events.push(["enter",O,h]),a.push(O),O}function P(z){const C=a.pop();return C.end=b(),h.events.push(["exit",C,h]),C}function T(z,C){D(z,C.from)}function x(z,C){C.restore()}function L(z,C){return O;function O(M,A,V){let R,Y,tn,o;return Array.isArray(M)?en(M):"tokenize"in M?en([M]):Z(M);function Z(H){return fn;function fn(un){const sn=un!==null&&H[un],cn=un!==null&&H.null,In=[...Array.isArray(sn)?sn:sn?[sn]:[],...Array.isArray(cn)?cn:cn?[cn]:[]];return en(In)(un)}}function en(H){return R=H,Y=0,H.length===0?V:s(H[Y])}function s(H){return fn;function fn(un){return o=N(),tn=H,H.partial||(h.currentConstruct=H),H.name&&h.parser.constructs.disable.null.includes(H.name)?on():H.tokenize.call(C?Object.assign(Object.create(h),C):h,m,G,on)(un)}}function G(H){return z(tn,o),A}function on(H){return o.restore(),++Y<R.length?s(R[Y]):V}}}function D(z,C){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&X(h.events,C,h.events.length-C,z.resolve(h.events.slice(C),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function N(){const z=b(),C=h.previous,O=h.currentConstruct,M=h.events.length,A=Array.from(a);return{from:M,restore:V};function V(){e=z,h.previous=C,h.currentConstruct=O,h.events.length=M,a=A,q()}}function q(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function _r(n,r){const t=r.start._index,e=r.start._bufferIndex,u=r.end._index,i=r.end._bufferIndex;let l;if(t===u)l=[n[t].slice(e,i)];else{if(l=n.slice(t,u),e>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function Lr(n,r){let t=-1;const e=[];let u;for(;++t<n.length;){const i=n[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
3
3
|
`;break}case-3:{l=`\r
|
|
4
|
-
`;break}case-2:{l=r?" ":" ";break}case-1:{if(!r&&u)continue;l=" ";break}default:l=String.fromCharCode(i)}u=i===-2,e.push(l)}return e.join("")}function Pr(n){const e={constructs:Zn([Fr,...(n||{}).extensions||[]]),content:u(Yt),defined:[],document:u(Gt),flow:u(pr),lazy:{},string:u(xr),text:u(kr)};return e;function u(i){return l;function l(a){return Ar(e,i,a)}}}function Br(n){for(;!et(n););return n}const $n=/[\0\t\n\r]/g;function Or(){let n=1,r="",t=!0,e;return u;function u(i,l,a){const m=[];let h,p,f,g,c;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),f=0,r="",t&&(i.charCodeAt(0)===65279&&f++,t=void 0);f<i.length;){if($n.lastIndex=f,h=$n.exec(i),g=h&&h.index!==void 0?h.index:i.length,c=i.charCodeAt(g),!h){r=i.slice(f);break}if(c===10&&f===g&&e)m.push(-3),e=void 0;else switch(e&&(m.push(-5),e=void 0),f<g&&(m.push(i.slice(f,g)),n+=g-f),c){case 0:{m.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,m.push(-2);n++<p;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:e=!0,n=1}f=g+1}return a&&(e&&m.push(-5),r&&m.push(r),m.push(null)),m}}function Mr(n,r,t){return typeof r!="string"&&(t=r,r=void 0),$t(t)(Br(Pr(t).document().write(Or()(n,r,!0))))}async function
|
|
4
|
+
`;break}case-2:{l=r?" ":" ";break}case-1:{if(!r&&u)continue;l=" ";break}default:l=String.fromCharCode(i)}u=i===-2,e.push(l)}return e.join("")}function Pr(n){const e={constructs:Zn([Fr,...(n||{}).extensions||[]]),content:u(Yt),defined:[],document:u(Gt),flow:u(pr),lazy:{},string:u(xr),text:u(kr)};return e;function u(i){return l;function l(a){return Ar(e,i,a)}}}function Br(n){for(;!et(n););return n}const $n=/[\0\t\n\r]/g;function Or(){let n=1,r="",t=!0,e;return u;function u(i,l,a){const m=[];let h,p,f,g,c;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),f=0,r="",t&&(i.charCodeAt(0)===65279&&f++,t=void 0);f<i.length;){if($n.lastIndex=f,h=$n.exec(i),g=h&&h.index!==void 0?h.index:i.length,c=i.charCodeAt(g),!h){r=i.slice(f);break}if(c===10&&f===g&&e)m.push(-3),e=void 0;else switch(e&&(m.push(-5),e=void 0),f<g&&(m.push(i.slice(f,g)),n+=g-f),c){case 0:{m.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,m.push(-2);n++<p;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:e=!0,n=1}f=g+1}return a&&(e&&m.push(-5),r&&m.push(r),m.push(null)),m}}function Mr(n,r,t){return typeof r!="string"&&(t=r,r=void 0),$t(t)(Br(Pr(t).document().write(Or()(n,r,!0))))}async function Dr(n={}){const r=[],t=[];if(n.gfm===!0){const e=await Promise.resolve().then(()=>require("./index-BS31JX7x.cjs"));r.push(e.gfm({})),t.push(e.gfmHtml({}))}return{extensions:r,htmlExtensions:t}}function Nr(n,...r){const{content:t,allowHtml:e=!1,allowDangerousProtocol:u=!1}=n,i=an.computedOf(t,e,u,n.features)(async(l="",a=!1,m=!1,h={})=>{const{extensions:p,htmlExtensions:f}=await Dr(h);return Mr(l,{allowDangerousHtml:a,allowDangerousProtocol:m,extensions:p,htmlExtensions:f})});return an.html.div((n.cssInjection??"none")==="none"?null:an.Task(()=>Promise.resolve().then(()=>require("./styles-url-B3p8AqBy.cjs")),({default:l})=>Mt.LinkPortal({id:"beatui-markdown-css",href:l})),an.attr.class("bc-markdown"),an.MapSignal(i,l=>an.Async(l,a=>an.attr.innerHTML(a))),...r)}exports.Markdown=Nr;exports.asciiAlpha=K;exports.asciiAlphanumeric=$;exports.asciiControl=bn;exports.blankLine=kn;exports.classifyCharacter=En;exports.combineExtensions=Zn;exports.combineHtmlExtensions=Gn;exports.factorySpace=B;exports.markdownLineEnding=y;exports.markdownLineEndingOrSpace=U;exports.markdownSpace=_;exports.normalizeIdentifier=hn;exports.resolveAll=dn;exports.sanitizeUri=gn;exports.splice=X;exports.unicodePunctuation=Kn;exports.unicodeWhitespace=Xn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as _, b as I, m as k, u as E, c as K, d as st, s as N, n as T, e as ht, f as F, g as P, r as gt, h as X, i as L, j as x, k as mt, l as ft } from "./index-
|
|
1
|
+
import { a as _, b as I, m as k, u as E, c as K, d as st, s as N, n as T, e as ht, f as F, g as P, r as gt, h as X, i as L, j as x, k as mt, l as ft } from "./index-wPyoqxuj.js";
|
|
2
2
|
const bt = {
|
|
3
3
|
tokenize: Ct,
|
|
4
4
|
partial: !0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { computedOf as Lt, html as Pt, Task as Bt, attr as Mn, MapSignal as Ot, Async as Mt } from "@tempots/dom";
|
|
2
|
-
import { L as
|
|
3
|
-
const
|
|
2
|
+
import { L as Dt } from "./link-portal-Cr2l9f3k.js";
|
|
3
|
+
const Dn = document.createElement("i");
|
|
4
4
|
function Yn(n) {
|
|
5
5
|
const r = "&" + n + ";";
|
|
6
|
-
|
|
7
|
-
const t =
|
|
6
|
+
Dn.innerHTML = r;
|
|
7
|
+
const t = Dn.textContent;
|
|
8
8
|
return (
|
|
9
9
|
// @ts-expect-error: TypeScript is wrong that `textContent` on elements can
|
|
10
10
|
// yield `null`.
|
|
@@ -24,7 +24,7 @@ function W(n, r) {
|
|
|
24
24
|
return n.length > 0 ? (nn(n, n.length, 0, r), n) : r;
|
|
25
25
|
}
|
|
26
26
|
const In = {}.hasOwnProperty;
|
|
27
|
-
function
|
|
27
|
+
function Nt(n) {
|
|
28
28
|
const r = {};
|
|
29
29
|
let t = -1;
|
|
30
30
|
for (; ++t < n.length; )
|
|
@@ -154,7 +154,7 @@ function Gt(n) {
|
|
|
154
154
|
}
|
|
155
155
|
return r.join("") + n.slice(e);
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const Nn = {}.hasOwnProperty, qn = /^(https?|ircs?|mailto|xmpp)$/i, Jt = /^https?$/i;
|
|
158
158
|
function Kt(n) {
|
|
159
159
|
const r = n || {};
|
|
160
160
|
let t = !0;
|
|
@@ -181,8 +181,8 @@ function Kt(n) {
|
|
|
181
181
|
link: an,
|
|
182
182
|
listItemMarker: z,
|
|
183
183
|
listItemValue: q,
|
|
184
|
-
listOrdered:
|
|
185
|
-
listUnordered:
|
|
184
|
+
listOrdered: D,
|
|
185
|
+
listUnordered: N,
|
|
186
186
|
paragraph: R,
|
|
187
187
|
reference: F,
|
|
188
188
|
resource: on,
|
|
@@ -268,7 +268,7 @@ function Kt(n) {
|
|
|
268
268
|
const X = K;
|
|
269
269
|
for (m.enter.null && m.enter.null.call(p); ++w < k.length; ) {
|
|
270
270
|
const Pn = m[X[w][0]], Bn = X[w][1].type, On = Pn[Bn];
|
|
271
|
-
|
|
271
|
+
Nn.call(Pn, Bn) && On && On.call({
|
|
272
272
|
sliceSerialize: X[w][2].sliceSerialize,
|
|
273
273
|
...p
|
|
274
274
|
}, X[w][1]);
|
|
@@ -331,10 +331,10 @@ function Kt(n) {
|
|
|
331
331
|
function L() {
|
|
332
332
|
S();
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function D(k) {
|
|
335
335
|
l.push(!k._loose), T(), I("<ol"), b("expectFirstItem", !0);
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function N(k) {
|
|
338
338
|
l.push(!k._loose), T(), I("<ul"), b("expectFirstItem", !0);
|
|
339
339
|
}
|
|
340
340
|
function q(k) {
|
|
@@ -441,7 +441,7 @@ function Kt(n) {
|
|
|
441
441
|
}
|
|
442
442
|
function ct() {
|
|
443
443
|
const k = i[i.length - 1], w = mn(k.labelId);
|
|
444
|
-
S(),
|
|
444
|
+
S(), Nn.call(e, w) || (e[w] = i[i.length - 1]), i.pop();
|
|
445
445
|
}
|
|
446
446
|
function ht() {
|
|
447
447
|
b("slurpAllLineEndings", !0);
|
|
@@ -668,20 +668,20 @@ function te(n) {
|
|
|
668
668
|
)
|
|
669
669
|
return;
|
|
670
670
|
const L = r.events.length;
|
|
671
|
-
let
|
|
672
|
-
for (;
|
|
673
|
-
if (r.events[
|
|
674
|
-
if (
|
|
675
|
-
q = r.events[
|
|
671
|
+
let D = L, N, q;
|
|
672
|
+
for (; D--; )
|
|
673
|
+
if (r.events[D][0] === "exit" && r.events[D][1].type === "chunkFlow") {
|
|
674
|
+
if (N) {
|
|
675
|
+
q = r.events[D][1].end;
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
|
-
|
|
678
|
+
N = !0;
|
|
679
679
|
}
|
|
680
680
|
for (S(e), x = L; x < r.events.length; )
|
|
681
681
|
r.events[x][1].end = {
|
|
682
682
|
...q
|
|
683
683
|
}, x++;
|
|
684
|
-
nn(r.events,
|
|
684
|
+
nn(r.events, D + 1, 0, r.events.slice(L)), r.events.length = x;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
function S(d) {
|
|
@@ -977,8 +977,8 @@ function pe(n, r, t) {
|
|
|
977
977
|
function P(x) {
|
|
978
978
|
return n.exit("codeFenced"), r(x);
|
|
979
979
|
}
|
|
980
|
-
function T(x, L,
|
|
981
|
-
let
|
|
980
|
+
function T(x, L, D) {
|
|
981
|
+
let N = 0;
|
|
982
982
|
return q;
|
|
983
983
|
function q(A) {
|
|
984
984
|
return x.enter("lineEnding"), x.consume(A), x.exit("lineEnding"), z;
|
|
@@ -987,13 +987,13 @@ function pe(n, r, t) {
|
|
|
987
987
|
return x.enter("codeFencedFence"), _(A) ? B(x, C, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(A) : C(A);
|
|
988
988
|
}
|
|
989
989
|
function C(A) {
|
|
990
|
-
return A === a ? (x.enter("codeFencedFenceSequence"), O(A)) :
|
|
990
|
+
return A === a ? (x.enter("codeFencedFenceSequence"), O(A)) : D(A);
|
|
991
991
|
}
|
|
992
992
|
function O(A) {
|
|
993
|
-
return A === a ? (
|
|
993
|
+
return A === a ? (N++, x.consume(A), O) : N >= l ? (x.exit("codeFencedFenceSequence"), _(A) ? B(x, M, "whitespace")(A) : M(A)) : D(A);
|
|
994
994
|
}
|
|
995
995
|
function M(A) {
|
|
996
|
-
return A === null || E(A) ? (x.exit("codeFencedFence"), L(A)) :
|
|
996
|
+
return A === null || E(A) ? (x.exit("codeFencedFence"), L(A)) : D(A);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
}
|
|
@@ -1515,10 +1515,10 @@ function Oe(n, r, t) {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
const Me = {
|
|
1517
1517
|
name: "headingAtx",
|
|
1518
|
-
resolve:
|
|
1519
|
-
tokenize:
|
|
1518
|
+
resolve: De,
|
|
1519
|
+
tokenize: Ne
|
|
1520
1520
|
};
|
|
1521
|
-
function
|
|
1521
|
+
function De(n, r) {
|
|
1522
1522
|
let t = n.length - 2, e = 3, u, i;
|
|
1523
1523
|
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 = {
|
|
1524
1524
|
type: "atxHeadingText",
|
|
@@ -1531,7 +1531,7 @@ function Ne(n, r) {
|
|
|
1531
1531
|
contentType: "text"
|
|
1532
1532
|
}, nn(n, e, t - e + 1, [["enter", u, r], ["enter", i, r], ["exit", i, r], ["exit", u, r]])), n;
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function Ne(n, r, t) {
|
|
1535
1535
|
let e = 0;
|
|
1536
1536
|
return u;
|
|
1537
1537
|
function u(p) {
|
|
@@ -1683,15 +1683,15 @@ function We(n, r, t) {
|
|
|
1683
1683
|
return s === 61 ? (n.consume(s), x) : _(s) ? (n.consume(s), T) : d(s);
|
|
1684
1684
|
}
|
|
1685
1685
|
function x(s) {
|
|
1686
|
-
return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), m = s, L) : _(s) ? (n.consume(s), x) :
|
|
1686
|
+
return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), m = s, L) : _(s) ? (n.consume(s), x) : D(s);
|
|
1687
1687
|
}
|
|
1688
1688
|
function L(s) {
|
|
1689
|
-
return s === m ? (n.consume(s), m = null,
|
|
1690
|
-
}
|
|
1691
|
-
function N(s) {
|
|
1692
|
-
return s === null || s === 34 || s === 39 || s === 47 || s === 60 || s === 61 || s === 62 || s === 96 || j(s) ? T(s) : (n.consume(s), N);
|
|
1689
|
+
return s === m ? (n.consume(s), m = null, N) : s === null || E(s) ? t(s) : (n.consume(s), L);
|
|
1693
1690
|
}
|
|
1694
1691
|
function D(s) {
|
|
1692
|
+
return s === null || s === 34 || s === 39 || s === 47 || s === 60 || s === 61 || s === 62 || s === 96 || j(s) ? T(s) : (n.consume(s), D);
|
|
1693
|
+
}
|
|
1694
|
+
function N(s) {
|
|
1695
1695
|
return s === 47 || s === 62 || _(s) ? d(s) : t(s);
|
|
1696
1696
|
}
|
|
1697
1697
|
function q(s) {
|
|
@@ -1766,7 +1766,7 @@ function Ye(n, r, t) {
|
|
|
1766
1766
|
return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(o), m;
|
|
1767
1767
|
}
|
|
1768
1768
|
function m(o) {
|
|
1769
|
-
return o === 33 ? (n.consume(o), h) : o === 47 ? (n.consume(o), T) : o === 63 ? (n.consume(o), d) : v(o) ? (n.consume(o),
|
|
1769
|
+
return o === 33 ? (n.consume(o), h) : o === 47 ? (n.consume(o), T) : o === 63 ? (n.consume(o), d) : v(o) ? (n.consume(o), D) : t(o);
|
|
1770
1770
|
}
|
|
1771
1771
|
function h(o) {
|
|
1772
1772
|
return o === 45 ? (n.consume(o), p) : o === 91 ? (n.consume(o), i = 0, b) : v(o) ? (n.consume(o), I) : t(o);
|
|
@@ -1814,17 +1814,17 @@ function Ye(n, r, t) {
|
|
|
1814
1814
|
function L(o) {
|
|
1815
1815
|
return E(o) ? (l = L, R(o)) : _(o) ? (n.consume(o), L) : V(o);
|
|
1816
1816
|
}
|
|
1817
|
-
function N(o) {
|
|
1818
|
-
return o === 45 || $(o) ? (n.consume(o), N) : o === 47 || o === 62 || j(o) ? D(o) : t(o);
|
|
1819
|
-
}
|
|
1820
1817
|
function D(o) {
|
|
1821
|
-
return o ===
|
|
1818
|
+
return o === 45 || $(o) ? (n.consume(o), D) : o === 47 || o === 62 || j(o) ? N(o) : t(o);
|
|
1819
|
+
}
|
|
1820
|
+
function N(o) {
|
|
1821
|
+
return o === 47 ? (n.consume(o), V) : o === 58 || o === 95 || v(o) ? (n.consume(o), q) : E(o) ? (l = N, R(o)) : _(o) ? (n.consume(o), N) : V(o);
|
|
1822
1822
|
}
|
|
1823
1823
|
function q(o) {
|
|
1824
1824
|
return o === 45 || o === 46 || o === 58 || o === 95 || $(o) ? (n.consume(o), q) : z(o);
|
|
1825
1825
|
}
|
|
1826
1826
|
function z(o) {
|
|
1827
|
-
return o === 61 ? (n.consume(o), C) : E(o) ? (l = z, R(o)) : _(o) ? (n.consume(o), z) :
|
|
1827
|
+
return o === 61 ? (n.consume(o), C) : E(o) ? (l = z, R(o)) : _(o) ? (n.consume(o), z) : N(o);
|
|
1828
1828
|
}
|
|
1829
1829
|
function C(o) {
|
|
1830
1830
|
return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), u = o, O) : E(o) ? (l = C, R(o)) : _(o) ? (n.consume(o), C) : (n.consume(o), M);
|
|
@@ -1833,10 +1833,10 @@ function Ye(n, r, t) {
|
|
|
1833
1833
|
return o === u ? (n.consume(o), u = void 0, A) : o === null ? t(o) : E(o) ? (l = O, R(o)) : (n.consume(o), O);
|
|
1834
1834
|
}
|
|
1835
1835
|
function M(o) {
|
|
1836
|
-
return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 96 ? t(o) : o === 47 || o === 62 || j(o) ?
|
|
1836
|
+
return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 96 ? t(o) : o === 47 || o === 62 || j(o) ? N(o) : (n.consume(o), M);
|
|
1837
1837
|
}
|
|
1838
1838
|
function A(o) {
|
|
1839
|
-
return o === 47 || o === 62 || j(o) ?
|
|
1839
|
+
return o === 47 || o === 62 || j(o) ? N(o) : t(o);
|
|
1840
1840
|
}
|
|
1841
1841
|
function V(o) {
|
|
1842
1842
|
return o === 62 ? (n.consume(o), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(o);
|
|
@@ -2405,10 +2405,10 @@ function Or(n, r, t) {
|
|
|
2405
2405
|
let p = r.tokenize.call(h, m);
|
|
2406
2406
|
return r.resolveAll && i.push(r), h;
|
|
2407
2407
|
function f(z) {
|
|
2408
|
-
return l = W(l, z), F(), l[l.length - 1] !== null ? [] : (
|
|
2408
|
+
return l = W(l, z), F(), l[l.length - 1] !== null ? [] : (D(r, 0), h.events = yn(i, h.events, h), h.events);
|
|
2409
2409
|
}
|
|
2410
2410
|
function g(z, C) {
|
|
2411
|
-
return
|
|
2411
|
+
return Dr(c(z), C);
|
|
2412
2412
|
}
|
|
2413
2413
|
function c(z) {
|
|
2414
2414
|
return Mr(l, z);
|
|
@@ -2461,7 +2461,7 @@ function Or(n, r, t) {
|
|
|
2461
2461
|
return C.end = b(), h.events.push(["exit", C, h]), C;
|
|
2462
2462
|
}
|
|
2463
2463
|
function T(z, C) {
|
|
2464
|
-
|
|
2464
|
+
D(z, C.from);
|
|
2465
2465
|
}
|
|
2466
2466
|
function x(z, C) {
|
|
2467
2467
|
C.restore();
|
|
@@ -2498,7 +2498,7 @@ function Or(n, r, t) {
|
|
|
2498
2498
|
function s(H) {
|
|
2499
2499
|
return cn;
|
|
2500
2500
|
function cn(un) {
|
|
2501
|
-
return o =
|
|
2501
|
+
return o = N(), tn = H, H.partial || (h.currentConstruct = H), H.name && h.parser.constructs.disable.null.includes(H.name) ? an() : H.tokenize.call(
|
|
2502
2502
|
// If we do have fields, create an object w/ `context` as its
|
|
2503
2503
|
// prototype.
|
|
2504
2504
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -2517,10 +2517,10 @@ function Or(n, r, t) {
|
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function D(z, C) {
|
|
2521
2521
|
z.resolveAll && !i.includes(z) && i.push(z), z.resolve && nn(h.events, C, h.events.length - C, z.resolve(h.events.slice(C), h)), z.resolveTo && (h.events = z.resolveTo(h.events, h));
|
|
2522
2522
|
}
|
|
2523
|
-
function
|
|
2523
|
+
function N() {
|
|
2524
2524
|
const z = b(), C = h.previous, O = h.currentConstruct, M = h.events.length, A = Array.from(a);
|
|
2525
2525
|
return {
|
|
2526
2526
|
from: M,
|
|
@@ -2548,7 +2548,7 @@ function Mr(n, r) {
|
|
|
2548
2548
|
}
|
|
2549
2549
|
return l;
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2551
|
+
function Dr(n, r) {
|
|
2552
2552
|
let t = -1;
|
|
2553
2553
|
const e = [];
|
|
2554
2554
|
let u;
|
|
@@ -2588,11 +2588,11 @@ function Nr(n, r) {
|
|
|
2588
2588
|
}
|
|
2589
2589
|
return e.join("");
|
|
2590
2590
|
}
|
|
2591
|
-
function
|
|
2591
|
+
function Nr(n) {
|
|
2592
2592
|
const e = {
|
|
2593
2593
|
constructs: (
|
|
2594
2594
|
/** @type {FullNormalizedExtension} */
|
|
2595
|
-
|
|
2595
|
+
Nt([Br, ...(n || {}).extensions || []])
|
|
2596
2596
|
),
|
|
2597
2597
|
content: u(Xt),
|
|
2598
2598
|
defined: [],
|
|
@@ -2652,35 +2652,41 @@ function Rr() {
|
|
|
2652
2652
|
}
|
|
2653
2653
|
}
|
|
2654
2654
|
function Hr(n, r, t) {
|
|
2655
|
-
return typeof r != "string" && (t = r, r = void 0), Kt(t)(qr(
|
|
2655
|
+
return typeof r != "string" && (t = r, r = void 0), Kt(t)(qr(Nr(t).document().write(Rr()(n, r, !0))));
|
|
2656
2656
|
}
|
|
2657
2657
|
async function Vr(n = {}) {
|
|
2658
2658
|
const r = [], t = [];
|
|
2659
2659
|
if (n.gfm === !0) {
|
|
2660
|
-
const e = await import("./index-
|
|
2660
|
+
const e = await import("./index-DKl26ILa.js");
|
|
2661
2661
|
r.push(e.gfm({})), t.push(e.gfmHtml({}));
|
|
2662
2662
|
}
|
|
2663
2663
|
return { extensions: r, htmlExtensions: t };
|
|
2664
2664
|
}
|
|
2665
2665
|
function Ur(n, ...r) {
|
|
2666
|
-
const { content: t, allowHtml: e = !1 } = n,
|
|
2666
|
+
const { content: t, allowHtml: e = !1, allowDangerousProtocol: u = !1 } = n, i = Lt(
|
|
2667
2667
|
t,
|
|
2668
2668
|
e,
|
|
2669
|
+
u,
|
|
2669
2670
|
n.features
|
|
2670
|
-
)(async (
|
|
2671
|
-
const { extensions:
|
|
2672
|
-
return Hr(
|
|
2671
|
+
)(async (l = "", a = !1, m = !1, h = {}) => {
|
|
2672
|
+
const { extensions: p, htmlExtensions: f } = await Vr(h);
|
|
2673
|
+
return Hr(l, {
|
|
2674
|
+
allowDangerousHtml: a,
|
|
2675
|
+
allowDangerousProtocol: m,
|
|
2676
|
+
extensions: p,
|
|
2677
|
+
htmlExtensions: f
|
|
2678
|
+
});
|
|
2673
2679
|
});
|
|
2674
2680
|
return Pt.div(
|
|
2675
2681
|
// Ensure styles are present declaratively via head portal
|
|
2676
2682
|
(n.cssInjection ?? "none") === "none" ? null : Bt(
|
|
2677
2683
|
() => import("./styles-url-COuz9fVH.js"),
|
|
2678
|
-
({ default:
|
|
2684
|
+
({ default: l }) => Dt({ id: "beatui-markdown-css", href: l })
|
|
2679
2685
|
),
|
|
2680
2686
|
Mn.class("bc-markdown"),
|
|
2681
2687
|
Ot(
|
|
2682
|
-
|
|
2683
|
-
(
|
|
2688
|
+
i,
|
|
2689
|
+
(l) => Mt(l, (a) => Mn.innerHTML(a))
|
|
2684
2690
|
),
|
|
2685
2691
|
...r
|
|
2686
2692
|
);
|
|
@@ -2697,7 +2703,7 @@ export {
|
|
|
2697
2703
|
Hn as h,
|
|
2698
2704
|
E as i,
|
|
2699
2705
|
_ as j,
|
|
2700
|
-
|
|
2706
|
+
Nt as k,
|
|
2701
2707
|
Ht as l,
|
|
2702
2708
|
j as m,
|
|
2703
2709
|
mn as n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tempots/dom");const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tempots/dom");const e=require("../index-BZYWyjM_.cjs");require("../link-portal-_tiDFZqh.cjs");exports.Markdown=e.Markdown;
|
|
@@ -16,7 +16,7 @@ export type MappedControllerOptions<T, U, O extends BaseControlOptions> = Merge<
|
|
|
16
16
|
toInput: (value: T) => U;
|
|
17
17
|
fromInput: (value: U) => T;
|
|
18
18
|
}>;
|
|
19
|
-
export declare function BaseControl<T, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, options: BaseControllerOptions<T, O>):
|
|
19
|
+
export declare function BaseControl<T, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, options: BaseControllerOptions<T, O>): any;
|
|
20
20
|
export declare function Control<T, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: ControllerOptions<T, O>, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
21
|
-
export declare function BaseMappedControl<T, U, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, options: MappedControllerOptions<T, U, O>):
|
|
21
|
+
export declare function BaseMappedControl<T, U, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, options: MappedControllerOptions<T, U, O>): any;
|
|
22
22
|
export declare function MappedControl<T, U, O extends BaseControlOptions>(InputComponent: (options: O) => TNode, { id: idArg, labelFor: labelForArg, ...options }: MappedControllerOptions<T, U, O>, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
3
|
import { DropdownOption } from './option';
|
|
4
4
|
import { BaseControllerOptions, ControllerOptions } from '../control';
|
|
@@ -12,5 +12,5 @@ export type ComboboxTagsOptions<T> = {
|
|
|
12
12
|
}) => boolean;
|
|
13
13
|
} & InputOptions<T[]>;
|
|
14
14
|
export declare function ComboboxTagsInput<T>(options: ComboboxTagsOptions<T>): import("@tempots/dom").Renderable;
|
|
15
|
-
export declare function BaseComboboxTagsControl<T>(options: BaseControllerOptions<T[], ComboboxTagsOptions<T>>):
|
|
15
|
+
export declare function BaseComboboxTagsControl<T>(options: BaseControllerOptions<T[], ComboboxTagsOptions<T>>): any;
|
|
16
16
|
export declare function ComboboxTagsControl<T>(options: ControllerOptions<T[], ComboboxTagsOptions<T>>): import("@tempots/dom").Renderable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Value } from '@tempots/dom';
|
|
2
2
|
import { InputOptions } from './input-options';
|
|
3
3
|
import { DropdownOption } from './option';
|
|
4
4
|
import { BaseControllerOptions, ControllerOptions } from '../control';
|
|
@@ -16,5 +16,5 @@ export declare function Chips<T>(opts: {
|
|
|
16
16
|
onRemove: (v: T) => void;
|
|
17
17
|
}): import("@tempots/dom").Renderable;
|
|
18
18
|
export declare function SelectTagsInput<T>(options: SelectTagsOptions<T>): import("@tempots/dom").Renderable;
|
|
19
|
-
export declare function BaseSelectTagsControl<T>(options: BaseControllerOptions<T[], SelectTagsOptions<T>>):
|
|
19
|
+
export declare function BaseSelectTagsControl<T>(options: BaseControllerOptions<T[], SelectTagsOptions<T>>): any;
|
|
20
20
|
export declare function SelectTagsControl<T>(options: ControllerOptions<T[], SelectTagsOptions<T>>): import("@tempots/dom").Renderable;
|
|
@@ -3,6 +3,13 @@ export type MarkdownOptions = {
|
|
|
3
3
|
content: Value<string>;
|
|
4
4
|
/** Escape HTML by default for safety. Set true to allow raw HTML passthrough. */
|
|
5
5
|
allowHtml?: Value<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Allow potentially dangerous protocols in links and images (e.g., `data:`, `javascript:`).
|
|
8
|
+
* **WARNING: This is unsafe!** Enabling this opens you up to XSS attacks.
|
|
9
|
+
* Only enable if you completely trust the markdown source.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
allowDangerousProtocol?: Value<boolean>;
|
|
6
13
|
features?: Value<{
|
|
7
14
|
gfm?: boolean;
|
|
8
15
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempots/beatui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
"registry": "https://registry.npmjs.org/"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"@tempots/dom": "
|
|
113
|
+
"@tempots/dom": "35.0.0",
|
|
114
114
|
"@tempots/std": "0.24.0",
|
|
115
|
-
"@tempots/ui": "
|
|
115
|
+
"@tempots/ui": "14.0.0",
|
|
116
116
|
"tailwindcss": "4.1.14"
|
|
117
117
|
},
|
|
118
118
|
"peerDependenciesMeta": {
|