summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMarc Hartmayer <hello@hartmayer.com>2020-06-03 23:04:14 +0200
committerMarc Hartmayer <hello@hartmayer.com>2020-06-03 23:10:25 +0200
commit399ddd2dabead11a0a0de903a6288f9abcffd603 (patch)
treeb5ad65d2317b44d2def571162ef70d4e7c3ef573 /packages
parent2876ce633c0b1a442992e9b5e3ec52639f947a52 (diff)
downloadwekan-399ddd2dabead11a0a0de903a6288f9abcffd603.tar.gz
wekan-399ddd2dabead11a0a0de903a6288f9abcffd603.tar.bz2
wekan-399ddd2dabead11a0a0de903a6288f9abcffd603.zip
Update `markedjs` package
Update `markedjs` to commit https://github.com/markedjs/marked/commit/7b3036f8c0440cfd003ce47dd6e1a92af0f5e822. This fixes the issue https://github.com/wekan/wekan/issues/3148.
Diffstat (limited to 'packages')
-rw-r--r--packages/markdown/marked/docs/USING_ADVANCED.md4
-rw-r--r--packages/markdown/marked/docs/USING_PRO.md269
-rw-r--r--packages/markdown/marked/docs/demo/demo.js14
-rw-r--r--packages/markdown/marked/docs/demo/worker.js60
-rw-r--r--packages/markdown/marked/docs/index.html3
-rw-r--r--packages/markdown/marked/lib/marked.esm.js2194
-rw-r--r--packages/markdown/marked/lib/marked.js2353
-rw-r--r--packages/markdown/marked/package-lock.json1346
-rw-r--r--packages/markdown/marked/package.json35
-rwxr-xr-xpackages/markdown/package.js2
10 files changed, 3976 insertions, 2304 deletions
diff --git a/packages/markdown/marked/docs/USING_ADVANCED.md b/packages/markdown/marked/docs/USING_ADVANCED.md
index 81df205b..23224d16 100644
--- a/packages/markdown/marked/docs/USING_ADVANCED.md
+++ b/packages/markdown/marked/docs/USING_ADVANCED.md
@@ -43,7 +43,7 @@ console.log(marked(markdownString));
|Member |Type |Default |Since |Notes |
|:-----------|:---------|:--------|:--------|:-------------|
|baseUrl |`string` |`null` |0.3.9 |A prefix url for any relative link. |
-|breaks |`boolean` |`false` |v0.2.7 |If true, add `<br>` on a single line break (copies GitHub). Requires `gfm` be `true`.|
+|breaks |`boolean` |`false` |v0.2.7 |If true, add `<br>` on a single line break (copies GitHub behavior on comments, but not on rendered markdown files). Requires `gfm` be `true`.|
|gfm |`boolean` |`true` |v0.2.1 |If true, use approved [GitHub Flavored Markdown (GFM) specification](https://github.github.com/gfm/).|
|headerIds |`boolean` |`true` |v0.4.0 |If true, include an `id` attribute when emitting headings (h1, h2, h3, etc).|
|headerPrefix|`string` |`''` |v0.3.0 |A string to prefix the `id` attribute when emitting headings (h1, h2, h3, etc).|
@@ -57,6 +57,8 @@ console.log(marked(markdownString));
|silent |`boolean` |`false` |v0.2.7 |If true, the parser does not throw any exception.|
|smartLists |`boolean` |`false` |v0.2.8 |If true, use smarter list behavior than those found in `markdown.pl`.|
|smartypants |`boolean` |`false` |v0.2.9 |If true, use "smart" typographic punctuation for things like quotes and dashes.|
+|tokenizer |`object` |`new Tokenizer()`|v1.0.0|An object containing functions to create tokens from markdown. See [extensibility](/#/USING_PRO.md) for more details.|
+|walkTokens |`function` |`null`|v1.1.0|A function which is called for every token. See [extensibility](/#/USING_PRO.md) for more details.|
|xhtml |`boolean` |`false` |v0.3.2 |If true, emit self-closing HTML tags for void elements (&lt;br/&gt;, &lt;img/&gt;, etc.) with a "/" as required by XHTML.|
<h2 id="highlight">Asynchronous highlighting</h2>
diff --git a/packages/markdown/marked/docs/USING_PRO.md b/packages/markdown/marked/docs/USING_PRO.md
index 5e9451be..5912d2b5 100644
--- a/packages/markdown/marked/docs/USING_PRO.md
+++ b/packages/markdown/marked/docs/USING_PRO.md
@@ -2,9 +2,21 @@
To champion the single-responsibility and open/closed principles, we have tried to make it relatively painless to extend marked. If you are looking to add custom functionality, this is the place to start.
+<h2 id="use">marked.use()</h2>
+
+`marked.use(options)` is the recommended way to extend marked. The options object can contain any [option](#/USING_ADVANCED.md#options) available in marked.
+
+The `renderer` and `tokenizer` options can be an object with functions that will be merged into the `renderer` and `tokenizer` respectively.
+
+The `renderer` and `tokenizer` functions can return false to fallback to the previous function.
+
+The `walkTokens` option can be a function that will be called with every token before rendering. When calling `use` multiple times with different `walkTokens` functions each function will be called in the **reverse** order in which they were assigned.
+
+All other options will overwrite previously set options.
+
<h2 id="renderer">The renderer</h2>
-The renderer is...
+The renderer defines the output of the parser.
**Example:** Overriding default heading token by adding an embedded anchor tag like on GitHub.
@@ -12,24 +24,25 @@ The renderer is...
// Create reference instance
const marked = require('marked');
-// Get reference
-const renderer = new marked.Renderer();
-
// Override function
-renderer.heading = function (text, level) {
- const escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
-
- return `
- <h${level}>
- <a name="${escapedText}" class="anchor" href="#${escapedText}">
- <span class="header-link"></span>
- </a>
- ${text}
- </h${level}>`;
+const renderer = {
+ heading(text, level) {
+ const escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
+
+ return `
+ <h${level}>
+ <a name="${escapedText}" class="anchor" href="#${escapedText}">
+ <span class="header-link"></span>
+ </a>
+ ${text}
+ </h${level}>`;
+ }
};
+marked.use({ renderer });
+
// Run marked
-console.log(marked('# heading+', { renderer: renderer }));
+console.log(marked('# heading+'));
```
**Output:**
@@ -58,7 +71,7 @@ console.log(marked('# heading+', { renderer: renderer }));
- tablerow(*string* content)
- tablecell(*string* content, *object* flags)
-`slugger` has the `slug` method to create an unique id from value:
+`slugger` has the `slug` method to create a unique id from value:
```js
slugger.slug('foo') // foo
@@ -89,14 +102,130 @@ slugger.slug('foo-1') // foo-1-2
- image(*string* href, *string* title, *string* text)
- text(*string* text)
-<h2 id="lexer">The lexer</h2>
+<h2 id="tokenizer">The tokenizer</h2>
+
+The tokenizer defines how to turn markdown text into tokens.
+
+**Example:** Overriding default `codespan` tokenizer to include LaTeX.
+
+```js
+// Create reference instance
+const marked = require('marked');
-The lexer is...
+// Override function
+const tokenizer = {
+ codespan(src) {
+ const match = src.match(/\$+([^\$\n]+?)\$+/);
+ if (match) {
+ return {
+ type: 'codespan',
+ raw: match[0],
+ text: match[1].trim()
+ };
+ }
+
+ // return false to use original codespan tokenizer
+ return false;
+ }
+};
+
+marked.use({ tokenizer });
+
+// Run marked
+console.log(marked('$ latex code $\n\n` other code `'));
+```
+
+**Output:**
+
+```html
+<p><code>latex code</code></p>
+<p><code>other code</code></p>
+```
+
+### Block level tokenizer methods
+
+- space(*string* src)
+- code(*string* src, *array* tokens)
+- fences(*string* src)
+- heading(*string* src)
+- nptable(*string* src)
+- hr(*string* src)
+- blockquote(*string* src)
+- list(*string* src)
+- html(*string* src)
+- def(*string* src)
+- table(*string* src)
+- lheading(*string* src)
+- paragraph(*string* src)
+- text(*string* src, *array* tokens)
+
+### Inline level tokenizer methods
+
+- escape(*string* src)
+- tag(*string* src, *bool* inLink, *bool* inRawBlock)
+- link(*string* src)
+- reflink(*string* src, *object* links)
+- strong(*string* src)
+- em(*string* src)
+- codespan(*string* src)
+- br(*string* src)
+- del(*string* src)
+- autolink(*string* src, *function* mangle)
+- url(*string* src, *function* mangle)
+- inlineText(*string* src, *bool* inRawBlock, *function* smartypants)
+
+`mangle` is a method that changes text to HTML character references:
+
+```js
+mangle('test@example.com')
+// "&#x74;&#101;&#x73;&#116;&#x40;&#101;&#120;&#x61;&#x6d;&#112;&#108;&#101;&#46;&#x63;&#111;&#x6d;"
+```
+`smartypants` is a method that translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities:
+
+https://daringfireball.net/projects/smartypants/
+
+```js
+smartypants('"this ... string"')
+// "“this … string”"
+```
+
+<h2 id="walk-tokens">Walk Tokens</h2>
+
+The walkTokens function gets called with every token. Child tokens are called before moving on to sibling tokens. Each token is passed by reference so updates are persisted when passed to the parser. The return value of the function is ignored.
+
+**Example:** Overriding heading tokens to start at h2.
+
+```js
+const marked = require('marked');
+
+// Override function
+const walkTokens = (token) => {
+ if (token.type === 'heading') {
+ token.depth += 1;
+ }
+};
+
+marked.use({ walkTokens });
+
+// Run marked
+console.log(marked('# heading 2\n\n## heading 3'));
+```
+
+**Output:**
+
+```html
+<h2 id="heading-2">heading 2</h2>
+<h3 id="heading-3">heading 3</h3>
+```
+
+<h2 id="lexer">The lexer</h2>
+
+The lexer takes a markdown string and calls the tokenizer functions.
<h2 id="parser">The parser</h2>
-The parser is...
+The parser takes tokens as input and calls the renderer functions.
***
@@ -105,30 +234,48 @@ The parser is...
You also have direct access to the lexer and parser if you so desire.
``` js
-const tokens = marked.lexer(text, options);
+const tokens = marked.lexer(markdown, options);
console.log(marked.parser(tokens, options));
```
``` js
const lexer = new marked.Lexer(options);
-const tokens = lexer.lex(text);
+const tokens = lexer.lex(markdown);
console.log(tokens);
-console.log(lexer.rules);
+console.log(lexer.tokenizer.rules.block); // block level rules used
+console.log(lexer.tokenizer.rules.inline); // inline level rules used
+console.log(marked.Lexer.rules.block); // all block level rules
+console.log(marked.Lexer.rules.inline); // all inline level rules
```
``` bash
$ node
-> require('marked').lexer('> i am using marked.')
-[ { type: 'blockquote_start' },
- { type: 'paragraph',
- text: 'i am using marked.' },
- { type: 'blockquote_end' },
- links: {} ]
+> require('marked').lexer('> I am using marked.')
+[
+ {
+ type: "blockquote",
+ raw: "> I am using marked.",
+ tokens: [
+ {
+ type: "paragraph",
+ raw: "I am using marked.",
+ text: "I am using marked.",
+ tokens: [
+ {
+ type: "text",
+ raw: "I am using marked.",
+ text: "I am using marked."
+ }
+ ]
+ }
+ ]
+ },
+ links: {}
+]
```
-The Lexers build an array of tokens, which will be passed to their respective
-Parsers. The Parsers process each token in the token arrays,
-which are removed from the array of tokens:
+The Lexer builds an array of tokens, which will be passed to the Parser.
+The Parser processes each token in the token array:
``` js
const marked = require('marked');
@@ -146,18 +293,60 @@ console.log(tokens);
const html = marked.parser(tokens);
console.log(html);
-
-console.log(tokens);
```
``` bash
-[ { type: 'heading', depth: 1, text: 'heading' },
- { type: 'paragraph', text: ' [link][1]' },
- { type: 'space' },
- links: { '1': { href: '#heading', title: 'heading' } } ]
-
+[
+ {
+ type: "heading",
+ raw: " # heading\n\n",
+ depth: 1,
+ text: "heading",
+ tokens: [
+ {
+ type: "text",
+ raw: "heading",
+ text: "heading"
+ }
+ ]
+ },
+ {
+ type: "paragraph",
+ raw: " [link][1]",
+ text: " [link][1]",
+ tokens: [
+ {
+ type: "text",
+ raw: " ",
+ text: " "
+ },
+ {
+ type: "link",
+ raw: "[link][1]",
+ text: "link",
+ href: "#heading",
+ title: "heading",
+ tokens: [
+ {
+ type: "text",
+ raw: "link",
+ text: "link"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ type: "space",
+ raw: "\n\n"
+ },
+ links: {
+ "1": {
+ href: "#heading",
+ title: "heading"
+ }
+ }
+]
<h1 id="heading">heading</h1>
<p> <a href="#heading" title="heading">link</a></p>
-
-[ links: { '1': { href: '#heading', title: 'heading' } } ]
```
diff --git a/packages/markdown/marked/docs/demo/demo.js b/packages/markdown/marked/docs/demo/demo.js
index 05649583..142d127a 100644
--- a/packages/markdown/marked/docs/demo/demo.js
+++ b/packages/markdown/marked/docs/demo/demo.js
@@ -183,7 +183,7 @@ function handleIframeLoad() {
function handleInput() {
inputDirty = true;
-};
+}
function handleVersionChange() {
if ($markedVerElem.value === 'commit' || $markedVerElem.value === 'pr') {
@@ -256,7 +256,7 @@ function handleChange(panes, visiblePane) {
}
}
return active;
-};
+}
function addCommitVersion(value, text, commit) {
if (markedVersions[value]) {
@@ -331,13 +331,13 @@ function jsonString(input) {
.replace(/[\\"']/g, '\\$&')
.replace(/\u0000/g, '\\0');
return '"' + output + '"';
-};
+}
function getScrollSize() {
var e = $activeOutputElem;
return e.scrollHeight - e.clientHeight;
-};
+}
function getScrollPercent() {
var size = getScrollSize();
@@ -347,11 +347,11 @@ function getScrollPercent() {
}
return $activeOutputElem.scrollTop / size;
-};
+}
function setScrollPercent(percent) {
$activeOutputElem.scrollTop = percent * getScrollSize();
-};
+}
function updateLink() {
var outputType = '';
@@ -446,7 +446,7 @@ function checkForChanges() {
}
}
checkChangeTimeout = window.setTimeout(checkForChanges, delayTime);
-};
+}
function setResponseTime(ms) {
var amount = ms;
diff --git a/packages/markdown/marked/docs/demo/worker.js b/packages/markdown/marked/docs/demo/worker.js
index 6a0fa032..5fb5fd86 100644
--- a/packages/markdown/marked/docs/demo/worker.js
+++ b/packages/markdown/marked/docs/demo/worker.js
@@ -1,4 +1,5 @@
/* globals marked, unfetch, ES6Promise, Promise */ // eslint-disable-line no-redeclare
+
if (!self.Promise) {
self.importScripts('https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js');
self.Promise = ES6Promise;
@@ -48,38 +49,55 @@ function parse(e) {
case 'parse':
var startTime = new Date();
var lexed = marked.lexer(e.data.markdown, e.data.options);
- var lexedList = [];
- for (var i = 0; i < lexed.length; i++) {
- var lexedLine = [];
- for (var j in lexed[i]) {
- lexedLine.push(j + ':' + jsonString(lexed[i][j]));
- }
- lexedList.push('{' + lexedLine.join(', ') + '}');
- }
+ var lexedList = jsonString(lexed);
var parsed = marked.parser(lexed, e.data.options);
var endTime = new Date();
- // setTimeout(function () {
postMessage({
task: e.data.task,
- lexed: lexedList.join('\n'),
+ lexed: lexedList,
parsed: parsed,
time: endTime - startTime
});
- // }, 10000);
break;
}
}
-function jsonString(input) {
- var output = (input + '')
- .replace(/\n/g, '\\n')
- .replace(/\r/g, '\\r')
- .replace(/\t/g, '\\t')
- .replace(/\f/g, '\\f')
- .replace(/[\\"']/g, '\\$&')
- .replace(/\u0000/g, '\\0');
- return '"' + output + '"';
-};
+function stringRepeat(char, times) {
+ var s = '';
+ for (var i = 0; i < times; i++) {
+ s += char;
+ }
+ return s;
+}
+
+function jsonString(input, level) {
+ level = level || 0;
+ if (Array.isArray(input)) {
+ if (input.length === 0) {
+ return '[]';
+ }
+ var items = [],
+ i;
+ if (!Array.isArray(input[0]) && typeof input[0] === 'object' && input[0] !== null) {
+ for (i = 0; i < input.length; i++) {
+ items.push(stringRepeat(' ', 2 * level) + jsonString(input[i], level + 1));
+ }
+ return '[\n' + items.join('\n') + '\n]';
+ }
+ for (i = 0; i < input.length; i++) {
+ items.push(jsonString(input[i], level));
+ }
+ return '[' + items.join(', ') + ']';
+ } else if (typeof input === 'object' && input !== null) {
+ var props = [];
+ for (var prop in input) {
+ props.push(prop + ':' + jsonString(input[prop], level));
+ }
+ return '{' + props.join(', ') + '}';
+ } else {
+ return JSON.stringify(input);
+ }
+}
function loadVersion(ver) {
var promise;
diff --git a/packages/markdown/marked/docs/index.html b/packages/markdown/marked/docs/index.html
index 6aed6279..a6c29308 100644
--- a/packages/markdown/marked/docs/index.html
+++ b/packages/markdown/marked/docs/index.html
@@ -154,7 +154,10 @@
<li>
<a href="#/USING_PRO.md">Extensibility</a>
<ul>
+ <li><a href="#/USING_PRO.md#use">marked.use()</a></li>
<li><a href="#/USING_PRO.md#renderer">Renderer</a></li>
+ <li><a href="#/USING_PRO.md#tokenizer">Tokenizer</a></li>
+ <li><a href="#/USING_PRO.md#walk-tokens">Walk Tokens</a></li>
<li><a href="#/USING_PRO.md#lexer">Lexer</a></li>
<li><a href="#/USING_PRO.md#parser">Parser</a></li>
</ul>
diff --git a/packages/markdown/marked/lib/marked.esm.js b/packages/markdown/marked/lib/marked.esm.js
index 8a42d378..9b149eaa 100644
--- a/packages/markdown/marked/lib/marked.esm.js
+++ b/packages/markdown/marked/lib/marked.esm.js
@@ -31,6 +31,8 @@ function getDefaults() {
silent: false,
smartLists: false,
smartypants: false,
+ tokenizer: null,
+ walkTokens: null,
xhtml: false
};
}
@@ -293,6 +295,641 @@ var helpers = {
checkSanitizeDeprecation
};
+const { defaults: defaults$1 } = defaults;
+const {
+ rtrim: rtrim$1,
+ splitCells: splitCells$1,
+ escape: escape$1,
+ findClosingBracket: findClosingBracket$1
+} = helpers;
+
+function outputLink(cap, link, raw) {
+ const href = link.href;
+ const title = link.title ? escape$1(link.title) : null;
+ const text = cap[1].replace(/\\([\[\]])/g, '$1');
+
+ if (cap[0].charAt(0) !== '!') {
+ return {
+ type: 'link',
+ raw,
+ href,
+ title,
+ text
+ };
+ } else {
+ return {
+ type: 'image',
+ raw,
+ href,
+ title,
+ text: escape$1(text)
+ };
+ }
+}
+
+function indentCodeCompensation(raw, text) {
+ const matchIndentToCode = raw.match(/^(\s+)(?:```)/);
+
+ if (matchIndentToCode === null) {
+ return text;
+ }
+
+ const indentToCode = matchIndentToCode[1];
+
+ return text
+ .split('\n')
+ .map(node => {
+ const matchIndentInNode = node.match(/^\s+/);
+ if (matchIndentInNode === null) {
+ return node;
+ }
+
+ const [indentInNode] = matchIndentInNode;
+
+ if (indentInNode.length >= indentToCode.length) {
+ return node.slice(indentToCode.length);
+ }
+
+ return node;
+ })
+ .join('\n');
+}
+
+/**
+ * Tokenizer
+ */
+var Tokenizer_1 = class Tokenizer {
+ constructor(options) {
+ this.options = options || defaults$1;
+ }
+
+ space(src) {
+ const cap = this.rules.block.newline.exec(src);
+ if (cap) {
+ if (cap[0].length > 1) {
+ return {
+ type: 'space',
+ raw: cap[0]
+ };
+ }
+ return { raw: '\n' };
+ }
+ }
+
+ code(src, tokens) {
+ const cap = this.rules.block.code.exec(src);
+ if (cap) {
+ const lastToken = tokens[tokens.length - 1];
+ // An indented code block cannot interrupt a paragraph.
+ if (lastToken && lastToken.type === 'paragraph') {
+ return {
+ raw: cap[0],
+ text: cap[0].trimRight()
+ };
+ }
+
+ const text = cap[0].replace(/^ {4}/gm, '');
+ return {
+ type: 'code',
+ raw: cap[0],
+ codeBlockStyle: 'indented',
+ text: !this.options.pedantic
+ ? rtrim$1(text, '\n')
+ : text
+ };
+ }
+ }
+
+ fences(src) {
+ const cap = this.rules.block.fences.exec(src);
+ if (cap) {
+ const raw = cap[0];
+ const text = indentCodeCompensation(raw, cap[3] || '');
+
+ return {
+ type: 'code',
+ raw,
+ lang: cap[2] ? cap[2].trim() : cap[2],
+ text
+ };
+ }
+ }
+
+ heading(src) {
+ const cap = this.rules.block.heading.exec(src);
+ if (cap) {
+ return {
+ type: 'heading',
+ raw: cap[0],
+ depth: cap[1].length,
+ text: cap[2]
+ };
+ }
+ }
+
+ nptable(src) {
+ const cap = this.rules.block.nptable.exec(src);
+ if (cap) {
+ const item = {
+ type: 'table',
+ header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+ cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [],
+ raw: cap[0]
+ };
+
+ if (item.header.length === item.align.length) {
+ let l = item.align.length;
+ let i;
+ for (i = 0; i < l; i++) {
+ if (/^ *-+: *$/.test(item.align[i])) {
+ item.align[i] = 'right';
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
+ item.align[i] = 'center';
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
+ item.align[i] = 'left';
+ } else {
+ item.align[i] = null;
+ }
+ }
+
+ l = item.cells.length;
+ for (i = 0; i < l; i++) {
+ item.cells[i] = splitCells$1(item.cells[i], item.header.length);
+ }
+
+ return item;
+ }
+ }
+ }
+
+ hr(src) {
+ const cap = this.rules.block.hr.exec(src);
+ if (cap) {
+ return {
+ type: 'hr',
+ raw: cap[0]
+ };
+ }
+ }
+
+ blockquote(src) {
+ const cap = this.rules.block.blockquote.exec(src);
+ if (cap) {
+ const text = cap[0].replace(/^ *> ?/gm, '');
+
+ return {
+ type: 'blockquote',
+ raw: cap[0],
+ text
+ };
+ }
+ }
+
+ list(src) {
+ const cap = this.rules.block.list.exec(src);
+ if (cap) {
+ let raw = cap[0];
+ const bull = cap[2];
+ const isordered = bull.length > 1;
+
+ const list = {
+ type: 'list',
+ raw,
+ ordered: isordered,
+ start: isordered ? +bull : '',
+ loose: false,
+ items: []
+ };
+
+ // Get each top-level item.
+ const itemMatch = cap[0].match(this.rules.block.item);
+
+ let next = false,
+ item,
+ space,
+ b,
+ addBack,
+ loose,
+ istask,
+ ischecked;
+
+ const l = itemMatch.length;
+ for (let i = 0; i < l; i++) {
+ item = itemMatch[i];
+ raw = item;
+
+ // Remove the list item's bullet
+ // so it is seen as the next token.
+ space = item.length;
+ item = item.replace(/^ *([*+-]|\d+\.) */, '');
+
+ // Outdent whatever the
+ // list item contains. Hacky.
+ if (~item.indexOf('\n ')) {
+ space -= item.length;
+ item = !this.options.pedantic
+ ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
+ : item.replace(/^ {1,4}/gm, '');
+ }
+
+ // Determine whether the next list item belongs here.
+ // Backpedal if it does not belong in this list.
+ if (i !== l - 1) {
+ b = this.rules.block.bullet.exec(itemMatch[i + 1])[0];
+ if (bull.length > 1 ? b.length === 1
+ : (b.length > 1 || (this.options.smartLists && b !== bull))) {
+ addBack = itemMatch.slice(i + 1).join('\n');
+ list.raw = list.raw.substring(0, list.raw.length - addBack.length);
+ i = l - 1;
+ }
+ }
+
+ // Determine whether item is loose or not.
+ // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
+ // for discount behavior.
+ loose = next || /\n\n(?!\s*$)/.test(item);
+ if (i !== l - 1) {
+ next = item.charAt(item.length - 1) === '\n';
+ if (!loose) loose = next;
+ }
+
+ if (loose) {
+ list.loose = true;
+ }
+
+ // Check for task list items
+ istask = /^\[[ xX]\] /.test(item);
+ ischecked = undefined;
+ if (istask) {
+ ischecked = item[1] !== ' ';
+ item = item.replace(/^\[[ xX]\] +/, '');
+ }
+
+ list.items.push({
+ type: 'list_item',
+ raw,
+ task: istask,
+ checked: ischecked,
+ loose: loose,
+ text: item
+ });
+ }
+
+ return list;
+ }
+ }
+
+ html(src) {
+ const cap = this.rules.block.html.exec(src);
+ if (cap) {
+ return {
+ type: this.options.sanitize
+ ? 'paragraph'
+ : 'html',
+ raw: cap[0],
+ pre: !this.options.sanitizer
+ && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
+ text: this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0])) : cap[0]
+ };
+ }
+ }
+
+ def(src) {
+ const cap = this.rules.block.def.exec(src);
+ if (cap) {
+ if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
+ const tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
+ return {
+ tag,
+ raw: cap[0],
+ href: cap[2],
+ title: cap[3]
+ };
+ }
+ }
+
+ table(src) {
+ const cap = this.rules.block.table.exec(src);
+ if (cap) {
+ const item = {
+ type: 'table',
+ header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+ cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
+ };
+
+ if (item.header.length === item.align.length) {
+ item.raw = cap[0];
+
+ let l = item.align.length;
+ let i;
+ for (i = 0; i < l; i++) {
+ if (/^ *-+: *$/.test(item.align[i])) {
+ item.align[i] = 'right';
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
+ item.align[i] = 'center';
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
+ item.align[i] = 'left';
+ } else {
+ item.align[i] = null;
+ }
+ }
+
+ l = item.cells.length;
+ for (i = 0; i < l; i++) {
+ item.cells[i] = splitCells$1(
+ item.cells[i].replace(/^ *\| *| *\| *$/g, ''),
+ item.header.length);
+ }
+
+ return item;
+ }
+ }
+ }
+
+ lheading(src) {
+ const cap = this.rules.block.lheading.exec(src);
+ if (cap) {
+ return {
+ type: 'heading',
+ raw: cap[0],
+ depth: cap[2].charAt(0) === '=' ? 1 : 2,
+ text: cap[1]
+ };
+ }
+ }
+
+ paragraph(src) {
+ const cap = this.rules.block.paragraph.exec(src);
+ if (cap) {
+ return {
+ type: 'paragraph',
+ raw: cap[0],
+ text: cap[1].charAt(cap[1].length - 1) === '\n'
+ ? cap[1].slice(0, -1)
+ : cap[1]
+ };
+ }
+ }
+
+ text(src, tokens) {
+ const cap = this.rules.block.text.exec(src);
+ if (cap) {
+ const lastToken = tokens[tokens.length - 1];
+ if (lastToken && lastToken.type === 'text') {
+ return {
+ raw: cap[0],
+ text: cap[0]
+ };
+ }
+
+ return {
+ type: 'text',
+ raw: cap[0],
+ text: cap[0]
+ };
+ }
+ }
+
+ escape(src) {
+ const cap = this.rules.inline.escape.exec(src);
+ if (cap) {
+ return {
+ type: 'escape',
+ raw: cap[0],
+ text: escape$1(cap[1])
+ };
+ }
+ }
+
+ tag(src, inLink, inRawBlock) {
+ const cap = this.rules.inline.tag.exec(src);
+ if (cap) {
+ if (!inLink && /^<a /i.test(cap[0])) {
+ inLink = true;
+ } else if (inLink && /^<\/a>/i.test(cap[0])) {
+ inLink = false;
+ }
+ if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
+ inRawBlock = true;
+ } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
+ inRawBlock = false;
+ }
+
+ return {
+ type: this.options.sanitize
+ ? 'text'
+ : 'html',
+ raw: cap[0],
+ inLink,
+ inRawBlock,
+ text: this.options.sanitize
+ ? (this.options.sanitizer
+ ? this.options.sanitizer(cap[0])
+ : escape$1(cap[0]))
+ : cap[0]
+ };
+ }
+ }
+
+ link(src) {
+ const cap = this.rules.inline.link.exec(src);
+ if (cap) {
+ const lastParenIndex = findClosingBracket$1(cap[2], '()');
+ if (lastParenIndex > -1) {
+ const start = cap[0].indexOf('!') === 0 ? 5 : 4;
+ const linkLen = start + cap[1].length + lastParenIndex;
+ cap[2] = cap[2].substring(0, lastParenIndex);
+ cap[0] = cap[0].substring(0, linkLen).trim();
+ cap[3] = '';
+ }
+ let href = cap[2];
+ let title = '';
+ if (this.options.pedantic) {
+ const link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
+
+ if (link) {
+ href = link[1];
+ title = link[3];
+ } else {
+ title = '';
+ }
+ } else {
+ title = cap[3] ? cap[3].slice(1, -1) : '';
+ }
+ href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
+ const token = outputLink(cap, {
+ href: href ? href.replace(this.rules.inline._escapes, '$1') : href,
+ title: title ? title.replace(this.rules.inline._escapes, '$1') : title
+ }, cap[0]);
+ return token;
+ }
+ }
+
+ reflink(src, links) {
+ let cap;
+ if ((cap = this.rules.inline.reflink.exec(src))
+ || (cap = this.rules.inline.nolink.exec(src))) {
+ let link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
+ link = links[link.toLowerCase()];
+ if (!link || !link.href) {
+ const text = cap[0].charAt(0);
+ return {
+ type: 'text',
+ raw: text,
+ text
+ };
+ }
+ const token = outputLink(cap, link, cap[0]);
+ return token;
+ }
+ }
+
+ strong(src) {
+ const cap = this.rules.inline.strong.exec(src);
+ if (cap) {
+ return {
+ type: 'strong',
+ raw: cap[0],
+ text: cap[4] || cap[3] || cap[2] || cap[1]
+ };
+ }
+ }
+
+ em(src) {
+ const cap = this.rules.inline.em.exec(src);
+ if (cap) {
+ return {
+ type: 'em',
+ raw: cap[0],
+ text: cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]
+ };
+ }
+ }
+
+ codespan(src) {
+ const cap = this.rules.inline.code.exec(src);
+ if (cap) {
+ let text = cap[2].replace(/\n/g, ' ');
+ const hasNonSpaceChars = /[^ ]/.test(text);
+ const hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' ');
+ if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
+ text = text.substring(1, text.length - 1);
+ }
+ text = escape$1(text, true);
+ return {
+ type: 'codespan',
+ raw: cap[0],
+ text
+ };
+ }
+ }
+
+ br(src) {
+ const cap = this.rules.inline.br.exec(src);
+ if (cap) {
+ return {
+ type: 'br',
+ raw: cap[0]
+ };
+ }
+ }
+
+ del(src) {
+ const cap = this.rules.inline.del.exec(src);
+ if (cap) {
+ return {
+ type: 'del',
+ raw: cap[0],
+ text: cap[1]
+ };
+ }
+ }
+
+ autolink(src, mangle) {
+ const cap = this.rules.inline.autolink.exec(src);
+ if (cap) {
+ let text, href;
+ if (cap[2] === '@') {
+ text = escape$1(this.options.mangle ? mangle(cap[1]) : cap[1]);
+ href = 'mailto:' + text;
+ } else {
+ text = escape$1(cap[1]);
+ href = text;
+ }
+
+ return {
+ type: 'link',
+ raw: cap[0],
+ text,
+ href,
+ tokens: [
+ {
+ type: 'text',
+ raw: text,
+ text
+ }
+ ]
+ };
+ }
+ }
+
+ url(src, mangle) {
+ let cap;
+ if (cap = this.rules.inline.url.exec(src)) {
+ let text, href;
+ if (cap[2] === '@') {
+ text = escape$1(this.options.mangle ? mangle(cap[0]) : cap[0]);
+ href = 'mailto:' + text;
+ } else {
+ // do extended autolink path validation
+ let prevCapZero;
+ do {
+ prevCapZero = cap[0];
+ cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];
+ } while (prevCapZero !== cap[0]);
+ text = escape$1(cap[0]);
+ if (cap[1] === 'www.') {
+ href = 'http://' + text;
+ } else {
+ href = text;
+ }
+ }
+ return {
+ type: 'link',
+ raw: cap[0],
+ text,
+ href,
+ tokens: [
+ {
+ type: 'text',
+ raw: text,
+ text
+ }
+ ]
+ };
+ }
+ }
+
+ inlineText(src, inRawBlock, smartypants) {
+ const cap = this.rules.inline.text.exec(src);
+ if (cap) {
+ let text;
+ if (inRawBlock) {
+ text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0])) : cap[0];
+ } else {
+ text = escape$1(this.options.smartypants ? smartypants(cap[0]) : cap[0]);
+ }
+ return {
+ type: 'text',
+ raw: cap[0],
+ text
+ };
+ }
+ }
+};
+
const {
noopTest: noopTest$1,
edit: edit$1,
@@ -388,22 +1025,34 @@ block.normal = merge$1({}, block);
*/
block.gfm = merge$1({}, block.normal, {
- nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
+ nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header
+ + ' *([-:]+ *\\|[-| :]*)' // Align
+ + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells
table: '^ *\\|(.+)\\n' // Header
+ ' *\\|?( *[-:]+[-| :]*)' // Align
- + '(?:\\n((?:(?!^|>|\\n| |hr|heading|lheading|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+ + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
});
+block.gfm.nptable = edit$1(block.gfm.nptable)
+ .replace('hr', block.hr)
+ .replace('heading', ' {0,3}#{1,6} ')
+ .replace('blockquote', ' {0,3}>')
+ .replace('code', ' {4}[^\\n]')
+ .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
+ .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
+ .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)')
+ .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks
+ .getRegex();
+
block.gfm.table = edit$1(block.gfm.table)
.replace('hr', block.hr)
.replace('heading', ' {0,3}#{1,6} ')
- .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
.replace('blockquote', ' {0,3}>')
.replace('code', ' {4}[^\\n]')
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
.replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)')
- .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
+ .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks
.getRegex();
/**
@@ -452,7 +1101,7 @@ const inline = {
reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
- em: /^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
+ em: /^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\s,punctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\s,punctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
br: /^( {2,}|\\)\n(?!\s*$)/,
del: noopTest$1,
@@ -461,7 +1110,8 @@ const inline = {
// list of punctuation marks from common mark spec
// without ` and ] to workaround Rule 17 (inline code blocks/links)
-inline._punctuation = '!"#$%&\'()*+,\\-./:;<=>?@\\[^_{|}~';
+// without , to work around example 393
+inline._punctuation = '!"#$%&\'()*+\\-./:;<=>?@\\[^_{|}~';
inline.em = edit$1(inline.em).replace(/punctuation/g, inline._punctuation).getRegex();
inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
@@ -480,7 +1130,7 @@ inline.tag = edit$1(inline.tag)
.replace('attribute', inline._attribute)
.getRegex();
-inline._label = /(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
+inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/;
inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
@@ -548,13 +1198,49 @@ var rules = {
inline
};
-const { defaults: defaults$1 } = defaults;
-const { block: block$1 } = rules;
-const {
- rtrim: rtrim$1,
- splitCells: splitCells$1,
- escape: escape$1
-} = helpers;
+const { defaults: defaults$2 } = defaults;
+const { block: block$1, inline: inline$1 } = rules;
+
+/**
+ * smartypants text replacement
+ */
+function smartypants(text) {
+ return text
+ // em-dashes
+ .replace(/---/g, '\u2014')
+ // en-dashes
+ .replace(/--/g, '\u2013')
+ // opening singles
+ .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
+ // closing singles & apostrophes
+ .replace(/'/g, '\u2019')
+ // opening doubles
+ .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
+ // closing doubles
+ .replace(/"/g, '\u201d')
+ // ellipses
+ .replace(/\.{3}/g, '\u2026');
+}
+
+/**
+ * mangle email addresses
+ */
+function mangle(text) {
+ let out = '',
+ i,
+ ch;
+
+ const l = text.length;
+ for (i = 0; i < l; i++) {
+ ch = text.charCodeAt(i);
+ if (Math.random() > 0.5) {
+ ch = 'x' + ch.toString(16);
+ }
+ out += '&#' + ch + ';';
+ }
+
+ return out;
+}
/**
* Block Lexer
@@ -563,21 +1249,38 @@ var Lexer_1 = class Lexer {
constructor(options) {
this.tokens = [];
this.tokens.links = Object.create(null);
- this.options = options || defaults$1;
- this.rules = block$1.normal;
+ this.options = options || defaults$2;
+ this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();
+ this.tokenizer = this.options.tokenizer;
+ this.tokenizer.options = this.options;
+
+ const rules = {
+ block: block$1.normal,
+ inline: inline$1.normal
+ };
if (this.options.pedantic) {
- this.rules = block$1.pedantic;
+ rules.block = block$1.pedantic;
+ rules.inline = inline$1.pedantic;
} else if (this.options.gfm) {
- this.rules = block$1.gfm;
+ rules.block = block$1.gfm;
+ if (this.options.breaks) {
+ rules.inline = inline$1.breaks;
+ } else {
+ rules.inline = inline$1.gfm;
+ }
}
+ this.tokenizer.rules = rules;
}
/**
- * Expose Block Rules
+ * Expose Rules
*/
static get rules() {
- return block$1;
+ return {
+ block: block$1,
+ inline: inline$1
+ };
}
/**
@@ -586,7 +1289,7 @@ var Lexer_1 = class Lexer {
static lex(src, options) {
const lexer = new Lexer(options);
return lexer.lex(src);
- };
+ }
/**
* Preprocessing
@@ -596,362 +1299,337 @@ var Lexer_1 = class Lexer {
.replace(/\r\n|\r/g, '\n')
.replace(/\t/g, ' ');
- return this.token(src, true);
- };
+ this.blockTokens(src, this.tokens, true);
+
+ this.inline(this.tokens);
+
+ return this.tokens;
+ }
/**
* Lexing
*/
- token(src, top) {
+ blockTokens(src, tokens = [], top = true) {
src = src.replace(/^ +$/gm, '');
- let next,
- loose,
- cap,
- bull,
- b,
- item,
- listStart,
- listItems,
- t,
- space,
- i,
- tag,
- l,
- isordered,
- istask,
- ischecked;
+ let token, i, l, lastToken;
while (src) {
// newline
- if (cap = this.rules.newline.exec(src)) {
- src = src.substring(cap[0].length);
- if (cap[0].length > 1) {
- this.tokens.push({
- type: 'space'
- });
+ if (token = this.tokenizer.space(src)) {
+ src = src.substring(token.raw.length);
+ if (token.type) {
+ tokens.push(token);
}
+ continue;
}
// code
- if (cap = this.rules.code.exec(src)) {
- const lastToken = this.tokens[this.tokens.length - 1];
- src = src.substring(cap[0].length);
- // An indented code block cannot interrupt a paragraph.
- if (lastToken && lastToken.type === 'paragraph') {
- lastToken.text += '\n' + cap[0].trimRight();
+ if (token = this.tokenizer.code(src, tokens)) {
+ src = src.substring(token.raw.length);
+ if (token.type) {
+ tokens.push(token);
} else {
- cap = cap[0].replace(/^ {4}/gm, '');
- this.tokens.push({
- type: 'code',
- codeBlockStyle: 'indented',
- text: !this.options.pedantic
- ? rtrim$1(cap, '\n')
- : cap
- });
+ lastToken = tokens[tokens.length - 1];
+ lastToken.raw += '\n' + token.raw;
+ lastToken.text += '\n' + token.text;
}
continue;
}
// fences
- if (cap = this.rules.fences.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'code',
- lang: cap[2] ? cap[2].trim() : cap[2],
- text: cap[3] || ''
- });
+ if (token = this.tokenizer.fences(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
// heading
- if (cap = this.rules.heading.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'heading',
- depth: cap[1].length,
- text: cap[2]
- });
+ if (token = this.tokenizer.heading(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
// table no leading pipe (gfm)
- if (cap = this.rules.nptable.exec(src)) {
- item = {
- type: 'table',
- header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
- align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
- cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
- };
-
- if (item.header.length === item.align.length) {
- src = src.substring(cap[0].length);
-
- for (i = 0; i < item.align.length; i++) {
- if (/^ *-+: *$/.test(item.align[i])) {
- item.align[i] = 'right';
- } else if (/^ *:-+: *$/.test(item.align[i])) {
- item.align[i] = 'center';
- } else if (/^ *:-+ *$/.test(item.align[i])) {
- item.align[i] = 'left';
- } else {
- item.align[i] = null;
- }
- }
-
- for (i = 0; i < item.cells.length; i++) {
- item.cells[i] = splitCells$1(item.cells[i], item.header.length);
- }
-
- this.tokens.push(item);
-
- continue;
- }
+ if (token = this.tokenizer.nptable(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
}
// hr
- if (cap = this.rules.hr.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'hr'
- });
+ if (token = this.tokenizer.hr(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
// blockquote
- if (cap = this.rules.blockquote.exec(src)) {
- src = src.substring(cap[0].length);
-
- this.tokens.push({
- type: 'blockquote_start'
- });
+ if (token = this.tokenizer.blockquote(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.blockTokens(token.text, [], top);
+ tokens.push(token);
+ continue;
+ }
- cap = cap[0].replace(/^ *> ?/gm, '');
+ // list
+ if (token = this.tokenizer.list(src)) {
+ src = src.substring(token.raw.length);
+ l = token.items.length;
+ for (i = 0; i < l; i++) {
+ token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);
+ }
+ tokens.push(token);
+ continue;
+ }
- // Pass `top` to keep the current
- // "toplevel" state. This is exactly
- // how markdown.pl works.
- this.token(cap, top);
+ // html
+ if (token = this.tokenizer.html(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- this.tokens.push({
- type: 'blockquote_end'
- });
+ // def
+ if (top && (token = this.tokenizer.def(src))) {
+ src = src.substring(token.raw.length);
+ if (!this.tokens.links[token.tag]) {
+ this.tokens.links[token.tag] = {
+ href: token.href,
+ title: token.title
+ };
+ }
+ continue;
+ }
+ // table (gfm)
+ if (token = this.tokenizer.table(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
- // list
- if (cap = this.rules.list.exec(src)) {
- src = src.substring(cap[0].length);
- bull = cap[2];
- isordered = bull.length > 1;
-
- listStart = {
- type: 'list_start',
- ordered: isordered,
- start: isordered ? +bull : '',
- loose: false
- };
+ // lheading
+ if (token = this.tokenizer.lheading(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- this.tokens.push(listStart);
+ // top-level paragraph
+ if (top && (token = this.tokenizer.paragraph(src))) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- // Get each top-level item.
- cap = cap[0].match(this.rules.item);
+ // text
+ if (token = this.tokenizer.text(src, tokens)) {
+ src = src.substring(token.raw.length);
+ if (token.type) {
+ tokens.push(token);
+ } else {
+ lastToken = tokens[tokens.length - 1];
+ lastToken.raw += '\n' + token.raw;
+ lastToken.text += '\n' + token.text;
+ }
+ continue;
+ }
- listItems = [];
- next = false;
- l = cap.length;
- i = 0;
+ if (src) {
+ const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(errMsg);
+ break;
+ } else {
+ throw new Error(errMsg);
+ }
+ }
+ }
- for (; i < l; i++) {
- item = cap[i];
+ return tokens;
+ }
- // Remove the list item's bullet
- // so it is seen as the next token.
- space = item.length;
- item = item.replace(/^ *([*+-]|\d+\.) */, '');
+ inline(tokens) {
+ let i,
+ j,
+ k,
+ l2,
+ row,
+ token;
+
+ const l = tokens.length;
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+ switch (token.type) {
+ case 'paragraph':
+ case 'text':
+ case 'heading': {
+ token.tokens = [];
+ this.inlineTokens(token.text, token.tokens);
+ break;
+ }
+ case 'table': {
+ token.tokens = {
+ header: [],
+ cells: []
+ };
- // Outdent whatever the
- // list item contains. Hacky.
- if (~item.indexOf('\n ')) {
- space -= item.length;
- item = !this.options.pedantic
- ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
- : item.replace(/^ {1,4}/gm, '');
+ // header
+ l2 = token.header.length;
+ for (j = 0; j < l2; j++) {
+ token.tokens.header[j] = [];
+ this.inlineTokens(token.header[j], token.tokens.header[j]);
}
- // Determine whether the next list item belongs here.
- // Backpedal if it does not belong in this list.
- if (i !== l - 1) {
- b = block$1.bullet.exec(cap[i + 1])[0];
- if (bull.length > 1 ? b.length === 1
- : (b.length > 1 || (this.options.smartLists && b !== bull))) {
- src = cap.slice(i + 1).join('\n') + src;
- i = l - 1;
+ // cells
+ l2 = token.cells.length;
+ for (j = 0; j < l2; j++) {
+ row = token.cells[j];
+ token.tokens.cells[j] = [];
+ for (k = 0; k < row.length; k++) {
+ token.tokens.cells[j][k] = [];
+ this.inlineTokens(row[k], token.tokens.cells[j][k]);
}
}
- // Determine whether item is loose or not.
- // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
- // for discount behavior.
- loose = next || /\n\n(?!\s*$)/.test(item);
- if (i !== l - 1) {
- next = item.charAt(item.length - 1) === '\n';
- if (!loose) loose = next;
- }
-
- if (loose) {
- listStart.loose = true;
+ break;
+ }
+ case 'blockquote': {
+ this.inline(token.tokens);
+ break;
+ }
+ case 'list': {
+ l2 = token.items.length;
+ for (j = 0; j < l2; j++) {
+ this.inline(token.items[j].tokens);
}
+ break;
+ }
+ }
+ }
- // Check for task list items
- istask = /^\[[ xX]\] /.test(item);
- ischecked = undefined;
- if (istask) {
- ischecked = item[1] !== ' ';
- item = item.replace(/^\[[ xX]\] +/, '');
- }
+ return tokens;
+ }
- t = {
- type: 'list_item_start',
- task: istask,
- checked: ischecked,
- loose: loose
- };
+ /**
+ * Lexing/Compiling
+ */
+ inlineTokens(src, tokens = [], inLink = false, inRawBlock = false) {
+ let token;
- listItems.push(t);
- this.tokens.push(t);
+ while (src) {
+ // escape
+ if (token = this.tokenizer.escape(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- // Recurse.
- this.token(item, false);
+ // tag
+ if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {
+ src = src.substring(token.raw.length);
+ inLink = token.inLink;
+ inRawBlock = token.inRawBlock;
+ tokens.push(token);
+ continue;
+ }
- this.tokens.push({
- type: 'list_item_end'
- });
+ // link
+ if (token = this.tokenizer.link(src)) {
+ src = src.substring(token.raw.length);
+ if (token.type === 'link') {
+ token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);
}
+ tokens.push(token);
+ continue;
+ }
- if (listStart.loose) {
- l = listItems.length;
- i = 0;
- for (; i < l; i++) {
- listItems[i].loose = true;
- }
+ // reflink, nolink
+ if (token = this.tokenizer.reflink(src, this.tokens.links)) {
+ src = src.substring(token.raw.length);
+ if (token.type === 'link') {
+ token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);
}
-
- this.tokens.push({
- type: 'list_end'
- });
-
+ tokens.push(token);
continue;
}
- // html
- if (cap = this.rules.html.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: this.options.sanitize
- ? 'paragraph'
- : 'html',
- pre: !this.options.sanitizer
- && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
- text: this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0])) : cap[0]
- });
+ // strong
+ if (token = this.tokenizer.strong(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
continue;
}
- // def
- if (top && (cap = this.rules.def.exec(src))) {
- src = src.substring(cap[0].length);
- if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
- tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
- if (!this.tokens.links[tag]) {
- this.tokens.links[tag] = {
- href: cap[2],
- title: cap[3]
- };
- }
+ // em
+ if (token = this.tokenizer.em(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
continue;
}
- // table (gfm)
- if (cap = this.rules.table.exec(src)) {
- item = {
- type: 'table',
- header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
- align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
- cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
- };
-
- if (item.header.length === item.align.length) {
- src = src.substring(cap[0].length);
-
- for (i = 0; i < item.align.length; i++) {
- if (/^ *-+: *$/.test(item.align[i])) {
- item.align[i] = 'right';
- } else if (/^ *:-+: *$/.test(item.align[i])) {
- item.align[i] = 'center';
- } else if (/^ *:-+ *$/.test(item.align[i])) {
- item.align[i] = 'left';
- } else {
- item.align[i] = null;
- }
- }
-
- for (i = 0; i < item.cells.length; i++) {
- item.cells[i] = splitCells$1(
- item.cells[i].replace(/^ *\| *| *\| *$/g, ''),
- item.header.length);
- }
+ // code
+ if (token = this.tokenizer.codespan(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- this.tokens.push(item);
+ // br
+ if (token = this.tokenizer.br(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ }
- continue;
- }
+ // del (gfm)
+ if (token = this.tokenizer.del(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
+ continue;
}
- // lheading
- if (cap = this.rules.lheading.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'heading',
- depth: cap[2].charAt(0) === '=' ? 1 : 2,
- text: cap[1]
- });
+ // autolink
+ if (token = this.tokenizer.autolink(src, mangle)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
- // top-level paragraph
- if (top && (cap = this.rules.paragraph.exec(src))) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'paragraph',
- text: cap[1].charAt(cap[1].length - 1) === '\n'
- ? cap[1].slice(0, -1)
- : cap[1]
- });
+ // url (gfm)
+ if (!inLink && (token = this.tokenizer.url(src, mangle))) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
// text
- if (cap = this.rules.text.exec(src)) {
- // Top-level should never reach here.
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'text',
- text: cap[0]
- });
+ if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
if (src) {
- throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
+ const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(errMsg);
+ break;
+ } else {
+ throw new Error(errMsg);
+ }
}
}
- return this.tokens;
- };
+ return tokens;
+ }
};
-const { defaults: defaults$2 } = defaults;
+const { defaults: defaults$3 } = defaults;
const {
cleanUrl: cleanUrl$1,
escape: escape$2
@@ -962,7 +1640,7 @@ const {
*/
var Renderer_1 = class Renderer {
constructor(options) {
- this.options = options || defaults$2;
+ this.options = options || defaults$3;
}
code(code, infostring, escaped) {
@@ -978,7 +1656,7 @@ var Renderer_1 = class Renderer {
if (!lang) {
return '<pre><code>'
+ (escaped ? code : escape$2(code, true))
- + '</code></pre>';
+ + '</code></pre>\n';
}
return '<pre><code class="'
@@ -987,15 +1665,15 @@ var Renderer_1 = class Renderer {
+ '">'
+ (escaped ? code : escape$2(code, true))
+ '</code></pre>\n';
- };
+ }
blockquote(quote) {
return '<blockquote>\n' + quote + '</blockquote>\n';
- };
+ }
html(html) {
return html;
- };
+ }
heading(text, level, raw, slugger) {
if (this.options.headerIds) {
@@ -1012,21 +1690,21 @@ var Renderer_1 = class Renderer {
}
// ignore IDs
return '<h' + level + '>' + text + '</h' + level + '>\n';
- };
+ }
hr() {
return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
- };
+ }
list(body, ordered, start) {
const type = ordered ? 'ol' : 'ul',
startatt = (ordered && start !== 1) ? (' start="' + start + '"') : '';
return '<' + type + startatt + '>\n' + body + '</' + type + '>\n';
- };
+ }
listitem(text) {
return '<li>' + text + '</li>\n';
- };
+ }
checkbox(checked) {
return '<input '
@@ -1034,11 +1712,11 @@ var Renderer_1 = class Renderer {
+ 'disabled="" type="checkbox"'
+ (this.options.xhtml ? ' /' : '')
+ '> ';
- };
+ }
paragraph(text) {
return '<p>' + text + '</p>\n';
- };
+ }
table(header, body) {
if (body) body = '<tbody>' + body + '</tbody>';
@@ -1049,11 +1727,11 @@ var Renderer_1 = class Renderer {
+ '</thead>\n'
+ body
+ '</table>\n';
- };
+ }
tablerow(content) {
return '<tr>\n' + content + '</tr>\n';
- };
+ }
tablecell(content, flags) {
const type = flags.header ? 'th' : 'td';
@@ -1061,28 +1739,28 @@ var Renderer_1 = class Renderer {
? '<' + type + ' align="' + flags.align + '">'
: '<' + type + '>';
return tag + content + '</' + type + '>\n';
- };
+ }
// span level renderer
strong(text) {
return '<strong>' + text + '</strong>';
- };
+ }
em(text) {
return '<em>' + text + '</em>';
- };
+ }
codespan(text) {
return '<code>' + text + '</code>';
- };
+ }
br() {
return this.options.xhtml ? '<br/>' : '<br>';
- };
+ }
del(text) {
return '<del>' + text + '</del>';
- };
+ }
link(href, title, text) {
href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);
@@ -1095,7 +1773,7 @@ var Renderer_1 = class Renderer {
}
out += '>' + text + '</a>';
return out;
- };
+ }
image(href, title, text) {
href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);
@@ -1109,334 +1787,10 @@ var Renderer_1 = class Renderer {
}
out += this.options.xhtml ? '/>' : '>';
return out;
- };
+ }
text(text) {
return text;
- };
-};
-
-/**
- * Slugger generates header id
- */
-var Slugger_1 = class Slugger {
- constructor() {
- this.seen = {};
- }
-
- /**
- * Convert string to unique id
- */
- slug(value) {
- let slug = value
- .toLowerCase()
- .trim()
- .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
- .replace(/\s/g, '-');
-
- if (this.seen.hasOwnProperty(slug)) {
- const originalSlug = slug;
- do {
- this.seen[originalSlug]++;
- slug = originalSlug + '-' + this.seen[originalSlug];
- } while (this.seen.hasOwnProperty(slug));
- }
- this.seen[slug] = 0;
-
- return slug;
- };
-};
-
-const { defaults: defaults$3 } = defaults;
-const { inline: inline$1 } = rules;
-const {
- findClosingBracket: findClosingBracket$1,
- escape: escape$3
-} = helpers;
-
-/**
- * Inline Lexer & Compiler
- */
-var InlineLexer_1 = class InlineLexer {
- constructor(links, options) {
- this.options = options || defaults$3;
- this.links = links;
- this.rules = inline$1.normal;
- this.options.renderer = this.options.renderer || new Renderer_1();
- this.renderer = this.options.renderer;
- this.renderer.options = this.options;
-
- if (!this.links) {
- throw new Error('Tokens array requires a `links` property.');
- }
-
- if (this.options.pedantic) {
- this.rules = inline$1.pedantic;
- } else if (this.options.gfm) {
- if (this.options.breaks) {
- this.rules = inline$1.breaks;
- } else {
- this.rules = inline$1.gfm;
- }
- }
- }
-
- /**
- * Expose Inline Rules
- */
- static get rules() {
- return inline$1;
- }
-
- /**
- * Static Lexing/Compiling Method
- */
- static output(src, links, options) {
- const inline = new InlineLexer(links, options);
- return inline.output(src);
- }
-
- /**
- * Lexing/Compiling
- */
- output(src) {
- let out = '',
- link,
- text,
- href,
- title,
- cap,
- prevCapZero;
-
- while (src) {
- // escape
- if (cap = this.rules.escape.exec(src)) {
- src = src.substring(cap[0].length);
- out += escape$3(cap[1]);
- continue;
- }
-
- // tag
- if (cap = this.rules.tag.exec(src)) {
- if (!this.inLink && /^<a /i.test(cap[0])) {
- this.inLink = true;
- } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
- this.inLink = false;
- }
- if (!this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.inRawBlock = true;
- } else if (this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.inRawBlock = false;
- }
-
- src = src.substring(cap[0].length);
- out += this.renderer.html(this.options.sanitize
- ? (this.options.sanitizer
- ? this.options.sanitizer(cap[0])
- : escape$3(cap[0]))
- : cap[0]);
- continue;
- }
-
- // link
- if (cap = this.rules.link.exec(src)) {
- const lastParenIndex = findClosingBracket$1(cap[2], '()');
- if (lastParenIndex > -1) {
- const start = cap[0].indexOf('!') === 0 ? 5 : 4;
- const linkLen = start + cap[1].length + lastParenIndex;
- cap[2] = cap[2].substring(0, lastParenIndex);
- cap[0] = cap[0].substring(0, linkLen).trim();
- cap[3] = '';
- }
- src = src.substring(cap[0].length);
- this.inLink = true;
- href = cap[2];
- if (this.options.pedantic) {
- link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
-
- if (link) {
- href = link[1];
- title = link[3];
- } else {
- title = '';
- }
- } else {
- title = cap[3] ? cap[3].slice(1, -1) : '';
- }
- href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
- out += this.outputLink(cap, {
- href: InlineLexer.escapes(href),
- title: InlineLexer.escapes(title)
- });
- this.inLink = false;
- continue;
- }
-
- // reflink, nolink
- if ((cap = this.rules.reflink.exec(src))
- || (cap = this.rules.nolink.exec(src))) {
- src = src.substring(cap[0].length);
- link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
- link = this.links[link.toLowerCase()];
- if (!link || !link.href) {
- out += cap[0].charAt(0);
- src = cap[0].substring(1) + src;
- continue;
- }
- this.inLink = true;
- out += this.outputLink(cap, link);
- this.inLink = false;
- continue;
- }
-
- // strong
- if (cap = this.rules.strong.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));
- continue;
- }
-
- // em
- if (cap = this.rules.em.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));
- continue;
- }
-
- // code
- if (cap = this.rules.code.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.codespan(escape$3(cap[2].trim(), true));
- continue;
- }
-
- // br
- if (cap = this.rules.br.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.br();
- continue;
- }
-
- // del (gfm)
- if (cap = this.rules.del.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.del(this.output(cap[1]));
- continue;
- }
-
- // autolink
- if (cap = this.rules.autolink.exec(src)) {
- src = src.substring(cap[0].length);
- if (cap[2] === '@') {
- text = escape$3(this.mangle(cap[1]));
- href = 'mailto:' + text;
- } else {
- text = escape$3(cap[1]);
- href = text;
- }
- out += this.renderer.link(href, null, text);
- continue;
- }
-
- // url (gfm)
- if (!this.inLink && (cap = this.rules.url.exec(src))) {
- if (cap[2] === '@') {
- text = escape$3(cap[0]);
- href = 'mailto:' + text;
- } else {
- // do extended autolink path validation
- do {
- prevCapZero = cap[0];
- cap[0] = this.rules._backpedal.exec(cap[0])[0];
- } while (prevCapZero !== cap[0]);
- text = escape$3(cap[0]);
- if (cap[1] === 'www.') {
- href = 'http://' + text;
- } else {
- href = text;
- }
- }
- src = src.substring(cap[0].length);
- out += this.renderer.link(href, null, text);
- continue;
- }
-
- // text
- if (cap = this.rules.text.exec(src)) {
- src = src.substring(cap[0].length);
- if (this.inRawBlock) {
- out += this.renderer.text(this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$3(cap[0])) : cap[0]);
- } else {
- out += this.renderer.text(escape$3(this.smartypants(cap[0])));
- }
- continue;
- }
-
- if (src) {
- throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
- }
- }
-
- return out;
- }
-
- static escapes(text) {
- return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;
- }
-
- /**
- * Compile Link
- */
- outputLink(cap, link) {
- const href = link.href,
- title = link.title ? escape$3(link.title) : null;
-
- return cap[0].charAt(0) !== '!'
- ? this.renderer.link(href, title, this.output(cap[1]))
- : this.renderer.image(href, title, escape$3(cap[1]));
- }
-
- /**
- * Smartypants Transformations
- */
- smartypants(text) {
- if (!this.options.smartypants) return text;
- return text
- // em-dashes
- .replace(/---/g, '\u2014')
- // en-dashes
- .replace(/--/g, '\u2013')
- // opening singles
- .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
- // closing singles & apostrophes
- .replace(/'/g, '\u2019')
- // opening doubles
- .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
- // closing doubles
- .replace(/"/g, '\u201d')
- // ellipses
- .replace(/\.{3}/g, '\u2026');
- }
-
- /**
- * Mangle Links
- */
- mangle(text) {
- if (!this.options.mangle) return text;
- const l = text.length;
- let out = '',
- i = 0,
- ch;
-
- for (; i < l; i++) {
- ch = text.charCodeAt(i);
- if (Math.random() > 0.5) {
- ch = 'x' + ch.toString(16);
- }
- out += '&#' + ch + ';';
- }
-
- return out;
}
};
@@ -1462,6 +1816,10 @@ var TextRenderer_1 = class TextRenderer {
return text;
}
+ html(text) {
+ return text;
+ }
+
text(text) {
return text;
}
@@ -1479,9 +1837,42 @@ var TextRenderer_1 = class TextRenderer {
}
};
+/**
+ * Slugger generates header id
+ */
+var Slugger_1 = class Slugger {
+ constructor() {
+ this.seen = {};
+ }
+
+ /**
+ * Convert string to unique id
+ */
+ slug(value) {
+ let slug = value
+ .toLowerCase()
+ .trim()
+ // remove html tags
+ .replace(/<[!\/a-z].*?>/ig, '')
+ // remove unwanted chars
+ .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
+ .replace(/\s/g, '-');
+
+ if (this.seen.hasOwnProperty(slug)) {
+ const originalSlug = slug;
+ do {
+ this.seen[originalSlug]++;
+ slug = originalSlug + '-' + this.seen[originalSlug];
+ } while (this.seen.hasOwnProperty(slug));
+ }
+ this.seen[slug] = 0;
+
+ return slug;
+ }
+};
+
const { defaults: defaults$4 } = defaults;
const {
- merge: merge$2,
unescape: unescape$1
} = helpers;
@@ -1490,12 +1881,11 @@ const {
*/
var Parser_1 = class Parser {
constructor(options) {
- this.tokens = [];
- this.token = null;
this.options = options || defaults$4;
this.options.renderer = this.options.renderer || new Renderer_1();
this.renderer = this.options.renderer;
this.renderer.options = this.options;
+ this.textRenderer = new TextRenderer_1();
this.slugger = new Slugger_1();
}
@@ -1505,187 +1895,239 @@ var Parser_1 = class Parser {
static parse(tokens, options) {
const parser = new Parser(options);
return parser.parse(tokens);
- };
+ }
/**
* Parse Loop
*/
- parse(tokens) {
- this.inline = new InlineLexer_1(tokens.links, this.options);
- // use an InlineLexer with a TextRenderer to extract pure text
- this.inlineText = new InlineLexer_1(
- tokens.links,
- merge$2({}, this.options, { renderer: new TextRenderer_1() })
- );
- this.tokens = tokens.reverse();
-
- let out = '';
- while (this.next()) {
- out += this.tok();
- }
-
- return out;
- };
-
- /**
- * Next Token
- */
- next() {
- this.token = this.tokens.pop();
- return this.token;
- };
-
- /**
- * Preview Next Token
- */
- peek() {
- return this.tokens[this.tokens.length - 1] || 0;
- };
-
- /**
- * Parse Text Tokens
- */
- parseText() {
- let body = this.token.text;
-
- while (this.peek().type === 'text') {
- body += '\n' + this.next().text;
- }
-
- return this.inline.output(body);
- };
-
- /**
- * Parse Current Token
- */
- tok() {
- let body = '';
- switch (this.token.type) {
- case 'space': {
- return '';
- }
- case 'hr': {
- return this.renderer.hr();
- }
- case 'heading': {
- return this.renderer.heading(
- this.inline.output(this.token.text),
- this.token.depth,
- unescape$1(this.inlineText.output(this.token.text)),
- this.slugger);
- }
- case 'code': {
- return this.renderer.code(this.token.text,
- this.token.lang,
- this.token.escaped);
- }
- case 'table': {
- let header = '',
- i,
- row,
- cell,
- j;
-
- // header
- cell = '';
- for (i = 0; i < this.token.header.length; i++) {
- cell += this.renderer.tablecell(
- this.inline.output(this.token.header[i]),
- { header: true, align: this.token.align[i] }
- );
+ parse(tokens, top = true) {
+ let out = '',
+ i,
+ j,
+ k,
+ l2,
+ l3,
+ row,
+ cell,
+ header,
+ body,
+ token,
+ ordered,
+ start,
+ loose,
+ itemBody,
+ item,
+ checked,
+ task,
+ checkbox;
+
+ const l = tokens.length;
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+ switch (token.type) {
+ case 'space': {
+ continue;
}
- header += this.renderer.tablerow(cell);
-
- for (i = 0; i < this.token.cells.length; i++) {
- row = this.token.cells[i];
+ case 'hr': {
+ out += this.renderer.hr();
+ continue;
+ }
+ case 'heading': {
+ out += this.renderer.heading(
+ this.parseInline(token.tokens),
+ token.depth,
+ unescape$1(this.parseInline(token.tokens, this.textRenderer)),
+ this.slugger);
+ continue;
+ }
+ case 'code': {
+ out += this.renderer.code(token.text,
+ token.lang,
+ token.escaped);
+ continue;
+ }
+ case 'table': {
+ header = '';
+ // header
cell = '';
- for (j = 0; j < row.length; j++) {
+ l2 = token.header.length;
+ for (j = 0; j < l2; j++) {
cell += this.renderer.tablecell(
- this.inline.output(row[j]),
- { header: false, align: this.token.align[j] }
+ this.parseInline(token.tokens.header[j]),
+ { header: true, align: token.align[j] }
);
}
+ header += this.renderer.tablerow(cell);
+
+ body = '';
+ l2 = token.cells.length;
+ for (j = 0; j < l2; j++) {
+ row = token.tokens.cells[j];
+
+ cell = '';
+ l3 = row.length;
+ for (k = 0; k < l3; k++) {
+ cell += this.renderer.tablecell(
+ this.parseInline(row[k]),
+ { header: false, align: token.align[k] }
+ );
+ }
- body += this.renderer.tablerow(cell);
+ body += this.renderer.tablerow(cell);
+ }
+ out += this.renderer.table(header, body);
+ continue;
}
- return this.renderer.table(header, body);
- }
- case 'blockquote_start': {
- body = '';
-
- while (this.next().type !== 'blockquote_end') {
- body += this.tok();
+ case 'blockquote': {
+ body = this.parse(token.tokens);
+ out += this.renderer.blockquote(body);
+ continue;
}
+ case 'list': {
+ ordered = token.ordered;
+ start = token.start;
+ loose = token.loose;
+ l2 = token.items.length;
+
+ body = '';
+ for (j = 0; j < l2; j++) {
+ item = token.items[j];
+ checked = item.checked;
+ task = item.task;
+
+ itemBody = '';
+ if (item.task) {
+ checkbox = this.renderer.checkbox(checked);
+ if (loose) {
+ if (item.tokens.length > 0 && item.tokens[0].type === 'text') {
+ item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;
+ if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {
+ item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;
+ }
+ } else {
+ item.tokens.unshift({
+ type: 'text',
+ text: checkbox
+ });
+ }
+ } else {
+ itemBody += checkbox;
+ }
+ }
- return this.renderer.blockquote(body);
- }
- case 'list_start': {
- body = '';
- const ordered = this.token.ordered,
- start = this.token.start;
+ itemBody += this.parse(item.tokens, loose);
+ body += this.renderer.listitem(itemBody, task, checked);
+ }
- while (this.next().type !== 'list_end') {
- body += this.tok();
+ out += this.renderer.list(body, ordered, start);
+ continue;
}
-
- return this.renderer.list(body, ordered, start);
- }
- case 'list_item_start': {
- body = '';
- const loose = this.token.loose;
- const checked = this.token.checked;
- const task = this.token.task;
-
- if (this.token.task) {
- if (loose) {
- if (this.peek().type === 'text') {
- const nextToken = this.peek();
- nextToken.text = this.renderer.checkbox(checked) + ' ' + nextToken.text;
- } else {
- this.tokens.push({
- type: 'text',
- text: this.renderer.checkbox(checked)
- });
- }
+ case 'html': {
+ // TODO parse inline content if parameter markdown=1
+ out += this.renderer.html(token.text);
+ continue;
+ }
+ case 'paragraph': {
+ out += this.renderer.paragraph(this.parseInline(token.tokens));
+ continue;
+ }
+ case 'text': {
+ body = token.tokens ? this.parseInline(token.tokens) : token.text;
+ while (i + 1 < l && tokens[i + 1].type === 'text') {
+ token = tokens[++i];
+ body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);
+ }
+ out += top ? this.renderer.paragraph(body) : body;
+ continue;
+ }
+ default: {
+ const errMsg = 'Token with "' + token.type + '" type was not found.';
+ if (this.options.silent) {
+ console.error(errMsg);
+ return;
} else {
- body += this.renderer.checkbox(checked);
+ throw new Error(errMsg);
}
}
+ }
+ }
- while (this.next().type !== 'list_item_end') {
- body += !loose && this.token.type === 'text'
- ? this.parseText()
- : this.tok();
+ return out;
+ }
+
+ /**
+ * Parse Inline Tokens
+ */
+ parseInline(tokens, renderer) {
+ renderer = renderer || this.renderer;
+ let out = '',
+ i,
+ token;
+
+ const l = tokens.length;
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+ switch (token.type) {
+ case 'escape': {
+ out += renderer.text(token.text);
+ break;
}
- return this.renderer.listitem(body, task, checked);
- }
- case 'html': {
- // TODO parse inline content if parameter markdown=1
- return this.renderer.html(this.token.text);
- }
- case 'paragraph': {
- return this.renderer.paragraph(this.inline.output(this.token.text));
- }
- case 'text': {
- return this.renderer.paragraph(this.parseText());
- }
- default: {
- const errMsg = 'Token with "' + this.token.type + '" type was not found.';
- if (this.options.silent) {
- console.log(errMsg);
- } else {
- throw new Error(errMsg);
+ case 'html': {
+ out += renderer.html(token.text);
+ break;
+ }
+ case 'link': {
+ out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));
+ break;
+ }
+ case 'image': {
+ out += renderer.image(token.href, token.title, token.text);
+ break;
+ }
+ case 'strong': {
+ out += renderer.strong(this.parseInline(token.tokens, renderer));
+ break;
+ }
+ case 'em': {
+ out += renderer.em(this.parseInline(token.tokens, renderer));
+ break;
+ }
+ case 'codespan': {
+ out += renderer.codespan(token.text);
+ break;
+ }
+ case 'br': {
+ out += renderer.br();
+ break;
+ }
+ case 'del': {
+ out += renderer.del(this.parseInline(token.tokens, renderer));
+ break;
+ }
+ case 'text': {
+ out += renderer.text(token.text);
+ break;
+ }
+ default: {
+ const errMsg = 'Token with "' + token.type + '" type was not found.';
+ if (this.options.silent) {
+ console.error(errMsg);
+ return;
+ } else {
+ throw new Error(errMsg);
+ }
}
}
}
- };
+ return out;
+ }
};
const {
- merge: merge$3,
+ merge: merge$2,
checkSanitizeDeprecation: checkSanitizeDeprecation$1,
- escape: escape$4
+ escape: escape$3
} = helpers;
const {
getDefaults,
@@ -1706,18 +2148,17 @@ function marked(src, opt, callback) {
+ Object.prototype.toString.call(src) + ', string expected');
}
- if (callback || typeof opt === 'function') {
- if (!callback) {
- callback = opt;
- opt = null;
- }
+ if (typeof opt === 'function') {
+ callback = opt;
+ opt = null;
+ }
+
+ opt = merge$2({}, marked.defaults, opt || {});
+ checkSanitizeDeprecation$1(opt);
- opt = merge$3({}, marked.defaults, opt || {});
- checkSanitizeDeprecation$1(opt);
+ if (callback) {
const highlight = opt.highlight;
- let tokens,
- pending,
- i = 0;
+ let tokens;
try {
tokens = Lexer_1.lex(src, opt);
@@ -1725,20 +2166,15 @@ function marked(src, opt, callback) {
return callback(e);
}
- pending = tokens.length;
-
const done = function(err) {
- if (err) {
- opt.highlight = highlight;
- return callback(err);
- }
-
let out;
- try {
- out = Parser_1.parse(tokens, opt);
- } catch (e) {
- err = e;
+ if (!err) {
+ try {
+ out = Parser_1.parse(tokens, opt);
+ } catch (e) {
+ err = e;
+ }
}
opt.highlight = highlight;
@@ -1754,36 +2190,49 @@ function marked(src, opt, callback) {
delete opt.highlight;
- if (!pending) return done();
+ if (!tokens.length) return done();
- for (; i < tokens.length; i++) {
- (function(token) {
- if (token.type !== 'code') {
- return --pending || done();
- }
- return highlight(token.text, token.lang, function(err, code) {
- if (err) return done(err);
- if (code == null || code === token.text) {
- return --pending || done();
- }
- token.text = code;
- token.escaped = true;
- --pending || done();
- });
- })(tokens[i]);
+ let pending = 0;
+ marked.walkTokens(tokens, function(token) {
+ if (token.type === 'code') {
+ pending++;
+ setTimeout(() => {
+ highlight(token.text, token.lang, function(err, code) {
+ if (err) {
+ return done(err);
+ }
+ if (code != null && code !== token.text) {
+ token.text = code;
+ token.escaped = true;
+ }
+
+ pending--;
+ if (pending === 0) {
+ done();
+ }
+ });
+ }, 0);
+ }
+ });
+
+ if (pending === 0) {
+ done();
}
return;
}
+
try {
- opt = merge$3({}, marked.defaults, opt || {});
- checkSanitizeDeprecation$1(opt);
- return Parser_1.parse(Lexer_1.lex(src, opt), opt);
+ const tokens = Lexer_1.lex(src, opt);
+ if (opt.walkTokens) {
+ marked.walkTokens(tokens, opt.walkTokens);
+ }
+ return Parser_1.parse(tokens, opt);
} catch (e) {
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
- if ((opt || marked.defaults).silent) {
+ if (opt.silent) {
return '<p>An error occurred:</p><pre>'
- + escape$4(e.message + '', true)
+ + escape$3(e.message + '', true)
+ '</pre>';
}
throw e;
@@ -1796,7 +2245,7 @@ function marked(src, opt, callback) {
marked.options =
marked.setOptions = function(opt) {
- merge$3(marked.defaults, opt);
+ merge$2(marked.defaults, opt);
changeDefaults(marked.defaults);
return marked;
};
@@ -1806,6 +2255,84 @@ marked.getDefaults = getDefaults;
marked.defaults = defaults$5;
/**
+ * Use Extension
+ */
+
+marked.use = function(extension) {
+ const opts = merge$2({}, extension);
+ if (extension.renderer) {
+ const renderer = marked.defaults.renderer || new Renderer_1();
+ for (const prop in extension.renderer) {
+ const prevRenderer = renderer[prop];
+ renderer[prop] = (...args) => {
+ let ret = extension.renderer[prop].apply(renderer, args);
+ if (ret === false) {
+ ret = prevRenderer.apply(renderer, args);
+ }
+ return ret;
+ };
+ }
+ opts.renderer = renderer;
+ }
+ if (extension.tokenizer) {
+ const tokenizer = marked.defaults.tokenizer || new Tokenizer_1();
+ for (const prop in extension.tokenizer) {
+ const prevTokenizer = tokenizer[prop];
+ tokenizer[prop] = (...args) => {
+ let ret = extension.tokenizer[prop].apply(tokenizer, args);
+ if (ret === false) {
+ ret = prevTokenizer.apply(tokenizer, args);
+ }
+ return ret;
+ };
+ }
+ opts.tokenizer = tokenizer;
+ }
+ if (extension.walkTokens) {
+ const walkTokens = marked.defaults.walkTokens;
+ opts.walkTokens = (token) => {
+ extension.walkTokens(token);
+ if (walkTokens) {
+ walkTokens(token);
+ }
+ };
+ }
+ marked.setOptions(opts);
+};
+
+/**
+ * Run callback for every token
+ */
+
+marked.walkTokens = function(tokens, callback) {
+ for (const token of tokens) {
+ callback(token);
+ switch (token.type) {
+ case 'table': {
+ for (const cell of token.tokens.header) {
+ marked.walkTokens(cell, callback);
+ }
+ for (const row of token.tokens.cells) {
+ for (const cell of row) {
+ marked.walkTokens(cell, callback);
+ }
+ }
+ break;
+ }
+ case 'list': {
+ marked.walkTokens(token.items, callback);
+ break;
+ }
+ default: {
+ if (token.tokens) {
+ marked.walkTokens(token.tokens, callback);
+ }
+ }
+ }
+ }
+};
+
+/**
* Expose
*/
@@ -1818,8 +2345,7 @@ marked.TextRenderer = TextRenderer_1;
marked.Lexer = Lexer_1;
marked.lexer = Lexer_1.lex;
-marked.InlineLexer = InlineLexer_1;
-marked.inlineLexer = InlineLexer_1.output;
+marked.Tokenizer = Tokenizer_1;
marked.Slugger = Slugger_1;
diff --git a/packages/markdown/marked/lib/marked.js b/packages/markdown/marked/lib/marked.js
index b40a29da..93d949c7 100644
--- a/packages/markdown/marked/lib/marked.js
+++ b/packages/markdown/marked/lib/marked.js
@@ -31,6 +31,43 @@
return Constructor;
}
+ function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+ }
+
+ function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+ }
+
+ function _createForOfIteratorHelperLoose(o) {
+ var i = 0;
+
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ };
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ i = o[Symbol.iterator]();
+ return i.next.bind(i);
+ }
+
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
@@ -53,6 +90,8 @@
silent: false,
smartLists: false,
smartypants: false,
+ tokenizer: null,
+ walkTokens: null,
xhtml: false
};
}
@@ -342,6 +381,664 @@
checkSanitizeDeprecation: checkSanitizeDeprecation
};
+ var defaults$1 = defaults.defaults;
+ var rtrim$1 = helpers.rtrim,
+ splitCells$1 = helpers.splitCells,
+ _escape = helpers.escape,
+ findClosingBracket$1 = helpers.findClosingBracket;
+
+ function outputLink(cap, link, raw) {
+ var href = link.href;
+ var title = link.title ? _escape(link.title) : null;
+ var text = cap[1].replace(/\\([\[\]])/g, '$1');
+
+ if (cap[0].charAt(0) !== '!') {
+ return {
+ type: 'link',
+ raw: raw,
+ href: href,
+ title: title,
+ text: text
+ };
+ } else {
+ return {
+ type: 'image',
+ raw: raw,
+ href: href,
+ title: title,
+ text: _escape(text)
+ };
+ }
+ }
+
+ function indentCodeCompensation(raw, text) {
+ var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
+
+ if (matchIndentToCode === null) {
+ return text;
+ }
+
+ var indentToCode = matchIndentToCode[1];
+ return text.split('\n').map(function (node) {
+ var matchIndentInNode = node.match(/^\s+/);
+
+ if (matchIndentInNode === null) {
+ return node;
+ }
+
+ var indentInNode = matchIndentInNode[0];
+
+ if (indentInNode.length >= indentToCode.length) {
+ return node.slice(indentToCode.length);
+ }
+
+ return node;
+ }).join('\n');
+ }
+ /**
+ * Tokenizer
+ */
+
+
+ var Tokenizer_1 = /*#__PURE__*/function () {
+ function Tokenizer(options) {
+ this.options = options || defaults$1;
+ }
+
+ var _proto = Tokenizer.prototype;
+
+ _proto.space = function space(src) {
+ var cap = this.rules.block.newline.exec(src);
+
+ if (cap) {
+ if (cap[0].length > 1) {
+ return {
+ type: 'space',
+ raw: cap[0]
+ };
+ }
+
+ return {
+ raw: '\n'
+ };
+ }
+ };
+
+ _proto.code = function code(src, tokens) {
+ var cap = this.rules.block.code.exec(src);
+
+ if (cap) {
+ var lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.
+
+ if (lastToken && lastToken.type === 'paragraph') {
+ return {
+ raw: cap[0],
+ text: cap[0].trimRight()
+ };
+ }
+
+ var text = cap[0].replace(/^ {4}/gm, '');
+ return {
+ type: 'code',
+ raw: cap[0],
+ codeBlockStyle: 'indented',
+ text: !this.options.pedantic ? rtrim$1(text, '\n') : text
+ };
+ }
+ };
+
+ _proto.fences = function fences(src) {
+ var cap = this.rules.block.fences.exec(src);
+
+ if (cap) {
+ var raw = cap[0];
+ var text = indentCodeCompensation(raw, cap[3] || '');
+ return {
+ type: 'code',
+ raw: raw,
+ lang: cap[2] ? cap[2].trim() : cap[2],
+ text: text
+ };
+ }
+ };
+
+ _proto.heading = function heading(src) {
+ var cap = this.rules.block.heading.exec(src);
+
+ if (cap) {
+ return {
+ type: 'heading',
+ raw: cap[0],
+ depth: cap[1].length,
+ text: cap[2]
+ };
+ }
+ };
+
+ _proto.nptable = function nptable(src) {
+ var cap = this.rules.block.nptable.exec(src);
+
+ if (cap) {
+ var item = {
+ type: 'table',
+ header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+ cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [],
+ raw: cap[0]
+ };
+
+ if (item.header.length === item.align.length) {
+ var l = item.align.length;
+ var i;
+
+ for (i = 0; i < l; i++) {
+ if (/^ *-+: *$/.test(item.align[i])) {
+ item.align[i] = 'right';
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
+ item.align[i] = 'center';
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
+ item.align[i] = 'left';
+ } else {
+ item.align[i] = null;
+ }
+ }
+
+ l = item.cells.length;
+
+ for (i = 0; i < l; i++) {
+ item.cells[i] = splitCells$1(item.cells[i], item.header.length);
+ }
+
+ return item;
+ }
+ }
+ };
+
+ _proto.hr = function hr(src) {
+ var cap = this.rules.block.hr.exec(src);
+
+ if (cap) {
+ return {
+ type: 'hr',
+ raw: cap[0]
+ };
+ }
+ };
+
+ _proto.blockquote = function blockquote(src) {
+ var cap = this.rules.block.blockquote.exec(src);
+
+ if (cap) {
+ var text = cap[0].replace(/^ *> ?/gm, '');
+ return {
+ type: 'blockquote',
+ raw: cap[0],
+ text: text
+ };
+ }
+ };
+
+ _proto.list = function list(src) {
+ var cap = this.rules.block.list.exec(src);
+
+ if (cap) {
+ var raw = cap[0];
+ var bull = cap[2];
+ var isordered = bull.length > 1;
+ var list = {
+ type: 'list',
+ raw: raw,
+ ordered: isordered,
+ start: isordered ? +bull : '',
+ loose: false,
+ items: []
+ }; // Get each top-level item.
+
+ var itemMatch = cap[0].match(this.rules.block.item);
+ var next = false,
+ item,
+ space,
+ b,
+ addBack,
+ loose,
+ istask,
+ ischecked;
+ var l = itemMatch.length;
+
+ for (var i = 0; i < l; i++) {
+ item = itemMatch[i];
+ raw = item; // Remove the list item's bullet
+ // so it is seen as the next token.
+
+ space = item.length;
+ item = item.replace(/^ *([*+-]|\d+\.) */, ''); // Outdent whatever the
+ // list item contains. Hacky.
+
+ if (~item.indexOf('\n ')) {
+ space -= item.length;
+ item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');
+ } // Determine whether the next list item belongs here.
+ // Backpedal if it does not belong in this list.
+
+
+ if (i !== l - 1) {
+ b = this.rules.block.bullet.exec(itemMatch[i + 1])[0];
+
+ if (bull.length > 1 ? b.length === 1 : b.length > 1 || this.options.smartLists && b !== bull) {
+ addBack = itemMatch.slice(i + 1).join('\n');
+ list.raw = list.raw.substring(0, list.raw.length - addBack.length);
+ i = l - 1;
+ }
+ } // Determine whether item is loose or not.
+ // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
+ // for discount behavior.
+
+
+ loose = next || /\n\n(?!\s*$)/.test(item);
+
+ if (i !== l - 1) {
+ next = item.charAt(item.length - 1) === '\n';
+ if (!loose) loose = next;
+ }
+
+ if (loose) {
+ list.loose = true;
+ } // Check for task list items
+
+
+ istask = /^\[[ xX]\] /.test(item);
+ ischecked = undefined;
+
+ if (istask) {
+ ischecked = item[1] !== ' ';
+ item = item.replace(/^\[[ xX]\] +/, '');
+ }
+
+ list.items.push({
+ type: 'list_item',
+ raw: raw,
+ task: istask,
+ checked: ischecked,
+ loose: loose,
+ text: item
+ });
+ }
+
+ return list;
+ }
+ };
+
+ _proto.html = function html(src) {
+ var cap = this.rules.block.html.exec(src);
+
+ if (cap) {
+ return {
+ type: this.options.sanitize ? 'paragraph' : 'html',
+ raw: cap[0],
+ pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
+ text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]
+ };
+ }
+ };
+
+ _proto.def = function def(src) {
+ var cap = this.rules.block.def.exec(src);
+
+ if (cap) {
+ if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
+ var tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
+ return {
+ tag: tag,
+ raw: cap[0],
+ href: cap[2],
+ title: cap[3]
+ };
+ }
+ };
+
+ _proto.table = function table(src) {
+ var cap = this.rules.block.table.exec(src);
+
+ if (cap) {
+ var item = {
+ type: 'table',
+ header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+ cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
+ };
+
+ if (item.header.length === item.align.length) {
+ item.raw = cap[0];
+ var l = item.align.length;
+ var i;
+
+ for (i = 0; i < l; i++) {
+ if (/^ *-+: *$/.test(item.align[i])) {
+ item.align[i] = 'right';
+ } else if (/^ *:-+: *$/.test(item.align[i])) {
+ item.align[i] = 'center';
+ } else if (/^ *:-+ *$/.test(item.align[i])) {
+ item.align[i] = 'left';
+ } else {
+ item.align[i] = null;
+ }
+ }
+
+ l = item.cells.length;
+
+ for (i = 0; i < l; i++) {
+ item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length);
+ }
+
+ return item;
+ }
+ }
+ };
+
+ _proto.lheading = function lheading(src) {
+ var cap = this.rules.block.lheading.exec(src);
+
+ if (cap) {
+ return {
+ type: 'heading',
+ raw: cap[0],
+ depth: cap[2].charAt(0) === '=' ? 1 : 2,
+ text: cap[1]
+ };
+ }
+ };
+
+ _proto.paragraph = function paragraph(src) {
+ var cap = this.rules.block.paragraph.exec(src);
+
+ if (cap) {
+ return {
+ type: 'paragraph',
+ raw: cap[0],
+ text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1]
+ };
+ }
+ };
+
+ _proto.text = function text(src, tokens) {
+ var cap = this.rules.block.text.exec(src);
+
+ if (cap) {
+ var lastToken = tokens[tokens.length - 1];
+
+ if (lastToken && lastToken.type === 'text') {
+ return {
+ raw: cap[0],
+ text: cap[0]
+ };
+ }
+
+ return {
+ type: 'text',
+ raw: cap[0],
+ text: cap[0]
+ };
+ }
+ };
+
+ _proto.escape = function escape(src) {
+ var cap = this.rules.inline.escape.exec(src);
+
+ if (cap) {
+ return {
+ type: 'escape',
+ raw: cap[0],
+ text: _escape(cap[1])
+ };
+ }
+ };
+
+ _proto.tag = function tag(src, inLink, inRawBlock) {
+ var cap = this.rules.inline.tag.exec(src);
+
+ if (cap) {
+ if (!inLink && /^<a /i.test(cap[0])) {
+ inLink = true;
+ } else if (inLink && /^<\/a>/i.test(cap[0])) {
+ inLink = false;
+ }
+
+ if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
+ inRawBlock = true;
+ } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
+ inRawBlock = false;
+ }
+
+ return {
+ type: this.options.sanitize ? 'text' : 'html',
+ raw: cap[0],
+ inLink: inLink,
+ inRawBlock: inRawBlock,
+ text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]
+ };
+ }
+ };
+
+ _proto.link = function link(src) {
+ var cap = this.rules.inline.link.exec(src);
+
+ if (cap) {
+ var lastParenIndex = findClosingBracket$1(cap[2], '()');
+
+ if (lastParenIndex > -1) {
+ var start = cap[0].indexOf('!') === 0 ? 5 : 4;
+ var linkLen = start + cap[1].length + lastParenIndex;
+ cap[2] = cap[2].substring(0, lastParenIndex);
+ cap[0] = cap[0].substring(0, linkLen).trim();
+ cap[3] = '';
+ }
+
+ var href = cap[2];
+ var title = '';
+
+ if (this.options.pedantic) {
+ var link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
+
+ if (link) {
+ href = link[1];
+ title = link[3];
+ } else {
+ title = '';
+ }
+ } else {
+ title = cap[3] ? cap[3].slice(1, -1) : '';
+ }
+
+ href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
+ var token = outputLink(cap, {
+ href: href ? href.replace(this.rules.inline._escapes, '$1') : href,
+ title: title ? title.replace(this.rules.inline._escapes, '$1') : title
+ }, cap[0]);
+ return token;
+ }
+ };
+
+ _proto.reflink = function reflink(src, links) {
+ var cap;
+
+ if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
+ var link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
+ link = links[link.toLowerCase()];
+
+ if (!link || !link.href) {
+ var text = cap[0].charAt(0);
+ return {
+ type: 'text',
+ raw: text,
+ text: text
+ };
+ }
+
+ var token = outputLink(cap, link, cap[0]);
+ return token;
+ }
+ };
+
+ _proto.strong = function strong(src) {
+ var cap = this.rules.inline.strong.exec(src);
+
+ if (cap) {
+ return {
+ type: 'strong',
+ raw: cap[0],
+ text: cap[4] || cap[3] || cap[2] || cap[1]
+ };
+ }
+ };
+
+ _proto.em = function em(src) {
+ var cap = this.rules.inline.em.exec(src);
+
+ if (cap) {
+ return {
+ type: 'em',
+ raw: cap[0],
+ text: cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]
+ };
+ }
+ };
+
+ _proto.codespan = function codespan(src) {
+ var cap = this.rules.inline.code.exec(src);
+
+ if (cap) {
+ var text = cap[2].replace(/\n/g, ' ');
+ var hasNonSpaceChars = /[^ ]/.test(text);
+ var hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' ');
+
+ if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
+ text = text.substring(1, text.length - 1);
+ }
+
+ text = _escape(text, true);
+ return {
+ type: 'codespan',
+ raw: cap[0],
+ text: text
+ };
+ }
+ };
+
+ _proto.br = function br(src) {
+ var cap = this.rules.inline.br.exec(src);
+
+ if (cap) {
+ return {
+ type: 'br',
+ raw: cap[0]
+ };
+ }
+ };
+
+ _proto.del = function del(src) {
+ var cap = this.rules.inline.del.exec(src);
+
+ if (cap) {
+ return {
+ type: 'del',
+ raw: cap[0],
+ text: cap[1]
+ };
+ }
+ };
+
+ _proto.autolink = function autolink(src, mangle) {
+ var cap = this.rules.inline.autolink.exec(src);
+
+ if (cap) {
+ var text, href;
+
+ if (cap[2] === '@') {
+ text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]);
+ href = 'mailto:' + text;
+ } else {
+ text = _escape(cap[1]);
+ href = text;
+ }
+
+ return {
+ type: 'link',
+ raw: cap[0],
+ text: text,
+ href: href,
+ tokens: [{
+ type: 'text',
+ raw: text,
+ text: text
+ }]
+ };
+ }
+ };
+
+ _proto.url = function url(src, mangle) {
+ var cap;
+
+ if (cap = this.rules.inline.url.exec(src)) {
+ var text, href;
+
+ if (cap[2] === '@') {
+ text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]);
+ href = 'mailto:' + text;
+ } else {
+ // do extended autolink path validation
+ var prevCapZero;
+
+ do {
+ prevCapZero = cap[0];
+ cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];
+ } while (prevCapZero !== cap[0]);
+
+ text = _escape(cap[0]);
+
+ if (cap[1] === 'www.') {
+ href = 'http://' + text;
+ } else {
+ href = text;
+ }
+ }
+
+ return {
+ type: 'link',
+ raw: cap[0],
+ text: text,
+ href: href,
+ tokens: [{
+ type: 'text',
+ raw: text,
+ text: text
+ }]
+ };
+ }
+ };
+
+ _proto.inlineText = function inlineText(src, inRawBlock, smartypants) {
+ var cap = this.rules.inline.text.exec(src);
+
+ if (cap) {
+ var text;
+
+ if (inRawBlock) {
+ text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0];
+ } else {
+ text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);
+ }
+
+ return {
+ type: 'text',
+ raw: cap[0],
+ text: text
+ };
+ }
+ };
+
+ return Tokenizer;
+ }();
+
var noopTest$1 = helpers.noopTest,
edit$1 = helpers.edit,
merge$1 = helpers.merge;
@@ -401,14 +1098,20 @@
*/
block.gfm = merge$1({}, block.normal, {
- nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
+ nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header
+ + ' *([-:]+ *\\|[-| :]*)' // Align
+ + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)',
+ // Cells
table: '^ *\\|(.+)\\n' // Header
+ ' *\\|?( *[-:]+[-| :]*)' // Align
- + '(?:\\n((?:(?!^|>|\\n| |hr|heading|lheading|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+ + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
});
- block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
- .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
+ block.gfm.nptable = edit$1(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
+ .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks
+ .getRegex();
+ block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
+ .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks
.getRegex();
/**
* Pedantic grammar (original John Gruber's loose markdown specification)
@@ -441,15 +1144,16 @@
reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
- em: /^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
+ em: /^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\s,punctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\s,punctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
br: /^( {2,}|\\)\n(?!\s*$)/,
del: noopTest$1,
text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/
}; // list of punctuation marks from common mark spec
// without ` and ] to workaround Rule 17 (inline code blocks/links)
+ // without , to work around example 393
- inline._punctuation = '!"#$%&\'()*+,\\-./:;<=>?@\\[^_{|}~';
+ inline._punctuation = '!"#$%&\'()*+\\-./:;<=>?@\\[^_{|}~';
inline.em = edit$1(inline.em).replace(/punctuation/g, inline._punctuation).getRegex();
inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
@@ -457,7 +1161,7 @@
inline.autolink = edit$1(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();
inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;
inline.tag = edit$1(inline.tag).replace('comment', block._comment).replace('attribute', inline._attribute).getRegex();
- inline._label = /(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
+ inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/;
inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
inline.link = edit$1(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();
@@ -503,32 +1207,81 @@
inline: inline
};
- var defaults$1 = defaults.defaults;
- var block$1 = rules.block;
- var rtrim$1 = helpers.rtrim,
- splitCells$1 = helpers.splitCells,
- escape$1 = helpers.escape;
+ var defaults$2 = defaults.defaults;
+ var block$1 = rules.block,
+ inline$1 = rules.inline;
+ /**
+ * smartypants text replacement
+ */
+
+ function smartypants(text) {
+ return text // em-dashes
+ .replace(/---/g, "\u2014") // en-dashes
+ .replace(/--/g, "\u2013") // opening singles
+ .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // closing singles & apostrophes
+ .replace(/'/g, "\u2019") // opening doubles
+ .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201C") // closing doubles
+ .replace(/"/g, "\u201D") // ellipses
+ .replace(/\.{3}/g, "\u2026");
+ }
+ /**
+ * mangle email addresses
+ */
+
+
+ function mangle(text) {
+ var out = '',
+ i,
+ ch;
+ var l = text.length;
+
+ for (i = 0; i < l; i++) {
+ ch = text.charCodeAt(i);
+
+ if (Math.random() > 0.5) {
+ ch = 'x' + ch.toString(16);
+ }
+
+ out += '&#' + ch + ';';
+ }
+
+ return out;
+ }
/**
* Block Lexer
*/
- var Lexer_1 =
- /*#__PURE__*/
- function () {
+
+ var Lexer_1 = /*#__PURE__*/function () {
function Lexer(options) {
this.tokens = [];
this.tokens.links = Object.create(null);
- this.options = options || defaults$1;
- this.rules = block$1.normal;
+ this.options = options || defaults$2;
+ this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();
+ this.tokenizer = this.options.tokenizer;
+ this.tokenizer.options = this.options;
+ var rules = {
+ block: block$1.normal,
+ inline: inline$1.normal
+ };
if (this.options.pedantic) {
- this.rules = block$1.pedantic;
+ rules.block = block$1.pedantic;
+ rules.inline = inline$1.pedantic;
} else if (this.options.gfm) {
- this.rules = block$1.gfm;
+ rules.block = block$1.gfm;
+
+ if (this.options.breaks) {
+ rules.inline = inline$1.breaks;
+ } else {
+ rules.inline = inline$1.gfm;
+ }
}
+
+ this.tokenizer.rules = rules;
}
/**
- * Expose Block Rules
+ * Expose Rules
*/
@@ -538,355 +1291,411 @@
Lexer.lex = function lex(src, options) {
var lexer = new Lexer(options);
return lexer.lex(src);
- };
-
- var _proto = Lexer.prototype;
-
+ }
/**
* Preprocessing
*/
+ ;
+
+ var _proto = Lexer.prototype;
+
_proto.lex = function lex(src) {
src = src.replace(/\r\n|\r/g, '\n').replace(/\t/g, ' ');
- return this.token(src, true);
- };
-
+ this.blockTokens(src, this.tokens, true);
+ this.inline(this.tokens);
+ return this.tokens;
+ }
/**
* Lexing
*/
- _proto.token = function token(src, top) {
+ ;
+
+ _proto.blockTokens = function blockTokens(src, tokens, top) {
+ if (tokens === void 0) {
+ tokens = [];
+ }
+
+ if (top === void 0) {
+ top = true;
+ }
+
src = src.replace(/^ +$/gm, '');
- var next, loose, cap, bull, b, item, listStart, listItems, t, space, i, tag, l, isordered, istask, ischecked;
+ var token, i, l, lastToken;
while (src) {
// newline
- if (cap = this.rules.newline.exec(src)) {
- src = src.substring(cap[0].length);
+ if (token = this.tokenizer.space(src)) {
+ src = src.substring(token.raw.length);
- if (cap[0].length > 1) {
- this.tokens.push({
- type: 'space'
- });
+ if (token.type) {
+ tokens.push(token);
}
+
+ continue;
} // code
- if (cap = this.rules.code.exec(src)) {
- var lastToken = this.tokens[this.tokens.length - 1];
- src = src.substring(cap[0].length); // An indented code block cannot interrupt a paragraph.
+ if (token = this.tokenizer.code(src, tokens)) {
+ src = src.substring(token.raw.length);
- if (lastToken && lastToken.type === 'paragraph') {
- lastToken.text += '\n' + cap[0].trimRight();
+ if (token.type) {
+ tokens.push(token);
} else {
- cap = cap[0].replace(/^ {4}/gm, '');
- this.tokens.push({
- type: 'code',
- codeBlockStyle: 'indented',
- text: !this.options.pedantic ? rtrim$1(cap, '\n') : cap
- });
+ lastToken = tokens[tokens.length - 1];
+ lastToken.raw += '\n' + token.raw;
+ lastToken.text += '\n' + token.text;
}
continue;
} // fences
- if (cap = this.rules.fences.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'code',
- lang: cap[2] ? cap[2].trim() : cap[2],
- text: cap[3] || ''
- });
+ if (token = this.tokenizer.fences(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
} // heading
- if (cap = this.rules.heading.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'heading',
- depth: cap[1].length,
- text: cap[2]
- });
+ if (token = this.tokenizer.heading(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
} // table no leading pipe (gfm)
- if (cap = this.rules.nptable.exec(src)) {
- item = {
- type: 'table',
- header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
- align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
- cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
- };
+ if (token = this.tokenizer.nptable(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // hr
- if (item.header.length === item.align.length) {
- src = src.substring(cap[0].length);
- for (i = 0; i < item.align.length; i++) {
- if (/^ *-+: *$/.test(item.align[i])) {
- item.align[i] = 'right';
- } else if (/^ *:-+: *$/.test(item.align[i])) {
- item.align[i] = 'center';
- } else if (/^ *:-+ *$/.test(item.align[i])) {
- item.align[i] = 'left';
- } else {
- item.align[i] = null;
- }
- }
+ if (token = this.tokenizer.hr(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // blockquote
+
+
+ if (token = this.tokenizer.blockquote(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.blockTokens(token.text, [], top);
+ tokens.push(token);
+ continue;
+ } // list
- for (i = 0; i < item.cells.length; i++) {
- item.cells[i] = splitCells$1(item.cells[i], item.header.length);
- }
- this.tokens.push(item);
- continue;
+ if (token = this.tokenizer.list(src)) {
+ src = src.substring(token.raw.length);
+ l = token.items.length;
+
+ for (i = 0; i < l; i++) {
+ token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);
}
- } // hr
+ tokens.push(token);
+ continue;
+ } // html
- if (cap = this.rules.hr.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'hr'
- });
+
+ if (token = this.tokenizer.html(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
- } // blockquote
+ } // def
- if (cap = this.rules.blockquote.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'blockquote_start'
- });
- cap = cap[0].replace(/^ *> ?/gm, ''); // Pass `top` to keep the current
- // "toplevel" state. This is exactly
- // how markdown.pl works.
+ if (top && (token = this.tokenizer.def(src))) {
+ src = src.substring(token.raw.length);
+
+ if (!this.tokens.links[token.tag]) {
+ this.tokens.links[token.tag] = {
+ href: token.href,
+ title: token.title
+ };
+ }
- this.token(cap, top);
- this.tokens.push({
- type: 'blockquote_end'
- });
continue;
- } // list
+ } // table (gfm)
- if (cap = this.rules.list.exec(src)) {
- src = src.substring(cap[0].length);
- bull = cap[2];
- isordered = bull.length > 1;
- listStart = {
- type: 'list_start',
- ordered: isordered,
- start: isordered ? +bull : '',
- loose: false
- };
- this.tokens.push(listStart); // Get each top-level item.
+ if (token = this.tokenizer.table(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // lheading
+
+
+ if (token = this.tokenizer.lheading(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // top-level paragraph
- cap = cap[0].match(this.rules.item);
- listItems = [];
- next = false;
- l = cap.length;
- i = 0;
- for (; i < l; i++) {
- item = cap[i]; // Remove the list item's bullet
- // so it is seen as the next token.
+ if (top && (token = this.tokenizer.paragraph(src))) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // text
- space = item.length;
- item = item.replace(/^ *([*+-]|\d+\.) */, ''); // Outdent whatever the
- // list item contains. Hacky.
- if (~item.indexOf('\n ')) {
- space -= item.length;
- item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');
- } // Determine whether the next list item belongs here.
- // Backpedal if it does not belong in this list.
+ if (token = this.tokenizer.text(src, tokens)) {
+ src = src.substring(token.raw.length);
+ if (token.type) {
+ tokens.push(token);
+ } else {
+ lastToken = tokens[tokens.length - 1];
+ lastToken.raw += '\n' + token.raw;
+ lastToken.text += '\n' + token.text;
+ }
- if (i !== l - 1) {
- b = block$1.bullet.exec(cap[i + 1])[0];
+ continue;
+ }
- if (bull.length > 1 ? b.length === 1 : b.length > 1 || this.options.smartLists && b !== bull) {
- src = cap.slice(i + 1).join('\n') + src;
- i = l - 1;
- }
- } // Determine whether item is loose or not.
- // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
- // for discount behavior.
+ if (src) {
+ var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(errMsg);
+ break;
+ } else {
+ throw new Error(errMsg);
+ }
+ }
+ }
- loose = next || /\n\n(?!\s*$)/.test(item);
+ return tokens;
+ };
- if (i !== l - 1) {
- next = item.charAt(item.length - 1) === '\n';
- if (!loose) loose = next;
+ _proto.inline = function inline(tokens) {
+ var i, j, k, l2, row, token;
+ var l = tokens.length;
+
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+
+ switch (token.type) {
+ case 'paragraph':
+ case 'text':
+ case 'heading':
+ {
+ token.tokens = [];
+ this.inlineTokens(token.text, token.tokens);
+ break;
}
- if (loose) {
- listStart.loose = true;
- } // Check for task list items
+ case 'table':
+ {
+ token.tokens = {
+ header: [],
+ cells: []
+ }; // header
+ l2 = token.header.length;
- istask = /^\[[ xX]\] /.test(item);
- ischecked = undefined;
+ for (j = 0; j < l2; j++) {
+ token.tokens.header[j] = [];
+ this.inlineTokens(token.header[j], token.tokens.header[j]);
+ } // cells
- if (istask) {
- ischecked = item[1] !== ' ';
- item = item.replace(/^\[[ xX]\] +/, '');
+
+ l2 = token.cells.length;
+
+ for (j = 0; j < l2; j++) {
+ row = token.cells[j];
+ token.tokens.cells[j] = [];
+
+ for (k = 0; k < row.length; k++) {
+ token.tokens.cells[j][k] = [];
+ this.inlineTokens(row[k], token.tokens.cells[j][k]);
+ }
+ }
+
+ break;
}
- t = {
- type: 'list_item_start',
- task: istask,
- checked: ischecked,
- loose: loose
- };
- listItems.push(t);
- this.tokens.push(t); // Recurse.
+ case 'blockquote':
+ {
+ this.inline(token.tokens);
+ break;
+ }
- this.token(item, false);
- this.tokens.push({
- type: 'list_item_end'
- });
- }
+ case 'list':
+ {
+ l2 = token.items.length;
- if (listStart.loose) {
- l = listItems.length;
- i = 0;
+ for (j = 0; j < l2; j++) {
+ this.inline(token.items[j].tokens);
+ }
- for (; i < l; i++) {
- listItems[i].loose = true;
+ break;
}
- }
+ }
+ }
- this.tokens.push({
- type: 'list_end'
- });
+ return tokens;
+ }
+ /**
+ * Lexing/Compiling
+ */
+ ;
+
+ _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock) {
+ if (tokens === void 0) {
+ tokens = [];
+ }
+
+ if (inLink === void 0) {
+ inLink = false;
+ }
+
+ if (inRawBlock === void 0) {
+ inRawBlock = false;
+ }
+
+ var token;
+
+ while (src) {
+ // escape
+ if (token = this.tokenizer.escape(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
- } // html
+ } // tag
- if (cap = this.rules.html.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: this.options.sanitize ? 'paragraph' : 'html',
- pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
- text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0]) : cap[0]
- });
+ if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {
+ src = src.substring(token.raw.length);
+ inLink = token.inLink;
+ inRawBlock = token.inRawBlock;
+ tokens.push(token);
continue;
- } // def
+ } // link
- if (top && (cap = this.rules.def.exec(src))) {
- src = src.substring(cap[0].length);
- if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
- tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
+ if (token = this.tokenizer.link(src)) {
+ src = src.substring(token.raw.length);
- if (!this.tokens.links[tag]) {
- this.tokens.links[tag] = {
- href: cap[2],
- title: cap[3]
- };
+ if (token.type === 'link') {
+ token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);
}
+ tokens.push(token);
continue;
- } // table (gfm)
+ } // reflink, nolink
- if (cap = this.rules.table.exec(src)) {
- item = {
- type: 'table',
- header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')),
- align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
- cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : []
- };
+ if (token = this.tokenizer.reflink(src, this.tokens.links)) {
+ src = src.substring(token.raw.length);
- if (item.header.length === item.align.length) {
- src = src.substring(cap[0].length);
+ if (token.type === 'link') {
+ token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);
+ }
- for (i = 0; i < item.align.length; i++) {
- if (/^ *-+: *$/.test(item.align[i])) {
- item.align[i] = 'right';
- } else if (/^ *:-+: *$/.test(item.align[i])) {
- item.align[i] = 'center';
- } else if (/^ *:-+ *$/.test(item.align[i])) {
- item.align[i] = 'left';
- } else {
- item.align[i] = null;
- }
- }
+ tokens.push(token);
+ continue;
+ } // strong
- for (i = 0; i < item.cells.length; i++) {
- item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length);
- }
- this.tokens.push(item);
- continue;
- }
- } // lheading
+ if (token = this.tokenizer.strong(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
+ continue;
+ } // em
- if (cap = this.rules.lheading.exec(src)) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'heading',
- depth: cap[2].charAt(0) === '=' ? 1 : 2,
- text: cap[1]
- });
+ if (token = this.tokenizer.em(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
continue;
- } // top-level paragraph
+ } // code
- if (top && (cap = this.rules.paragraph.exec(src))) {
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'paragraph',
- text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1]
- });
+ if (token = this.tokenizer.codespan(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // br
+
+
+ if (token = this.tokenizer.br(src)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // del (gfm)
+
+
+ if (token = this.tokenizer.del(src)) {
+ src = src.substring(token.raw.length);
+ token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);
+ tokens.push(token);
+ continue;
+ } // autolink
+
+
+ if (token = this.tokenizer.autolink(src, mangle)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
+ continue;
+ } // url (gfm)
+
+
+ if (!inLink && (token = this.tokenizer.url(src, mangle))) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
} // text
- if (cap = this.rules.text.exec(src)) {
- // Top-level should never reach here.
- src = src.substring(cap[0].length);
- this.tokens.push({
- type: 'text',
- text: cap[0]
- });
+ if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {
+ src = src.substring(token.raw.length);
+ tokens.push(token);
continue;
}
if (src) {
- throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
+ var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
+
+ if (this.options.silent) {
+ console.error(errMsg);
+ break;
+ } else {
+ throw new Error(errMsg);
+ }
}
}
- return this.tokens;
+ return tokens;
};
_createClass(Lexer, null, [{
key: "rules",
get: function get() {
- return block$1;
+ return {
+ block: block$1,
+ inline: inline$1
+ };
}
}]);
return Lexer;
}();
- var defaults$2 = defaults.defaults;
+ var defaults$3 = defaults.defaults;
var cleanUrl$1 = helpers.cleanUrl,
- escape$2 = helpers.escape;
+ escape$1 = helpers.escape;
/**
* Renderer
*/
- var Renderer_1 =
- /*#__PURE__*/
- function () {
+ var Renderer_1 = /*#__PURE__*/function () {
function Renderer(options) {
- this.options = options || defaults$2;
+ this.options = options || defaults$3;
}
var _proto = Renderer.prototype;
@@ -904,10 +1713,10 @@
}
if (!lang) {
- return '<pre><code>' + (escaped ? _code : escape$2(_code, true)) + '</code></pre>';
+ return '<pre><code>' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\n';
}
- return '<pre><code class="' + this.options.langPrefix + escape$2(lang, true) + '">' + (escaped ? _code : escape$2(_code, true)) + '</code></pre>\n';
+ return '<pre><code class="' + this.options.langPrefix + escape$1(lang, true) + '">' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\n';
};
_proto.blockquote = function blockquote(quote) {
@@ -962,9 +1771,9 @@
var type = flags.header ? 'th' : 'td';
var tag = flags.align ? '<' + type + ' align="' + flags.align + '">' : '<' + type + '>';
return tag + content + '</' + type + '>\n';
- };
+ } // span level renderer
+ ;
- // span level renderer
_proto.strong = function strong(text) {
return '<strong>' + text + '</strong>';
};
@@ -992,7 +1801,7 @@
return text;
}
- var out = '<a href="' + escape$2(href) + '"';
+ var out = '<a href="' + escape$1(href) + '"';
if (title) {
out += ' title="' + title + '"';
@@ -1027,353 +1836,10 @@
}();
/**
- * Slugger generates header id
- */
- var Slugger_1 =
- /*#__PURE__*/
- function () {
- function Slugger() {
- this.seen = {};
- }
- /**
- * Convert string to unique id
- */
-
-
- var _proto = Slugger.prototype;
-
- _proto.slug = function slug(value) {
- var slug = value.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');
-
- if (this.seen.hasOwnProperty(slug)) {
- var originalSlug = slug;
-
- do {
- this.seen[originalSlug]++;
- slug = originalSlug + '-' + this.seen[originalSlug];
- } while (this.seen.hasOwnProperty(slug));
- }
-
- this.seen[slug] = 0;
- return slug;
- };
-
- return Slugger;
- }();
-
- var defaults$3 = defaults.defaults;
- var inline$1 = rules.inline;
- var findClosingBracket$1 = helpers.findClosingBracket,
- escape$3 = helpers.escape;
- /**
- * Inline Lexer & Compiler
- */
-
- var InlineLexer_1 =
- /*#__PURE__*/
- function () {
- function InlineLexer(links, options) {
- this.options = options || defaults$3;
- this.links = links;
- this.rules = inline$1.normal;
- this.options.renderer = this.options.renderer || new Renderer_1();
- this.renderer = this.options.renderer;
- this.renderer.options = this.options;
-
- if (!this.links) {
- throw new Error('Tokens array requires a `links` property.');
- }
-
- if (this.options.pedantic) {
- this.rules = inline$1.pedantic;
- } else if (this.options.gfm) {
- if (this.options.breaks) {
- this.rules = inline$1.breaks;
- } else {
- this.rules = inline$1.gfm;
- }
- }
- }
- /**
- * Expose Inline Rules
- */
-
-
- /**
- * Static Lexing/Compiling Method
- */
- InlineLexer.output = function output(src, links, options) {
- var inline = new InlineLexer(links, options);
- return inline.output(src);
- }
- /**
- * Lexing/Compiling
- */
- ;
-
- var _proto = InlineLexer.prototype;
-
- _proto.output = function output(src) {
- var out = '',
- link,
- text,
- href,
- title,
- cap,
- prevCapZero;
-
- while (src) {
- // escape
- if (cap = this.rules.escape.exec(src)) {
- src = src.substring(cap[0].length);
- out += escape$3(cap[1]);
- continue;
- } // tag
-
-
- if (cap = this.rules.tag.exec(src)) {
- if (!this.inLink && /^<a /i.test(cap[0])) {
- this.inLink = true;
- } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
- this.inLink = false;
- }
-
- if (!this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.inRawBlock = true;
- } else if (this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.inRawBlock = false;
- }
-
- src = src.substring(cap[0].length);
- out += this.renderer.html(this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$3(cap[0]) : cap[0]);
- continue;
- } // link
-
-
- if (cap = this.rules.link.exec(src)) {
- var lastParenIndex = findClosingBracket$1(cap[2], '()');
-
- if (lastParenIndex > -1) {
- var start = cap[0].indexOf('!') === 0 ? 5 : 4;
- var linkLen = start + cap[1].length + lastParenIndex;
- cap[2] = cap[2].substring(0, lastParenIndex);
- cap[0] = cap[0].substring(0, linkLen).trim();
- cap[3] = '';
- }
-
- src = src.substring(cap[0].length);
- this.inLink = true;
- href = cap[2];
-
- if (this.options.pedantic) {
- link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
-
- if (link) {
- href = link[1];
- title = link[3];
- } else {
- title = '';
- }
- } else {
- title = cap[3] ? cap[3].slice(1, -1) : '';
- }
-
- href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
- out += this.outputLink(cap, {
- href: InlineLexer.escapes(href),
- title: InlineLexer.escapes(title)
- });
- this.inLink = false;
- continue;
- } // reflink, nolink
-
-
- if ((cap = this.rules.reflink.exec(src)) || (cap = this.rules.nolink.exec(src))) {
- src = src.substring(cap[0].length);
- link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
- link = this.links[link.toLowerCase()];
-
- if (!link || !link.href) {
- out += cap[0].charAt(0);
- src = cap[0].substring(1) + src;
- continue;
- }
-
- this.inLink = true;
- out += this.outputLink(cap, link);
- this.inLink = false;
- continue;
- } // strong
-
-
- if (cap = this.rules.strong.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));
- continue;
- } // em
-
-
- if (cap = this.rules.em.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));
- continue;
- } // code
-
-
- if (cap = this.rules.code.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.codespan(escape$3(cap[2].trim(), true));
- continue;
- } // br
-
-
- if (cap = this.rules.br.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.br();
- continue;
- } // del (gfm)
-
-
- if (cap = this.rules.del.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.del(this.output(cap[1]));
- continue;
- } // autolink
-
-
- if (cap = this.rules.autolink.exec(src)) {
- src = src.substring(cap[0].length);
-
- if (cap[2] === '@') {
- text = escape$3(this.mangle(cap[1]));
- href = 'mailto:' + text;
- } else {
- text = escape$3(cap[1]);
- href = text;
- }
-
- out += this.renderer.link(href, null, text);
- continue;
- } // url (gfm)
-
-
- if (!this.inLink && (cap = this.rules.url.exec(src))) {
- if (cap[2] === '@') {
- text = escape$3(cap[0]);
- href = 'mailto:' + text;
- } else {
- // do extended autolink path validation
- do {
- prevCapZero = cap[0];
- cap[0] = this.rules._backpedal.exec(cap[0])[0];
- } while (prevCapZero !== cap[0]);
-
- text = escape$3(cap[0]);
-
- if (cap[1] === 'www.') {
- href = 'http://' + text;
- } else {
- href = text;
- }
- }
-
- src = src.substring(cap[0].length);
- out += this.renderer.link(href, null, text);
- continue;
- } // text
-
-
- if (cap = this.rules.text.exec(src)) {
- src = src.substring(cap[0].length);
-
- if (this.inRawBlock) {
- out += this.renderer.text(this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$3(cap[0]) : cap[0]);
- } else {
- out += this.renderer.text(escape$3(this.smartypants(cap[0])));
- }
-
- continue;
- }
-
- if (src) {
- throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));
- }
- }
-
- return out;
- };
-
- InlineLexer.escapes = function escapes(text) {
- return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;
- }
- /**
- * Compile Link
- */
- ;
-
- _proto.outputLink = function outputLink(cap, link) {
- var href = link.href,
- title = link.title ? escape$3(link.title) : null;
- return cap[0].charAt(0) !== '!' ? this.renderer.link(href, title, this.output(cap[1])) : this.renderer.image(href, title, escape$3(cap[1]));
- }
- /**
- * Smartypants Transformations
- */
- ;
-
- _proto.smartypants = function smartypants(text) {
- if (!this.options.smartypants) return text;
- return text // em-dashes
- .replace(/---/g, "\u2014") // en-dashes
- .replace(/--/g, "\u2013") // opening singles
- .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // closing singles & apostrophes
- .replace(/'/g, "\u2019") // opening doubles
- .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201C") // closing doubles
- .replace(/"/g, "\u201D") // ellipses
- .replace(/\.{3}/g, "\u2026");
- }
- /**
- * Mangle Links
- */
- ;
-
- _proto.mangle = function mangle(text) {
- if (!this.options.mangle) return text;
- var l = text.length;
- var out = '',
- i = 0,
- ch;
-
- for (; i < l; i++) {
- ch = text.charCodeAt(i);
-
- if (Math.random() > 0.5) {
- ch = 'x' + ch.toString(16);
- }
-
- out += '&#' + ch + ';';
- }
-
- return out;
- };
-
- _createClass(InlineLexer, null, [{
- key: "rules",
- get: function get() {
- return inline$1;
- }
- }]);
-
- return InlineLexer;
- }();
-
- /**
* TextRenderer
* returns only the textual part of the token
*/
- var TextRenderer_1 =
- /*#__PURE__*/
- function () {
+ var TextRenderer_1 = /*#__PURE__*/function () {
function TextRenderer() {}
var _proto = TextRenderer.prototype;
@@ -1395,6 +1861,10 @@
return text;
};
+ _proto.html = function html(text) {
+ return text;
+ };
+
_proto.text = function text(_text) {
return _text;
};
@@ -1414,23 +1884,54 @@
return TextRenderer;
}();
+ /**
+ * Slugger generates header id
+ */
+ var Slugger_1 = /*#__PURE__*/function () {
+ function Slugger() {
+ this.seen = {};
+ }
+ /**
+ * Convert string to unique id
+ */
+
+
+ var _proto = Slugger.prototype;
+
+ _proto.slug = function slug(value) {
+ var slug = value.toLowerCase().trim() // remove html tags
+ .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars
+ .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');
+
+ if (this.seen.hasOwnProperty(slug)) {
+ var originalSlug = slug;
+
+ do {
+ this.seen[originalSlug]++;
+ slug = originalSlug + '-' + this.seen[originalSlug];
+ } while (this.seen.hasOwnProperty(slug));
+ }
+
+ this.seen[slug] = 0;
+ return slug;
+ };
+
+ return Slugger;
+ }();
+
var defaults$4 = defaults.defaults;
- var merge$2 = helpers.merge,
- unescape$1 = helpers.unescape;
+ var unescape$1 = helpers.unescape;
/**
* Parsing & Compiling
*/
- var Parser_1 =
- /*#__PURE__*/
- function () {
+ var Parser_1 = /*#__PURE__*/function () {
function Parser(options) {
- this.tokens = [];
- this.token = null;
this.options = options || defaults$4;
this.options.renderer = this.options.renderer || new Renderer_1();
this.renderer = this.options.renderer;
this.renderer.options = this.options;
+ this.textRenderer = new TextRenderer_1();
this.slugger = new Slugger_1();
}
/**
@@ -1441,209 +1942,295 @@
Parser.parse = function parse(tokens, options) {
var parser = new Parser(options);
return parser.parse(tokens);
- };
-
- var _proto = Parser.prototype;
-
+ }
/**
* Parse Loop
*/
- _proto.parse = function parse(tokens) {
- this.inline = new InlineLexer_1(tokens.links, this.options); // use an InlineLexer with a TextRenderer to extract pure text
+ ;
- this.inlineText = new InlineLexer_1(tokens.links, merge$2({}, this.options, {
- renderer: new TextRenderer_1()
- }));
- this.tokens = tokens.reverse();
- var out = '';
+ var _proto = Parser.prototype;
- while (this.next()) {
- out += this.tok();
+ _proto.parse = function parse(tokens, top) {
+ if (top === void 0) {
+ top = true;
}
- return out;
- };
+ var out = '',
+ i,
+ j,
+ k,
+ l2,
+ l3,
+ row,
+ cell,
+ header,
+ body,
+ token,
+ ordered,
+ start,
+ loose,
+ itemBody,
+ item,
+ checked,
+ task,
+ checkbox;
+ var l = tokens.length;
+
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+
+ switch (token.type) {
+ case 'space':
+ {
+ continue;
+ }
- /**
- * Next Token
- */
- _proto.next = function next() {
- this.token = this.tokens.pop();
- return this.token;
- };
+ case 'hr':
+ {
+ out += this.renderer.hr();
+ continue;
+ }
- /**
- * Preview Next Token
- */
- _proto.peek = function peek() {
- return this.tokens[this.tokens.length - 1] || 0;
- };
+ case 'heading':
+ {
+ out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape$1(this.parseInline(token.tokens, this.textRenderer)), this.slugger);
+ continue;
+ }
- /**
- * Parse Text Tokens
- */
- _proto.parseText = function parseText() {
- var body = this.token.text;
+ case 'code':
+ {
+ out += this.renderer.code(token.text, token.lang, token.escaped);
+ continue;
+ }
- while (this.peek().type === 'text') {
- body += '\n' + this.next().text;
- }
+ case 'table':
+ {
+ header = ''; // header
- return this.inline.output(body);
- };
+ cell = '';
+ l2 = token.header.length;
- /**
- * Parse Current Token
- */
- _proto.tok = function tok() {
- var body = '';
+ for (j = 0; j < l2; j++) {
+ cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), {
+ header: true,
+ align: token.align[j]
+ });
+ }
- switch (this.token.type) {
- case 'space':
- {
- return '';
- }
+ header += this.renderer.tablerow(cell);
+ body = '';
+ l2 = token.cells.length;
- case 'hr':
- {
- return this.renderer.hr();
- }
+ for (j = 0; j < l2; j++) {
+ row = token.tokens.cells[j];
+ cell = '';
+ l3 = row.length;
- case 'heading':
- {
- return this.renderer.heading(this.inline.output(this.token.text), this.token.depth, unescape$1(this.inlineText.output(this.token.text)), this.slugger);
- }
+ for (k = 0; k < l3; k++) {
+ cell += this.renderer.tablecell(this.parseInline(row[k]), {
+ header: false,
+ align: token.align[k]
+ });
+ }
- case 'code':
- {
- return this.renderer.code(this.token.text, this.token.lang, this.token.escaped);
- }
+ body += this.renderer.tablerow(cell);
+ }
- case 'table':
- {
- var header = '',
- i,
- row,
- cell,
- j; // header
-
- cell = '';
-
- for (i = 0; i < this.token.header.length; i++) {
- cell += this.renderer.tablecell(this.inline.output(this.token.header[i]), {
- header: true,
- align: this.token.align[i]
- });
+ out += this.renderer.table(header, body);
+ continue;
}
- header += this.renderer.tablerow(cell);
+ case 'blockquote':
+ {
+ body = this.parse(token.tokens);
+ out += this.renderer.blockquote(body);
+ continue;
+ }
- for (i = 0; i < this.token.cells.length; i++) {
- row = this.token.cells[i];
- cell = '';
+ case 'list':
+ {
+ ordered = token.ordered;
+ start = token.start;
+ loose = token.loose;
+ l2 = token.items.length;
+ body = '';
+
+ for (j = 0; j < l2; j++) {
+ item = token.items[j];
+ checked = item.checked;
+ task = item.task;
+ itemBody = '';
+
+ if (item.task) {
+ checkbox = this.renderer.checkbox(checked);
+
+ if (loose) {
+ if (item.tokens.length > 0 && item.tokens[0].type === 'text') {
+ item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;
+
+ if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {
+ item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;
+ }
+ } else {
+ item.tokens.unshift({
+ type: 'text',
+ text: checkbox
+ });
+ }
+ } else {
+ itemBody += checkbox;
+ }
+ }
- for (j = 0; j < row.length; j++) {
- cell += this.renderer.tablecell(this.inline.output(row[j]), {
- header: false,
- align: this.token.align[j]
- });
+ itemBody += this.parse(item.tokens, loose);
+ body += this.renderer.listitem(itemBody, task, checked);
}
- body += this.renderer.tablerow(cell);
+ out += this.renderer.list(body, ordered, start);
+ continue;
}
- return this.renderer.table(header, body);
- }
-
- case 'blockquote_start':
- {
- body = '';
+ case 'html':
+ {
+ // TODO parse inline content if parameter markdown=1
+ out += this.renderer.html(token.text);
+ continue;
+ }
- while (this.next().type !== 'blockquote_end') {
- body += this.tok();
+ case 'paragraph':
+ {
+ out += this.renderer.paragraph(this.parseInline(token.tokens));
+ continue;
}
- return this.renderer.blockquote(body);
- }
+ case 'text':
+ {
+ body = token.tokens ? this.parseInline(token.tokens) : token.text;
- case 'list_start':
- {
- body = '';
- var ordered = this.token.ordered,
- start = this.token.start;
+ while (i + 1 < l && tokens[i + 1].type === 'text') {
+ token = tokens[++i];
+ body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);
+ }
- while (this.next().type !== 'list_end') {
- body += this.tok();
+ out += top ? this.renderer.paragraph(body) : body;
+ continue;
}
- return this.renderer.list(body, ordered, start);
- }
+ default:
+ {
+ var errMsg = 'Token with "' + token.type + '" type was not found.';
- case 'list_item_start':
- {
- body = '';
- var loose = this.token.loose;
- var checked = this.token.checked;
- var task = this.token.task;
-
- if (this.token.task) {
- if (loose) {
- if (this.peek().type === 'text') {
- var nextToken = this.peek();
- nextToken.text = this.renderer.checkbox(checked) + ' ' + nextToken.text;
- } else {
- this.tokens.push({
- type: 'text',
- text: this.renderer.checkbox(checked)
- });
- }
+ if (this.options.silent) {
+ console.error(errMsg);
+ return;
} else {
- body += this.renderer.checkbox(checked);
+ throw new Error(errMsg);
}
}
+ }
+ }
+
+ return out;
+ }
+ /**
+ * Parse Inline Tokens
+ */
+ ;
- while (this.next().type !== 'list_item_end') {
- body += !loose && this.token.type === 'text' ? this.parseText() : this.tok();
+ _proto.parseInline = function parseInline(tokens, renderer) {
+ renderer = renderer || this.renderer;
+ var out = '',
+ i,
+ token;
+ var l = tokens.length;
+
+ for (i = 0; i < l; i++) {
+ token = tokens[i];
+
+ switch (token.type) {
+ case 'escape':
+ {
+ out += renderer.text(token.text);
+ break;
}
- return this.renderer.listitem(body, task, checked);
- }
+ case 'html':
+ {
+ out += renderer.html(token.text);
+ break;
+ }
- case 'html':
- {
- // TODO parse inline content if parameter markdown=1
- return this.renderer.html(this.token.text);
- }
+ case 'link':
+ {
+ out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));
+ break;
+ }
- case 'paragraph':
- {
- return this.renderer.paragraph(this.inline.output(this.token.text));
- }
+ case 'image':
+ {
+ out += renderer.image(token.href, token.title, token.text);
+ break;
+ }
- case 'text':
- {
- return this.renderer.paragraph(this.parseText());
- }
+ case 'strong':
+ {
+ out += renderer.strong(this.parseInline(token.tokens, renderer));
+ break;
+ }
- default:
- {
- var errMsg = 'Token with "' + this.token.type + '" type was not found.';
+ case 'em':
+ {
+ out += renderer.em(this.parseInline(token.tokens, renderer));
+ break;
+ }
- if (this.options.silent) {
- console.log(errMsg);
- } else {
- throw new Error(errMsg);
+ case 'codespan':
+ {
+ out += renderer.codespan(token.text);
+ break;
}
- }
+
+ case 'br':
+ {
+ out += renderer.br();
+ break;
+ }
+
+ case 'del':
+ {
+ out += renderer.del(this.parseInline(token.tokens, renderer));
+ break;
+ }
+
+ case 'text':
+ {
+ out += renderer.text(token.text);
+ break;
+ }
+
+ default:
+ {
+ var errMsg = 'Token with "' + token.type + '" type was not found.';
+
+ if (this.options.silent) {
+ console.error(errMsg);
+ return;
+ } else {
+ throw new Error(errMsg);
+ }
+ }
+ }
}
+
+ return out;
};
return Parser;
}();
- var merge$3 = helpers.merge,
+ var merge$2 = helpers.merge,
checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation,
- escape$4 = helpers.escape;
+ escape$2 = helpers.escape;
var getDefaults = defaults.getDefaults,
changeDefaults = defaults.changeDefaults,
defaults$5 = defaults.defaults;
@@ -1661,96 +2248,90 @@
throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');
}
- if (callback || typeof opt === 'function') {
- var _ret = function () {
- if (!callback) {
- callback = opt;
- opt = null;
- }
-
- opt = merge$3({}, marked.defaults, opt || {});
- checkSanitizeDeprecation$1(opt);
- var highlight = opt.highlight;
- var tokens,
- pending,
- i = 0;
+ if (typeof opt === 'function') {
+ callback = opt;
+ opt = null;
+ }
- try {
- tokens = Lexer_1.lex(src, opt);
- } catch (e) {
- return {
- v: callback(e)
- };
- }
+ opt = merge$2({}, marked.defaults, opt || {});
+ checkSanitizeDeprecation$1(opt);
- pending = tokens.length;
+ if (callback) {
+ var highlight = opt.highlight;
+ var tokens;
- var done = function done(err) {
- if (err) {
- opt.highlight = highlight;
- return callback(err);
- }
+ try {
+ tokens = Lexer_1.lex(src, opt);
+ } catch (e) {
+ return callback(e);
+ }
- var out;
+ var done = function done(err) {
+ var out;
+ if (!err) {
try {
out = Parser_1.parse(tokens, opt);
} catch (e) {
err = e;
}
-
- opt.highlight = highlight;
- return err ? callback(err) : callback(null, out);
- };
-
- if (!highlight || highlight.length < 3) {
- return {
- v: done()
- };
}
- delete opt.highlight;
- if (!pending) return {
- v: done()
- };
+ opt.highlight = highlight;
+ return err ? callback(err) : callback(null, out);
+ };
- for (; i < tokens.length; i++) {
- (function (token) {
- if (token.type !== 'code') {
- return --pending || done();
- }
+ if (!highlight || highlight.length < 3) {
+ return done();
+ }
- return highlight(token.text, token.lang, function (err, code) {
- if (err) return done(err);
+ delete opt.highlight;
+ if (!tokens.length) return done();
+ var pending = 0;
+ marked.walkTokens(tokens, function (token) {
+ if (token.type === 'code') {
+ pending++;
+ setTimeout(function () {
+ highlight(token.text, token.lang, function (err, code) {
+ if (err) {
+ return done(err);
+ }
- if (code == null || code === token.text) {
- return --pending || done();
+ if (code != null && code !== token.text) {
+ token.text = code;
+ token.escaped = true;
}
- token.text = code;
- token.escaped = true;
- --pending || done();
+ pending--;
+
+ if (pending === 0) {
+ done();
+ }
});
- })(tokens[i]);
+ }, 0);
}
+ });
- return {
- v: void 0
- };
- }();
+ if (pending === 0) {
+ done();
+ }
- if (typeof _ret === "object") return _ret.v;
+ return;
}
try {
- opt = merge$3({}, marked.defaults, opt || {});
- checkSanitizeDeprecation$1(opt);
- return Parser_1.parse(Lexer_1.lex(src, opt), opt);
+ var _tokens = Lexer_1.lex(src, opt);
+
+ if (opt.walkTokens) {
+ marked.walkTokens(_tokens, opt.walkTokens);
+ }
+
+ return Parser_1.parse(_tokens, opt);
} catch (e) {
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
- if ((opt || marked.defaults).silent) {
- return '<p>An error occurred:</p><pre>' + escape$4(e.message + '', true) + '</pre>';
+ if (opt.silent) {
+ return '<p>An error occurred:</p><pre>' + escape$2(e.message + '', true) + '</pre>';
}
throw e;
@@ -1762,7 +2343,7 @@
marked.options = marked.setOptions = function (opt) {
- merge$3(marked.defaults, opt);
+ merge$2(marked.defaults, opt);
changeDefaults(marked.defaults);
return marked;
};
@@ -1770,17 +2351,143 @@
marked.getDefaults = getDefaults;
marked.defaults = defaults$5;
/**
+ * Use Extension
+ */
+
+ marked.use = function (extension) {
+ var opts = merge$2({}, extension);
+
+ if (extension.renderer) {
+ (function () {
+ var renderer = marked.defaults.renderer || new Renderer_1();
+
+ var _loop = function _loop(prop) {
+ var prevRenderer = renderer[prop];
+
+ renderer[prop] = function () {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var ret = extension.renderer[prop].apply(renderer, args);
+
+ if (ret === false) {
+ ret = prevRenderer.apply(renderer, args);
+ }
+
+ return ret;
+ };
+ };
+
+ for (var prop in extension.renderer) {
+ _loop(prop);
+ }
+
+ opts.renderer = renderer;
+ })();
+ }
+
+ if (extension.tokenizer) {
+ (function () {
+ var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();
+
+ var _loop2 = function _loop2(prop) {
+ var prevTokenizer = tokenizer[prop];
+
+ tokenizer[prop] = function () {
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ var ret = extension.tokenizer[prop].apply(tokenizer, args);
+
+ if (ret === false) {
+ ret = prevTokenizer.apply(tokenizer, args);
+ }
+
+ return ret;
+ };
+ };
+
+ for (var prop in extension.tokenizer) {
+ _loop2(prop);
+ }
+
+ opts.tokenizer = tokenizer;
+ })();
+ }
+
+ if (extension.walkTokens) {
+ var walkTokens = marked.defaults.walkTokens;
+
+ opts.walkTokens = function (token) {
+ extension.walkTokens(token);
+
+ if (walkTokens) {
+ walkTokens(token);
+ }
+ };
+ }
+
+ marked.setOptions(opts);
+ };
+ /**
+ * Run callback for every token
+ */
+
+
+ marked.walkTokens = function (tokens, callback) {
+ for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {
+ var token = _step.value;
+ callback(token);
+
+ switch (token.type) {
+ case 'table':
+ {
+ for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {
+ var cell = _step2.value;
+ marked.walkTokens(cell, callback);
+ }
+
+ for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {
+ var row = _step3.value;
+
+ for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {
+ var _cell = _step4.value;
+ marked.walkTokens(_cell, callback);
+ }
+ }
+
+ break;
+ }
+
+ case 'list':
+ {
+ marked.walkTokens(token.items, callback);
+ break;
+ }
+
+ default:
+ {
+ if (token.tokens) {
+ marked.walkTokens(token.tokens, callback);
+ }
+ }
+ }
+ }
+ };
+ /**
* Expose
*/
+
marked.Parser = Parser_1;
marked.parser = Parser_1.parse;
marked.Renderer = Renderer_1;
marked.TextRenderer = TextRenderer_1;
marked.Lexer = Lexer_1;
marked.lexer = Lexer_1.lex;
- marked.InlineLexer = InlineLexer_1;
- marked.inlineLexer = InlineLexer_1.output;
+ marked.Tokenizer = Tokenizer_1;
marked.Slugger = Slugger_1;
marked.parse = marked;
var marked_1 = marked;
diff --git a/packages/markdown/marked/package-lock.json b/packages/markdown/marked/package-lock.json
index 8218e812..ca9b5848 100644
--- a/packages/markdown/marked/package-lock.json
+++ b/packages/markdown/marked/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "marked",
- "version": "0.8.0",
+ "version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -14,49 +14,88 @@
}
},
"@babel/compat-data": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.6.tgz",
- "integrity": "sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.6.tgz",
+ "integrity": "sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g==",
"dev": true,
"requires": {
- "browserslist": "^4.8.5",
+ "browserslist": "^4.11.1",
"invariant": "^2.2.4",
"semver": "^5.5.0"
}
},
"@babel/core": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz",
- "integrity": "sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz",
+ "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
- "@babel/generator": "^7.8.7",
- "@babel/helpers": "^7.8.4",
- "@babel/parser": "^7.8.7",
+ "@babel/generator": "^7.9.6",
+ "@babel/helper-module-transforms": "^7.9.0",
+ "@babel/helpers": "^7.9.6",
+ "@babel/parser": "^7.9.6",
"@babel/template": "^7.8.6",
- "@babel/traverse": "^7.8.6",
- "@babel/types": "^7.8.7",
+ "@babel/traverse": "^7.9.6",
+ "@babel/types": "^7.9.6",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
- "json5": "^2.1.0",
+ "json5": "^2.1.2",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/generator": {
- "version": "7.8.8",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz",
- "integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz",
+ "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==",
"dev": true,
"requires": {
- "@babel/types": "^7.8.7",
+ "@babel/types": "^7.9.6",
"jsesc": "^2.5.1",
"lodash": "^4.17.13",
"source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/helper-annotate-as-pure": {
@@ -78,25 +117,14 @@
"@babel/types": "^7.8.3"
}
},
- "@babel/helper-call-delegate": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz",
- "integrity": "sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ==",
- "dev": true,
- "requires": {
- "@babel/helper-hoist-variables": "^7.8.3",
- "@babel/traverse": "^7.8.3",
- "@babel/types": "^7.8.7"
- }
- },
"@babel/helper-compilation-targets": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz",
- "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz",
+ "integrity": "sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw==",
"dev": true,
"requires": {
- "@babel/compat-data": "^7.8.6",
- "browserslist": "^4.9.1",
+ "@babel/compat-data": "^7.9.6",
+ "browserslist": "^4.11.1",
"invariant": "^2.2.4",
"levenary": "^1.1.1",
"semver": "^5.5.0"
@@ -135,14 +163,33 @@
}
},
"@babel/helper-function-name": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz",
- "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==",
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz",
+ "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.8.3",
"@babel/template": "^7.8.3",
- "@babel/types": "^7.8.3"
+ "@babel/types": "^7.9.5"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/helper-get-function-arity": {
@@ -182,9 +229,9 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz",
- "integrity": "sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz",
+ "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.8.3",
@@ -192,7 +239,7 @@
"@babel/helper-simple-access": "^7.8.3",
"@babel/helper-split-export-declaration": "^7.8.3",
"@babel/template": "^7.8.6",
- "@babel/types": "^7.8.6",
+ "@babel/types": "^7.9.0",
"lodash": "^4.17.13"
}
},
@@ -234,15 +281,34 @@
}
},
"@babel/helper-replace-supers": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz",
- "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz",
+ "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.8.3",
"@babel/helper-optimise-call-expression": "^7.8.3",
- "@babel/traverse": "^7.8.6",
- "@babel/types": "^7.8.6"
+ "@babel/traverse": "^7.9.6",
+ "@babel/types": "^7.9.6"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/helper-simple-access": {
@@ -264,6 +330,12 @@
"@babel/types": "^7.8.3"
}
},
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
+ "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
+ "dev": true
+ },
"@babel/helper-wrap-function": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz",
@@ -277,31 +349,50 @@
}
},
"@babel/helpers": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz",
- "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz",
+ "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==",
"dev": true,
"requires": {
"@babel/template": "^7.8.3",
- "@babel/traverse": "^7.8.4",
- "@babel/types": "^7.8.3"
+ "@babel/traverse": "^7.9.6",
+ "@babel/types": "^7.9.6"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/highlight": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
- "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
+ "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
"dev": true,
"requires": {
+ "@babel/helper-validator-identifier": "^7.9.0",
"chalk": "^2.0.0",
- "esutils": "^2.0.2",
"js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.8.8",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz",
- "integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz",
+ "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==",
"dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
@@ -345,14 +436,25 @@
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
}
},
- "@babel/plugin-proposal-object-rest-spread": {
+ "@babel/plugin-proposal-numeric-separator": {
"version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz",
- "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz",
+ "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.3",
+ "@babel/plugin-syntax-numeric-separator": "^7.8.3"
+ }
+ },
+ "@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz",
+ "integrity": "sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.0"
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
+ "@babel/plugin-transform-parameters": "^7.9.5"
}
},
"@babel/plugin-proposal-optional-catch-binding": {
@@ -366,9 +468,9 @@
}
},
"@babel/plugin-proposal-optional-chaining": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz",
- "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz",
+ "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3",
@@ -421,6 +523,15 @@
"@babel/helper-plugin-utils": "^7.8.0"
}
},
+ "@babel/plugin-syntax-numeric-separator": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz",
+ "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.3"
+ }
+ },
"@babel/plugin-syntax-object-rest-spread": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
@@ -497,14 +608,14 @@
}
},
"@babel/plugin-transform-classes": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz",
- "integrity": "sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg==",
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz",
+ "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.8.3",
"@babel/helper-define-map": "^7.8.3",
- "@babel/helper-function-name": "^7.8.3",
+ "@babel/helper-function-name": "^7.9.5",
"@babel/helper-optimise-call-expression": "^7.8.3",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/helper-replace-supers": "^7.8.6",
@@ -522,9 +633,9 @@
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.8.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz",
- "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==",
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz",
+ "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3"
@@ -560,9 +671,9 @@
}
},
"@babel/plugin-transform-for-of": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz",
- "integrity": "sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz",
+ "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3"
@@ -597,47 +708,47 @@
}
},
"@babel/plugin-transform-modules-amd": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz",
- "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz",
+ "integrity": "sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.8.3",
+ "@babel/helper-module-transforms": "^7.9.0",
"@babel/helper-plugin-utils": "^7.8.3",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-commonjs": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz",
- "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz",
+ "integrity": "sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.8.3",
+ "@babel/helper-module-transforms": "^7.9.0",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/helper-simple-access": "^7.8.3",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz",
- "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz",
+ "integrity": "sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg==",
"dev": true,
"requires": {
"@babel/helper-hoist-variables": "^7.8.3",
- "@babel/helper-module-transforms": "^7.8.3",
+ "@babel/helper-module-transforms": "^7.9.0",
"@babel/helper-plugin-utils": "^7.8.3",
- "babel-plugin-dynamic-import-node": "^2.3.0"
+ "babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-umd": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz",
- "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz",
+ "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.8.3",
+ "@babel/helper-module-transforms": "^7.9.0",
"@babel/helper-plugin-utils": "^7.8.3"
}
},
@@ -670,12 +781,11 @@
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.8.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.8.tgz",
- "integrity": "sha512-hC4Ld/Ulpf1psQciWWwdnUspQoQco2bMzSrwU6TmzRlvoYQe4rQFy9vnCZDTlVeCQj0JPfL+1RX0V8hCJvkgBA==",
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz",
+ "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==",
"dev": true,
"requires": {
- "@babel/helper-call-delegate": "^7.8.7",
"@babel/helper-get-function-arity": "^7.8.3",
"@babel/helper-plugin-utils": "^7.8.3"
}
@@ -765,27 +875,29 @@
}
},
"@babel/preset-env": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.7.tgz",
- "integrity": "sha512-BYftCVOdAYJk5ASsznKAUl53EMhfBbr8CJ1X+AJLfGPscQkwJFiaV/Wn9DPH/7fzm2v6iRYJKYHSqyynTGw0nw==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.6.tgz",
+ "integrity": "sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ==",
"dev": true,
"requires": {
- "@babel/compat-data": "^7.8.6",
- "@babel/helper-compilation-targets": "^7.8.7",
+ "@babel/compat-data": "^7.9.6",
+ "@babel/helper-compilation-targets": "^7.9.6",
"@babel/helper-module-imports": "^7.8.3",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/plugin-proposal-async-generator-functions": "^7.8.3",
"@babel/plugin-proposal-dynamic-import": "^7.8.3",
"@babel/plugin-proposal-json-strings": "^7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
- "@babel/plugin-proposal-object-rest-spread": "^7.8.3",
+ "@babel/plugin-proposal-numeric-separator": "^7.8.3",
+ "@babel/plugin-proposal-object-rest-spread": "^7.9.6",
"@babel/plugin-proposal-optional-catch-binding": "^7.8.3",
- "@babel/plugin-proposal-optional-chaining": "^7.8.3",
+ "@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-proposal-unicode-property-regex": "^7.8.3",
"@babel/plugin-syntax-async-generators": "^7.8.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.0",
"@babel/plugin-syntax-json-strings": "^7.8.0",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
+ "@babel/plugin-syntax-numeric-separator": "^7.8.0",
"@babel/plugin-syntax-object-rest-spread": "^7.8.0",
"@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
"@babel/plugin-syntax-optional-chaining": "^7.8.0",
@@ -794,24 +906,24 @@
"@babel/plugin-transform-async-to-generator": "^7.8.3",
"@babel/plugin-transform-block-scoped-functions": "^7.8.3",
"@babel/plugin-transform-block-scoping": "^7.8.3",
- "@babel/plugin-transform-classes": "^7.8.6",
+ "@babel/plugin-transform-classes": "^7.9.5",
"@babel/plugin-transform-computed-properties": "^7.8.3",
- "@babel/plugin-transform-destructuring": "^7.8.3",
+ "@babel/plugin-transform-destructuring": "^7.9.5",
"@babel/plugin-transform-dotall-regex": "^7.8.3",
"@babel/plugin-transform-duplicate-keys": "^7.8.3",
"@babel/plugin-transform-exponentiation-operator": "^7.8.3",
- "@babel/plugin-transform-for-of": "^7.8.6",
+ "@babel/plugin-transform-for-of": "^7.9.0",
"@babel/plugin-transform-function-name": "^7.8.3",
"@babel/plugin-transform-literals": "^7.8.3",
"@babel/plugin-transform-member-expression-literals": "^7.8.3",
- "@babel/plugin-transform-modules-amd": "^7.8.3",
- "@babel/plugin-transform-modules-commonjs": "^7.8.3",
- "@babel/plugin-transform-modules-systemjs": "^7.8.3",
- "@babel/plugin-transform-modules-umd": "^7.8.3",
+ "@babel/plugin-transform-modules-amd": "^7.9.6",
+ "@babel/plugin-transform-modules-commonjs": "^7.9.6",
+ "@babel/plugin-transform-modules-systemjs": "^7.9.6",
+ "@babel/plugin-transform-modules-umd": "^7.9.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3",
"@babel/plugin-transform-new-target": "^7.8.3",
"@babel/plugin-transform-object-super": "^7.8.3",
- "@babel/plugin-transform-parameters": "^7.8.7",
+ "@babel/plugin-transform-parameters": "^7.9.5",
"@babel/plugin-transform-property-literals": "^7.8.3",
"@babel/plugin-transform-regenerator": "^7.8.7",
"@babel/plugin-transform-reserved-words": "^7.8.3",
@@ -821,18 +933,51 @@
"@babel/plugin-transform-template-literals": "^7.8.3",
"@babel/plugin-transform-typeof-symbol": "^7.8.4",
"@babel/plugin-transform-unicode-regex": "^7.8.3",
- "@babel/types": "^7.8.7",
- "browserslist": "^4.8.5",
+ "@babel/preset-modules": "^0.1.3",
+ "@babel/types": "^7.9.6",
+ "browserslist": "^4.11.1",
"core-js-compat": "^3.6.2",
"invariant": "^2.2.2",
"levenary": "^1.1.1",
"semver": "^5.5.0"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
+ }
+ },
+ "@babel/preset-modules": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz",
+ "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
}
},
"@babel/runtime": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz",
- "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz",
+ "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
@@ -850,43 +995,114 @@
}
},
"@babel/traverse": {
- "version": "7.8.6",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz",
- "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==",
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz",
+ "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
- "@babel/generator": "^7.8.6",
- "@babel/helper-function-name": "^7.8.3",
+ "@babel/generator": "^7.9.6",
+ "@babel/helper-function-name": "^7.9.5",
"@babel/helper-split-export-declaration": "^7.8.3",
- "@babel/parser": "^7.8.6",
- "@babel/types": "^7.8.6",
+ "@babel/parser": "^7.9.6",
+ "@babel/types": "^7.9.6",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.9.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz",
+ "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.9.5",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ }
}
},
"@babel/types": {
- "version": "7.8.7",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz",
- "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz",
+ "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
+ "@babel/helper-validator-identifier": "^7.9.0",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
},
"@markedjs/html-differ": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@markedjs/html-differ/-/html-differ-3.0.0.tgz",
- "integrity": "sha512-ubvgDumynqq6PnWyEPeBqLmEcrXR5w48AlQK8uj2M9IY04GNZhQGBL7sX2UI2IW8EKX5nRimFvv2iEKyPTSc4g==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@markedjs/html-differ/-/html-differ-3.0.2.tgz",
+ "integrity": "sha512-WOJPppEbeovRTGaw6le+82cYyGB7tGrYtNmRUVMBTmiEeQQRILLta/Mbre6BUJBNlBDkPQqm1KoHImKVChLiOw==",
"dev": true,
"requires": {
- "chalk": "^2.4.2",
+ "chalk": "^4.0.0",
"coa": "^2.0.2",
- "diff": "^4.0.1",
- "parse5-sax-parser": "^5.1.0"
+ "diff": "^4.0.2",
+ "parse5-sax-parser": "^5.1.1"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
+ "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
}
},
"@types/color-name": {
@@ -920,21 +1136,21 @@
}
},
"@types/node": {
- "version": "10.17.17",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.17.tgz",
- "integrity": "sha512-gpNnRnZP3VWzzj5k3qrpRC6Rk3H/uclhAVo1aIvwzK5p5cOrs9yEyQ8H/HBsBY0u5rrWxXEiVPQ0dEB6pkjE8Q==",
+ "version": "9.6.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.5.tgz",
+ "integrity": "sha512-NOLEgsT6UiDTjnWG5Hd2Mg25LRyz/oe8ql3wbjzgSFeRzRROhPmtlsvIrei4B46UjERF0td9SZ1ZXPLOdcrBHg==",
"dev": true
},
"@types/q": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
- "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==",
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz",
+ "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==",
"dev": true
},
"@types/qs": {
- "version": "6.9.1",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.1.tgz",
- "integrity": "sha512-lhbQXx9HKZAPgBkISrBcmAcMpZsmpe/Cd/hY7LGZS5OfkySUBItnPZHgQPssWYUET8elF+yCFBbP1Q0RZPTdaw==",
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.5.3.tgz",
+ "integrity": "sha512-Jugo5V/1bS0fRhy2z8+cUAHEyWOATaz4rbyLVvcFs7+dXp5HfwpEwzF1Q11bB10ApUqHf+yTauxI0UXQDwGrbA==",
"dev": true
},
"abbrev": {
@@ -944,9 +1160,9 @@
"dev": true
},
"acorn": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
- "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
+ "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
"dev": true
},
"acorn-jsx": {
@@ -956,9 +1172,9 @@
"dev": true
},
"ajv": {
- "version": "6.12.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
- "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
+ "version": "6.12.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
+ "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -1000,9 +1216,9 @@
}
},
"argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"
@@ -1054,9 +1270,9 @@
"dev": true
},
"babel-plugin-dynamic-import-node": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz",
- "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
+ "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
"dev": true,
"requires": {
"object.assign": "^4.1.0"
@@ -1075,9 +1291,9 @@
"dev": true
},
"brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
@@ -1085,14 +1301,15 @@
}
},
"browserslist": {
- "version": "4.9.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz",
- "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz",
+ "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30001030",
- "electron-to-chromium": "^1.3.363",
- "node-releases": "^1.1.50"
+ "caniuse-lite": "^1.0.30001043",
+ "electron-to-chromium": "^1.3.413",
+ "node-releases": "^1.1.53",
+ "pkg-up": "^2.0.0"
}
},
"buffer-from": {
@@ -1108,9 +1325,9 @@
"dev": true
},
"caniuse-lite": {
- "version": "1.0.30001035",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz",
- "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==",
+ "version": "1.0.30001061",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001061.tgz",
+ "integrity": "sha512-SMICCeiNvMZnyXpuoO+ot7FHpMVPlrsR+HmfByj6nY4xYDHXLqMTbgH7ecEkDNXWkH1vaip+ZS0D7VTXwM1KYQ==",
"dev": true
},
"caseless": {
@@ -1137,27 +1354,28 @@
"dev": true
},
"cheerio": {
- "version": "0.22.0",
- "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz",
- "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=",
+ "version": "1.0.0-rc.3",
+ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz",
+ "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==",
"dev": true,
"requires": {
"css-select": "~1.2.0",
- "dom-serializer": "~0.1.0",
+ "dom-serializer": "~0.1.1",
"entities": "~1.1.1",
"htmlparser2": "^3.9.1",
- "lodash.assignin": "^4.0.9",
- "lodash.bind": "^4.1.4",
- "lodash.defaults": "^4.0.1",
- "lodash.filter": "^4.4.0",
- "lodash.flatten": "^4.2.0",
- "lodash.foreach": "^4.3.0",
- "lodash.map": "^4.4.0",
- "lodash.merge": "^4.4.0",
- "lodash.pick": "^4.2.1",
- "lodash.reduce": "^4.4.0",
- "lodash.reject": "^4.4.0",
- "lodash.some": "^4.4.0"
+ "lodash": "^4.15.0",
+ "parse5": "^3.0.1"
+ },
+ "dependencies": {
+ "parse5": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz",
+ "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ }
}
},
"cli-cursor": {
@@ -1170,9 +1388,9 @@
}
},
"cli-width": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
- "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
+ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
"dev": true
},
"coa": {
@@ -1253,9 +1471,9 @@
},
"dependencies": {
"readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
@@ -1294,12 +1512,12 @@
}
},
"core-js-compat": {
- "version": "3.6.4",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz",
- "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==",
+ "version": "3.6.5",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
+ "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
"dev": true,
"requires": {
- "browserslist": "^4.8.3",
+ "browserslist": "^4.8.5",
"semver": "7.0.0"
},
"dependencies": {
@@ -1318,16 +1536,14 @@
"dev": true
},
"cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
+ "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==",
"dev": true,
"requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
}
},
"css-select": {
@@ -1429,9 +1645,9 @@
}
},
"electron-to-chromium": {
- "version": "1.3.376",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz",
- "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==",
+ "version": "1.3.441",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.441.tgz",
+ "integrity": "sha512-leBfJwLuyGs1jEei2QioI+PjVMavmUIvPYidE8dCCYWLAq0uefhN3NYgDNb8WxD3uiUNnJ3ScMXg0upSlwySzQ==",
"dev": true
},
"emoji-regex": {
@@ -1441,9 +1657,9 @@
"dev": true
},
"entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
+ "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
"dev": true
},
"error-ex": {
@@ -1456,9 +1672,9 @@
}
},
"es-abstract": {
- "version": "1.17.4",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz",
- "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==",
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
@@ -1492,22 +1708,22 @@
"dev": true
},
"eslint": {
- "version": "6.8.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
- "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz",
+ "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"ajv": "^6.10.0",
- "chalk": "^2.1.0",
- "cross-spawn": "^6.0.5",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^5.0.0",
- "eslint-utils": "^1.4.3",
+ "eslint-utils": "^2.0.0",
"eslint-visitor-keys": "^1.1.0",
- "espree": "^6.1.2",
- "esquery": "^1.0.1",
+ "espree": "^7.0.0",
+ "esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
@@ -1520,22 +1736,56 @@
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.3.0",
+ "levn": "^0.4.1",
"lodash": "^4.17.14",
"minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
- "optionator": "^0.8.3",
+ "optionator": "^0.9.1",
"progress": "^2.0.0",
- "regexpp": "^2.0.1",
- "semver": "^6.1.2",
- "strip-ansi": "^5.2.0",
- "strip-json-comments": "^3.0.1",
+ "regexpp": "^3.1.0",
+ "semver": "^7.2.1",
+ "strip-ansi": "^6.0.0",
+ "strip-json-comments": "^3.1.0",
"table": "^5.2.3",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
+ "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
"globals": {
"version": "12.4.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
@@ -1545,18 +1795,33 @@
"type-fest": "^0.8.1"
}
},
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
"semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "version": "7.3.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
+ "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
"dev": true
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
}
}
},
"eslint-config-standard": {
- "version": "14.1.0",
- "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz",
- "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==",
+ "version": "14.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz",
+ "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==",
"dev": true
},
"eslint-import-resolver-node": {
@@ -1583,13 +1848,22 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
+ },
+ "resolve": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz",
+ "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
}
}
},
"eslint-module-utils": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz",
- "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
+ "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
"dev": true,
"requires": {
"debug": "^2.6.9",
@@ -1633,17 +1907,17 @@
}
},
"regexpp": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz",
- "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
+ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
"dev": true
}
}
},
"eslint-plugin-import": {
- "version": "2.20.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
- "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
+ "version": "2.20.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz",
+ "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==",
"dev": true,
"requires": {
"array-includes": "^3.0.3",
@@ -1684,13 +1958,22 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
+ },
+ "resolve": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz",
+ "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
}
}
},
"eslint-plugin-node": {
- "version": "11.0.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz",
- "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==",
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
+ "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
"dev": true,
"requires": {
"eslint-plugin-es": "^3.0.0",
@@ -1747,9 +2030,9 @@
}
},
"eslint-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
- "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
+ "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
@@ -1762,9 +2045,9 @@
"dev": true
},
"espree": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
- "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz",
+ "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==",
"dev": true,
"requires": {
"acorn": "^7.1.1",
@@ -1779,12 +2062,20 @@
"dev": true
},
"esquery": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
- "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
+ "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
"dev": true,
"requires": {
- "estraverse": "^4.0.0"
+ "estraverse": "^5.1.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
+ "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==",
+ "dev": true
+ }
}
},
"esrecurse": {
@@ -1882,9 +2173,9 @@
}
},
"flatted": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
- "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
"dev": true
},
"form-data": {
@@ -1899,9 +2190,9 @@
}
},
"front-matter": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-3.1.0.tgz",
- "integrity": "sha512-RFEK8N6waWTdwBZOPNEtvwMjZ/hUfpwXkYUYkmmOhQGdhSulXhWrFwiUhdhkduLDiIwbROl/faF1X/PC/GGRMw==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-3.2.1.tgz",
+ "integrity": "sha512-YUhgEhbL6tG+Ok3vTGIoSDKqcr47aSDvyhEqIv8B+YuBJFsPnOiArNXTPp2yO07NL+a0L4+2jXlKlKqyVcsRRA==",
"dev": true,
"requires": {
"js-yaml": "^3.13.1"
@@ -1914,9 +2205,9 @@
"dev": true
},
"fsevents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
- "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
+ "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"dev": true,
"optional": true
},
@@ -1945,9 +2236,9 @@
"dev": true
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
+ "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -1959,9 +2250,9 @@
}
},
"glob-parent": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
- "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
@@ -2039,6 +2330,14 @@
"dev": true,
"requires": {
"@types/node": "^10.0.3"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "10.17.4",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.4.tgz",
+ "integrity": "sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ==",
+ "dev": true
+ }
}
},
"iconv-lite": {
@@ -2083,9 +2382,9 @@
}
},
"inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"inquirer": {
@@ -2150,14 +2449,11 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
},
"supports-color": {
"version": "7.1.0",
@@ -2218,12 +2514,6 @@
"is-extglob": "^2.1.1"
}
},
- "is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
- "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
- "dev": true
- },
"is-reference": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
@@ -2320,12 +2610,12 @@
"dev": true
},
"json5": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz",
- "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+ "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
"dev": true,
"requires": {
- "minimist": "^1.2.0"
+ "minimist": "^1.2.5"
}
},
"leven": {
@@ -2344,13 +2634,13 @@
}
},
"levn": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
- "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2"
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
}
},
"linkify-it": {
@@ -2385,81 +2675,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
- "dev": true
- },
- "lodash.assignin": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz",
- "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=",
- "dev": true
- },
- "lodash.bind": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz",
- "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=",
- "dev": true
- },
- "lodash.defaults": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
- "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=",
- "dev": true
- },
- "lodash.filter": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz",
- "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=",
- "dev": true
- },
- "lodash.flatten": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
- "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=",
- "dev": true
- },
- "lodash.foreach": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
- "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=",
- "dev": true
- },
- "lodash.map": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
- "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=",
- "dev": true
- },
- "lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true
- },
- "lodash.pick": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
- "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=",
- "dev": true
- },
- "lodash.reduce": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz",
- "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=",
- "dev": true
- },
- "lodash.reject": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz",
- "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=",
- "dev": true
- },
- "lodash.some": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
- "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=",
+ "version": "4.17.14",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz",
+ "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==",
"dev": true
},
"loose-envify": {
@@ -2472,9 +2690,9 @@
}
},
"magic-string": {
- "version": "0.25.7",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
- "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
+ "version": "0.25.4",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
+ "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==",
"dev": true,
"requires": {
"sourcemap-codec": "^1.4.4"
@@ -2517,18 +2735,18 @@
"dev": true
},
"mime-db": {
- "version": "1.43.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",
- "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==",
+ "version": "1.40.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
+ "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
"dev": true
},
"mime-types": {
- "version": "2.1.26",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz",
- "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==",
+ "version": "2.1.24",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
+ "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"dev": true,
"requires": {
- "mime-db": "1.43.0"
+ "mime-db": "1.40.0"
}
},
"mimic-fn": {
@@ -2553,26 +2771,18 @@
"dev": true
},
"mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
- "minimist": "0.0.8"
- },
- "dependencies": {
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "dev": true
- }
+ "minimist": "^1.2.5"
}
},
"moment": {
- "version": "2.24.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
- "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==",
+ "version": "2.25.1",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.1.tgz",
+ "integrity": "sha512-nRKMf9wDS4Fkyd0C9LXh2FFXinD+iwbJ5p/lh3CHitW9kZbRbJ8hCruiadiIXZVbeAqKZzqcTvHnK3mRhFjb6w==",
"dev": true
},
"ms": {
@@ -2593,12 +2803,6 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
- "nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
- },
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
@@ -2606,21 +2810,10 @@
"dev": true
},
"node-releases": {
- "version": "1.1.52",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz",
- "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==",
- "dev": true,
- "requires": {
- "semver": "^6.3.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "dev": true
- }
- }
+ "version": "1.1.55",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.55.tgz",
+ "integrity": "sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==",
+ "dev": true
},
"nopt": {
"version": "2.1.2",
@@ -2707,17 +2900,17 @@
}
},
"optionator": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
- "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+ "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
"dev": true,
"requires": {
- "deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.6",
- "levn": "~0.3.0",
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2",
- "word-wrap": "~1.2.3"
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.3"
}
},
"os-tmpdir": {
@@ -2802,9 +2995,9 @@
"dev": true
},
"path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"path-parse": {
@@ -2837,10 +3030,19 @@
"find-up": "^2.1.0"
}
},
+ "pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
+ "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.1.0"
+ }
+ },
"prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true
},
"private": {
@@ -2862,9 +3064,9 @@
"dev": true
},
"promise": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz",
- "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==",
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz",
+ "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==",
"dev": true,
"requires": {
"asap": "~2.0.6"
@@ -2883,9 +3085,9 @@
"dev": true
},
"qs": {
- "version": "6.9.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz",
- "integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA==",
+ "version": "6.9.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz",
+ "integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA==",
"dev": true
},
"read-pkg": {
@@ -2910,9 +3112,9 @@
}
},
"readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
+ "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
@@ -2942,9 +3144,9 @@
"dev": true
},
"regenerator-transform": {
- "version": "0.14.3",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.3.tgz",
- "integrity": "sha512-zXHNKJspmONxBViAb3ZUmFoFPnTBs3zFhCEZJiwp/gkNzxVbTqNJVjYKx6Qk1tQ1P4XLf4TbH9+KBB7wGoAaUw==",
+ "version": "0.14.4",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz",
+ "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==",
"dev": true,
"requires": {
"@babel/runtime": "^7.8.4",
@@ -2952,9 +3154,9 @@
}
},
"regexpp": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
- "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
+ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
"dev": true
},
"regexpu-core": {
@@ -2995,9 +3197,9 @@
}
},
"resolve": {
- "version": "1.15.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
- "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
+ "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -3029,9 +3231,9 @@
}
},
"rollup": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.0.6.tgz",
- "integrity": "sha512-P42IlI6a/bxh52ed8hEXXe44LcHfep2f26OZybMJPN1TTQftibvQEl3CWeOmJrzqGbFxOA000QXDWO9WJaOQpA==",
+ "version": "2.10.2",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.10.2.tgz",
+ "integrity": "sha512-tivFM8UXBlYOUqpBYD3pRktYpZvK/eiCQ190eYlrAyrpE/lzkyG2gbawroNdbwmzyUc7Y4eT297xfzv0BDh9qw==",
"dev": true,
"requires": {
"fsevents": "~2.1.2"
@@ -3061,29 +3263,55 @@
}
},
"rollup-plugin-license": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.13.0.tgz",
- "integrity": "sha512-K1At1InQufYagn1zNTikWG6NorVjdBBoKtJdHqbyV/Z1ksM3wHtWlR/4rqdKxyZjTXNTDzM7mxn7j/HERexLFw==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.0.1.tgz",
+ "integrity": "sha512-w+9JIMj3rHKsI0rYDpFtzAyYZsMCDL5KLDyeb4LXGWtahcgcPbr/XwMD0yozWf4X50AbImYDTdmCHiZS3rUl0A==",
"dev": true,
"requires": {
"commenting": "1.1.0",
"glob": "7.1.6",
"lodash": "4.17.15",
- "magic-string": "0.25.4",
- "mkdirp": "0.5.1",
- "moment": "2.24.0",
+ "magic-string": "0.25.7",
+ "mkdirp": "1.0.4",
+ "moment": "2.25.1",
"spdx-expression-validate": "2.0.0",
"spdx-satisfies": "5.0.0"
},
"dependencies": {
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
"magic-string": {
- "version": "0.25.4",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
- "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==",
+ "version": "0.25.7",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
+ "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
"dev": true,
"requires": {
"sourcemap-codec": "^1.4.4"
}
+ },
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
}
}
},
@@ -3097,27 +3325,24 @@
}
},
"run-async": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
- "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
- "dev": true,
- "requires": {
- "is-promise": "^2.1.0"
- }
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
+ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
+ "dev": true
},
"rxjs": {
- "version": "6.5.4",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
- "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "version": "6.5.5",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
+ "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
}
},
"safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
"dev": true
},
"safer-buffer": {
@@ -3133,24 +3358,24 @@
"dev": true
},
"shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
- "shebang-regex": "^1.0.0"
+ "shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
"dev": true
},
"slice-ansi": {
@@ -3179,9 +3404,9 @@
"dev": true
},
"sourcemap-codec": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
- "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
+ "version": "1.4.6",
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
+ "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==",
"dev": true
},
"spdx-compare": {
@@ -3268,17 +3493,6 @@
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
}
},
"string.prototype.repeat": {
@@ -3287,58 +3501,64 @@
"integrity": "sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8=",
"dev": true
},
+ "string.prototype.trimend": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
+ "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ }
+ },
"string.prototype.trimleft": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
- "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
}
},
"string.prototype.trimright": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
- "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
+ "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
}
},
"string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
+ "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"dev": true,
"requires": {
- "safe-buffer": "~5.2.0"
- },
- "dependencies": {
- "safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
- }
+ "safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- }
+ "ansi-regex": "^5.0.0"
}
},
"strip-bom": {
@@ -3348,9 +3568,9 @@
"dev": true
},
"strip-json-comments": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
- "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
+ "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
"dev": true
},
"supports-color": {
@@ -3394,6 +3614,12 @@
"string-width": "^3.0.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -3416,6 +3642,15 @@
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
}
}
},
@@ -3445,9 +3680,9 @@
},
"dependencies": {
"@types/node": {
- "version": "8.10.59",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.59.tgz",
- "integrity": "sha512-8RkBivJrDCyPpBXhVZcjh7cQxVBSmRk9QM7hOketZzp6Tg79c0N8kkpAIito9bnJ3HCVCHVYz+KHTEbfQNfeVQ==",
+ "version": "8.10.58",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.58.tgz",
+ "integrity": "sha512-NNcUk/rAdR7Pie7WiA5NHp345dTkD62qaxqscQXVIjCjog/ZXsrG8Wo7dZMZAzE7PSpA+qR2S3TYTeFCKuBFxQ==",
"dev": true
}
}
@@ -3474,18 +3709,18 @@
"dev": true
},
"tslib": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
- "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
+ "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
"dev": true
},
"type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2"
+ "prelude-ls": "^1.2.1"
}
},
"type-fest": {
@@ -3507,21 +3742,12 @@
"dev": true
},
"uglify-js": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz",
- "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==",
+ "version": "3.9.3",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz",
+ "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==",
"dev": true,
"requires": {
- "commander": "~2.20.3",
- "source-map": "~0.6.1"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
+ "commander": "~2.20.3"
}
},
"unicode-canonical-property-names-ecmascript": {
@@ -3593,9 +3819,9 @@
}
},
"which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
diff --git a/packages/markdown/marked/package.json b/packages/markdown/marked/package.json
index 6534e625..a2fcfe60 100644
--- a/packages/markdown/marked/package.json
+++ b/packages/markdown/marked/package.json
@@ -2,8 +2,9 @@
"name": "marked",
"description": "A markdown parser built for speed",
"author": "Christopher Jeffrey",
- "version": "0.8.0",
+ "version": "1.1.0",
"main": "./src/marked.js",
+ "browser": "./lib/marked.js",
"bin": "./bin/marked",
"man": "./man/marked.1",
"files": [
@@ -30,27 +31,27 @@
"html"
],
"devDependencies": {
- "@babel/core": "^7.8.7",
- "@babel/preset-env": "^7.8.7",
- "@markedjs/html-differ": "^3.0.0",
- "cheerio": "^0.22.0",
- "commonmark": "^0.29.1",
- "eslint": "^6.8.0",
- "eslint-config-standard": "^14.1.0",
- "eslint-plugin-import": "^2.20.1",
- "eslint-plugin-node": "^11.0.0",
+ "@babel/core": "^7.9.6",
+ "@babel/preset-env": "^7.9.6",
+ "@markedjs/html-differ": "^3.0.2",
+ "cheerio": "^1.0.0-rc.3",
+ "commonmark": "0.29.x",
+ "eslint": "^7.0.0",
+ "eslint-config-standard": "^14.1.1",
+ "eslint-plugin-import": "^2.20.2",
+ "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
- "front-matter": "^3.1.0",
+ "front-matter": "^3.2.1",
"jasmine": "^3.5.0",
- "markdown": "^0.5.0",
- "markdown-it": "^10.0.0",
+ "markdown": "0.5.x",
+ "markdown-it": "10.x",
"node-fetch": "^2.6.0",
- "rollup": "^2.0.6",
+ "rollup": "^2.10.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
- "rollup-plugin-license": "^0.13.0",
- "uglify-js": "^3.8.0",
+ "rollup-plugin-license": "^2.0.1",
+ "uglify-js": "^3.9.3",
"vuln-regex-detector": "^1.3.0"
},
"scripts": {
@@ -69,7 +70,7 @@
"rollup:umd": "rollup -c rollup.config.js",
"rollup:esm": "rollup -c rollup.config.esm.js",
"minify": "uglifyjs lib/marked.js -cm --comments /Copyright/ -o marked.min.js",
- "preversion": "npm run build && (git diff --quiet || git commit -am 'build')"
+ "preversion": "npm run build && (git diff --quiet || git commit -am build)"
},
"engines": {
"node": ">= 8.16.2"
diff --git a/packages/markdown/package.js b/packages/markdown/package.js
index ac725b8f..0838922b 100755
--- a/packages/markdown/package.js
+++ b/packages/markdown/package.js
@@ -3,7 +3,7 @@
Package.describe({
name: 'wekan-markdown',
summary: "GitHub flavored markdown parser for Meteor based on marked.js",
- version: "1.0.7",
+ version: "1.0.8",
git: "https://github.com/wekan/markdown.git"
});