@likec4/core 1.55.1 → 1.57.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/THIRD-PARTY-LICENSES.md +30 -30
- package/dist/_chunks/Builder.view-element.mjs +2 -2
- package/dist/_chunks/LikeC4Model.d.mts +2 -1
- package/dist/_chunks/_types.d.mts +7 -3
- package/dist/_chunks/_types2.d.mts +1 -1
- package/dist/_chunks/assignTagColors.mjs +1 -1
- package/dist/_chunks/index.d.mts +64 -2
- package/dist/_chunks/index3.d.mts +1 -1
- package/dist/_chunks/index4.d.mts +1 -1
- package/dist/_chunks/index5.d.mts +13 -2
- package/dist/_chunks/libs/chroma-js.mjs +15 -0
- package/dist/_chunks/libs/graphology-dag.d.mts +607 -0
- package/dist/_chunks/libs/graphology-dag.mjs +1 -1
- package/dist/_chunks/libs/hast-util-to-html.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-gfm.mjs +11 -11
- package/dist/_chunks/libs/mnemonist.d.mts +33 -33
- package/dist/_chunks/libs/mnemonist.mjs +1 -1
- package/dist/_chunks/libs/unified.mjs +1 -1
- package/dist/_chunks/manual-layout.mjs +1 -1
- package/dist/_chunks/mnemonist.d.mts +1 -1
- package/dist/_chunks/model.mjs +4 -4
- package/dist/_chunks/rolldown-runtime.mjs +1 -1
- package/dist/_chunks/types.mjs +1 -1
- package/dist/builder/index.d.mts +2 -8
- package/dist/builder/index.mjs +1 -1
- package/dist/compute-view/index.d.mts +2 -6
- package/dist/compute-view/index.mjs +2 -2
- package/dist/geometry/index.mjs +1 -1
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +0 -5
- package/dist/model/index.mjs +1 -1
- package/dist/styles/index.d.mts +1 -2
- package/dist/styles/index.mjs +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/utils/graphology/index.d.mts +2 -1
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -5
- package/dist/utils/index.mjs +1 -1
- package/package.json +10 -10
- package/dist/_chunks/geometry.mjs +0 -1
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +0 -15
- package/dist/_chunks/utils.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function e(t,n){var r,o,s,c,l;if(!t)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof n!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||typeof t==`string`||t.toString()===`[object Arguments]`){for(s=0,c=t.length;s<c;s++)n(t[s],s);return}if(typeof t.forEach==`function`){t.forEach(n);return}if(a&&Symbol.iterator in t&&typeof t.next!=`function`&&(t=t[Symbol.iterator]()),typeof t.next==`function`){for(r=t,s=0;l=r.next(),l.done!==!0;)n(l.value,s),s++;return}for(o in t)t.hasOwnProperty(o)&&n(t[o],o)}})),r=e(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var e=arguments,t=e.length,r=0;return new n(function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}})},n.empty=function(){return new n(function(){return{done:!0}})},n.fromSequence=function(e){var t=0,r=e.length;return new n(function(){return t>=r?{done:!0}:{done:!1,value:e[t++]}})},n.is=function(e){return e instanceof n?!0:typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=n})),i=e((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?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 s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,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}})),
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function e(t,n){var r,o,s,c,l;if(!t)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof n!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||typeof t==`string`||t.toString()===`[object Arguments]`){for(s=0,c=t.length;s<c;s++)n(t[s],s);return}if(typeof t.forEach==`function`){t.forEach(n);return}if(a&&Symbol.iterator in t&&typeof t.next!=`function`&&(t=t[Symbol.iterator]()),typeof t.next==`function`){for(r=t,s=0;l=r.next(),l.done!==!0;)n(l.value,s),s++;return}for(o in t)t.hasOwnProperty(o)&&n(t[o],o)}})),r=e(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var e=arguments,t=e.length,r=0;return new n(function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}})},n.empty=function(){return new n(function(){return{done:!0}})},n.fromSequence=function(e){var t=0,r=e.length;return new n(function(){return t>=r?{done:!0}:{done:!1,value:e[t++]}})},n.is=function(e){return e instanceof n?!0:typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=n})),i=e(((e,t)=>{t.exports=function e(t){return typeof t==`object`&&!!t&&typeof t.addUndirectedEdgeWithKey==`function`&&typeof t.dropNode==`function`&&typeof t.multi==`boolean`}})),a=e((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?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 s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,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=e((e=>{var t=n(),r=a();function i(e){return Array.isArray(e)||r.isTypedArray(e)}function o(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function s(e){var n=o(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function c(e){var n=o(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],s=typeof n==`number`?new i(n):[],c=0;return t(e,function(e){a[c]=e,s[c]=c++}),[a,s]}e.isArrayLike=i,e.guessLength=o,e.toArray=s,e.toArrayWithIndices=c})),s=e(((e,t)=>{var n=o(),i=r();function a(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}a.prototype.clear=function(){this.start=0,this.size=0},a.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},a.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},a.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},a.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},a.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},a.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},a.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},a.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},a.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},a.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},typeof Symbol<`u`&&(a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=a.prototype.inspect),a.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new a(t,r);if(n.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)i.items[o]=e[o];return i.size=s,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=a})),c=e((e=>{let t=i(),n=s();function r(e,t){let n=0;return e.forEachInNeighbor(t,()=>{n++}),n}function a(e,i){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);if(e.type===`undirected`||e.undirectedSize!==0)throw Error(`graphology-dag/topological-sort: cannot work if graph is not directed.`);if(e.order===0)return;let a=new n(Array,e.order),o={},s=0;e.forEachNode((t,n)=>{let i=e.multi?r(e,t):e.inDegree(t);i===0?a.push([t,n,0]):(o[t]=i,s+=i)});let c=0;function l(e,t){let n=--o[e];s--,n===0&&a.push([e,t,c+1]),o[e]=n}for(;a.size!==0;){let[t,n,r]=a.shift();c=r,i(t,n,r),e.forEachOutNeighbor(t,l)}if(s!==0)throw Error(`graphology-dag/topological-sort: given graph is not acyclic.`)}function o(e){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);let n=Array(e.order),r=0;return a(e,e=>{n[r++]=e}),n}e.topologicalSort=o})),l=e(((e,t)=>{let n=i();t.exports=function e(t,r,i){if(!n(t))throw Error(`graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.`);if(r=``+r,i=``+i,r===i)return!0;if(!t.hasNode(r)||!t.hasNode(i)||t.hasDirectedEdge(r,i))return!1;if(t.hasDirectedEdge(i,r))return!0;let a=t.outNeighbors(i);function o(e){a.push(e)}for(;a.length!==0;){let e=a.pop();if(e===r)return!0;t.forEachOutNeighbor(e,o)}return!1}}));export{n as i,c as n,r,l as t};
|
|
@@ -6,4 +6,4 @@ import{n as e}from"../rolldown-runtime.mjs";import{t}from"./character-entities-l
|
|
|
6
6
|
\f\r &>`.split(``),`\0
|
|
7
7
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
8
8
|
\f\r "&'<=>\``.split(``),`\0
|
|
9
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Je(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=A);let l=Ye(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!He(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!q(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Ye(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Q(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Q(e,t,n){let a=ae(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,s
|
|
9
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Je(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=A);let l=Ye(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!He(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!q(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Ye(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Q(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Q(e,t,n){let a=ae(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,s=+!e.settings.allowDangerousCharacters,c=e.quote,l;if(a.overloadedBoolean&&(n===a.attribute||n===``)?n=!0:(a.boolean||a.overloadedBoolean)&&(typeof n!=`string`||n===a.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let u=B(a.attribute,Object.assign({},e.settings.characterReferences,{subset:Z.name[o][s]}));return n===!0||(n=Array.isArray(n)?(a.commaSeparated?i:Ee)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(l=B(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Z.unquoted[o][s]}))),l!==n&&(e.settings.quoteSmart&&r(n,c)>r(n,e.alternative)&&(c=e.alternative),l=c+B(n,Object.assign({},e.settings.characterReferences,{subset:(c===`'`?Z.single:Z.double)[o][s],attribute:!0}))+c),u+(l&&`=`+l))}const Xe=[`<`,`&`];function $(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:B(e.value,Object.assign({},r.settings.characterReferences,{subset:Xe}))}function Ze(e,t,n,r){return r.settings.allowDangerousHtml?e.value:$(e,t,n,r)}function Qe(e,t,n,r){return r.all(e)}const $e=le(`type`,{invalid:et,unknown:tt,handlers:{comment:we,doctype:Te,element:Je,raw:Ze,root:Qe,text:$}});function et(e){throw Error("Expected node, not `"+e+"`")}function tt(e){throw Error("Cannot compile unknown node `"+e.type+"`")}const nt={},rt={},it=[];function at(e,t){let n=t||nt,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ot,all:st,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||a,characterReferences:n.characterReferences||rt,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?A:ce,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ot(e,t,n){return $e(e,t,n,this)}function st(e){let t=[],n=e&&e.children||it,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}export{at as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./escape-string-regexp.mjs";const t=(function(e){if(e==null)return o;if(typeof e==`function`)return a(e);if(typeof e==`object`)return Array.isArray(e)?n(e):r(e);if(typeof e==`string`)return i(e);throw Error(`Expected function, string, or object as test`)});function n(e){let n=[],r=-1;for(;++r<e.length;)n[r]=t(e[r]);return a(i);function i(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}function r(e){let t=e;return a(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function i(e){return a(t);function t(t){return t&&t.type===e}}function a(e){return t;function t(t,n,r){return!!(s(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function o(){return!0}function s(e){return typeof e==`object`&&!!e&&`type`in e}function c(e){return e}const l=[]
|
|
1
|
+
import{t as e}from"./escape-string-regexp.mjs";const t=(function(e){if(e==null)return o;if(typeof e==`function`)return a(e);if(typeof e==`object`)return Array.isArray(e)?n(e):r(e);if(typeof e==`string`)return i(e);throw Error(`Expected function, string, or object as test`)});function n(e){let n=[],r=-1;for(;++r<e.length;)n[r]=t(e[r]);return a(i);function i(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}function r(e){let t=e;return a(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function i(e){return a(t);function t(t){return t&&t.type===e}}function a(e){return t;function t(t,n,r){return!!(s(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function o(){return!0}function s(e){return typeof e==`object`&&!!e&&`type`in e}function c(e){return e}const l=[];function u(e,n,r,i){let a;typeof n==`function`&&typeof r!=`function`?(i=r,r=n):a=n;let o=t(a),s=i?-1:1;u(e,void 0,[])();function u(e,t,a){let f=e&&typeof e==`object`?e:{};if(typeof f.type==`string`){let t=typeof f.tagName==`string`?f.tagName:typeof f.name==`string`?f.name:void 0;Object.defineProperty(p,"name",{value:`node (`+c(e.type+(t?`<`+t+`>`:``))+`)`})}return p;function p(){let c=l,f,p,m;if((!n||o(e,t,a[a.length-1]||void 0))&&(c=d(r(e,a)),c[0]===!1))return c;if(`children`in e&&e.children){let t=e;if(t.children&&c[0]!==`skip`)for(p=(i?t.children.length:-1)+s,m=a.concat(t);p>-1&&p<t.children.length;){let e=t.children[p];if(f=u(e,p,m)(),f[0]===!1)return f;p=typeof f[1]==`number`?f[1]:p+s}}return c}}}function d(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?l:[e]}function f(e,n,r){let i=t((r||{}).ignore||[]),a=p(n),o=-1;for(;++o<a.length;)u(e,`text`,s);function s(e,t){let n=-1,r;for(;++n<t.length;){let e=t[n],a=r?r.children:void 0;if(i(e,a?a.indexOf(e):void 0,r))return;r=e}if(r)return c(e,t)}function c(e,t){let n=t[t.length-1],r=a[o][0],i=a[o][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,a={index:d.index,input:d.input,stack:[...t,e]},o=i(...d,a);if(typeof o==`string`&&(o=o.length>0?{type:`text`,value:o}:void 0),o===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function p(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([m(e[0]),h(e[1])])}return t}function m(t){return typeof t==`string`?new RegExp(e(t),`g`):t}function h(e){return typeof e==`function`?e:function(){return e}}export{u as n,t as r,f as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{n as e}from"../rolldown-runtime.mjs";import{t}from"./decode-named-character-reference.mjs";const n=m(/[A-Za-z]/),r=m(/[\dA-Za-z]/),i=m(/[#-'*+\--9=?A-Z^-~]/);function a(e){return e!==null&&(e<32||e===127)}const o=m(/\d/),s=m(/[\dA-Fa-f]/),c=m(/[!-/:-@[-`{-~]/);function l(e){return e!==null&&e<-2}function u(e){return e!==null&&(e<0||e===32)}function d(e){return e===-2||e===-1||e===32}const f=m(/\p{P}|\p{S}/u),p=m(/\s/);function m(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function h(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function g(e){if(e===null||u(e)||p(e))return 1;if(f(e))return 2}const _={};function v(e,t){let n=t||_;return y(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function y(e,t,n){if(x(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return b(e.children,t,n)}return Array.isArray(e)?b(e,t,n):``}function b(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=y(e[i],t,n);return r.join(``)}function x(e){return!!(e&&typeof e==`object`)}function S(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}const C=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function w(e){return e.replace(C,T)}function T(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){let e=r.charCodeAt(1),t=e===120||e===88;return S(r.slice(t?2:1),t?16:10)}return t(r)||e}function E(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function D(e,t){return e.length>0?(E(e,e.length,0,t),e):t}const O={}.hasOwnProperty;function k(e){let t={},n=-1;for(;++n<e.length;)A(t,e[n]);return t}function A(e,t){let n;for(n in t){let r=(O.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){O.call(r,a)||(r[a]=[]);let e=i[a];j(r[a],Array.isArray(e)?e:e?[e]:[])}}}function j(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);E(e,0,0,r)}function M(e){let t=[],n=-1,i=0,a=0;for(;++n<e.length;){let o=e.charCodeAt(n),s=``;if(o===37&&r(e.charCodeAt(n+1))&&r(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),a=1):s=`�`}else s=String.fromCharCode(o);s&&=(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+a+1,``),a&&=(n+=a,0)}return t.join(``)+e.slice(i)}function N(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const P={name:`attention`,resolveAll:F,tokenize:I};function F(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};L(d,-c),L(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=D(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=D(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=D(l,N(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=D(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=D(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,E(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function I(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=g(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=g(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function L(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const R={name:`autolink`,tokenize:z};function z(e,t,o){let s=0;return c;function c(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),l}function l(t){return n(t)?(e.consume(t),u):t===64?o(t):p(t)}function u(e){return e===43||e===45||e===46||r(e)?(s=1,d(e)):p(e)}function d(t){return t===58?(e.consume(t),s=0,f):(t===43||t===45||t===46||r(t))&&s++<32?(e.consume(t),d):(s=0,p(t))}function f(n){return n===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):n===null||n===32||n===60||a(n)?o(n):(e.consume(n),f)}function p(t){return t===64?(e.consume(t),m):i(t)?(e.consume(t),p):o(t)}function m(e){return r(e)?h(e):o(e)}function h(n){return n===46?(e.consume(n),s=0,m):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):g(n)}function g(t){if((t===45||r(t))&&s++<63){let n=t===45?g:h;return e.consume(t),n}return o(t)}}function B(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return d(r)?(e.enter(n),s(r)):t(r)}function s(r){return d(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const V={partial:!0,tokenize:H};function H(e,t,n){return r;function r(t){return d(t)?B(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||l(e)?t(e):n(e)}}const U={continuation:{tokenize:te},exit:W,name:`blockQuote`,tokenize:ee};function ee(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return d(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function te(e,t,n){let r=this;return i;function i(t){return d(t)?B(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(U,t,n)(r)}}function W(e){e.exit(`blockQuote`)}const ne={name:`characterEscape`,tokenize:re};function re(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return c(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}const G={name:`characterReference`,tokenize:ie};function ie(e,n,i){let a=this,c=0,l,u;return d;function d(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),f}function f(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),p):(e.enter(`characterReferenceValue`),l=31,u=r,m(t))}function p(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),l=6,u=s,m):(e.enter(`characterReferenceValue`),l=7,u=o,m(t))}function m(o){if(o===59&&c){let s=e.exit(`characterReferenceValue`);return u===r&&!t(a.sliceSerialize(s))?i(o):(e.enter(`characterReferenceMarker`),e.consume(o),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),n)}return u(o)&&c++<l?(e.consume(o),m):i(o)}}const ae={partial:!0,tokenize:se},K={concrete:!0,name:`codeFenced`,tokenize:oe};function oe(e,t,n){let r=this,i={partial:!0,tokenize:C},a=0,o=0,s;return c;function c(e){return u(e)}function u(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),f(t)}function f(t){return t===s?(o++,e.consume(t),f):o<3?n(t):(e.exit(`codeFencedFenceSequence`),d(t)?B(e,p,`whitespace`)(t):p(t))}function p(n){return n===null||l(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ae,_,S)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),m(n))}function m(t){return t===null||l(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),p(t)):d(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),B(e,h,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return t===null||l(t)?p(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),g(t))}function g(t){return t===null||l(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),p(t)):t===96&&t===s?n(t):(e.consume(t),g)}function _(t){return e.attempt(i,S,v)(t)}function v(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),y}function y(t){return a>0&&d(t)?B(e,b,`linePrefix`,a+1)(t):b(t)}function b(t){return t===null||l(t)?e.check(ae,_,S)(t):(e.enter(`codeFlowValue`),x(t))}function x(t){return t===null||l(t)?(e.exit(`codeFlowValue`),b(t)):(e.consume(t),x)}function S(n){return e.exit(`codeFenced`),t(n)}function C(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),d(t)?B(e,u,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):u(t)}function u(t){return t===s?(e.enter(`codeFencedFenceSequence`),f(t)):n(t)}function f(t){return t===s?(i++,e.consume(t),f):i>=o?(e.exit(`codeFencedFenceSequence`),d(t)?B(e,p,`whitespace`)(t):p(t)):n(t)}function p(r){return r===null||l(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function se(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const q={name:`codeIndented`,tokenize:le},ce={partial:!0,tokenize:ue};function le(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),B(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):l(t)?e.attempt(ce,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||l(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ue(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):l(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):B(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):l(e)?i(e):n(e)}}const de={name:`codeText`,previous:pe,resolve:fe,tokenize:me};function fe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function pe(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function me(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,d(t)):l(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),u(t))}function u(t){return t===null||t===32||t===96||l(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),u)}function d(n){return n===96?(e.consume(n),i++,d):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,u(n))}}var he=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&J(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),J(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),J(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);J(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);J(this.left,t.reverse())}}};function J(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ge(e){let t={},n=-1,r,i,a,o,s,c,l,u=new he(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_e(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return E(e,0,1/0,u.slice(0)),!l}function _e(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}const ve={resolve:be,tokenize:xe},ye={partial:!0,tokenize:Se};function be(e){return ge(e),e}function xe(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):l(t)?e.check(ye,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Se(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,a,`linePrefix`)}function a(i){if(i===null||l(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ce(e,t,n,r,i,o,s,c,d){let f=d||1/0,p=0;return m;function m(t){return t===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),h):t===null||t===32||t===41||a(t)?n(t):(e.enter(r),e.enter(s),e.enter(c),e.enter(`chunkString`,{contentType:`string`}),v(t))}function h(n){return n===62?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(c),e.enter(`chunkString`,{contentType:`string`}),g(n))}function g(t){return t===62?(e.exit(`chunkString`),e.exit(c),h(t)):t===null||t===60||l(t)?n(t):(e.consume(t),t===92?_:g)}function _(t){return t===60||t===62||t===92?(e.consume(t),g):g(t)}function v(i){return!p&&(i===null||i===41||u(i))?(e.exit(`chunkString`),e.exit(c),e.exit(s),e.exit(r),t(i)):p<f&&i===40?(e.consume(i),p++,v):i===41?(e.consume(i),p--,v):i===null||i===32||i===40||a(i)?n(i):(e.consume(i),i===92?y:v)}function y(t){return t===40||t===41||t===92?(e.consume(t),v):v(t)}}function we(e,t,n,r,i,a){let o=this,s=0,c;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),f}function f(u){return s>999||u===null||u===91||u===93&&!c||u===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(u):u===93?(e.exit(a),e.enter(i),e.consume(u),e.exit(i),e.exit(r),t):l(u)?(e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),f):(e.enter(`chunkString`,{contentType:`string`}),p(u))}function p(t){return t===null||t===91||t===93||l(t)||s++>999?(e.exit(`chunkString`),f(t)):(e.consume(t),c||=!d(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}}function Te(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),u(n))}function u(t){return t===o?(e.exit(a),c(o)):t===null?n(t):l(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,u,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),d(t))}function d(t){return t===o||t===null||l(t)?(e.exit(`chunkString`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===o||t===92?(e.consume(t),d):d(t)}}function Y(e,t){let n;return r;function r(i){return l(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):d(i)?B(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const Ee={name:`definition`,tokenize:Oe},De={partial:!0,tokenize:ke};function Oe(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return we.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=h(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return u(t)?Y(e,f)(t):f(t)}function f(t){return Ce(e,p,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function p(t){return e.attempt(De,m,m)(t)}function m(t){return d(t)?B(e,g,`whitespace`)(t):g(t)}function g(a){return a===null||l(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ke(e,t,n){return r;function r(t){return u(t)?Y(e,i)(t):n(t)}function i(t){return Te(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return d(t)?B(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||l(e)?t(e):n(e)}}const Ae={name:`hardBreakEscape`,tokenize:je};function je(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return l(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const Me={name:`headingAtx`,resolve:Ne,tokenize:Pe};function Ne(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},E(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Pe(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||u(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||l(n)?(e.exit(`atxHeading`),t(n)):d(n)?B(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),f(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function f(t){return t===null||t===35||u(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),f)}}const Fe=`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`.split(`.`),Ie=[`pre`,`script`,`style`,`textarea`],Le={concrete:!0,name:`htmlFlow`,resolveTo:Be,tokenize:Ve},Re={partial:!0,tokenize:Ue},ze={partial:!0,tokenize:He};function Be(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ve(e,t,i){let a=this,o,s,c,f,p;return m;function m(e){return h(e)}function h(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),g}function g(r){return r===33?(e.consume(r),_):r===47?(e.consume(r),s=!0,b):r===63?(e.consume(r),o=3,a.interrupt?t:V):n(r)?(e.consume(r),c=String.fromCharCode(r),x):i(r)}function _(r){return r===45?(e.consume(r),o=2,v):r===91?(e.consume(r),o=5,f=0,y):n(r)?(e.consume(r),o=4,a.interrupt?t:V):i(r)}function v(n){return n===45?(e.consume(n),a.interrupt?t:V):i(n)}function y(n){return n===`CDATA[`.charCodeAt(f++)?(e.consume(n),f===6?a.interrupt?t:N:y):i(n)}function b(t){return n(t)?(e.consume(t),c=String.fromCharCode(t),x):i(t)}function x(n){if(n===null||n===47||n===62||u(n)){let r=n===47,l=c.toLowerCase();return!r&&!s&&Ie.includes(l)?(o=1,a.interrupt?t(n):N(n)):Fe.includes(c.toLowerCase())?(o=6,r?(e.consume(n),S):a.interrupt?t(n):N(n)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(n):s?C(n):w(n))}return n===45||r(n)?(e.consume(n),c+=String.fromCharCode(n),x):i(n)}function S(n){return n===62?(e.consume(n),a.interrupt?t:N):i(n)}function C(t){return d(t)?(e.consume(t),C):j(t)}function w(t){return t===47?(e.consume(t),j):t===58||t===95||n(t)?(e.consume(t),T):d(t)?(e.consume(t),w):j(t)}function T(t){return t===45||t===46||t===58||t===95||r(t)?(e.consume(t),T):E(t)}function E(t){return t===61?(e.consume(t),D):d(t)?(e.consume(t),E):w(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?i(t):t===34||t===39?(e.consume(t),p=t,O):d(t)?(e.consume(t),D):k(t)}function O(t){return t===p?(e.consume(t),p=null,A):t===null||l(t)?i(t):(e.consume(t),O)}function k(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||u(t)?E(t):(e.consume(t),k)}function A(e){return e===47||e===62||d(e)?w(e):i(e)}function j(t){return t===62?(e.consume(t),M):i(t)}function M(t){return t===null||l(t)?N(t):d(t)?(e.consume(t),M):i(t)}function N(t){return t===45&&o===2?(e.consume(t),L):t===60&&o===1?(e.consume(t),R):t===62&&o===4?(e.consume(t),H):t===63&&o===3?(e.consume(t),V):t===93&&o===5?(e.consume(t),B):l(t)&&(o===6||o===7)?(e.exit(`htmlFlowData`),e.check(Re,U,P)(t)):t===null||l(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),N)}function P(t){return e.check(ze,F,U)(t)}function F(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),I}function I(t){return t===null||l(t)?P(t):(e.enter(`htmlFlowData`),N(t))}function L(t){return t===45?(e.consume(t),V):N(t)}function R(t){return t===47?(e.consume(t),c=``,z):N(t)}function z(t){if(t===62){let n=c.toLowerCase();return Ie.includes(n)?(e.consume(t),H):N(t)}return n(t)&&c.length<8?(e.consume(t),c+=String.fromCharCode(t),z):N(t)}function B(t){return t===93?(e.consume(t),V):N(t)}function V(t){return t===62?(e.consume(t),H):t===45&&o===2?(e.consume(t),V):N(t)}function H(t){return t===null||l(t)?(e.exit(`htmlFlowData`),U(t)):(e.consume(t),H)}function U(n){return e.exit(`htmlFlow`),t(n)}}function He(e,t,n){let r=this;return i;function i(t){return l(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Ue(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(V,t,n)}}const We={name:`htmlText`,tokenize:Ge};function Ge(e,t,i){let a=this,o,s,c;return f;function f(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),p}function p(t){return t===33?(e.consume(t),m):t===47?(e.consume(t),E):t===63?(e.consume(t),w):n(t)?(e.consume(t),k):i(t)}function m(t){return t===45?(e.consume(t),h):t===91?(e.consume(t),s=0,y):n(t)?(e.consume(t),C):i(t)}function h(t){return t===45?(e.consume(t),v):i(t)}function g(t){return t===null?i(t):t===45?(e.consume(t),_):l(t)?(c=g,R(t)):(e.consume(t),g)}function _(t){return t===45?(e.consume(t),v):g(t)}function v(e){return e===62?L(e):e===45?_(e):g(e)}function y(t){return t===`CDATA[`.charCodeAt(s++)?(e.consume(t),s===6?b:y):i(t)}function b(t){return t===null?i(t):t===93?(e.consume(t),x):l(t)?(c=b,R(t)):(e.consume(t),b)}function x(t){return t===93?(e.consume(t),S):b(t)}function S(t){return t===62?L(t):t===93?(e.consume(t),S):b(t)}function C(t){return t===null||t===62?L(t):l(t)?(c=C,R(t)):(e.consume(t),C)}function w(t){return t===null?i(t):t===63?(e.consume(t),T):l(t)?(c=w,R(t)):(e.consume(t),w)}function T(e){return e===62?L(e):w(e)}function E(t){return n(t)?(e.consume(t),D):i(t)}function D(t){return t===45||r(t)?(e.consume(t),D):O(t)}function O(t){return l(t)?(c=O,R(t)):d(t)?(e.consume(t),O):L(t)}function k(t){return t===45||r(t)?(e.consume(t),k):t===47||t===62||u(t)?A(t):i(t)}function A(t){return t===47?(e.consume(t),L):t===58||t===95||n(t)?(e.consume(t),j):l(t)?(c=A,R(t)):d(t)?(e.consume(t),A):L(t)}function j(t){return t===45||t===46||t===58||t===95||r(t)?(e.consume(t),j):M(t)}function M(t){return t===61?(e.consume(t),N):l(t)?(c=M,R(t)):d(t)?(e.consume(t),M):A(t)}function N(t){return t===null||t===60||t===61||t===62||t===96?i(t):t===34||t===39?(e.consume(t),o=t,P):l(t)?(c=N,R(t)):d(t)?(e.consume(t),N):(e.consume(t),F)}function P(t){return t===o?(e.consume(t),o=void 0,I):t===null?i(t):l(t)?(c=P,R(t)):(e.consume(t),P)}function F(t){return t===null||t===34||t===39||t===60||t===61||t===96?i(t):t===47||t===62||u(t)?A(t):(e.consume(t),F)}function I(e){return e===47||e===62||u(e)?A(e):i(e)}function L(n){return n===62?(e.consume(n),e.exit(`htmlTextData`),e.exit(`htmlText`),t):i(n)}function R(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),z}function z(t){return d(t)?B(e,V,`linePrefix`,a.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):V(t)}function V(t){return e.enter(`htmlTextData`),c(t)}}const Ke={name:`labelEnd`,resolveAll:Xe,resolveTo:Ze,tokenize:Qe},qe={tokenize:$e},Je={tokenize:et},Ye={tokenize:tt};function Xe(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&E(e,0,e.length,n),e}function Ze(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=D(s,e.slice(a+1,a+r+3)),s=D(s,[[`enter`,u,t]]),s=D(s,N(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=D(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=D(s,e.slice(o+1)),s=D(s,[[`exit`,c,t]]),E(e,a,e.length,s),e}function Qe(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(h(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(qe,u,o?u:d)(t):t===91?e.attempt(Je,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ye,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function $e(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return u(t)?Y(e,a)(t):a(t)}function a(t){return t===41?d(t):Ce(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return u(t)?Y(e,c)(t):d(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Te(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):d(t)}function l(t){return u(t)?Y(e,d)(t):d(t)}function d(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function et(e,t,n){let r=this;return i;function i(t){return we.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(h(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function tt(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}const nt={name:`labelStartImage`,resolveAll:Ke.resolveAll,tokenize:rt};function rt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const it={name:`labelStartLink`,resolveAll:Ke.resolveAll,tokenize:at};function at(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const ot={name:`lineEnding`,tokenize:st};function st(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(e,t,`linePrefix`)}}const X={name:`thematicBreak`,tokenize:ct};function ct(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||l(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),d(t)?B(e,s,`whitespace`)(t):s(t))}}const Z={continuation:{tokenize:ft},exit:mt,name:`list`,tokenize:dt},lt={partial:!0,tokenize:ht},ut={partial:!0,tokenize:pt};function dt(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,s=0;return c;function c(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:o(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(X,n,u)(t):u(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),l(t)}return n(t)}function l(t){return o(t)&&++s<10?(e.consume(t),l):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),u(t)):n(t)}function u(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(V,r.interrupt?n:f,e.attempt(lt,m,p))}function f(e){return r.containerState.initialBlankLine=!0,a++,m(e)}function p(t){return d(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),m):n(t)}function m(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ft(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(V,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!d(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ut,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(Z,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pt(e,t,n){let r=this;return B(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function mt(e){e.exit(this.containerState.type)}function ht(e,t,n){let r=this;return B(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!d(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const gt={name:`setextUnderline`,resolveTo:_t,tokenize:vt};function _t(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function vt(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),d(t)?B(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||l(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}({}).hasOwnProperty;const yt={tokenize:bt};function bt(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return l(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}const xt={tokenize:Ct},St={tokenize:wt};function Ct(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,u)(i)}return u(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}v(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return E(t.events,a+1,0,t.events.slice(n)),t.events.length=s,u(e)}return s(e)}function u(a){if(r===n.length){if(!i)return p(a);if(i.currentConstruct&&i.currentConstruct.concrete)return h(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(St,d,f)(a)}function d(e){return i&&y(),v(r),p(e)}function f(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(St,m,h)(n)}function m(e){return r++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){if(n===null){i&&y(),v(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),g(n)}function g(n){if(n===null){_(e.exit(`chunkFlow`),!0),v(0),e.consume(n);return}return l(n)?(e.consume(n),_(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),g)}function _(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(v(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;E(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function wt(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const Tt={tokenize:Et};function Et(e){let t=this,n=e.attempt(V,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ve,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const Dt={resolveAll:jt()},Ot=At(`string`),kt=At(`text`);function At(e){return{resolveAll:jt(e===`text`?Mt:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function jt(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Mt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Nt=e({attentionMarkers:()=>Vt,contentInitial:()=>Ft,disable:()=>Ht,document:()=>Pt,flow:()=>Lt,flowInitial:()=>It,insideSpan:()=>Bt,string:()=>Rt,text:()=>zt});const Pt={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:U},Ft={91:Ee},It={[-2]:q,[-1]:q,32:q},Lt={35:Me,42:X,45:[gt,X],60:Le,61:gt,95:X,96:K,126:K},Rt={38:G,92:ne},zt={[-5]:ot,[-4]:ot,[-3]:ot,33:nt,38:G,42:P,60:[R,We],91:it,92:[Ae,ne],93:Ke,95:P,96:de},Bt={null:[P,Dt]},Vt={null:[42,95]},Ht={null:[]};function Ut(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:w(S),check:w(C),consume:y,enter:b,exit:x,interrupt:w(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:h,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f},d=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function f(e){return o=D(o,e),_(),o[o.length-1]===null?(T(t,0),u.events=N(a,u.events,u),u.events):[]}function p(e,t){return Gt(m(e),t)}function m(e){return Wt(o,e)}function h(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function g(e){i[e.line]=e.column,k()}function _(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)v(t.charCodeAt(r._bufferIndex));else v(t)}}function v(e){d=d(e)}function y(e){l(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,k()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e}function b(e,t){let n=t||{};return n.type=e,n.start=h(),u.events.push([`enter`,n,u]),s.push(n),n}function x(e){let t=s.pop();return t.end=h(),u.events.push([`exit`,t,u]),t}function S(e,t){T(e,t.from)}function C(e,t){t.restore()}function w(e,t){return n;function n(n,r,i){let a,o,s,l;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return l=O(),s=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,m,h)(n)}}function m(t){return e(s,l),r}function h(e){return l.restore(),++o<a.length?p(a[o]):i}}}function T(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&E(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function O(){let e=h(),t=u.previous,n=u.currentConstruct,i=u.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=i,s=a,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Wt(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Gt(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
2
2
|
`;break;case-3:o=`\r
|
|
3
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Kt(e){let t={constructs:k([Nt,...(e||{}).extensions||[]]),content:n(yt),defined:[],document:n(xt),flow:n(Tt),lazy:{},string:n(Ot),text:n(kt)};return t;function n(e){return n;function n(n){return Ut(t,e,n)}}}function qt(e){for(;!ge(e););return e}const Jt=/[\0\t\n\r]/g;function Yt(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Jt.lastIndex=u,c=Jt.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function Q(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Zt(e.position):`start`in e||`end`in e?Zt(e):`line`in e||`column`in e?Xt(e):``}function Xt(e){return Qt(e&&e.line)+`:`+Qt(e&&e.column)}function Zt(e){return Xt(e&&e.start)+`-`+Xt(e&&e.end)}function Qt(e){return e&&typeof e==`number`?e:1}const $t={}.hasOwnProperty;function en(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),tn(n)(qt(Kt(n).document().write(Yt()(e,t,!0))))}function tn(e){let n={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(fe),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(ce),blockQuote:o(ae),characterEscape:A,characterReference:A,codeFenced:o(K),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(K,s),codeText:o(oe,s),codeTextData:A,data:A,codeFlowValue:A,definition:o(se),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(q),hardBreakEscape:o(le),hardBreakTrailing:o(le),htmlFlow:o(ue,s),htmlFlowData:A,htmlText:o(ue,s),htmlTextData:A,image:o(de),label:s,link:o(fe),listItem:o(me),listItemValue:p,listOrdered:o(pe,f),listUnordered:o(pe),paragraph:o(he),reference:ee,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ce),strong:o(J),thematicBreak:o(_e)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:ie,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:ne,characterReference:re,codeFenced:l(y),codeFencedFence:_,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:j,codeIndented:l(b),codeText:l(I),codeTextData:j,data:j,definition:l(),definitionDestinationString:T,definitionLabelString:x,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(P),htmlFlowData:j,htmlText:l(F),htmlTextData:j,image:l(R),label:B,labelText:z,lineEnding:M,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:te,resourceDestinationString:V,resourceTitleString:H,resource:U,setextHeading:l(k),setextHeadingLineSequence:O,setextHeadingText:D,strong:l(),thematicBreak:l()}};nn(n,(e||{}).mdastExtensions||[]);let r={};return i;function i(e){let t={type:`root`,children:[]},i={stack:[t],tokenStack:[],config:n,enter:c,exit:u,buffer:s,resume:d,data:r},o=[],l=-1;for(;++l<e.length;)(e[l][1].type===`listOrdered`||e[l][1].type===`listUnordered`)&&(e[l][0]===`enter`?o.push(l):l=a(e,o.pop(),l));for(l=-1;++l<e.length;){let t=n[e[l][0]];$t.call(t,e[l][1].type)&&t[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},i),e[l][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||an).call(i,void 0,e[0])}for(t.position={start:$(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<n.transforms.length;)t=n.transforms[l](t)||t;return t}function a(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:$(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||an).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+`): it’s not open`);n.position.end=$(e.end)}function d(){return v(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function x(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=h(this.sliceSerialize(e)).toLowerCase()}function C(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function T(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function E(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function A(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:$(e.start),end:void 0},t.push(n)),this.stack.push(n)}function j(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$(e.end)}function M(e){let t=this.stack[this.stack.length-1];if(this.data.atHardBreak){let n=t.children[t.children.length-1];n.position.end=$(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(t.type)&&(A.call(this,e),j.call(this,e))}function N(){this.data.atHardBreak=!0}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function L(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function R(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function z(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=w(t),n.identifier=h(t).toLowerCase()}function B(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function V(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function H(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function U(){this.data.inReference=void 0}function ee(){this.data.referenceType=`collapsed`}function te(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=h(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function W(e){this.data.characterReferenceType=e.type}function ne(e){let n=this.sliceSerialize(e),r=this.data.characterReferenceType,i;r?(i=S(n,r===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):i=t(n);let a=this.stack[this.stack.length-1];a.value+=i}function re(e){let t=this.stack.pop();t.position.end=$(e.end)}function G(e){j.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ie(e){j.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[]}}function K(){return{type:`code`,lang:null,meta:null,value:``}}function oe(){return{type:`inlineCode`,value:``}}function se(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function q(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function de(){return{type:`image`,title:null,url:``,alt:null}}function fe(){return{type:`link`,title:null,url:``,children:[]}}function pe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function me(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function he(){return{type:`paragraph`,children:[]}}function J(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function $(e){return{line:e.line,column:e.column,offset:e.offset}}function nn(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?nn(e,r):rn(e,r)}}function rn(e,t){let n;for(n in t)if($t.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function an(e,t){throw e?Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+`) is still open`)}export{d as _,N as a,E as c,h as d,n as f,u as g,l as h,B as i,v as l,a as m,Q as n,M as o,r as p,V as r,k as s,en as t,g as u,f as v,p as y};
|
|
3
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Kt(e){let t={constructs:k([Nt,...(e||{}).extensions||[]]),content:n(yt),defined:[],document:n(xt),flow:n(Tt),lazy:{},string:n(Ot),text:n(kt)};return t;function n(e){return n;function n(n){return Ut(t,e,n)}}}function qt(e){for(;!ge(e););return e}const Jt=/[\0\t\n\r]/g;function Yt(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Jt.lastIndex=u,c=Jt.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function Q(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Zt(e.position):`start`in e||`end`in e?Zt(e):`line`in e||`column`in e?Xt(e):``}function Xt(e){return Qt(e&&e.line)+`:`+Qt(e&&e.column)}function Zt(e){return Xt(e&&e.start)+`-`+Xt(e&&e.end)}function Qt(e){return e&&typeof e==`number`?e:1}const $t={}.hasOwnProperty;function en(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),tn(n)(qt(Kt(n).document().write(Yt()(e,t,!0))))}function tn(e){let n={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(fe),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(ce),blockQuote:o(ae),characterEscape:A,characterReference:A,codeFenced:o(K),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(K,s),codeText:o(oe,s),codeTextData:A,data:A,codeFlowValue:A,definition:o(se),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(q),hardBreakEscape:o(le),hardBreakTrailing:o(le),htmlFlow:o(ue,s),htmlFlowData:A,htmlText:o(ue,s),htmlTextData:A,image:o(de),label:s,link:o(fe),listItem:o(me),listItemValue:p,listOrdered:o(pe,f),listUnordered:o(pe),paragraph:o(he),reference:ee,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ce),strong:o(J),thematicBreak:o(_e)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:ie,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:ne,characterReference:re,codeFenced:l(y),codeFencedFence:_,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:j,codeIndented:l(b),codeText:l(I),codeTextData:j,data:j,definition:l(),definitionDestinationString:T,definitionLabelString:x,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(P),htmlFlowData:j,htmlText:l(F),htmlTextData:j,image:l(R),label:B,labelText:z,lineEnding:M,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:te,resourceDestinationString:V,resourceTitleString:H,resource:U,setextHeading:l(k),setextHeadingLineSequence:O,setextHeadingText:D,strong:l(),thematicBreak:l()}};nn(n,(e||{}).mdastExtensions||[]);let r={};return i;function i(e){let t={type:`root`,children:[]},i={stack:[t],tokenStack:[],config:n,enter:c,exit:u,buffer:s,resume:d,data:r},o=[],l=-1;for(;++l<e.length;)(e[l][1].type===`listOrdered`||e[l][1].type===`listUnordered`)&&(e[l][0]===`enter`?o.push(l):l=a(e,o.pop(),l));for(l=-1;++l<e.length;){let t=n[e[l][0]];$t.call(t,e[l][1].type)&&t[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},i),e[l][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||an).call(i,void 0,e[0])}for(t.position={start:$(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<n.transforms.length;)t=n.transforms[l](t)||t;return t}function a(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:$(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||an).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+`): it’s not open`);n.position.end=$(e.end)}function d(){return v(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function x(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=h(this.sliceSerialize(e)).toLowerCase()}function C(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function T(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function E(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function A(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:$(e.start),end:void 0},t.push(n)),this.stack.push(n)}function j(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$(e.end)}function M(e){let t=this.stack[this.stack.length-1];if(this.data.atHardBreak){let n=t.children[t.children.length-1];n.position.end=$(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(t.type)&&(A.call(this,e),j.call(this,e))}function N(){this.data.atHardBreak=!0}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function L(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function R(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function z(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=w(t),n.identifier=h(t).toLowerCase()}function B(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function V(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function H(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function U(){this.data.inReference=void 0}function ee(){this.data.referenceType=`collapsed`}function te(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=h(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function W(e){this.data.characterReferenceType=e.type}function ne(e){let n=this.sliceSerialize(e),r=this.data.characterReferenceType,i;r?(i=S(n,r===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):i=t(n);let a=this.stack[this.stack.length-1];a.value+=i}function re(e){let t=this.stack.pop();t.position.end=$(e.end)}function G(e){j.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ie(e){j.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[]}}function K(){return{type:`code`,lang:null,meta:null,value:``}}function oe(){return{type:`inlineCode`,value:``}}function se(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function q(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function de(){return{type:`image`,title:null,url:``,alt:null}}function fe(){return{type:`link`,title:null,url:``,children:[]}}function pe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function me(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function he(){return{type:`paragraph`,children:[]}}function J(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function $(e){return{line:e.line,column:e.column,offset:e.offset}}function nn(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?nn(e,r):rn(e,r)}}function rn(e,t){let n;for(n in t)if($t.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function an(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+`) is still open`)}export{d as _,N as a,E as c,h as d,n as f,u as g,l as h,B as i,v as l,a as m,Q as n,M as o,r as p,V as r,k as s,en as t,g as u,f as v,p as y};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{t as e}from"./ccount.mjs";import"./devlop.mjs";import{d as t,l as n,u as r,v as i,y as a}from"./mdast-util-from-markdown.mjs";import{
|
|
2
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?b:
|
|
3
|
-
`&&
|
|
4
|
-
`}function
|
|
5
|
-
`,encode:["`"],...s.current()})),t()}return
|
|
6
|
-
`),a&&(
|
|
7
|
-
`)),
|
|
8
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
1
|
+
import"./hast-util-to-html.mjs";import{t as e}from"./ccount.mjs";import"./devlop.mjs";import{d as t,l as n,u as r,v as i,y as a}from"./mdast-util-from-markdown.mjs";import{n as o,r as s,t as c}from"./mdast-util-find-and-replace.mjs";import{t as l}from"./markdown-table.mjs";import{t as u}from"./longest-streak.mjs";const d=`phrasing`,f=[`autolink`,`link`,`image`,`label`];function p(){return{transforms:[re],enter:{literalAutolink:te,literalAutolinkEmail:m,literalAutolinkHttp:m,literalAutolinkWww:m},exit:{literalAutolink:_,literalAutolinkEmail:g,literalAutolinkHttp:ne,literalAutolinkWww:h}}}function ee(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:d,notInConstruct:f},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:d,notInConstruct:f},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:d,notInConstruct:f}]}}function te(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function m(e){this.config.enter.autolinkProtocol.call(this,e)}function ne(e){this.config.exit.autolinkProtocol.call(this,e)}function h(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function g(e){this.config.exit.autolinkEmail.call(this,e)}function _(e){this.exit(e)}function re(e){c(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ie],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ae]],{ignore:[`link`,`linkReference`]})}function ie(e,t,n,r,i){let a=``;if(!v(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!oe(n)))return!1;let o=se(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ae(e,t,n,r){return!v(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function oe(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function se(t){let n=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!n)return[t,void 0];t=t.slice(0,n.index);let r=n[0],i=r.indexOf(`)`),a=e(t,`(`),o=e(t,`)`);for(;i!==-1&&a>o;)t+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(`)`),o++;return[t,r]}function v(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||a(n)||i(n))&&(!t||n!==47)}y.peek=ge;function ce(){this.buffer()}function le(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ue(){this.buffer()}function de(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function fe(e){let n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=t(this.sliceSerialize(e)).toLowerCase(),r.label=n}function pe(e){this.exit(e)}function me(e){let n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=t(this.sliceSerialize(e)).toLowerCase(),r.label=n}function he(e){this.exit(e)}function ge(){return`[`}function y(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function _e(){return{enter:{gfmFootnoteCallString:ce,gfmFootnoteCall:le,gfmFootnoteDefinitionLabelString:ue,gfmFootnoteDefinition:de},exit:{gfmFootnoteCallString:fe,gfmFootnoteCall:pe,gfmFootnoteDefinitionLabelString:me,gfmFootnoteDefinition:he}}}function ve(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:y},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
2
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?b:ye))),s(),o}}function ye(e,t,n){return t===0?e:b(e,t,n)}function b(e,t,n){return(n?``:` `)+e}const be=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];T.peek=E;function x(){return{canContainEols:[`delete`],enter:{strikethrough:C},exit:{strikethrough:w}}}function S(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:be}],handlers:{delete:T}}}function C(e){this.enter({type:`delete`,children:[]},e)}function w(e){this.exit(e)}function T(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function E(){return`~`}({}).hasOwnProperty;function D(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),O);return i(),o}function O(e,t,n){return`>`+(n?``:` `)+e}function k(e,t){return A(e,t.inConstruct,!0)&&!A(e,t.notInConstruct,!1)}function A(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function j(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
3
|
+
`&&k(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
4
|
+
`}function M(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function N(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xe(e,t,n,r){let i=N(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(M(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Se);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(u(a,i)+1,3)),l=n.enter(`codeFenced`),d=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);d+=s.move(n.safe(e.lang,{before:d,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);d+=s.move(` `),d+=s.move(n.safe(e.meta,{before:d,after:`
|
|
5
|
+
`,encode:["`"],...s.current()})),t()}return d+=s.move(`
|
|
6
|
+
`),a&&(d+=s.move(a+`
|
|
7
|
+
`)),d+=s.move(c),l(),d}function Se(e,t,n){return(n?``:` `)+e}function P(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ce(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
8
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function we(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function F(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function I(e,t,n){let i=r(e),a=r(t);return i===void 0?a===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}L.peek=Te;function L(e,t,n,r){let i=we(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=I(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=F(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=I(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+F(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Te(e,t,n){return n.options.emphasis||`*`}function R(e,t,n,r){let i,a,s;typeof t==`function`&&typeof n!=`function`?(a=void 0,s=t,i=n):(a=t,s=n,i=r),o(e,a,c,i);function c(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)}}function Ee(e,t){let r=!1;return R(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return r=!0,!1}),!!((!e.depth||e.depth<3)&&n(e)&&(t.options.setext||r))}function De(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ee(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
9
9
|
`,after:`
|
|
10
10
|
`});return r(),t(),o+`
|
|
11
11
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
12
12
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
13
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=F(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}z.peek=
|
|
14
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return
|
|
15
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function
|
|
13
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=F(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}z.peek=Oe;function z(e){return e.value||``}function Oe(){return`<`}B.peek=ke;function B(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function ke(){return`!`}V.peek=Ae;function V(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ae(){return`!`}H.peek=je;function H(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function je(){return"`"}function U(e,t){let r=n(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(r===e.url||`mailto:`+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}W.peek=Me;function W(e,t,n,r){let i=P(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(U(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Me(e,t,n){return U(e,n)?`<`:`[`}G.peek=Ne;function G(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ne(){return`[`}function K(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pe(e){let t=K(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fe(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function q(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ie(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fe(n):K(n),s=e.ordered?o===`.`?`)`:`.`:Pe(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),q(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Le(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Re(e,t,n,r){let i=Le(n),a=n.bulletCurrent||K(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function ze(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const Be=s([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Ve(e,t,n,r){return(e.children.some(function(e){return Be(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function He(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}J.peek=Ue;function J(e,t,n,r){let i=He(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=I(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=F(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=I(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+F(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ue(e,t,n){return n.options.strong||`*`}function We(e,t,n,r){return n.safe(e.value,r)}function Ge(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ke(e,t,n){let r=(q(n)+(n.options.ruleSpaces?` `:``)).repeat(Ge(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Y={blockquote:D,break:j,code:xe,definition:Ce,emphasis:L,hardBreak:j,heading:De,html:z,image:B,imageReference:V,inlineCode:H,link:W,linkReference:G,list:Ie,listItem:Re,paragraph:ze,root:Ve,strong:J,text:We,thematicBreak:Ke};function qe(){return{enter:{table:Je,tableData:Z,tableHeader:Z,tableRow:Xe},exit:{codeText:Ze,table:Ye,tableData:X,tableHeader:X,tableRow:X}}}function Je(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Ye(e){this.exit(e),this.data.inTable=void 0}function Xe(e){this.enter({type:`tableRow`,children:[]},e)}function X(e){this.exit(e)}function Z(e){this.enter({type:`tableCell`,children:[]},e)}function Ze(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qe));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qe(e,t){return t===`|`?t:e}function Q(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
14
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return u(d(e,n,r),e.align)}function s(e,t,n,r){let i=u([f(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
15
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function u(e,t){return l(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=f(r[i],t,n);return o(),a}function f(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function p(e,t,n){let r=Y.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function $e(){return{exit:{taskListCheckValueChecked:$,taskListCheckValueUnchecked:$,paragraph:tt}}}function et(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nt}}}function $(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tt(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nt(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Y.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rt(){return[p(),_e(),x(),qe(),$e()]}function it(e){return{extensions:[ee(),ve(e),S(),Q(e),et()]}}export{it as n,R as r,rt as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.
|
|
1
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/default-map.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* Mnemonist DefaultMap Typings
|
|
4
4
|
* =============================
|
|
@@ -22,7 +22,7 @@ declare class DefaultMap<K, V> implements Iterable<[K, V]> {
|
|
|
22
22
|
static autoIncrement(): number;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.
|
|
25
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/default-weak-map.d.ts
|
|
26
26
|
/**
|
|
27
27
|
* Mnemonist DefaultWeakMap Typings
|
|
28
28
|
* ================================
|
|
@@ -39,7 +39,7 @@ declare class DefaultWeakMap<K extends object, V> {
|
|
|
39
39
|
inspect(): any;
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.
|
|
42
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/linked-list.d.ts
|
|
43
43
|
/**
|
|
44
44
|
* Mnemonist LinkedList Typings
|
|
45
45
|
* =============================
|
|
@@ -68,34 +68,7 @@ declare class LinkedList<T> implements Iterable<T> {
|
|
|
68
68
|
}): LinkedList<I>;
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.
|
|
72
|
-
/**
|
|
73
|
-
* Mnemonist Queue Typings
|
|
74
|
-
* ========================
|
|
75
|
-
*/
|
|
76
|
-
declare class Queue<T> implements Iterable<T> {
|
|
77
|
-
// Members
|
|
78
|
-
size: number; // Constructor
|
|
79
|
-
constructor(); // Methods
|
|
80
|
-
clear(): void;
|
|
81
|
-
enqueue(item: T): number;
|
|
82
|
-
dequeue(): T | undefined;
|
|
83
|
-
peek(): T | undefined;
|
|
84
|
-
forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
|
|
85
|
-
toArray(): Array<T>;
|
|
86
|
-
values(): IterableIterator<T>;
|
|
87
|
-
entries(): IterableIterator<[number, T]>;
|
|
88
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
89
|
-
toString(): string;
|
|
90
|
-
toJSON(): Array<T>;
|
|
91
|
-
inspect(): any; // Statics
|
|
92
|
-
static from<I>(iterable: Iterable<I> | {
|
|
93
|
-
[key: string]: I;
|
|
94
|
-
}): Queue<I>;
|
|
95
|
-
static of<I>(...items: Array<I>): Queue<I>;
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/multi-map.d.ts
|
|
71
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/multi-map.d.ts
|
|
99
72
|
/**
|
|
100
73
|
* Mnemonist MultiMap Typings
|
|
101
74
|
* ===========================
|
|
@@ -134,7 +107,34 @@ interface MultiMapConstructor {
|
|
|
134
107
|
}
|
|
135
108
|
declare const MultiMap: MultiMapConstructor;
|
|
136
109
|
//#endregion
|
|
137
|
-
//#region ../../node_modules/.pnpm/mnemonist@0.40.
|
|
110
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/queue.d.ts
|
|
111
|
+
/**
|
|
112
|
+
* Mnemonist Queue Typings
|
|
113
|
+
* ========================
|
|
114
|
+
*/
|
|
115
|
+
declare class Queue<T> implements Iterable<T> {
|
|
116
|
+
// Members
|
|
117
|
+
size: number; // Constructor
|
|
118
|
+
constructor(); // Methods
|
|
119
|
+
clear(): void;
|
|
120
|
+
enqueue(item: T): number;
|
|
121
|
+
dequeue(): T | undefined;
|
|
122
|
+
peek(): T | undefined;
|
|
123
|
+
forEach(callback: (item: T, index: number, queue: this) => void, scope?: any): void;
|
|
124
|
+
toArray(): Array<T>;
|
|
125
|
+
values(): IterableIterator<T>;
|
|
126
|
+
entries(): IterableIterator<[number, T]>;
|
|
127
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
128
|
+
toString(): string;
|
|
129
|
+
toJSON(): Array<T>;
|
|
130
|
+
inspect(): any; // Statics
|
|
131
|
+
static from<I>(iterable: Iterable<I> | {
|
|
132
|
+
[key: string]: I;
|
|
133
|
+
}): Queue<I>;
|
|
134
|
+
static of<I>(...items: Array<I>): Queue<I>;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region ../../node_modules/.pnpm/mnemonist@0.40.3/node_modules/mnemonist/stack.d.ts
|
|
138
138
|
/**
|
|
139
139
|
* Mnemonist Stack Typings
|
|
140
140
|
* ========================
|
|
@@ -161,4 +161,4 @@ declare class Stack<T> implements Iterable<T> {
|
|
|
161
161
|
static of<I>(...items: Array<I>): Stack<I>;
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
|
-
export { DefaultWeakMap as a, LinkedList as i,
|
|
164
|
+
export { DefaultWeakMap as a, LinkedList as i, Queue as n, DefaultMap as o, MultiMap as r, Stack as t };
|