@jhuix/showdowns 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -346,15 +346,21 @@ Put the following line into your HTML page \<header> or \<body>:
346
346
  })
347
347
  .then(function(text) {
348
348
  md = md + `\n\n## Showdown's Markdown syntax\n\n` + text;
349
- showdowns.makeHtml(md).then(html => {
350
- element.innerHTML = html;
349
+ showdowns.makeHtml(md).then(obj => {
350
+ element.innerHTML = obj.html;
351
+ showdowns.completedHtml(obj.scripts);
352
+ }).catch(err =>{
353
+ console.log(err);
351
354
  });
352
355
  })
353
356
  .catch(function(error) {
354
357
  console.log(error);
355
358
  if (md) {
356
- showdowns.makeHtml(md).then(html => {
357
- element.innerHTML = html;
359
+ showdowns.makeHtml(md).then(obj => {
360
+ element.innerHTML = obj.html;
361
+ showdowns.completedHtml(obj.scripts);
362
+ }).catch(err =>{
363
+ console.log(err);
358
364
  });
359
365
  }
360
366
  });
@@ -478,6 +484,8 @@ Default async extensions is described below:
478
484
  'showdown-vega': showdownVega(vegaOptions),
479
485
  'showdown-wavedrom': showdownWavedrom,
480
486
  'showdown-railroad': showdownRailroad,
487
+ 'showdown-abc': showdownAbc,
488
+ 'showdown-echarts': showdownEcharts,
481
489
  }
482
490
 
483
491
  ### Properties
@@ -617,10 +625,16 @@ Type: ({type:'zip', content: string} | string,
617
625
  hasKatex: boolean;
618
626
  hasRailroad: boolean;
619
627
  hasSequence: boolean
620
- }) => void) => Promise<string>
628
+ }) => void) => Promise\<{html, scripts}>
621
629
 
622
630
  A async function to make markdown to html that showdown.convertor converte it in current showdowns instance.
623
631
 
632
+ #### completedHtml
633
+
634
+ Type: ( scripts?: [] | string) => Promise\<boolean>
635
+
636
+ A async function to completed markdown to html that append scripts to dom.
637
+
624
638
  #### zDecode
625
639
 
626
640
  Type: (data: string) => string
package/demo/index.html CHANGED
@@ -116,8 +116,16 @@
116
116
  .makeHtml(md, csstypes => {
117
117
  mdCssTypes = csstypes;
118
118
  })
119
- .then(content => {
120
- element.innerHTML = content;
119
+ .then(res => {
120
+ if (typeof res === 'object') {
121
+ element.innerHTML = res.html;
122
+ showdowns.completedHtml(res.scripts);
123
+ } else {
124
+ element.innerHTML = res;
125
+ }
126
+ })
127
+ .catch(err => {
128
+ element.innerText = err;
121
129
  });
122
130
  })
123
131
  .catch(function(error) {
@@ -127,8 +135,16 @@
127
135
  .makeHtml(md, csstypes => {
128
136
  mdCssTypes = csstypes;
129
137
  })
130
- .then(content => {
131
- element.innerHTML = content;
138
+ .then(res => {
139
+ if (typeof res === 'object') {
140
+ element.innerHTML = res.html;
141
+ showdowns.completedHtml(res.scripts);
142
+ } else {
143
+ element.innerHTML = res;
144
+ }
145
+ })
146
+ .catch(err => {
147
+ element.innerText = err;
132
148
  });
133
149
  }
134
150
  });
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * css of showdowns v0.6.0
2
+ * css of showdowns v0.6.2
3
3
  * Copyright (c) 2019-present, Jhuix (Hui Jin) <jhuix0117@gmail.com>
4
4
  * Released under the MIT License.
5
5
  */.showdowns blockquote,.showdowns dd,.showdowns div,.showdowns dl,.showdowns dt,.showdowns form,.showdowns h1,.showdowns h2,.showdowns h3,.showdowns h4,.showdowns h5,.showdowns h6,.showdowns li,.showdowns ol,.showdowns p,.showdowns pre,.showdowns td,.showdowns th,.showdowns ul{margin:0;padding:0}.showdowns div.paragraph.align-right,.showdowns h1.align-right,.showdowns h2.align-right,.showdowns h3.align-right,.showdowns h4.align-right,.showdowns h5.align-right,.showdowns h6.align-right,.showdowns li.align-right,.showdowns p.align-right{text-align:right}.showdowns div.paragraph.align-center,.showdowns h1.align-center,.showdowns h2.align-center,.showdowns h3.align-center,.showdowns h4.align-center,.showdowns h5.align-center,.showdowns h6.align-center,.showdowns li.align-center,.showdowns p.align-center{text-align:center}.showdowns a{color:#0366d6;line-height:inherit;text-decoration:none}.showdowns a img{border:none}.showdowns a:hover{cursor:pointer;text-decoration:underline}.showdowns img{-ms-interpolation-mode:bicubic;display:inherit;height:auto;margin:0 auto;max-width:100%}.showdowns p{font-family:inherit;font-size:1em;font-weight:400;line-height:1.5;margin-bottom:1.25em;text-rendering:optimizeLegibility}.showdowns p.lead{font-size:1.21875em;line-height:1.5}.showdowns p aside{font-size:.875em;font-style:italic;line-height:1.5}.showdowns h1,.showdowns h2,.showdowns h3,.showdowns h4,.showdowns h5,.showdowns h6{font-style:normal;font-weight:600;line-height:1.25;margin-bottom:1rem;margin-top:1.5rem;text-rendering:optimizeLegibility}.showdowns h1 small,.showdowns h2 small,.showdowns h3 small,.showdowns h4 small,.showdowns h5 small,.showdowns h6 small{font-size:60%;line-height:0}.showdowns h1,.showdowns h2{border-bottom:1px solid #d6d6d6;padding-bottom:.3em}.showdowns h1{font-size:2em}.showdowns h2{font-size:1.5em}.showdowns h3{font-size:1.25em}.showdowns h4{font-size:1em}.showdowns h5{font-size:.875em}.showdowns h6{color:#6a737d;font-size:.85em}.showdowns .subheader{color:#6f6f6f;font-weight:400;line-height:1.4;margin-bottom:.5em;margin-top:.2em}.showdowns hr{border:solid #ddd;border-width:1px 0 0;clear:both;height:0;margin:1.25em 0 1.1875em}.showdowns em,.showdowns i{font-style:italic;line-height:inherit}.showdowns b,.showdowns strong{font-weight:600;line-height:inherit}.showdowns small{font-size:60%;line-height:inherit}.showdowns code{border-style:solid;border-width:1px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-weight:400;padding:.125em .3125em .0625em}.showdowns dl,.showdowns ol,.showdowns ul{font-family:inherit;font-size:1em;line-height:1.5;list-style-position:outside;margin-bottom:1.25em}.showdowns ul{margin-left:1.1em}.showdowns ul.no-bullet{margin-left:0}.showdowns ul.no-bullet li ol,.showdowns ul.no-bullet li ul{list-style:none;margin-bottom:0;margin-left:1.25em}.showdowns ul li ol,.showdowns ul li ul{margin-bottom:0;margin-left:1.25em}.showdowns ul.circle li ul,.showdowns ul.disc li ul,.showdowns ul.square li ul{list-style:inherit}.showdowns ul.square{list-style-type:square;margin-left:1.1em}.showdowns ul.circle{list-style-type:circle;margin-left:1.1em}.showdowns ul.disc{list-style-type:disc;margin-left:1.1em}.showdowns ul.no-bullet{list-style:none}.showdowns ol{margin-left:1.4em}.showdowns ol li ol,.showdowns ol li ul{margin-bottom:0;margin-left:1.25em}.showdowns dl dt{font-weight:600;margin-bottom:.3em}.showdowns dl dd{margin-bottom:.75em}.showdowns abbr,.showdowns acronym{color:#222;cursor:help;font-size:90%;text-transform:uppercase}.showdowns abbr{text-transform:none}.showdowns abbr[title]{border-bottom:1px dotted #5c5c5c}.showdowns blockquote{border-left:4px solid #d6d6d6;color:#5c5c5c;line-height:1.5;margin:0 0 16px;padding:0 15px}.showdowns blockquote cite{color:#555;display:block;font-size:.8125em}.showdowns blockquote cite:before{content:"\2014 \0020"}.showdowns blockquote cite a,.showdowns blockquote cite a:visited{color:#555}.showdowns pre{word-wrap:break-word;border:1px solid #dfdfdf;margin-bottom:1.5em;margin-top:1.5em;padding:.125em .3125em .0625em;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap}.showdowns pre code{background-color:transparent;border:0;padding:0}.showdowns table{background:#fff;border-collapse:collapse;border-spacing:0;margin-bottom:1.25em;overflow:auto;table-layout:auto}.showdowns table caption{background:transparent;color:#222;font-weight:600}.showdowns table thead{background:#f5f5f5}.showdowns table thead tr td,.showdowns table thead tr th{border:1px solid #d6d6d6;color:#222;font-weight:600;line-height:1.125em;padding:.5em .625em .625em}.showdowns table tfoot{background:#f5f5f5}.showdowns table tfoot tr td,.showdowns table tfoot tr th{border:1px solid #d6d6d6;color:#222;font-weight:600;line-height:1.125em;padding:.5em .625em .625em}.showdowns table tr td,.showdowns table tr th{border:1px solid #d6d6d6;color:#222;line-height:1.125em;padding:.5625em .625em}.showdowns table tr.alt,.showdowns table tr.even,.showdowns table tr:nth-of-type(2n){background:#f9f9f9}.showdowns table tbody tr td,.showdowns table tbody tr th{border:1px solid #d6d6d6;line-height:1.125em}.showdowns .flow,.showdowns .flowchart,.showdowns .mermaid,.showdowns .plantuml,.showdowns .sequence,.showdowns .wavedrom{background-color:#f9f9f9}.showdowns .diagram-center:not(.asciimath):not(.latex):not(.mermaid){display:table;margin:auto}.showdowns .diagram-right:not(.asciimath):not(.latex):not(.mermaid){display:table;margin:auto 0 auto auto}.showdowns .diagram-center.mermaid{text-align:center}.showdowns .diagram-right.mermaid{text-align:right}.showdowns .asciimath:not(.diagram-center):not(.diagram-right) .katex,.showdowns .asciimath:not(.diagram-center):not(.diagram-right) .katex-display,.showdowns .latex:not(.diagram-center):not(.diagram-right) .katex,.showdowns .latex:not(.diagram-center):not(.diagram-right) .katex-display{text-align:unset}.showdowns .asciimath.diagram-center .katex,.showdowns .asciimath.diagram-center .katex-display,.showdowns .latex.diagram-center .katex,.showdowns .latex.diagram-center .katex-display{text-align:center}.showdowns .asciimath.diagram-right .katex,.showdowns .asciimath.diagram-right .katex-display,.showdowns .latex.diagram-right .katex,.showdowns .latex.diagram-right .katex-display{text-align:right}
6
6
 
7
7
  /*!
8
- * css of showdowns v0.6.0
8
+ * css of showdowns v0.6.2
9
9
  * Copyright (c) 2019-present, Jhuix (Hui Jin) <jhuix0117@gmail.com>
10
10
  * Released under the MIT License.
11
11
  */.showdowns .showdown-container{border:1px solid #eee;border-radius:.25rem;margin-bottom:1rem;padding:.75rem 1.25rem;position:relative}.showdowns .showdown-container.container{border-left-width:.25rem;border-right-width:.25rem}.showdowns .showdown-container.container.tip{border-left-color:#5bc0de;border-right-color:#5bc0de}.showdowns .showdown-container.container.info{border-left-color:#cce5ff;border-right-color:#cce5ff}.showdowns .showdown-container.container.warning{border-left-color:#f0ad4e;border-right-color:#f0ad4e}.showdowns .showdown-container.container.error{border-left-color:#d9534f;border-right-color:#d9534f}.showdowns .showdown-container.container.success{border-left-color:#67c23a;border-right-color:#67c23a}.showdowns .showdown-container.alert{border:1px solid transparent;transition:opacity .2s}.showdowns .showdown-container.alert.alert-tip{background-color:#5bc0de}.showdowns .showdown-container.alert.alert-info{background-color:#cce5ff}.showdowns .showdown-container.alert.alert-warning{background-color:#f0ad4e}.showdowns .showdown-container.alert.alert-error{background-color:#d9534f}.showdowns .showdown-container.alert.alert-success{background-color:#67c23a}.showdowns .showdown-container .container-title{font-size:1.25rem;font-weight:700;line-height:1.2}
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * showdowns.core.min.js v0.6.0
2
+ * showdowns.core.min.js v0.6.2
3
3
  * Copyright (c) 2019-present, Jhuix (Hui Jin) <jhuix0117@gmail.com>
4
4
  * Released under the MIT License.
5
5
  */
6
- "use strict";var t=require("showdown"),e=require("zlib");t.ConverterExtObj=function(e,n){let o=[],i=e;function a(e,n){if(n=n||null,t.helper.isString(e)&&(n=t.helper.stdExtName(e),e=t.asyncExtension(n),t.helper.isUndefined(e)))throw Error('Extension "'+n+'" could not be loaded. It was either not found or is not a valid aync extension.');if("function"==typeof e&&(e=e()),t.helper.isArray(e)||(e=[e]),t.validateExtension(e))for(var i=0;e.length>i;++i)if("output"===e[i].type)o.push(e[i])}n&&t.helper.forEach(n,a),this.addAsyncExtension=function(t,e){a(t,e=e||null)},this.removeAsyncExtension=function(e){t.helper.isArray(e)||(e=[e]);for(var n=0;e.length>n;++n){const t=e[n];for(var i=0;o.length>i;++i)o[i]===t&&o.splice(i,1)}},this.getAsyncExtensions=function(){return o},this.getCurrFlavor=function(){return i},this.setCurrFlavor=function(t){i=t}},t.Converter.prototype.initConvertExtObj=function(e,n){return this.extObj=new t.ConverterExtObj(e,n),this.resetOptions=function(e){e=e||{};const n=t.getOptions();let o=this.getOptions();for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);if("object"==typeof e)for(var a in e)e.hasOwnProperty(a)&&(o[a]=e[a])},this.setFlavor=function(e){let n=t.getFlavorOptions(e);if(t.helper.isUndefined(n))return;this.extObj.setCurrFlavor(e);let o=t.getDefaultOptions(!0);for(var i in o)o.hasOwnProperty(i)&&(this.getOptions()[i]=o[i]);for(var i in n)n.hasOwnProperty(i)&&(this.getOptions()[i]=n[i])},this.getFlavor=function(){return this.extObj.getCurrFlavor()},this.addAsyncExtension=function(t,e){this.extObj.addAsyncExtension(t,e)},this.removeAsyncExtension=function(t){this.extObj.removeAsyncExtension(t)},this.removeExtension=function(e){t.helper.isArray(e)||(e=[e]);const n=this.getAllExtensions();let o=n.language,i=n.output;for(var a=0;e.length>a;++a){const t=e[a];for(var r=0;o.length>r;++r)o[r]===t&&o.splice(r,1);for(var u=0;i.length>u;++u)i[u]===t&&i.splice(u,1)}},this.asyncMakeHtml=function(t,e){const n=this.makeHtml(t),o=this.extObj.getAsyncExtensions();if(!o.length)return Promise.resolve({html:n});var i={outputs:o,converter:this};const a=(new DOMParser).parseFromString(n,"text/html"),r=void 0!==a.body?a.body:a,u=this.getOptions();let l=Promise.resolve({wrapper:r,options:u,globals:i,scripts:[]});return o.forEach((function(t){l=l.then((e=>{const n=t.filter(e);return n||e}))})),l.then((t=>{if("function"==typeof e&&e){const n=e(t);if(n instanceof Promise)return n.then((t=>({html:t.wrapper.innerHTML,scripts:t.scripts})))}return{html:t.wrapper.innerHTML,scripts:t.scripts}}))},this},t.subParser("githubCodeBlocks",(function(e,n,o){return n.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,n,o),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*?)(?:[ \t]*?)((?:\{[\S\t ]*\}|\[[\S\t ]*\])?)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,i,a,r,u){var l=n.omitExtraWLInCodeBlocks?"":"\n";return u=t.subParser("encodeCode")(u,n,o),u="<pre><code"+(a?' class="'+a+" language-"+a+'"':"")+(r?` data-lang='${r}'`:"")+">"+(u=(u=(u=t.subParser("detab")(u,n,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+l+"</code></pre>",u=t.subParser("hashBlock")(u,n,o),"\n\n¨G"+(o.ghCodeBlocks.push({text:e,codeblock:u})-1)+"G\n\n"}))).replace(/¨0/,""),o.converter._dispatch("githubCodeBlocks.after",e,n,o)):e})),t.subParser("tables",(function(e,n,o){if(!n.tables)return e;function i(t){return/^:[ \t]*--*$/.test(t)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(t)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(t)?' style="text-align:center;"':""}function a(e,i,a,r,u){if(n.tablesMerge){var l=function(t,e,o,i){if(i){if(!n.tablesRowspan||"^^"!==i||!e)return;for(var a=e-1;a>=0;--a)if(t[a][o]){if("^^"!==t[a][o])return t[a][o]=t[a][o].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,n,o){return n+' rowspan="'+(e-a+1)+'"'+o})),i;if(0===a)return t[a][o]='<td rowspan="'+(e-a+1)+'"></td>\n',i}else for(var r=o-1;r>=0;-r){if(t[a+1][r]&&"^^"!==t[a+1][r])return;if(t[a][r]){if(!t[a+1][r])return;return t[a][r]=t[a][r].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,n,o){return n+' rowspan="'+(e-a+1)+'"'+o})),i}}}else if(o)for(r=o-1;r>=0;--r)if(t[e][r]){if("^^"!==t[e][r])return t[e][r]=t[e][r].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,e,n){return e+' colspan="'+(o-r+1)+'"'+n})),i;for(a=e-1;a>=0;--a){if(t[a][r+1])return;if("^^"!==t[a][r])return t[a][r]=t[a][r].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,e,n){return e+' colspan="'+(o-r+1)+'"'+n})),i}}else if(0===r)return t[e][r]='<td colspan="'+(o-r+1)+'"></td>\n',i}(e,i,a,r);if(!t.helper.isUndefined(l))return l}return r=r.trim(),"<td"+u+">"+t.subParser("spanGamut")(r,n,o)+"</td>\n"}function r(e,r){var u,l=e.split("\n");for(u=0;l.length>u;++u)/^ {0,3}\|/.test(l[u])&&(l[u]=l[u].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(l[u])&&(l[u]=l[u].replace(/\|[ \t]*$/,"")),l[u]=t.subParser("codeSpans")(l[u],n,o);var s,p,c,d=[],m=[],f=[],g=[],h=[];if(r)for(d=l[0].split("|").map((function(t){return t.trim()})),l.shift(),u=0;d.length>u;++u)g.push(i(d[u]));else{var y=l[0].split("|").map((function(t){return t.trim()}));if(d=l[1].split("|").map((function(t){return t.trim()})),l.shift(),l.shift(),d.length>y.length)return e;for(u=0;d.length>u;++u)g.push(i(d[u]));for(u=0;y.length>u;++u)t.helper.isUndefined(g[u])&&(g[u]=""),f.push((p=g[u],c=void 0,c="",s=(s=y[u]).trim(),(n.tablesHeaderId||n.tableHeaderId)&&(c=' id="'+s.replace(/ /g,"_").toLowerCase()+'"'),"<th"+c+p+">"+(s=t.subParser("spanGamut")(s,n,o))+"</th>\n"))}for(u=0;l.length>u;++u)""!==l[u].trim()&&m.push(l[u].split("|").map((function(t){var e=t.trim();return""===e&&t.length>0?t:e})));for(u=0;m.length>u;++u){var v=[];h.push(v);for(var x=0;g.length>x;++x)t.helper.isUndefined(m[u][x])&&(m[u][x]=""),v.push(a(h,u,x,m[u][x],g[x]))}return function(t,e,o){var i="<table>\n",a=e.length;if(t.length){i+="<thead>\n<tr>\n";for(var r=0;t.length>r;++r)i+=t[r];i+="</tr>\n</thead>\n"}for(i+="<tbody>\n",r=0;o.length>r;++r){i+="<tr>\n";for(var u=0;a>u;++u)n.tablesMerge&&"^^"===o[r][u]||(i+=o[r][u]);i+="</tr>\n"}return i+"</tbody>\n</table>\n"}(f,g,h)}function u(t){return r(t,!1)}function l(t){return r(t,!0)}return e=(e=(e=(e=o.converter._dispatch("tables.before",e,n,o)).replace(/\\(\|)/g,t.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,u)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,u),n.tablesHeaderless&&(e=(e=e.replace(/^ {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,l)).replace(/^ {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,l)),e=o.converter._dispatch("tables.after",e,n,o)}));let n="vanilla",o={github:{ghCompatibleHeaderId:!1,underline:!0,rawHeaderId:!0,tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},ghost:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},allOn:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0}},i={};t.asyncExtension=function(e,n){if(!t.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=t.helper.stdExtName(e),t.helper.isUndefined(n)){if(!i.hasOwnProperty(e))throw Error("Async Extension named "+e+" is not registered!");return i[e]}"function"==typeof n&&(n=n()),t.helper.isArray(n)||(n=[n]),t.validateExtension(n)&&(i[e]=n)},t.removeAsyncExtension=function(e){e=t.helper.stdExtName(e),delete i[e]},t.resetAsyncExtensions=function(){i={}},t.removeExtension=function(e){e=t.helper.stdExtName(e),delete t.getAllExtensions[e]};const a=t.setFlavor,r=t.getFlavorOptions;t.setFlavor=function(e){try{if(a(e),n=e,!o.hasOwnProperty(e))return}catch{if(!o.hasOwnProperty(e))return;t.resetOptions(),n=e}var i=o[e];for(var r in i)i.hasOwnProperty(r)&&(t.getOptions()[r]=i[r])},t.getFlavor=function(){return n},t.setFlavorOptions=function(t,e){e&&(o[t]=Object.assign(o[t]||{},e))},t.getFlavorOptions=function(e){const n=r(e);return t.helper.isUndefined(n)?o.hasOwnProperty(e)?o[e]:void 0:o.hasOwnProperty(e)?Object.assign(n,o[e]):n};let u="jsdelivr",l="file:"===document.location.protocol?"https://":document.location.protocol+"//",s="",p="";const c={local:{ABCJS:"../node_modules/abcjs/dist/abcjs-basic.js",ABCJSCSS:"../node_modules/abcjs/abcjs-audio.css",echarts:"../node_modules/echarts/dist/echarts.js",Viz:"../node_modules/@viz-js/viz/lib/viz-standalone.js",Raphael:"../node_modules/raphael/raphael.min.js",flowchart:"../dist/diagrams/flowchart/flowchart.min.js",mermaid:"../node_modules/mermaid/dist/mermaid.js",katex:"../node_modules/katex/dist/katex.min.js",katexCSS:"../node_modules/katex/dist/katex.min.css",renderMathInElement:"../node_modules/katex/dist/contrib/auto-render.js",railroad:"../node_modules/railroad-diagrams/railroad-diagrams.js",railroadCSS:"../node_modules/railroad-diagrams/railroad-diagrams.css",Snap:"../node_modules/snapsvg/dist/snap.svg-min.js",WebFont:"../node_modules/webfontloader/webfontloader.js",underscore:"../node_modules/underscore/underscore-min.js",sequence:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js",sequenceCSS:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css",WaveDrom:"../node_modules/wavedrom/wavedrom.min.js",WaveDromSkin:{default:"../node_modules/wavedrom/skins/default.js",lowkey:"../node_modules/wavedrom/skins/lowkey.js",narrow:"../node_modules/wavedrom/skins/narrow.js"},vega:"../node_modules/vega/build/vega.js",vegaLite:"../node_modules/vega-lite/build/vega-lite.js",vegaEmbed:"../node_modules/vega-embed/build/vega-embed.js"},cdnjs:{ABCJS:l+"cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js",ABCJSCSS:l+"cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css",Viz:l+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:l+"cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",flowchart:l+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:l+"cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js",katex:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js",katexCSS:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css",renderMathInElement:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js",railroad:l+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js",railroadCSS:l+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css",Snap:l+"cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js",WebFont:l+"cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js",underscore:l+"cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js",sequence:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js",WaveDromSkin:{default:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",lowkey:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js",narrow:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js"},vega:l+"cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js",vegaLite:l+"cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js",vegaEmbed:l+"cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js"},jsdelivr:{ABCJS:l+"cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js",ABCJSCSS:l+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",Viz:l+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:l+"cdn.jsdelivr.net/npm/raphael@2/raphael.min.js",flowchart:l+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:l+"cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js",katex:l+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js",katexCSS:l+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css",renderMathInElement:l+"cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js",railroad:l+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js",railroadCSS:l+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css",Snap:l+"cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js",WebFont:l+"cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js",underscore:l+"cdn.jsdelivr.net/npm/underscore@1/underscore-min.js",sequence:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:l+"cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js",WaveDromSkin:{default:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js",lowkey:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js",narrow:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js"},vega:l+"cdn.jsdelivr.net/npm/vega@5/build/vega.js",vegaLite:l+"cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js",vegaEmbed:l+"cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js"}};function d(t,e){if(c.hasOwnProperty(u)){const n=c[u];let o="";if("object"==typeof t){const e=Object.keys(t)[0],i=t[e];n[e]&&"string"==typeof i&&i&&n[e][i]&&(o=n[e][i])}else n[t]&&(o=n[t]);o&&(e=o.substring(0,l.length)===l?o:"../dist/"===o.substring(0,8)?p+o:s+o)}return e}const m={setCDN:function(t,e,n){t in c&&(u=t),"string"==typeof e&&e&&(s=e),"string"==typeof n&&n&&(p=n)},getCDN:function(){return u},getSrc:d,loadScript:function(t,e){return new Promise(((n,o)=>{t&&"undefined"!=typeof document||o("Args is invaild!"),void 0===e&&(e=t),t=d(e,t);const i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");a.src=t,a.onload=()=>{n(e)},i.appendChild(a)}))},loadStyleSheet:function(t,e){if(!t||"undefined"==typeof document)return"";void 0===e&&(e=t),t=d(e,t);var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("link");return o.rel="stylesheet",o.href=t,n.appendChild(o),"local"===u?"":t}};Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in t||(t="yyyy-MM-dd hh:mm:ss.S"),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t};const f={interopDefault:function(t){return t&&"object"==typeof t&&"default"in t?t.default:t},loadScript:function(t,e){return new Promise(((n,o)=>{e&&"undefined"!=typeof document||o("Args is invaild!");const i=document.body;let a=document.getElementById(t);a?i.removeChild(a):(a=document.createElement("script"),a.id=t),a.type="text/javascript",a.text=e,i.appendChild(a),n(!0)}))},renderCacheElement:function(t,e,n,o){"undefined"!=typeof window&&window.document&&(t=window.document);const i=t.createElement("div");if(i.id=e,i.className=n,i.style.display="none",t.body.appendChild(i),"function"==typeof o&&o){const e=o(i);if(e instanceof Promise)return e.then((e=>{t.body.removeChild(e),e.style.display=""})),i.outerHTML}return t.body.removeChild(i),i.style.display="",i.outerHTML},renderElement:function(t,e,n){"undefined"!=typeof window&&window.document&&(t=window.document);const o=t.createElement("div");return o.id=e,o.className=n,t.body.appendChild(o),o},createElementMeta:function(t,e,n){const o=e.dataset.lang,i=o?JSON.parse(o):null;let a="";if(i){if("boolean"==typeof i.codeblock&&i.codeblock||"string"==typeof i.codeblock&&"true"===i.codeblock.toLowerCase())return!1;i.align&&("center"===i.align?a="diagram-center":"right"===i.align&&(a="diagram-right"))}let r=e.textContent.trim();n&&"function"==typeof n&&(r=n(r));const u=(e.classList.length>0?e.classList[0]:"")+(e.className&&a?" ":"")+a,l=t+"-"+Date.now()+"-"+Math.floor(1e4*Math.random());return e.id=l,{id:l,className:u,data:r,element:e}}},g="abc",h="ABCJSCSS";if("undefined"==typeof window)throw Error("The showdown abcjs extension can only be used in browser environment!");if(void 0===y)var y=window.ABCJS||void 0;function v(){return!!y}let x=!1;function w(t,e){if(v()){const n=e.id,o=e.className,i=e.data,a=e.cssLink,r=e.element.ownerDocument;e.element.parentNode.outerHTML=a?`<div id="${n}" class="${o} css-abc" data-css="${a}"></div>`:`<div id="${n}" class="${o}"></div>`;const u=r.getElementById(n);return y.renderAbc(u,i),t(!0)}setTimeout((()=>{w(t,e)}),20)}function b(t){return new Promise((e=>{let n=f.createElementMeta(g,t);if(!n)return e(!1);n.cssLink=m.getSrc(h),w(e,n)}))}function j(t){return function(){const t=v();"undefined"!=typeof window&&(t||x||(x=!0,m.loadStyleSheet(h),m.loadScript("ABCJS").then((t=>{y=f.interopDefault(window[t])}))))}(),new Promise((e=>{const n=[];t.forEach((t=>{n.push(b(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function S(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll(`code.${g}.language-${g}`);return!!n.length&&(this.config={cssLink:m.getSrc(h)},j(n).then((()=>t)))}}]}function E(t,e,n,o){try{o&&(n=n.appendChild(t.ownerDocument.createElement("ul")));const i=n.appendChild(t.ownerDocument.createElement("li")).appendChild(t.ownerDocument.createElement("a"));e&&(i.appendChild(t.ownerDocument.createTextNode(e.textContent)),i.href="#"+e.id)}catch{}return n}function O(t,e,n,o){if(n.headingLevel>=o){let i=null;for(;n&&n.headingLevel>=o;)i=n,n=i.parentNode,i.parentNode=null,i.toc=null,i.headingLevel=null,i.preLevel=null;return n&&O(t,e,n,o),n}if(o>n.preLevel){for(n.preLevel++;o>n.preLevel;)n.toc=E(t,null,n.toc,!0),n.preLevel++;n.toc=E(t,e,n.toc,!0)}else{for(;n.preLevel>o;)n.toc=n.toc.parentNode,n.preLevel--;E(t,e,n.toc,!1)}return n.parentNode&&O(t,e,n.parentNode,o),n}function k(){const t=new DOMParser;return[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n;return function(t){let e=null,n=0,o=null,i=!1;const a=t.querySelectorAll("p,h1,h2,h3,h4,h5,h6");for(let r=0;a.length>r;r++)if(e=a[r],"[toc]"==e.textContent.trim().toLowerCase()){let a=t.ownerDocument.createElement("ul");a.className="showdown-toc",e.parentNode.replaceChild(a,e);let r={parentNode:null,toc:a,headingLevel:n,preLevel:0};if(o)if(n>o.headingLevel)r.parentNode=o;else{let t=o;for(;t.headingLevel>n;)t=t.parentNode;t&&(r.parentNode=n===t.headingLevel?t.parentNode:t)}o=r,i=!0}else if(e.tagName)switch(e.tagName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":n=parseInt(e.tagName.substr(1)),o&&(o.preLevel||(o.preLevel=n),o=O(t,e,o,n))}for(;o;){let t=o;o=t.parentNode,t.parentNode=null,t.toc=null,t.headingLevel=null,t.preLevel=null}return i}(o)?o.innerHTML:e}}]}if("undefined"==typeof window)throw Error("The showdown viz extension can only be used in browser environment!");if(void 0===C)var C=window.Viz||void 0;const A=["circo","dot","neato","osage","twopi"];function $(){return!(void 0===C||!C||void 0===C.instance)}let N=!1;function L(t,e){if($()){const n=e.id,o=e.className,i=e.data,a=e.element,r=e.element.dataset.lang;let u="dot";if(r){const t=JSON.parse(r);t&&t.engine&&-1!=A.indexOf(t.engine)&&(u=t.engine)}C.instance().then((e=>{const r=e.renderString(i,{format:"svg",engine:u});a.parentNode.outerHTML=`<div id="${n}" class="${o}">${r}</div>`,t(!0)}))}else setTimeout((()=>{L(t,e)}),10)}function q(t){return new Promise((e=>{const n=f.createElementMeta("viz",t);if(!n)return e(!1);L(e,n)}))}function P(t){return function(){const t=$();"undefined"!=typeof window&&(t||N||(N=!0,m.loadScript("Viz").then((t=>{C=f.interopDefault(window[t])}))))}(),new Promise((e=>{const n=[];t.forEach((t=>{n.push(q(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function D(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.dot.language-dot");return!!n.length&&P(n).then((()=>t))}}]}const M="vega";if("undefined"==typeof window)throw Error("The showdown vega extension can only be used in browser environment!");if(void 0===T)var T=window.vegaEmbed||void 0;function _(){return!(void 0===T||!T)}let H=!1;function F(t,e,n,o){const i=f.createElementMeta(M,t);if(!i)return Promise.resolve(!1);const a=JSON.stringify(e),r=JSON.stringify(JSON.parse(i.data)),u=i.id;return n.push({id:u,code:`(function() {\n let el = document.getElementById('${u}');\n if (el){\n vegaEmbed(el, JSON.parse('${r}'), JSON.parse('${a}'));\n }\n })();`}),new Promise((t=>{R(t,i)}))}function z(t,e,n,o){return function(){const t=_();"undefined"!=typeof window&&(t||H||(H=!0,m.loadScript(M).then((()=>m.loadScript("vegaLite"))).then((()=>m.loadScript("vegaEmbed"))).then((t=>{T=f.interopDefault(window[t])}))))}(),new Promise((i=>{const a=[];t.forEach((t=>{a.push(F(t,o,n))})),e.forEach((t=>{a.push(F(t,o,n))})),Promise.all(a).then((()=>{i(!0)}))}))}function R(t,e){if(_()){return e.element.parentNode.outerHTML=`<div id="${e.id}" class="${e.className}"></div>`,t(!0)}setTimeout((()=>{R(t,e)}),10)}function B(t){const e=((t={})=>({actions:{editor:!1},theme:"vox",tooltip:!1,renderer:"svg",...t}))(t);return[{type:"output",config:e,filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.vega.language-vega"),o=e.querySelectorAll("code.vega-lite.language-vega-lite");if(!n.length&&!o.length)return!1;return z(n,o,t.scripts,this.config).then((()=>t))}}]}function J(){const t=new DOMParser;return[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n;return function(t){let e=null,n=null,o=!1;const i=t.querySelectorAll("p, li, h1, h2, h3, h4, h5, h6, div.paragraph");for(let t=0;i.length>t;t++)for(e=i[t],n=e.firstChild;n;){if(3===n.nodeType){let t=n.nodeValue.match(/^([\s\S]*?)([:-]-:)(?:[\s]?)([\s\S]*)$/);t&&(":-:"===t[2]?(n.nodeValue=t[3],e.className?e.className+=" align-center":e.className="align-center",o=!0):"--:"===t[2]&&(n.nodeValue=t[3],e.className?e.className+=" align-right":e.className="align-right",o=!0));break}n=n.nextSibling}return o}(o)?o.innerHTML:e}}]}var I={decimalsign:"."},W=0,V=1,G=2,U=3,K=4,X=5,Z=6,Q=7,Y=8,tt=9,et=10,nt={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:et},ot=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:W},{input:"beta",tag:"mi",output:"β",tex:null,ttype:W},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:W},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:W},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:W},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:W},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:W},{input:"eta",tag:"mi",output:"η",tex:null,ttype:W},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:W},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:W},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:W},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:W},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:W},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:W},{input:"lamda",tag:"mi",output:"lambda",tex:null,ttype:Y},{input:"Lamda",tag:"mi",output:"Lambda",tex:null,ttype:Y},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:W},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:W},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:W},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:W},{input:"phi",tag:"mi",output:"φ",tex:null,ttype:W},{input:"varphi",tag:"mi",output:"ϕ",tex:null,ttype:W},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:W},{input:"pi",tag:"mi",output:"π",tex:null,ttype:W},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:W},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:W},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:W},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:W},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:W},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:W},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:W},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:W},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:W},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:W},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:W},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:W},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:W},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:W},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:W},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:W},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:W},{input:"//",tag:"mo",output:"/",tex:"/",ttype:W,val:!0,notexcopy:!0},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:W},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:W},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:W},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:W},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:W},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:W},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:W},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:Y},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:W},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:W},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:W},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:W},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:Q},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:Q},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:W},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:Q},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:W},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:Q},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:W},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:Q},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:W},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:Q},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:G},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:G},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:W},{input:":=",tag:"mo",output:":=",tex:null,ttype:W},{input:"lt",tag:"mo",output:"<",tex:null,ttype:W},{input:"gt",tag:"mo",output:">",tex:null,ttype:W},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:W},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:W},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:W},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:W},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:W},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:W},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:W},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:W},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:W},{input:"in",tag:"mo",output:"∈",tex:null,ttype:W},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:W},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:W},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:W},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:W},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:W},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:W},{input:"~=",tag:"mo",output:"≅",tex:"stackrel{\\sim}{=}",notexcopy:!0,ttype:W},{input:"cong",tag:"mo",output:"~=",tex:null,ttype:Y},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:W},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:W},{input:"and",tag:"mtext",output:"and",tex:null,ttype:Z},{input:"or",tag:"mtext",output:"or",tex:null,ttype:Z},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:W},{input:"=>",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:W},{input:"implies",tag:"mo",output:"=>",tex:null,ttype:Y},{input:"if",tag:"mo",output:"if",tex:null,ttype:Z},{input:"<=>",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:W},{input:"iff",tag:"mo",output:"<=>",tex:null,ttype:Y},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:W},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:W},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:W},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:W},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:W},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:W},{input:"(",tag:"mo",output:"(",tex:null,ttype:K,val:!0},{input:")",tag:"mo",output:")",tex:null,ttype:X,val:!0},{input:"[",tag:"mo",output:"[",tex:null,ttype:K,val:!0},{input:"]",tag:"mo",output:"]",tex:null,ttype:X,val:!0},{input:"left(",tag:"mo",output:"(",tex:"(",notexcopy:!0,ttype:K,val:!0},{input:"right)",tag:"mo",output:")",tex:")",notexcopy:!0,ttype:X,val:!0},{input:"left[",tag:"mo",output:"[",tex:"[",notexcopy:!0,ttype:K,val:!0},{input:"right]",tag:"mo",output:"]",tex:"]",notexcopy:!0,ttype:X,val:!0},{input:"{",tag:"mo",output:"{",tex:"lbrace",ttype:K},{input:"}",tag:"mo",output:"}",tex:"rbrace",ttype:X},{input:"|",tag:"mo",output:"|",tex:null,ttype:tt,val:!0},{input:"|:",tag:"mo",output:"|",tex:"|",ttype:K,notexcopy:!0,val:!0},{input:":|",tag:"mo",output:"|",tex:"|",ttype:X,notexcopy:!0,val:!0},{input:":|:",tag:"mo",output:"|",tex:"|",ttype:W,notexcopy:!0,val:!0},{input:"(:",tag:"mo",output:"〈",tex:"langle",ttype:K},{input:":)",tag:"mo",output:"〉",tex:"rangle",ttype:X},{input:"<<",tag:"mo",output:"〈",tex:"langle",ttype:K},{input:">>",tag:"mo",output:"〉",tex:"rangle",ttype:X},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:K,invisible:!0},{input:":}",tag:"mo",output:":}",tex:null,ttype:X,invisible:!0},{input:"int",tag:"mo",output:"∫",tex:null,ttype:W},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:Y},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:Y},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:Y},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:Y},{input:"oint",tag:"mo",output:"∮",tex:null,ttype:W},{input:"del",tag:"mo",output:"∂",tex:"partial",ttype:W},{input:"grad",tag:"mo",output:"∇",tex:"nabla",ttype:W},{input:"+-",tag:"mo",output:"±",tex:"pm",ttype:W},{input:"O/",tag:"mo",output:"∅",tex:"emptyset",ttype:W},{input:"oo",tag:"mo",output:"∞",tex:"infty",ttype:W},{input:"aleph",tag:"mo",output:"ℵ",tex:null,ttype:W},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:W},{input:":.",tag:"mo",output:"∴",tex:"therefore",ttype:W},{input:":'",tag:"mo",output:"∵",tex:"because",ttype:W},{input:"/_",tag:"mo",output:"∠",tex:"angle",ttype:W},{input:"/_\\",tag:"mo",output:"△",tex:"triangle",ttype:W},{input:"\\ ",tag:"mo",output:" ",tex:null,ttype:W,val:!0},{input:"frown",tag:"mo",output:"⌢",tex:null,ttype:W},{input:"%",tag:"mo",output:"%",tex:"%",ttype:W,notexcopy:!0},{input:"quad",tag:"mo",output:"  ",tex:null,ttype:W},{input:"qquad",tag:"mo",output:"    ",tex:null,ttype:W},{input:"cdots",tag:"mo",output:"⋯",tex:null,ttype:W},{input:"vdots",tag:"mo",output:"⋮",tex:null,ttype:W},{input:"ddots",tag:"mo",output:"⋱",tex:null,ttype:W},{input:"diamond",tag:"mo",output:"⋄",tex:null,ttype:W},{input:"square",tag:"mo",output:"□",tex:"boxempty",ttype:W},{input:"|__",tag:"mo",output:"⌊",tex:"lfloor",ttype:W},{input:"__|",tag:"mo",output:"⌋",tex:"rfloor",ttype:W},{input:"|~",tag:"mo",output:"⌈",tex:"lceil",ttype:W},{input:"lceiling",tag:"mo",output:"|~",tex:null,ttype:Y},{input:"~|",tag:"mo",output:"⌉",tex:"rceil",ttype:W},{input:"rceiling",tag:"mo",output:"~|",tex:null,ttype:Y},{input:"CC",tag:"mo",output:"ℂ",tex:"mathbb{C}",ttype:W,notexcopy:!0},{input:"NN",tag:"mo",output:"ℕ",tex:"mathbb{N}",ttype:W,notexcopy:!0},{input:"QQ",tag:"mo",output:"ℚ",tex:"mathbb{Q}",ttype:W,notexcopy:!0},{input:"RR",tag:"mo",output:"ℝ",tex:"mathbb{R}",ttype:W,notexcopy:!0},{input:"ZZ",tag:"mo",output:"ℤ",tex:"mathbb{Z}",ttype:W,notexcopy:!0},{input:"f",tag:"mi",output:"f",tex:null,ttype:V,func:!0,val:!0},{input:"g",tag:"mi",output:"g",tex:null,ttype:V,func:!0,val:!0},{input:"''",tag:"mo",output:"''",tex:null,val:!0},{input:"'''",tag:"mo",output:"'''",tex:null,val:!0},{input:"''''",tag:"mo",output:"''''",tex:null,val:!0},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:Q},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:Q},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:V,func:!0},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:V,func:!0},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:V,func:!0},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:V,func:!0},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:V,func:!0},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:V,func:!0},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:V,func:!0},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:V,func:!0},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:V,func:!0},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:V,func:!0},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:V,func:!0},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:V,func:!0},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:V,func:!0},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:V,func:!0},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:V,func:!0},{input:"log",tag:"mo",output:"log",tex:null,ttype:V,func:!0},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:V,func:!0},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:V,notexcopy:!0,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:V,notexcopy:!0,rewriteleftright:["\\|","\\|"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:V,notexcopy:!0,rewriteleftright:["\\lfloor","\\rfloor"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:V,notexcopy:!0,rewriteleftright:["\\lceil","\\rceil"]},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:V,func:!0},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:V,func:!0},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:V,func:!0},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:V,func:!0},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:V,func:!0},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:V,func:!0},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:V,func:!0},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:V,func:!0},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:V,func:!0},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:V,func:!0},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:V,func:!0},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:V,func:!0},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:V,func:!0},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:V,func:!0},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:V,notexcopy:!0,rewriteleftright:["|","|"]},{input:"det",tag:"mo",output:"det",tex:null,ttype:V,func:!0},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:V,func:!0},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:W},{input:"mod",tag:"mo",output:"mod",tex:"text{mod}",ttype:W,notexcopy:!0},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:V,func:!0},{input:"lcm",tag:"mo",output:"lcm",tex:"text{lcm}",ttype:V,func:!0,notexcopy:!0},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:W},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:W},{input:"min",tag:"mo",output:"min",tex:null,ttype:Q},{input:"max",tag:"mo",output:"max",tex:null,ttype:Q},{input:"uarr",tag:"mo",output:"↑",tex:"uparrow",ttype:W},{input:"darr",tag:"mo",output:"↓",tex:"downarrow",ttype:W},{input:"rarr",tag:"mo",output:"→",tex:"rightarrow",ttype:W},{input:"->",tag:"mo",output:"→",tex:"to",ttype:W},{input:">->",tag:"mo",output:"↣",tex:"rightarrowtail",ttype:W},{input:"->>",tag:"mo",output:"↠",tex:"twoheadrightarrow",ttype:W},{input:">->>",tag:"mo",output:"⤖",tex:"twoheadrightarrowtail",ttype:W},{input:"|->",tag:"mo",output:"↦",tex:"mapsto",ttype:W},{input:"larr",tag:"mo",output:"←",tex:"leftarrow",ttype:W},{input:"harr",tag:"mo",output:"↔",tex:"leftrightarrow",ttype:W},{input:"rArr",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:W},{input:"lArr",tag:"mo",output:"⇐",tex:"Leftarrow",ttype:W},{input:"hArr",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:W},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:V},{input:"root",tag:"mroot",output:"root",tex:null,ttype:G},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:G},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:U},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:G},{input:"_",tag:"msub",output:"_",tex:null,ttype:U},{input:"^",tag:"msup",output:"^",tex:null,ttype:U},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:V},{input:"Sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:V},{input:"hat",tag:"mover",output:"^",tex:null,ttype:V,acc:!0},{input:"bar",tag:"mover",output:"¯",tex:"overline",ttype:V,acc:!0},{input:"vec",tag:"mover",output:"→",tex:null,ttype:V,acc:!0},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:V,acc:!0},{input:"dot",tag:"mover",output:".",tex:null,ttype:V,acc:!0},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:V,acc:!0},{input:"overarc",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:V,acc:!0},{input:"overparen",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:V,acc:!0},{input:"ul",tag:"munder",output:"̲",tex:"underline",ttype:V,acc:!0},{input:"ubrace",tag:"munder",output:"⏟",tex:"underbrace",ttype:V,acc:!0},{input:"obrace",tag:"mover",output:"⏞",tex:"overbrace",ttype:V,acc:!0},{input:"text",tag:"mtext",output:"text",tex:null,ttype:et},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:et},nt,{input:"color",tag:"mstyle",ttype:G},{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:"mathbf",ttype:V,notexcopy:!0},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:V},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:"mathsf",ttype:V,notexcopy:!0},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:V},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:"mathbb",ttype:V,notexcopy:!0},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:V},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:"mathcal",ttype:V,notexcopy:!0},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:V},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:"mathtt",ttype:V,notexcopy:!0},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:V},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:"mathfrak",ttype:V,notexcopy:!0},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:V}];function it(t,e){return t.input>e.input?1:-1}var at,rt,ut,lt=[];function st(t,e){var n;n="\\"==t.charAt(e)&&"\\"!=t.charAt(e+1)&&" "!=t.charAt(e+1)?t.slice(e+1):t.slice(e);for(var o=0;n.length>o&&32>=n.charCodeAt(o);o+=1);return n.slice(o)}function pt(t,e,n){if(0==n){var o,i;for(n=-1,o=t.length;o>n+1;)e>t[i=n+o>>1]?n=i:o=i;return o}for(var a=n;t.length>a&&e>t[a];a++);return a}function ct(t){for(var e,n,o,i=0,a="",r=!0,u=1;t.length>=u&&r;u++)n=t.slice(0,u),i=pt(lt,n,i),lt.length>i&&t.slice(0,lt[i].length)==lt[i]&&(e=i,u=(a=lt[i]).length),r=lt.length>i&&t.slice(0,lt[i].length)>=lt[i];if(rt=ut,""!=a)return ut=ot[e].ttype,ot[e];ut=W,i=1,n=t.slice(0,1);for(var l=!0;n>="0"&&"9">=n&&t.length>=i;)n=t.slice(i,i+1),i++;if(n==I.decimalsign&&(n=t.slice(i,i+1))>="0"&&"9">=n)for(l=!1,i++;n>="0"&&"9">=n&&t.length>=i;)n=t.slice(i,i+1),i++;return l&&i>1||i>2?(n=t.slice(0,i-1),o="mn"):(i=2,o=("A">(n=t.slice(0,1))||n>"Z")&&("a">n||n>"z")?"mo":"mi"),"-"==n&&rt==U?(ut=U,{input:n,tag:o,output:n,ttype:V,func:!0,val:!0}):{input:n,tag:o,output:n,ttype:W,val:!0}}function dt(t){var e;if("{"==t.charAt(0)&&"}"==t.charAt(t.length-1)){var n=0;"\\left"==(e=t.substr(1,5))?"("==(e=t.charAt(6))||"["==e||"{"==e?n=7:"\\lbrace"==(e=t.substr(6,7))&&(n=13):"("!=(e=t.charAt(1))&&"["!=e||(n=2),n>0&&("\\right)}"==(e=t.substr(t.length-8))||"\\right]}"==e||"\\right.}"==e?t=(t="{"+t.substr(n)).substr(0,t.length-8)+"}":"\\rbrace}"==e&&(t=(t="{"+t.substr(n)).substr(0,t.length-14)+"}"))}return t}function mt(t){var e;return e="boolean"==typeof t.val&&t.val?"":"\\",null==t.tex?e+t.input:e+t.tex}function ft(t){var e,n,o,i,a="";if(null==(e=ct(t=st(t,0)))||e.ttype==X&&at>0)return[null,t];switch(e.ttype==Y&&(e=ct(t=e.output+st(t,e.input.length))),e.ttype){case Q:case W:t=st(t,e.input.length);var r=mt(e);return"\\"==r.charAt(0)||"mo"==e.tag?[r,t]:["{"+r+"}",t];case K:at++,o=ht(t=st(t,e.input.length),!0),at--;var u=0;return"\\right"==o[0].substr(0,6)&&(")"==(s=o[0].charAt(6))||"]"==s||"}"==s?u=6:"."==s?u=7:"\\rbrace"==(s=o[0].substr(6,7))&&(u=13)),u>0?(o[0]=o[0].substr(u),n="boolean"==typeof e.invisible&&e.invisible?"{"+o[0]+"}":"{"+mt(e)+o[0]+"}"):n="boolean"==typeof e.invisible&&e.invisible?"{\\left."+o[0]+"}":"{\\left"+mt(e)+o[0]+"}",[n,o[1]];case et:return e!=nt&&(t=st(t,e.input.length)),-1==(i="{"==t.charAt(0)?t.indexOf("}"):"("==t.charAt(0)?t.indexOf(")"):"["==t.charAt(0)?t.indexOf("]"):e==nt?t.slice(1).indexOf('"')+1:0)&&(i=t.length)," "==(s=t.slice(1,i)).charAt(0)&&(a="\\ "),a+="\\text{"+s+"}"," "==s.charAt(s.length-1)&&(a+="\\ "),[a,t=st(t,i+1)];case V:return null==(o=ft(t=st(t,e.input.length)))[0]?["{"+mt(e)+"}",t]:"boolean"==typeof e.func&&e.func?"^"==(s=t.charAt(0))||"_"==s||"/"==s||"|"==s||","==s||1==e.input.length&&e.input.match(/\w/)&&"("!=s?["{"+mt(e)+"}",t]:[n="{"+mt(e)+"{"+o[0]+"}}",o[1]]:(o[0]=dt(o[0]),"sqrt"==e.input?["\\sqrt{"+o[0]+"}",o[1]]:"cancel"==e.input?["\\cancel{"+o[0]+"}",o[1]]:void 0!==e.rewriteleftright?["{\\left"+e.rewriteleftright[0]+o[0]+"\\right"+e.rewriteleftright[1]+"}",o[1]]:"boolean"==typeof e.acc&&e.acc?[mt(e)+"{"+o[0]+"}",o[1]]:["{"+mt(e)+"{"+o[0]+"}}",o[1]]);case G:if(null==(o=ft(t=st(t,e.input.length)))[0])return["{"+mt(e)+"}",t];o[0]=dt(o[0]);var l=ft(o[1]);return null==l[0]?["{"+mt(e)+"}",t]:(l[0]=dt(l[0]),[a="color"==e.input?"{\\color{"+o[0].replace(/[\{\}]/g,"")+"}"+l[0]+"}":"root"==e.input?"{\\sqrt["+o[0]+"]{"+l[0]+"}}":"{"+mt(e)+"{"+o[0]+"}{"+l[0]+"}}",l[1]]);case U:return t=st(t,e.input.length),[e.output,t];case Z:return t=st(t,e.input.length),["{\\quad\\text{"+e.input+"}\\quad}",t];case tt:at++,o=ht(t=st(t,e.input.length),!1),at--;var s="";return"|"==(s=o[0].charAt(o[0].length-1))&&","!==t.charAt(0)?[n="{\\left|"+o[0]+"}",o[1]]:[n="{\\mid}",t];default:return t=st(t,e.input.length),["{"+mt(e)+"}",t]}}function gt(t){var e,n,o,i,a;if(n=ct(t=st(t,0)),i=(a=ft(t))[0],(e=ct(t=a[1])).ttype==U&&"/"!=e.input){if((a=ft(t=st(t,e.input.length)))[0]=null==a[0]?"{}":dt(a[0]),t=a[1],"_"==e.input)if("^"==(o=ct(t)).input){var r=ft(t=st(t,o.input.length));r[0]=dt(r[0]),t=r[1],i="{"+i,i+="_{"+a[0]+"}",i+="^{"+r[0]+"}",i+="}"}else i+="_{"+a[0]+"}";else i=i+"^{"+a[0]+"}";void 0!==n.func&&n.func&&((o=ct(t)).ttype==U||o.ttype==X||1>=n.input.length&&o.ttype!=K||(i="{"+i+(a=gt(t))[0]+"}",t=a[1]))}return[i,t]}function ht(t,e){var n,o,i,a,r="",u=!1;do{o=(i=gt(t=st(t,0)))[0],(n=ct(t=i[1])).ttype==U&&"/"==n.input?((i=gt(t=st(t,n.input.length)))[0]=null==i[0]?"{}":dt(i[0]),t=i[1],o="\\frac{"+(o=dt(o))+"}",r+=o+="{"+i[0]+"}",n=ct(t)):null!=o&&(r+=o)}while((n.ttype!=X&&(n.ttype!=tt||e)||0==at)&&null!=n&&""!=n.output);if(n.ttype==X||n.ttype==tt){var l=r.length;if(l>2&&"{"==r.charAt(0)&&r.indexOf(",")>0){var s=r.charAt(l-2);if(")"==s||"]"==s){var p=r.charAt(6);if("("==p&&")"==s&&"}"!=n.output||"["==p&&"]"==s){var c="",d=[];d.push(0);var m=!0,f=0,g=[];g[0]=[0];var h=0,y=0,v="";for(a=1;l-1>a;a++)r.charAt(a)==p&&f++,r.charAt(a)==s&&0==--f&&","==r.charAt(a+2)&&"{"==r.charAt(a+3)&&(d.push(a+2),g[h=a+2]=[a+2]),"["!=r.charAt(a)&&"("!=r.charAt(a)&&"{"!=r.charAt(a)||y++,"]"!=r.charAt(a)&&")"!=r.charAt(a)&&"}"!=r.charAt(a)||y--,","==r.charAt(a)&&1==y&&g[h].push(a),0>y&&(h==a+1?a++:m=!1);d.push(l);var x=-1;if(0==f&&d.length>0&&m)for(a=0;d.length-1>a;a++){if(a>0&&(c+="\\\\"),0==a)if(1==g[d[a]].length)var w=[r.substr(d[a]+7,d[a+1]-d[a]-15)];else{w=[r.substring(d[a]+7,g[d[a]][1])];for(var b=2;g[d[a]].length>b;b++)w.push(r.substring(g[d[a]][b-1]+1,g[d[a]][b]));w.push(r.substring(g[d[a]][g[d[a]].length-1]+1,d[a+1]-8))}else if(1==g[d[a]].length)w=[r.substr(d[a]+8,d[a+1]-d[a]-16)];else{for(w=[r.substring(d[a]+8,g[d[a]][1])],b=2;g[d[a]].length>b;b++)w.push(r.substring(g[d[a]][b-1]+1,g[d[a]][b]));w.push(r.substring(g[d[a]][g[d[a]].length-1]+1,d[a+1]-8))}for(b=w.length-1;b>=0;b--)"{\\mid}"==w[b]?(0==a&&(v="|"+v),w.splice(b,1)):0==a&&(v="c"+v);x>0&&w.length!=x?m=!1:-1==x&&(x=w.length),c+=w.join("&")}c="\\begin{array}{"+v+"} "+c+"\\end{array}",m&&(r=c)}}}t=st(t,n.input.length),"boolean"==typeof n.invisible&&n.invisible?(r+="\\right.",u=!0):(r+=o="\\right"+mt(n),u=!0)}return at>0&&!u&&(r+="\\right."),[r,t]}function yt(t){return at=0,null==(t=(t=(t=t.replace(/(&nbsp;|\u00a0|&#160;)/g,"")).replace(/&gt;/g,">")).replace(/&lt;/g,"<")).match(/\S/)?"":ht(t.replace(/^\s+/g,""),!1)[0]}if(function(){var t,e=ot.length;for(t=0;e>t;t++)!ot[t].tex||"boolean"==typeof ot[t].notexcopy&&ot[t].notexcopy||ot.push({input:ot[t].tex,tag:ot[t].tag,output:ot[t].output,ttype:ot[t].ttype,acc:ot[t].acc||!1});!function(){var t;for(ot.sort(it),t=0;ot.length>t;t++)lt[t]=ot[t].input}()}(),"undefined"==typeof window)throw Error("The showdown katex extension can only be used in browser environment!");if(void 0===vt)var vt=window.katex||void 0;if("undefined"==typeof renderMathInElement)var xt=window.renderMathInElement||void 0;let wt=0;function bt(){return!(void 0===xt||!xt||void 0===vt||!vt)}let jt=!1;const St="katexCSS";function Et(t){const e=bt();return"undefined"==typeof window||e||jt?("function"==typeof t&&t&&t(xt),e):(jt=!0,m.loadStyleSheet(St),m.loadScript("katex").then((t=>(vt=f.interopDefault(window[t]),m.loadScript("renderMathInElement")))).then((e=>{xt=f.interopDefault(window[e]),"function"==typeof t&&t&&t(xt)})),e)}function Ot(t,e){if(bt()){const n=e.className,o=e.input,i=e.data,a=e.cssLink,r=e.options,u=e.element.ownerDocument;let l="";if(i instanceof Array)i.forEach((t=>{if(""===t)l+="<br>";else{const e=vt.renderToString(t,r);l+=a?`<div title="${o}" class="${n} css-katex" data-css="${a}">${e}</div>`:`<div title="${o}" class="${n}">${e}</div>`}}));else{const t=vt.renderToString(i,r);l=a?`<div title="${o}" class="${n} css-katex" data-css="${a}">${t}</div>`:`<div title="${o}" class="${n}">${t}</div>`}e.element.parentNode.outerHTML=l,--wt,wt||xt(u.body,r),t(!0)}else setTimeout((()=>{Ot(t,e)}),50)}function kt(t,e,n){return new Promise((o=>{let i;const a=f.createElementMeta("katex",t,(t=>{let e;i=t;const o=t.split(/\n[ \f\r\t\v]*\n/);return o.length>1?(e=[],o.forEach((t=>{""!==(t=t.trim())&&(t=n?yt(t):t),e.push(t)}))):e=n?yt(i):i,e}));if(!a)return o(!1);a.cssLink=m.getSrc(St),a.input=i,a.options=e,Ot(o,a)}))}function Ct(t){return t.replace(/[-[\]/{}()*+?.\\$^|]/g,"\\$&")}const At=(t={})=>{let e={displayMode:!0,throwOnError:!1,errorColor:"#ff0000",delimiters:null,...t};function n(t,e){return!(!t||"object"!=typeof t||!t.hasOwnProperty(e))}function o(t,e,o){return!!(n(t,e)&&n(t[e],o)&&(i=t[e][o],Array.isArray(i)&&i.length))&&(t[e][o].forEach((t=>{t.display="inline"!==o,"asciimath"===e&&(t.asciimath=!0)})),t[e][o]);var i}return Array.isArray(e.delimiters)?e.delimiters.length||(e.delimiters=[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"@@",right:"@@",display:!0,asciimath:!0},{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]):e.delimiters=[].concat(o(e.delimiters,"texmath","display")||[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0}]).concat(o(e.delimiters,"texmath","inline")||[{left:"\\(",right:"\\)",display:!1}]).concat(o(e.delimiters,"asciimath","display")||[{left:"@@",right:"@@",display:!0,asciimath:!0}]).concat(o(e.delimiters,"asciimath","inline")||[{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]),e};function $t(t){let e=0;const n=At(t),o=n.delimiters.map((({left:t,right:n,display:o,asciimath:i})=>({test:RegExp(`${Ct(t)}(.+?)${Ct(n)}`,"g"),replacer:(t,n)=>(++e,i&&(n=yt(n)),o?`\\[${n}\\]`:`\\(${n}\\)`)})));return[{type:"output",config:n,filter:function(t){const i=t.wrapper;if(!i)return!1;o.length&&i.querySelectorAll(":not(code):not(pre)").forEach((t=>{[...t.childNodes].filter((t=>"#text"===t.nodeName&&t.nodeValue.trim())).forEach((t=>{const e=o.reduce(((t,{test:e,replacer:n})=>t.replace(e,n)),t.nodeValue);t.nodeValue=e}))}));const a=i.querySelectorAll("code.latex.language-latex"),r=i.querySelectorAll("code.asciimath.language-asciimath");if(!a.length&&!r.length){if(e>0){this.config.cssLink=m.getSrc(St);const u=this;function l(t,e){bt()?(e(i.ownerDocument.body,u.config),t(!0)):setTimeout((()=>{l(t,e)}),50)}return new Promise((t=>{Et((e=>{l(t,e)}))})).then((()=>t))}return!1}return n.cssLink=m.getSrc(St),function(t,e,n){return wt=t.length+e.length,Et(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(kt(t,n,!1))})),e.forEach((t=>{i.push(kt(t,n,!0))})),Promise.all(i).then((()=>{o(!0)}))}))}(a,r,this.config).then((()=>t))}}]}const Nt="echarts";if("undefined"==typeof window)throw Error(`The showdown ${Nt} extension can only be used in browser environment!`);if(void 0===Lt)var Lt=window.echarts||void 0;function qt(){return!!Lt}let Pt=!1;function Dt(t,e){if(qt()){return e.element.parentNode.outerHTML=`<div id="${e.id}" class="${e.className}"></div>`,t(!0)}setTimeout((()=>{Dt(t,e)}),20)}function Mt(t,e,n){const o=f.createElementMeta(Nt,t);if(!o)return Promise.resolve(!1);n=JSON.stringify({...n,ssr:!1});const i=JSON.stringify(JSON.parse(o.data));return e.push({id:o.id,code:`(function() {\n let el = document.getElementById('${o.id}');\n if (el){\n let config = JSON.parse('${n}');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('${i}');\n chart.setOption(option);\n }\n })();`}),new Promise((t=>{Dt(t,o)}))}function Tt(t,e,n){return function(){const t=qt();"undefined"!=typeof window&&(t||Pt||(Pt=!0,m.loadScript(Nt).then((t=>{Lt=f.interopDefault(window[t])}))))}(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(Mt(t,e,n))})),Promise.all(i).then((()=>{o(!0)}))}))}function _t(t){return[{type:"output",config:((t={})=>({renderer:"svg",ssr:!1,width:400,height:300,tooltip:{show:!0},animation:!0,...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll(`code.${Nt}.language-${Nt}`);if(!n.length)return!1;return Tt(n,t.scripts,this.config).then((()=>t))}}]}const Ht="mermaid";if("undefined"==typeof window)throw Error("The showdown mermaid extension can only be used in browser environment!");if(void 0===Ft)var Ft=window.mermaid||void 0;function zt(){return!(void 0===Ft||!Ft)}let Rt=!1;function Bt(t,e){if(zt()){const n=e.className,o=e.element.parentNode;Ft.render(e.id,e.data).then((e=>{o.outerHTML=`<div class="${n}">${e.svg}</div>`,t(!0)}))}else setTimeout((()=>{Bt(t,e)}),10)}function Jt(t){return new Promise((e=>{const n=f.createElementMeta(Ht,t);if(!n)return e(!1);Bt(e,n)}))}function It(t,e){return function(t){const e=zt();"undefined"==typeof window||e||Rt?Ft.initialize(t):(Rt=!0,m.loadScript(Ht).then((e=>{(Ft=f.interopDefault(window[e])).initialize(t)})))}(e),new Promise((e=>{const n=[];t.forEach((t=>{n.push(Jt(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function Wt(t){return[{type:"output",config:((t={})=>({theme:"forest",logLevel:4,startOnLoad:!1,arrowMarkerAbsolute:!1,flowchart:{curve:"basis"},gantt:{axisFormat:"%m/%d/%Y"},sequence:{actorMargin:50},...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.mermaid.language-mermaid");return!!n.length&&It(n,this.config).then((()=>t))}}]}function Vt(t,e,n){var o=(3&t)<<4|e>>4,i=(15&e)<<2|n>>6,a=63&n,r="";return r+=Gt(63&t>>2),r+=Gt(63&o),r+=Gt(63&i),r+=Gt(63&a)}function Gt(t){return 10>t?String.fromCharCode(48+t):26>(t-=10)?String.fromCharCode(65+t):26>(t-=26)?String.fromCharCode(97+t):0==(t-=26)?"-":1==t?"_":"?"}function Ut(t){var e=t.charCodeAt(0);return"_"===t?63:"-"===t?62:97>e?65>e?48>e?"?":e-48:e-55:e-61}function Kt(t){var e=Ut(t[0]),n=Ut(t[1]),o=Ut(t[2]);return[e<<2|n>>4&63,n<<4&240|o>>2&15,o<<6&192|63&Ut(t[3])]}function Xt(t){return function(t){for(var e="",n=0;t.length>n;n+=3)e+=n+2==t.length?Vt(t.charCodeAt(n),t.charCodeAt(n+1),0):n+1==t.length?Vt(t.charCodeAt(n),0,0):Vt(t.charCodeAt(n),t.charCodeAt(n+1),t.charCodeAt(n+2));return e}(e.deflateRawSync(t,{level:9}).toString("binary"))}function Zt(t){return""+e.inflateRawSync(Buffer.from(function(t){var e="",n=0;for(n=0;t.length>n;n+=4){var o=Kt(t.substring(n,n+4));e+=String.fromCharCode(o[0]),e+=String.fromCharCode(o[1]),e+=String.fromCharCode(o[2])}return e}(t),"binary"))}const Qt={encodeuml:function(t){const e="@startuml",n="@enduml";return Xt(`${e}${(t.split(e)[1]+"").split(n)[0]||""}${n}`)},decodeuml:function(t){return Zt(t)}},Yt="img";let te=0;function ee(t,e){return te=t.length,new Promise((n=>{const o=[];t.forEach((t=>{o.push(function(t,e){return new Promise((n=>{const o=t.dataset.lang,i=o?JSON.parse(o):null;let a="";if(i){if("boolean"==typeof i.codeblock&&i.codeblock||"string"==typeof i.codeblock&&"true"===i.codeblock.toLowerCase())return n(!1);i.align&&("center"===i.align?a="diagram-center":"right"===i.align&&(a="diagram-right"))}const r=t.textContent.trim(),u=(t.classList.length>0?t.classList[0]:"")+(t.className&&a?" ":"")+a,l=e.imageFormat;if("svg"!==l){const o=window&&window.location.protocol,i=("http:"===o||"https:"===o?"//":"https://")+e.umlWebSite,a=l!==Yt?"."+l:"",s=Qt.encodeuml(r);return t.parentNode.outerHTML=`<div class="${u}"><img src='${i}/${l}/${s}${a}' alt=''></img></div>`,n(!0)}{const o="plantuml-"+Date.now()+"-"+Math.floor(1e4*Math.random());if("function"==typeof e.svgRender&&e.svgRender)e.svgRender(o,u,r,te).then((e=>{t.parentNode.outerHTML=`<div id="${o}" class="${u}">${e}</div>`,n(!0)}));else if("undefined"!=typeof window&&window.fetch&&window.dispatchEvent){const i=window&&window.location.protocol,a=("http:"===i||"https:"===i?"//":"https://")+e.umlWebSite,s=l!==Yt?"."+l:"",p=Qt.encodeuml(r);window.fetch(`${a}/${l}/${p}${s}`).then((t=>{if(t.ok)return t.text()})).then((e=>{t.parentNode.outerHTML=`<div id="${o}" class="${u}">${e}</div>`,n(!0)}))}}}))}(t,e))})),Promise.all(o).then((()=>{n(!0)}))}))}function ne(t){return[{type:"output",config:((t={})=>({umlWebSite:"www.plantuml.com/plantuml",imageFormat:Yt,svgRender:null,...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.plantuml.language-plantuml");return!!n.length&&ee(n,this.config).then((()=>t))}}]}const oe="railroad",ie="railroadCSS";if("undefined"==typeof window)throw Error("The showdown railroad extension can only be used in browser environment!");let ae=!1;function re(){return ae}let ue,le=!1;function se(t,e){if(re()){const n=e.id,o=e.className,i=e.cssLink,a=window.eval(e.data).format(),r=e.element.ownerDocument;return e.element.parentNode.outerHTML=i?`<div id="${n}" class="${o} css-railroad" data-css="${i}"></div>`:`<div id="${n}" class="${o}"></div>`,a.addTo(r.getElementById(n)),t(!0)}setTimeout((()=>{se(t,e)}),10)}function pe(t){return new Promise((e=>{const n=f.createElementMeta(oe,t);if(!n)return e(!1);n.cssLink=m.getSrc(ie),se(e,n)}))}function ce(t){return function(){const t=re();"undefined"!=typeof window&&(t||le||(le=!0,m.loadStyleSheet(ie),m.loadScript(oe).then((()=>{ae=!0}))))}(),new Promise((e=>{const n=[];t.forEach((t=>{n.push(pe(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function de(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.railroad.language-railroad");return!!n.length&&(this.config={cssLink:m.getSrc(ie)},ce(n).then((()=>t)))}}]}if("undefined"==typeof window)throw Error("The showdown sequence extension can only be used in browser environment!");if("undefined"!=typeof window&&window.Diagram&&(ue=window.Diagram,window.Diagram.Signal))var me=window.Diagram;const fe=["simple","hand"];if(void 0===me&&"undefined"!=typeof window)me=window.SequenceJS;function ge(){return!!me}let he=!1;const ye="sequenceCSS";function ve(t){const e=t.dataset.lang,n=e?JSON.parse(e):null;let o="";if(n){if("boolean"==typeof n.codeblock&&n.codeblock||"string"==typeof n.codeblock&&"true"===n.codeblock.toLowerCase())return;n.align&&("center"===n.align?o="diagram-center":"right"===n.align&&(o="diagram-right"))}const i=function(){const t=ge();return"undefined"!=typeof window&&(t||he||(he=!0,m.loadStyleSheet(ye),m.loadScript("WebFont").then((()=>m.loadScript("Snap"))).then((()=>m.loadScript("underscore"))).then((()=>(!ue&&window.Diagram&&(ue=window.Diagram),m.loadScript("sequence")))).then((()=>{me=window.Diagram,window.SequenceJS=me,ue&&(window.Diagram=ue)})))),t}(),a=m.getSrc(ye),r=t.textContent.trim(),u="js-sequence"+(o?" ":"")+o,l="sequence-"+Date.now()+"-"+Math.floor(1e4*Math.random());t.id=l,a&&(t.className=t.className+(t.className?" ":"")+"css-sequence",t.dataset.css=a),!i&&"undefined"!=typeof window&&window.dispatchEvent?Promise.resolve(l).then((t=>{window.dispatchEvent(new CustomEvent("sequence",{detail:{id:t,className:u,data:r,langattr:e,cssLink:a}}))})):"undefined"!=typeof window&&window.dispatchEvent&&window.dispatchEvent(new CustomEvent("sequence",{detail:{id:l,className:u,data:r,langattr:e,cssLink:a}}))}function xe(t){if(ge()){const e=t.id,n=t.className,o=t.data,i=t.cssLink;let a="hand";const r=t.langattr;if(r){const t=JSON.parse(r);t&&t.theme&&-1!=fe.indexOf(t.theme)&&(a=t.theme)}let u=window.document.getElementById(e);if(u){u.parentNode.outerHTML=i?`<div id="${e}" class="${n} css-sequence" data-css="${i}"></div>`:`<div id="${e}" class="${n}"></div>`,u=window.document.getElementById(e);return void me.parse(o).drawSVG(u||e,{theme:a})}}setTimeout((()=>{xe(t)}),50)}function we(){const t=new DOMParser;return"undefined"!=typeof window&&window.dispatchEvent&&window.addEventListener("sequence",(t=>{t.detail&&xe(t.detail)})),[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n,i=o.querySelectorAll("code.sequence.language-sequence");return i.length&&(this.config={cssLink:m.getSrc(ye)}),function(t){return!!t.length&&(t.forEach((t=>{ve(t)})),!0)}(i)?o.innerHTML:e}}]}if("undefined"==typeof window)throw Error("The showdown wavedrom extension can only be used in browser environment!");if(void 0===be)var be=window.WaveDrom||void 0;let je=0,Se=0;function Ee(){return!!be}let Oe=!1;function ke(t,e){if(Ee()){const n=e.index,o=e.id,i=e.data;let a=e.element;return a.parentNode.outerHTML=f.renderCacheElement(a.ownerDocument,o+n,e.className,(t=>{const e=window.eval(`(${i})`);be.RenderWaveForm(n,e,o);const a=document.getElementById("WaveDrom_Display_"+n);if(t!=a)for(;a.childNodes.length;)t.appendChild(a.removeChild(a.childNodes[0]))})),t(!0)}setTimeout((()=>{ke(t,e)}),10)}function Ce(t){return new Promise((e=>{const n=t.dataset.lang,o=n?JSON.parse(n):null;let i="";if(o){if("boolean"==typeof o.codeblock&&o.codeblock||"string"==typeof o.codeblock&&"true"===o.codeblock.toLowerCase())return;o.align&&("center"===o.align?i="diagram-center":"right"===o.align&&(i="diagram-right"))}const a=t.textContent.trim(),r=(t.classList.length>0?t.classList[0]:"")+(t.className&&i?" ":"")+i,u=Se;++Se,--je,je||(Se=0);const l="WaveDrom_Display_";t.id=l+u;ke(e,{element:t,index:u,id:l,className:r,data:a})}))}function Ae(t,e){return function(t){const e=Ee();e||Oe||(Oe=!0,"undefined"!=typeof window&&m.loadScript({WaveDromSkin:t}).then((()=>m.loadScript("WaveDrom"))).then((t=>{be=f.interopDefault(window[t])})))}(e),new Promise((e=>{const n=[];je=t.length,t.forEach((t=>{n.push(Ce(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function $e(t){return[{type:"output",config:((t={})=>({skin:"default",...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.wavedrom.language-wavedrom");return!!n.length&&Ae(n,this.config.skin).then((()=>t))}}]}function Ne(){return[{type:"lang",filter:(t,e)=>t.replace(/^\[\^([\d\w]+)\]:\s*((\n+(\s{2,4}|\t).+)+)$/gm,((t,n,o,i,a)=>`<div class="footnote" id="footnote-${n}"><a href="#footnote-${n}"><sup>[${n}]</sup></a>:${e.makeHtml(o.replace(RegExp("^"+a,"gm"),""))}</div>`))},{type:"lang",filter:t=>t.replace(/^\[\^([\d\w]+)\]:( |\n)((.+\n)*.+)$/gm,((t,e,n,o)=>`<small class="footnote" id="footnote-${e}"><a href="#footnote-${e}"><sup>[${e}]</sup></a>: ${o}</small>`))},{type:"lang",filter:t=>t.replace(/\[\^([\d\w]+)\]/m,((t,e)=>`<a href="#footnote-${e}"><sup>[${e}]</sup></a>`))}]}function Le(){return[{type:"lang",filter:(t,e)=>t.replace(/(?:^|\n)(?: {0,3})(:::+)(?: *)([\S]+)(?:[ \t]*)([^\s][\S\t ]*)?\n([\s\S]*?)\n(?: {0,3})\1(?:[ \t]*)\n/g,(function(t,n,o,i,a){if(o){let t=o.split("-");t.length>1?t.forEach((function(t,e,n){e>0&&(n[e]=n[e-1]+"-"+t)})):t.unshift("container"),o=t.join(" ")}return a&&(a=e.makeHtml(a)),`<div class="showdown-container ${o}">${i=i?`<p class="container-title">${i}</p>`:""}${a}</div>`}))}]}if("undefined"==typeof window)throw Error("The showdown flowchart extension can only be used in browser environment!");if(void 0===qe)var qe=window.Raphael||void 0;if(void 0===Pe)var Pe=window.flowchart||void 0;function De(){return!(void 0===qe||!qe||void 0===Pe||!Pe)}let Me=!1;function Te(t,e){if(De()){const n=e.data,o=e.options;return e.element.parentNode.outerHTML=f.renderCacheElement(e.element.ownerDocument,e.id,e.className,(t=>{Pe.parse(n).drawSVG(t,o)})),void t(!0)}setTimeout((()=>{Te(t,e)}),10)}function _e(t,e){return new Promise((n=>{const o=f.createElementMeta("flowchart",t);if(!o)return n(!1);o.options=e,Te(n,o)}))}function He(t,e,n){return function(){const t=De();"undefined"!=typeof window&&(t||Me||(Me=!0,m.loadScript("Raphael").then((t=>(qe=f.interopDefault(window[t]),m.loadScript("flowchart")))).then((t=>{Pe=f.interopDefault(window[t])}))))}(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(_e(t,n))})),e.forEach((t=>{i.push(_e(t,n))})),Promise.all(i).then((()=>{o(!0)}))}))}function Fe(t){const e=((t={})=>({"line-width":3,maxWidth:3,"line-length":50,"text-margin":10,"font-size":14,font:"normal","font-family":"Helvetica","font-weight":"normal","font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",scale:1,symbols:{start:{"font-color":"red","element-color":"green",fill:"yellow"},end:{class:"end-element"}},flowstate:{past:{fill:"#CCCCCC","font-size":12},current:{fill:"yellow","font-color":"red","font-weight":"bold"},future:{fill:"#FFFF99"},request:{fill:"blue"},invalid:{fill:"#444444"},approved:{fill:"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},rejected:{fill:"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}},...t}))(t);return[{type:"output",config:e,filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.flowchart.language-flowchart"),o=e.querySelectorAll("code.flow.language-flow");return!(!n.length&&!o.length)&&He(n,o,this.config).then((()=>t))}}]}const ze=(t={})=>({flavor:"github",...t}),Re=(t,e)=>{if(!e||"undefined"==typeof document)return!1;const n=document.body,o=document.getElementById(t);if(o){const i="script-"+t;let a=document.querySelector("#parent > #"+i);a?n.removeChild(a):(a=document.createElement("script"),a.id=i),a.type="text/javascript",a.text=e,o.appendChild(a)}return!0},Be=["github","ghost","vanilla","original","allon"],Je=["default","forest","dark","neutral"],Ie=["excel","ggplot2","quartz","vox","dark"],We=["canvas","svg"],Ve=["svg","png","jpg"],Ge={showdown:t,converter:null,defaultOptions:{showdown:ze(),plantuml:{imageFormat:"svg"},mermaid:{theme:"default"},katex:{},vega:{theme:"vox"}},defaultExtensions:{},defaultAsyncExtensions:{},markdownDecodeFilter:function(t){return""},initDefaultOptions:function(){this.defaultOptions||(this.defaultOptions={showdown:{},plantuml:{},mermaid:{},katex:{},vega:{}})},setFlavor:function(t){this.showdown.setFlavor(t),this.converter&&this.converter.setFlavor(t)},addOptions:function(t){for(const e in t)"flavor"!==e&&(this.showdown.setOption(e,t[e]),this.converter&&this.converter.setOption(e,t[e]))},addExtension:function(e,n){if(this.removeExtension(e),"string"==typeof e)try{t.extension(e,n),this.converter&&this.converter.addExtension(e)}catch(t){}},removeExtension:function(e){if("string"==typeof e){if(this.converter){let n=null;try{n=t.extension(e)}catch(t){}if(!n)return;this.converter.removeExtension(n)}t.removeExtension(e)}},addAsyncExtension:function(e,n){if(this.removeAsyncExtension(e),"string"==typeof e)try{t.asyncExtension(e,n),this.converter&&this.converter.addAsyncExtension(e)}catch(t){}},removeAsyncExtension:function(e){if("string"==typeof e){if(this.converter){let n=null;try{n=t.asyncExtension(e)}catch(t){}if(!n)return;this.converter.removeAsyncExtension(n)}t.removeAsyncExtension(e)}},setCDN:function(t,e,n){"string"==typeof t&&t&&m.setCDN(t,e,n)},setShowdownFlavor:function(t){this.initDefaultOptions(),t&&(-1===Be.indexOf(t)&&(t="github"),this.defaultOptions.showdown.flavor=t,this.setFlavor(t))},setShowdownOptions:function(t){return this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.showdown=Object.assign(this.defaultOptions.showdown||{},t),this.setShowdownFlavor(this.defaultOptions.showdown.flavor),this.addOptions(this.defaultOptions.showdown),this.defaultOptions.showdown},setPlantumlOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.plantuml=Object.assign(this.defaultOptions.plantuml||{},t);const e=this.defaultOptions.plantuml.imageFormat;return e&&-1===Ve.indexOf(e)&&(this.defaultOptions.plantuml.imageFormat="png"),this.converter&&this.addAsyncExtension("showdown-plantuml",ne(this.defaultOptions.plantuml)),this.defaultOptions.plantuml},setMermaidOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.mermaid=Object.assign(this.defaultOptions.mermaid||{},t);const e=this.defaultOptions.mermaid.theme;return e&&-1===Je.indexOf(e)&&(this.defaultOptions.mermaid.theme="default"),this.converter&&this.addAsyncExtension("showdown-mermaid",Wt(this.defaultOptions.mermaid)),this.defaultOptions.mermaid},setKatexOptions:function(t){return this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.katex=Object.assign(this.defaultOptions.katex||{},t),this.converter&&this.addAsyncExtension("showdown-katex",$t(this.defaultOptions.katex)),this.defaultOptions.katex},setVegaOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.vega=Object.assign(this.defaultOptions.vega||{},t);const e=this.defaultOptions.vega.theme;e&&-1===Ie.indexOf(e)&&(this.defaultOptions.vega.theme="vox");const n=this.defaultOptions.vega.renderer;return n&&-1===We.indexOf(n)&&(this.defaultOptions.vega.renderer="canvas"),this.converter&&this.addAsyncExtension("showdown-vega",B(this.defaultOptions.vega)),this.defaultOptions.vega},init:function(e){if(this.converter){let t={};if(t="boolean"==typeof e&&e?{option:!0,extension:!0}:e,"object"==typeof t){if(t.hasOwnProperty("option")&&t.option){const t=ze(this.defaultOptions&&this.defaultOptions.showdown||{});this.addOptions(t)}t.hasOwnProperty("extension")&&t.extension&&(this.addAsyncExtension("showdown-plantuml",ne(this.defaultOptions.plantuml)),this.addAsyncExtension("showdown-mermaid",Wt(this.defaultOptions.mermaid)),this.addAsyncExtension("showdown-vega",B(this.defaultOptions.vega)))}}else{const e=ze(this.defaultOptions&&this.defaultOptions.showdown||{}),n=((e,n={})=>{const o={"showdown-toc":k,"showdown-align":J,"showdown-footnotes":Ne,"showdown-container":Le,"showdown-sequence":we,...n};let i=[];for(let e in o)o.hasOwnProperty(e)&&(t.extension(e,o[e]),i.push(e));return i})(0,this.defaultExtensions),o=((e,n={})=>{const o=e&&e.mermaid||{},i=e&&e.katex||{},a=e&&e.vega||{},r={"showdown-plantuml":ne(e&&e.plantuml||{}),"showdown-mermaid":Wt(o),"showdown-katex":$t(i),"showdown-flowchart":Fe,"showdown-viz":D,"showdown-vega":B(a),"showdown-wavedrom":$e,"showdown-railroad":de,"showdown-abc":S,"showdown-echarts":_t,...n};let u=[];for(let e in r)r.hasOwnProperty(e)&&(t.asyncExtension(e,r[e]),u.push(e));return u})(this.defaultOptions,this.defaultAsyncExtensions);this.setFlavor(e.flavor),this.converter=new t.Converter({extensions:n}).initConvertExtObj(e.flavor,o),this.addOptions(e)}return this},makeHtml:function(e,n){let o="";if("object"==typeof e){if("string"==typeof e.content)if("string"==typeof e.type)if("zip"===e.type)o=this.zDecode(e.content);else o=this.markdownDecodeFilter(e)||e.content;else o=e.content}else o=e;if(this.converter&&o){function i(e,n,o){const i=e.querySelector(n);let a="";if(i)a=i.dataset.css;else{let e;try{e=t.extension(o)}catch{}if(!e)try{e=t.asyncExtension(o)}catch{}if(e)if(Array.isArray(e)){for(var r=0;e.length>r;++r)if(e[r].hasOwnProperty("config")&&e[r].config.hasOwnProperty("cssLink")){a=e[r].config.cssLink;break}}else"object"==typeof e&&e.hasOwnProperty("config")&&e.config.hasOwnProperty("cssLink")&&(a=e.config.cssLink)}return a}function a(t){const e=t.wrapper;return!!e&&new Promise((o=>{const a=i(e,".css-katex","showdown-katex"),r=i(e,".css-sequence","showdown-sequence"),u=i(e,".css-railroad","showdown-railroad");return t.cssTypes={hasKatex:!!a,hasSequence:!!r,hasRailroad:!!u,css:{katex:a,sequence:r,railroad:u}},"function"==typeof n&&n&&n(t.cssTypes),o(t)}))}return this.converter.asyncMakeHtml(o,a).then((t=>(o=`<div class='showdowns'>${t.html}</div>`,{html:o,scripts:t.scripts})))}return Promise.reject(o?"Converter is invaild.":"Content is empty.")},completedHtml:function(e){return t.helper.isArray(e)||(e=[e]),new Promise(((t,n)=>{for(var o=0;e.length>o;++o){const t=e[o];if(!Re(t.id,t.code))return n("Args is invaild!")}t(!0)}))},zDecode:function(t){return""+e.inflateRawSync(Buffer.from(t,"base64"))},zEncode:function(t){return e.deflateRawSync(t,{level:9}).toString("base64")}};module.exports=Ge;
6
+ "use strict";var t=require("showdown"),e=require("zlib");t.ConverterExtObj=function(e,n){let o=[],i=e;function r(e,n){if(n=n||null,t.helper.isString(e)&&(n=t.helper.stdExtName(e),e=t.asyncExtension(n),t.helper.isUndefined(e)))throw Error('Extension "'+n+'" could not be loaded. It was either not found or is not a valid aync extension.');if("function"==typeof e&&(e=e()),t.helper.isArray(e)||(e=[e]),t.validateExtension(e))for(var i=0;e.length>i;++i)if("output"===e[i].type)o.push(e[i])}n&&t.helper.forEach(n,r),this.addAsyncExtension=function(t,e){r(t,e=e||null)},this.removeAsyncExtension=function(e){t.helper.isArray(e)||(e=[e]);for(var n=0;e.length>n;++n){const t=e[n];for(var i=0;o.length>i;++i)o[i]===t&&o.splice(i,1)}},this.getAsyncExtensions=function(){return o},this.getCurrFlavor=function(){return i},this.setCurrFlavor=function(t){i=t}},t.Converter.prototype.initConvertExtObj=function(e,n){return this.extObj=new t.ConverterExtObj(e,n),this.resetOptions=function(e){e=e||{};const n=t.getOptions();let o=this.getOptions();for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);if("object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r])},this.setFlavor=function(e){let n=t.getFlavorOptions(e);if(t.helper.isUndefined(n))return;this.extObj.setCurrFlavor(e);let o=t.getDefaultOptions(!0);for(var i in o)o.hasOwnProperty(i)&&(this.getOptions()[i]=o[i]);for(var i in n)n.hasOwnProperty(i)&&(this.getOptions()[i]=n[i])},this.getFlavor=function(){return this.extObj.getCurrFlavor()},this.addAsyncExtension=function(t,e){this.extObj.addAsyncExtension(t,e)},this.removeAsyncExtension=function(t){this.extObj.removeAsyncExtension(t)},this.removeExtension=function(e){t.helper.isArray(e)||(e=[e]);const n=this.getAllExtensions();let o=n.language,i=n.output;for(var r=0;e.length>r;++r){const t=e[r];for(var a=0;o.length>a;++a)o[a]===t&&o.splice(a,1);for(var u=0;i.length>u;++u)i[u]===t&&i.splice(u,1)}},this.asyncMakeHtml=function(t,e){const n=this.makeHtml(t),o=this.extObj.getAsyncExtensions();if(!o.length)return Promise.resolve({html:n});var i={outputs:o,converter:this};const r=(new DOMParser).parseFromString(n,"text/html"),a=void 0!==r.body?r.body:r,u=this.getOptions();let s=Promise.resolve({wrapper:a,options:u,globals:i,scripts:[]});return o.forEach((function(t){s=s.then((e=>{const n=t.filter(e);return n||e}))})),s.then((t=>{if("function"==typeof e&&e){const n=e(t);if(n instanceof Promise)return n.then((t=>({html:t.wrapper.innerHTML,scripts:t.scripts})))}return{html:t.wrapper.innerHTML,scripts:t.scripts}}))},this},t.subParser("githubCodeBlocks",(function(e,n,o){return n.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,n,o),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*?)(?:[ \t]*?)((?:\{[\S\t ]*\}|\[[\S\t ]*\])?)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,i,r,a,u){var s=n.omitExtraWLInCodeBlocks?"":"\n";return u=t.subParser("encodeCode")(u,n,o),u="<pre><code"+(r?' class="'+r+" language-"+r+'"':"")+(a?` data-lang='${a}'`:"")+">"+(u=(u=(u=t.subParser("detab")(u,n,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"</code></pre>",u=t.subParser("hashBlock")(u,n,o),"\n\n¨G"+(o.ghCodeBlocks.push({text:e,codeblock:u})-1)+"G\n\n"}))).replace(/¨0/,""),o.converter._dispatch("githubCodeBlocks.after",e,n,o)):e})),t.subParser("tables",(function(e,n,o){if(!n.tables)return e;function i(t){return/^:[ \t]*--*$/.test(t)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(t)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(t)?' style="text-align:center;"':""}function r(e,i,r,a,u){if(n.tablesMerge){var s=function(t,e,o,i){if(i){if(!n.tablesRowspan||"^^"!==i||!e)return;for(var r=e-1;r>=0;--r)if(t[r][o]){if("^^"!==t[r][o])return t[r][o]=t[r][o].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,n,o){return n+' rowspan="'+(e-r+1)+'"'+o})),i;if(0===r)return t[r][o]='<td rowspan="'+(e-r+1)+'"></td>\n',i}else for(var a=o-1;a>=0;-a){if(t[r+1][a]&&"^^"!==t[r+1][a])return;if(t[r][a]){if(!t[r+1][a])return;return t[r][a]=t[r][a].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,n,o){return n+' rowspan="'+(e-r+1)+'"'+o})),i}}}else if(o)for(a=o-1;a>=0;--a)if(t[e][a]){if("^^"!==t[e][a])return t[e][a]=t[e][a].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,e,n){return e+' colspan="'+(o-a+1)+'"'+n})),i;for(r=e-1;r>=0;--r){if(t[r][a+1])return;if("^^"!==t[r][a])return t[r][a]=t[r][a].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,(function(t,e,n){return e+' colspan="'+(o-a+1)+'"'+n})),i}}else if(0===a)return t[e][a]='<td colspan="'+(o-a+1)+'"></td>\n',i}(e,i,r,a);if(!t.helper.isUndefined(s))return s}return a=a.trim(),"<td"+u+">"+t.subParser("spanGamut")(a,n,o)+"</td>\n"}function a(e,a){var u,s=e.split("\n");for(u=0;s.length>u;++u)/^ {0,3}\|/.test(s[u])&&(s[u]=s[u].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(s[u])&&(s[u]=s[u].replace(/\|[ \t]*$/,"")),s[u]=t.subParser("codeSpans")(s[u],n,o);var l,p,c,d=[],m=[],f=[],h=[],g=[];if(a)for(d=s[0].split("|").map((function(t){return t.trim()})),s.shift(),u=0;d.length>u;++u)h.push(i(d[u]));else{var y=s[0].split("|").map((function(t){return t.trim()}));if(d=s[1].split("|").map((function(t){return t.trim()})),s.shift(),s.shift(),d.length>y.length)return e;for(u=0;d.length>u;++u)h.push(i(d[u]));for(u=0;y.length>u;++u)t.helper.isUndefined(h[u])&&(h[u]=""),f.push((p=h[u],c=void 0,c="",l=(l=y[u]).trim(),(n.tablesHeaderId||n.tableHeaderId)&&(c=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),"<th"+c+p+">"+(l=t.subParser("spanGamut")(l,n,o))+"</th>\n"))}for(u=0;s.length>u;++u)""!==s[u].trim()&&m.push(s[u].split("|").map((function(t){var e=t.trim();return""===e&&t.length>0?t:e})));for(u=0;m.length>u;++u){var v=[];g.push(v);for(var w=0;h.length>w;++w)t.helper.isUndefined(m[u][w])&&(m[u][w]=""),v.push(r(g,u,w,m[u][w],h[w]))}return function(t,e,o){var i="<table>\n",r=e.length;if(t.length){i+="<thead>\n<tr>\n";for(var a=0;t.length>a;++a)i+=t[a];i+="</tr>\n</thead>\n"}for(i+="<tbody>\n",a=0;o.length>a;++a){i+="<tr>\n";for(var u=0;r>u;++u)n.tablesMerge&&"^^"===o[a][u]||(i+=o[a][u]);i+="</tr>\n"}return i+"</tbody>\n</table>\n"}(f,h,g)}function u(t){return a(t,!1)}function s(t){return a(t,!0)}return e=(e=(e=(e=o.converter._dispatch("tables.before",e,n,o)).replace(/\\(\|)/g,t.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,u)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,u),n.tablesHeaderless&&(e=(e=e.replace(/^ {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,s)).replace(/^ {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,s)),e=o.converter._dispatch("tables.after",e,n,o)}));let n="vanilla",o={github:{ghCompatibleHeaderId:!1,underline:!0,rawHeaderId:!0,tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},ghost:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},allOn:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0}},i={};t.asyncExtension=function(e,n){if(!t.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=t.helper.stdExtName(e),t.helper.isUndefined(n)){if(!i.hasOwnProperty(e))throw Error("Async Extension named "+e+" is not registered!");return i[e]}"function"==typeof n&&(n=n()),t.helper.isArray(n)||(n=[n]),t.validateExtension(n)&&(i[e]=n)},t.removeAsyncExtension=function(e){e=t.helper.stdExtName(e),delete i[e]},t.resetAsyncExtensions=function(){i={}},t.removeExtension=function(e){e=t.helper.stdExtName(e),delete t.getAllExtensions[e]};const r=t.setFlavor,a=t.getFlavorOptions;function u(t){return`${(new Date).Format("yyyy-MM-dd HH:mm:ss.S")} ${t}`}t.setFlavor=function(e){try{if(r(e),n=e,!o.hasOwnProperty(e))return}catch{if(!o.hasOwnProperty(e))return;t.resetOptions(),n=e}var i=o[e];for(var a in i)i.hasOwnProperty(a)&&(t.getOptions()[a]=i[a])},t.getFlavor=function(){return n},t.setFlavorOptions=function(t,e){e&&(o[t]=Object.assign(o[t]||{},e))},t.getFlavorOptions=function(e){const n=a(e);return t.helper.isUndefined(n)?o.hasOwnProperty(e)?o[e]:void 0:o.hasOwnProperty(e)?Object.assign(n,o[e]):n},Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};t||(t="yyyy-MM-dd hh:mm:ss.S");const n=/(y+)/.exec(t);n&&(t=t.replace(n[1],(this.getFullYear()+"").substring(4-n[1].length)));for(const n in e){const o=RegExp("("+n+")").exec(t);if(o){let i=e[n];1==o[1].length?i=("000"+e[n]).substring((""+e[n]).length):2==o[1].length&&(i=("00"+e[n]).substring((""+e[n]).length)),t=t.replace(o[1],i)}}return t};let s="jsdelivr",l="file:"===document.location.protocol?"https://":document.location.protocol+"//",p="",c="";const d={local:{ABCJS:"../node_modules/abcjs/dist/abcjs-basic.js",ABCJSCSS:"../node_modules/abcjs/abcjs-audio.css",echarts:"../node_modules/echarts/dist/echarts.js",Viz:"../node_modules/@viz-js/viz/lib/viz-standalone.js",Raphael:"../node_modules/raphael/raphael.min.js",flowchart:"../dist/diagrams/flowchart/flowchart.min.js",mermaid:"../node_modules/mermaid/dist/mermaid.js",katex:"../node_modules/katex/dist/katex.min.js",katexCSS:"../node_modules/katex/dist/katex.min.css",renderMathInElement:"../node_modules/katex/dist/contrib/auto-render.js",railroad:"../node_modules/railroad-diagrams/railroad-diagrams.js",railroadCSS:"../node_modules/railroad-diagrams/railroad-diagrams.css",Snap:"../node_modules/snapsvg/dist/snap.svg-min.js",WebFont:"../node_modules/webfontloader/webfontloader.js",underscore:"../node_modules/underscore/underscore-min.js",sequence:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js",sequenceCSS:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css",WaveDrom:"../node_modules/wavedrom/wavedrom.min.js",WaveDromSkin:{default:"../node_modules/wavedrom/skins/default.js",lowkey:"../node_modules/wavedrom/skins/lowkey.js",narrow:"../node_modules/wavedrom/skins/narrow.js"},vega:"../node_modules/vega/build/vega.js",vegaLite:"../node_modules/vega-lite/build/vega-lite.js",vegaEmbed:"../node_modules/vega-embed/build/vega-embed.js"},cdnjs:{ABCJS:l+"cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js",ABCJSCSS:l+"cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css",echarts:l+"cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js",Viz:l+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:l+"cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",flowchart:l+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:l+"cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js",katex:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js",katexCSS:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css",renderMathInElement:l+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js",railroad:l+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js",railroadCSS:l+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css",Snap:l+"cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js",WebFont:l+"cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js",underscore:l+"cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js",sequence:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js",WaveDromSkin:{default:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",lowkey:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js",narrow:l+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js"},vega:l+"cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js",vegaLite:l+"cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js",vegaEmbed:l+"cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js"},jsdelivr:{ABCJS:l+"cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js",ABCJSCSS:l+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",echarts:l+"cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",Viz:l+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:l+"cdn.jsdelivr.net/npm/raphael@2/raphael.min.js",flowchart:l+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:l+"cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js",katex:l+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js",katexCSS:l+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css",renderMathInElement:l+"cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js",railroad:l+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js",railroadCSS:l+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css",Snap:l+"cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js",WebFont:l+"cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js",underscore:l+"cdn.jsdelivr.net/npm/underscore@1/underscore-min.js",sequence:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:l+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:l+"cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js",WaveDromSkin:{default:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js",lowkey:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js",narrow:l+"cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js"},vega:l+"cdn.jsdelivr.net/npm/vega@5/build/vega.js",vegaLite:l+"cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js",vegaEmbed:l+"cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js"}};function m(t){if("object"==typeof t){const e=Object.keys(t)[0],n=t[e];if("string"==typeof n)return e+"-"+n}return t}function f(t,e){if(d.hasOwnProperty(s)){const n=d[s];let o="";if("object"==typeof t){const e=Object.keys(t)[0],i=t[e];n[e]&&"string"==typeof i&&i&&n[e][i]&&(o=n[e][i])}else n[t]&&(o=n[t]);o&&(e=o.substring(0,l.length)===l?o:"../dist/"===o.substring(0,8)?c+o:p+o)}return e}const h={setCDN:function(t,e,n){t in d&&(s=t),"string"==typeof e&&e&&(p=e),"string"==typeof n&&n&&(c=n)},getCDN:function(){return s},getSrc:f,loadScript:function(t,e){return new Promise(((n,o)=>{t&&"undefined"!=typeof document||o("Args is invaild!"),void 0===e&&(e=""),(e=f(t,e))||o(t+" script source invaild!");const i="script-"+m(t).toLowerCase();let r=document.getElementById(i);if(r)return n(t);const a=document.head||document.getElementsByTagName("head")[0];r=document.createElement("script"),r.src=e,r.id=i,r.onload=()=>{n(t)},a.appendChild(r)}))},unloadScript:function(t){t=m(t);const e=document.getElementById("script-"+t.toLowerCase());if(e){(document.head||document.getElementsByTagName("head")[0]).removeChild(e)}},loadStyleSheet:function(t,e){if(!t||"undefined"==typeof document)return"";if(void 0===e&&(e=""),!(e=f(t,e)))return"";const n="css-"+m(t).toLowerCase();if(!document.getElementById(n)){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.href=e,i.id=n,o.appendChild(i)}return"local"===s?"":e},unloadStyleSheet:function(t){t=m(t);const e=document.getElementById("css-"+t.toLowerCase());if(e){(document.head||document.getElementsByTagName("head")[0]).removeChild(e)}}};const g={interopDefault:function(t){return t&&"object"==typeof t&&"default"in t?t.default:t},loadStyle:function(t,e){if(!t||!e||"undefined"==typeof document)return!1;const n="css-"+t.toLowerCase();if(!document.getElementById(n)){const t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.id=n,o.innerText=e,t.appendChild(o)}return!0},loadScript:function(t,e){return new Promise(((n,o)=>{e&&"undefined"!=typeof document||o("Args is invaild!");const i=document.body;let r=document.getElementById(t);r?i.removeChild(r):(r=document.createElement("script"),r.id=t),r.type="text/javascript",r.text=e,i.appendChild(r),n(!0)}))},renderCacheElement:function(t,e,n,o){"undefined"!=typeof window&&window.document&&(t=window.document);const i=t.createElement("div");if(i.id=e,i.className=n,i.style.display="none",t.body.appendChild(i),"function"==typeof o&&o){const e=o(i);if(e instanceof Promise)return e.then((e=>{t.body.removeChild(e),e.style.display=""})),i.outerHTML}return t.body.removeChild(i),i.style.display="",i.outerHTML},renderElement:function(t,e,n){"undefined"!=typeof window&&window.document&&(t=window.document);const o=t.createElement("div");return o.id=e,o.className=n,t.body.appendChild(o),o},createElementMeta:function(t,e,n){const o=e.dataset.lang,i=o?JSON.parse(o):null;let r="";if(i){if("boolean"==typeof i.codeblock&&i.codeblock||"string"==typeof i.codeblock&&"true"===i.codeblock.toLowerCase())return!1;i.align&&("center"===i.align?r="diagram-center":"right"===i.align&&(r="diagram-right"))}let a=e.textContent.trim();n&&"function"==typeof n&&(a=n(a));const u=(e.classList.length>0?e.classList[0]:"")+(e.className&&r?" ":"")+r,s=t+"-"+Date.now()+"-"+Math.floor(1e4*Math.random());return e.id=s,{id:s,className:u,data:a,element:e}}},y="abc",v="ABCJSCSS";if("undefined"==typeof window)throw Error("The showdown abcjs extension can only be used in browser environment!");if(void 0===w)var w=window.ABCJS||void 0;function x(){return!!w}let b=!1;var j={add_classes:!0,responsive:"resize"};function S(t){const e=this;e.onReady=function(){},e.onStart=function(){const e=document.querySelector(`#${t} svg`),n=document.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("class","abcjs-cursor"),n.setAttributeNS(null,"x1",0),n.setAttributeNS(null,"y1",0),n.setAttributeNS(null,"x2",0),n.setAttributeNS(null,"y2",0),e.appendChild(n)},e.beatSubdivisions=2,e.onBeat=function(t,e,n){},e.onEvent=function(e){if(e.measureStart&&null===e.left)return;const n=document.querySelectorAll(`#${t} svg .highlight`);for(let t=0;n.length>t;t++)n[t].classList.remove("highlight");for(let t=0;e.elements.length>t;t++){const n=e.elements[t];for(let t=0;n.length>t;t++)n[t].classList.add("highlight")}const o=document.querySelector(`#${t} svg .abcjs-cursor`);o&&(o.setAttribute("x1",e.left-2),o.setAttribute("x2",e.left-2),o.setAttribute("y1",e.top),o.setAttribute("y2",e.top+e.height))},e.onFinished=function(){const e=document.querySelectorAll(`#${t} svg .highlight`);for(let t=0;e.length>t;t++)e[t].classList.remove("highlight");const n=document.querySelector(`#${t} svg .abcjs-cursor`);n&&(n.setAttribute("x1",0),n.setAttribute("x2",0),n.setAttribute("y1",0),n.setAttribute("y2",0))}}let E;function O(t,e,n){w.synth.supportsAudio()?(E=new w.synth.SynthController,E.load("#"+t,new S(e),{displayLoop:!0,displayRestart:!0,displayPlay:!0,displayProgress:!0,displayWarp:!0})):document.querySelector("#"+t).innerHTML="<div class='audio-error'>Audio is not supported in this browser.</div>",function(t,e,n){E.disable(!0);const o=w.renderAbc(""+t,n,j)[0];(new w.synth.CreateSynth).init({visualObj:o}).then((function(t){E&&E.setTune(o,e).then((function(t){})).catch((function(t){}))})).catch((function(t){}))}(e,!1,n)}function k(t,e,n){if(x()){const o=n.id,i=n.className,r=btoa(n.data),a=n.cssLink,u=o+"-audio";let s=a?`<div id="${o}" class="${i} css-abc" data-css="${a}"></div>`:`<div id="${o}" class="${i}"></div>`;s+=`<div id="${u}"></div>`,n.element.parentNode.outerHTML=s;return e.push({id:o,code:`(function() {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n window.dispatchEvent(new CustomEvent('abcjs',{\n detail: {\n audio: '${u}',\n render: '${o}',\n data: '${r}'\n }\n }));\n }\n })();`}),t(!0)}setTimeout((()=>{k(t,e,n)}),10)}function C(t,e){return new Promise((n=>{let o=g.createElementMeta(y,t);if(!o)return n(!1);o.cssLink=h.getSrc(v),k(n,e,o)}))}function A(t,e){return function(){const t=x();if("undefined"!=typeof window){if(b)return t;t||(b=!0,h.loadStyleSheet(v),g.loadStyle("abc-audio",".highlight{fill: #0a9ecc;} .abcjs-cursor{stroke: red;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{border: none;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed svg path{fill: #6eaa49;}"),h.loadScript("ABCJS").then((t=>{w=g.interopDefault(window[t])})))}}(),new Promise((n=>{const o=[];t.forEach((t=>{o.push(C(t,e))})),Promise.all(o).then((()=>{n(!0)}))}))}function $(){let t=!1;return[{type:"output",filter:function(e){const n=e.wrapper;if(!n)return!1;const o=n.querySelectorAll(`code.${y}.language-${y}`);return!!o.length&&(t||"undefined"!=typeof window&&window.dispatchEvent&&(t=!0,window.addEventListener("abcjs",(t=>{t.detail&&O(t.detail.audio,t.detail.render,atob(t.detail.data))}))),this.config={cssLink:h.getSrc(v)},A(o,e.scripts).then((()=>e)))}}]}function L(t,e,n,o){try{o&&(n=n.appendChild(t.ownerDocument.createElement("ul")));const i=n.appendChild(t.ownerDocument.createElement("li")).appendChild(t.ownerDocument.createElement("a"));e&&(i.appendChild(t.ownerDocument.createTextNode(e.textContent)),i.href="#"+e.id)}catch{}return n}function N(t,e,n,o){if(n.headingLevel>=o){let i=null;for(;n&&n.headingLevel>=o;)i=n,n=i.parentNode,i.parentNode=null,i.toc=null,i.headingLevel=null,i.preLevel=null;return n&&N(t,e,n,o),n}if(o>n.preLevel){for(n.preLevel++;o>n.preLevel;)n.toc=L(t,null,n.toc,!0),n.preLevel++;n.toc=L(t,e,n.toc,!0)}else{for(;n.preLevel>o;)n.toc=n.toc.parentNode,n.preLevel--;L(t,e,n.toc,!1)}return n.parentNode&&N(t,e,n.parentNode,o),n}function q(){const t=new DOMParser;return[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n;return function(t){let e=null,n=0,o=null,i=!1;const r=t.querySelectorAll("p,h1,h2,h3,h4,h5,h6");for(let a=0;r.length>a;a++)if(e=r[a],"[toc]"==e.textContent.trim().toLowerCase()){let r=t.ownerDocument.createElement("ul");r.className="showdown-toc",e.parentNode.replaceChild(r,e);let a={parentNode:null,toc:r,headingLevel:n,preLevel:0};if(o)if(n>o.headingLevel)a.parentNode=o;else{let t=o;for(;t.headingLevel>n;)t=t.parentNode;t&&(a.parentNode=n===t.headingLevel?t.parentNode:t)}o=a,i=!0}else if(e.tagName)switch(e.tagName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":n=parseInt(e.tagName.substr(1)),o&&(o.preLevel||(o.preLevel=n),o=N(t,e,o,n))}for(;o;){let t=o;o=t.parentNode,t.parentNode=null,t.toc=null,t.headingLevel=null,t.preLevel=null}return i}(o)?o.innerHTML:e}}]}if("undefined"==typeof window)throw Error("The showdown viz extension can only be used in browser environment!");if(void 0===P)var P=window.Viz||void 0;const D=["circo","dot","neato","osage","twopi"];function M(){return!(void 0===P||!P||void 0===P.instance)}let T=!1;function _(t,e){if(M()){const n=e.id,o=e.className,i=e.data,r=e.element,a=e.element.dataset.lang;let u="dot";if(a){const t=JSON.parse(a);t&&t.engine&&-1!=D.indexOf(t.engine)&&(u=t.engine)}P.instance().then((e=>{const a=e.renderString(i,{format:"svg",engine:u});r.parentNode.outerHTML=`<div id="${n}" class="${o}">${a}</div>`,t(!0)}))}else setTimeout((()=>{_(t,e)}),10)}function H(t){return new Promise((e=>{const n=g.createElementMeta("viz",t);if(!n)return e(!1);_(e,n)}))}function F(t){return function(){const t=M();if("undefined"!=typeof window){if(T)return t;t||(T=!0,h.loadScript("Viz").then((t=>{P=g.interopDefault(window[t])})))}}(),new Promise((e=>{const n=[];t.forEach((t=>{n.push(H(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function B(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.dot.language-dot");return!!n.length&&F(n).then((()=>t))}}]}const z="vega";if("undefined"==typeof window)throw Error("The showdown vega extension can only be used in browser environment!");if(void 0===R)var R=window.vegaEmbed||void 0;function J(){return!(void 0===R||!R)}let I=!1;function W(t,e,n,o){const i=g.createElementMeta(z,t);if(!i)return Promise.resolve(!1);const r=JSON.stringify(e),a=JSON.stringify(JSON.parse(i.data)),u=i.id;return n.push({id:u,code:`(function() {\n let el = document.getElementById('${u}');\n if (el){\n vegaEmbed(el, JSON.parse('${a}'), JSON.parse('${r}'));\n }\n })();`}),new Promise((t=>{G(t,i)}))}function V(t,e,n,o){return function(){const t=J();if("undefined"!=typeof window){if(I)return t;t||(I=!0,h.loadScript(z).then((()=>h.loadScript("vegaLite"))).then((()=>h.loadScript("vegaEmbed"))).then((t=>{R=g.interopDefault(window[t])})))}}(),new Promise((i=>{const r=[];t.forEach((t=>{r.push(W(t,o,n))})),e.forEach((t=>{r.push(W(t,o,n))})),Promise.all(r).then((()=>{i(!0)}))}))}function G(t,e){if(J()){return e.element.parentNode.outerHTML=`<div id="${e.id}" class="${e.className}"></div>`,t(!0)}setTimeout((()=>{G(t,e)}),10)}function U(t){const e=((t={})=>({actions:{editor:!1},theme:"vox",tooltip:!1,renderer:"svg",...t}))(t);return[{type:"output",config:e,filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.vega.language-vega"),o=e.querySelectorAll("code.vega-lite.language-vega-lite");return!(!n.length&&!o.length)&&V(n,o,t.scripts,this.config).then((()=>t))}}]}function K(){const t=new DOMParser;return[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n;return function(t){let e=null,n=null,o=!1;const i=t.querySelectorAll("p, li, h1, h2, h3, h4, h5, h6, div.paragraph");for(let t=0;i.length>t;t++)for(e=i[t],n=e.firstChild;n;){if(3===n.nodeType){let t=n.nodeValue.match(/^([\s\S]*?)([:-]-:)(?:[\s]?)([\s\S]*)$/);t&&(":-:"===t[2]?(n.nodeValue=t[3],e.className?e.className+=" align-center":e.className="align-center",o=!0):"--:"===t[2]&&(n.nodeValue=t[3],e.className?e.className+=" align-right":e.className="align-right",o=!0));break}n=n.nextSibling}return o}(o)?o.innerHTML:e}}]}var X={decimalsign:"."},Z=0,Q=1,Y=2,tt=3,et=4,nt=5,ot=6,it=7,rt=8,at=9,ut=10,st={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:ut},lt=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:Z},{input:"beta",tag:"mi",output:"β",tex:null,ttype:Z},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:Z},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:Z},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:Z},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:Z},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:Z},{input:"eta",tag:"mi",output:"η",tex:null,ttype:Z},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:Z},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:Z},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:Z},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:Z},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:Z},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:Z},{input:"lamda",tag:"mi",output:"lambda",tex:null,ttype:rt},{input:"Lamda",tag:"mi",output:"Lambda",tex:null,ttype:rt},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:Z},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:Z},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:Z},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:Z},{input:"phi",tag:"mi",output:"φ",tex:null,ttype:Z},{input:"varphi",tag:"mi",output:"ϕ",tex:null,ttype:Z},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:Z},{input:"pi",tag:"mi",output:"π",tex:null,ttype:Z},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:Z},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:Z},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:Z},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:Z},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:Z},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:Z},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:Z},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:Z},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:Z},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:Z},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:Z},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:Z},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:Z},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:Z},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:Z},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:Z},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:Z},{input:"//",tag:"mo",output:"/",tex:"/",ttype:Z,val:!0,notexcopy:!0},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:Z},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:Z},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:Z},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:Z},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:Z},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:Z},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:Z},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:rt},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:Z},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:Z},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:Z},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:Z},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:it},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:it},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:Z},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:it},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:Z},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:it},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:Z},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:it},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:Z},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:it},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:Y},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:Y},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:Z},{input:":=",tag:"mo",output:":=",tex:null,ttype:Z},{input:"lt",tag:"mo",output:"<",tex:null,ttype:Z},{input:"gt",tag:"mo",output:">",tex:null,ttype:Z},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:Z},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:Z},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:Z},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:Z},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:Z},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:Z},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:Z},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:Z},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:Z},{input:"in",tag:"mo",output:"∈",tex:null,ttype:Z},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:Z},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:Z},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:Z},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:Z},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:Z},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:Z},{input:"~=",tag:"mo",output:"≅",tex:"stackrel{\\sim}{=}",notexcopy:!0,ttype:Z},{input:"cong",tag:"mo",output:"~=",tex:null,ttype:rt},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:Z},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:Z},{input:"and",tag:"mtext",output:"and",tex:null,ttype:ot},{input:"or",tag:"mtext",output:"or",tex:null,ttype:ot},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:Z},{input:"=>",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:Z},{input:"implies",tag:"mo",output:"=>",tex:null,ttype:rt},{input:"if",tag:"mo",output:"if",tex:null,ttype:ot},{input:"<=>",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:Z},{input:"iff",tag:"mo",output:"<=>",tex:null,ttype:rt},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:Z},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:Z},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:Z},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:Z},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:Z},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:Z},{input:"(",tag:"mo",output:"(",tex:null,ttype:et,val:!0},{input:")",tag:"mo",output:")",tex:null,ttype:nt,val:!0},{input:"[",tag:"mo",output:"[",tex:null,ttype:et,val:!0},{input:"]",tag:"mo",output:"]",tex:null,ttype:nt,val:!0},{input:"left(",tag:"mo",output:"(",tex:"(",notexcopy:!0,ttype:et,val:!0},{input:"right)",tag:"mo",output:")",tex:")",notexcopy:!0,ttype:nt,val:!0},{input:"left[",tag:"mo",output:"[",tex:"[",notexcopy:!0,ttype:et,val:!0},{input:"right]",tag:"mo",output:"]",tex:"]",notexcopy:!0,ttype:nt,val:!0},{input:"{",tag:"mo",output:"{",tex:"lbrace",ttype:et},{input:"}",tag:"mo",output:"}",tex:"rbrace",ttype:nt},{input:"|",tag:"mo",output:"|",tex:null,ttype:at,val:!0},{input:"|:",tag:"mo",output:"|",tex:"|",ttype:et,notexcopy:!0,val:!0},{input:":|",tag:"mo",output:"|",tex:"|",ttype:nt,notexcopy:!0,val:!0},{input:":|:",tag:"mo",output:"|",tex:"|",ttype:Z,notexcopy:!0,val:!0},{input:"(:",tag:"mo",output:"〈",tex:"langle",ttype:et},{input:":)",tag:"mo",output:"〉",tex:"rangle",ttype:nt},{input:"<<",tag:"mo",output:"〈",tex:"langle",ttype:et},{input:">>",tag:"mo",output:"〉",tex:"rangle",ttype:nt},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:et,invisible:!0},{input:":}",tag:"mo",output:":}",tex:null,ttype:nt,invisible:!0},{input:"int",tag:"mo",output:"∫",tex:null,ttype:Z},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:rt},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:rt},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:rt},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:rt},{input:"oint",tag:"mo",output:"∮",tex:null,ttype:Z},{input:"del",tag:"mo",output:"∂",tex:"partial",ttype:Z},{input:"grad",tag:"mo",output:"∇",tex:"nabla",ttype:Z},{input:"+-",tag:"mo",output:"±",tex:"pm",ttype:Z},{input:"O/",tag:"mo",output:"∅",tex:"emptyset",ttype:Z},{input:"oo",tag:"mo",output:"∞",tex:"infty",ttype:Z},{input:"aleph",tag:"mo",output:"ℵ",tex:null,ttype:Z},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:Z},{input:":.",tag:"mo",output:"∴",tex:"therefore",ttype:Z},{input:":'",tag:"mo",output:"∵",tex:"because",ttype:Z},{input:"/_",tag:"mo",output:"∠",tex:"angle",ttype:Z},{input:"/_\\",tag:"mo",output:"△",tex:"triangle",ttype:Z},{input:"\\ ",tag:"mo",output:" ",tex:null,ttype:Z,val:!0},{input:"frown",tag:"mo",output:"⌢",tex:null,ttype:Z},{input:"%",tag:"mo",output:"%",tex:"%",ttype:Z,notexcopy:!0},{input:"quad",tag:"mo",output:"  ",tex:null,ttype:Z},{input:"qquad",tag:"mo",output:"    ",tex:null,ttype:Z},{input:"cdots",tag:"mo",output:"⋯",tex:null,ttype:Z},{input:"vdots",tag:"mo",output:"⋮",tex:null,ttype:Z},{input:"ddots",tag:"mo",output:"⋱",tex:null,ttype:Z},{input:"diamond",tag:"mo",output:"⋄",tex:null,ttype:Z},{input:"square",tag:"mo",output:"□",tex:"boxempty",ttype:Z},{input:"|__",tag:"mo",output:"⌊",tex:"lfloor",ttype:Z},{input:"__|",tag:"mo",output:"⌋",tex:"rfloor",ttype:Z},{input:"|~",tag:"mo",output:"⌈",tex:"lceil",ttype:Z},{input:"lceiling",tag:"mo",output:"|~",tex:null,ttype:rt},{input:"~|",tag:"mo",output:"⌉",tex:"rceil",ttype:Z},{input:"rceiling",tag:"mo",output:"~|",tex:null,ttype:rt},{input:"CC",tag:"mo",output:"ℂ",tex:"mathbb{C}",ttype:Z,notexcopy:!0},{input:"NN",tag:"mo",output:"ℕ",tex:"mathbb{N}",ttype:Z,notexcopy:!0},{input:"QQ",tag:"mo",output:"ℚ",tex:"mathbb{Q}",ttype:Z,notexcopy:!0},{input:"RR",tag:"mo",output:"ℝ",tex:"mathbb{R}",ttype:Z,notexcopy:!0},{input:"ZZ",tag:"mo",output:"ℤ",tex:"mathbb{Z}",ttype:Z,notexcopy:!0},{input:"f",tag:"mi",output:"f",tex:null,ttype:Q,func:!0,val:!0},{input:"g",tag:"mi",output:"g",tex:null,ttype:Q,func:!0,val:!0},{input:"''",tag:"mo",output:"''",tex:null,val:!0},{input:"'''",tag:"mo",output:"'''",tex:null,val:!0},{input:"''''",tag:"mo",output:"''''",tex:null,val:!0},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:it},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:it},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:Q,func:!0},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:Q,func:!0},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:Q,func:!0},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:Q,func:!0},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:Q,func:!0},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:Q,func:!0},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:Q,func:!0},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:Q,func:!0},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:Q,func:!0},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:Q,func:!0},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:Q,func:!0},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:Q,func:!0},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:Q,func:!0},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:Q,func:!0},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:Q,func:!0},{input:"log",tag:"mo",output:"log",tex:null,ttype:Q,func:!0},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:Q,func:!0},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:Q,notexcopy:!0,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:Q,notexcopy:!0,rewriteleftright:["\\|","\\|"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:Q,notexcopy:!0,rewriteleftright:["\\lfloor","\\rfloor"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:Q,notexcopy:!0,rewriteleftright:["\\lceil","\\rceil"]},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:Q,func:!0},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:Q,func:!0},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:Q,func:!0},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:Q,func:!0},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:Q,func:!0},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:Q,func:!0},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:Q,func:!0},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:Q,func:!0},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:Q,func:!0},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:Q,func:!0},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:Q,func:!0},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:Q,func:!0},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:Q,func:!0},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:Q,func:!0},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:Q,notexcopy:!0,rewriteleftright:["|","|"]},{input:"det",tag:"mo",output:"det",tex:null,ttype:Q,func:!0},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:Q,func:!0},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:Z},{input:"mod",tag:"mo",output:"mod",tex:"text{mod}",ttype:Z,notexcopy:!0},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:Q,func:!0},{input:"lcm",tag:"mo",output:"lcm",tex:"text{lcm}",ttype:Q,func:!0,notexcopy:!0},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:Z},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:Z},{input:"min",tag:"mo",output:"min",tex:null,ttype:it},{input:"max",tag:"mo",output:"max",tex:null,ttype:it},{input:"uarr",tag:"mo",output:"↑",tex:"uparrow",ttype:Z},{input:"darr",tag:"mo",output:"↓",tex:"downarrow",ttype:Z},{input:"rarr",tag:"mo",output:"→",tex:"rightarrow",ttype:Z},{input:"->",tag:"mo",output:"→",tex:"to",ttype:Z},{input:">->",tag:"mo",output:"↣",tex:"rightarrowtail",ttype:Z},{input:"->>",tag:"mo",output:"↠",tex:"twoheadrightarrow",ttype:Z},{input:">->>",tag:"mo",output:"⤖",tex:"twoheadrightarrowtail",ttype:Z},{input:"|->",tag:"mo",output:"↦",tex:"mapsto",ttype:Z},{input:"larr",tag:"mo",output:"←",tex:"leftarrow",ttype:Z},{input:"harr",tag:"mo",output:"↔",tex:"leftrightarrow",ttype:Z},{input:"rArr",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:Z},{input:"lArr",tag:"mo",output:"⇐",tex:"Leftarrow",ttype:Z},{input:"hArr",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:Z},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:Q},{input:"root",tag:"mroot",output:"root",tex:null,ttype:Y},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:Y},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:tt},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:Y},{input:"_",tag:"msub",output:"_",tex:null,ttype:tt},{input:"^",tag:"msup",output:"^",tex:null,ttype:tt},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:Q},{input:"Sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:Q},{input:"hat",tag:"mover",output:"^",tex:null,ttype:Q,acc:!0},{input:"bar",tag:"mover",output:"¯",tex:"overline",ttype:Q,acc:!0},{input:"vec",tag:"mover",output:"→",tex:null,ttype:Q,acc:!0},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:Q,acc:!0},{input:"dot",tag:"mover",output:".",tex:null,ttype:Q,acc:!0},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:Q,acc:!0},{input:"overarc",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:Q,acc:!0},{input:"overparen",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:Q,acc:!0},{input:"ul",tag:"munder",output:"̲",tex:"underline",ttype:Q,acc:!0},{input:"ubrace",tag:"munder",output:"⏟",tex:"underbrace",ttype:Q,acc:!0},{input:"obrace",tag:"mover",output:"⏞",tex:"overbrace",ttype:Q,acc:!0},{input:"text",tag:"mtext",output:"text",tex:null,ttype:ut},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:ut},st,{input:"color",tag:"mstyle",ttype:Y},{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:"mathbf",ttype:Q,notexcopy:!0},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:Q},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:"mathsf",ttype:Q,notexcopy:!0},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:Q},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:"mathbb",ttype:Q,notexcopy:!0},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:Q},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:"mathcal",ttype:Q,notexcopy:!0},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:Q},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:"mathtt",ttype:Q,notexcopy:!0},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:Q},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:"mathfrak",ttype:Q,notexcopy:!0},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:Q}];function pt(t,e){return t.input>e.input?1:-1}var ct,dt,mt,ft=[];function ht(t,e){var n;n="\\"==t.charAt(e)&&"\\"!=t.charAt(e+1)&&" "!=t.charAt(e+1)?t.slice(e+1):t.slice(e);for(var o=0;n.length>o&&32>=n.charCodeAt(o);o+=1);return n.slice(o)}function gt(t,e,n){if(0==n){var o,i;for(n=-1,o=t.length;o>n+1;)e>t[i=n+o>>1]?n=i:o=i;return o}for(var r=n;t.length>r&&e>t[r];r++);return r}function yt(t){for(var e,n,o,i=0,r="",a=!0,u=1;t.length>=u&&a;u++)n=t.slice(0,u),i=gt(ft,n,i),ft.length>i&&t.slice(0,ft[i].length)==ft[i]&&(e=i,u=(r=ft[i]).length),a=ft.length>i&&t.slice(0,ft[i].length)>=ft[i];if(dt=mt,""!=r)return mt=lt[e].ttype,lt[e];mt=Z,i=1,n=t.slice(0,1);for(var s=!0;n>="0"&&"9">=n&&t.length>=i;)n=t.slice(i,i+1),i++;if(n==X.decimalsign&&(n=t.slice(i,i+1))>="0"&&"9">=n)for(s=!1,i++;n>="0"&&"9">=n&&t.length>=i;)n=t.slice(i,i+1),i++;return s&&i>1||i>2?(n=t.slice(0,i-1),o="mn"):(i=2,o=("A">(n=t.slice(0,1))||n>"Z")&&("a">n||n>"z")?"mo":"mi"),"-"==n&&dt==tt?(mt=tt,{input:n,tag:o,output:n,ttype:Q,func:!0,val:!0}):{input:n,tag:o,output:n,ttype:Z,val:!0}}function vt(t){var e;if("{"==t.charAt(0)&&"}"==t.charAt(t.length-1)){var n=0;"\\left"==(e=t.substr(1,5))?"("==(e=t.charAt(6))||"["==e||"{"==e?n=7:"\\lbrace"==(e=t.substr(6,7))&&(n=13):"("!=(e=t.charAt(1))&&"["!=e||(n=2),n>0&&("\\right)}"==(e=t.substr(t.length-8))||"\\right]}"==e||"\\right.}"==e?t=(t="{"+t.substr(n)).substr(0,t.length-8)+"}":"\\rbrace}"==e&&(t=(t="{"+t.substr(n)).substr(0,t.length-14)+"}"))}return t}function wt(t){var e;return e="boolean"==typeof t.val&&t.val?"":"\\",null==t.tex?e+t.input:e+t.tex}function xt(t){var e,n,o,i,r="";if(null==(e=yt(t=ht(t,0)))||e.ttype==nt&&ct>0)return[null,t];switch(e.ttype==rt&&(e=yt(t=e.output+ht(t,e.input.length))),e.ttype){case it:case Z:t=ht(t,e.input.length);var a=wt(e);return"\\"==a.charAt(0)||"mo"==e.tag?[a,t]:["{"+a+"}",t];case et:ct++,o=jt(t=ht(t,e.input.length),!0),ct--;var u=0;return"\\right"==o[0].substr(0,6)&&(")"==(l=o[0].charAt(6))||"]"==l||"}"==l?u=6:"."==l?u=7:"\\rbrace"==(l=o[0].substr(6,7))&&(u=13)),u>0?(o[0]=o[0].substr(u),n="boolean"==typeof e.invisible&&e.invisible?"{"+o[0]+"}":"{"+wt(e)+o[0]+"}"):n="boolean"==typeof e.invisible&&e.invisible?"{\\left."+o[0]+"}":"{\\left"+wt(e)+o[0]+"}",[n,o[1]];case ut:return e!=st&&(t=ht(t,e.input.length)),-1==(i="{"==t.charAt(0)?t.indexOf("}"):"("==t.charAt(0)?t.indexOf(")"):"["==t.charAt(0)?t.indexOf("]"):e==st?t.slice(1).indexOf('"')+1:0)&&(i=t.length)," "==(l=t.slice(1,i)).charAt(0)&&(r="\\ "),r+="\\text{"+l+"}"," "==l.charAt(l.length-1)&&(r+="\\ "),[r,t=ht(t,i+1)];case Q:return null==(o=xt(t=ht(t,e.input.length)))[0]?["{"+wt(e)+"}",t]:"boolean"==typeof e.func&&e.func?"^"==(l=t.charAt(0))||"_"==l||"/"==l||"|"==l||","==l||1==e.input.length&&e.input.match(/\w/)&&"("!=l?["{"+wt(e)+"}",t]:[n="{"+wt(e)+"{"+o[0]+"}}",o[1]]:(o[0]=vt(o[0]),"sqrt"==e.input?["\\sqrt{"+o[0]+"}",o[1]]:"cancel"==e.input?["\\cancel{"+o[0]+"}",o[1]]:void 0!==e.rewriteleftright?["{\\left"+e.rewriteleftright[0]+o[0]+"\\right"+e.rewriteleftright[1]+"}",o[1]]:"boolean"==typeof e.acc&&e.acc?[wt(e)+"{"+o[0]+"}",o[1]]:["{"+wt(e)+"{"+o[0]+"}}",o[1]]);case Y:if(null==(o=xt(t=ht(t,e.input.length)))[0])return["{"+wt(e)+"}",t];o[0]=vt(o[0]);var s=xt(o[1]);return null==s[0]?["{"+wt(e)+"}",t]:(s[0]=vt(s[0]),[r="color"==e.input?"{\\color{"+o[0].replace(/[\{\}]/g,"")+"}"+s[0]+"}":"root"==e.input?"{\\sqrt["+o[0]+"]{"+s[0]+"}}":"{"+wt(e)+"{"+o[0]+"}{"+s[0]+"}}",s[1]]);case tt:return t=ht(t,e.input.length),[e.output,t];case ot:return t=ht(t,e.input.length),["{\\quad\\text{"+e.input+"}\\quad}",t];case at:ct++,o=jt(t=ht(t,e.input.length),!1),ct--;var l="";return"|"==(l=o[0].charAt(o[0].length-1))&&","!==t.charAt(0)?[n="{\\left|"+o[0]+"}",o[1]]:[n="{\\mid}",t];default:return t=ht(t,e.input.length),["{"+wt(e)+"}",t]}}function bt(t){var e,n,o,i,r;if(n=yt(t=ht(t,0)),i=(r=xt(t))[0],(e=yt(t=r[1])).ttype==tt&&"/"!=e.input){if((r=xt(t=ht(t,e.input.length)))[0]=null==r[0]?"{}":vt(r[0]),t=r[1],"_"==e.input)if("^"==(o=yt(t)).input){var a=xt(t=ht(t,o.input.length));a[0]=vt(a[0]),t=a[1],i="{"+i,i+="_{"+r[0]+"}",i+="^{"+a[0]+"}",i+="}"}else i+="_{"+r[0]+"}";else i=i+"^{"+r[0]+"}";void 0!==n.func&&n.func&&((o=yt(t)).ttype==tt||o.ttype==nt||1>=n.input.length&&o.ttype!=et||(i="{"+i+(r=bt(t))[0]+"}",t=r[1]))}return[i,t]}function jt(t,e){var n,o,i,r,a="",u=!1;do{o=(i=bt(t=ht(t,0)))[0],(n=yt(t=i[1])).ttype==tt&&"/"==n.input?((i=bt(t=ht(t,n.input.length)))[0]=null==i[0]?"{}":vt(i[0]),t=i[1],o="\\frac{"+(o=vt(o))+"}",a+=o+="{"+i[0]+"}",n=yt(t)):null!=o&&(a+=o)}while((n.ttype!=nt&&(n.ttype!=at||e)||0==ct)&&null!=n&&""!=n.output);if(n.ttype==nt||n.ttype==at){var s=a.length;if(s>2&&"{"==a.charAt(0)&&a.indexOf(",")>0){var l=a.charAt(s-2);if(")"==l||"]"==l){var p=a.charAt(6);if("("==p&&")"==l&&"}"!=n.output||"["==p&&"]"==l){var c="",d=[];d.push(0);var m=!0,f=0,h=[];h[0]=[0];var g=0,y=0,v="";for(r=1;s-1>r;r++)a.charAt(r)==p&&f++,a.charAt(r)==l&&0==--f&&","==a.charAt(r+2)&&"{"==a.charAt(r+3)&&(d.push(r+2),h[g=r+2]=[r+2]),"["!=a.charAt(r)&&"("!=a.charAt(r)&&"{"!=a.charAt(r)||y++,"]"!=a.charAt(r)&&")"!=a.charAt(r)&&"}"!=a.charAt(r)||y--,","==a.charAt(r)&&1==y&&h[g].push(r),0>y&&(g==r+1?r++:m=!1);d.push(s);var w=-1;if(0==f&&d.length>0&&m)for(r=0;d.length-1>r;r++){if(r>0&&(c+="\\\\"),0==r)if(1==h[d[r]].length)var x=[a.substr(d[r]+7,d[r+1]-d[r]-15)];else{x=[a.substring(d[r]+7,h[d[r]][1])];for(var b=2;h[d[r]].length>b;b++)x.push(a.substring(h[d[r]][b-1]+1,h[d[r]][b]));x.push(a.substring(h[d[r]][h[d[r]].length-1]+1,d[r+1]-8))}else if(1==h[d[r]].length)x=[a.substr(d[r]+8,d[r+1]-d[r]-16)];else{for(x=[a.substring(d[r]+8,h[d[r]][1])],b=2;h[d[r]].length>b;b++)x.push(a.substring(h[d[r]][b-1]+1,h[d[r]][b]));x.push(a.substring(h[d[r]][h[d[r]].length-1]+1,d[r+1]-8))}for(b=x.length-1;b>=0;b--)"{\\mid}"==x[b]?(0==r&&(v="|"+v),x.splice(b,1)):0==r&&(v="c"+v);w>0&&x.length!=w?m=!1:-1==w&&(w=x.length),c+=x.join("&")}c="\\begin{array}{"+v+"} "+c+"\\end{array}",m&&(a=c)}}}t=ht(t,n.input.length),"boolean"==typeof n.invisible&&n.invisible?(a+="\\right.",u=!0):(a+=o="\\right"+wt(n),u=!0)}return ct>0&&!u&&(a+="\\right."),[a,t]}function St(t){return ct=0,null==(t=(t=(t=t.replace(/(&nbsp;|\u00a0|&#160;)/g,"")).replace(/&gt;/g,">")).replace(/&lt;/g,"<")).match(/\S/)?"":jt(t.replace(/^\s+/g,""),!1)[0]}if(function(){var t,e=lt.length;for(t=0;e>t;t++)!lt[t].tex||"boolean"==typeof lt[t].notexcopy&&lt[t].notexcopy||lt.push({input:lt[t].tex,tag:lt[t].tag,output:lt[t].output,ttype:lt[t].ttype,acc:lt[t].acc||!1});!function(){var t;for(lt.sort(pt),t=0;lt.length>t;t++)ft[t]=lt[t].input}()}(),"undefined"==typeof window)throw Error("The showdown katex extension can only be used in browser environment!");if(void 0===Et)var Et=window.katex||void 0;if("undefined"==typeof renderMathInElement)var Ot=window.renderMathInElement||void 0;let kt=0;function Ct(){return!(void 0===Ot||!Ot||void 0===Et||!Et)}let At=!1;const $t="katexCSS";function Lt(t){const e=Ct();if("undefined"!=typeof window){if(At)return e;if(!e)return At=!0,h.loadStyleSheet($t),h.loadScript("katex").then((t=>(Et=g.interopDefault(window[t]),h.loadScript("renderMathInElement")))).then((e=>{Ot=g.interopDefault(window[e]),"function"==typeof t&&t&&t(Ot)})).catch((t=>{})),e}return"function"==typeof t&&t&&t(Ot),e}function Nt(t,e){if(Ct()){const n=e.className,o=e.input,i=e.data,r=e.cssLink,a=e.options,u=e.element.ownerDocument;let s="";if(i instanceof Array)i.forEach((t=>{if(""===t)s+="<br>";else{const e=Et.renderToString(t,a);s+=r?`<div title="${o}" class="${n} css-katex" data-css="${r}">${e}</div>`:`<div title="${o}" class="${n}">${e}</div>`}}));else{const t=Et.renderToString(i,a);s=r?`<div title="${o}" class="${n} css-katex" data-css="${r}">${t}</div>`:`<div title="${o}" class="${n}">${t}</div>`}e.element.parentNode.outerHTML=s,--kt,kt||Ot(u.body,a),t(!0)}else setTimeout((()=>{Nt(t,e)}),10)}function qt(t,e,n){return new Promise((o=>{let i;const r=g.createElementMeta("katex",t,(t=>{let e;i=t;const o=t.split(/\n[ \f\r\t\v]*\n/);return o.length>1?(e=[],o.forEach((t=>{""!==(t=t.trim())&&(t=n?St(t):t),e.push(t)}))):e=n?St(i):i,e}));if(!r)return o(!1);r.cssLink=h.getSrc($t),r.input=i,r.options=e,Nt(o,r)}))}function Pt(t){return t.replace(/[-[\]/{}()*+?.\\$^|]/g,"\\$&")}const Dt=(t={})=>{let e={displayMode:!0,throwOnError:!1,errorColor:"#ff0000",delimiters:null,...t};function n(t,e){return!(!t||"object"!=typeof t||!t.hasOwnProperty(e))}function o(t,e,o){return!!(n(t,e)&&n(t[e],o)&&(i=t[e][o],Array.isArray(i)&&i.length))&&(t[e][o].forEach((t=>{t.display="inline"!==o,"asciimath"===e&&(t.asciimath=!0)})),t[e][o]);var i}return Array.isArray(e.delimiters)?e.delimiters.length||(e.delimiters=[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"@@",right:"@@",display:!0,asciimath:!0},{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]):e.delimiters=[].concat(o(e.delimiters,"texmath","display")||[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0}]).concat(o(e.delimiters,"texmath","inline")||[{left:"\\(",right:"\\)",display:!1}]).concat(o(e.delimiters,"asciimath","display")||[{left:"@@",right:"@@",display:!0,asciimath:!0}]).concat(o(e.delimiters,"asciimath","inline")||[{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]),e};function Mt(t){let e=0;const n=Dt(t),o=n.delimiters.map((({left:t,right:n,display:o,asciimath:i})=>({test:RegExp(`${Pt(t)}(.+?)${Pt(n)}`,"g"),replacer:(t,n)=>(++e,i&&(n=St(n)),o?`\\[${n}\\]`:`\\(${n}\\)`)})));return[{type:"output",config:n,filter:function(t){e=0;const i=t.wrapper;if(!i)return!1;o.length&&i.querySelectorAll(":not(code):not(pre)").forEach((t=>{[...t.childNodes].filter((t=>"#text"===t.nodeName&&t.nodeValue.trim())).forEach((t=>{const e=o.reduce(((t,{test:e,replacer:n})=>t.replace(e,n)),t.nodeValue);t.nodeValue=e}))}));const r=i.querySelectorAll("code.latex.language-latex"),a=i.querySelectorAll("code.asciimath.language-asciimath");if(!r.length&&!a.length){if(e>0){this.config.cssLink=h.getSrc($t);const u=this;function s(t,e){Ct()?(e(i.ownerDocument.body,u.config),t(!0)):setTimeout((()=>{s(t,e)}),10)}return new Promise((t=>{Lt((e=>{s(t,e)}))})).then((()=>t))}return!1}return n.cssLink=h.getSrc($t),function(t,e,n){return kt=t.length+e.length,Lt(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(qt(t,n,!1))})),e.forEach((t=>{i.push(qt(t,n,!0))})),Promise.all(i).then((()=>{o(!0)}))}))}(r,a,this.config).then((()=>t))}}]}const Tt="echarts";if("undefined"==typeof window)throw Error(`The showdown ${Tt} extension can only be used in browser environment!`);if(void 0===_t)var _t=window.echarts||void 0;function Ht(){return!!_t}let Ft=!1;function Bt(t,e){if(Ht()){return e.element.parentNode.outerHTML=`<div id="${e.id}" class="${e.className}"></div>`,t(!0)}setTimeout((()=>{Bt(t,e)}),20)}function zt(t,e,n){const o=g.createElementMeta(Tt,t);if(!o)return Promise.resolve(!1);n=JSON.stringify({...n,ssr:!1});const i=JSON.stringify(JSON.parse(o.data));return e.push({id:o.id,code:`(function() {\n let el = document.getElementById('${o.id}');\n if (el){\n let config = JSON.parse('${n}');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('${i}');\n chart.setOption(option);\n }\n })();`}),new Promise((t=>{Bt(t,o)}))}function Rt(t,e,n){return function(){const t=Ht();if("undefined"!=typeof window){if(Ft)return t;t||(Ft=!0,h.loadScript(Tt).then((t=>{_t=g.interopDefault(window[t])})))}}(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(zt(t,e,n))})),Promise.all(i).then((()=>{o(!0)}))}))}function Jt(t){return[{type:"output",config:((t={})=>({renderer:"svg",ssr:!1,width:400,height:300,tooltip:{show:!0},animation:!0,...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll(`code.${Tt}.language-${Tt}`);return!!n.length&&Rt(n,t.scripts,this.config).then((()=>t))}}]}const It="mermaid";if("undefined"==typeof window)throw Error("The showdown mermaid extension can only be used in browser environment!");if(void 0===Wt)var Wt=window.mermaid||void 0;function Vt(){return!(void 0===Wt||!Wt)}let Gt=!1;function Ut(t,e){if(Vt()){const n=e.className,o=e.element.parentNode;Wt.render(e.id,e.data).then((e=>{o.outerHTML=`<div class="${n}">${e.svg}</div>`,t(!0)}))}else setTimeout((()=>{Ut(t,e)}),10)}function Kt(t){return new Promise((e=>{const n=g.createElementMeta(It,t);if(!n)return e(!1);Ut(e,n)}))}function Xt(t,e){return function(t){const e=Vt();if("undefined"!=typeof window){if(Gt)return e;if(!e)return Gt=!0,h.loadScript(It).then((e=>{(Wt=g.interopDefault(window[e])).initialize(t)})),e}Wt.initialize(t)}(e),new Promise((e=>{const n=[];t.forEach((t=>{n.push(Kt(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function Zt(t){return[{type:"output",config:((t={})=>({theme:"forest",logLevel:4,startOnLoad:!1,arrowMarkerAbsolute:!1,flowchart:{curve:"basis"},gantt:{axisFormat:"%m/%d/%Y"},sequence:{actorMargin:50},...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.mermaid.language-mermaid");return!!n.length&&Xt(n,this.config).then((()=>t))}}]}function Qt(t,e,n){var o=(3&t)<<4|e>>4,i=(15&e)<<2|n>>6,r=63&n,a="";return a+=Yt(63&t>>2),a+=Yt(63&o),a+=Yt(63&i),a+=Yt(63&r)}function Yt(t){return 10>t?String.fromCharCode(48+t):26>(t-=10)?String.fromCharCode(65+t):26>(t-=26)?String.fromCharCode(97+t):0==(t-=26)?"-":1==t?"_":"?"}function te(t){var e=t.charCodeAt(0);return"_"===t?63:"-"===t?62:97>e?65>e?48>e?"?":e-48:e-55:e-61}function ee(t){var e=te(t[0]),n=te(t[1]),o=te(t[2]);return[e<<2|n>>4&63,n<<4&240|o>>2&15,o<<6&192|63&te(t[3])]}function ne(t){return function(t){for(var e="",n=0;t.length>n;n+=3)e+=n+2==t.length?Qt(t.charCodeAt(n),t.charCodeAt(n+1),0):n+1==t.length?Qt(t.charCodeAt(n),0,0):Qt(t.charCodeAt(n),t.charCodeAt(n+1),t.charCodeAt(n+2));return e}(e.deflateRawSync(t,{level:9}).toString("binary"))}function oe(t){return""+e.inflateRawSync(Buffer.from(function(t){var e="",n=0;for(n=0;t.length>n;n+=4){var o=ee(t.substring(n,n+4));e+=String.fromCharCode(o[0]),e+=String.fromCharCode(o[1]),e+=String.fromCharCode(o[2])}return e}(t),"binary"))}const ie={encodeuml:function(t){const e="@startuml",n="@enduml";return ne(`${e}${(t.split(e)[1]+"").split(n)[0]||""}${n}`)},decodeuml:function(t){return oe(t)}},re="img";let ae=0;function ue(t,e){return ae=t.length,new Promise((n=>{const o=[];t.forEach((t=>{o.push(function(t,e){return new Promise((n=>{const o=t.dataset.lang,i=o?JSON.parse(o):null;let r="";if(i){if("boolean"==typeof i.codeblock&&i.codeblock||"string"==typeof i.codeblock&&"true"===i.codeblock.toLowerCase())return n(!1);i.align&&("center"===i.align?r="diagram-center":"right"===i.align&&(r="diagram-right"))}const a=t.textContent.trim(),u=(t.classList.length>0?t.classList[0]:"")+(t.className&&r?" ":"")+r,s=e.imageFormat;if("svg"!==s){const o=window&&window.location.protocol,i=("http:"===o||"https:"===o?"//":"https://")+e.umlWebSite,r=s!==re?"."+s:"",l=ie.encodeuml(a);return t.parentNode.outerHTML=`<div class="${u}"><img src='${i}/${s}/${l}${r}' alt=''></img></div>`,n(!0)}{const o="plantuml-"+Date.now()+"-"+Math.floor(1e4*Math.random());if("function"==typeof e.svgRender&&e.svgRender)e.svgRender(o,u,a,ae).then((e=>{t.parentNode.outerHTML=`<div id="${o}" class="${u}">${e}</div>`,n(!0)}));else if("undefined"!=typeof window&&window.fetch&&window.dispatchEvent){const i=window&&window.location.protocol,r=("http:"===i||"https:"===i?"//":"https://")+e.umlWebSite,l=s!==re?"."+s:"",p=ie.encodeuml(a);window.fetch(`${r}/${s}/${p}${l}`).then((t=>{if(t.ok)return t.text()})).then((e=>{t.parentNode.outerHTML=`<div id="${o}" class="${u}">${e}</div>`,n(!0)}))}}}))}(t,e))})),Promise.all(o).then((()=>{n(!0)}))}))}function se(t){return[{type:"output",config:((t={})=>({umlWebSite:"www.plantuml.com/plantuml",imageFormat:re,svgRender:null,...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.plantuml.language-plantuml");return!!n.length&&ue(n,this.config).then((()=>t))}}]}const le="railroad",pe="railroadCSS";if("undefined"==typeof window)throw Error("The showdown railroad extension can only be used in browser environment!");let ce=!1;function de(){return ce}let me,fe=!1;function he(t,e){if(de()){const n=e.id,o=e.className,i=e.cssLink,r=window.eval(e.data).format(),a=e.element.ownerDocument;return e.element.parentNode.outerHTML=i?`<div id="${n}" class="${o} css-railroad" data-css="${i}"></div>`:`<div id="${n}" class="${o}"></div>`,r.addTo(a.getElementById(n)),t(!0)}setTimeout((()=>{he(t,e)}),10)}function ge(t){return new Promise((e=>{const n=g.createElementMeta(le,t);if(!n)return e(!1);n.cssLink=h.getSrc(pe),he(e,n)}))}function ye(t){return function(){const t=de();if("undefined"!=typeof window){if(fe)return t;t||(fe=!0,h.loadStyleSheet(pe),h.loadScript(le).then((()=>{ce=!0})))}}(),new Promise((e=>{const n=[];t.forEach((t=>{n.push(ge(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function ve(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.railroad.language-railroad");return!!n.length&&(this.config={cssLink:h.getSrc(pe)},ye(n).then((()=>t)))}}]}if("undefined"==typeof window)throw Error("The showdown sequence extension can only be used in browser environment!");if(void 0===we)var we=window.Raphael||void 0;if("undefined"!=typeof window&&window.Diagram&&(me=window.Diagram,window.Diagram.Signal))var xe=window.Diagram;const be=["simple","hand"];if(void 0===xe&&"undefined"!=typeof window)xe=window.SequenceJS;function je(){return!!we}function Se(){return je()&&!!xe}let Ee=!1;const Oe="sequenceCSS";function ke(t){const e=t.dataset.lang,n=e?JSON.parse(e):null;let o="";if(n){if("boolean"==typeof n.codeblock&&n.codeblock||"string"==typeof n.codeblock&&"true"===n.codeblock.toLowerCase())return;n.align&&("center"===n.align?o="diagram-center":"right"===n.align&&(o="diagram-right"))}const i=function(){const t=Se();if("undefined"!=typeof window){if(Ee)return t;t||(Ee=!0,h.loadStyleSheet(Oe),h.loadScript("WebFont").then((()=>je()?"Raphael":h.loadScript("Raphael"))).then((t=>(we=g.interopDefault(window[t]),h.loadScript("Snap")))).then((()=>h.loadScript("underscore"))).then((()=>(!me&&window.Diagram&&(me=window.Diagram),h.loadScript("sequence")))).then((()=>{xe=window.Diagram,window.SequenceJS=xe,me&&(window.Diagram=me)})))}return t}(),r=h.getSrc(Oe),a=t.textContent.trim(),u="js-sequence"+(o?" ":"")+o,s="sequence-"+Date.now()+"-"+Math.floor(1e4*Math.random());t.id=s,r&&(t.className=t.className+(t.className?" ":"")+"css-sequence",t.dataset.css=r),!i&&"undefined"!=typeof window&&window.dispatchEvent?Promise.resolve(s).then((t=>{window.dispatchEvent(new CustomEvent("sequence",{detail:{id:t,className:u,data:a,langattr:e,cssLink:r}}))})):"undefined"!=typeof window&&window.dispatchEvent&&window.dispatchEvent(new CustomEvent("sequence",{detail:{id:s,className:u,data:a,langattr:e,cssLink:r}}))}function Ce(t){if(Se()){const e=t.id,n=t.className,o=t.data,i=t.cssLink;let r="hand";const a=t.langattr;if(a){const t=JSON.parse(a);t&&t.theme&&-1!=be.indexOf(t.theme)&&(r=t.theme)}let u=window.document.getElementById(e);if(u){u.parentNode.outerHTML=i?`<div id="${e}" class="${n} css-sequence" data-css="${i}"></div>`:`<div id="${e}" class="${n}"></div>`,u=window.document.getElementById(e);return void xe.parse(o).drawSVG(u||e,{theme:r})}}setTimeout((()=>{Ce(t)}),10)}function Ae(){let t=!1;const e=new DOMParser;return[{type:"output",filter:function(n){const o=e.parseFromString(n,"text/html"),i=void 0!==o.body?o.body:o,r=i.querySelectorAll("code.sequence.language-sequence");return r.length&&(t||"undefined"!=typeof window&&window.dispatchEvent&&(t=!0,window.addEventListener("sequence",(t=>{t.detail&&Ce(t.detail)}))),this.config={cssLink:h.getSrc(Oe)}),function(t){return!!t.length&&(t.forEach((t=>{ke(t)})),!0)}(r)?i.innerHTML:n}}]}if("undefined"==typeof window)throw Error("The showdown wavedrom extension can only be used in browser environment!");if(void 0===$e)var $e=window.WaveDrom||void 0;let Le=0,Ne=0;function qe(){return!!$e}let Pe=!1;function De(t,e){if(qe()){const n=e.index,o=e.id,i=e.data;let r=e.element;return r.parentNode.outerHTML=g.renderCacheElement(r.ownerDocument,o+n,e.className,(t=>{const e=window.eval(`(${i})`);$e.RenderWaveForm(n,e,o);const r=document.getElementById("WaveDrom_Display_"+n);if(t!=r)for(;r.childNodes.length;)t.appendChild(r.removeChild(r.childNodes[0]))})),t(!0)}setTimeout((()=>{De(t,e)}),10)}function Me(t){return new Promise((e=>{const n=t.dataset.lang,o=n?JSON.parse(n):null;let i="";if(o){if("boolean"==typeof o.codeblock&&o.codeblock||"string"==typeof o.codeblock&&"true"===o.codeblock.toLowerCase())return;o.align&&("center"===o.align?i="diagram-center":"right"===o.align&&(i="diagram-right"))}const r=t.textContent.trim(),a=(t.classList.length>0?t.classList[0]:"")+(t.className&&i?" ":"")+i,u=Ne;++Ne,--Le,Le||(Ne=0);const s="WaveDrom_Display_";t.id=s+u;De(e,{element:t,index:u,id:s,className:a,data:r})}))}function Te(t,e){return function(t){const e=qe();Pe||e||(Pe=!0,"undefined"!=typeof window&&h.loadScript({WaveDromSkin:t}).then((()=>h.loadScript("WaveDrom"))).then((t=>{$e=g.interopDefault(window[t])})))}(e),new Promise((e=>{const n=[];Le=t.length,t.forEach((t=>{n.push(Me(t))})),Promise.all(n).then((()=>{e(!0)}))}))}function _e(t){return[{type:"output",config:((t={})=>({skin:"default",...t}))(t),filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.wavedrom.language-wavedrom");return!!n.length&&(u("Begin render wavedrom elements."),Te(n,this.config.skin).then((()=>(u("End render wavedrom elements."),t))))}}]}function He(){return[{type:"lang",filter:(t,e)=>t.replace(/^\[\^([\d\w]+)\]:\s*((\n+(\s{2,4}|\t).+)+)$/gm,((t,n,o,i,r)=>`<div class="footnote" id="footnote-${n}"><a href="#footnote-${n}"><sup>[${n}]</sup></a>:${e.makeHtml(o.replace(RegExp("^"+r,"gm"),""))}</div>`))},{type:"lang",filter:t=>t.replace(/^\[\^([\d\w]+)\]:( |\n)((.+\n)*.+)$/gm,((t,e,n,o)=>`<small class="footnote" id="footnote-${e}"><a href="#footnote-${e}"><sup>[${e}]</sup></a>: ${o}</small>`))},{type:"lang",filter:t=>t.replace(/\[\^([\d\w]+)\]/m,((t,e)=>`<a href="#footnote-${e}"><sup>[${e}]</sup></a>`))}]}function Fe(){return[{type:"lang",filter:(t,e)=>t.replace(/(?:^|\n)(?: {0,3})(:::+)(?: *)([\S]+)(?:[ \t]*)([^\s][\S\t ]*)?\n([\s\S]*?)\n(?: {0,3})\1(?:[ \t]*)\n/g,(function(t,n,o,i,r){if(o){let t=o.split("-");t.length>1?t.forEach((function(t,e,n){e>0&&(n[e]=n[e-1]+"-"+t)})):t.unshift("container"),o=t.join(" ")}return r&&(r=e.makeHtml(r)),`<div class="showdown-container ${o}">${i=i?`<p class="container-title">${i}</p>`:""}${r}</div>`}))}]}if("undefined"==typeof window)throw Error("The showdown flowchart extension can only be used in browser environment!");if(void 0===Be)var Be=window.Raphael||void 0;if(void 0===ze)var ze=window.flowchart||void 0;function Re(){return!(void 0===Be||!Be||void 0===ze||!ze)}let Je=!1;function Ie(){const t=Re();if("undefined"!=typeof window){if(Je)return t;if(!t){if(Je=!0,!Be)return h.loadScript("Raphael").then((t=>(Be=g.interopDefault(window[t]),h.loadScript("flowchart")))).then((t=>{ze=g.interopDefault(window[t])})),t;h.loadScript("flowchart").then((t=>{ze=g.interopDefault(window[t])}))}}return t}function We(t,e){if(Re()){const n=e.data,o=e.options;return e.element.parentNode.outerHTML=g.renderCacheElement(e.element.ownerDocument,e.id,e.className,(t=>{ze.parse(n).drawSVG(t,o)})),void t(!0)}setTimeout((()=>{We(t,e)}),10)}function Ve(t,e){return new Promise((n=>{const o=g.createElementMeta("flowchart",t);if(!o)return n(!1);o.options=e,We(n,o)}))}function Ge(t){const e=((t={})=>({"line-width":3,maxWidth:3,"line-length":50,"text-margin":10,"font-size":14,font:"normal","font-family":"Helvetica","font-weight":"normal","font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",scale:1,symbols:{start:{"font-color":"red","element-color":"green",fill:"yellow"},end:{class:"end-element"}},flowstate:{past:{fill:"#CCCCCC","font-size":12},current:{fill:"yellow","font-color":"red","font-weight":"bold"},future:{fill:"#FFFF99"},request:{fill:"blue"},invalid:{fill:"#444444"},approved:{fill:"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},rejected:{fill:"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}},...t}))(t);return[{type:"output",config:e,filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.flowchart.language-flowchart"),o=e.querySelectorAll("code.flow.language-flow");return!(!n.length&&!o.length)&&function(t,e,n){return Ie(),new Promise((o=>{const i=[];t.forEach((t=>{i.push(Ve(t,n))})),e.forEach((t=>{i.push(Ve(t,n))})),Promise.all(i).then((()=>{o(!0)}))}))}(n,o,this.config).then((()=>t))}}]}const Ue=(t={})=>({flavor:"github",...t}),Ke=(t,e,n)=>{if(!e||"undefined"==typeof document)return!1;if(n||(n=document.getElementById(t)),n){const o="script-"+t;let i=document.querySelector(`#${n.id} > #${o}`);i?document.body.removeChild(i):(i=document.createElement("script"),i.id=o),i.type="text/javascript",i.text=e,n.appendChild(i)}return!0},Xe=["github","ghost","vanilla","original","allon"],Ze=["default","forest","dark","neutral"],Qe=["excel","ggplot2","quartz","vox","dark"],Ye=["canvas","svg"],tn=["svg","png","jpg"],en={showdown:t,converter:null,defaultOptions:{showdown:Ue(),plantuml:{imageFormat:"svg"},mermaid:{theme:"default"},katex:{},vega:{theme:"vox"}},defaultExtensions:{},defaultAsyncExtensions:{},markdownDecodeFilter:function(t){return""},initDefaultOptions:function(){this.defaultOptions||(this.defaultOptions={showdown:{},plantuml:{},mermaid:{},katex:{},vega:{}})},setFlavor:function(t){this.showdown.setFlavor(t),this.converter&&this.converter.setFlavor(t)},addOptions:function(t){for(const e in t)"flavor"!==e&&(this.showdown.setOption(e,t[e]),this.converter&&this.converter.setOption(e,t[e]))},addExtension:function(e,n){if(this.removeExtension(e),"string"==typeof e)try{t.extension(e,n),this.converter&&this.converter.addExtension(e)}catch(t){}},removeExtension:function(e){if("string"==typeof e){if(this.converter){let n=null;try{n=t.extension(e)}catch(t){}if(!n)return;this.converter.removeExtension(n)}t.removeExtension(e)}},addAsyncExtension:function(e,n){if(this.removeAsyncExtension(e),"string"==typeof e)try{t.asyncExtension(e,n),this.converter&&this.converter.addAsyncExtension(e)}catch(t){}},removeAsyncExtension:function(e){if("string"==typeof e){if(this.converter){let n=null;try{n=t.asyncExtension(e)}catch(t){}if(!n)return;this.converter.removeAsyncExtension(n)}t.removeAsyncExtension(e)}},setCDN:function(t,e,n){"string"==typeof t&&t&&h.setCDN(t,e,n)},setShowdownFlavor:function(t){this.initDefaultOptions(),t&&(-1===Xe.indexOf(t)&&(t="github"),this.defaultOptions.showdown.flavor=t,this.setFlavor(t))},setShowdownOptions:function(t){return this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.showdown=Object.assign(this.defaultOptions.showdown||{},t),this.setShowdownFlavor(this.defaultOptions.showdown.flavor),this.addOptions(this.defaultOptions.showdown),this.defaultOptions.showdown},setPlantumlOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.plantuml=Object.assign(this.defaultOptions.plantuml||{},t);const e=this.defaultOptions.plantuml.imageFormat;return e&&-1===tn.indexOf(e)&&(this.defaultOptions.plantuml.imageFormat="png"),this.converter&&this.addAsyncExtension("showdown-plantuml",se(this.defaultOptions.plantuml)),this.defaultOptions.plantuml},setMermaidOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.mermaid=Object.assign(this.defaultOptions.mermaid||{},t);const e=this.defaultOptions.mermaid.theme;return e&&-1===Ze.indexOf(e)&&(this.defaultOptions.mermaid.theme="default"),this.converter&&this.addAsyncExtension("showdown-mermaid",Zt(this.defaultOptions.mermaid)),this.defaultOptions.mermaid},setKatexOptions:function(t){return this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.katex=Object.assign(this.defaultOptions.katex||{},t),this.converter&&this.addAsyncExtension("showdown-katex",Mt(this.defaultOptions.katex)),this.defaultOptions.katex},setVegaOptions:function(t){this.initDefaultOptions(),"object"==typeof t&&t||(t={}),this.defaultOptions.vega=Object.assign(this.defaultOptions.vega||{},t);const e=this.defaultOptions.vega.theme;e&&-1===Qe.indexOf(e)&&(this.defaultOptions.vega.theme="vox");const n=this.defaultOptions.vega.renderer;return n&&-1===Ye.indexOf(n)&&(this.defaultOptions.vega.renderer="canvas"),this.converter&&this.addAsyncExtension("showdown-vega",U(this.defaultOptions.vega)),this.defaultOptions.vega},init:function(e){if(this.converter){let t={};if(t="boolean"==typeof e&&e?{option:!0,extension:!0}:e,"object"==typeof t){if(t.hasOwnProperty("option")&&t.option){const t=Ue(this.defaultOptions&&this.defaultOptions.showdown||{});this.addOptions(t)}t.hasOwnProperty("extension")&&t.extension&&(this.addAsyncExtension("showdown-plantuml",se(this.defaultOptions.plantuml)),this.addAsyncExtension("showdown-mermaid",Zt(this.defaultOptions.mermaid)),this.addAsyncExtension("showdown-vega",U(this.defaultOptions.vega)))}}else{const e=Ue(this.defaultOptions&&this.defaultOptions.showdown||{}),n=((e,n={})=>{const o={"showdown-toc":q,"showdown-align":K,"showdown-footnotes":He,"showdown-container":Fe,"showdown-sequence":Ae,...n};let i=[];for(let e in o)o.hasOwnProperty(e)&&(t.extension(e,o[e]),i.push(e));return i})(0,this.defaultExtensions),o=((e,n={})=>{const o=e&&e.mermaid||{},i=e&&e.katex||{},r=e&&e.vega||{},a={"showdown-plantuml":se(e&&e.plantuml||{}),"showdown-mermaid":Zt(o),"showdown-katex":Mt(i),"showdown-flowchart":Ge,"showdown-viz":B,"showdown-vega":U(r),"showdown-wavedrom":_e,"showdown-railroad":ve,"showdown-abc":$,"showdown-echarts":Jt,...n};let u=[];for(let e in a)a.hasOwnProperty(e)&&(t.asyncExtension(e,a[e]),u.push(e));return u})(this.defaultOptions,this.defaultAsyncExtensions);this.setFlavor(e.flavor),this.converter=new t.Converter({extensions:n}).initConvertExtObj(e.flavor,o),this.addOptions(e)}return this},makeHtml:function(e,n){let o="";if("object"==typeof e){if("string"==typeof e.content)if("string"==typeof e.type)if("zip"===e.type)o=this.zDecode(e.content);else o=this.markdownDecodeFilter(e)||e.content;else o=e.content}else o=e;if(this.converter&&o){function i(e,n,o){const i=e.querySelector(n);let r="";if(i)r=i.dataset.css;else{let e;try{e=t.extension(o)}catch{}if(!e)try{e=t.asyncExtension(o)}catch{}if(e)if(Array.isArray(e)){for(var a=0;e.length>a;++a)if(e[a].hasOwnProperty("config")&&e[a].config.hasOwnProperty("cssLink")){r=e[a].config.cssLink;break}}else"object"==typeof e&&e.hasOwnProperty("config")&&e.config.hasOwnProperty("cssLink")&&(r=e.config.cssLink)}return r}function r(t){const e=t.wrapper;return!!e&&new Promise((o=>{const r=i(e,".css-katex","showdown-katex"),a=i(e,".css-sequence","showdown-sequence"),u=i(e,".css-railroad","showdown-railroad");return t.cssTypes={hasKatex:!!r,hasSequence:!!a,hasRailroad:!!u,css:{katex:r,sequence:a,railroad:u}},"function"==typeof n&&n&&n(t.cssTypes),o(t)}))}return this.converter.asyncMakeHtml(o,r).then((t=>(o=`<div class='showdowns'>${t.html}</div>`,{html:o,scripts:t.scripts})))}return Promise.reject(o?"Converter is invaild.":"Content is empty.")},completedHtml:function(e,n){return t.helper.isArray(e)||(e=[e]),new Promise(((t,o)=>{for(var i=0;e.length>i;++i){const t=e[i];if(!Ke(t.id,t.code,n))return o("Args is invaild!")}t(!0)}))},zDecode:function(t){return""+e.inflateRawSync(Buffer.from(t,"base64"))},zEncode:function(t){return e.deflateRawSync(t,{level:9}).toString("base64")}};module.exports=en;
7
7
  //# sourceMappingURL=showdowns.core.min.js.map