diff --git a/customize.dist/src/less2/include/markdown.less b/customize.dist/src/less2/include/markdown.less index 7a8fc0ddf..b07fc9477 100644 --- a/customize.dist/src/less2/include/markdown.less +++ b/customize.dist/src/less2/include/markdown.less @@ -93,7 +93,13 @@ border: 1px solid #BBB; } - pre.mermaid { + pre.markmap { + border: 1px solid #ddd; + svg { + height: 400px; + } + } + pre[data-plugin] { svg { max-width: 100%; cursor: pointer; diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index c407c8523..e8282f6e8 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -150,6 +150,16 @@ overflow: unset; margin-bottom: 0; } + pre.markmap { + margin-bottom: 0; + max-height: 100%; + overflow: hidden; + display: flex; + flex-flow: column; + svg { + flex: 1; + } + } .cp-spinner { border-color: @colortheme_logo-1; border-top-color: transparent; diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index 3f53c1c64..e25be2c9d 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -2,7 +2,6 @@ define([ 'jquery', '/api/config', '/bower_components/marked/marked.min.js', - '/bower_components/MathJax/es5/tex-svg.js', '/common/common-hash.js', '/common/common-util.js', '/common/hyperscript.js', @@ -10,14 +9,17 @@ define([ '/common/media-tag.js', '/common/highlight/highlight.pack.js', '/customize/messages.js', - '/code/markmap/markmap-lib.transform.bundle.js', - '/code/markmap/markmap-lib.view.bundle.js', + '/lib/markmap/transform.min.js', + '/lib/markmap/view.min.js', + '/bower_components/MathJax/es5/tex-svg.js', '/bower_components/diff-dom/diffDOM.js', '/bower_components/tweetnacl/nacl-fast.min.js', 'css!/common/highlight/styles/github.css' -],function ($, ApiConfig, Marked, MathJax, Hash, Util, h, MT, MediaTag, Highlight, Messages, transform, Markmap) { +],function ($, ApiConfig, Marked, Hash, Util, h, MT, MediaTag, Highlight, Messages, + MarkMapTransform, Markmap) { var DiffMd = {}; + var MathJax = window.MathJax; var DiffDOM = window.diffDOM; var renderer = new Marked.Renderer(); var restrictedRenderer = new Marked.Renderer(); @@ -26,9 +28,6 @@ define([ init: function () {} }; - - var MathJax = window.MathJax; - var mermaidThemeCSS = //".node rect { fill: #DDD; stroke: #AAA; } " + "rect.task, rect.task0, rect.task2 { stroke-width: 1 !important; rx: 0 !important; } " + "g.grid g.tick line { opacity: 0.25; }" + @@ -100,15 +99,10 @@ define([ var defaultCode = renderer.code; renderer.code = function (code, language) { if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) { - return '
'+Util.fixHTML(code)+'
'; - } else if (language === 'markdown markmap') { - return '
'+Util.fixHTML(code)+'
'; - /* - var data = transform.transform(code); - var svgEl = document.createElement("svg"); - return '
'+ svgEl.outerHTML +'
'; - */ - } else if (language === 'mathjax') { + return '
'+Util.fixHTML(code)+'
'; + } else if (language === 'markmap') { + return '
'+Util.fixHTML(code)+'
'; + } else if (language === 'mathjax') { var svg = MathJax.tex2svg(code, {display: true}) return '
'+ svg.innerHTML.replace(/xlink:href/g, "href") +'
'; } else { @@ -313,6 +307,8 @@ define([ return patch; }; + var plugins = {}; + var removeMermaidClickables = function ($el) { // find all links in the tree and do the following for each one $el.find('a').each(function (index, a) { @@ -329,24 +325,74 @@ define([ // finally, find all 'clickable' items and remove the class $el.find('.clickable').removeClass('clickable'); }; - var renderMermaid = function ($el) { - Mermaid.init(undefined, $el); - // clickable elements in mermaid don't work well with our sandboxing setup - // the function below strips clickable elements but still leaves behind some artifacts - // tippy tooltips might still be useful, so they're not removed. It would be - // preferable to just support links, but this covers up a rough edge in the meantime - removeMermaidClickables($el); + + plugins.mermaid = { + name: 'mermaid', + attr: 'mermaid-source', + render: function ($el) { + Mermaid.init(undefined, $el); + // clickable elements in mermaid don't work well with our sandboxing setup + // the function below strips clickable elements but still leaves behind some artifacts + // tippy tooltips might still be useful, so they're not removed. It would be + // preferable to just support links, but this covers up a rough edge in the meantime + removeMermaidClickables($el); + } }; - var renderMarkmap = function ($el) { - var data = transform.transform($el[0].getAttribute("markmap-source")); - $el[0].innerHTML = "" - Markmap.markmap($el[0].firstChild, data) - removeMermaidClickables($el); - } + var sfCommon; + var fixMathjaxClickables = function ($svg) { + // find all links in the tree and do the following for each one + var onClick = function (e) { + e.preventDefault(); + e.stopImmediatePropagation(); + var $el = $(e.target); + // Open links only from the preview modal + if (!sfCommon) { return void console.error('No sfCommon'); } + + var href = $el.attr('href'); + if (!href || !/^(https?:\/\/|\/)/.test(href)) { return; } + + if (/^http/.test(href)) { + sfCommon.openUnsafeURL(href); + return; + } + sfCommon.openURL(href); + }; + $svg.find('a').click(onClick); + // make sure the links added later by collapsing/expading the map are also safe + var observer = new MutationObserver(function(mutations) { + mutations.forEach(function(mutation) { + if (mutation.type === 'childList') { + var n, $a; + for (var i = 0; i < mutation.addedNodes.length; i++) { + n = mutation.addedNodes[i]; + if (n.nodeName === "A") { return void n.addEventListener('click', onClick); } + $(n).find('a').click(onClick); + } + } + }); + }); + observer.observe($svg[0], { + childList: true, + subtree: true + }); + }; + + plugins.markmap = { + name: 'markmap', + attr: 'markmap-source', + render: function ($el) { + var data = MarkMapTransform.transform($el[0].getAttribute("markmap-source")); + $el[0].innerHTML = "" + Markmap.markmap($el[0].firstChild, data) + fixMathjaxClickables($el); + } + }; DiffMd.apply = function (newHtml, $content, common) { + if (!sfCommon) { sfCommon = common; } + var contextMenu = common.importMediaTagMenu(); var id = $content.attr('id'); if (!id) { throw new Error("The element must have a valid id"); } @@ -366,10 +412,10 @@ define([ var Dom = domFromHTML($('
').append($div).html()); $content[0].normalize(); - var mermaid_source = []; - var mermaid_cache = {}; - var markmap_source = []; - var markmap_cache = {}; + Object.keys(plugins).forEach(function (id) { + plugins[id].source = []; + plugins[id].cache = {}; + }); var canonicalizeMermaidSource = function (src) { // ignore changes to empty lines, since that won't affect @@ -377,21 +423,15 @@ define([ return src.replace(/\n[ \t]*\n*[ \t]*\n/g, '\n'); }; - // iterate over the unrendered mermaid inputs, caching their source as you go - $(newDomFixed).find('pre.mermaid').each(function (index, el) { + // iterate over the unrendered mermaid and markmap inputs, + // caching their source as you go + $(newDomFixed).find('pre[data-plugin]').each(function (index, el) { if (el.childNodes.length === 1 && el.childNodes[0].nodeType === 3) { + var plugin = plugins[el.getAttribute('data-plugin')]; + if (!plugin) { return; } var src = canonicalizeMermaidSource(el.childNodes[0].wholeText); - el.setAttribute('mermaid-source', src); - mermaid_source[index] = src; - } - }); - - // iterate over the unrendered mermaid inputs, caching their source as you go - $(newDomFixed).find('pre.markmap').each(function (index, el) { - if (el.childNodes.length === 1 && el.childNodes[0].nodeType === 3) { - var src = canonicalizeMermaidSource(el.childNodes[0].wholeText); - el.setAttribute('markmap-source', src); - markmap_source[index] = src; + el.setAttribute(plugin.attr, src); + plugin.source[index] = src; } }); @@ -399,43 +439,21 @@ define([ var $parent = $content.parent(); var scrollTop = $parent.scrollTop(); // iterate over rendered mermaid charts - $content.find('pre.mermaid:not([processed="true"])').each(function (index, el) { - // retrieve the attached source code which it was drawn - var src = el.getAttribute('mermaid-source'); + $content.find('pre[data-plugin]:not([processed="true"])').each(function (index, el) { + var plugin = plugins[el.getAttribute('data-plugin')]; + if (!plugin) { return; } -/* The new source might have syntax errors that will prevent rendering. - It might be preferable to keep the existing state instead of removing it - if you don't have something better to display. Ideally we should display - the cause of the syntax error so that the user knows what to correct. */ - //if (!Mermaid.parse(src)) { } // TODO - - // check if that source exists in the set of charts which are about to be rendered - if (mermaid_source.indexOf(src) === -1) { - // if it's not, then you can remove it - if (el.parentNode && el.parentNode.children.length) { - el.parentNode.removeChild(el); - } - } else if (el.childNodes.length === 1 && el.childNodes[0].nodeType !== 3) { - // otherwise, confirm that the content of the rendered chart is not a text node - // and keep a copy of it - mermaid_cache[src] = el.childNodes[0]; - } - }); - - - // iterate over rendered markmap charts - $content.find('pre.markmap:not([processed="true"])').each(function (index, el) { // retrieve the attached source code which it was drawn - var src = el.getAttribute('markmap-source'); + var src = el.getAttribute(plugin.attr); /* The new source might have syntax errors that will prevent rendering. It might be preferable to keep the existing state instead of removing it if you don't have something better to display. Ideally we should display the cause of the syntax error so that the user knows what to correct. */ - //if (!Mermaid.parse(src)) { } // TODO + //if (plugin.name === "mermaid" && !Mermaid.parse(src)) { } // TODO // check if that source exists in the set of charts which are about to be rendered - if (markmap_source.indexOf(src) === -1) { + if (plugin.source.indexOf(src) === -1) { // if it's not, then you can remove it if (el.parentNode && el.parentNode.children.length) { el.parentNode.removeChild(el); @@ -443,47 +461,29 @@ define([ } else if (el.childNodes.length === 1 && el.childNodes[0].nodeType !== 3) { // otherwise, confirm that the content of the rendered chart is not a text node // and keep a copy of it - markmap_cache[src] = el.childNodes[0]; + plugin.cache[src] = el.childNodes[0]; } }); - var oldDom = domFromHTML($content[0].outerHTML); var onPreview = function ($mt) { return function () { - var isSvg = $mt.is('pre.mermaid') || $mt.is('pre.markmap'); var mts = []; - $content.find('media-tag, pre.mermaid').each(function (i, el) { + // Get all previewable elements from the doc + $content.find('media-tag, pre[data-plugin]').each(function (i, el) { if (el.nodeName.toLowerCase() === "pre") { var clone = el.cloneNode(); - return void mts.push({ - svg: clone, - render: function () { - var $el = $(clone); - $el.text(clone.getAttribute('mermaid-source')); - $el.attr('data-processed', ''); - renderMermaid($el); - } - }); - } - var $el = $(el); - mts.push({ - src: $el.attr('src'), - key: $el.attr('data-crypto-key') - }); - }); + var plugin = plugins[el.getAttribute('data-plugin')]; + if (!plugin) { return; } - $content.find('media-tag, pre.markmap').each(function (i, el) { - if (el.nodeName.toLowerCase() === "pre") { - var clone = el.cloneNode(); return void mts.push({ svg: clone, render: function () { var $el = $(clone); - $el.text(clone.getAttribute('markmap-source')); + $el.text(clone.getAttribute(plugin.attr)); $el.attr('data-processed', ''); - renderMermaid($el); + plugin.render($el); } }); } @@ -494,44 +494,36 @@ define([ }); }); - // Find initial position + + // If the element is a mermaid or markmap svg, get the corresponding attribute + var isSvg = $mt.is('pre[data-plugin]'); + var plugin = isSvg && plugins[$mt.attr('data-plugin')]; + console.log(plugin); + + // Get initial idx var idx = -1; mts.some(function (obj, i) { - if (isSvg && $mt.attr('mermaid-source') === $(obj.svg).attr('mermaid-source')) { + if (isSvg && $mt.attr(plugin.attr) === $(obj.svg).attr(plugin.attr)) { idx = i; return true; } - if (isSvg && $mt.attr('markmap-source') === $(obj.svg).attr('markmap-source')) { - idx = i; - return true; - } if (!isSvg && obj.src === $mt.attr('src')) { idx = i; return true; } }); + // Not found, re-render if (idx === -1) { - if (isSvg && $mt.attr('mermaid-source')) { - var clone = $mt[0].cloneNode(); - mts.unshift({ - svg: clone, - render: function () { - var $el = $(clone); - $el.text(clone.getAttribute('mermaid-source')); - $el.attr('data-processed', ''); - renderMermaid($el); - } - }); - } else if (isSvg && $mt.attr('markmap-source')) { + if (isSvg && $mt.attr(plugin.attr)) { var clone = $mt[0].cloneNode(); mts.unshift({ svg: clone, render: function () { var $el = $(clone); - $el.text(clone.getAttribute('markmap-source')); + $el.text(clone.getAttribute(plugin.attr)); $el.attr('data-processed', ''); - renderMarkmap($el); + plugin.render($el); } }); } else { @@ -608,47 +600,9 @@ define([ }); // loop over mermaid elements in the rendered content - $content.find('pre.mermaid').each(function (index, el) { - var $el = $(el); - $el.off('contextmenu').on('contextmenu', function (e) { - e.preventDefault(); - $(contextMenu.menu).data('mediatag', $el); - $(contextMenu.menu).find('li:not(.cp-svg)').hide(); - contextMenu.show(e); - }); - $el.off('dblclick click preview'); - $el.on('preview', onPreview($el)); - $el.on('dblclick click', function () { - $el.trigger('preview'); - }); - - // since you've simply drawn the content that was supplied via markdown - // you can assume that the index of your rendered charts matches that - // of those in the markdown source. - var src = mermaid_source[index]; - el.setAttribute('mermaid-source', src); - var cached = mermaid_cache[src]; - - // check if you had cached a pre-rendered instance of the supplied source - if (typeof(cached) !== 'object') { - try { - renderMermaid($el); - } catch (e) { console.error(e); } - return; - } - - // if there's a cached rendering, empty out the contained source code - // which would otherwise be drawn again. - // apparently this is the fastest way to empty out an element - while (el.firstChild) { el.removeChild(el.firstChild); } //el.innerHTML = ''; - // insert the cached graph - el.appendChild(cached); - // and set a flag indicating that this graph need not be reprocessed - el.setAttribute('data-processed', true); - }); - - // loop over markmap elements in the rendered content - $content.find('pre.markmap').each(function (index, el) { + $content.find('pre[data-plugin]').each(function (index, el) { + var plugin = plugins[el.getAttribute('data-plugin')]; + if (!plugin) { return; } var $el = $(el); $el.off('contextmenu').on('contextmenu', function (e) { e.preventDefault(); @@ -665,14 +619,14 @@ define([ // since you've simply drawn the content that was supplied via markdown // you can assume that the index of your rendered charts matches that // of those in the markdown source. - var src = markmap_source[index]; - el.setAttribute('markmap-source', src); - var cached = markmap_cache[src]; + var src = plugin.source[index]; + el.setAttribute(plugin.attr, src); + var cached = plugin.cache[src]; // check if you had cached a pre-rendered instance of the supplied source if (typeof(cached) !== 'object') { try { - renderMarkmap($el); + plugin.render($el); } catch (e) { console.error(e); } return; } @@ -686,10 +640,6 @@ define([ // and set a flag indicating that this graph need not be reprocessed el.setAttribute('data-processed', true); }); - - - - } // recover the previous scroll position to avoid jank $parent.scrollTop(scrollTop); diff --git a/www/common/inner/common-mediatag.js b/www/common/inner/common-mediatag.js index 9009d2557..0fc35c1c3 100644 --- a/www/common/inner/common-mediatag.js +++ b/www/common/inner/common-mediatag.js @@ -256,7 +256,7 @@ define([ } // Reset modal - $inner.find('media-tag, pre.mermaid').detach(); + $inner.find('media-tag, pre[data-plugin]').detach(); $spinner.show(); // Check src and cryptkey diff --git a/www/lib/markmap/transform.min.js b/www/lib/markmap/transform.min.js new file mode 100644 index 000000000..dea3b437b --- /dev/null +++ b/www/lib/markmap/transform.min.js @@ -0,0 +1,2 @@ +/*! markmap-lib v0.7.11 | MIT License */ +define(["exports"],(function(e){"use strict";var r={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},t=Object.prototype.hasOwnProperty;function n(e){return o=e,(n=r)&&t.call(n,o)?r[e]:e;var n,o}var o=Object.prototype.hasOwnProperty;function s(e){var r=[].slice.call(arguments,1);return r.forEach((function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach((function(t){e[t]=r[t]}))}})),e}var i=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function l(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")}function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){var r=55296+((e-=65536)>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}var p=/&([a-z#][a-z0-9]{1,31});/gi,u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function h(e,r){var t=0,o=n(r);return r!==o?o:35===r.charCodeAt(0)&&u.test(r)&&a(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10))?c(t):e}function f(e){return e.indexOf("&")<0?e:e.replace(p,h)}var d=/[&<>"]/,g=/[&<>"]/g,b={"&":"&","<":"<",">":">",'"':"""};function v(e){return b[e]}function m(e){return d.test(e)?e.replace(g,v):e}var k={};k.blockquote_open=function(){return"
\n"},k.blockquote_close=function(e,r){return"
"+y(e,r)},k.code=function(e,r){return e[r].block?"
"+m(e[r].content)+"
"+y(e,r):""+m(e[r].content)+""},k.fence=function(e,r,t,n,s){var i,a,c,p,u=e[r],h="",d=t.langPrefix;if(u.params){if(a=(i=u.params.split(/\s+/g)).join(" "),c=s.rules.fence_custom,p=i[0],c&&o.call(c,p))return s.rules.fence_custom[i[0]](e,r,t,n,s);h=' class="'+d+m(f(l(a)))+'"'}return"
"+(t.highlight&&t.highlight.apply(t.highlight,[u.content].concat(i))||m(u.content))+"
"+y(e,r)},k.fence_custom={},k.heading_open=function(e,r){return""},k.heading_close=function(e,r){return"\n"},k.hr=function(e,r,t){return(t.xhtmlOut?"
":"
")+y(e,r)},k.bullet_list_open=function(){return""+y(e,r)},k.list_item_open=function(){return"
  • "},k.list_item_close=function(){return"
  • \n"},k.ordered_list_open=function(e,r){var t=e[r];return"1?' start="'+t.order+'"':"")+">\n"},k.ordered_list_close=function(e,r){return""+y(e,r)},k.paragraph_open=function(e,r){return e[r].tight?"":"

    "},k.paragraph_close=function(e,r){var t=!(e[r].tight&&r&&"inline"===e[r-1].type&&!e[r-1].content);return(e[r].tight?"":"

    ")+(t?y(e,r):"")},k.link_open=function(e,r,t){var n=e[r].title?' title="'+m(f(e[r].title))+'"':"",o=t.linkTarget?' target="'+t.linkTarget+'"':"";return'"},k.link_close=function(){return""},k.image=function(e,r,t){var n=' src="'+m(e[r].src)+'"',o=e[r].title?' title="'+m(f(e[r].title))+'"':"";return""},k.table_open=function(){return"\n"},k.table_close=function(){return"
    \n"},k.thead_open=function(){return"\n"},k.thead_close=function(){return"\n"},k.tbody_open=function(){return"\n"},k.tbody_close=function(){return"\n"},k.tr_open=function(){return""},k.tr_close=function(){return"\n"},k.th_open=function(e,r){var t=e[r];return""},k.th_close=function(){return""},k.td_open=function(e,r){var t=e[r];return""},k.td_close=function(){return""},k.strong_open=function(){return""},k.strong_close=function(){return""},k.em_open=function(){return""},k.em_close=function(){return""},k.del_open=function(){return""},k.del_close=function(){return""},k.ins_open=function(){return""},k.ins_close=function(){return""},k.mark_open=function(){return""},k.mark_close=function(){return""},k.sub=function(e,r){return""+m(e[r].content)+""},k.sup=function(e,r){return""+m(e[r].content)+""},k.hardbreak=function(e,r,t){return t.xhtmlOut?"
    \n":"
    \n"},k.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
    \n":"
    \n":"\n"},k.text=function(e,r){return m(e[r].content)},k.htmlblock=function(e,r){return e[r].content},k.htmltag=function(e,r){return e[r].content},k.abbr_open=function(e,r){return''},k.abbr_close=function(){return""},k.footnote_ref=function(e,r){var t=Number(e[r].id+1).toString(),n="fnref"+t;return e[r].subId>0&&(n+=":"+e[r].subId),'['+t+"]"},k.footnote_block_open=function(e,r,t){return(t.xhtmlOut?'
    \n':'
    \n')+'
    \n
      \n'},k.footnote_block_close=function(){return"
    \n
    \n"},k.footnote_open=function(e,r){return'
  • '},k.footnote_close=function(){return"
  • \n"},k.footnote_anchor=function(e,r){var t="fnref"+Number(e[r].id+1).toString();return e[r].subId>0&&(t+=":"+e[r].subId),' '},k.dl_open=function(){return"
    \n"},k.dt_open=function(){return"
    "},k.dd_open=function(){return"
    "},k.dl_close=function(){return"
    \n"},k.dt_close=function(){return"\n"},k.dd_close=function(){return"\n"};var y=k.getBreak=function(e,r){return(r=function e(r,t){return++t>=r.length-2?t:"paragraph_open"===r[t].type&&r[t].tight&&"inline"===r[t+1].type&&0===r[t+1].content.length&&"paragraph_close"===r[t+2].type&&r[t+2].tight?e(r,t+2):t}(e,r))1)break;if(41===t&&--n<0)break;r++}return s!==r&&(o=l(e.src.slice(s,r)),!!e.parser.validateLink(o)&&(e.linkContent=o,e.pos=r,!0))}function E(e,r){var t,n=r,o=e.posMax,s=e.src.charCodeAt(r);if(34!==s&&39!==s&&40!==s)return!1;for(r++,40===s&&(s=41);r=e.length)&&!z.test(e[r])}function V(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}var B=[["block",function(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}],["abbr",function(e){var r,t,n,o,s=e.tokens;if(!e.inlineMode)for(r=1,t=s.length-1;r0?i[r].count:1,n=0;n=0;r--)if("text"===(s=o[r]).type){for(a=0,i=s.content,p.lastIndex=0,c=s.level,l=[];u=p.exec(i);)p.lastIndex>a&&l.push({type:"text",content:i.slice(a,u.index+u[1].length),level:c}),l.push({type:"abbr_open",title:e.env.abbreviations[":"+u[2]],level:c++}),l.push({type:"text",content:u[2],level:c}),l.push({type:"abbr_close",level:--c}),a=p.lastIndex-u[3].length;l.length&&(a=0;s--)if("inline"===e.tokens[s].type)for(r=(o=e.tokens[s].children).length-1;r>=0;r--)"text"===(t=o[r]).type&&(n=t.content,n=(i=n).indexOf("(")<0?i:i.replace(I,(function(e,r){return N[r.toLowerCase()]})),D.test(n)&&(n=n.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),t.content=n)}],["smartquotes",function(e){var r,t,n,o,s,i,l,a,c,p,u,h,f,d,g,b,v;if(e.options.typographer)for(v=[],g=e.tokens.length-1;g>=0;g--)if("inline"===e.tokens[g].type)for(b=e.tokens[g].children,v.length=0,r=0;r=0&&!(v[f].level<=l);f--);v.length=f+1,s=0,i=(n=t.content).length;e:for(;s=0&&(p=v[f],!(v[f].level=(o=e.eMarks[r])||42!==(t=e.src.charCodeAt(n++))&&45!==t&&43!==t||n=o)return-1;if((t=e.src.charCodeAt(n++))<48||t>57)return-1;for(;;){if(n>=o)return-1;if(!((t=e.src.charCodeAt(n++))>=48&&t<=57)){if(41===t||46===t)break;return-1}}return n=this.eMarks[e]},j.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;et;)if(r!==this.src.charCodeAt(--e))return e+1;return e},j.prototype.getLines=function(e,r,t,n){var o,s,i,l,a,c=e;if(e>=r)return"";if(c+1===r)return s=this.bMarks[c]+Math.min(this.tShift[c],t),i=n?this.eMarks[c]+1:this.eMarks[c],this.src.slice(s,i);for(l=new Array(r-e),o=0;ct&&(a=t),a<0&&(a=0),s=this.bMarks[c]+a,i=c+1]/,F=/^<\/([a-zA-Z]{1,15})[\s>]/;function J(e,r){var t=e.bMarks[r]+e.blkIndent,n=e.eMarks[r];return e.src.substr(t,n-t)}function Y(e,r){var t,n,o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];return o>=s||126!==(n=e.src.charCodeAt(o++))&&58!==n||o===(t=e.skipSpaces(o))||t>=s?-1:t}var W=[["code",function(e,r,t){var n,o;if(e.tShift[r]-e.blkIndent<4)return!1;for(o=n=r+1;n=4))break;o=++n}return e.line=n,e.tokens.push({type:"code",content:e.getLines(r,o,4+e.blkIndent,!0),block:!0,lines:[r,e.line],level:e.level}),!0}],["fences",function(e,r,t,n){var o,s,i,l,a,c=!1,p=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(p+3>u)return!1;if(126!==(o=e.src.charCodeAt(p))&&96!==o)return!1;if(a=p,(s=(p=e.skipChars(p,o))-a)<3)return!1;if((i=e.src.slice(p,u).trim()).indexOf("`")>=0)return!1;if(n)return!0;for(l=r;!(++l>=t)&&!((p=a=e.bMarks[l]+e.tShift[l])<(u=e.eMarks[l])&&e.tShift[l]=4||(p=e.skipChars(p,o))-ab)return!1;if(62!==e.src.charCodeAt(g++))return!1;if(e.level>=e.options.maxNesting)return!1;if(n)return!0;for(32===e.src.charCodeAt(g)&&g++,a=e.blkIndent,e.blkIndent=0,l=[e.bMarks[r]],e.bMarks[r]=g,s=(g=g=b,i=[e.tShift[r]],e.tShift[r]=g-e.bMarks[r],u=e.parser.ruler.getRules("blockquote"),o=r+1;o=(b=e.eMarks[o]));o++)if(62!==e.src.charCodeAt(g++)){if(s)break;for(d=!1,h=0,f=u.length;h=b,i.push(e.tShift[o]),e.tShift[o]=g-e.bMarks[o];for(c=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:p=[r,0],level:e.level++}),e.parser.tokenize(e,r,o),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=c,p[1]=e.line,h=0;ha)return!1;if(42!==(o=e.src.charCodeAt(l++))&&45!==o&&95!==o)return!1;for(s=1;l=0)g=!0;else{if(!((u=P(e,r))>=0))return!1;g=!1}if(e.level>=e.options.maxNesting)return!1;if(d=e.src.charCodeAt(u-1),n)return!0;for(v=e.tokens.length,g?(p=e.bMarks[r]+e.tShift[r],f=Number(e.src.substr(p,u-p-1)),e.tokens.push({type:"ordered_list_open",order:f,lines:k=[r,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:k=[r,0],level:e.level++}),o=r,m=!1,_=e.parser.ruler.getRules("list");!(!(o=e.eMarks[o]?1:b-u)>4&&(h=1),h<1&&(h=1),s=u-e.bMarks[o]+h,e.tokens.push({type:"list_item_open",lines:y=[r,0],level:e.level++}),l=e.blkIndent,a=e.tight,i=e.tShift[r],c=e.parentType,e.tShift[r]=b-e.bMarks[r],e.blkIndent=s,e.tight=!0,e.parentType="list",e.parser.tokenize(e,r,t,!0),e.tight&&!m||(A=!1),m=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=l,e.tShift[r]=i,e.tight=a,e.parentType=c,e.tokens.push({type:"list_item_close",level:--e.level}),o=r=e.line,y[1]=o,b=e.bMarks[r],o>=t)||e.isEmpty(o)||e.tShift[o]p)return!1;if(91!==e.src.charCodeAt(c))return!1;if(94!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(l=c+2;l=p||58!==e.src.charCodeAt(++l))&&(n||(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),a=e.src.slice(c+2,l-2),e.env.footnotes.refs[":"+a]=-1,e.tokens.push({type:"footnote_reference_open",label:a,level:e.level++}),o=e.bMarks[r],s=e.tShift[r],i=e.parentType,e.tShift[r]=e.skipSpaces(l)-l,e.bMarks[r]=l,e.blkIndent+=4,e.parentType="footnote",e.tShift[r]=a)return!1;if(35!==(o=e.src.charCodeAt(l))||l>=a)return!1;for(s=1,o=e.src.charCodeAt(++l);35===o&&l6||ll&&32===e.src.charCodeAt(i-1)&&(a=i),e.line=r+1,e.tokens.push({type:"heading_open",hLevel:s,lines:[r,e.line],level:e.level}),l=t)&&(!(e.tShift[i]3)&&(!((o=e.bMarks[i]+e.tShift[i])>=(s=e.eMarks[i]))&&((45===(n=e.src.charCodeAt(o))||61===n)&&(o=e.skipChars(o,n),!((o=e.skipSpaces(o))3||l+2>=a)return!1;if(60!==e.src.charCodeAt(l))return!1;if(33===(o=e.src.charCodeAt(l+1))||63===o){if(n)return!0}else{if(47!==o&&!function(e){var r=32|e;return r>=97&&r<=122}(o))return!1;if(47===o){if(!(s=e.src.slice(l,a).match(F)))return!1}else if(!(s=e.src.slice(l,a).match(Z)))return!1;if(!0!==H[s[1].toLowerCase()])return!1;if(n)return!0}for(i=r+1;it)return!1;if(a=r+1,e.tShift[a]=e.eMarks[a])return!1;if(124!==(o=e.src.charCodeAt(i))&&45!==o&&58!==o)return!1;if(s=J(e,r+1),!/^[-:| ]+$/.test(s))return!1;if((c=s.split("|"))<=2)return!1;for(u=[],l=0;l=0;if(p=r+1,e.isEmpty(p)&&++p>t)return!1;if(e.tShift[p]=e.options.maxNesting)return!1;c=e.tokens.length,e.tokens.push({type:"dl_open",lines:a=[r,0],level:e.level++}),i=r,s=p;e:for(;;){for(v=!0,b=!1,e.tokens.push({type:"dt_open",lines:[i,i],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(i,i+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[i,i],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:l=[p,0],level:e.level++}),g=e.tight,h=e.ddIndent,u=e.blkIndent,d=e.tShift[s],f=e.parentType,e.blkIndent=e.ddIndent=e.tShift[s]+2,e.tShift[s]=o-e.bMarks[s],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,s,t,!0),e.tight&&!b||(v=!1),b=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=d,e.tight=g,e.parentType=f,e.blkIndent=u,e.ddIndent=h,e.tokens.push({type:"dd_close",level:--e.level}),l[1]=p=e.line,p>=t)break e;if(e.tShift[p]=t)break;if(i=p,e.isEmpty(i))break;if(e.tShift[i]=t)break;if(e.isEmpty(s)&&s++,s>=t)break;if(e.tShift[s]3)){for(o=!1,s=0,i=l.length;s=t))&&!(e.tShift[i]=0&&(e=e.replace(Q,(function(r,t){var n;return 10===e.charCodeAt(t)?(s=t+1,i=0,r):(n=" ".slice((t-s-i)%4),i=t-s+1,n)}))),o=new j(e,this,r,t,n),this.tokenize(o,o.line,o.lineMax)};for(var te=[],ne=0;ne<256;ne++)te.push(0);function oe(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function se(e,r){var t,n,o,s=r,i=!0,l=!0,a=e.posMax,c=e.src.charCodeAt(r);for(t=r>0?e.src.charCodeAt(r-1):-1;s=a&&(i=!1),(o=s-r)>=4?i=l=!1:(32!==(n=s?@[]^_`{|}~-".split("").forEach((function(e){te[e.charCodeAt(0)]=1}));var ie=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;var le=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;var ae=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],ce=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,pe=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function ue(e,r){return e=e.source,r=r||"",function t(n,o){return n?(o=o.source||o,e=e.replace(n,o),t):new RegExp(e,r)}}var he=ue(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",/[^"'=<>`\x00-\x20]+/)("single_quoted",/'[^']*'/)("double_quoted",/"[^"]*"/)(),fe=ue(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)("attr_value",he)(),de=ue(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",fe)(),ge=ue(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",de)("close_tag",/<\/[A-Za-z][A-Za-z0-9]*\s*>/)("comment",/|/)("processing",/<[?].*?[?]>/)("declaration",/]*>/)("cdata",//)();var be=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,ve=/^&([a-z][a-z0-9]{1,31});/i;var me=[["text",function(e,r){for(var t=e.pos;t=0&&32===e.pending.charCodeAt(t))if(t>=1&&32===e.pending.charCodeAt(t-1)){for(var s=t-2;s>=0;s--)if(32!==e.pending.charCodeAt(s)){e.pending=e.pending.substring(0,s+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(o++;o=l)return!1;if(126!==e.src.charCodeAt(a+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(s=a>0?e.src.charCodeAt(a-1):-1,i=e.src.charCodeAt(a+2),126===s)return!1;if(126===i)return!1;if(32===i||10===i)return!1;for(n=a+2;na+3)return e.pos+=n-a,r||(e.pending+=e.src.slice(a,n)),!0;for(e.pos=a+2,o=1;e.pos+1=l)return!1;if(43!==e.src.charCodeAt(a+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(s=a>0?e.src.charCodeAt(a-1):-1,i=e.src.charCodeAt(a+2),43===s)return!1;if(43===i)return!1;if(32===i||10===i)return!1;for(n=a+2;n=l)return!1;if(61!==e.src.charCodeAt(a+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(s=a>0?e.src.charCodeAt(a-1):-1,i=e.src.charCodeAt(a+2),61===s)return!1;if(61===i)return!1;if(32===i||10===i)return!1;for(n=a+2;n=e.options.maxNesting)return!1;for(e.pos=p+t,l=[t];e.pos=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=s+1;e.pos=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=s+1;e.pos=e.options.maxNesting)return!1;if(t=f+1,(n=w(e,f))<0)return!1;if((l=n+1)=h)return!1;for(f=l,S(e,l)?(s=e.linkContent,l=e.pos):s="",f=l;l=h||41!==e.src.charCodeAt(l))return e.pos=u,!1;l++}else{if(e.linkLevel>0)return!1;for(;l=0?o=e.src.slice(f,l++):l=f-1),o||(void 0===o&&(l=n+1),o=e.src.slice(t,n)),!(a=e.env.references[L(o)]))return e.pos=u,!1;s=a.href,i=a.title}return r||(e.pos=t,e.posMax=n,p?e.push({type:"image",src:s,title:i,alt:e.src.substr(t,n-t),level:e.level}):(e.push({type:"link_open",href:s,title:i,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=l,e.posMax=h,!0}],["footnote_inline",function(e,r){var t,n,o,s,i=e.posMax,l=e.pos;return!(l+2>=i)&&(94===e.src.charCodeAt(l)&&(91===e.src.charCodeAt(l+1)&&(!(e.level>=e.options.maxNesting)&&(t=l+2,!((n=w(e,l+1))<0)&&(r||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.pos=t,e.posMax=n,e.push({type:"footnote_ref",id:o,level:e.level}),e.linkLevel++,s=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[o]={tokens:e.tokens.splice(s)},e.linkLevel--),e.pos=n+1,e.posMax=i,!0)))))}],["footnote_ref",function(e,r){var t,n,o,s,i=e.posMax,l=e.pos;if(l+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(l))return!1;if(94!==e.src.charCodeAt(l+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(n=l+2;n=i)&&(n++,t=e.src.slice(l+2,n-1),void 0!==e.env.footnotes.refs[":"+t]&&(r||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+t]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:t,count:0},e.env.footnotes.refs[":"+t]=o):o=e.env.footnotes.refs[":"+t],s=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push({type:"footnote_ref",id:o,subId:s,level:e.level})),e.pos=n,e.posMax=i,!0)))}],["autolink",function(e,r){var t,n,o,s,i,l=e.pos;return 60===e.src.charCodeAt(l)&&(!((t=e.src.slice(l)).indexOf(">")<0)&&((n=t.match(pe))?!(ae.indexOf(n[1].toLowerCase())<0)&&(i=C(s=n[0].slice(1,-1)),!!e.parser.validateLink(s)&&(r||(e.push({type:"link_open",href:i,level:e.level}),e.push({type:"text",content:s,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=n[0].length,!0)):!!(o=t.match(ce))&&(i=C("mailto:"+(s=o[0].slice(1,-1))),!!e.parser.validateLink(i)&&(r||(e.push({type:"link_open",href:i,level:e.level}),e.push({type:"text",content:s,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=o[0].length,!0))))}],["htmltag",function(e,r){var t,n,o,s=e.pos;return!!e.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=o)&&(!(33!==(t=e.src.charCodeAt(s+1))&&63!==t&&47!==t&&!function(e){var r=32|e;return r>=97&&r<=122}(t))&&(!!(n=e.src.slice(s).match(ge))&&(r||e.push({type:"htmltag",content:e.src.slice(s,s+n[0].length),level:e.level}),e.pos+=n[0].length,!0))))}],["entity",function(e,r){var t,o,s=e.pos,i=e.posMax;if(38!==e.src.charCodeAt(s))return!1;if(s+10)e.pos=t;else{for(r=0;r=s)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},ke.prototype.parse=function(e,r,t,n){var o=new x(e,this,r,t,n);this.tokenize(o)};var _e={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}}};function qe(e,r,t){this.src=r,this.env=t,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function xe(e,r){"string"!=typeof e&&(r=e,e="default"),r&&null!=r.linkify&&console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"),this.inline=new ke,this.block=new K,this.core=new G,this.renderer=new _,this.ruler=new q,this.options={},this.configure(_e[e]),this.set(r||{})}xe.prototype.set=function(e){s(this.options,e)},xe.prototype.configure=function(e){var r=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&r[t].ruler.enable(e.components[t].rules,!0)}))},xe.prototype.use=function(e,r){return e(this,r),this},xe.prototype.parse=function(e,r){var t=new qe(this,e,r);return this.core.process(t),t.tokens},xe.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},xe.prototype.parseInline=function(e,r){var t=new qe(this,e,r);return t.inlineMode=!0,this.core.process(t),t.tokens},xe.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};Math.random().toString(36).slice(2,8);function we(e){return e.replace(/[&<"]/g,e=>({"&":"&","<":"<",'"':"""}[e]))}function Ae(e,r){return`<${e}${r?Object.entries(r).map(([e,r])=>{if(null!=r&&!1!==r)return e=" "+we(e),!0===r?e:`${e}="${we(r)}"`}).filter(Boolean).join(""):""}>`}function Ce(e){return``}function Se(e,r,t){return null==r?Ae(e,t):Ae(e,t)+(r||"")+Ce(e)}function Ee(e,r){return r.code&&(e=Se("code",e)),r.del&&(e=Se("del",e)),r.em&&(e=Se("em",e)),r.strong&&(e=Se("strong",e)),e}const Le=new xe;function Me(e){const r=[];let t={};for(const n of e.children)if("text"===n.type)r.push(Ee(we(n.content),t));else if("code"===n.type)r.push(Se("code",Ee(we(n.content),t)));else if("softbreak"===n.type)r.push("
    ");else if(n.type.endsWith("_open")){const e=n.type.slice(0,-5);"link"===e?r.push(Ae("a",{href:n.href,title:n.title,target:"_blank",rel:"noopener noreferrer"})):t=Object.assign({},t,{[e]:!0})}else if(n.type.endsWith("_close")){const e=n.type.slice(0,-6);"link"===e?r.push(Ce("a")):t=Object.assign({},t,{[e]:!1})}return r.join("")}function Te(e){const r={t:"root",d:0,v:"",c:[]},t=[r];let n=0;for(const r of e){let e=t[t.length-1];if(r.type.endsWith("_open")){const i=r.type.slice(0,-5),l={};var o;if("heading"===i)for(n=r.hLevel;(null==(s=e)?void 0:s.d)>=n;){var s;t.pop(),e=t[t.length-1]}else n=Math.max(n,(null==(o=e)?void 0:o.d)||0)+1,"ordered_list"===i&&(l.start=r.order);const a={t:i,d:n,p:l,v:"",c:[]};e.c.push(a),t.push(a)}else{if(!e)continue;r.type===e.t+"_close"?"heading"===e.t?n=e.d:(t.pop(),n=0):"inline"===r.type?e.v=`${e.v||""}${Me(r)}`:"fence"===r.type&&e.c.push({t:r.type,d:n+1,v:`
    ${we(r.content)}
    `,c:[]})}}return r}Le.block.ruler.enable(["deflist"]),e.buildTree=Te,e.transform=function(e){var r;let t=Te(Le.parse(e||"",{}));return function e(r,t=0){if("heading"===r.t)r.c=r.c.filter(e=>"paragraph"!==e.t);else if("list_item"===r.t){var n;r.c=r.c.filter(e=>!["paragraph","fence"].includes(e.t)||(r.v||(r.v=e.v),!1)),null!=(null==(n=r.p)?void 0:n.index)&&(r.v=`${r.p.index}. ${r.v}`)}else if("ordered_list"===r.t){var o,s;let e=null!=(o=null==(s=r.p)?void 0:s.start)?o:1;r.c.forEach(r=>{"list_item"===r.t&&(r.p=Object.assign({},r.p,{index:e}),e+=1)})}0===r.c.length?delete r.c:(1!==r.c.length||r.c[0].v||(r.c=r.c[0].c),r.c.forEach(r=>e(r,t+1))),r.d=t,delete r.p}(t),1===(null==(r=t.c)?void 0:r.length)&&(t=t.c[0]),t}})); diff --git a/www/lib/markmap/view.min.js b/www/lib/markmap/view.min.js new file mode 100644 index 000000000..392a57fa0 --- /dev/null +++ b/www/lib/markmap/view.min.js @@ -0,0 +1,2 @@ +/*! markmap-lib v0.7.11 | MIT License */ +define(["exports"],(function(t){"use strict";function n(t,n){return tn?1:t>=n?0:NaN}var e,r;1===(e=n).length&&(r=e,e=function(t,e){return n(r(t),e)});function i(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r}function o(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r}var a={value:function(){}};function s(){for(var t,n=0,e=arguments.length,r={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function c(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),p.hasOwnProperty(n)?{space:p[n],local:t}:t}function m(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===f&&n.documentElement.namespaceURI===f?n.createElement(t):n.createElementNS(e,t)}}function g(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function y(t){var n=d(t);return(n.local?g:m)(n)}function v(){}function _(t){return null==t?v:function(){return this.querySelector(t)}}function w(){return[]}function x(t){return null==t?w:function(){return this.querySelectorAll(t)}}function b(t){return function(){return this.matches(t)}}function z(t){return new Array(t.length)}function k(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}k.prototype={constructor:k,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function M(t,n,e,r,i,o){for(var a,s=0,u=n.length,l=o.length;sn?1:t>=n?0:NaN}function A(t){return function(){this.removeAttribute(t)}}function N(t){return function(){this.removeAttributeNS(t.space,t.local)}}function X(t,n){return function(){this.setAttribute(t,n)}}function $(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function C(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function T(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function O(t){return function(){this.style.removeProperty(t)}}function P(t,n,e){return function(){this.style.setProperty(t,n,e)}}function R(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function I(t,n){return t.style.getPropertyValue(n)||T(t).getComputedStyle(t,null).getPropertyValue(n)}function q(t){return function(){delete this[t]}}function Y(t,n){return function(){this[t]=n}}function B(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function D(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new L(t)}function L(t){this._node=t,this._names=D(t.getAttribute("class")||"")}function V(t,n){for(var e=H(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ut={},lt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ut={mouseenter:"mouseover",mouseleave:"mouseout"}));function ct(t,n,e){return t=ht(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function ht(t,n,e){return function(r){var i=lt;lt=r;try{t.call(this,this.__data__,n,e)}finally{lt=i}}}function ft(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function pt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=w&&(w=_+1);!(v=g[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?O:"function"==typeof n?R:P)(t,n,null==e?"":e)):I(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?q:"function"==typeof n?B:Y)(t,n)):this.node()[t]},classed:function(t,n){var e=D(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Ft(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Ft(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Pt.exec(t))?new Jt(n[1],n[2],n[3],1):(n=Rt.exec(t))?new Jt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=It.exec(t))?Ft(n[1],n[2],n[3],n[4]):(n=qt.exec(t))?Ft(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Yt.exec(t))?tn(n[1],n[2]/100,n[3]/100,1):(n=Bt.exec(t))?tn(n[1],n[2]/100,n[3]/100,n[4]):Dt.hasOwnProperty(t)?Ut(Dt[t]):"transparent"===t?new Jt(NaN,NaN,NaN,0):null}function Ut(t){return new Jt(t>>16&255,t>>8&255,255&t,1)}function Ft(t,n,e,r){return r<=0&&(t=n=e=NaN),new Jt(t,n,e,r)}function Gt(t){return t instanceof $t||(t=Vt(t)),t?new Jt((t=t.rgb()).r,t.g,t.b,t.opacity):new Jt}function Zt(t,n,e,r){return 1===arguments.length?Gt(t):new Jt(t,n,e,null==r?1:r)}function Jt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Kt(){return"#"+Wt(this.r)+Wt(this.g)+Wt(this.b)}function Qt(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Wt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function tn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new en(t,n,e,r)}function nn(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=Vt(t)),!t)return new en;if(t instanceof en)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=n===o?(e-r)/s+6*(e0&&u<1?0:a,new en(a,s,u,t.opacity)}function en(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function rn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function on(t){return function(){return t}}function an(t){return 1==(t=+t)?sn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):on(isNaN(n)?e:n)}}function sn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):on(isNaN(t)?n:t)}Nt($t,Vt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ht,formatHex:Ht,formatHsl:function(){return nn(this).formatHsl()},formatRgb:Lt,toString:Lt}),Nt(Jt,Zt,Xt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Jt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Kt,formatHex:Kt,formatRgb:Qt,toString:Qt})),Nt(en,(function(t,n,e,r){return 1===arguments.length?nn(t):new en(t,n,e,null==r?1:r)}),Xt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Jt(rn(t>=240?t-240:t+120,i,r),rn(t,i,r),rn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function t(n){var e=an(n);function r(t,n){var r=e((t=Zt(t)).r,(n=Zt(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=sn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function ln(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var cn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hn=new RegExp(cn.source,"g");function fn(t,n){var e,r,i,o=cn.lastIndex=hn.lastIndex=0,a=-1,s=[],u=[];for(t+="",n+="";(e=cn.exec(t))&&(r=hn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(e=e[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:ln(e,r)})),o=hn.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:ln(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,s,u),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:ln(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,s,u),function(t,n,e,r,o,a){if(t!==e||n!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:ln(t,e)},{i:s-2,x:ln(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var n,e=-1,r=u.length;++e=0&&n._call.call(null,t),n=n._next;--An}()}finally{An=0,function(){var t,n,e=En,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:En=n);Sn=t,Dn(r)}(),jn=0}}function Bn(){var t=Tn.now(),n=t-$n;n>1e3&&(Cn-=n,$n=t)}function Dn(t){An||(Nn&&(Nn=clearTimeout(Nn)),t-jn>24?(t<1/0&&(Nn=setTimeout(Yn,t-Tn.now()-Cn)),Xn&&(Xn=clearInterval(Xn))):(Xn||($n=Tn.now(),Xn=setInterval(Bn,1e3)),An=1,On(Yn)))}function Hn(t,n,e){var r=new In;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}In.prototype=qn.prototype={constructor:In,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Pn():+e)+(null==n?0:+n),this._next||Sn===this||(Sn?Sn._next=this:En=this,Sn=this),this._call=t,this._time=e,Dn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dn())}};var Ln=s("start","end","cancel","interrupt"),Vn=[];function Un(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==e.state)return s();for(l in i)if((f=i[l]).name===e.name){if(3===f.state)return Hn(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l0)throw new Error("too late; already scheduled");return e}function Gn(t,n){var e=Zn(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Zn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Jn(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function Kn(t,n){var e,r;return function(){var i=Gn(this,t),o=i.tween;if(o!==e)for(var a=0,s=(r=e=o).length;a=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Fn:Gn;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(n,e),a.on=i}}var ye=wt.prototype.constructor;function ve(t){return function(){this.style.removeProperty(t)}}function _e(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function we(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&_e(t,o,e)),r}return o._value=n,o}function xe(t){return function(n){this.textContent=t.call(this,n)}}function be(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&xe(r)),n}return r._value=t,r}var ze=0;function ke(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Me(){return++ze}var Ee=wt.prototype;ke.prototype=function(t){return wt().transition(t)}.prototype={constructor:ke,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=e-o,p=r-a,d=s*s+u*u,m=f*f+p*p,g=Math.sqrt(d),y=Math.sqrt(h),v=i*Math.tan((Ne-Math.acos((d+h-m)/(2*g*y)))/2),_=v/y,w=v/g;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(n+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*p)+","+(this._x1=t+w*s)+","+(this._y1=n+w*u)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),s=e*Math.sin(r),u=t+a,l=n+s,c=1^o,h=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),e&&(h<0&&(h=h%Xe+Xe),h>$e?this._+="A"+e+","+e+",0,1,"+c+","+(t-a)+","+(n-s)+"A"+e+","+e+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+e+","+e+",0,"+ +(h>=Ne)+","+c+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};function Te(){}function Oe(t,n){var e=new Te;if(t instanceof Te)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i=0;)n+=e[r].value;else n=1;t.value=n}function qe(t,n){var e,r,i,o,a,s=new He(t),u=+t.value&&(s.value=t.value),l=[s];for(null==n&&(n=Ye);e=l.pop();)if(u&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)l.push(r=e.children[o]=new He(i[o])),r.parent=e,r.depth=e.depth+1;return s.eachBefore(De)}function Ye(t){return t.children}function Be(t){t.data=t.data.data}function De(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function He(t){this.data=t,this.depth=this.height=0,this.parent=null}function Le(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}Pe.prototype=function(t,n){var e=new Pe;if(t instanceof Pe)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return qe(this).eachBefore(Be)}};var Ve=Array.prototype.slice,Ue={name:"implicit"};function Fe(){var t=Oe(),n=[],e=[],r=Ue;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Ue)return r;t.set(o,a=n.push(i))}return e[(a-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=Oe();for(var r,o,a=-1,s=e.length;++ar?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function gr(){var t,n,e=cr,r=hr,i=mr,o=pr,a=dr,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,h=Mn,f=s("start","zoom","end"),p=0;function d(t){t.property("__zoom",fr).on("wheel.zoom",x).on("mousedown.zoom",b).on("dblclick.zoom",z).filter(a).on("touchstart.zoom",k).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,n){return(n=Math.max(u[0],Math.min(u[1],n)))===t.k?t:new or(n,t.x,t.y)}function g(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new or(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,n,e){t.on("start.zoom",(function(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=_(t,i),a=r.apply(t,i),s=null==e?y(a):"function"==typeof e?e.apply(t,i):e,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,c="function"==typeof n?n.apply(t,i):n,f=h(l.invert(s).concat(u/l.k),c.invert(s).concat(u/c.k));return function(t){if(1===t)t=c;else{var n=f(t),e=u/n[2];t=new or(e,s[0]-n[0]*e,s[1]-n[1]*e)}o.zoom(null,t)}}))}function _(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function x(){if(e.apply(this,arguments)){var t=_(this,arguments),n=this.__zoom,r=Math.max(u[0],Math.min(u[1],n.k*Math.pow(2,o.apply(this,arguments)))),a=kt(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=n.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[a,n.invert(a)],Jn(this),t.start()}lr(),t.wheel=setTimeout(s,150),t.zoom("mouse",i(g(m(n,r),t.mouse[0],t.mouse[1]),t.extent,l))}function s(){t.wheel=null,t.end()}}function b(){if(!n&&e.apply(this,arguments)){var t=_(this,arguments,!0),r=xt(lt.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),o=kt(this),a=lt.clientX,s=lt.clientY;St(lt.view),ur(),t.mouse=[o,this.__zoom.invert(o)],Jn(this),t.start()}function u(){if(lr(),!t.moved){var n=lt.clientX-a,e=lt.clientY-s;t.moved=n*n+e*e>p}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=kt(t.that),t.mouse[1]),t.extent,l))}function c(){r.on("mousemove.zoom mouseup.zoom",null),At(lt.view,t.moved),lr(),t.end()}}function z(){if(e.apply(this,arguments)){var t=this.__zoom,n=kt(this),o=t.invert(n),a=t.k*(lt.shiftKey?.5:2),s=i(g(m(t,a),n,o),r.apply(this,arguments),l);lr(),c>0?xt(this).transition().duration(c).call(v,s,n):xt(this).call(d.transform,s)}}function k(){if(e.apply(this,arguments)){var n,r,i,o,a=lt.touches,s=a.length,u=_(this,arguments,lt.changedTouches.length===s);for(ur(),r=0;rt.children,nodeSize:t=>t.data.size,spacing:0});function vr(t){const n=Object.assign({},yr,t);function e(t){const e=n[t];return"function"==typeof e?e:()=>e}function r(t){const n=o(function(){const t=i(),n=e("nodeSize"),r=e("spacing");return class extends t{constructor(t){super(t),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return n(this.data)}spacing(t){return r(this.data,t.data)}get x(){return this.data.x}set x(t){this.data.x=t}get y(){return this.data.y}set y(t){this.data.y=t}update(){return _r(this),wr(this),this}}}(),t,t=>t.children);return n.update(),n.data}function i(){const t=e("nodeSize"),n=e("spacing");return class e extends qe.prototype.constructor{constructor(t){super(t)}copy(){const t=o(this.constructor,this,t=>t.children);return t.each(t=>t.data=t.data.data),t}get size(){return t(this)}spacing(t){return n(this,t)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const t=this.ancestors();return t[t.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return null===this.children}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((t,n)=>e.maxExtents(t,n.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(t,n){return{top:Math.min(t.top,n.top),bottom:Math.max(t.bottom,n.bottom),left:Math.min(t.left,n.left),right:Math.max(t.right,n.right)}}}}function o(t,n,e){const r=(n,i)=>{const o=new t(n);Object.assign(o,{parent:i,depth:null===i?0:i.depth+1,height:0,length:1});const a=e(n)||[];return o.children=0===a.length?null:a.map(t=>r(t,o)),o.children&&Object.assign(o,o.children.reduce((t,n)=>({height:Math.max(t.height,n.height+1),length:t.length+n.length}),o)),o};return r(n,null)}return Object.assign(r,{nodeSize(t){return arguments.length?(n.nodeSize=t,r):n.nodeSize},spacing(t){return arguments.length?(n.spacing=t,r):n.spacing},children(t){return arguments.length?(n.children=t,r):n.children},hierarchy(t,e){const r=void 0===e?n.children:e;return o(i(),t,r)},dump(t){const n=e("nodeSize"),r=t=>e=>{const i=t+" ",o=t+" ",{x:a,y:s}=e,u=n(e),l=e.children||[],c=0===l.length?" ":`,${i}children: [${o}${l.map(r(o)).join(o)}${i}],${t}`;return`{ size: [${u.join(", ")}],${i}x: ${a}, y: ${s}${c}},`};return r("\n")(t)}}),r}vr.version="2.1.1";const _r=(t,n=0)=>(t.y=n,(t.children||[]).reduce((n,e)=>{const[r,i]=n;_r(e,t.y+t.ySize);const o=(0===r?e.lExt:e.rExt).bottom;0!==r&&br(t,r,i);return[r+1,Xr(o,r,i)]},[0,null]),xr(t),Nr(t),t),wr=(t,n,e)=>{void 0===n&&(n=-t.relX-t.prelim,e=0);const r=n+t.relX;return t.relX=r+t.prelim-e,t.prelim=0,t.x=e+t.relX,(t.children||[]).forEach(n=>wr(n,r,t.x)),t},xr=t=>{(t.children||[]).reduce((t,n)=>{const[e,r]=t,i=e+n.shift,o=r+i+n.change;return n.relX+=o,[i,o]},[0,0])},br=(t,n,e)=>{const r=t.children[n-1],i=t.children[n];let o=r,a=r.relX,s=i,u=i.relX,l=!0;for(;o&&s;){o.bottom>e.lowY&&(e=e.next);const r=a+o.prelim-(u+s.prelim)+o.xSize/2+s.xSize/2+o.spacing(s);(r>0||r<0&&l)&&(u+=r,zr(i,r),kr(t,n,e.index,r)),l=!1;const c=o.bottom,h=s.bottom;c<=h&&(o=Er(o),o&&(a+=o.relX)),c>=h&&(s=Mr(s),s&&(u+=s.relX))}!o&&s?Sr(t,n,s,u):o&&!s&&Ar(t,n,o,a)},zr=(t,n)=>{t.relX+=n,t.lExtRelX+=n,t.rExtRelX+=n},kr=(t,n,e,r)=>{const i=t.children[n],o=n-e;if(o>1){const n=r/o;t.children[e+1].shift+=n,i.shift-=n,i.change-=r-n}},Mr=t=>t.hasChildren?t.firstChild:t.lThr,Er=t=>t.hasChildren?t.lastChild:t.rThr,Sr=(t,n,e,r)=>{const i=t.firstChild,o=i.lExt,a=t.children[n];o.lThr=e;const s=r-e.relX-i.lExtRelX;o.relX+=s,o.prelim-=s,i.lExt=a.lExt,i.lExtRelX=a.lExtRelX},Ar=(t,n,e,r)=>{const i=t.children[n],o=i.rExt,a=t.children[n-1];o.rThr=e;const s=r-e.relX-i.rExtRelX;o.relX+=s,o.prelim-=s,i.rExt=a.rExt,i.rExtRelX=a.rExtRelX},Nr=t=>{if(t.hasChildren){const n=t.firstChild,e=t.lastChild,r=(n.prelim+n.relX-n.xSize/2+e.relX+e.prelim+e.xSize/2)/2;Object.assign(t,{prelim:r,lExt:n.lExt,lExtRelX:n.lExtRelX,rExt:e.rExt,rExtRelX:e.rExtRelX})}},Xr=(t,n,e)=>{for(;null!==e&&t>=e.lowY;)e=e.next;return{lowY:t,index:n,next:e}},$r=Math.random().toString(36).slice(2,8);let jr=0;function Cr(){}function Tr(t,n,e="c"){const r=(t,i)=>n(t,()=>{var n;null==(n=t[e])||n.forEach(n=>{r(n,t)})},i);r(t)}function Or(t){if(Array.from)return Array.from(t);const n=[];for(let e=0;e{t&&e.indexOf(t)<0&&e.push(t)}),e.join(" ")}function Rr(t){if("string"==typeof t){const n=t;t=t=>t.tagName===n}const n=t;return function(){let t=Or(this.childNodes);return n&&(t=t.filter(t=>n(t))),t}}function Ir(t,n,e){const r=document.createElement(t);return n&&Object.entries(n).forEach(([t,n])=>{r[t]=n}),e&&Object.entries(e).forEach(([t,n])=>{r.setAttribute(t,n)}),r}const qr=function(t){const n={};return function(...e){const r=""+e[0];let i=n[r];return i||(i={value:t(...e)},n[r]=i),i.value}}(t=>{document.head.append(Ir("link",{rel:"preload",as:"script",href:t}))});function Yr(t,n){if("script"===t.type)return new Promise((n,e)=>{document.head.append(Ir("script",Object.assign({},t.data,{onload:n,onerror:e})))});if("iife"===t.type){const{fn:e,getParams:r}=t.data;e(...(null==r?void 0:r(n))||[])}}function Br(t){"style"===t.type?document.head.append(Ir("style",{textContent:t.data})):"stylesheet"===t.type&&document.head.append(Ir("link",Object.assign({rel:"stylesheet"},t.data)))}async function Dr(t,n,e){e=Object.assign({},e),await Promise.all(n.map(t=>(function(t){for(const n of t)Br(n)}(t.styles),async function(t,n){const e=t.filter(t=>"script"===t.type);e.length>1&&e.forEach(t=>qr(t.data.src));for(const e of t)await Yr(e,n)}(t.scripts,e))));for(const{initialize:r}of n)r&&r(t,e)}const Hr={styles:[],scripts:[{type:"iife",data:{fn:t=>{t.options=Object.assign({skipHtmlTags:{"[-]":["code","pre"]}},t.options),t.startup=Object.assign({typeset:!1},t.startup),window.MathJax=t},getParams:t=>[Object.assign({},t.mathJax)]}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"}}],initialize:function(t,n){t.transformHtml.tap((t,n)=>{var e,r;null==(e=(r=window.MathJax).typeset)||e.call(r,n)})}},Lr={};const Vr={styles:[{type:"stylesheet",data:{href:"https://cdn.jsdelivr.net/npm/prismjs@1/themes/prism.css"}}],scripts:[{type:"iife",data:{fn:()=>{window.Prism={manual:!0}}}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-core.min.js"}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js"}}],initialize:function(t,n){t.transformHtml.tap((t,n)=>{const{Prism:e}=window;!async function(t,n){if(!n.length)return;const{Prism:e}=window;try{await new Promise((t,r)=>{e.plugins.autoloader.loadLanguages(n,t,r)})}catch(t){Lr[t]=!0}t.setData(),t.fit()}(t,function(t,n){if(t.flatMap)return t.flatMap(n);const e=[];for(let r=0;rOr(t.querySelectorAll("code[class*=language-]"))).map(t=>{const n=t.className.match(/(?:^|\s)language-(\S+)|$/)[1];if(e.languages[n])e.highlightElement(t);else if(!Lr[n])return n}).filter(Boolean))})}};var Ur=Object.freeze({__proto__:null,mathJax:Hr,prism:Vr});function Fr(t){const n=t.data;return Math.max(6-2*n.d,1.5)}class Gr{constructor(t,n){var e;this.options=void 0,this.state=void 0,this.svg=void 0,this.styleNode=void 0,this.g=void 0,this.zoom=void 0,["handleZoom","handleClick"].forEach(t=>{this[t]=this[t].bind(this)}),this.svg=t.datum?t:xt(t),this.styleNode=this.svg.append("style"),this.zoom=gr().on("zoom",this.handleZoom),this.options=Object.assign({duration:500,nodeFont:"300 16px/20px sans-serif",nodeMinHeight:16,spacingVertical:5,spacingHorizontal:80,autoFit:!1,fitRatio:.95,color:(e=Fe(Ge),t=>e(t.p.i)),paddingX:8},n),this.state={id:this.options.id||(jr+=1,`mm-${$r}-${jr}`)},this.g=this.svg.append("g").attr("class",this.state.id+"-g"),this.updateStyle(),this.svg.call(this.zoom)}getStyleContent(){const{style:t,nodeFont:n}=this.options,{id:e}=this.state;return`.${e} a { color: #0097e6; }\n.${e} a:hover { color: #00a8ff; }\n.${e}-g > path { fill: none; }\n.${e}-fo > div { font: ${n}; white-space: nowrap; }\n.${e}-fo code { padding: .2em .4em; font-size: calc(1em - 2px); color: #555; background-color: #f0f0f0; border-radius: 2px; }\n.${e}-fo del { text-decoration: line-through; }\n.${e}-fo em { font-style: italic; }\n.${e}-fo strong { font-weight: 600; }\n.${e}-fo pre { margin: 0; }\n.${e}-fo pre[class*=language-] { padding: 0; }\n.${e}-g > g { cursor: pointer; }\n${"function"==typeof t?t(e):""}\n`}updateStyle(){this.svg.attr("class",Pr(this.svg.attr("class"),this.state.id)),this.styleNode.text(this.getStyleContent())}handleZoom(){const{transform:t}=lt;this.g.attr("transform",t)}handleClick(t){var n;const{data:e}=t;e.p=Object.assign({},e.p,{f:!(null==(n=e.p)?void 0:n.f)}),this.renderData(t.data)}initializeData(t){let n=0;const{nodeFont:e,color:r,nodeMinHeight:i}=this.options,{id:o}=this.state,a=document.createElement("div"),s=o+"-container";a.className=Pr(a.className,o+"-fo",s);const u=document.createElement("style");u.textContent=`\n${this.getStyleContent()}\n.${s} {\n position: absolute;\n width: 0;\n height: 0;\n top: -100px;\n left: -100px;\n overflow: hidden;\n font: ${e};\n}\n.${s} > div {\n display: inline-block;\n}\n`,document.body.append(u,a),Tr(t,(t,e)=>{var i;t.c=null==(i=t.c)?void 0:i.map(t=>Object.assign({},t)),n+=1;const o=document.createElement("div");o.innerHTML=t.v,a.append(o),t.p=Object.assign({},t.p,{i:n,el:o}),r(t),e()});const l=Or(a.childNodes);this.constructor.transformHtml.call(this,l),Tr(t,(t,n,e)=>{var r;const o=t.p.el.getBoundingClientRect();t.v=t.p.el.innerHTML,t.p.s=[Math.ceil(o.width),Math.max(Math.ceil(o.height),i)],t.p.k=`${(null==e||null==(r=e.p)?void 0:r.i)||""}.${t.p.i}:${t.v}`,n()}),a.remove(),u.remove()}setOptions(t){Object.assign(this.options,t)}setData(t,n){t||(t=Object.assign({},this.state.data)),this.state.data=t,this.initializeData(t),n&&this.setOptions(n),this.renderData()}renderData(t){var n,e;if(!this.state.data)return;const{spacingHorizontal:r,paddingX:a,spacingVertical:s,autoFit:u,color:l}=this.options,{id:c}=this.state,h=vr().children(t=>{var n;return!(null==(n=t.p)?void 0:n.f)&&t.c}).nodeSize(t=>{const[n,e]=t.data.p.s;return[e,n+(n?2*a:0)+r]}).spacing((t,n)=>t.parent===n.parent?s:2*s),f=h.hierarchy(this.state.data);h(f),function(t,n){Tr(t,(t,e)=>{t.ySizeInner=t.ySize-n,t.y+=n,e()},"children")}(f,r);const p=f.descendants().reverse(),d=f.links(),m=er(),g=o(p,t=>t.x-t.xSize/2),y=i(p,t=>t.x+t.xSize/2),v=o(p,t=>t.y),_=i(p,t=>t.y+t.ySizeInner);Object.assign(this.state,{minX:g,maxX:y,minY:v,maxY:_}),u&&this.fit();const w=t&&p.find(n=>n.data===t)||f,x=null!=(n=w.data.p.x0)?n:w.x,b=null!=(e=w.data.p.y0)?e:w.y,z=this.g.selectAll(Rr("g")).data(p,t=>t.data.p.k),k=z.enter().append("g").attr("transform",t=>`translate(${b+w.ySizeInner-t.ySizeInner},${x+w.xSize/2-t.xSize})`).on("click",this.handleClick),M=this.transition(z.exit());M.select("rect").attr("width",0).attr("x",t=>t.ySizeInner),M.select("foreignObject").style("opacity",0),M.attr("transform",t=>`translate(${w.y+w.ySizeInner-t.ySizeInner},${w.x+w.xSize/2-t.xSize})`).remove();const E=z.merge(k);this.transition(E).attr("transform",t=>`translate(${t.y},${t.x-t.xSize/2})`);const S=E.selectAll(Rr("rect")).data(t=>[t],t=>t.data.p.k).join(t=>t.append("rect").attr("x",t=>t.ySizeInner).attr("y",t=>t.xSize-Fr(t)/2).attr("width",0).attr("height",Fr),t=>t,t=>t.remove());this.transition(S).attr("x",-1).attr("width",t=>t.ySizeInner+2).attr("fill",t=>l(t.data));const A=E.selectAll(Rr("circle")).data(t=>t.data.c?[t]:[],t=>t.data.p.k).join(t=>t.append("circle").attr("stroke-width","1.5").attr("cx",t=>t.ySizeInner).attr("cy",t=>t.xSize).attr("r",0),t=>t,t=>t.remove());this.transition(A).attr("r",6).attr("stroke",t=>l(t.data)).attr("fill",t=>{var n;return(null==(n=t.data.p)?void 0:n.f)?l(t.data):"#fff"});const N=E.selectAll(Rr("foreignObject")).data(t=>[t],t=>t.data.p.k).join(t=>{const n=t.append("foreignObject").attr("class",c+"-fo").attr("x",a).attr("y",0).style("opacity",0).attr("height",t=>t.xSize);return n.append("xhtml:div").select((function(t){const n=t.data.p.el.cloneNode(!0);return this.replaceWith(n),n})).attr("xmlns","http://www.w3.org/1999/xhtml"),n},t=>t,t=>t.remove()).attr("width",t=>Math.max(0,t.ySizeInner-2*a));this.transition(N).style("opacity",1);const X=this.g.selectAll(Rr("path")).data(d,t=>t.target.data.p.k).join(t=>{const n=[b+w.ySizeInner,x+w.xSize/2];return t.insert("path","g").attr("d",m({source:n,target:n}))},t=>t,t=>{const n=[w.y+w.ySizeInner,w.x+w.xSize/2];return this.transition(t).attr("d",m({source:n,target:n})).remove()});this.transition(X).attr("stroke",t=>l(t.target.data)).attr("stroke-width",t=>Fr(t.target)).attr("d",t=>{const n=[t.source.y+t.source.ySizeInner,t.source.x+t.source.xSize/2],e=[t.target.y,t.target.x+t.target.xSize/2];return m({source:n,target:e})}),p.forEach(t=>{t.data.p.x0=t.x,t.data.p.y0=t.y})}transition(t){const{duration:n}=this.options;return t.transition().duration(n)}fit(){const t=this.svg.node(),{width:n,height:e}=t.getBoundingClientRect(),{fitRatio:r}=this.options,{minX:i,maxX:o,minY:a,maxY:s}=this.state,u=s-a,l=o-i,c=Math.min(n/u*r,e/l*r,2),h=ar.translate((n-u*c)/2-a*c,(e-l*c)/2-i*c).scale(c);return this.transition(this.svg).call(this.zoom.transform,h).end().catch(Cr)}rescale(t){const n=this.svg.node(),{width:e,height:r}=n.getBoundingClientRect(),i=e/2,o=r/2,a=sr(n),s=a.translate((i-a.x)*(1-t)/a.k,(o-a.y)*(1-t)/a.k).scale(t);return this.transition(this.svg).call(this.zoom.transform,s).end().catch(Cr)}static create(t,n,e){const r=new Gr(t,n);return e&&(r.setData(e),r.fit()),r}}Gr.transformHtml=new class{constructor(){this.listeners=[]}tap(t){this.listeners.push(t)}call(...t){for(const n of this.listeners)n(...t)}},t.Markmap=Gr,t.loadPlugins=async function(t,n){return t=t.map(t=>{if("string"==typeof t){const n=t;(t=Ur[n])||console.warn("[markmap] Unknown plugin: "+n)}return t}).filter(Boolean),Dr(Gr,t,n)},t.markmap=function(t,n,e){return Gr.create(t,e,n)},t.plugins=Ur}));