@likec4/mcp 1.60.0 → 1.61.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/README.md +104 -102
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +375 -393
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -5
- package/dist/chunks/libs/chevrotain.mjs +19 -19
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/fuse.js.mjs +1 -0
- package/dist/chunks/libs/graphology.mjs +1 -1
- package/dist/chunks/libs/hast-util-to-html.mjs +2 -2
- package/dist/chunks/libs/hastscript.mjs +1 -1
- package/dist/chunks/libs/immer.mjs +1 -1
- package/dist/chunks/libs/langium.mjs +2 -2
- package/dist/chunks/libs/markdown-table.mjs +1 -1
- package/dist/chunks/libs/mdast-util-find-and-replace.mjs +1 -1
- package/dist/chunks/libs/mdast-util-from-markdown.mjs +4 -4
- package/dist/chunks/libs/mdast-util-gfm.mjs +4 -4
- package/dist/chunks/libs/mdast-util-to-hast.mjs +3 -3
- package/dist/chunks/libs/micromark-extension-gfm.mjs +2 -2
- package/dist/chunks/libs/mnemonist.mjs +1 -1
- package/dist/chunks/libs/parse-entities.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/refractor.mjs +1 -1
- package/dist/chunks/libs/rehype-prism-plus.mjs +2 -2
- package/dist/chunks/libs/remark-github-blockquote-alert.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/unified.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/src.mjs +193 -108
- package/dist/cli.mjs +1 -1
- package/package.json +27 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import"../rolldown-runtime.mjs";import{_ as e,a as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,o as l,p as u,r as d,s as f,u as p,v as m}from"./mdast-util-from-markdown.mjs";const h={tokenize:tokenizeWwwPrefix,partial:!0},g={tokenize:tokenizeDomain,partial:!0},_={tokenize:tokenizePath,partial:!0},v={tokenize:tokenizeTrail,partial:!0},y={tokenize:tokenizeEmailDomainDotTrail,partial:!0},b={name:`wwwAutolink`,tokenize:tokenizeWwwAutolink,previous:previousWww},x={name:`protocolAutolink`,tokenize:tokenizeProtocolAutolink,previous:previousProtocol},S={name:`emailAutolink`,tokenize:tokenizeEmailAutolink,previous:previousEmail},C={};function gfmAutolinkLiteral(){return{text:C}}let w=48;for(;w<123;)C[w]=S,w++,w===58?w=65:w===91&&(w=97);C[43]=S,C[45]=S,C[46]=S,C[95]=S,C[72]=[S,x],C[104]=[S,x],C[87]=[S,b],C[119]=[S,b];function tokenizeEmailAutolink(e,t,i){let a=this,o,s;return start;function start(t){return!gfmAtext(t)||!previousEmail.call(a,a.previous)||previousUnbalanced(a.events)?i(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),atext(t))}function atext(t){return gfmAtext(t)?(e.consume(t),atext):t===64?(e.consume(t),emailDomain):i(t)}function emailDomain(t){return t===46?e.check(y,emailDomainAfter,emailDomainDot)(t):t===45||t===95||r(t)?(s=!0,e.consume(t),emailDomain):emailDomainAfter(t)}function emailDomainDot(t){return e.consume(t),o=!0,emailDomain}function emailDomainAfter(r){return s&&o&&n(a.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(r)):i(r)}}function tokenizeWwwAutolink(e,t,n){let r=this;return wwwStart;function wwwStart(t){return t!==87&&t!==119||!previousWww.call(r,r.previous)||previousUnbalanced(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(h,e.attempt(g,e.attempt(_,wwwAfter),n),n)(t))}function wwwAfter(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function tokenizeProtocolAutolink(t,r,i){let o=this,s=``,c=!1;return protocolStart;function protocolStart(e){return(e===72||e===104)&&previousProtocol.call(o,o.previous)&&!previousUnbalanced(o.events)?(t.enter(`literalAutolink`),t.enter(`literalAutolinkHttp`),s+=String.fromCodePoint(e),t.consume(e),protocolPrefixInside):i(e)}function protocolPrefixInside(e){if(n(e)&&s.length<5)return s+=String.fromCodePoint(e),t.consume(e),protocolPrefixInside;if(e===58){let n=s.toLowerCase();if(n===`http`||n===`https`)return t.consume(e),protocolSlashesInside}return i(e)}function protocolSlashesInside(e){return e===47?(t.consume(e),c?afterProtocol:(c=!0,protocolSlashesInside)):i(e)}function afterProtocol(n){return n===null||u(n)||a(n)||m(n)||e(n)?i(n):t.attempt(g,t.attempt(_,protocolAfter),i)(n)}function protocolAfter(e){return t.exit(`literalAutolinkHttp`),t.exit(`literalAutolink`),r(e)}}function tokenizeWwwPrefix(e,t,n){let r=0;return wwwPrefixInside;function wwwPrefixInside(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),wwwPrefixInside):t===46&&r===3?(e.consume(t),wwwPrefixAfter):n(t)}function wwwPrefixAfter(e){return e===null?n(e):t(e)}}function tokenizeDomain(t,n,r){let i,o,s;return domainInside;function domainInside(n){return n===46||n===95?t.check(v,domainAfter,domainAtPunctuation)(n):n===null||a(n)||m(n)||n!==45&&e(n)?domainAfter(n):(s=!0,t.consume(n),domainInside)}function domainAtPunctuation(e){return e===95?i=!0:(o=i,i=void 0),t.consume(e),domainInside}function domainAfter(e){return o||i||!s?r(e):n(e)}}function tokenizePath(e,t){let n=0,r=0;return pathInside;function pathInside(i){return i===40?(n++,e.consume(i),pathInside):i===41&&r<n?pathAtPunctuation(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(v,t,pathAtPunctuation)(i):i===null||a(i)||m(i)?t(i):(e.consume(i),pathInside)}function pathAtPunctuation(t){return t===41&&r++,e.consume(t),pathInside}}function tokenizeTrail(e,t,r){return trail;function trail(n){return n===33||n===34||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===63||n===95||n===126?(e.consume(n),trail):n===38?(e.consume(n),trailCharacterReferenceStart):n===93?(e.consume(n),trailBracketAfter):n===60||n===null||a(n)||m(n)?t(n):r(n)}function trailBracketAfter(e){return e===null||e===40||e===91||a(e)||m(e)?t(e):trail(e)}function trailCharacterReferenceStart(e){return n(e)?trailCharacterReferenceInside(e):r(e)}function trailCharacterReferenceInside(t){return t===59?(e.consume(t),trail):n(t)?(e.consume(t),trailCharacterReferenceInside):r(t)}}function tokenizeEmailDomainDotTrail(e,t,n){return start;function start(t){return e.consume(t),after}function after(e){return r(e)?n(e):t(e)}}function previousWww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||a(e)}function previousProtocol(e){return!n(e)}function previousEmail(e){return!(e===47||gfmAtext(e))}function gfmAtext(e){return e===43||e===45||e===46||e===95||r(e)}function previousUnbalanced(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const T={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:`gfmFootnoteCall`,tokenize:tokenizeGfmFootnoteCall},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return start;function start(i){if(!o||!o._balanced)return n(i);let s=p(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function resolveToPotentialGfmFootnoteCall(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function tokenizeGfmFootnoteCall(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return start;function start(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),callStart}function callStart(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,callData):n(t)}function callData(c){if(o>999||c===93&&!s||c===null||c===91||a(c))return n(c);if(c===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(p(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(c),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(c)}return a(c)||(s=!0),o++,e.consume(c),c===92?callEscape:callData}function callEscape(t){return t===91||t===92||t===93?(e.consume(t),o++,callData):callData(t)}}function tokenizeDefinitionStart(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s,c=0,l;return start;function start(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),labelAtMarker}function labelAtMarker(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,labelInside):n(t)}function labelInside(t){if(c>999||t===93&&!l||t===null||t===91||a(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return s=p(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),labelAfter}return a(t)||(l=!0),c++,e.consume(t),t===92?labelEscape:labelInside}function labelEscape(t){return t===91||t===92||t===93?(e.consume(t),c++,labelInside):labelInside(t)}function labelAfter(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(s)||i.push(s),o(e,whitespaceAfter,`gfmFootnoteDefinitionWhitespace`)):n(t)}function whitespaceAfter(e){return t(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(d,t,e.attempt(T,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit(`gfmFootnoteDefinition`)}function tokenizeIndent(e,t,n){let r=this;return o(e,afterPrefix,`gfmFootnoteDefinitionIndent`,5);function afterPrefix(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function gfmStrikethrough(e){let n=(e||{}).singleTilde,r={name:`strikethrough`,tokenize:tokenizeStrikethrough,resolveAll:resolveAllStrikethrough};return n??=!0,{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function resolveAllStrikethrough(e,n){let r=-1;for(;++r<e.length;)if(e[r][0]===`enter`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._close){let i=r;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`strikethroughSequenceTemporary`&&e[i][1]._open&&e[r][1].end.offset-e[r][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[r][1].type=`strikethroughSequence`,e[i][1].type=`strikethroughSequence`;let a={type:`strikethrough`,start:Object.assign({},e[i][1].start),end:Object.assign({},e[r][1].end)},o={type:`strikethroughText`,start:Object.assign({},e[i][1].end),end:Object.assign({},e[r][1].start)},s=[[`enter`,a,n],[`enter`,e[i][1],n],[`exit`,e[i][1],n],[`enter`,o,n]],c=n.parser.constructs.insideSpan.null;c&&f(s,s.length,0,t(c,e.slice(i+1,r),n)),f(s,s.length,0,[[`exit`,o,n],[`enter`,e[r][1],n],[`exit`,e[r][1],n],[`exit`,a,n]]),f(e,i-1,r-i+3,s),r=i+s.length-2;break}}for(r=-1;++r<e.length;)e[r][1].type===`strikethroughSequenceTemporary`&&(e[r][1].type=`data`);return e}function tokenizeStrikethrough(e,t,r){let i=this.previous,a=this.events,o=0;return start;function start(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),more(t))}function more(a){let c=s(i);if(a===126)return o>1?r(a):(e.consume(a),o++,more);if(o<2&&!n)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=s(a);return l._open=!u||u===2&&!!c,l._close=!c||c===2&&!!u,t(a)}}}var EditMap=class{constructor(){this.map=[]}add(e,t,n){addImplementation(this,e,t,n)}consume(e){
|
|
1
|
+
import"../rolldown-runtime.mjs";import{_ as e,a as t,b as n,d as r,f as i,g as a,h as o,i as s,m as c,o as l,p as u,r as d,s as f,v as p,y as m}from"./mdast-util-from-markdown.mjs";const h={tokenize:tokenizeWwwPrefix,partial:!0},g={tokenize:tokenizeDomain,partial:!0},_={tokenize:tokenizePath,partial:!0},v={tokenize:tokenizeTrail,partial:!0},y={tokenize:tokenizeEmailDomainDotTrail,partial:!0},b={name:`wwwAutolink`,tokenize:tokenizeWwwAutolink,previous:previousWww},x={name:`protocolAutolink`,tokenize:tokenizeProtocolAutolink,previous:previousProtocol},S={name:`emailAutolink`,tokenize:tokenizeEmailAutolink,previous:previousEmail},C={};function gfmAutolinkLiteral(){return{text:C}}let w=48;for(;w<123;)C[w]=S,w++,w===58?w=65:w===91&&(w=97);C[43]=S,C[45]=S,C[46]=S,C[95]=S,C[72]=[S,x],C[104]=[S,x],C[87]=[S,b],C[119]=[S,b];function tokenizeEmailAutolink(e,t,n){let r=this,i,a;return start;function start(t){return!gfmAtext(t)||!previousEmail.call(r,r.previous)||previousUnbalanced(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),atext(t))}function atext(t){return gfmAtext(t)?(e.consume(t),atext):t===64?(e.consume(t),emailDomain):n(t)}function emailDomain(t){return t===46?e.check(y,emailDomainAfter,emailDomainDot)(t):t===45||t===95||c(t)?(a=!0,e.consume(t),emailDomain):emailDomainAfter(t)}function emailDomainDot(t){return e.consume(t),i=!0,emailDomain}function emailDomainAfter(o){return a&&i&&u(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function tokenizeWwwAutolink(e,t,n){let r=this;return wwwStart;function wwwStart(t){return t!==87&&t!==119||!previousWww.call(r,r.previous)||previousUnbalanced(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(h,e.attempt(g,e.attempt(_,wwwAfter),n),n)(t))}function wwwAfter(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function tokenizeProtocolAutolink(t,r,i){let a=this,s=``,c=!1;return protocolStart;function protocolStart(e){return(e===72||e===104)&&previousProtocol.call(a,a.previous)&&!previousUnbalanced(a.events)?(t.enter(`literalAutolink`),t.enter(`literalAutolinkHttp`),s+=String.fromCodePoint(e),t.consume(e),protocolPrefixInside):i(e)}function protocolPrefixInside(e){if(u(e)&&s.length<5)return s+=String.fromCodePoint(e),t.consume(e),protocolPrefixInside;if(e===58){let n=s.toLowerCase();if(n===`http`||n===`https`)return t.consume(e),protocolSlashesInside}return i(e)}function protocolSlashesInside(e){return e===47?(t.consume(e),c?afterProtocol:(c=!0,protocolSlashesInside)):i(e)}function afterProtocol(r){return r===null||o(r)||e(r)||n(r)||m(r)?i(r):t.attempt(g,t.attempt(_,protocolAfter),i)(r)}function protocolAfter(e){return t.exit(`literalAutolinkHttp`),t.exit(`literalAutolink`),r(e)}}function tokenizeWwwPrefix(e,t,n){let r=0;return wwwPrefixInside;function wwwPrefixInside(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),wwwPrefixInside):t===46&&r===3?(e.consume(t),wwwPrefixAfter):n(t)}function wwwPrefixAfter(e){return e===null?n(e):t(e)}}function tokenizeDomain(t,r,i){let a,o,s;return domainInside;function domainInside(r){return r===46||r===95?t.check(v,domainAfter,domainAtPunctuation)(r):r===null||e(r)||n(r)||r!==45&&m(r)?domainAfter(r):(s=!0,t.consume(r),domainInside)}function domainAtPunctuation(e){return e===95?a=!0:(o=a,a=void 0),t.consume(e),domainInside}function domainAfter(e){return o||a||!s?i(e):r(e)}}function tokenizePath(t,r){let i=0,a=0;return pathInside;function pathInside(o){return o===40?(i++,t.consume(o),pathInside):o===41&&a<i?pathAtPunctuation(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(v,r,pathAtPunctuation)(o):o===null||e(o)||n(o)?r(o):(t.consume(o),pathInside)}function pathAtPunctuation(e){return e===41&&a++,t.consume(e),pathInside}}function tokenizeTrail(t,r,i){return trail;function trail(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),trail):a===38?(t.consume(a),trailCharacterReferenceStart):a===93?(t.consume(a),trailBracketAfter):a===60||a===null||e(a)||n(a)?r(a):i(a)}function trailBracketAfter(t){return t===null||t===40||t===91||e(t)||n(t)?r(t):trail(t)}function trailCharacterReferenceStart(e){return u(e)?trailCharacterReferenceInside(e):i(e)}function trailCharacterReferenceInside(e){return e===59?(t.consume(e),trail):u(e)?(t.consume(e),trailCharacterReferenceInside):i(e)}}function tokenizeEmailDomainDotTrail(e,t,n){return start;function start(t){return e.consume(t),after}function after(e){return c(e)?n(e):t(e)}}function previousWww(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||e(t)}function previousProtocol(e){return!u(e)}function previousEmail(e){return!(e===47||gfmAtext(e))}function gfmAtext(e){return e===43||e===45||e===46||e===95||c(e)}function previousUnbalanced(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const T={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:`gfmFootnoteCall`,tokenize:tokenizeGfmFootnoteCall},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(e,t,n){let r=this,a=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;a--;){let e=r.events[a][1];if(e.type===`labelImage`){s=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return start;function start(a){if(!s||!s._balanced)return n(a);let c=i(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(a):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(a),e.exit(`gfmFootnoteCallLabelMarker`),t(a))}}function resolveToPotentialGfmFootnoteCall(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function tokenizeGfmFootnoteCall(t,n,r){let a=this,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),s=0,c;return start;function start(e){return t.enter(`gfmFootnoteCall`),t.enter(`gfmFootnoteCallLabelMarker`),t.consume(e),t.exit(`gfmFootnoteCallLabelMarker`),callStart}function callStart(e){return e===94?(t.enter(`gfmFootnoteCallMarker`),t.consume(e),t.exit(`gfmFootnoteCallMarker`),t.enter(`gfmFootnoteCallString`),t.enter(`chunkString`).contentType=`string`,callData):r(e)}function callData(l){if(s>999||l===93&&!c||l===null||l===91||e(l))return r(l);if(l===93){t.exit(`chunkString`);let e=t.exit(`gfmFootnoteCallString`);return o.includes(i(a.sliceSerialize(e)))?(t.enter(`gfmFootnoteCallLabelMarker`),t.consume(l),t.exit(`gfmFootnoteCallLabelMarker`),t.exit(`gfmFootnoteCall`),n):r(l)}return e(l)||(c=!0),s++,t.consume(l),l===92?callEscape:callData}function callEscape(e){return e===91||e===92||e===93?(t.consume(e),s++,callData):callData(e)}}function tokenizeDefinitionStart(t,n,r){let a=this,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),c,l=0,u;return start;function start(e){return t.enter(`gfmFootnoteDefinition`)._container=!0,t.enter(`gfmFootnoteDefinitionLabel`),t.enter(`gfmFootnoteDefinitionLabelMarker`),t.consume(e),t.exit(`gfmFootnoteDefinitionLabelMarker`),labelAtMarker}function labelAtMarker(e){return e===94?(t.enter(`gfmFootnoteDefinitionMarker`),t.consume(e),t.exit(`gfmFootnoteDefinitionMarker`),t.enter(`gfmFootnoteDefinitionLabelString`),t.enter(`chunkString`).contentType=`string`,labelInside):r(e)}function labelInside(n){if(l>999||n===93&&!u||n===null||n===91||e(n))return r(n);if(n===93){t.exit(`chunkString`);let e=t.exit(`gfmFootnoteDefinitionLabelString`);return c=i(a.sliceSerialize(e)),t.enter(`gfmFootnoteDefinitionLabelMarker`),t.consume(n),t.exit(`gfmFootnoteDefinitionLabelMarker`),t.exit(`gfmFootnoteDefinitionLabel`),labelAfter}return e(n)||(u=!0),l++,t.consume(n),n===92?labelEscape:labelInside}function labelEscape(e){return e===91||e===92||e===93?(t.consume(e),l++,labelInside):labelInside(e)}function labelAfter(e){return e===58?(t.enter(`definitionMarker`),t.consume(e),t.exit(`definitionMarker`),o.includes(c)||o.push(c),s(t,whitespaceAfter,`gfmFootnoteDefinitionWhitespace`)):r(e)}function whitespaceAfter(e){return n(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(d,t,e.attempt(T,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit(`gfmFootnoteDefinition`)}function tokenizeIndent(e,t,n){let r=this;return s(e,afterPrefix,`gfmFootnoteDefinitionIndent`,5);function afterPrefix(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function gfmStrikethrough(e){let n=(e||{}).singleTilde,i={name:`strikethrough`,tokenize:tokenizeStrikethrough,resolveAll:resolveAllStrikethrough};return n??=!0,{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function resolveAllStrikethrough(e,n){let r=-1;for(;++r<e.length;)if(e[r][0]===`enter`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._close){let i=r;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`strikethroughSequenceTemporary`&&e[i][1]._open&&e[r][1].end.offset-e[r][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[r][1].type=`strikethroughSequence`,e[i][1].type=`strikethroughSequence`;let a={type:`strikethrough`,start:Object.assign({},e[i][1].start),end:Object.assign({},e[r][1].end)},o={type:`strikethroughText`,start:Object.assign({},e[i][1].end),end:Object.assign({},e[r][1].start)},s=[[`enter`,a,n],[`enter`,e[i][1],n],[`exit`,e[i][1],n],[`enter`,o,n]],c=n.parser.constructs.insideSpan.null;c&&f(s,s.length,0,t(c,e.slice(i+1,r),n)),f(s,s.length,0,[[`exit`,o,n],[`enter`,e[r][1],n],[`exit`,e[r][1],n],[`exit`,a,n]]),f(e,i-1,r-i+3,s),r=i+s.length-2;break}}for(r=-1;++r<e.length;)e[r][1].type===`strikethroughSequenceTemporary`&&(e[r][1].type=`data`);return e}function tokenizeStrikethrough(e,t,i){let a=this.previous,o=this.events,s=0;return start;function start(t){return a===126&&o[o.length-1][1].type!==`characterEscape`?i(t):(e.enter(`strikethroughSequenceTemporary`),more(t))}function more(o){let c=r(a);if(o===126)return s>1?i(o):(e.consume(o),s++,more);if(s<2&&!n)return i(o);let l=e.exit(`strikethroughSequenceTemporary`),u=r(o);return l._open=!u||u===2&&!!c,l._close=!c||c===2&&!!u,t(o)}}}var EditMap=class{constructor(){this.map=[]}add(e,t,n){addImplementation(this,e,t,n)}consume(e){
|
|
2
2
|
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
3
3
|
if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function addImplementation(e,t,n,r){let i=0;
|
|
4
4
|
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
5
|
-
if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gfmTableAlign(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function gfmTable(){return{flow:{null:{name:`table`,tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(
|
|
5
|
+
if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gfmTableAlign(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function gfmTable(){return{flow:{null:{name:`table`,tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(t,n,r){let i=this,o=0,c=0,l;return start;function start(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let n=t>-1?i.events[t][1].type:null,a=n===`tableHead`||n===`tableRow`?bodyRowStart:headRowBefore;return a===bodyRowStart&&i.parser.lazy[i.now().line]?r(e):a(e)}function headRowBefore(e){return t.enter(`tableHead`),t.enter(`tableRow`),headRowStart(e)}function headRowStart(e){return e===124||(l=!0,c+=1),headRowBreak(e)}function headRowBreak(e){return e===null?r(e):a(e)?c>1?(c=0,i.interrupt=!0,t.exit(`tableRow`),t.enter(`lineEnding`),t.consume(e),t.exit(`lineEnding`),headDelimiterStart):r(e):p(e)?s(t,headRowBreak,`whitespace`)(e):(c+=1,l&&(l=!1,o+=1),e===124?(t.enter(`tableCellDivider`),t.consume(e),t.exit(`tableCellDivider`),l=!0,headRowBreak):(t.enter(`data`),headRowData(e)))}function headRowData(n){return n===null||n===124||e(n)?(t.exit(`data`),headRowBreak(n)):(t.consume(n),n===92?headRowEscape:headRowData)}function headRowEscape(e){return e===92||e===124?(t.consume(e),headRowData):headRowData(e)}function headDelimiterStart(e){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(e):(t.enter(`tableDelimiterRow`),l=!1,p(e)?s(t,headDelimiterBefore,`linePrefix`,i.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(e):headDelimiterBefore(e))}function headDelimiterBefore(e){return e===45||e===58?headDelimiterValueBefore(e):e===124?(l=!0,t.enter(`tableCellDivider`),t.consume(e),t.exit(`tableCellDivider`),headDelimiterCellBefore):headDelimiterNok(e)}function headDelimiterCellBefore(e){return p(e)?s(t,headDelimiterValueBefore,`whitespace`)(e):headDelimiterValueBefore(e)}function headDelimiterValueBefore(e){return e===58?(c+=1,l=!0,t.enter(`tableDelimiterMarker`),t.consume(e),t.exit(`tableDelimiterMarker`),headDelimiterLeftAlignmentAfter):e===45?(c+=1,headDelimiterLeftAlignmentAfter(e)):e===null||a(e)?headDelimiterCellAfter(e):headDelimiterNok(e)}function headDelimiterLeftAlignmentAfter(e){return e===45?(t.enter(`tableDelimiterFiller`),headDelimiterFiller(e)):headDelimiterNok(e)}function headDelimiterFiller(e){return e===45?(t.consume(e),headDelimiterFiller):e===58?(l=!0,t.exit(`tableDelimiterFiller`),t.enter(`tableDelimiterMarker`),t.consume(e),t.exit(`tableDelimiterMarker`),headDelimiterRightAlignmentAfter):(t.exit(`tableDelimiterFiller`),headDelimiterRightAlignmentAfter(e))}function headDelimiterRightAlignmentAfter(e){return p(e)?s(t,headDelimiterCellAfter,`whitespace`)(e):headDelimiterCellAfter(e)}function headDelimiterCellAfter(e){return e===124?headDelimiterBefore(e):e===null||a(e)?!l||o!==c?headDelimiterNok(e):(t.exit(`tableDelimiterRow`),t.exit(`tableHead`),n(e)):headDelimiterNok(e)}function headDelimiterNok(e){return r(e)}function bodyRowStart(e){return t.enter(`tableRow`),bodyRowBreak(e)}function bodyRowBreak(e){return e===124?(t.enter(`tableCellDivider`),t.consume(e),t.exit(`tableCellDivider`),bodyRowBreak):e===null||a(e)?(t.exit(`tableRow`),n(e)):p(e)?s(t,bodyRowBreak,`whitespace`)(e):(t.enter(`data`),bodyRowData(e))}function bodyRowData(n){return n===null||n===124||e(n)?(t.exit(`data`),bodyRowBreak(n)):(t.consume(n),n===92?bodyRowEscape:bodyRowData)}function bodyRowEscape(e){return e===92||e===124?(t.consume(e),bodyRowData):bodyRowData(e)}}function resolveTable(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new EditMap;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(flushTableEnd(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=flushCell(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=flushCell(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=flushCell(f,t,o,i,n,d)):(o[0]=o[1],d=flushCell(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&flushTableEnd(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=gfmTableAlign(t.events,n))}return e}function flushCell(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},getPoint(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=getPoint(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=getPoint(t.events,n[2]),a=getPoint(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},getPoint(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function flushTableEnd(e,t,n,r,i){let a=[],o=getPoint(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function getPoint(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const E={name:`tasklistCheck`,tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:E}}}function tokenizeTasklistCheck(t,n,r){let i=this;return open;function open(e){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(e):(t.enter(`taskListCheck`),t.enter(`taskListCheckMarker`),t.consume(e),t.exit(`taskListCheckMarker`),inside)}function inside(n){return e(n)?(t.enter(`taskListCheckValueUnchecked`),t.consume(n),t.exit(`taskListCheckValueUnchecked`),close):n===88||n===120?(t.enter(`taskListCheckValueChecked`),t.consume(n),t.exit(`taskListCheckValueChecked`),close):r(n)}function close(e){return e===93?(t.enter(`taskListCheckMarker`),t.consume(e),t.exit(`taskListCheckMarker`),t.exit(`taskListCheck`),after):r(e)}function after(e){return a(e)?n(e):p(e)?t.check({tokenize:spaceThenNonSpace},n,r)(e):r(e)}}function spaceThenNonSpace(e,t,n){return s(e,after,`whitespace`);function after(e){return e===null?n(e):t(e)}}function gfm(e){return l([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(e),gfmTable(),gfmTaskListItem()])}export{gfm as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"../rolldown-runtime.mjs";import{i as n,r}from"./graphology-dag.mjs";var i=/* @__PURE__ */ t((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=/* @__PURE__ */ new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=/* @__PURE__ */ new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return/* @__PURE__ */ new Set;if(!t.size)return new Set(e);for(var n=/* @__PURE__ */ new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=/* @__PURE__ */ new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),a=/* @__PURE__ */ t((e=>{var t=2**16-1,n=2**32-1,r=127,i=2**15-1,a=2**31-1;e.getPointerArray=function(e){var r=e-1;if(r<=255)return Uint8Array;if(r<=t)return Uint16Array;if(r<=n)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=r?Int8Array:t<=i?Int16Array:t<=a?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var o={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){for(var r=null,i=0,a,s,c,l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],s=e.getNumberType(c),a=o[s.name],a>i&&(i=a,r=s);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){for(var e=0,t=0,n,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),o=/* @__PURE__ */ t((e=>{var t=n(),r=a();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),s=/* @__PURE__ */ t(((e,t)=>{function DefaultMap(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=/* @__PURE__ */ new Map,this.factory=e,this.size=0}DefaultMap.prototype.clear=function(){this.items.clear(),this.size=0},DefaultMap.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},DefaultMap.prototype.peek=function(e){return this.items.get(e)},DefaultMap.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},DefaultMap.prototype.has=function(e){return this.items.has(e)},DefaultMap.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},DefaultMap.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},DefaultMap.prototype.entries=function(){return this.items.entries()},DefaultMap.prototype.keys=function(){return this.items.keys()},DefaultMap.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(DefaultMap.prototype[Symbol.iterator]=DefaultMap.prototype.entries),DefaultMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(DefaultMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=DefaultMap.prototype.inspect),DefaultMap.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=DefaultMap})),c=/* @__PURE__ */ t(((e,t)=>{function DefaultWeakMap(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=/* @__PURE__ */ new WeakMap,this.factory=e}DefaultWeakMap.prototype.clear=function(){this.items=/* @__PURE__ */ new WeakMap},DefaultWeakMap.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},DefaultWeakMap.prototype.peek=function(e){return this.items.get(e)},DefaultWeakMap.prototype.set=function(e,t){return this.items.set(e,t),this},DefaultWeakMap.prototype.has=function(e){return this.items.has(e)},DefaultWeakMap.prototype.delete=function(e){return this.items.delete(e)},DefaultWeakMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(DefaultWeakMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=DefaultWeakMap.prototype.inspect),t.exports=DefaultWeakMap})),l=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function MultiMap(e){this.Container=e||Array,this.items=/* @__PURE__ */ new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:MultiMap,enumerable:!1})}MultiMap.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},MultiMap.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},MultiMap.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},MultiMap.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i!==-1&&(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},MultiMap.prototype.has=function(e){return this.items.has(e)},MultiMap.prototype.get=function(e){return this.items.get(e)},MultiMap.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},MultiMap.prototype.count=MultiMap.prototype.multiplicity,MultiMap.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function inner(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(inner)})},MultiMap.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},MultiMap.prototype.keys=function(){return this.items.keys()},MultiMap.prototype.values=function(){var e=this.items.values(),t=!1,n,r,a,o;return this.Container===Set?new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value.values()}return r=n.next(),r.done?(t=!1,next()):{done:!1,value:r.value}}):new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value,a=0,o=n.length}return a>=o?(t=!1,next()):{done:!1,value:n[a++]}})},MultiMap.prototype.entries=function(){var e=this.items.entries(),t=!1,n,r,a,o,s;return this.Container===Set?new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1].values()}return r=n.next(),r.done?(t=!1,next()):{done:!1,value:[a,r.value]}}):new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1],o=0,s=n.length}return o>=s?(t=!1,next()):{done:!1,value:[a,n[o++]]}})},MultiMap.prototype.containers=function(){return this.items.values()},MultiMap.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(MultiMap.prototype[Symbol.iterator]=MultiMap.prototype.entries),MultiMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(MultiMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=MultiMap.prototype.inspect),MultiMap.prototype.toJSON=function(){return this.items},MultiMap.from=function(e,t){var n=new MultiMap(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=MultiMap})),u=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function LinkedList(){this.clear()}LinkedList.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},LinkedList.prototype.first=function(){return this.head?this.head.item:void 0},LinkedList.prototype.peek=LinkedList.prototype.first,LinkedList.prototype.last=function(){return this.tail?this.tail.item:void 0},LinkedList.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},LinkedList.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},LinkedList.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},LinkedList.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},LinkedList.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},LinkedList.prototype.values=function(){var e=this.head;return new i(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},LinkedList.prototype.entries=function(){var e=this.head,t=0;return new i(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(LinkedList.prototype[Symbol.iterator]=LinkedList.prototype.values),LinkedList.prototype.toString=function(){return this.toArray().join(`,`)},LinkedList.prototype.toJSON=function(){return this.toArray()},LinkedList.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:LinkedList,enumerable:!1}),e},typeof Symbol<`u`&&(LinkedList.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=LinkedList.prototype.inspect),LinkedList.from=function(e){var t=new LinkedList;return a(e,function(e){t.push(e)}),t},t.exports=LinkedList})),d=/* @__PURE__ */ t(((e,t)=>{var i=r(),s=n(),c=a(),l=o();function LRUCache(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}LRUCache.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},LRUCache.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},LRUCache.prototype.set=function(e,t){var n=this.items[e];n===void 0?(this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n):(this.splayOnTop(n),this.V[n]=t)},LRUCache.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},LRUCache.prototype.has=function(e){return e in this.items},LRUCache.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},LRUCache.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},LRUCache.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},LRUCache.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},LRUCache.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},LRUCache.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.V,o=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n],s=a[n];return e++,e<t&&(n=o[n]),{done:!1,value:[i,s]}})},typeof Symbol<`u`&&(LRUCache.prototype[Symbol.iterator]=LRUCache.prototype.entries),LRUCache.prototype.inspect=function(){for(var e=/* @__PURE__ */ new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,"constructor",{value:LRUCache,enumerable:!1}),e},typeof Symbol<`u`&&(LRUCache.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=LRUCache.prototype.inspect),LRUCache.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new LRUCache(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=LRUCache})),f=/* @__PURE__ */ t(((e,t)=>{var r=d(),i=n(),s=a(),c=o();function LRUMap(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=/* @__PURE__ */ new Map}LRUMap.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},LRUMap.prototype.set=function(e,t){var n=this.items.get(e);n===void 0?(this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n):(this.splayOnTop(n),this.V[n]=t)},LRUMap.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},LRUMap.prototype.has=function(e){return this.items.has(e)},LRUMap.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},LRUMap.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},LRUMap.prototype.splayOnTop=r.prototype.splayOnTop,LRUMap.prototype.forEach=r.prototype.forEach,LRUMap.prototype.keys=r.prototype.keys,LRUMap.prototype.values=r.prototype.values,LRUMap.prototype.entries=r.prototype.entries,typeof Symbol<`u`&&(LRUMap.prototype[Symbol.iterator]=LRUMap.prototype.entries),LRUMap.prototype.inspect=r.prototype.inspect,LRUMap.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var a=new LRUMap(t,n,r);return i(e,function(e,t){a.set(t,e)}),a},t.exports=LRUMap})),p=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function Stack(){this.clear()}Stack.prototype.clear=function(){this.items=[],this.size=0},Stack.prototype.push=function(e){return this.items.push(e),++this.size},Stack.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},Stack.prototype.peek=function(){return this.items[this.size-1]},Stack.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},Stack.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},Stack.prototype.values=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},Stack.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(Stack.prototype[Symbol.iterator]=Stack.prototype.values),Stack.prototype.toString=function(){return this.toArray().join(`,`)},Stack.prototype.toJSON=function(){return this.toArray()},Stack.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:Stack,enumerable:!1}),e},typeof Symbol<`u`&&(Stack.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=Stack.prototype.inspect),Stack.from=function(e){var t=new Stack;return a(e,function(e){t.push(e)}),t},Stack.of=function(){return Stack.from(arguments)},t.exports=Stack})),m=/* @__PURE__ */ e(i(),1),h=/* @__PURE__ */ e(s(),1),g=/* @__PURE__ */ e(c(),1),_=/* @__PURE__ */ e(u(),1),v=/* @__PURE__ */ e(f(),1),y=/* @__PURE__ */ e(l(),1),b=/* @__PURE__ */ e(p(),1);export{y as a,v as i,g as n,m as o,_ as r,b as s,h as t};
|
|
1
|
+
import{s as e,t}from"../rolldown-runtime.mjs";import{i as n,r}from"./graphology-dag.mjs";var i=/* @__PURE__ */ t((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=/* @__PURE__ */ new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=/* @__PURE__ */ new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return/* @__PURE__ */ new Set;if(!t.size)return new Set(e);for(var n=/* @__PURE__ */ new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=/* @__PURE__ */ new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),a=/* @__PURE__ */ t((e=>{var t=2**16-1,n=2**32-1,r=127,i=2**15-1,a=2**31-1;e.getPointerArray=function(e){var r=e-1;if(r<=255)return Uint8Array;if(r<=t)return Uint16Array;if(r<=n)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=r?Int8Array:t<=i?Int16Array:t<=a?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var o={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){for(var r=null,i=0,a,s,c,l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],s=e.getNumberType(c),a=o[s.name],a>i&&(i=a,r=s);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){for(var e=0,t=0,n,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),o=/* @__PURE__ */ t((e=>{var t=n(),r=a();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),s=/* @__PURE__ */ t(((e,t)=>{function DefaultMap(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=/* @__PURE__ */ new Map,this.factory=e,this.size=0}DefaultMap.prototype.clear=function(){this.items.clear(),this.size=0},DefaultMap.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},DefaultMap.prototype.peek=function(e){return this.items.get(e)},DefaultMap.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},DefaultMap.prototype.has=function(e){return this.items.has(e)},DefaultMap.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},DefaultMap.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},DefaultMap.prototype.entries=function(){return this.items.entries()},DefaultMap.prototype.keys=function(){return this.items.keys()},DefaultMap.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(DefaultMap.prototype[Symbol.iterator]=DefaultMap.prototype.entries),DefaultMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(DefaultMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=DefaultMap.prototype.inspect),DefaultMap.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=DefaultMap})),c=/* @__PURE__ */ t(((e,t)=>{function DefaultWeakMap(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=/* @__PURE__ */ new WeakMap,this.factory=e}DefaultWeakMap.prototype.clear=function(){this.items=/* @__PURE__ */ new WeakMap},DefaultWeakMap.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},DefaultWeakMap.prototype.peek=function(e){return this.items.get(e)},DefaultWeakMap.prototype.set=function(e,t){return this.items.set(e,t),this},DefaultWeakMap.prototype.has=function(e){return this.items.has(e)},DefaultWeakMap.prototype.delete=function(e){return this.items.delete(e)},DefaultWeakMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(DefaultWeakMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=DefaultWeakMap.prototype.inspect),t.exports=DefaultWeakMap})),l=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function MultiMap(e){this.Container=e||Array,this.items=/* @__PURE__ */ new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:MultiMap,enumerable:!1})}MultiMap.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},MultiMap.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},MultiMap.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},MultiMap.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i!==-1&&(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},MultiMap.prototype.has=function(e){return this.items.has(e)},MultiMap.prototype.get=function(e){return this.items.get(e)},MultiMap.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},MultiMap.prototype.count=MultiMap.prototype.multiplicity,MultiMap.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function inner(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(inner)})},MultiMap.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},MultiMap.prototype.keys=function(){return this.items.keys()},MultiMap.prototype.values=function(){var e=this.items.values(),t=!1,n,r,a,o;return this.Container===Set?new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value.values()}return r=n.next(),r.done?(t=!1,next()):{done:!1,value:r.value}}):new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,n=r.value,a=0,o=n.length}return a>=o?(t=!1,next()):{done:!1,value:n[a++]}})},MultiMap.prototype.entries=function(){var e=this.items.entries(),t=!1,n,r,a,o,s;return this.Container===Set?new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1].values()}return r=n.next(),r.done?(t=!1,next()):{done:!1,value:[a,r.value]}}):new i(function next(){if(!t){if(r=e.next(),r.done)return{done:!0};t=!0,a=r.value[0],n=r.value[1],o=0,s=n.length}return o>=s?(t=!1,next()):{done:!1,value:[a,n[o++]]}})},MultiMap.prototype.containers=function(){return this.items.values()},MultiMap.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(MultiMap.prototype[Symbol.iterator]=MultiMap.prototype.entries),MultiMap.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(MultiMap.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=MultiMap.prototype.inspect),MultiMap.prototype.toJSON=function(){return this.items},MultiMap.from=function(e,t){var n=new MultiMap(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=MultiMap})),u=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function LinkedList(){this.clear()}LinkedList.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},LinkedList.prototype.first=function(){return this.head?this.head.item:void 0},LinkedList.prototype.peek=LinkedList.prototype.first,LinkedList.prototype.last=function(){return this.tail?this.tail.item:void 0},LinkedList.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},LinkedList.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},LinkedList.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},LinkedList.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},LinkedList.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},LinkedList.prototype.values=function(){var e=this.head;return new i(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},LinkedList.prototype.entries=function(){var e=this.head,t=0;return new i(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(LinkedList.prototype[Symbol.iterator]=LinkedList.prototype.values),LinkedList.prototype.toString=function(){return this.toArray().join(`,`)},LinkedList.prototype.toJSON=function(){return this.toArray()},LinkedList.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:LinkedList,enumerable:!1}),e},typeof Symbol<`u`&&(LinkedList.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=LinkedList.prototype.inspect),LinkedList.from=function(e){var t=new LinkedList;return a(e,function(e){t.push(e)}),t},t.exports=LinkedList})),d=/* @__PURE__ */ t(((e,t)=>{var i=r(),s=n(),c=a(),l=o();function LRUCache(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}LRUCache.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},LRUCache.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},LRUCache.prototype.set=function(e,t){var n=this.items[e];n===void 0?(this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n):(this.splayOnTop(n),this.V[n]=t)},LRUCache.prototype.setpop=function(e,t){var n=null,r=null,i=!1,a=this.items[e];return a===void 0?(this.size<this.capacity?a=this.size++:(a=this.tail,this.tail=this.backward[a],n=this.V[a],r=this.K[a],delete this.items[r],i=!0),this.items[e]=a,this.K[a]=e,this.V[a]=t,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,i?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(a),n=this.V[a],this.V[a]=t,{evicted:!1,key:e,value:n})},LRUCache.prototype.has=function(e){return e in this.items},LRUCache.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},LRUCache.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},LRUCache.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},LRUCache.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},LRUCache.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,a=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n];return e++,e<t&&(n=a[n]),{done:!1,value:i}})},LRUCache.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,a=this.V,o=this.forward;return new i(function(){if(e>=t)return{done:!0};var i=r[n],s=a[n];return e++,e<t&&(n=o[n]),{done:!1,value:[i,s]}})},typeof Symbol<`u`&&(LRUCache.prototype[Symbol.iterator]=LRUCache.prototype.entries),LRUCache.prototype.inspect=function(){for(var e=/* @__PURE__ */ new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,"constructor",{value:LRUCache,enumerable:!1}),e},typeof Symbol<`u`&&(LRUCache.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=LRUCache.prototype.inspect),LRUCache.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new LRUCache(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=LRUCache})),f=/* @__PURE__ */ t(((e,t)=>{var r=d(),i=n(),s=a(),c=o();function LRUMap(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=/* @__PURE__ */ new Map}LRUMap.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},LRUMap.prototype.set=function(e,t){var n=this.items.get(e);n===void 0?(this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n):(this.splayOnTop(n),this.V[n]=t)},LRUMap.prototype.setpop=function(e,t){var n=null,r=null,i=!1,a=this.items.get(e);return a===void 0?(this.size<this.capacity?a=this.size++:(a=this.tail,this.tail=this.backward[a],n=this.V[a],r=this.K[a],this.items.delete(r),i=!0),this.items.set(e,a),this.K[a]=e,this.V[a]=t,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,i?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(a),n=this.V[a],this.V[a]=t,{evicted:!1,key:e,value:n})},LRUMap.prototype.has=function(e){return this.items.has(e)},LRUMap.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},LRUMap.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},LRUMap.prototype.splayOnTop=r.prototype.splayOnTop,LRUMap.prototype.forEach=r.prototype.forEach,LRUMap.prototype.keys=r.prototype.keys,LRUMap.prototype.values=r.prototype.values,LRUMap.prototype.entries=r.prototype.entries,typeof Symbol<`u`&&(LRUMap.prototype[Symbol.iterator]=LRUMap.prototype.entries),LRUMap.prototype.inspect=r.prototype.inspect,LRUMap.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var a=new LRUMap(t,n,r);return i(e,function(e,t){a.set(t,e)}),a},t.exports=LRUMap})),p=/* @__PURE__ */ t(((e,t)=>{var i=r(),a=n();function Stack(){this.clear()}Stack.prototype.clear=function(){this.items=[],this.size=0},Stack.prototype.push=function(e){return this.items.push(e),++this.size},Stack.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},Stack.prototype.peek=function(){return this.items[this.size-1]},Stack.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},Stack.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},Stack.prototype.values=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},Stack.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new i(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(Stack.prototype[Symbol.iterator]=Stack.prototype.values),Stack.prototype.toString=function(){return this.toArray().join(`,`)},Stack.prototype.toJSON=function(){return this.toArray()},Stack.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:Stack,enumerable:!1}),e},typeof Symbol<`u`&&(Stack.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=Stack.prototype.inspect),Stack.from=function(e){var t=new Stack;return a(e,function(e){t.push(e)}),t},Stack.of=function(){return Stack.from(arguments)},t.exports=Stack})),m=/* @__PURE__ */ e(i(),1),h=/* @__PURE__ */ e(s(),1),g=/* @__PURE__ */ e(c(),1),_=/* @__PURE__ */ e(u(),1),v=/* @__PURE__ */ e(f(),1),y=/* @__PURE__ */ e(l(),1),b=/* @__PURE__ */ e(p(),1);export{y as a,v as i,g as n,m as o,_ as r,b as s,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../rolldown-runtime.mjs";import{
|
|
1
|
+
import"../rolldown-runtime.mjs";import{n as e}from"./hast-util-to-html.mjs";import{l as t}from"./mdast-util-from-markdown.mjs";const n={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function isDecimal(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function isHexadecimal(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function isAlphabetical(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function isAlphanumerical(e){return isAlphabetical(e)||isDecimal(e)}const r=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function parseEntities(i,a){let o=a||{},s=typeof o.additional==`string`?o.additional.charCodeAt(0):o.additional,c=[],l=0,u=-1,d=``,f,p;o.position&&(`start`in o.position||`indent`in o.position?(p=o.position.indent,f=o.position.start):f=o.position);let m=(f?f.line:0)||1,h=(f?f.column:0)||1,g=now(),_;for(l--;++l<=i.length;)if(_===10&&(h=(p?p[u]:0)||1),_=i.charCodeAt(l),_===38){let r=i.charCodeAt(l+1);if(r===9||r===10||r===12||r===32||r===38||r===60||Number.isNaN(r)||s&&r===s){d+=String.fromCharCode(_),h++;continue}let a=l+1,u=a,f=a,p;if(r===35){f=++u;let e=i.charCodeAt(f);e===88||e===120?(p=`hexadecimal`,f=++u):p=`decimal`}else p=`named`;let m=``,v=``,y=``,b=p===`named`?isAlphanumerical:p===`decimal`?isDecimal:isHexadecimal;for(f--;++f<=i.length;){let n=i.charCodeAt(f);if(!b(n))break;y+=String.fromCharCode(n),p===`named`&&e.includes(y)&&(m=y,v=t(y))}let x=i.charCodeAt(f)===59;if(x){f++;let e=p===`named`&&t(y);e&&(m=y,v=e)}let S=1+f-a,C=``;if(x||o.nonTerminated!==!1){if(!y)p!==`named`&&warning(4,S);else if(p===`named`){if(x&&!v)warning(5,1);else if(m!==y&&(f=u+m.length,S=1+f-u,x=!1),!x){let e=m?1:3;if(o.attribute){let t=i.charCodeAt(f);t===61?(warning(e,S),v=``):isAlphanumerical(t)?v=``:warning(e,S)}else warning(e,S)}C=v}else{x||warning(2,S);let e=Number.parseInt(y,p===`hexadecimal`?16:10);if(prohibited(e))warning(7,S),C=`�`;else if(e in n)warning(6,S),C=n[e];else{let t=``;disallowed(e)&&warning(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}}if(C){flush(),g=now(),l=f-1,h+=f-a+1,c.push(C);let e=now();e.offset++,o.reference&&o.reference.call(o.referenceContext||void 0,C,{start:g,end:e},i.slice(a-1,f)),g=e}else y=i.slice(a-1,f),d+=y,h+=y.length,l=f-1}else _===10&&(m++,u++,h=0),Number.isNaN(_)?flush():(d+=String.fromCharCode(_),h++);return c.join(``);function now(){return{line:m,column:h,offset:l+((f?f.offset:0)||0)}}function warning(e,t){let n;o.warning&&(n=now(),n.column+=t,n.offset+=t,o.warning.call(o.warningContext||void 0,r[e],n,e))}function flush(){d&&=(c.push(d),o.text&&o.text.call(o.textContext||void 0,d,{start:g,end:now()}),``)}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}export{parseEntities as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../rolldown-runtime.mjs";const e=/^[A-Za-z]:\//;function normalizeWindowsPath(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}const t=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,n=/.(\.[^./]+|\.)$/,isAbsolute=function(e){return t.test(e)},extname=function(e){if(e===`..`)return``;let t=n.exec(normalizeWindowsPath(e));return t&&t[1]||``};export{
|
|
1
|
+
import"../rolldown-runtime.mjs";const e=/^[A-Za-z]:\//;function normalizeWindowsPath(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}const t=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,n=/.(\.[^./]+|\.)$/,isAbsolute=function(e){return t.test(e)},extname=function(e){if(e===`..`)return``;let t=n.exec(normalizeWindowsPath(e));return t&&t[1]||``},basename=function(e,t){let n=normalizeWindowsPath(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r};export{extname as n,isAbsolute as r,basename as t};
|