diff --git a/less/install-less.sh b/less/install-less.sh index fc86ad2..2c5ce08 100755 --- a/less/install-less.sh +++ b/less/install-less.sh @@ -1,9 +1,9 @@ #!/bin/sh # Install Less via npm if [ ! -e "$(which lessc)" ]; then - sudo npm install -g less + sudo npm install -g less@3.5.3 sudo npm install -g less-plugin-clean-css else echo LESS $(npm view less version 2>&1 | grep -v WARN) is installed fi diff --git a/prose/markdownParser.js b/prose/markdownParser.js new file mode 100644 index 0000000..7088995 --- /dev/null +++ b/prose/markdownParser.js @@ -0,0 +1,58 @@ +import { MarkdownParser } from "prosemirror-markdown"; +import markdownit from "markdown-it"; + +import { writeFreelySchema } from "./schema"; + +export const writeAsMarkdownParser = new MarkdownParser( + writeFreelySchema, + markdownit("commonmark", { html: true }), + { + // blockquote: { block: "blockquote" }, + paragraph: { block: "paragraph" }, + list_item: { block: "list_item" }, + bullet_list: { block: "bullet_list" }, + ordered_list: { + block: "ordered_list", + getAttrs: (tok) => ({ order: +tok.attrGet("start") || 1 }), + }, + heading: { + block: "heading", + getAttrs: (tok) => ({ level: +tok.tag.slice(1) }), + }, + code_block: { block: "code_block", noCloseToken: true }, + fence: { + block: "code_block", + getAttrs: (tok) => ({ params: tok.info || "" }), + noCloseToken: true, + }, + // hr: { node: "horizontal_rule" }, + image: { + node: "image", + getAttrs: (tok) => ({ + src: tok.attrGet("src"), + title: tok.attrGet("title") || null, + alt: tok.children?.[0].content || null, + }), + }, + // hardbreak: { node: "hard_break" }, + + em: { mark: "em" }, + strong: { mark: "strong" }, + link: { + mark: "link", + getAttrs: (tok) => ({ + href: tok.attrGet("href"), + title: tok.attrGet("title") || null, + }), + }, + code_inline: { mark: "code", noCloseToken: true }, + html_block: { + node: "readmore", + getAttrs(token) { + console.log({ token }); + // TODO: Give different attributes depending on the token content + return {}; + }, + }, + }, +); diff --git a/prose/markdownSerializer.js b/prose/markdownSerializer.js new file mode 100644 index 0000000..f82dc1f --- /dev/null +++ b/prose/markdownSerializer.js @@ -0,0 +1,127 @@ +import { MarkdownSerializer } from "prosemirror-markdown"; + +function backticksFor(node, side) { + const ticks = /`+/g; + let m; + let len = 0; + if (node.isText) + while ((m = ticks.exec(node.text))) len = Math.max(len, m[0].length); + let result = len > 0 && side > 0 ? " `" : "`"; + for (let i = 0; i < len; i++) result += "`"; + if (len > 0 && side < 0) result += " "; + return result; +} + +function isPlainURL(link, parent, index, side) { + if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false; + const content = parent.child(index + (side < 0 ? -1 : 0)); + if ( + !content.isText || + content.text != link.attrs.href || + content.marks[content.marks.length - 1] != link + ) + return false; + if (index == (side < 0 ? 1 : parent.childCount - 1)) return true; + const next = parent.child(index + (side < 0 ? -2 : 1)); + return !link.isInSet(next.marks); +} + +export const writeAsMarkdownSerializer = new MarkdownSerializer( + { + readmore(state, node) { + state.write(""); + state.closeBlock(node); + }, + // blockquote(state, node) { + // state.wrapBlock("> ", undefined, node, () => state.renderContent(node)); + // }, + code_block(state, node) { + state.write(`\`\`\`${node.attrs.params || ""}\n`); + state.text(node.textContent, false); + state.ensureNewLine(); + state.write("```"); + state.closeBlock(node); + }, + heading(state, node) { + state.write(`${state.repeat("#", node.attrs.level)} `); + state.renderInline(node); + state.closeBlock(node); + }, + // horizontal_rule(state, node) { + // state.write(node.attrs.markup || "---"); + // state.closeBlock(node); + // }, + bullet_list(state, node) { + state.renderList(node, " ", () => `${node.attrs.bullet || "*"} `); + }, + ordered_list(state, node) { + const start = node.attrs.order || 1; + const maxW = String(start + node.childCount - 1).length; + const space = state.repeat(" ", maxW + 2); + state.renderList(node, space, (i) => { + const nStr = String(start + i); + return `${state.repeat(" ", maxW - nStr.length) + nStr}. `; + }); + }, + list_item(state, node) { + state.renderContent(node); + }, + paragraph(state, node) { + state.renderInline(node); + state.closeBlock(node); + }, + + image(state, node) { + state.write( + `![${state.esc(node.attrs.alt || "")}](${state.esc(node.attrs.src)}${ + node.attrs.title ? ` ${state.quote(node.attrs.title)}` : "" + })`, + ); + }, + // hard_break(state, node, parent, index) { + // for (let i = index + 1; i < parent.childCount; i += 1) + // if (parent.child(i).type !== node.type) { + // state.write("\\\n"); + // return; + // } + // }, + text(state, node) { + state.text(node.text || ""); + }, + }, + { + em: { + open: "*", + close: "*", + mixable: true, + expelEnclosingWhitespace: true, + }, + strong: { + open: "**", + close: "**", + mixable: true, + expelEnclosingWhitespace: true, + }, + link: { + open(_state, mark, parent, index) { + return isPlainURL(mark, parent, index, 1) ? "<" : "["; + }, + close(state, mark, parent, index) { + return isPlainURL(mark, parent, index, -1) + ? ">" + : `](${state.esc(mark.attrs.href)}${ + mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : "" + })`; + }, + }, + code: { + open(_state, _mark, parent, index) { + return backticksFor(parent.child(index), -1); + }, + close(_state, _mark, parent, index) { + return backticksFor(parent.child(index - 1), 1); + }, + escape: false, + }, + }, +); diff --git a/prose/menu.js b/prose/menu.js new file mode 100644 index 0000000..263f1b8 --- /dev/null +++ b/prose/menu.js @@ -0,0 +1,26 @@ +import { MenuItem } from "prosemirror-menu"; +import { buildMenuItems } from "prosemirror-example-setup"; + +import { writeFreelySchema } from "./schema"; + +function canInsert(state, nodeType, attrs) { + let $from = state.selection.$from + for (let d = $from.depth; d >= 0; d--) { + let index = $from.index(d) + if ($from.node(d).canReplaceWith(index, index, nodeType, attrs)) return true + } + return false + } + +const ReadMoreItem = new MenuItem({ + label: "Read more", + select: (state) => canInsert(state, writeFreelySchema.nodes.readmore), + run(state, dispatch) { + dispatch(state.tr.replaceSelectionWith(writeFreelySchema.nodes.readmore.create())) + }, +}); + +export const getMenu = ()=> { + const menuContent = [...buildMenuItems(writeFreelySchema).fullMenu, [ReadMoreItem]]; + return menuContent +} diff --git a/prose/package-lock.json b/prose/package-lock.json index ea93463..97a26fa 100644 --- a/prose/package-lock.json +++ b/prose/package-lock.json @@ -1,7384 +1,7416 @@ { "name": "prose", "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { "@babel/highlight": "^7.8.3" } }, "@babel/compat-data": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz", "integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==", "dev": true, "requires": { "browserslist": "^4.12.0", "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==", "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/template": "^7.8.6", "@babel/traverse": "^7.8.6", "@babel/types": "^7.8.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "json5": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", "dev": true, "requires": { "minimist": "^1.2.0" } }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "@babel/generator": { "version": "7.8.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.7.tgz", "integrity": "sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew==", "dev": true, "requires": { "@babel/types": "^7.8.7", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" }, "dependencies": { "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true } } }, "@babel/helper-annotate-as-pure": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", "dev": true, "requires": { "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-builder-binary-assignment-operator-visitor": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", "dev": true, "requires": { "@babel/helper-explode-assignable-expression": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-compilation-targets": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz", "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==", "dev": true, "requires": { "@babel/compat-data": "^7.10.4", "browserslist": "^4.12.0", "invariant": "^2.2.4", "levenary": "^1.1.1", "semver": "^5.5.0" } }, "@babel/helper-create-class-features-plugin": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/helper-member-expression-to-functions": "^7.10.5", "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", "@babel/helper-split-export-declaration": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { "@babel/types": "^7.11.0" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-create-regexp-features-plugin": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz", "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-regex": "^7.10.4", "regexpu-core": "^4.7.0" }, "dependencies": { "jsesc": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, "regexpu-core": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", "dev": true, "requires": { "regenerate": "^1.4.0", "regenerate-unicode-properties": "^8.2.0", "regjsgen": "^0.5.1", "regjsparser": "^0.6.4", "unicode-match-property-ecmascript": "^1.0.4", "unicode-match-property-value-ecmascript": "^1.2.0" } }, "regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, "regjsparser": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "dev": true, "requires": { "jsesc": "~0.5.0" } } } }, "@babel/helper-define-map": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/types": "^7.10.5", "lodash": "^4.17.19" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-explode-assignable-expression": { "version": "7.11.4", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz", "integrity": "sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ==", "dev": true, "requires": { "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@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==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.8.3", "@babel/template": "^7.8.3", "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { "@babel/types": "^7.8.3" } }, "@babel/helper-hoist-variables": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", "dev": true, "requires": { "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-member-expression-to-functions": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", "dev": true, "requires": { "@babel/types": "^7.11.0" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-module-imports": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", "dev": true, "requires": { "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-module-transforms": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", "@babel/helper-simple-access": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", "@babel/template": "^7.10.4", "@babel/types": "^7.11.0", "lodash": "^4.17.19" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { "@babel/types": "^7.11.0" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-optimise-call-expression": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", "dev": true, "requires": { "@babel/types": "^7.10.4" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-plugin-utils": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/helper-regex": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", "dev": true, "requires": { "lodash": "^4.17.19" }, "dependencies": { "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true } } }, "@babel/helper-remap-async-to-generator": { "version": "7.11.4", "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz", "integrity": "sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-wrap-function": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-replace-supers": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.10.4", "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/traverse": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/generator": { "version": "7.11.6", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", "dev": true, "requires": { "@babel/types": "^7.11.5", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { "@babel/types": "^7.11.0" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/traverse": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.11.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", "@babel/parser": "^7.11.5", "@babel/types": "^7.11.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-simple-access": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", "dev": true, "requires": { "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-skip-transparent-expression-wrappers": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz", "integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==", "dev": true, "requires": { "@babel/types": "^7.11.0" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/helper-split-export-declaration": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { "@babel/types": "^7.8.3" } }, "@babel/helper-validator-identifier": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, "@babel/helper-wrap-function": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz", "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/template": "^7.10.4", "@babel/traverse": "^7.10.4", "@babel/types": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/generator": { "version": "7.11.6", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", "dev": true, "requires": { "@babel/types": "^7.11.5", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { "@babel/types": "^7.11.0" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/traverse": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.11.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", "@babel/parser": "^7.11.5", "@babel/types": "^7.11.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@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==", "dev": true, "requires": { "@babel/template": "^7.8.3", "@babel/traverse": "^7.8.4", "@babel/types": "^7.8.3" } }, "@babel/highlight": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" }, "dependencies": { "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } } } }, "@babel/parser": { "version": "7.8.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.7.tgz", "integrity": "sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz", "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-remap-async-to-generator": "^7.10.4", "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz", "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-proposal-dynamic-import": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz", "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, "@babel/plugin-proposal-export-namespace-from": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz", "integrity": "sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz", "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.0" } }, "@babel/plugin-proposal-logical-assignment-operators": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz", "integrity": "sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz", "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, "@babel/plugin-proposal-numeric-separator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz", "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz", "integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-transform-parameters": "^7.10.4" } }, "@babel/plugin-proposal-optional-catch-binding": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz", "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" } }, "@babel/plugin-proposal-optional-chaining": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz", "integrity": "sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, "@babel/plugin-proposal-private-methods": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz", "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz", "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-class-properties": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz", "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@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", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-top-level-await": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz", "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-arrow-functions": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz", "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-async-to-generator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz", "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-remap-async-to-generator": "^7.10.4" } }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz", "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-block-scoping": { "version": "7.11.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz", "integrity": "sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-classes": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz", "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-define-map": "^7.10.4", "@babel/helper-function-name": "^7.10.4", "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", "@babel/helper-split-export-declaration": "^7.10.4", "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { "@babel/types": "^7.11.0" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/plugin-transform-computed-properties": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz", "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-destructuring": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz", "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-dotall-regex": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz", "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-duplicate-keys": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz", "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz", "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==", "dev": true, "requires": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-for-of": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz", "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz", "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==", "dev": true, "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/template": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", "dev": true }, "@babel/template": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/plugin-transform-literals": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz", "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-member-expression-literals": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz", "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-modules-amd": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz", "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.10.5", "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz", "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-simple-access": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz", "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.10.4", "@babel/helper-module-transforms": "^7.10.5", "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz", "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-named-capturing-groups-regex": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz", "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.10.4" } }, "@babel/plugin-transform-new-target": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz", "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-object-super": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz", "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4" } }, "@babel/plugin-transform-parameters": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz", "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-get-function-arity": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { "@babel/types": "^7.10.4" } }, "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/plugin-transform-property-literals": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz", "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-regenerator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz", "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" }, "dependencies": { "regenerator-transform": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { "@babel/runtime": "^7.8.4" } } } }, "@babel/plugin-transform-reserved-words": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz", "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-shorthand-properties": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz", "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-spread": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz", "integrity": "sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0" } }, "@babel/plugin-transform-sticky-regex": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz", "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-regex": "^7.10.4" } }, "@babel/plugin-transform-template-literals": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz", "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-typeof-symbol": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz", "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-unicode-escapes": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz", "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-unicode-regex": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz", "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/preset-env": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.5.tgz", "integrity": "sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA==", "dev": true, "requires": { "@babel/compat-data": "^7.11.0", "@babel/helper-compilation-targets": "^7.10.4", "@babel/helper-module-imports": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-proposal-async-generator-functions": "^7.10.4", "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-dynamic-import": "^7.10.4", "@babel/plugin-proposal-export-namespace-from": "^7.10.4", "@babel/plugin-proposal-json-strings": "^7.10.4", "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", "@babel/plugin-proposal-numeric-separator": "^7.10.4", "@babel/plugin-proposal-object-rest-spread": "^7.11.0", "@babel/plugin-proposal-optional-catch-binding": "^7.10.4", "@babel/plugin-proposal-optional-chaining": "^7.11.0", "@babel/plugin-proposal-private-methods": "^7.10.4", "@babel/plugin-proposal-unicode-property-regex": "^7.10.4", "@babel/plugin-syntax-async-generators": "^7.8.0", "@babel/plugin-syntax-class-properties": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@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", "@babel/plugin-syntax-top-level-await": "^7.10.4", "@babel/plugin-transform-arrow-functions": "^7.10.4", "@babel/plugin-transform-async-to-generator": "^7.10.4", "@babel/plugin-transform-block-scoped-functions": "^7.10.4", "@babel/plugin-transform-block-scoping": "^7.10.4", "@babel/plugin-transform-classes": "^7.10.4", "@babel/plugin-transform-computed-properties": "^7.10.4", "@babel/plugin-transform-destructuring": "^7.10.4", "@babel/plugin-transform-dotall-regex": "^7.10.4", "@babel/plugin-transform-duplicate-keys": "^7.10.4", "@babel/plugin-transform-exponentiation-operator": "^7.10.4", "@babel/plugin-transform-for-of": "^7.10.4", "@babel/plugin-transform-function-name": "^7.10.4", "@babel/plugin-transform-literals": "^7.10.4", "@babel/plugin-transform-member-expression-literals": "^7.10.4", "@babel/plugin-transform-modules-amd": "^7.10.4", "@babel/plugin-transform-modules-commonjs": "^7.10.4", "@babel/plugin-transform-modules-systemjs": "^7.10.4", "@babel/plugin-transform-modules-umd": "^7.10.4", "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4", "@babel/plugin-transform-new-target": "^7.10.4", "@babel/plugin-transform-object-super": "^7.10.4", "@babel/plugin-transform-parameters": "^7.10.4", "@babel/plugin-transform-property-literals": "^7.10.4", "@babel/plugin-transform-regenerator": "^7.10.4", "@babel/plugin-transform-reserved-words": "^7.10.4", "@babel/plugin-transform-shorthand-properties": "^7.10.4", "@babel/plugin-transform-spread": "^7.11.0", "@babel/plugin-transform-sticky-regex": "^7.10.4", "@babel/plugin-transform-template-literals": "^7.10.4", "@babel/plugin-transform-typeof-symbol": "^7.10.4", "@babel/plugin-transform-unicode-escapes": "^7.10.4", "@babel/plugin-transform-unicode-regex": "^7.10.4", "@babel/preset-modules": "^0.1.3", "@babel/types": "^7.11.5", "browserslist": "^4.12.0", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", "levenary": "^1.1.1", "semver": "^5.5.0" }, "dependencies": { "@babel/types": { "version": "7.11.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@babel/preset-modules": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "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.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" }, "dependencies": { "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true } } }, "@babel/template": { "version": "7.8.6", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", "@babel/parser": "^7.8.6", "@babel/types": "^7.8.6" } }, "@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==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", "@babel/generator": "^7.8.6", "@babel/helper-function-name": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", "@babel/parser": "^7.8.6", "@babel/types": "^7.8.6", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" }, "dependencies": { "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "@babel/types": { "version": "7.8.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz", "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==", "dev": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" }, "dependencies": { "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true } } }, "@webassemblyjs/ast": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", "requires": { "@webassemblyjs/helper-module-context": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", "@webassemblyjs/wast-parser": "1.8.5" } }, "@webassemblyjs/floating-point-hex-parser": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==" }, "@webassemblyjs/helper-api-error": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==" }, "@webassemblyjs/helper-buffer": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==" }, "@webassemblyjs/helper-code-frame": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "requires": { "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/helper-fsm": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==" }, "@webassemblyjs/helper-module-context": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", "requires": { "@webassemblyjs/ast": "1.8.5", "mamacro": "^0.0.3" } }, "@webassemblyjs/helper-wasm-bytecode": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==" }, "@webassemblyjs/helper-wasm-section": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", "@webassemblyjs/wasm-gen": "1.8.5" } }, "@webassemblyjs/ieee754": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==" }, "@webassemblyjs/wasm-edit": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", "@webassemblyjs/helper-wasm-section": "1.8.5", "@webassemblyjs/wasm-gen": "1.8.5", "@webassemblyjs/wasm-opt": "1.8.5", "@webassemblyjs/wasm-parser": "1.8.5", "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/wasm-gen": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", "@webassemblyjs/ieee754": "1.8.5", "@webassemblyjs/leb128": "1.8.5", "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wasm-opt": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", "@webassemblyjs/wasm-gen": "1.8.5", "@webassemblyjs/wasm-parser": "1.8.5" } }, "@webassemblyjs/wasm-parser": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-api-error": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", "@webassemblyjs/ieee754": "1.8.5", "@webassemblyjs/leb128": "1.8.5", "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wast-parser": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/floating-point-hex-parser": "1.8.5", "@webassemblyjs/helper-api-error": "1.8.5", "@webassemblyjs/helper-code-frame": "1.8.5", "@webassemblyjs/helper-fsm": "1.8.5", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/wast-parser": "1.8.5", "@xtuc/long": "4.2.2" } }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "acorn": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" }, "ajv": { "version": "6.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" }, "ajv-keywords": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" }, "dependencies": { "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { "remove-trailing-separator": "^1.0.1" } } } }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" } }, "assert": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "requires": { "object-assign": "^4.1.1", "util": "0.10.3" }, "dependencies": { "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "requires": { "inherits": "2.0.1" } } } }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { "chalk": "^1.1.3", "esutils": "^2.0.2", "js-tokens": "^3.0.2" } }, "babel-core": { "version": "6.26.3", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "requires": { "babel-code-frame": "^6.26.0", "babel-generator": "^6.26.0", "babel-helpers": "^6.24.1", "babel-messages": "^6.23.0", "babel-register": "^6.26.0", "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "convert-source-map": "^1.5.1", "debug": "^2.6.9", "json5": "^0.5.1", "lodash": "^4.17.4", "minimatch": "^3.0.4", "path-is-absolute": "^1.0.1", "private": "^0.1.8", "slash": "^1.0.0", "source-map": "^0.5.7" }, "dependencies": { "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" } } }, "babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.17.4", "source-map": "^0.5.7", "trim-right": "^1.0.1" } }, "babel-helper-call-delegate": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "requires": { "babel-helper-hoist-variables": "^6.24.1", "babel-runtime": "^6.22.0", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-define-map": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" } }, "babel-helper-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "requires": { "babel-helper-get-function-arity": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-optimise-call-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-regex": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "requires": { "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" } }, "babel-helper-replace-supers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", "requires": { "babel-helper-optimise-call-expression": "^6.24.1", "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helpers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "requires": { "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-loader": { "version": "8.0.6", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.6.tgz", "integrity": "sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw==", "dev": true, "requires": { "find-cache-dir": "^2.0.0", "loader-utils": "^1.0.2", "mkdirp": "^0.5.1", "pify": "^4.0.1" } }, "babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-dynamic-import-node": { "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" } }, "babel-plugin-transform-es2015-arrow-functions": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-block-scoping": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "requires": { "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" } }, "babel-plugin-transform-es2015-classes": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "requires": { "babel-helper-define-map": "^6.24.1", "babel-helper-function-name": "^6.24.1", "babel-helper-optimise-call-expression": "^6.24.1", "babel-helper-replace-supers": "^6.24.1", "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-computed-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "requires": { "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-destructuring": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-for-of": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-literals": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-modules-amd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "requires": { "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { "version": "6.26.2", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "requires": { "babel-plugin-transform-strict-mode": "^6.24.1", "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-types": "^6.26.0" } }, "babel-plugin-transform-es2015-modules-systemjs": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "requires": { "babel-helper-hoist-variables": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-umd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "requires": { "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-object-super": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "requires": { "babel-helper-replace-supers": "^6.24.1", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-parameters": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "requires": { "babel-helper-call-delegate": "^6.24.1", "babel-helper-get-function-arity": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-shorthand-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "requires": { "babel-helper-regex": "^6.24.1", "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-template-literals": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-unicode-regex": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "requires": { "babel-helper-regex": "^6.24.1", "babel-runtime": "^6.22.0", "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-regenerator": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "requires": { "regenerator-transform": "^0.10.0" } }, "babel-plugin-transform-strict-mode": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-preset-es2015": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", "requires": { "babel-plugin-check-es2015-constants": "^6.22.0", "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", "babel-plugin-transform-es2015-block-scoping": "^6.24.1", "babel-plugin-transform-es2015-classes": "^6.24.1", "babel-plugin-transform-es2015-computed-properties": "^6.24.1", "babel-plugin-transform-es2015-destructuring": "^6.22.0", "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", "babel-plugin-transform-es2015-for-of": "^6.22.0", "babel-plugin-transform-es2015-function-name": "^6.24.1", "babel-plugin-transform-es2015-literals": "^6.22.0", "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", "babel-plugin-transform-es2015-modules-umd": "^6.24.1", "babel-plugin-transform-es2015-object-super": "^6.24.1", "babel-plugin-transform-es2015-parameters": "^6.24.1", "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", "babel-plugin-transform-es2015-spread": "^6.22.0", "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", "babel-plugin-transform-es2015-template-literals": "^6.22.0", "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", "babel-plugin-transform-regenerator": "^6.24.1" } }, "babel-register": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "requires": { "babel-core": "^6.26.0", "babel-runtime": "^6.26.0", "core-js": "^2.5.0", "home-or-tmp": "^2.0.0", "lodash": "^4.17.4", "mkdirp": "^0.5.1", "source-map-support": "^0.4.15" }, "dependencies": { "source-map-support": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { "source-map": "^0.5.6" } } } }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" } }, "babel-template": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "requires": { "babel-runtime": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "lodash": "^4.17.4" } }, "babel-traverse": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "requires": { "babel-code-frame": "^6.26.0", "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "debug": "^2.6.8", "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" } }, "babel-types": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { "babel-runtime": "^6.26.0", "esutils": "^2.0.2", "lodash": "^4.17.4", "to-fast-properties": "^1.0.3" } }, "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", "component-emitter": "^1.2.1", "define-property": "^1.0.0", "isobject": "^3.0.1", "mixin-deep": "^1.2.0", "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } } } }, "base64-js": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "optional": true, "requires": { "file-uri-to-path": "1.0.0" } }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", "fill-range": "^4.0.0", "isobject": "^3.0.1", "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", "snapdragon-node": "^2.0.1", "split-string": "^3.0.2", "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.3", "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "browserify-cipher": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", "evp_bytestokey": "^1.0.0" } }, "browserify-des": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" } }, "browserify-rsa": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" } }, "browserify-sign": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "requires": { "bn.js": "^4.1.1", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "create-hmac": "^1.1.2", "elliptic": "^6.0.0", "inherits": "^2.0.1", "parse-asn1": "^5.0.0" } }, "browserify-zlib": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "requires": { "pako": "~1.0.5" } }, "browserslist": { "version": "4.14.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.1.tgz", "integrity": "sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA==", "dev": true, "requires": { "caniuse-lite": "^1.0.30001124", "electron-to-chromium": "^1.3.562", "escalade": "^3.0.2", "node-releases": "^1.1.60" } }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", "isarray": "^1.0.0" } }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "cacache": { "version": "12.0.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", "requires": { "bluebird": "^3.5.5", "chownr": "^1.1.1", "figgy-pudding": "^3.5.1", "glob": "^7.1.4", "graceful-fs": "^4.1.15", "infer-owner": "^1.0.3", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.3", "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" } }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", "get-value": "^2.0.6", "has-value": "^1.0.0", "isobject": "^3.0.1", "set-value": "^2.0.0", "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" } }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { "version": "1.0.30001125", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz", "integrity": "sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==", "dev": true }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", "has-ansi": "^2.0.0", "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" } }, "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", "fsevents": "^1.2.7", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", "normalize-path": "^3.0.0", "path-is-absolute": "^1.0.0", "readdirp": "^2.2.1", "upath": "^1.1.1" } }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "requires": { "tslib": "^1.9.0" } }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", "isobject": "^3.0.0", "static-extend": "^0.1.1" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } } } }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.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==" }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { "ansi-regex": "^4.1.0" } } } }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" } }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" } }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" } }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "requires": { "aproba": "^1.1.1", "fs-write-stream-atomic": "^1.0.8", "iferr": "^0.1.5", "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.0" } }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" }, "core-js-compat": { "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.5", "semver": "7.0.0" }, "dependencies": { "semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", "dev": true } } }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" } }, "create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", "md5.js": "^1.3.4", "ripemd160": "^2.0.1", "sha.js": "^2.4.0" } }, "create-hmac": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", "inherits": "^2.0.1", "ripemd160": "^2.0.0", "safe-buffer": "^5.0.1", "sha.js": "^2.4.8" } }, "crel": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crel/-/crel-4.2.0.tgz", "integrity": "sha512-ZBVhTmtapdjEn8rTcTR/ePE0JSNfHzZfDkD3eAnsQEBmkQW9r14mzq6tK5Hkw6r26l7XxlU2Ox1nfHsmGIj0zQ==" }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" } }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", "create-ecdh": "^4.0.0", "create-hash": "^1.1.0", "create-hmac": "^1.1.0", "diffie-hellman": "^5.0.0", "inherits": "^2.0.1", "pbkdf2": "^3.0.3", "public-encrypt": "^4.0.0", "randombytes": "^2.0.0", "randomfill": "^1.0.3" } }, "cyclist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { "object-keys": "^1.0.12" } }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } } } }, "des.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" } }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "requires": { "repeating": "^2.0.0" } }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" } }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "requires": { "end-of-stream": "^1.0.0", "inherits": "^2.0.1", "readable-stream": "^2.0.0", "stream-shift": "^1.0.0" } }, "electron-to-chromium": { "version": "1.3.564", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz", "integrity": "sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg==", "dev": true }, "elliptic": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", "hash.js": "^1.0.0", "hmac-drbg": "^1.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" } }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } }, "enhanced-resolve": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", "integrity": "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA==", "requires": { "graceful-fs": "^4.1.2", "memory-fs": "^0.5.0", "tapable": "^1.0.0" }, "dependencies": { "memory-fs": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" } } } }, "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "requires": { "prr": "~1.0.1" } }, "escalade": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", "dev": true }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { "estraverse": "^4.1.0" } }, "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "events": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==" }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" } }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" } }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "posix-character-classes": "^0.1.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "requires": { "homedir-polyfill": "^1.0.1" } }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { "is-plain-object": "^2.0.4" } } } }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", "fragment-cache": "^0.2.1", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } } } }, "fast-deep-equal": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "figgy-pudding": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "optional": true }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", "repeat-string": "^1.6.1", "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "requires": { "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" } }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { "locate-path": "^3.0.0" } }, "findup-sync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", "requires": { "detect-file": "^1.0.0", "is-glob": "^4.0.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" } }, "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "requires": { "inherits": "^2.0.3", "readable-stream": "^2.3.6" } }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { "map-cache": "^0.2.2" } }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" } }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "requires": { "graceful-fs": "^4.1.2", "iferr": "^0.1.5", "imurmurhash": "^0.1.4", "readable-stream": "1 || 2" } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.11", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "optional": true, "requires": { "bindings": "^1.5.0", "nan": "^2.12.1", "node-pre-gyp": "*" }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" } }, "balanced-match": { "version": "1.0.0", "bundled": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "chownr": { "version": "1.1.3", "bundled": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, "optional": true }, "debug": { "version": "3.2.6", "bundled": true, "optional": true, "requires": { "ms": "^2.1.1" } }, "deep-extend": { "version": "0.6.0", "bundled": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, "optional": true }, "fs-minipass": { "version": "1.2.7", "bundled": true, "optional": true, "requires": { "minipass": "^2.6.0" } }, "fs.realpath": { "version": "1.0.0", "bundled": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", "has-unicode": "^2.0.0", "object-assign": "^4.1.0", "signal-exit": "^3.0.0", "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.6", "bundled": true, "optional": 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" } }, "has-unicode": { "version": "2.0.1", "bundled": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.3", "bundled": true, "optional": true, "requires": { "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "optional": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.4", "bundled": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", "bundled": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", "bundled": true, "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { "version": "1.3.3", "bundled": true, "optional": true, "requires": { "minipass": "^2.9.0" } }, "mkdirp": { "version": "0.5.1", "bundled": true, "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.1.2", "bundled": true, "optional": true }, "needle": { "version": "2.4.0", "bundled": true, "optional": true, "requires": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.14.0", "bundled": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4.4.2" } }, "nopt": { "version": "4.0.1", "bundled": true, "optional": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" } }, "npm-bundled": { "version": "1.1.1", "bundled": true, "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" } }, "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, "optional": true }, "npm-packlist": { "version": "1.4.7", "bundled": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", "gauge": "~2.7.3", "set-blocking": "~2.0.0" } }, "number-is-nan": { "version": "1.0.1", "bundled": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", "bundled": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, "optional": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { "version": "1.0.1", "bundled": true, "optional": true }, "process-nextick-args": { "version": "2.0.1", "bundled": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { "version": "1.2.0", "bundled": true, "optional": true } } }, "readable-stream": { "version": "2.3.6", "bundled": true, "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.7.1", "bundled": true, "optional": true, "requires": { "glob": "^7.1.3" } }, "safe-buffer": { "version": "5.1.2", "bundled": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, "optional": true }, "semver": { "version": "5.7.1", "bundled": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", "bundled": true, "optional": true }, "tar": { "version": "4.4.13", "bundled": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", "minipass": "^2.8.6", "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", "yallist": "^3.0.3" } }, "util-deprecate": { "version": "1.0.2", "bundled": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" } }, "wrappy": { "version": "1.0.2", "bundled": true, "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, "optional": true } } }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "gensync": { "version": "1.0.0-beta.1", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", "dev": true }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "requires": { "pump": "^3.0.0" } }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "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" } }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { "is-extglob": "^2.1.0" } } } }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "requires": { "global-prefix": "^3.0.0" }, "dependencies": { "global-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "requires": { "ini": "^1.3.5", "kind-of": "^6.0.2", "which": "^1.3.1" } } } }, "global-prefix": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "requires": { "expand-tilde": "^2.0.2", "homedir-polyfill": "^1.0.1", "ini": "^1.3.4", "is-windows": "^1.0.1", "which": "^1.2.14" } }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { "ansi-regex": "^2.0.0" } }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" } }, "has-values": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { "is-buffer": "^1.1.5" } } } }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.1" } }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "requires": { "parse-passwd": "^1.0.0" } }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" } }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "requires": { "loose-envify": "^1.0.0" } }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { "binary-extensions": "^1.0.0" } }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "requires": { "is-extglob": "^2.1.1" } }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { "isobject": "^3.0.1" } }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "requires": { "minimist": "^1.2.0" } }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "requires": { "invert-kv": "^2.0.0" } }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, "levenary": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", "dev": true, "requires": { "leven": "^3.1.0" } }, "linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.2.tgz", + "integrity": "sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ==", "requires": { "uc.micro": "^1.0.1" } }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" }, "loader-utils": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", "json5": "^1.0.1" } }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "requires": { "yallist": "^3.0.2" } }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "requires": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==" }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "requires": { "p-defer": "^1.0.0" } }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { "object-visit": "^1.0.0" } }, "markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.0.4.tgz", + "integrity": "sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q==", "requires": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" } }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" } }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" }, "mem": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" } }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" } }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "extglob": "^2.0.4", "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" } }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "requires": { "concat-stream": "^1.5.0", "duplexify": "^3.4.2", "end-of-stream": "^1.1.0", "flush-write-stream": "^1.0.0", "from2": "^2.1.0", "parallel-transform": "^1.1.0", "pump": "^3.0.0", "pumpify": "^1.3.3", "stream-each": "^1.1.0", "through2": "^2.0.0" } }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { "is-plain-object": "^2.0.4" } } } }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "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=" } } }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "requires": { "aproba": "^1.1.1", "copy-concurrently": "^1.0.0", "fs-write-stream-atomic": "^1.0.8", "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.3" } }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "optional": true }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" } }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-libs-browser": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", "requires": { "assert": "^1.1.1", "browserify-zlib": "^0.2.0", "buffer": "^4.3.0", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", "crypto-browserify": "^3.11.0", "domain-browser": "^1.1.1", "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", "path-browserify": "0.0.1", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", "readable-stream": "^2.3.3", "stream-browserify": "^2.0.1", "stream-http": "^2.7.2", "string_decoder": "^1.0.0", "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", "url": "^0.11.0", "util": "^0.11.0", "vm-browserify": "^1.0.1" }, "dependencies": { "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" } } }, "node-releases": { "version": "1.1.61", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz", "integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==", "dev": true }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { "path-key": "^2.0.0" } }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", "kind-of": "^3.0.3" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { "isobject": "^3.0.0" } }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", "has-symbols": "^1.0.0", "object-keys": "^1.0.11" } }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { "isobject": "^3.0.1" } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } }, "orderedmap": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-1.1.1.tgz", "integrity": "sha512-3Ux8um0zXbVacKUkcytc0u3HgC0b0bBLT+I60r2J/En72cI0nZffqrA7Xtf2Hqs27j1g82llR5Mhbd0Z1XW4AQ==" }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", "mem": "^4.0.0" } }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { "p-limit": "^2.0.0" } }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "requires": { "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } }, "parse-asn1": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", "pbkdf2": "^3.0.3", "safe-buffer": "^5.1.1" } }, "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "pbkdf2": { "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", "ripemd160": "^2.0.1", "safe-buffer": "^5.0.1", "sha.js": "^2.4.8" } }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "requires": { "find-up": "^3.0.0" } }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, "prosemirror-commands": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.3.tgz", "integrity": "sha512-YVbKwTR4likoyhuwIUC9egbzHvnFrFUNbiesB0DB/HZ8hBcopQ42Tb4KGlYrS3n+pNDTFObN73CLFY6mYLN2IQ==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "prosemirror-dropcursor": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.2.tgz", "integrity": "sha512-4c94OUGyobGnwcQI70OXyMhE/9T4aTgjU+CHxkd5c7D+jH/J0mKM/lk+jneFVKt7+E4/M0D9HzRPifu8U28Thw==", "requires": { "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0", "prosemirror-view": "^1.1.0" } }, "prosemirror-example-setup": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prosemirror-example-setup/-/prosemirror-example-setup-1.1.2.tgz", "integrity": "sha512-MTpIMyqk08jFnzxeRMCinCEMtVSTUtxKgQBGxfCbVe9C6zIOqp9qZZJz5Ojaad1GETySyuj8+OIHHvQsIaaaGQ==", "requires": { "prosemirror-commands": "^1.0.0", "prosemirror-dropcursor": "^1.0.0", "prosemirror-gapcursor": "^1.0.0", "prosemirror-history": "^1.0.0", "prosemirror-inputrules": "^1.0.0", "prosemirror-keymap": "^1.0.0", "prosemirror-menu": "^1.0.0", "prosemirror-schema-list": "^1.0.0", "prosemirror-state": "^1.0.0" } }, "prosemirror-gapcursor": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.3.tgz", "integrity": "sha512-/lgWvt2AdHjsM6oEsF65z0lhdQJGl6sQSfXSOX8/xjpd8ycfOolhgKZd4TPYpikwnh85JF4l5eIyiFZsl/RQQA==", "requires": { "prosemirror-keymap": "^1.0.0", "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", "prosemirror-view": "^1.0.0" } }, "prosemirror-history": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.1.3.tgz", "integrity": "sha512-zGDotijea+vnfnyyUGyiy1wfOQhf0B/b6zYcCouBV8yo6JmrE9X23M5q7Nf/nATywEZbgRLG70R4DmfSTC+gfg==", "requires": { "prosemirror-state": "^1.2.2", "prosemirror-transform": "^1.0.0", "rope-sequence": "^1.3.0" } }, "prosemirror-inputrules": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.1.2.tgz", "integrity": "sha512-Ja5Z3BWestlHYGvtSGqyvxMeB8QEuBjlHM8YnKtLGUXMDp965qdDV4goV8lJb17kIWHk7e7JNj6Catuoa3302g==", "requires": { "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "prosemirror-keymap": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.3.tgz", - "integrity": "sha512-PRA4NzkUMzV/NFf5pyQ6tmlIHiW/qjQ1kGWUlV2rF/dvlOxtpGpTEjIMhWgLuMf+HiDEFnUEP7uhYXu+t+491g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz", + "integrity": "sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg==", "requires": { "prosemirror-state": "^1.0.0", "w3c-keyname": "^2.2.0" } }, "prosemirror-markdown": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.4.4.tgz", "integrity": "sha512-qh6d9WKjahLSlV4V7PZNJifp+fLKrOFV/ZqajQ15Labqh49Zs/TGGk10SkT6n+ROTNIHHU/P5oBi5ei7BvwmuA==", "requires": { "markdown-it": "^10.0.0", "prosemirror-model": "^1.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "requires": { + "uc.micro": "^1.0.1" + } + }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + } } }, "prosemirror-menu": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.1.3.tgz", "integrity": "sha512-G+XiTdiVi1uGeiBR1OqtiVP3p0XyCKec4DYLk75G7J2R/N8OThHt/1StJYDlXPNzqYsQFZfQyPp/UwOL8hD6AA==", "requires": { "crel": "^4.2.0", "prosemirror-commands": "^1.0.0", "prosemirror-history": "^1.0.0", "prosemirror-state": "^1.0.0" } }, "prosemirror-model": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.9.1.tgz", "integrity": "sha512-Qblh8pm1c7Ll64sYLauwwzjimo/tFg1zW3Q3IWhKRhvfOEgRKqa6dC5pRrAa+XHOIjBFEYrqbi52J5bqA2dV8Q==", "requires": { "orderedmap": "^1.1.0" } }, "prosemirror-schema-list": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.2.tgz", "integrity": "sha512-dgM9PwtM4twa5WsgSYMB+J8bwjnR43DAD3L9MsR9rKm/nZR5Y85xcjB7gusVMSsbQ2NomMZF03RE6No6mTnclQ==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "prosemirror-state": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.3.2.tgz", "integrity": "sha512-t/JqE3aR0SV9QrzFVkAXsQwsgrQBNs/BDbcFH20RssW0xauqNNdjTXxy/J/kM7F+0zYi6+BRmz7cMMQQFU3mwQ==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "prosemirror-transform": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.2.4.tgz", "integrity": "sha512-0A668uf0EN89L9O9brE05kHcqp7FHmT5YN7Tom58Kj926QqOBs7iNRHDLWxrSaQB5MNZtzDOD9T3EyJ88YDcBg==", "requires": { "prosemirror-model": "^1.0.0" } }, "prosemirror-view": { "version": "1.14.2", "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.14.2.tgz", "integrity": "sha512-9yPVH6OLyaEraHjWHbSk2DB0R/1TsEE6AA1LI+vmCypXXA+zTzNrktUFzBhSJHehXDoEJcQfnl1Wdp5GPSh2+g==", "requires": { "prosemirror-model": "^1.1.0", "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0" } }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", "randombytes": "^2.0.1", "safe-buffer": "^5.1.2" } }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "pumpify": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "requires": { "duplexify": "^3.6.0", "inherits": "^2.0.3", "pump": "^2.0.0" }, "dependencies": { "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } } } }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "requires": { "safe-buffer": "^5.1.0" } }, "randomfill": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" } }, "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==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "requires": { "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", "readable-stream": "^2.0.2" } }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerate-unicode-properties": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" } }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, "regenerator-transform": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "requires": { "babel-runtime": "^6.18.0", "babel-types": "^6.19.0", "private": "^0.1.6" } }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" } }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "requires": { "regenerate": "^1.2.1", "regjsgen": "^0.2.0", "regjsparser": "^0.1.4" } }, "regjsgen": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" }, "regjsparser": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { "jsesc": "~0.5.0" }, "dependencies": { "jsesc": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" } } }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { "is-finite": "^1.0.0" } }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" } }, "resolve-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { "resolve-from": "^3.0.0" } }, "resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "requires": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" }, "dependencies": { "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "requires": { "global-prefix": "^1.0.1", "is-windows": "^1.0.1", "resolve-dir": "^1.0.0" } } } }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "requires": { "glob": "^7.1.3" } }, "ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, "rope-sequence": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.2.tgz", "integrity": "sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg==" }, "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "requires": { "aproba": "^1.1.1" } }, "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==" }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { "ret": "~0.1.10" } }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "requires": { "ajv": "^6.1.0", "ajv-errors": "^1.0.0", "ajv-keywords": "^3.1.0" } }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "serialize-javascript": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { "shebang-regex": "^1.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=" }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { "base": "^0.11.1", "debug": "^2.2.0", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "map-cache": "^0.2.2", "source-map": "^0.5.6", "source-map-resolve": "^0.5.0", "use": "^3.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } } } }, "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "requires": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" } }, "source-map-support": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { "extend-shallow": "^3.0.0" } }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "ssri": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "requires": { "figgy-pudding": "^3.5.1" } }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } } } }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" } }, "stream-each": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", "requires": { "end-of-stream": "^1.1.0", "stream-shift": "^1.0.0" } }, "stream-http": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", "readable-stream": "^2.3.6", "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" } }, "stream-shift": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.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==" }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { "ansi-regex": "^4.1.0" } } } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" } }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "terser": { "version": "4.6.6", "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.6.tgz", "integrity": "sha512-4lYPyeNmstjIIESr/ysHg2vUPRGf2tzF9z2yYwnowXVuVzLEamPN1Gfrz7f8I9uEPuHcbFlW4PLIAsJoxXyJ1g==", "requires": { "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, "terser-webpack-plugin": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", "serialize-javascript": "^2.1.2", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, "timers-browserify": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "requires": { "setimmediate": "^1.0.4" } }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } } } }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" } }, "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" } }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "tslib": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", "dev": true, "requires": { "unicode-canonical-property-names-ecmascript": "^1.0.4", "unicode-property-aliases-ecmascript": "^1.0.4" } }, "unicode-match-property-value-ecmascript": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" } }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "requires": { "unique-slug": "^2.0.0" } }, "unique-slug": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "requires": { "imurmurhash": "^0.1.4" } }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" }, "dependencies": { "has-value": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", "isobject": "^2.0.0" }, "dependencies": { "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { "isarray": "1.0.0" } } } }, "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" } } }, "upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "requires": { "punycode": "^2.1.0" } }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "requires": { "punycode": "1.3.2", "querystring": "0.2.0" }, "dependencies": { "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" } } }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "requires": { "inherits": "2.0.3" }, "dependencies": { "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "v8-compile-cache": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==" }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "w3c-keyname": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.2.tgz", - "integrity": "sha512-8Vs/aVwcy0IJACaPm4tyzh1fzehZE70bGSjEl3dDms5UXtWnaBElrSHC8lDDeak0Gk5jxKOFstL64/65o7Ge2A==" + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", + "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "requires": { "chokidar": "^2.0.2", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" } }, "webpack": { "version": "4.42.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz", "integrity": "sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-module-context": "1.8.5", "@webassemblyjs/wasm-edit": "1.8.5", "@webassemblyjs/wasm-parser": "1.8.5", "acorn": "^6.2.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^4.1.0", "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.4.0", "loader-utils": "^1.2.3", "memory-fs": "^0.4.1", "micromatch": "^3.1.10", "mkdirp": "^0.5.1", "neo-async": "^2.6.1", "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", "watchpack": "^1.6.0", "webpack-sources": "^1.4.1" } }, "webpack-cli": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.11.tgz", "integrity": "sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g==", "requires": { "chalk": "2.4.2", "cross-spawn": "6.0.5", "enhanced-resolve": "4.1.0", "findup-sync": "3.0.0", "global-modules": "2.0.0", "import-local": "2.0.0", "interpret": "1.2.0", "loader-utils": "1.2.3", "supports-color": "6.1.0", "v8-compile-cache": "2.0.3", "yargs": "13.2.4" }, "dependencies": { "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, "dependencies": { "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "requires": { "has-flag": "^3.0.0" } } } }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, "enhanced-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "requires": { "graceful-fs": "^4.1.2", "memory-fs": "^0.4.0", "tapable": "^1.0.0" } }, "loader-utils": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "requires": { "big.js": "^5.2.2", "emojis-list": "^2.0.0", "json5": "^1.0.1" } }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "requires": { "has-flag": "^3.0.0" } } } }, "webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", "requires": { "source-list-map": "^2.0.0", "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==" } } }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", "requires": { "errno": "~0.1.7" } }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.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==" }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "^1.9.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==", "requires": { "ansi-regex": "^4.1.0" } } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { "version": "13.2.4", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", "os-locale": "^3.1.0", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.0" } }, "yargs-parser": { "version": "13.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } } } } diff --git a/prose/package.json b/prose/package.json index 2afcc43..9a9f2a2 100644 --- a/prose/package.json +++ b/prose/package.json @@ -1,29 +1,31 @@ { "name": "prose", "version": "1.0.0", "description": "", "main": "prose.js", "dependencies": { "babel-core": "^6.26.3", "babel-preset-es2015": "^6.24.1", + "markdown-it": "^12.0.4", "prosemirror-example-setup": "^1.1.2", + "prosemirror-keymap": "^1.1.4", "prosemirror-markdown": "^1.4.4", "prosemirror-model": "^1.9.1", "prosemirror-state": "^1.3.2", "prosemirror-view": "^1.14.2", "webpack": "^4.42.0", "webpack-cli": "^3.3.11" }, "devDependencies": { "@babel/core": "^7.8.7", "@babel/preset-env": "^7.9.0", "babel-loader": "^8.0.6" }, "scripts": { "develop": "webpack --mode development --watch", "build": "webpack --mode production" }, "keywords": [], "author": "", "license": "ISC" } diff --git a/prose/prose.js b/prose/prose.js index 45af432..0ef9f7c 100644 --- a/prose/prose.js +++ b/prose/prose.js @@ -1,77 +1,97 @@ // class MarkdownView { // constructor(target, content) { // this.textarea = target.appendChild(document.createElement("textarea")) // this.textarea.value = content // } // get content() { return this.textarea.value } // focus() { this.textarea.focus() } // destroy() { this.textarea.remove() } // } -import {EditorView} from "prosemirror-view" -import {EditorState} from "prosemirror-state" -import {schema, defaultMarkdownParser, defaultMarkdownSerializer} from "prosemirror-markdown" -import {exampleSetup} from "prosemirror-example-setup" +import { EditorView } from "prosemirror-view" +import { EditorState } from "prosemirror-state" +import { exampleSetup } from "prosemirror-example-setup" +import { keymap } from "prosemirror-keymap"; + +import { writeAsMarkdownParser } from "./markdownParser" +import { writeAsMarkdownSerializer } from "./markdownSerializer" +import { writeFreelySchema } from "./schema" +import { getMenu } from "./menu" let $title = document.querySelector('#title') let $content = document.querySelector('#content') class ProseMirrorView { constructor(target, content) { this.view = new EditorView(target, { state: EditorState.create({ - doc: function(content) { + doc: function (content) { // console.log('loading '+window.draftKey) let localDraft = localStorage.getItem(window.draftKey); if (localDraft != null) { content = localDraft } if (content.indexOf("# ") === 0) { let eol = content.indexOf("\n"); let title = content.substring("# ".length, eol); - content = content.substring(eol+"\n\n".length); + content = content.substring(eol + "\n\n".length); $title.value = title; } - return defaultMarkdownParser.parse(content) + return writeAsMarkdownParser.parse(content) }(content), - plugins: exampleSetup({schema}) + plugins: [ + keymap({ + "Mod-Enter": () => { + document.getElementById("publish").click(); + return true; + }, + "Mod-k": ()=> { + console.log("TODO-link"); + return true; + } + }), + ...exampleSetup({ schema: writeFreelySchema, menuContent: getMenu() }), + + ] }), dispatchTransaction(transaction) { // console.log('saving to '+window.draftKey) - $content.value = defaultMarkdownSerializer.serialize(transaction.doc) - localStorage.setItem(window.draftKey, function() { + const newContent = writeAsMarkdownSerializer.serialize(transaction.doc) + $content.value = newContent + console.log({ newContent }) + localStorage.setItem(window.draftKey, function () { let draft = ""; if ($title.value != null && $title.value !== "") { - draft = "# "+$title.value+"\n\n" + draft = "# " + $title.value + "\n\n" } draft += $content.value return draft }()); let newState = this.state.apply(transaction) this.updateState(newState) } }) } get content() { return defaultMarkdownSerializer.serialize(this.view.state.doc) } focus() { this.view.focus() } destroy() { this.view.destroy() } } let place = document.querySelector("#editor") let view = new ProseMirrorView(place, $content.value) // document.querySelectorAll("input[type=radio]").forEach(button => { // button.addEventListener("change", () => { // if (!button.checked) return // let View = button.value == "markdown" ? MarkdownView : ProseMirrorView // if (view instanceof View) return // let content = view.content // view.destroy() // view = new View(place, content) // view.focus() // }) // }) diff --git a/prose/schema.js b/prose/schema.js new file mode 100644 index 0000000..5c36a77 --- /dev/null +++ b/prose/schema.js @@ -0,0 +1,19 @@ +import { schema } from "prosemirror-markdown" +import { Schema } from "prosemirror-model"; + +export const writeFreelySchema = new Schema({ + nodes: schema.spec.nodes.remove("blockquote") + .remove("horizontal_rule") + .remove("hard_break") + .addToEnd("readmore", { + inline: false, + content: "", + group: "block", + draggable: true, + toDOM: (node) => ["div", { class: "editorreadmore", style: "width: 100%;text-align:center" }, "Read more..."], + parseDOM: [{ tag: "div.editorreadmore" }], + }), + marks: schema.spec.marks, +}); + +console.log({ writeFreelySchema }) \ No newline at end of file diff --git a/static/js/prose.bundle.js b/static/js/prose.bundle.js index a72fe9d..3489289 100644 --- a/static/js/prose.bundle.js +++ b/static/js/prose.bundle.js @@ -1,1136 +1,1195 @@ /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./prose.js"); /******/ }) /************************************************************************/ /******/ ({ +/***/ "./markdownParser.js": +/*!***************************!*\ + !*** ./markdownParser.js ***! + \***************************/ +/*! exports provided: writeAsMarkdownParser */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeAsMarkdownParser\", function() { return writeAsMarkdownParser; });\n/* harmony import */ var prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-markdown */ \"./node_modules/prosemirror-markdown/dist/index.es.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! markdown-it */ \"./node_modules/markdown-it/index.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(markdown_it__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema */ \"./schema.js\");\n\n\n\nvar writeAsMarkdownParser = new prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__[\"MarkdownParser\"](_schema__WEBPACK_IMPORTED_MODULE_2__[\"writeFreelySchema\"], markdown_it__WEBPACK_IMPORTED_MODULE_1___default()(\"commonmark\", {\n html: true\n}), {\n // blockquote: { block: \"blockquote\" },\n paragraph: {\n block: \"paragraph\"\n },\n list_item: {\n block: \"list_item\"\n },\n bullet_list: {\n block: \"bullet_list\"\n },\n ordered_list: {\n block: \"ordered_list\",\n getAttrs: function getAttrs(tok) {\n return {\n order: +tok.attrGet(\"start\") || 1\n };\n }\n },\n heading: {\n block: \"heading\",\n getAttrs: function getAttrs(tok) {\n return {\n level: +tok.tag.slice(1)\n };\n }\n },\n code_block: {\n block: \"code_block\",\n noCloseToken: true\n },\n fence: {\n block: \"code_block\",\n getAttrs: function getAttrs(tok) {\n return {\n params: tok.info || \"\"\n };\n },\n noCloseToken: true\n },\n // hr: { node: \"horizontal_rule\" },\n image: {\n node: \"image\",\n getAttrs: function getAttrs(tok) {\n var _tok$children;\n\n return {\n src: tok.attrGet(\"src\"),\n title: tok.attrGet(\"title\") || null,\n alt: ((_tok$children = tok.children) === null || _tok$children === void 0 ? void 0 : _tok$children[0].content) || null\n };\n }\n },\n // hardbreak: { node: \"hard_break\" },\n em: {\n mark: \"em\"\n },\n strong: {\n mark: \"strong\"\n },\n link: {\n mark: \"link\",\n getAttrs: function getAttrs(tok) {\n return {\n href: tok.attrGet(\"href\"),\n title: tok.attrGet(\"title\") || null\n };\n }\n },\n code_inline: {\n mark: \"code\",\n noCloseToken: true\n },\n html_block: {\n node: \"readmore\",\n getAttrs: function getAttrs(token) {\n console.log({\n token: token\n }); // TODO: Give different attributes depending on the token content\n\n return {};\n }\n }\n});\n\n//# sourceURL=webpack:///./markdownParser.js?"); + +/***/ }), + +/***/ "./markdownSerializer.js": +/*!*******************************!*\ + !*** ./markdownSerializer.js ***! + \*******************************/ +/*! exports provided: writeAsMarkdownSerializer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeAsMarkdownSerializer\", function() { return writeAsMarkdownSerializer; });\n/* harmony import */ var prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-markdown */ \"./node_modules/prosemirror-markdown/dist/index.es.js\");\n\n\nfunction backticksFor(node, side) {\n var ticks = /`+/g;\n var m;\n var len = 0;\n if (node.isText) while (m = ticks.exec(node.text)) {\n len = Math.max(len, m[0].length);\n }\n var result = len > 0 && side > 0 ? \" `\" : \"`\";\n\n for (var i = 0; i < len; i++) {\n result += \"`\";\n }\n\n if (len > 0 && side < 0) result += \" \";\n return result;\n}\n\nfunction isPlainURL(link, parent, index, side) {\n if (link.attrs.title || !/^\\w+:/.test(link.attrs.href)) return false;\n var content = parent.child(index + (side < 0 ? -1 : 0));\n if (!content.isText || content.text != link.attrs.href || content.marks[content.marks.length - 1] != link) return false;\n if (index == (side < 0 ? 1 : parent.childCount - 1)) return true;\n var next = parent.child(index + (side < 0 ? -2 : 1));\n return !link.isInSet(next.marks);\n}\n\nvar writeAsMarkdownSerializer = new prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__[\"MarkdownSerializer\"]({\n readmore: function readmore(state, node) {\n state.write(\"\");\n state.closeBlock(node);\n },\n // blockquote(state, node) {\n // state.wrapBlock(\"> \", undefined, node, () => state.renderContent(node));\n // },\n code_block: function code_block(state, node) {\n state.write(\"```\".concat(node.attrs.params || \"\", \"\\n\"));\n state.text(node.textContent, false);\n state.ensureNewLine();\n state.write(\"```\");\n state.closeBlock(node);\n },\n heading: function heading(state, node) {\n state.write(\"\".concat(state.repeat(\"#\", node.attrs.level), \" \"));\n state.renderInline(node);\n state.closeBlock(node);\n },\n // horizontal_rule(state, node) {\n // state.write(node.attrs.markup || \"---\");\n // state.closeBlock(node);\n // },\n bullet_list: function bullet_list(state, node) {\n state.renderList(node, \" \", function () {\n return \"\".concat(node.attrs.bullet || \"*\", \" \");\n });\n },\n ordered_list: function ordered_list(state, node) {\n var start = node.attrs.order || 1;\n var maxW = String(start + node.childCount - 1).length;\n var space = state.repeat(\" \", maxW + 2);\n state.renderList(node, space, function (i) {\n var nStr = String(start + i);\n return \"\".concat(state.repeat(\" \", maxW - nStr.length) + nStr, \". \");\n });\n },\n list_item: function list_item(state, node) {\n state.renderContent(node);\n },\n paragraph: function paragraph(state, node) {\n state.renderInline(node);\n state.closeBlock(node);\n },\n image: function image(state, node) {\n state.write(\"![\".concat(state.esc(node.attrs.alt || \"\"), \"](\").concat(state.esc(node.attrs.src)).concat(node.attrs.title ? \" \".concat(state.quote(node.attrs.title)) : \"\", \")\"));\n },\n // hard_break(state, node, parent, index) {\n // for (let i = index + 1; i < parent.childCount; i += 1)\n // if (parent.child(i).type !== node.type) {\n // state.write(\"\\\\\\n\");\n // return;\n // }\n // },\n text: function text(state, node) {\n state.text(node.text || \"\");\n }\n}, {\n em: {\n open: \"*\",\n close: \"*\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n strong: {\n open: \"**\",\n close: \"**\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n link: {\n open: function open(_state, mark, parent, index) {\n return isPlainURL(mark, parent, index, 1) ? \"<\" : \"[\";\n },\n close: function close(state, mark, parent, index) {\n return isPlainURL(mark, parent, index, -1) ? \">\" : \"](\".concat(state.esc(mark.attrs.href)).concat(mark.attrs.title ? \" \".concat(state.quote(mark.attrs.title)) : \"\", \")\");\n }\n },\n code: {\n open: function open(_state, _mark, parent, index) {\n return backticksFor(parent.child(index), -1);\n },\n close: function close(_state, _mark, parent, index) {\n return backticksFor(parent.child(index - 1), 1);\n },\n escape: false\n }\n});\n\n//# sourceURL=webpack:///./markdownSerializer.js?"); + +/***/ }), + +/***/ "./menu.js": +/*!*****************!*\ + !*** ./menu.js ***! + \*****************/ +/*! exports provided: getMenu */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMenu\", function() { return getMenu; });\n/* harmony import */ var prosemirror_menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-menu */ \"./node_modules/prosemirror-menu/dist/index.es.js\");\n/* harmony import */ var prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-example-setup */ \"./node_modules/prosemirror-example-setup/dist/index.es.js\");\n/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema */ \"./schema.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n\n\n\n\nfunction canInsert(state, nodeType, attrs) {\n var $from = state.selection.$from;\n\n for (var d = $from.depth; d >= 0; d--) {\n var index = $from.index(d);\n if ($from.node(d).canReplaceWith(index, index, nodeType, attrs)) return true;\n }\n\n return false;\n}\n\nvar ReadMoreItem = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_0__[\"MenuItem\"]({\n label: \"Read more\",\n select: function select(state) {\n return canInsert(state, _schema__WEBPACK_IMPORTED_MODULE_2__[\"writeFreelySchema\"].nodes.readmore);\n },\n run: function run(state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(_schema__WEBPACK_IMPORTED_MODULE_2__[\"writeFreelySchema\"].nodes.readmore.create()));\n }\n});\nvar getMenu = function getMenu() {\n var menuContent = [].concat(_toConsumableArray(Object(prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_1__[\"buildMenuItems\"])(_schema__WEBPACK_IMPORTED_MODULE_2__[\"writeFreelySchema\"]).fullMenu), [[ReadMoreItem]]);\n return menuContent;\n};\n\n//# sourceURL=webpack:///./menu.js?"); + +/***/ }), + /***/ "./node_modules/crel/crel.es.js": /*!**************************************!*\ !*** ./node_modules/crel/crel.es.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar crel = createCommonjsModule(function (module, exports) {\n\n/* Copyright (C) 2012 Kory Nunn\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\nNOTE:\r\nThis code is formatted for run-speed and to assist compilers.\r\nThis might make it harder to read at times, but the code's intention should be transparent. */\r\n\r\n// IIFE our function\r\n(function (exporter) {\r\n // Define our function and its properties\r\n // These strings are used multiple times, so this makes things smaller once compiled\r\n var func = 'function',\r\n isNodeString = 'isNode',\r\n // Helper functions used throughout the script\r\n isType = function (object, type) { return typeof object === type; },\r\n // Recursively appends children to given element. As a text node if not already an element\r\n appendChild = function (element, child) {\r\n if (child !== null) {\r\n if (Array.isArray(child)) { // Support (deeply) nested child elements\r\n child.map(function (subChild) { return appendChild(element, subChild); });\r\n } else {\r\n if (!crel[isNodeString](child)) {\r\n child = document.createTextNode(child);\r\n }\r\n element.appendChild(child);\r\n }\r\n }\r\n };\r\n //\r\n function crel (element, settings) {\r\n // Define all used variables / shortcuts here, to make things smaller once compiled\r\n var args = arguments, // Note: assigned to a variable to assist compilers.\r\n index = 1,\r\n key,\r\n attribute;\r\n // If first argument is an element, use it as is, otherwise treat it as a tagname\r\n element = crel.isElement(element) ? element : document.createElement(element);\r\n // Check if second argument is a settings object\r\n if (isType(settings, 'object') && !crel[isNodeString](settings) && !Array.isArray(settings)) {\r\n // Don't treat settings as a child\r\n index++;\r\n // Go through settings / attributes object, if it exists\r\n for (key in settings) {\r\n // Store the attribute into a variable, before we potentially modify the key\r\n attribute = settings[key];\r\n // Get mapped key / function, if one exists\r\n key = crel.attrMap[key] || key;\r\n // Note: We want to prioritise mapping over properties\r\n if (isType(key, func)) {\r\n key(element, attribute);\r\n } else if (isType(attribute, func)) { // ex. onClick property\r\n element[key] = attribute;\r\n } else {\r\n // Set the element attribute\r\n element.setAttribute(key, attribute);\r\n }\r\n }\r\n }\r\n // Loop through all arguments, if any, and append them to our element if they're not `null`\r\n for (; index < args.length; index++) {\r\n appendChild(element, args[index]);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n // Used for mapping attribute keys to supported versions in bad browsers, or to custom functionality\r\n crel.attrMap = {};\r\n crel.isElement = function (object) { return object instanceof Element; };\r\n crel[isNodeString] = function (node) { return node instanceof Node; };\r\n // Expose proxy interface\r\n crel.proxy = new Proxy(crel, {\r\n get: function (target, key) {\r\n !(key in crel) && (crel[key] = crel.bind(null, key));\r\n return crel[key];\r\n }\r\n });\r\n // Export crel\r\n exporter(crel, func);\r\n})(function (product, func) {\r\n {\r\n // Export for Browserify / CommonJS format\r\n module.exports = product;\r\n }\r\n});\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (crel);\n\n\n//# sourceURL=webpack:///./node_modules/crel/crel.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar crel = createCommonjsModule(function (module, exports) {\n /* Copyright (C) 2012 Kory Nunn\r\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n \r\n NOTE:\r\n This code is formatted for run-speed and to assist compilers.\r\n This might make it harder to read at times, but the code's intention should be transparent. */\n // IIFE our function\n (function (exporter) {\n // Define our function and its properties\n // These strings are used multiple times, so this makes things smaller once compiled\n var func = 'function',\n isNodeString = 'isNode',\n // Helper functions used throughout the script\n isType = function isType(object, type) {\n return _typeof(object) === type;\n },\n // Recursively appends children to given element. As a text node if not already an element\n appendChild = function appendChild(element, child) {\n if (child !== null) {\n if (Array.isArray(child)) {\n // Support (deeply) nested child elements\n child.map(function (subChild) {\n return appendChild(element, subChild);\n });\n } else {\n if (!crel[isNodeString](child)) {\n child = document.createTextNode(child);\n }\n\n element.appendChild(child);\n }\n }\n }; //\n\n\n function crel(element, settings) {\n // Define all used variables / shortcuts here, to make things smaller once compiled\n var args = arguments,\n // Note: assigned to a variable to assist compilers.\n index = 1,\n key,\n attribute; // If first argument is an element, use it as is, otherwise treat it as a tagname\n\n element = crel.isElement(element) ? element : document.createElement(element); // Check if second argument is a settings object\n\n if (isType(settings, 'object') && !crel[isNodeString](settings) && !Array.isArray(settings)) {\n // Don't treat settings as a child\n index++; // Go through settings / attributes object, if it exists\n\n for (key in settings) {\n // Store the attribute into a variable, before we potentially modify the key\n attribute = settings[key]; // Get mapped key / function, if one exists\n\n key = crel.attrMap[key] || key; // Note: We want to prioritise mapping over properties\n\n if (isType(key, func)) {\n key(element, attribute);\n } else if (isType(attribute, func)) {\n // ex. onClick property\n element[key] = attribute;\n } else {\n // Set the element attribute\n element.setAttribute(key, attribute);\n }\n }\n } // Loop through all arguments, if any, and append them to our element if they're not `null`\n\n\n for (; index < args.length; index++) {\n appendChild(element, args[index]);\n }\n\n return element;\n } // Used for mapping attribute keys to supported versions in bad browsers, or to custom functionality\n\n\n crel.attrMap = {};\n\n crel.isElement = function (object) {\n return object instanceof Element;\n };\n\n crel[isNodeString] = function (node) {\n return node instanceof Node;\n }; // Expose proxy interface\n\n\n crel.proxy = new Proxy(crel, {\n get: function get(target, key) {\n !(key in crel) && (crel[key] = crel.bind(null, key));\n return crel[key];\n }\n }); // Export crel\n\n exporter(crel, func);\n })(function (product, func) {\n {\n // Export for Browserify / CommonJS format\n module.exports = product;\n }\n });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (crel);\n\n//# sourceURL=webpack:///./node_modules/crel/crel.es.js?"); /***/ }), /***/ "./node_modules/entities/lib/maps/entities.json": /*!******************************************************!*\ !*** ./node_modules/entities/lib/maps/entities.json ***! \******************************************************/ /*! exports provided: Aacute, aacute, Abreve, abreve, ac, acd, acE, Acirc, acirc, acute, Acy, acy, AElig, aelig, af, Afr, afr, Agrave, agrave, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp, AMP, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos, ApplyFunction, approx, approxeq, Aring, aring, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde, atilde, Auml, auml, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil, ccedil, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil, Cedilla, cemptyv, cent, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy, COPY, copysr, CounterClockwiseContourIntegral, crarr, cross, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die, DifferentialD, digamma, disin, div, divide, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute, eacute, easter, Ecaron, ecaron, Ecirc, ecirc, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave, egrave, egs, egsdot, el, Element, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH, eth, Euml, euml, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12, frac13, frac14, frac15, frac16, frac18, frac23, frac25, frac34, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt, GT, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute, iacute, ic, Icirc, icirc, Icy, icy, Idot, IEcy, iecy, iexcl, iff, ifr, Ifr, Igrave, igrave, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, in, infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml, iuml, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt, LT, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr, male, malt, maltese, Map, map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro, midast, midcir, mid, middot, minusb, minus, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde, ntilde, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute, oacute, oast, Ocirc, ocirc, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve, ograve, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf, ordm, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash, oslash, osol, Otilde, otilde, otimesas, Otimes, otimes, Ouml, ouml, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot, QUOT, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg, REG, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1, sup2, sup3, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN, thorn, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute, uacute, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc, ucirc, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave, ugrave, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml, uuml, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute, yacute, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj, default */ /***/ (function(module) { eval("module.exports = JSON.parse(\"{\\\"Aacute\\\":\\\"Á\\\",\\\"aacute\\\":\\\"á\\\",\\\"Abreve\\\":\\\"Ă\\\",\\\"abreve\\\":\\\"ă\\\",\\\"ac\\\":\\\"∾\\\",\\\"acd\\\":\\\"∿\\\",\\\"acE\\\":\\\"∾̳\\\",\\\"Acirc\\\":\\\"Â\\\",\\\"acirc\\\":\\\"â\\\",\\\"acute\\\":\\\"´\\\",\\\"Acy\\\":\\\"А\\\",\\\"acy\\\":\\\"а\\\",\\\"AElig\\\":\\\"Æ\\\",\\\"aelig\\\":\\\"æ\\\",\\\"af\\\":\\\"⁡\\\",\\\"Afr\\\":\\\"𝔄\\\",\\\"afr\\\":\\\"𝔞\\\",\\\"Agrave\\\":\\\"À\\\",\\\"agrave\\\":\\\"à\\\",\\\"alefsym\\\":\\\"ℵ\\\",\\\"aleph\\\":\\\"ℵ\\\",\\\"Alpha\\\":\\\"Α\\\",\\\"alpha\\\":\\\"α\\\",\\\"Amacr\\\":\\\"Ā\\\",\\\"amacr\\\":\\\"ā\\\",\\\"amalg\\\":\\\"⨿\\\",\\\"amp\\\":\\\"&\\\",\\\"AMP\\\":\\\"&\\\",\\\"andand\\\":\\\"⩕\\\",\\\"And\\\":\\\"⩓\\\",\\\"and\\\":\\\"∧\\\",\\\"andd\\\":\\\"⩜\\\",\\\"andslope\\\":\\\"⩘\\\",\\\"andv\\\":\\\"⩚\\\",\\\"ang\\\":\\\"∠\\\",\\\"ange\\\":\\\"⦤\\\",\\\"angle\\\":\\\"∠\\\",\\\"angmsdaa\\\":\\\"⦨\\\",\\\"angmsdab\\\":\\\"⦩\\\",\\\"angmsdac\\\":\\\"⦪\\\",\\\"angmsdad\\\":\\\"⦫\\\",\\\"angmsdae\\\":\\\"⦬\\\",\\\"angmsdaf\\\":\\\"⦭\\\",\\\"angmsdag\\\":\\\"⦮\\\",\\\"angmsdah\\\":\\\"⦯\\\",\\\"angmsd\\\":\\\"∡\\\",\\\"angrt\\\":\\\"∟\\\",\\\"angrtvb\\\":\\\"⊾\\\",\\\"angrtvbd\\\":\\\"⦝\\\",\\\"angsph\\\":\\\"∢\\\",\\\"angst\\\":\\\"Å\\\",\\\"angzarr\\\":\\\"⍼\\\",\\\"Aogon\\\":\\\"Ą\\\",\\\"aogon\\\":\\\"ą\\\",\\\"Aopf\\\":\\\"𝔸\\\",\\\"aopf\\\":\\\"𝕒\\\",\\\"apacir\\\":\\\"⩯\\\",\\\"ap\\\":\\\"≈\\\",\\\"apE\\\":\\\"⩰\\\",\\\"ape\\\":\\\"≊\\\",\\\"apid\\\":\\\"≋\\\",\\\"apos\\\":\\\"'\\\",\\\"ApplyFunction\\\":\\\"⁡\\\",\\\"approx\\\":\\\"≈\\\",\\\"approxeq\\\":\\\"≊\\\",\\\"Aring\\\":\\\"Å\\\",\\\"aring\\\":\\\"å\\\",\\\"Ascr\\\":\\\"𝒜\\\",\\\"ascr\\\":\\\"𝒶\\\",\\\"Assign\\\":\\\"≔\\\",\\\"ast\\\":\\\"*\\\",\\\"asymp\\\":\\\"≈\\\",\\\"asympeq\\\":\\\"≍\\\",\\\"Atilde\\\":\\\"Ã\\\",\\\"atilde\\\":\\\"ã\\\",\\\"Auml\\\":\\\"Ä\\\",\\\"auml\\\":\\\"ä\\\",\\\"awconint\\\":\\\"∳\\\",\\\"awint\\\":\\\"⨑\\\",\\\"backcong\\\":\\\"≌\\\",\\\"backepsilon\\\":\\\"϶\\\",\\\"backprime\\\":\\\"‵\\\",\\\"backsim\\\":\\\"∽\\\",\\\"backsimeq\\\":\\\"⋍\\\",\\\"Backslash\\\":\\\"∖\\\",\\\"Barv\\\":\\\"⫧\\\",\\\"barvee\\\":\\\"⊽\\\",\\\"barwed\\\":\\\"⌅\\\",\\\"Barwed\\\":\\\"⌆\\\",\\\"barwedge\\\":\\\"⌅\\\",\\\"bbrk\\\":\\\"⎵\\\",\\\"bbrktbrk\\\":\\\"⎶\\\",\\\"bcong\\\":\\\"≌\\\",\\\"Bcy\\\":\\\"Б\\\",\\\"bcy\\\":\\\"б\\\",\\\"bdquo\\\":\\\"„\\\",\\\"becaus\\\":\\\"∵\\\",\\\"because\\\":\\\"∵\\\",\\\"Because\\\":\\\"∵\\\",\\\"bemptyv\\\":\\\"⦰\\\",\\\"bepsi\\\":\\\"϶\\\",\\\"bernou\\\":\\\"ℬ\\\",\\\"Bernoullis\\\":\\\"ℬ\\\",\\\"Beta\\\":\\\"Β\\\",\\\"beta\\\":\\\"β\\\",\\\"beth\\\":\\\"ℶ\\\",\\\"between\\\":\\\"≬\\\",\\\"Bfr\\\":\\\"𝔅\\\",\\\"bfr\\\":\\\"𝔟\\\",\\\"bigcap\\\":\\\"⋂\\\",\\\"bigcirc\\\":\\\"◯\\\",\\\"bigcup\\\":\\\"⋃\\\",\\\"bigodot\\\":\\\"⨀\\\",\\\"bigoplus\\\":\\\"⨁\\\",\\\"bigotimes\\\":\\\"⨂\\\",\\\"bigsqcup\\\":\\\"⨆\\\",\\\"bigstar\\\":\\\"★\\\",\\\"bigtriangledown\\\":\\\"▽\\\",\\\"bigtriangleup\\\":\\\"△\\\",\\\"biguplus\\\":\\\"⨄\\\",\\\"bigvee\\\":\\\"⋁\\\",\\\"bigwedge\\\":\\\"⋀\\\",\\\"bkarow\\\":\\\"⤍\\\",\\\"blacklozenge\\\":\\\"⧫\\\",\\\"blacksquare\\\":\\\"▪\\\",\\\"blacktriangle\\\":\\\"▴\\\",\\\"blacktriangledown\\\":\\\"▾\\\",\\\"blacktriangleleft\\\":\\\"◂\\\",\\\"blacktriangleright\\\":\\\"▸\\\",\\\"blank\\\":\\\"␣\\\",\\\"blk12\\\":\\\"▒\\\",\\\"blk14\\\":\\\"░\\\",\\\"blk34\\\":\\\"▓\\\",\\\"block\\\":\\\"█\\\",\\\"bne\\\":\\\"=⃥\\\",\\\"bnequiv\\\":\\\"≡⃥\\\",\\\"bNot\\\":\\\"⫭\\\",\\\"bnot\\\":\\\"⌐\\\",\\\"Bopf\\\":\\\"𝔹\\\",\\\"bopf\\\":\\\"𝕓\\\",\\\"bot\\\":\\\"⊥\\\",\\\"bottom\\\":\\\"⊥\\\",\\\"bowtie\\\":\\\"⋈\\\",\\\"boxbox\\\":\\\"⧉\\\",\\\"boxdl\\\":\\\"┐\\\",\\\"boxdL\\\":\\\"╕\\\",\\\"boxDl\\\":\\\"╖\\\",\\\"boxDL\\\":\\\"╗\\\",\\\"boxdr\\\":\\\"┌\\\",\\\"boxdR\\\":\\\"╒\\\",\\\"boxDr\\\":\\\"╓\\\",\\\"boxDR\\\":\\\"╔\\\",\\\"boxh\\\":\\\"─\\\",\\\"boxH\\\":\\\"═\\\",\\\"boxhd\\\":\\\"┬\\\",\\\"boxHd\\\":\\\"╤\\\",\\\"boxhD\\\":\\\"╥\\\",\\\"boxHD\\\":\\\"╦\\\",\\\"boxhu\\\":\\\"┴\\\",\\\"boxHu\\\":\\\"╧\\\",\\\"boxhU\\\":\\\"╨\\\",\\\"boxHU\\\":\\\"╩\\\",\\\"boxminus\\\":\\\"⊟\\\",\\\"boxplus\\\":\\\"⊞\\\",\\\"boxtimes\\\":\\\"⊠\\\",\\\"boxul\\\":\\\"┘\\\",\\\"boxuL\\\":\\\"╛\\\",\\\"boxUl\\\":\\\"╜\\\",\\\"boxUL\\\":\\\"╝\\\",\\\"boxur\\\":\\\"└\\\",\\\"boxuR\\\":\\\"╘\\\",\\\"boxUr\\\":\\\"╙\\\",\\\"boxUR\\\":\\\"╚\\\",\\\"boxv\\\":\\\"│\\\",\\\"boxV\\\":\\\"║\\\",\\\"boxvh\\\":\\\"┼\\\",\\\"boxvH\\\":\\\"╪\\\",\\\"boxVh\\\":\\\"╫\\\",\\\"boxVH\\\":\\\"╬\\\",\\\"boxvl\\\":\\\"┤\\\",\\\"boxvL\\\":\\\"╡\\\",\\\"boxVl\\\":\\\"╢\\\",\\\"boxVL\\\":\\\"╣\\\",\\\"boxvr\\\":\\\"├\\\",\\\"boxvR\\\":\\\"╞\\\",\\\"boxVr\\\":\\\"╟\\\",\\\"boxVR\\\":\\\"╠\\\",\\\"bprime\\\":\\\"‵\\\",\\\"breve\\\":\\\"˘\\\",\\\"Breve\\\":\\\"˘\\\",\\\"brvbar\\\":\\\"¦\\\",\\\"bscr\\\":\\\"𝒷\\\",\\\"Bscr\\\":\\\"ℬ\\\",\\\"bsemi\\\":\\\"⁏\\\",\\\"bsim\\\":\\\"∽\\\",\\\"bsime\\\":\\\"⋍\\\",\\\"bsolb\\\":\\\"⧅\\\",\\\"bsol\\\":\\\"\\\\\\\\\\\",\\\"bsolhsub\\\":\\\"⟈\\\",\\\"bull\\\":\\\"•\\\",\\\"bullet\\\":\\\"•\\\",\\\"bump\\\":\\\"≎\\\",\\\"bumpE\\\":\\\"⪮\\\",\\\"bumpe\\\":\\\"≏\\\",\\\"Bumpeq\\\":\\\"≎\\\",\\\"bumpeq\\\":\\\"≏\\\",\\\"Cacute\\\":\\\"Ć\\\",\\\"cacute\\\":\\\"ć\\\",\\\"capand\\\":\\\"⩄\\\",\\\"capbrcup\\\":\\\"⩉\\\",\\\"capcap\\\":\\\"⩋\\\",\\\"cap\\\":\\\"∩\\\",\\\"Cap\\\":\\\"⋒\\\",\\\"capcup\\\":\\\"⩇\\\",\\\"capdot\\\":\\\"⩀\\\",\\\"CapitalDifferentialD\\\":\\\"ⅅ\\\",\\\"caps\\\":\\\"∩︀\\\",\\\"caret\\\":\\\"⁁\\\",\\\"caron\\\":\\\"ˇ\\\",\\\"Cayleys\\\":\\\"ℭ\\\",\\\"ccaps\\\":\\\"⩍\\\",\\\"Ccaron\\\":\\\"Č\\\",\\\"ccaron\\\":\\\"č\\\",\\\"Ccedil\\\":\\\"Ç\\\",\\\"ccedil\\\":\\\"ç\\\",\\\"Ccirc\\\":\\\"Ĉ\\\",\\\"ccirc\\\":\\\"ĉ\\\",\\\"Cconint\\\":\\\"∰\\\",\\\"ccups\\\":\\\"⩌\\\",\\\"ccupssm\\\":\\\"⩐\\\",\\\"Cdot\\\":\\\"Ċ\\\",\\\"cdot\\\":\\\"ċ\\\",\\\"cedil\\\":\\\"¸\\\",\\\"Cedilla\\\":\\\"¸\\\",\\\"cemptyv\\\":\\\"⦲\\\",\\\"cent\\\":\\\"¢\\\",\\\"centerdot\\\":\\\"·\\\",\\\"CenterDot\\\":\\\"·\\\",\\\"cfr\\\":\\\"𝔠\\\",\\\"Cfr\\\":\\\"ℭ\\\",\\\"CHcy\\\":\\\"Ч\\\",\\\"chcy\\\":\\\"ч\\\",\\\"check\\\":\\\"✓\\\",\\\"checkmark\\\":\\\"✓\\\",\\\"Chi\\\":\\\"Χ\\\",\\\"chi\\\":\\\"χ\\\",\\\"circ\\\":\\\"ˆ\\\",\\\"circeq\\\":\\\"≗\\\",\\\"circlearrowleft\\\":\\\"↺\\\",\\\"circlearrowright\\\":\\\"↻\\\",\\\"circledast\\\":\\\"⊛\\\",\\\"circledcirc\\\":\\\"⊚\\\",\\\"circleddash\\\":\\\"⊝\\\",\\\"CircleDot\\\":\\\"⊙\\\",\\\"circledR\\\":\\\"®\\\",\\\"circledS\\\":\\\"Ⓢ\\\",\\\"CircleMinus\\\":\\\"⊖\\\",\\\"CirclePlus\\\":\\\"⊕\\\",\\\"CircleTimes\\\":\\\"⊗\\\",\\\"cir\\\":\\\"○\\\",\\\"cirE\\\":\\\"⧃\\\",\\\"cire\\\":\\\"≗\\\",\\\"cirfnint\\\":\\\"⨐\\\",\\\"cirmid\\\":\\\"⫯\\\",\\\"cirscir\\\":\\\"⧂\\\",\\\"ClockwiseContourIntegral\\\":\\\"∲\\\",\\\"CloseCurlyDoubleQuote\\\":\\\"”\\\",\\\"CloseCurlyQuote\\\":\\\"’\\\",\\\"clubs\\\":\\\"♣\\\",\\\"clubsuit\\\":\\\"♣\\\",\\\"colon\\\":\\\":\\\",\\\"Colon\\\":\\\"∷\\\",\\\"Colone\\\":\\\"⩴\\\",\\\"colone\\\":\\\"≔\\\",\\\"coloneq\\\":\\\"≔\\\",\\\"comma\\\":\\\",\\\",\\\"commat\\\":\\\"@\\\",\\\"comp\\\":\\\"∁\\\",\\\"compfn\\\":\\\"∘\\\",\\\"complement\\\":\\\"∁\\\",\\\"complexes\\\":\\\"ℂ\\\",\\\"cong\\\":\\\"≅\\\",\\\"congdot\\\":\\\"⩭\\\",\\\"Congruent\\\":\\\"≡\\\",\\\"conint\\\":\\\"∮\\\",\\\"Conint\\\":\\\"∯\\\",\\\"ContourIntegral\\\":\\\"∮\\\",\\\"copf\\\":\\\"𝕔\\\",\\\"Copf\\\":\\\"ℂ\\\",\\\"coprod\\\":\\\"∐\\\",\\\"Coproduct\\\":\\\"∐\\\",\\\"copy\\\":\\\"©\\\",\\\"COPY\\\":\\\"©\\\",\\\"copysr\\\":\\\"℗\\\",\\\"CounterClockwiseContourIntegral\\\":\\\"∳\\\",\\\"crarr\\\":\\\"↵\\\",\\\"cross\\\":\\\"✗\\\",\\\"Cross\\\":\\\"⨯\\\",\\\"Cscr\\\":\\\"𝒞\\\",\\\"cscr\\\":\\\"𝒸\\\",\\\"csub\\\":\\\"⫏\\\",\\\"csube\\\":\\\"⫑\\\",\\\"csup\\\":\\\"⫐\\\",\\\"csupe\\\":\\\"⫒\\\",\\\"ctdot\\\":\\\"⋯\\\",\\\"cudarrl\\\":\\\"⤸\\\",\\\"cudarrr\\\":\\\"⤵\\\",\\\"cuepr\\\":\\\"⋞\\\",\\\"cuesc\\\":\\\"⋟\\\",\\\"cularr\\\":\\\"↶\\\",\\\"cularrp\\\":\\\"⤽\\\",\\\"cupbrcap\\\":\\\"⩈\\\",\\\"cupcap\\\":\\\"⩆\\\",\\\"CupCap\\\":\\\"≍\\\",\\\"cup\\\":\\\"∪\\\",\\\"Cup\\\":\\\"⋓\\\",\\\"cupcup\\\":\\\"⩊\\\",\\\"cupdot\\\":\\\"⊍\\\",\\\"cupor\\\":\\\"⩅\\\",\\\"cups\\\":\\\"∪︀\\\",\\\"curarr\\\":\\\"↷\\\",\\\"curarrm\\\":\\\"⤼\\\",\\\"curlyeqprec\\\":\\\"⋞\\\",\\\"curlyeqsucc\\\":\\\"⋟\\\",\\\"curlyvee\\\":\\\"⋎\\\",\\\"curlywedge\\\":\\\"⋏\\\",\\\"curren\\\":\\\"¤\\\",\\\"curvearrowleft\\\":\\\"↶\\\",\\\"curvearrowright\\\":\\\"↷\\\",\\\"cuvee\\\":\\\"⋎\\\",\\\"cuwed\\\":\\\"⋏\\\",\\\"cwconint\\\":\\\"∲\\\",\\\"cwint\\\":\\\"∱\\\",\\\"cylcty\\\":\\\"⌭\\\",\\\"dagger\\\":\\\"†\\\",\\\"Dagger\\\":\\\"‡\\\",\\\"daleth\\\":\\\"ℸ\\\",\\\"darr\\\":\\\"↓\\\",\\\"Darr\\\":\\\"↡\\\",\\\"dArr\\\":\\\"⇓\\\",\\\"dash\\\":\\\"‐\\\",\\\"Dashv\\\":\\\"⫤\\\",\\\"dashv\\\":\\\"⊣\\\",\\\"dbkarow\\\":\\\"⤏\\\",\\\"dblac\\\":\\\"˝\\\",\\\"Dcaron\\\":\\\"Ď\\\",\\\"dcaron\\\":\\\"ď\\\",\\\"Dcy\\\":\\\"Д\\\",\\\"dcy\\\":\\\"д\\\",\\\"ddagger\\\":\\\"‡\\\",\\\"ddarr\\\":\\\"⇊\\\",\\\"DD\\\":\\\"ⅅ\\\",\\\"dd\\\":\\\"ⅆ\\\",\\\"DDotrahd\\\":\\\"⤑\\\",\\\"ddotseq\\\":\\\"⩷\\\",\\\"deg\\\":\\\"°\\\",\\\"Del\\\":\\\"∇\\\",\\\"Delta\\\":\\\"Δ\\\",\\\"delta\\\":\\\"δ\\\",\\\"demptyv\\\":\\\"⦱\\\",\\\"dfisht\\\":\\\"⥿\\\",\\\"Dfr\\\":\\\"𝔇\\\",\\\"dfr\\\":\\\"𝔡\\\",\\\"dHar\\\":\\\"⥥\\\",\\\"dharl\\\":\\\"⇃\\\",\\\"dharr\\\":\\\"⇂\\\",\\\"DiacriticalAcute\\\":\\\"´\\\",\\\"DiacriticalDot\\\":\\\"˙\\\",\\\"DiacriticalDoubleAcute\\\":\\\"˝\\\",\\\"DiacriticalGrave\\\":\\\"`\\\",\\\"DiacriticalTilde\\\":\\\"˜\\\",\\\"diam\\\":\\\"⋄\\\",\\\"diamond\\\":\\\"⋄\\\",\\\"Diamond\\\":\\\"⋄\\\",\\\"diamondsuit\\\":\\\"♦\\\",\\\"diams\\\":\\\"♦\\\",\\\"die\\\":\\\"¨\\\",\\\"DifferentialD\\\":\\\"ⅆ\\\",\\\"digamma\\\":\\\"ϝ\\\",\\\"disin\\\":\\\"⋲\\\",\\\"div\\\":\\\"÷\\\",\\\"divide\\\":\\\"÷\\\",\\\"divideontimes\\\":\\\"⋇\\\",\\\"divonx\\\":\\\"⋇\\\",\\\"DJcy\\\":\\\"Ђ\\\",\\\"djcy\\\":\\\"ђ\\\",\\\"dlcorn\\\":\\\"⌞\\\",\\\"dlcrop\\\":\\\"⌍\\\",\\\"dollar\\\":\\\"$\\\",\\\"Dopf\\\":\\\"𝔻\\\",\\\"dopf\\\":\\\"𝕕\\\",\\\"Dot\\\":\\\"¨\\\",\\\"dot\\\":\\\"˙\\\",\\\"DotDot\\\":\\\"⃜\\\",\\\"doteq\\\":\\\"≐\\\",\\\"doteqdot\\\":\\\"≑\\\",\\\"DotEqual\\\":\\\"≐\\\",\\\"dotminus\\\":\\\"∸\\\",\\\"dotplus\\\":\\\"∔\\\",\\\"dotsquare\\\":\\\"⊡\\\",\\\"doublebarwedge\\\":\\\"⌆\\\",\\\"DoubleContourIntegral\\\":\\\"∯\\\",\\\"DoubleDot\\\":\\\"¨\\\",\\\"DoubleDownArrow\\\":\\\"⇓\\\",\\\"DoubleLeftArrow\\\":\\\"⇐\\\",\\\"DoubleLeftRightArrow\\\":\\\"⇔\\\",\\\"DoubleLeftTee\\\":\\\"⫤\\\",\\\"DoubleLongLeftArrow\\\":\\\"⟸\\\",\\\"DoubleLongLeftRightArrow\\\":\\\"⟺\\\",\\\"DoubleLongRightArrow\\\":\\\"⟹\\\",\\\"DoubleRightArrow\\\":\\\"⇒\\\",\\\"DoubleRightTee\\\":\\\"⊨\\\",\\\"DoubleUpArrow\\\":\\\"⇑\\\",\\\"DoubleUpDownArrow\\\":\\\"⇕\\\",\\\"DoubleVerticalBar\\\":\\\"∥\\\",\\\"DownArrowBar\\\":\\\"⤓\\\",\\\"downarrow\\\":\\\"↓\\\",\\\"DownArrow\\\":\\\"↓\\\",\\\"Downarrow\\\":\\\"⇓\\\",\\\"DownArrowUpArrow\\\":\\\"⇵\\\",\\\"DownBreve\\\":\\\"̑\\\",\\\"downdownarrows\\\":\\\"⇊\\\",\\\"downharpoonleft\\\":\\\"⇃\\\",\\\"downharpoonright\\\":\\\"⇂\\\",\\\"DownLeftRightVector\\\":\\\"⥐\\\",\\\"DownLeftTeeVector\\\":\\\"⥞\\\",\\\"DownLeftVectorBar\\\":\\\"⥖\\\",\\\"DownLeftVector\\\":\\\"↽\\\",\\\"DownRightTeeVector\\\":\\\"⥟\\\",\\\"DownRightVectorBar\\\":\\\"⥗\\\",\\\"DownRightVector\\\":\\\"⇁\\\",\\\"DownTeeArrow\\\":\\\"↧\\\",\\\"DownTee\\\":\\\"⊤\\\",\\\"drbkarow\\\":\\\"⤐\\\",\\\"drcorn\\\":\\\"⌟\\\",\\\"drcrop\\\":\\\"⌌\\\",\\\"Dscr\\\":\\\"𝒟\\\",\\\"dscr\\\":\\\"𝒹\\\",\\\"DScy\\\":\\\"Ѕ\\\",\\\"dscy\\\":\\\"ѕ\\\",\\\"dsol\\\":\\\"⧶\\\",\\\"Dstrok\\\":\\\"Đ\\\",\\\"dstrok\\\":\\\"đ\\\",\\\"dtdot\\\":\\\"⋱\\\",\\\"dtri\\\":\\\"▿\\\",\\\"dtrif\\\":\\\"▾\\\",\\\"duarr\\\":\\\"⇵\\\",\\\"duhar\\\":\\\"⥯\\\",\\\"dwangle\\\":\\\"⦦\\\",\\\"DZcy\\\":\\\"Џ\\\",\\\"dzcy\\\":\\\"џ\\\",\\\"dzigrarr\\\":\\\"⟿\\\",\\\"Eacute\\\":\\\"É\\\",\\\"eacute\\\":\\\"é\\\",\\\"easter\\\":\\\"⩮\\\",\\\"Ecaron\\\":\\\"Ě\\\",\\\"ecaron\\\":\\\"ě\\\",\\\"Ecirc\\\":\\\"Ê\\\",\\\"ecirc\\\":\\\"ê\\\",\\\"ecir\\\":\\\"≖\\\",\\\"ecolon\\\":\\\"≕\\\",\\\"Ecy\\\":\\\"Э\\\",\\\"ecy\\\":\\\"э\\\",\\\"eDDot\\\":\\\"⩷\\\",\\\"Edot\\\":\\\"Ė\\\",\\\"edot\\\":\\\"ė\\\",\\\"eDot\\\":\\\"≑\\\",\\\"ee\\\":\\\"ⅇ\\\",\\\"efDot\\\":\\\"≒\\\",\\\"Efr\\\":\\\"𝔈\\\",\\\"efr\\\":\\\"𝔢\\\",\\\"eg\\\":\\\"⪚\\\",\\\"Egrave\\\":\\\"È\\\",\\\"egrave\\\":\\\"è\\\",\\\"egs\\\":\\\"⪖\\\",\\\"egsdot\\\":\\\"⪘\\\",\\\"el\\\":\\\"⪙\\\",\\\"Element\\\":\\\"∈\\\",\\\"elinters\\\":\\\"⏧\\\",\\\"ell\\\":\\\"ℓ\\\",\\\"els\\\":\\\"⪕\\\",\\\"elsdot\\\":\\\"⪗\\\",\\\"Emacr\\\":\\\"Ē\\\",\\\"emacr\\\":\\\"ē\\\",\\\"empty\\\":\\\"∅\\\",\\\"emptyset\\\":\\\"∅\\\",\\\"EmptySmallSquare\\\":\\\"◻\\\",\\\"emptyv\\\":\\\"∅\\\",\\\"EmptyVerySmallSquare\\\":\\\"▫\\\",\\\"emsp13\\\":\\\" \\\",\\\"emsp14\\\":\\\" \\\",\\\"emsp\\\":\\\" \\\",\\\"ENG\\\":\\\"Ŋ\\\",\\\"eng\\\":\\\"ŋ\\\",\\\"ensp\\\":\\\" \\\",\\\"Eogon\\\":\\\"Ę\\\",\\\"eogon\\\":\\\"ę\\\",\\\"Eopf\\\":\\\"𝔼\\\",\\\"eopf\\\":\\\"𝕖\\\",\\\"epar\\\":\\\"⋕\\\",\\\"eparsl\\\":\\\"⧣\\\",\\\"eplus\\\":\\\"⩱\\\",\\\"epsi\\\":\\\"ε\\\",\\\"Epsilon\\\":\\\"Ε\\\",\\\"epsilon\\\":\\\"ε\\\",\\\"epsiv\\\":\\\"ϵ\\\",\\\"eqcirc\\\":\\\"≖\\\",\\\"eqcolon\\\":\\\"≕\\\",\\\"eqsim\\\":\\\"≂\\\",\\\"eqslantgtr\\\":\\\"⪖\\\",\\\"eqslantless\\\":\\\"⪕\\\",\\\"Equal\\\":\\\"⩵\\\",\\\"equals\\\":\\\"=\\\",\\\"EqualTilde\\\":\\\"≂\\\",\\\"equest\\\":\\\"≟\\\",\\\"Equilibrium\\\":\\\"⇌\\\",\\\"equiv\\\":\\\"≡\\\",\\\"equivDD\\\":\\\"⩸\\\",\\\"eqvparsl\\\":\\\"⧥\\\",\\\"erarr\\\":\\\"⥱\\\",\\\"erDot\\\":\\\"≓\\\",\\\"escr\\\":\\\"ℯ\\\",\\\"Escr\\\":\\\"ℰ\\\",\\\"esdot\\\":\\\"≐\\\",\\\"Esim\\\":\\\"⩳\\\",\\\"esim\\\":\\\"≂\\\",\\\"Eta\\\":\\\"Η\\\",\\\"eta\\\":\\\"η\\\",\\\"ETH\\\":\\\"Ð\\\",\\\"eth\\\":\\\"ð\\\",\\\"Euml\\\":\\\"Ë\\\",\\\"euml\\\":\\\"ë\\\",\\\"euro\\\":\\\"€\\\",\\\"excl\\\":\\\"!\\\",\\\"exist\\\":\\\"∃\\\",\\\"Exists\\\":\\\"∃\\\",\\\"expectation\\\":\\\"ℰ\\\",\\\"exponentiale\\\":\\\"ⅇ\\\",\\\"ExponentialE\\\":\\\"ⅇ\\\",\\\"fallingdotseq\\\":\\\"≒\\\",\\\"Fcy\\\":\\\"Ф\\\",\\\"fcy\\\":\\\"ф\\\",\\\"female\\\":\\\"♀\\\",\\\"ffilig\\\":\\\"ffi\\\",\\\"fflig\\\":\\\"ff\\\",\\\"ffllig\\\":\\\"ffl\\\",\\\"Ffr\\\":\\\"𝔉\\\",\\\"ffr\\\":\\\"𝔣\\\",\\\"filig\\\":\\\"fi\\\",\\\"FilledSmallSquare\\\":\\\"◼\\\",\\\"FilledVerySmallSquare\\\":\\\"▪\\\",\\\"fjlig\\\":\\\"fj\\\",\\\"flat\\\":\\\"♭\\\",\\\"fllig\\\":\\\"fl\\\",\\\"fltns\\\":\\\"▱\\\",\\\"fnof\\\":\\\"ƒ\\\",\\\"Fopf\\\":\\\"𝔽\\\",\\\"fopf\\\":\\\"𝕗\\\",\\\"forall\\\":\\\"∀\\\",\\\"ForAll\\\":\\\"∀\\\",\\\"fork\\\":\\\"⋔\\\",\\\"forkv\\\":\\\"⫙\\\",\\\"Fouriertrf\\\":\\\"ℱ\\\",\\\"fpartint\\\":\\\"⨍\\\",\\\"frac12\\\":\\\"½\\\",\\\"frac13\\\":\\\"⅓\\\",\\\"frac14\\\":\\\"¼\\\",\\\"frac15\\\":\\\"⅕\\\",\\\"frac16\\\":\\\"⅙\\\",\\\"frac18\\\":\\\"⅛\\\",\\\"frac23\\\":\\\"⅔\\\",\\\"frac25\\\":\\\"⅖\\\",\\\"frac34\\\":\\\"¾\\\",\\\"frac35\\\":\\\"⅗\\\",\\\"frac38\\\":\\\"⅜\\\",\\\"frac45\\\":\\\"⅘\\\",\\\"frac56\\\":\\\"⅚\\\",\\\"frac58\\\":\\\"⅝\\\",\\\"frac78\\\":\\\"⅞\\\",\\\"frasl\\\":\\\"⁄\\\",\\\"frown\\\":\\\"⌢\\\",\\\"fscr\\\":\\\"𝒻\\\",\\\"Fscr\\\":\\\"ℱ\\\",\\\"gacute\\\":\\\"ǵ\\\",\\\"Gamma\\\":\\\"Γ\\\",\\\"gamma\\\":\\\"γ\\\",\\\"Gammad\\\":\\\"Ϝ\\\",\\\"gammad\\\":\\\"ϝ\\\",\\\"gap\\\":\\\"⪆\\\",\\\"Gbreve\\\":\\\"Ğ\\\",\\\"gbreve\\\":\\\"ğ\\\",\\\"Gcedil\\\":\\\"Ģ\\\",\\\"Gcirc\\\":\\\"Ĝ\\\",\\\"gcirc\\\":\\\"ĝ\\\",\\\"Gcy\\\":\\\"Г\\\",\\\"gcy\\\":\\\"г\\\",\\\"Gdot\\\":\\\"Ġ\\\",\\\"gdot\\\":\\\"ġ\\\",\\\"ge\\\":\\\"≥\\\",\\\"gE\\\":\\\"≧\\\",\\\"gEl\\\":\\\"⪌\\\",\\\"gel\\\":\\\"⋛\\\",\\\"geq\\\":\\\"≥\\\",\\\"geqq\\\":\\\"≧\\\",\\\"geqslant\\\":\\\"⩾\\\",\\\"gescc\\\":\\\"⪩\\\",\\\"ges\\\":\\\"⩾\\\",\\\"gesdot\\\":\\\"⪀\\\",\\\"gesdoto\\\":\\\"⪂\\\",\\\"gesdotol\\\":\\\"⪄\\\",\\\"gesl\\\":\\\"⋛︀\\\",\\\"gesles\\\":\\\"⪔\\\",\\\"Gfr\\\":\\\"𝔊\\\",\\\"gfr\\\":\\\"𝔤\\\",\\\"gg\\\":\\\"≫\\\",\\\"Gg\\\":\\\"⋙\\\",\\\"ggg\\\":\\\"⋙\\\",\\\"gimel\\\":\\\"ℷ\\\",\\\"GJcy\\\":\\\"Ѓ\\\",\\\"gjcy\\\":\\\"ѓ\\\",\\\"gla\\\":\\\"⪥\\\",\\\"gl\\\":\\\"≷\\\",\\\"glE\\\":\\\"⪒\\\",\\\"glj\\\":\\\"⪤\\\",\\\"gnap\\\":\\\"⪊\\\",\\\"gnapprox\\\":\\\"⪊\\\",\\\"gne\\\":\\\"⪈\\\",\\\"gnE\\\":\\\"≩\\\",\\\"gneq\\\":\\\"⪈\\\",\\\"gneqq\\\":\\\"≩\\\",\\\"gnsim\\\":\\\"⋧\\\",\\\"Gopf\\\":\\\"𝔾\\\",\\\"gopf\\\":\\\"𝕘\\\",\\\"grave\\\":\\\"`\\\",\\\"GreaterEqual\\\":\\\"≥\\\",\\\"GreaterEqualLess\\\":\\\"⋛\\\",\\\"GreaterFullEqual\\\":\\\"≧\\\",\\\"GreaterGreater\\\":\\\"⪢\\\",\\\"GreaterLess\\\":\\\"≷\\\",\\\"GreaterSlantEqual\\\":\\\"⩾\\\",\\\"GreaterTilde\\\":\\\"≳\\\",\\\"Gscr\\\":\\\"𝒢\\\",\\\"gscr\\\":\\\"ℊ\\\",\\\"gsim\\\":\\\"≳\\\",\\\"gsime\\\":\\\"⪎\\\",\\\"gsiml\\\":\\\"⪐\\\",\\\"gtcc\\\":\\\"⪧\\\",\\\"gtcir\\\":\\\"⩺\\\",\\\"gt\\\":\\\">\\\",\\\"GT\\\":\\\">\\\",\\\"Gt\\\":\\\"≫\\\",\\\"gtdot\\\":\\\"⋗\\\",\\\"gtlPar\\\":\\\"⦕\\\",\\\"gtquest\\\":\\\"⩼\\\",\\\"gtrapprox\\\":\\\"⪆\\\",\\\"gtrarr\\\":\\\"⥸\\\",\\\"gtrdot\\\":\\\"⋗\\\",\\\"gtreqless\\\":\\\"⋛\\\",\\\"gtreqqless\\\":\\\"⪌\\\",\\\"gtrless\\\":\\\"≷\\\",\\\"gtrsim\\\":\\\"≳\\\",\\\"gvertneqq\\\":\\\"≩︀\\\",\\\"gvnE\\\":\\\"≩︀\\\",\\\"Hacek\\\":\\\"ˇ\\\",\\\"hairsp\\\":\\\" \\\",\\\"half\\\":\\\"½\\\",\\\"hamilt\\\":\\\"ℋ\\\",\\\"HARDcy\\\":\\\"Ъ\\\",\\\"hardcy\\\":\\\"ъ\\\",\\\"harrcir\\\":\\\"⥈\\\",\\\"harr\\\":\\\"↔\\\",\\\"hArr\\\":\\\"⇔\\\",\\\"harrw\\\":\\\"↭\\\",\\\"Hat\\\":\\\"^\\\",\\\"hbar\\\":\\\"ℏ\\\",\\\"Hcirc\\\":\\\"Ĥ\\\",\\\"hcirc\\\":\\\"ĥ\\\",\\\"hearts\\\":\\\"♥\\\",\\\"heartsuit\\\":\\\"♥\\\",\\\"hellip\\\":\\\"…\\\",\\\"hercon\\\":\\\"⊹\\\",\\\"hfr\\\":\\\"𝔥\\\",\\\"Hfr\\\":\\\"ℌ\\\",\\\"HilbertSpace\\\":\\\"ℋ\\\",\\\"hksearow\\\":\\\"⤥\\\",\\\"hkswarow\\\":\\\"⤦\\\",\\\"hoarr\\\":\\\"⇿\\\",\\\"homtht\\\":\\\"∻\\\",\\\"hookleftarrow\\\":\\\"↩\\\",\\\"hookrightarrow\\\":\\\"↪\\\",\\\"hopf\\\":\\\"𝕙\\\",\\\"Hopf\\\":\\\"ℍ\\\",\\\"horbar\\\":\\\"―\\\",\\\"HorizontalLine\\\":\\\"─\\\",\\\"hscr\\\":\\\"𝒽\\\",\\\"Hscr\\\":\\\"ℋ\\\",\\\"hslash\\\":\\\"ℏ\\\",\\\"Hstrok\\\":\\\"Ħ\\\",\\\"hstrok\\\":\\\"ħ\\\",\\\"HumpDownHump\\\":\\\"≎\\\",\\\"HumpEqual\\\":\\\"≏\\\",\\\"hybull\\\":\\\"⁃\\\",\\\"hyphen\\\":\\\"‐\\\",\\\"Iacute\\\":\\\"Í\\\",\\\"iacute\\\":\\\"í\\\",\\\"ic\\\":\\\"⁣\\\",\\\"Icirc\\\":\\\"Î\\\",\\\"icirc\\\":\\\"î\\\",\\\"Icy\\\":\\\"И\\\",\\\"icy\\\":\\\"и\\\",\\\"Idot\\\":\\\"İ\\\",\\\"IEcy\\\":\\\"Е\\\",\\\"iecy\\\":\\\"е\\\",\\\"iexcl\\\":\\\"¡\\\",\\\"iff\\\":\\\"⇔\\\",\\\"ifr\\\":\\\"𝔦\\\",\\\"Ifr\\\":\\\"ℑ\\\",\\\"Igrave\\\":\\\"Ì\\\",\\\"igrave\\\":\\\"ì\\\",\\\"ii\\\":\\\"ⅈ\\\",\\\"iiiint\\\":\\\"⨌\\\",\\\"iiint\\\":\\\"∭\\\",\\\"iinfin\\\":\\\"⧜\\\",\\\"iiota\\\":\\\"℩\\\",\\\"IJlig\\\":\\\"IJ\\\",\\\"ijlig\\\":\\\"ij\\\",\\\"Imacr\\\":\\\"Ī\\\",\\\"imacr\\\":\\\"ī\\\",\\\"image\\\":\\\"ℑ\\\",\\\"ImaginaryI\\\":\\\"ⅈ\\\",\\\"imagline\\\":\\\"ℐ\\\",\\\"imagpart\\\":\\\"ℑ\\\",\\\"imath\\\":\\\"ı\\\",\\\"Im\\\":\\\"ℑ\\\",\\\"imof\\\":\\\"⊷\\\",\\\"imped\\\":\\\"Ƶ\\\",\\\"Implies\\\":\\\"⇒\\\",\\\"incare\\\":\\\"℅\\\",\\\"in\\\":\\\"∈\\\",\\\"infin\\\":\\\"∞\\\",\\\"infintie\\\":\\\"⧝\\\",\\\"inodot\\\":\\\"ı\\\",\\\"intcal\\\":\\\"⊺\\\",\\\"int\\\":\\\"∫\\\",\\\"Int\\\":\\\"∬\\\",\\\"integers\\\":\\\"ℤ\\\",\\\"Integral\\\":\\\"∫\\\",\\\"intercal\\\":\\\"⊺\\\",\\\"Intersection\\\":\\\"⋂\\\",\\\"intlarhk\\\":\\\"⨗\\\",\\\"intprod\\\":\\\"⨼\\\",\\\"InvisibleComma\\\":\\\"⁣\\\",\\\"InvisibleTimes\\\":\\\"⁢\\\",\\\"IOcy\\\":\\\"Ё\\\",\\\"iocy\\\":\\\"ё\\\",\\\"Iogon\\\":\\\"Į\\\",\\\"iogon\\\":\\\"į\\\",\\\"Iopf\\\":\\\"𝕀\\\",\\\"iopf\\\":\\\"𝕚\\\",\\\"Iota\\\":\\\"Ι\\\",\\\"iota\\\":\\\"ι\\\",\\\"iprod\\\":\\\"⨼\\\",\\\"iquest\\\":\\\"¿\\\",\\\"iscr\\\":\\\"𝒾\\\",\\\"Iscr\\\":\\\"ℐ\\\",\\\"isin\\\":\\\"∈\\\",\\\"isindot\\\":\\\"⋵\\\",\\\"isinE\\\":\\\"⋹\\\",\\\"isins\\\":\\\"⋴\\\",\\\"isinsv\\\":\\\"⋳\\\",\\\"isinv\\\":\\\"∈\\\",\\\"it\\\":\\\"⁢\\\",\\\"Itilde\\\":\\\"Ĩ\\\",\\\"itilde\\\":\\\"ĩ\\\",\\\"Iukcy\\\":\\\"І\\\",\\\"iukcy\\\":\\\"і\\\",\\\"Iuml\\\":\\\"Ï\\\",\\\"iuml\\\":\\\"ï\\\",\\\"Jcirc\\\":\\\"Ĵ\\\",\\\"jcirc\\\":\\\"ĵ\\\",\\\"Jcy\\\":\\\"Й\\\",\\\"jcy\\\":\\\"й\\\",\\\"Jfr\\\":\\\"𝔍\\\",\\\"jfr\\\":\\\"𝔧\\\",\\\"jmath\\\":\\\"ȷ\\\",\\\"Jopf\\\":\\\"𝕁\\\",\\\"jopf\\\":\\\"𝕛\\\",\\\"Jscr\\\":\\\"𝒥\\\",\\\"jscr\\\":\\\"𝒿\\\",\\\"Jsercy\\\":\\\"Ј\\\",\\\"jsercy\\\":\\\"ј\\\",\\\"Jukcy\\\":\\\"Є\\\",\\\"jukcy\\\":\\\"є\\\",\\\"Kappa\\\":\\\"Κ\\\",\\\"kappa\\\":\\\"κ\\\",\\\"kappav\\\":\\\"ϰ\\\",\\\"Kcedil\\\":\\\"Ķ\\\",\\\"kcedil\\\":\\\"ķ\\\",\\\"Kcy\\\":\\\"К\\\",\\\"kcy\\\":\\\"к\\\",\\\"Kfr\\\":\\\"𝔎\\\",\\\"kfr\\\":\\\"𝔨\\\",\\\"kgreen\\\":\\\"ĸ\\\",\\\"KHcy\\\":\\\"Х\\\",\\\"khcy\\\":\\\"х\\\",\\\"KJcy\\\":\\\"Ќ\\\",\\\"kjcy\\\":\\\"ќ\\\",\\\"Kopf\\\":\\\"𝕂\\\",\\\"kopf\\\":\\\"𝕜\\\",\\\"Kscr\\\":\\\"𝒦\\\",\\\"kscr\\\":\\\"𝓀\\\",\\\"lAarr\\\":\\\"⇚\\\",\\\"Lacute\\\":\\\"Ĺ\\\",\\\"lacute\\\":\\\"ĺ\\\",\\\"laemptyv\\\":\\\"⦴\\\",\\\"lagran\\\":\\\"ℒ\\\",\\\"Lambda\\\":\\\"Λ\\\",\\\"lambda\\\":\\\"λ\\\",\\\"lang\\\":\\\"⟨\\\",\\\"Lang\\\":\\\"⟪\\\",\\\"langd\\\":\\\"⦑\\\",\\\"langle\\\":\\\"⟨\\\",\\\"lap\\\":\\\"⪅\\\",\\\"Laplacetrf\\\":\\\"ℒ\\\",\\\"laquo\\\":\\\"«\\\",\\\"larrb\\\":\\\"⇤\\\",\\\"larrbfs\\\":\\\"⤟\\\",\\\"larr\\\":\\\"←\\\",\\\"Larr\\\":\\\"↞\\\",\\\"lArr\\\":\\\"⇐\\\",\\\"larrfs\\\":\\\"⤝\\\",\\\"larrhk\\\":\\\"↩\\\",\\\"larrlp\\\":\\\"↫\\\",\\\"larrpl\\\":\\\"⤹\\\",\\\"larrsim\\\":\\\"⥳\\\",\\\"larrtl\\\":\\\"↢\\\",\\\"latail\\\":\\\"⤙\\\",\\\"lAtail\\\":\\\"⤛\\\",\\\"lat\\\":\\\"⪫\\\",\\\"late\\\":\\\"⪭\\\",\\\"lates\\\":\\\"⪭︀\\\",\\\"lbarr\\\":\\\"⤌\\\",\\\"lBarr\\\":\\\"⤎\\\",\\\"lbbrk\\\":\\\"❲\\\",\\\"lbrace\\\":\\\"{\\\",\\\"lbrack\\\":\\\"[\\\",\\\"lbrke\\\":\\\"⦋\\\",\\\"lbrksld\\\":\\\"⦏\\\",\\\"lbrkslu\\\":\\\"⦍\\\",\\\"Lcaron\\\":\\\"Ľ\\\",\\\"lcaron\\\":\\\"ľ\\\",\\\"Lcedil\\\":\\\"Ļ\\\",\\\"lcedil\\\":\\\"ļ\\\",\\\"lceil\\\":\\\"⌈\\\",\\\"lcub\\\":\\\"{\\\",\\\"Lcy\\\":\\\"Л\\\",\\\"lcy\\\":\\\"л\\\",\\\"ldca\\\":\\\"⤶\\\",\\\"ldquo\\\":\\\"“\\\",\\\"ldquor\\\":\\\"„\\\",\\\"ldrdhar\\\":\\\"⥧\\\",\\\"ldrushar\\\":\\\"⥋\\\",\\\"ldsh\\\":\\\"↲\\\",\\\"le\\\":\\\"≤\\\",\\\"lE\\\":\\\"≦\\\",\\\"LeftAngleBracket\\\":\\\"⟨\\\",\\\"LeftArrowBar\\\":\\\"⇤\\\",\\\"leftarrow\\\":\\\"←\\\",\\\"LeftArrow\\\":\\\"←\\\",\\\"Leftarrow\\\":\\\"⇐\\\",\\\"LeftArrowRightArrow\\\":\\\"⇆\\\",\\\"leftarrowtail\\\":\\\"↢\\\",\\\"LeftCeiling\\\":\\\"⌈\\\",\\\"LeftDoubleBracket\\\":\\\"⟦\\\",\\\"LeftDownTeeVector\\\":\\\"⥡\\\",\\\"LeftDownVectorBar\\\":\\\"⥙\\\",\\\"LeftDownVector\\\":\\\"⇃\\\",\\\"LeftFloor\\\":\\\"⌊\\\",\\\"leftharpoondown\\\":\\\"↽\\\",\\\"leftharpoonup\\\":\\\"↼\\\",\\\"leftleftarrows\\\":\\\"⇇\\\",\\\"leftrightarrow\\\":\\\"↔\\\",\\\"LeftRightArrow\\\":\\\"↔\\\",\\\"Leftrightarrow\\\":\\\"⇔\\\",\\\"leftrightarrows\\\":\\\"⇆\\\",\\\"leftrightharpoons\\\":\\\"⇋\\\",\\\"leftrightsquigarrow\\\":\\\"↭\\\",\\\"LeftRightVector\\\":\\\"⥎\\\",\\\"LeftTeeArrow\\\":\\\"↤\\\",\\\"LeftTee\\\":\\\"⊣\\\",\\\"LeftTeeVector\\\":\\\"⥚\\\",\\\"leftthreetimes\\\":\\\"⋋\\\",\\\"LeftTriangleBar\\\":\\\"⧏\\\",\\\"LeftTriangle\\\":\\\"⊲\\\",\\\"LeftTriangleEqual\\\":\\\"⊴\\\",\\\"LeftUpDownVector\\\":\\\"⥑\\\",\\\"LeftUpTeeVector\\\":\\\"⥠\\\",\\\"LeftUpVectorBar\\\":\\\"⥘\\\",\\\"LeftUpVector\\\":\\\"↿\\\",\\\"LeftVectorBar\\\":\\\"⥒\\\",\\\"LeftVector\\\":\\\"↼\\\",\\\"lEg\\\":\\\"⪋\\\",\\\"leg\\\":\\\"⋚\\\",\\\"leq\\\":\\\"≤\\\",\\\"leqq\\\":\\\"≦\\\",\\\"leqslant\\\":\\\"⩽\\\",\\\"lescc\\\":\\\"⪨\\\",\\\"les\\\":\\\"⩽\\\",\\\"lesdot\\\":\\\"⩿\\\",\\\"lesdoto\\\":\\\"⪁\\\",\\\"lesdotor\\\":\\\"⪃\\\",\\\"lesg\\\":\\\"⋚︀\\\",\\\"lesges\\\":\\\"⪓\\\",\\\"lessapprox\\\":\\\"⪅\\\",\\\"lessdot\\\":\\\"⋖\\\",\\\"lesseqgtr\\\":\\\"⋚\\\",\\\"lesseqqgtr\\\":\\\"⪋\\\",\\\"LessEqualGreater\\\":\\\"⋚\\\",\\\"LessFullEqual\\\":\\\"≦\\\",\\\"LessGreater\\\":\\\"≶\\\",\\\"lessgtr\\\":\\\"≶\\\",\\\"LessLess\\\":\\\"⪡\\\",\\\"lesssim\\\":\\\"≲\\\",\\\"LessSlantEqual\\\":\\\"⩽\\\",\\\"LessTilde\\\":\\\"≲\\\",\\\"lfisht\\\":\\\"⥼\\\",\\\"lfloor\\\":\\\"⌊\\\",\\\"Lfr\\\":\\\"𝔏\\\",\\\"lfr\\\":\\\"𝔩\\\",\\\"lg\\\":\\\"≶\\\",\\\"lgE\\\":\\\"⪑\\\",\\\"lHar\\\":\\\"⥢\\\",\\\"lhard\\\":\\\"↽\\\",\\\"lharu\\\":\\\"↼\\\",\\\"lharul\\\":\\\"⥪\\\",\\\"lhblk\\\":\\\"▄\\\",\\\"LJcy\\\":\\\"Љ\\\",\\\"ljcy\\\":\\\"љ\\\",\\\"llarr\\\":\\\"⇇\\\",\\\"ll\\\":\\\"≪\\\",\\\"Ll\\\":\\\"⋘\\\",\\\"llcorner\\\":\\\"⌞\\\",\\\"Lleftarrow\\\":\\\"⇚\\\",\\\"llhard\\\":\\\"⥫\\\",\\\"lltri\\\":\\\"◺\\\",\\\"Lmidot\\\":\\\"Ŀ\\\",\\\"lmidot\\\":\\\"ŀ\\\",\\\"lmoustache\\\":\\\"⎰\\\",\\\"lmoust\\\":\\\"⎰\\\",\\\"lnap\\\":\\\"⪉\\\",\\\"lnapprox\\\":\\\"⪉\\\",\\\"lne\\\":\\\"⪇\\\",\\\"lnE\\\":\\\"≨\\\",\\\"lneq\\\":\\\"⪇\\\",\\\"lneqq\\\":\\\"≨\\\",\\\"lnsim\\\":\\\"⋦\\\",\\\"loang\\\":\\\"⟬\\\",\\\"loarr\\\":\\\"⇽\\\",\\\"lobrk\\\":\\\"⟦\\\",\\\"longleftarrow\\\":\\\"⟵\\\",\\\"LongLeftArrow\\\":\\\"⟵\\\",\\\"Longleftarrow\\\":\\\"⟸\\\",\\\"longleftrightarrow\\\":\\\"⟷\\\",\\\"LongLeftRightArrow\\\":\\\"⟷\\\",\\\"Longleftrightarrow\\\":\\\"⟺\\\",\\\"longmapsto\\\":\\\"⟼\\\",\\\"longrightarrow\\\":\\\"⟶\\\",\\\"LongRightArrow\\\":\\\"⟶\\\",\\\"Longrightarrow\\\":\\\"⟹\\\",\\\"looparrowleft\\\":\\\"↫\\\",\\\"looparrowright\\\":\\\"↬\\\",\\\"lopar\\\":\\\"⦅\\\",\\\"Lopf\\\":\\\"𝕃\\\",\\\"lopf\\\":\\\"𝕝\\\",\\\"loplus\\\":\\\"⨭\\\",\\\"lotimes\\\":\\\"⨴\\\",\\\"lowast\\\":\\\"∗\\\",\\\"lowbar\\\":\\\"_\\\",\\\"LowerLeftArrow\\\":\\\"↙\\\",\\\"LowerRightArrow\\\":\\\"↘\\\",\\\"loz\\\":\\\"◊\\\",\\\"lozenge\\\":\\\"◊\\\",\\\"lozf\\\":\\\"⧫\\\",\\\"lpar\\\":\\\"(\\\",\\\"lparlt\\\":\\\"⦓\\\",\\\"lrarr\\\":\\\"⇆\\\",\\\"lrcorner\\\":\\\"⌟\\\",\\\"lrhar\\\":\\\"⇋\\\",\\\"lrhard\\\":\\\"⥭\\\",\\\"lrm\\\":\\\"‎\\\",\\\"lrtri\\\":\\\"⊿\\\",\\\"lsaquo\\\":\\\"‹\\\",\\\"lscr\\\":\\\"𝓁\\\",\\\"Lscr\\\":\\\"ℒ\\\",\\\"lsh\\\":\\\"↰\\\",\\\"Lsh\\\":\\\"↰\\\",\\\"lsim\\\":\\\"≲\\\",\\\"lsime\\\":\\\"⪍\\\",\\\"lsimg\\\":\\\"⪏\\\",\\\"lsqb\\\":\\\"[\\\",\\\"lsquo\\\":\\\"‘\\\",\\\"lsquor\\\":\\\"‚\\\",\\\"Lstrok\\\":\\\"Ł\\\",\\\"lstrok\\\":\\\"ł\\\",\\\"ltcc\\\":\\\"⪦\\\",\\\"ltcir\\\":\\\"⩹\\\",\\\"lt\\\":\\\"<\\\",\\\"LT\\\":\\\"<\\\",\\\"Lt\\\":\\\"≪\\\",\\\"ltdot\\\":\\\"⋖\\\",\\\"lthree\\\":\\\"⋋\\\",\\\"ltimes\\\":\\\"⋉\\\",\\\"ltlarr\\\":\\\"⥶\\\",\\\"ltquest\\\":\\\"⩻\\\",\\\"ltri\\\":\\\"◃\\\",\\\"ltrie\\\":\\\"⊴\\\",\\\"ltrif\\\":\\\"◂\\\",\\\"ltrPar\\\":\\\"⦖\\\",\\\"lurdshar\\\":\\\"⥊\\\",\\\"luruhar\\\":\\\"⥦\\\",\\\"lvertneqq\\\":\\\"≨︀\\\",\\\"lvnE\\\":\\\"≨︀\\\",\\\"macr\\\":\\\"¯\\\",\\\"male\\\":\\\"♂\\\",\\\"malt\\\":\\\"✠\\\",\\\"maltese\\\":\\\"✠\\\",\\\"Map\\\":\\\"⤅\\\",\\\"map\\\":\\\"↦\\\",\\\"mapsto\\\":\\\"↦\\\",\\\"mapstodown\\\":\\\"↧\\\",\\\"mapstoleft\\\":\\\"↤\\\",\\\"mapstoup\\\":\\\"↥\\\",\\\"marker\\\":\\\"▮\\\",\\\"mcomma\\\":\\\"⨩\\\",\\\"Mcy\\\":\\\"М\\\",\\\"mcy\\\":\\\"м\\\",\\\"mdash\\\":\\\"—\\\",\\\"mDDot\\\":\\\"∺\\\",\\\"measuredangle\\\":\\\"∡\\\",\\\"MediumSpace\\\":\\\" \\\",\\\"Mellintrf\\\":\\\"ℳ\\\",\\\"Mfr\\\":\\\"𝔐\\\",\\\"mfr\\\":\\\"𝔪\\\",\\\"mho\\\":\\\"℧\\\",\\\"micro\\\":\\\"µ\\\",\\\"midast\\\":\\\"*\\\",\\\"midcir\\\":\\\"⫰\\\",\\\"mid\\\":\\\"∣\\\",\\\"middot\\\":\\\"·\\\",\\\"minusb\\\":\\\"⊟\\\",\\\"minus\\\":\\\"−\\\",\\\"minusd\\\":\\\"∸\\\",\\\"minusdu\\\":\\\"⨪\\\",\\\"MinusPlus\\\":\\\"∓\\\",\\\"mlcp\\\":\\\"⫛\\\",\\\"mldr\\\":\\\"…\\\",\\\"mnplus\\\":\\\"∓\\\",\\\"models\\\":\\\"⊧\\\",\\\"Mopf\\\":\\\"𝕄\\\",\\\"mopf\\\":\\\"𝕞\\\",\\\"mp\\\":\\\"∓\\\",\\\"mscr\\\":\\\"𝓂\\\",\\\"Mscr\\\":\\\"ℳ\\\",\\\"mstpos\\\":\\\"∾\\\",\\\"Mu\\\":\\\"Μ\\\",\\\"mu\\\":\\\"μ\\\",\\\"multimap\\\":\\\"⊸\\\",\\\"mumap\\\":\\\"⊸\\\",\\\"nabla\\\":\\\"∇\\\",\\\"Nacute\\\":\\\"Ń\\\",\\\"nacute\\\":\\\"ń\\\",\\\"nang\\\":\\\"∠⃒\\\",\\\"nap\\\":\\\"≉\\\",\\\"napE\\\":\\\"⩰̸\\\",\\\"napid\\\":\\\"≋̸\\\",\\\"napos\\\":\\\"ʼn\\\",\\\"napprox\\\":\\\"≉\\\",\\\"natural\\\":\\\"♮\\\",\\\"naturals\\\":\\\"ℕ\\\",\\\"natur\\\":\\\"♮\\\",\\\"nbsp\\\":\\\" \\\",\\\"nbump\\\":\\\"≎̸\\\",\\\"nbumpe\\\":\\\"≏̸\\\",\\\"ncap\\\":\\\"⩃\\\",\\\"Ncaron\\\":\\\"Ň\\\",\\\"ncaron\\\":\\\"ň\\\",\\\"Ncedil\\\":\\\"Ņ\\\",\\\"ncedil\\\":\\\"ņ\\\",\\\"ncong\\\":\\\"≇\\\",\\\"ncongdot\\\":\\\"⩭̸\\\",\\\"ncup\\\":\\\"⩂\\\",\\\"Ncy\\\":\\\"Н\\\",\\\"ncy\\\":\\\"н\\\",\\\"ndash\\\":\\\"–\\\",\\\"nearhk\\\":\\\"⤤\\\",\\\"nearr\\\":\\\"↗\\\",\\\"neArr\\\":\\\"⇗\\\",\\\"nearrow\\\":\\\"↗\\\",\\\"ne\\\":\\\"≠\\\",\\\"nedot\\\":\\\"≐̸\\\",\\\"NegativeMediumSpace\\\":\\\"​\\\",\\\"NegativeThickSpace\\\":\\\"​\\\",\\\"NegativeThinSpace\\\":\\\"​\\\",\\\"NegativeVeryThinSpace\\\":\\\"​\\\",\\\"nequiv\\\":\\\"≢\\\",\\\"nesear\\\":\\\"⤨\\\",\\\"nesim\\\":\\\"≂̸\\\",\\\"NestedGreaterGreater\\\":\\\"≫\\\",\\\"NestedLessLess\\\":\\\"≪\\\",\\\"NewLine\\\":\\\"\\\\n\\\",\\\"nexist\\\":\\\"∄\\\",\\\"nexists\\\":\\\"∄\\\",\\\"Nfr\\\":\\\"𝔑\\\",\\\"nfr\\\":\\\"𝔫\\\",\\\"ngE\\\":\\\"≧̸\\\",\\\"nge\\\":\\\"≱\\\",\\\"ngeq\\\":\\\"≱\\\",\\\"ngeqq\\\":\\\"≧̸\\\",\\\"ngeqslant\\\":\\\"⩾̸\\\",\\\"nges\\\":\\\"⩾̸\\\",\\\"nGg\\\":\\\"⋙̸\\\",\\\"ngsim\\\":\\\"≵\\\",\\\"nGt\\\":\\\"≫⃒\\\",\\\"ngt\\\":\\\"≯\\\",\\\"ngtr\\\":\\\"≯\\\",\\\"nGtv\\\":\\\"≫̸\\\",\\\"nharr\\\":\\\"↮\\\",\\\"nhArr\\\":\\\"⇎\\\",\\\"nhpar\\\":\\\"⫲\\\",\\\"ni\\\":\\\"∋\\\",\\\"nis\\\":\\\"⋼\\\",\\\"nisd\\\":\\\"⋺\\\",\\\"niv\\\":\\\"∋\\\",\\\"NJcy\\\":\\\"Њ\\\",\\\"njcy\\\":\\\"њ\\\",\\\"nlarr\\\":\\\"↚\\\",\\\"nlArr\\\":\\\"⇍\\\",\\\"nldr\\\":\\\"‥\\\",\\\"nlE\\\":\\\"≦̸\\\",\\\"nle\\\":\\\"≰\\\",\\\"nleftarrow\\\":\\\"↚\\\",\\\"nLeftarrow\\\":\\\"⇍\\\",\\\"nleftrightarrow\\\":\\\"↮\\\",\\\"nLeftrightarrow\\\":\\\"⇎\\\",\\\"nleq\\\":\\\"≰\\\",\\\"nleqq\\\":\\\"≦̸\\\",\\\"nleqslant\\\":\\\"⩽̸\\\",\\\"nles\\\":\\\"⩽̸\\\",\\\"nless\\\":\\\"≮\\\",\\\"nLl\\\":\\\"⋘̸\\\",\\\"nlsim\\\":\\\"≴\\\",\\\"nLt\\\":\\\"≪⃒\\\",\\\"nlt\\\":\\\"≮\\\",\\\"nltri\\\":\\\"⋪\\\",\\\"nltrie\\\":\\\"⋬\\\",\\\"nLtv\\\":\\\"≪̸\\\",\\\"nmid\\\":\\\"∤\\\",\\\"NoBreak\\\":\\\"⁠\\\",\\\"NonBreakingSpace\\\":\\\" \\\",\\\"nopf\\\":\\\"𝕟\\\",\\\"Nopf\\\":\\\"ℕ\\\",\\\"Not\\\":\\\"⫬\\\",\\\"not\\\":\\\"¬\\\",\\\"NotCongruent\\\":\\\"≢\\\",\\\"NotCupCap\\\":\\\"≭\\\",\\\"NotDoubleVerticalBar\\\":\\\"∦\\\",\\\"NotElement\\\":\\\"∉\\\",\\\"NotEqual\\\":\\\"≠\\\",\\\"NotEqualTilde\\\":\\\"≂̸\\\",\\\"NotExists\\\":\\\"∄\\\",\\\"NotGreater\\\":\\\"≯\\\",\\\"NotGreaterEqual\\\":\\\"≱\\\",\\\"NotGreaterFullEqual\\\":\\\"≧̸\\\",\\\"NotGreaterGreater\\\":\\\"≫̸\\\",\\\"NotGreaterLess\\\":\\\"≹\\\",\\\"NotGreaterSlantEqual\\\":\\\"⩾̸\\\",\\\"NotGreaterTilde\\\":\\\"≵\\\",\\\"NotHumpDownHump\\\":\\\"≎̸\\\",\\\"NotHumpEqual\\\":\\\"≏̸\\\",\\\"notin\\\":\\\"∉\\\",\\\"notindot\\\":\\\"⋵̸\\\",\\\"notinE\\\":\\\"⋹̸\\\",\\\"notinva\\\":\\\"∉\\\",\\\"notinvb\\\":\\\"⋷\\\",\\\"notinvc\\\":\\\"⋶\\\",\\\"NotLeftTriangleBar\\\":\\\"⧏̸\\\",\\\"NotLeftTriangle\\\":\\\"⋪\\\",\\\"NotLeftTriangleEqual\\\":\\\"⋬\\\",\\\"NotLess\\\":\\\"≮\\\",\\\"NotLessEqual\\\":\\\"≰\\\",\\\"NotLessGreater\\\":\\\"≸\\\",\\\"NotLessLess\\\":\\\"≪̸\\\",\\\"NotLessSlantEqual\\\":\\\"⩽̸\\\",\\\"NotLessTilde\\\":\\\"≴\\\",\\\"NotNestedGreaterGreater\\\":\\\"⪢̸\\\",\\\"NotNestedLessLess\\\":\\\"⪡̸\\\",\\\"notni\\\":\\\"∌\\\",\\\"notniva\\\":\\\"∌\\\",\\\"notnivb\\\":\\\"⋾\\\",\\\"notnivc\\\":\\\"⋽\\\",\\\"NotPrecedes\\\":\\\"⊀\\\",\\\"NotPrecedesEqual\\\":\\\"⪯̸\\\",\\\"NotPrecedesSlantEqual\\\":\\\"⋠\\\",\\\"NotReverseElement\\\":\\\"∌\\\",\\\"NotRightTriangleBar\\\":\\\"⧐̸\\\",\\\"NotRightTriangle\\\":\\\"⋫\\\",\\\"NotRightTriangleEqual\\\":\\\"⋭\\\",\\\"NotSquareSubset\\\":\\\"⊏̸\\\",\\\"NotSquareSubsetEqual\\\":\\\"⋢\\\",\\\"NotSquareSuperset\\\":\\\"⊐̸\\\",\\\"NotSquareSupersetEqual\\\":\\\"⋣\\\",\\\"NotSubset\\\":\\\"⊂⃒\\\",\\\"NotSubsetEqual\\\":\\\"⊈\\\",\\\"NotSucceeds\\\":\\\"⊁\\\",\\\"NotSucceedsEqual\\\":\\\"⪰̸\\\",\\\"NotSucceedsSlantEqual\\\":\\\"⋡\\\",\\\"NotSucceedsTilde\\\":\\\"≿̸\\\",\\\"NotSuperset\\\":\\\"⊃⃒\\\",\\\"NotSupersetEqual\\\":\\\"⊉\\\",\\\"NotTilde\\\":\\\"≁\\\",\\\"NotTildeEqual\\\":\\\"≄\\\",\\\"NotTildeFullEqual\\\":\\\"≇\\\",\\\"NotTildeTilde\\\":\\\"≉\\\",\\\"NotVerticalBar\\\":\\\"∤\\\",\\\"nparallel\\\":\\\"∦\\\",\\\"npar\\\":\\\"∦\\\",\\\"nparsl\\\":\\\"⫽⃥\\\",\\\"npart\\\":\\\"∂̸\\\",\\\"npolint\\\":\\\"⨔\\\",\\\"npr\\\":\\\"⊀\\\",\\\"nprcue\\\":\\\"⋠\\\",\\\"nprec\\\":\\\"⊀\\\",\\\"npreceq\\\":\\\"⪯̸\\\",\\\"npre\\\":\\\"⪯̸\\\",\\\"nrarrc\\\":\\\"⤳̸\\\",\\\"nrarr\\\":\\\"↛\\\",\\\"nrArr\\\":\\\"⇏\\\",\\\"nrarrw\\\":\\\"↝̸\\\",\\\"nrightarrow\\\":\\\"↛\\\",\\\"nRightarrow\\\":\\\"⇏\\\",\\\"nrtri\\\":\\\"⋫\\\",\\\"nrtrie\\\":\\\"⋭\\\",\\\"nsc\\\":\\\"⊁\\\",\\\"nsccue\\\":\\\"⋡\\\",\\\"nsce\\\":\\\"⪰̸\\\",\\\"Nscr\\\":\\\"𝒩\\\",\\\"nscr\\\":\\\"𝓃\\\",\\\"nshortmid\\\":\\\"∤\\\",\\\"nshortparallel\\\":\\\"∦\\\",\\\"nsim\\\":\\\"≁\\\",\\\"nsime\\\":\\\"≄\\\",\\\"nsimeq\\\":\\\"≄\\\",\\\"nsmid\\\":\\\"∤\\\",\\\"nspar\\\":\\\"∦\\\",\\\"nsqsube\\\":\\\"⋢\\\",\\\"nsqsupe\\\":\\\"⋣\\\",\\\"nsub\\\":\\\"⊄\\\",\\\"nsubE\\\":\\\"⫅̸\\\",\\\"nsube\\\":\\\"⊈\\\",\\\"nsubset\\\":\\\"⊂⃒\\\",\\\"nsubseteq\\\":\\\"⊈\\\",\\\"nsubseteqq\\\":\\\"⫅̸\\\",\\\"nsucc\\\":\\\"⊁\\\",\\\"nsucceq\\\":\\\"⪰̸\\\",\\\"nsup\\\":\\\"⊅\\\",\\\"nsupE\\\":\\\"⫆̸\\\",\\\"nsupe\\\":\\\"⊉\\\",\\\"nsupset\\\":\\\"⊃⃒\\\",\\\"nsupseteq\\\":\\\"⊉\\\",\\\"nsupseteqq\\\":\\\"⫆̸\\\",\\\"ntgl\\\":\\\"≹\\\",\\\"Ntilde\\\":\\\"Ñ\\\",\\\"ntilde\\\":\\\"ñ\\\",\\\"ntlg\\\":\\\"≸\\\",\\\"ntriangleleft\\\":\\\"⋪\\\",\\\"ntrianglelefteq\\\":\\\"⋬\\\",\\\"ntriangleright\\\":\\\"⋫\\\",\\\"ntrianglerighteq\\\":\\\"⋭\\\",\\\"Nu\\\":\\\"Ν\\\",\\\"nu\\\":\\\"ν\\\",\\\"num\\\":\\\"#\\\",\\\"numero\\\":\\\"№\\\",\\\"numsp\\\":\\\" \\\",\\\"nvap\\\":\\\"≍⃒\\\",\\\"nvdash\\\":\\\"⊬\\\",\\\"nvDash\\\":\\\"⊭\\\",\\\"nVdash\\\":\\\"⊮\\\",\\\"nVDash\\\":\\\"⊯\\\",\\\"nvge\\\":\\\"≥⃒\\\",\\\"nvgt\\\":\\\">⃒\\\",\\\"nvHarr\\\":\\\"⤄\\\",\\\"nvinfin\\\":\\\"⧞\\\",\\\"nvlArr\\\":\\\"⤂\\\",\\\"nvle\\\":\\\"≤⃒\\\",\\\"nvlt\\\":\\\"<⃒\\\",\\\"nvltrie\\\":\\\"⊴⃒\\\",\\\"nvrArr\\\":\\\"⤃\\\",\\\"nvrtrie\\\":\\\"⊵⃒\\\",\\\"nvsim\\\":\\\"∼⃒\\\",\\\"nwarhk\\\":\\\"⤣\\\",\\\"nwarr\\\":\\\"↖\\\",\\\"nwArr\\\":\\\"⇖\\\",\\\"nwarrow\\\":\\\"↖\\\",\\\"nwnear\\\":\\\"⤧\\\",\\\"Oacute\\\":\\\"Ó\\\",\\\"oacute\\\":\\\"ó\\\",\\\"oast\\\":\\\"⊛\\\",\\\"Ocirc\\\":\\\"Ô\\\",\\\"ocirc\\\":\\\"ô\\\",\\\"ocir\\\":\\\"⊚\\\",\\\"Ocy\\\":\\\"О\\\",\\\"ocy\\\":\\\"о\\\",\\\"odash\\\":\\\"⊝\\\",\\\"Odblac\\\":\\\"Ő\\\",\\\"odblac\\\":\\\"ő\\\",\\\"odiv\\\":\\\"⨸\\\",\\\"odot\\\":\\\"⊙\\\",\\\"odsold\\\":\\\"⦼\\\",\\\"OElig\\\":\\\"Œ\\\",\\\"oelig\\\":\\\"œ\\\",\\\"ofcir\\\":\\\"⦿\\\",\\\"Ofr\\\":\\\"𝔒\\\",\\\"ofr\\\":\\\"𝔬\\\",\\\"ogon\\\":\\\"˛\\\",\\\"Ograve\\\":\\\"Ò\\\",\\\"ograve\\\":\\\"ò\\\",\\\"ogt\\\":\\\"⧁\\\",\\\"ohbar\\\":\\\"⦵\\\",\\\"ohm\\\":\\\"Ω\\\",\\\"oint\\\":\\\"∮\\\",\\\"olarr\\\":\\\"↺\\\",\\\"olcir\\\":\\\"⦾\\\",\\\"olcross\\\":\\\"⦻\\\",\\\"oline\\\":\\\"‾\\\",\\\"olt\\\":\\\"⧀\\\",\\\"Omacr\\\":\\\"Ō\\\",\\\"omacr\\\":\\\"ō\\\",\\\"Omega\\\":\\\"Ω\\\",\\\"omega\\\":\\\"ω\\\",\\\"Omicron\\\":\\\"Ο\\\",\\\"omicron\\\":\\\"ο\\\",\\\"omid\\\":\\\"⦶\\\",\\\"ominus\\\":\\\"⊖\\\",\\\"Oopf\\\":\\\"𝕆\\\",\\\"oopf\\\":\\\"𝕠\\\",\\\"opar\\\":\\\"⦷\\\",\\\"OpenCurlyDoubleQuote\\\":\\\"“\\\",\\\"OpenCurlyQuote\\\":\\\"‘\\\",\\\"operp\\\":\\\"⦹\\\",\\\"oplus\\\":\\\"⊕\\\",\\\"orarr\\\":\\\"↻\\\",\\\"Or\\\":\\\"⩔\\\",\\\"or\\\":\\\"∨\\\",\\\"ord\\\":\\\"⩝\\\",\\\"order\\\":\\\"ℴ\\\",\\\"orderof\\\":\\\"ℴ\\\",\\\"ordf\\\":\\\"ª\\\",\\\"ordm\\\":\\\"º\\\",\\\"origof\\\":\\\"⊶\\\",\\\"oror\\\":\\\"⩖\\\",\\\"orslope\\\":\\\"⩗\\\",\\\"orv\\\":\\\"⩛\\\",\\\"oS\\\":\\\"Ⓢ\\\",\\\"Oscr\\\":\\\"𝒪\\\",\\\"oscr\\\":\\\"ℴ\\\",\\\"Oslash\\\":\\\"Ø\\\",\\\"oslash\\\":\\\"ø\\\",\\\"osol\\\":\\\"⊘\\\",\\\"Otilde\\\":\\\"Õ\\\",\\\"otilde\\\":\\\"õ\\\",\\\"otimesas\\\":\\\"⨶\\\",\\\"Otimes\\\":\\\"⨷\\\",\\\"otimes\\\":\\\"⊗\\\",\\\"Ouml\\\":\\\"Ö\\\",\\\"ouml\\\":\\\"ö\\\",\\\"ovbar\\\":\\\"⌽\\\",\\\"OverBar\\\":\\\"‾\\\",\\\"OverBrace\\\":\\\"⏞\\\",\\\"OverBracket\\\":\\\"⎴\\\",\\\"OverParenthesis\\\":\\\"⏜\\\",\\\"para\\\":\\\"¶\\\",\\\"parallel\\\":\\\"∥\\\",\\\"par\\\":\\\"∥\\\",\\\"parsim\\\":\\\"⫳\\\",\\\"parsl\\\":\\\"⫽\\\",\\\"part\\\":\\\"∂\\\",\\\"PartialD\\\":\\\"∂\\\",\\\"Pcy\\\":\\\"П\\\",\\\"pcy\\\":\\\"п\\\",\\\"percnt\\\":\\\"%\\\",\\\"period\\\":\\\".\\\",\\\"permil\\\":\\\"‰\\\",\\\"perp\\\":\\\"⊥\\\",\\\"pertenk\\\":\\\"‱\\\",\\\"Pfr\\\":\\\"𝔓\\\",\\\"pfr\\\":\\\"𝔭\\\",\\\"Phi\\\":\\\"Φ\\\",\\\"phi\\\":\\\"φ\\\",\\\"phiv\\\":\\\"ϕ\\\",\\\"phmmat\\\":\\\"ℳ\\\",\\\"phone\\\":\\\"☎\\\",\\\"Pi\\\":\\\"Π\\\",\\\"pi\\\":\\\"π\\\",\\\"pitchfork\\\":\\\"⋔\\\",\\\"piv\\\":\\\"ϖ\\\",\\\"planck\\\":\\\"ℏ\\\",\\\"planckh\\\":\\\"ℎ\\\",\\\"plankv\\\":\\\"ℏ\\\",\\\"plusacir\\\":\\\"⨣\\\",\\\"plusb\\\":\\\"⊞\\\",\\\"pluscir\\\":\\\"⨢\\\",\\\"plus\\\":\\\"+\\\",\\\"plusdo\\\":\\\"∔\\\",\\\"plusdu\\\":\\\"⨥\\\",\\\"pluse\\\":\\\"⩲\\\",\\\"PlusMinus\\\":\\\"±\\\",\\\"plusmn\\\":\\\"±\\\",\\\"plussim\\\":\\\"⨦\\\",\\\"plustwo\\\":\\\"⨧\\\",\\\"pm\\\":\\\"±\\\",\\\"Poincareplane\\\":\\\"ℌ\\\",\\\"pointint\\\":\\\"⨕\\\",\\\"popf\\\":\\\"𝕡\\\",\\\"Popf\\\":\\\"ℙ\\\",\\\"pound\\\":\\\"£\\\",\\\"prap\\\":\\\"⪷\\\",\\\"Pr\\\":\\\"⪻\\\",\\\"pr\\\":\\\"≺\\\",\\\"prcue\\\":\\\"≼\\\",\\\"precapprox\\\":\\\"⪷\\\",\\\"prec\\\":\\\"≺\\\",\\\"preccurlyeq\\\":\\\"≼\\\",\\\"Precedes\\\":\\\"≺\\\",\\\"PrecedesEqual\\\":\\\"⪯\\\",\\\"PrecedesSlantEqual\\\":\\\"≼\\\",\\\"PrecedesTilde\\\":\\\"≾\\\",\\\"preceq\\\":\\\"⪯\\\",\\\"precnapprox\\\":\\\"⪹\\\",\\\"precneqq\\\":\\\"⪵\\\",\\\"precnsim\\\":\\\"⋨\\\",\\\"pre\\\":\\\"⪯\\\",\\\"prE\\\":\\\"⪳\\\",\\\"precsim\\\":\\\"≾\\\",\\\"prime\\\":\\\"′\\\",\\\"Prime\\\":\\\"″\\\",\\\"primes\\\":\\\"ℙ\\\",\\\"prnap\\\":\\\"⪹\\\",\\\"prnE\\\":\\\"⪵\\\",\\\"prnsim\\\":\\\"⋨\\\",\\\"prod\\\":\\\"∏\\\",\\\"Product\\\":\\\"∏\\\",\\\"profalar\\\":\\\"⌮\\\",\\\"profline\\\":\\\"⌒\\\",\\\"profsurf\\\":\\\"⌓\\\",\\\"prop\\\":\\\"∝\\\",\\\"Proportional\\\":\\\"∝\\\",\\\"Proportion\\\":\\\"∷\\\",\\\"propto\\\":\\\"∝\\\",\\\"prsim\\\":\\\"≾\\\",\\\"prurel\\\":\\\"⊰\\\",\\\"Pscr\\\":\\\"𝒫\\\",\\\"pscr\\\":\\\"𝓅\\\",\\\"Psi\\\":\\\"Ψ\\\",\\\"psi\\\":\\\"ψ\\\",\\\"puncsp\\\":\\\" \\\",\\\"Qfr\\\":\\\"𝔔\\\",\\\"qfr\\\":\\\"𝔮\\\",\\\"qint\\\":\\\"⨌\\\",\\\"qopf\\\":\\\"𝕢\\\",\\\"Qopf\\\":\\\"ℚ\\\",\\\"qprime\\\":\\\"⁗\\\",\\\"Qscr\\\":\\\"𝒬\\\",\\\"qscr\\\":\\\"𝓆\\\",\\\"quaternions\\\":\\\"ℍ\\\",\\\"quatint\\\":\\\"⨖\\\",\\\"quest\\\":\\\"?\\\",\\\"questeq\\\":\\\"≟\\\",\\\"quot\\\":\\\"\\\\\\\"\\\",\\\"QUOT\\\":\\\"\\\\\\\"\\\",\\\"rAarr\\\":\\\"⇛\\\",\\\"race\\\":\\\"∽̱\\\",\\\"Racute\\\":\\\"Ŕ\\\",\\\"racute\\\":\\\"ŕ\\\",\\\"radic\\\":\\\"√\\\",\\\"raemptyv\\\":\\\"⦳\\\",\\\"rang\\\":\\\"⟩\\\",\\\"Rang\\\":\\\"⟫\\\",\\\"rangd\\\":\\\"⦒\\\",\\\"range\\\":\\\"⦥\\\",\\\"rangle\\\":\\\"⟩\\\",\\\"raquo\\\":\\\"»\\\",\\\"rarrap\\\":\\\"⥵\\\",\\\"rarrb\\\":\\\"⇥\\\",\\\"rarrbfs\\\":\\\"⤠\\\",\\\"rarrc\\\":\\\"⤳\\\",\\\"rarr\\\":\\\"→\\\",\\\"Rarr\\\":\\\"↠\\\",\\\"rArr\\\":\\\"⇒\\\",\\\"rarrfs\\\":\\\"⤞\\\",\\\"rarrhk\\\":\\\"↪\\\",\\\"rarrlp\\\":\\\"↬\\\",\\\"rarrpl\\\":\\\"⥅\\\",\\\"rarrsim\\\":\\\"⥴\\\",\\\"Rarrtl\\\":\\\"⤖\\\",\\\"rarrtl\\\":\\\"↣\\\",\\\"rarrw\\\":\\\"↝\\\",\\\"ratail\\\":\\\"⤚\\\",\\\"rAtail\\\":\\\"⤜\\\",\\\"ratio\\\":\\\"∶\\\",\\\"rationals\\\":\\\"ℚ\\\",\\\"rbarr\\\":\\\"⤍\\\",\\\"rBarr\\\":\\\"⤏\\\",\\\"RBarr\\\":\\\"⤐\\\",\\\"rbbrk\\\":\\\"❳\\\",\\\"rbrace\\\":\\\"}\\\",\\\"rbrack\\\":\\\"]\\\",\\\"rbrke\\\":\\\"⦌\\\",\\\"rbrksld\\\":\\\"⦎\\\",\\\"rbrkslu\\\":\\\"⦐\\\",\\\"Rcaron\\\":\\\"Ř\\\",\\\"rcaron\\\":\\\"ř\\\",\\\"Rcedil\\\":\\\"Ŗ\\\",\\\"rcedil\\\":\\\"ŗ\\\",\\\"rceil\\\":\\\"⌉\\\",\\\"rcub\\\":\\\"}\\\",\\\"Rcy\\\":\\\"Р\\\",\\\"rcy\\\":\\\"р\\\",\\\"rdca\\\":\\\"⤷\\\",\\\"rdldhar\\\":\\\"⥩\\\",\\\"rdquo\\\":\\\"”\\\",\\\"rdquor\\\":\\\"”\\\",\\\"rdsh\\\":\\\"↳\\\",\\\"real\\\":\\\"ℜ\\\",\\\"realine\\\":\\\"ℛ\\\",\\\"realpart\\\":\\\"ℜ\\\",\\\"reals\\\":\\\"ℝ\\\",\\\"Re\\\":\\\"ℜ\\\",\\\"rect\\\":\\\"▭\\\",\\\"reg\\\":\\\"®\\\",\\\"REG\\\":\\\"®\\\",\\\"ReverseElement\\\":\\\"∋\\\",\\\"ReverseEquilibrium\\\":\\\"⇋\\\",\\\"ReverseUpEquilibrium\\\":\\\"⥯\\\",\\\"rfisht\\\":\\\"⥽\\\",\\\"rfloor\\\":\\\"⌋\\\",\\\"rfr\\\":\\\"𝔯\\\",\\\"Rfr\\\":\\\"ℜ\\\",\\\"rHar\\\":\\\"⥤\\\",\\\"rhard\\\":\\\"⇁\\\",\\\"rharu\\\":\\\"⇀\\\",\\\"rharul\\\":\\\"⥬\\\",\\\"Rho\\\":\\\"Ρ\\\",\\\"rho\\\":\\\"ρ\\\",\\\"rhov\\\":\\\"ϱ\\\",\\\"RightAngleBracket\\\":\\\"⟩\\\",\\\"RightArrowBar\\\":\\\"⇥\\\",\\\"rightarrow\\\":\\\"→\\\",\\\"RightArrow\\\":\\\"→\\\",\\\"Rightarrow\\\":\\\"⇒\\\",\\\"RightArrowLeftArrow\\\":\\\"⇄\\\",\\\"rightarrowtail\\\":\\\"↣\\\",\\\"RightCeiling\\\":\\\"⌉\\\",\\\"RightDoubleBracket\\\":\\\"⟧\\\",\\\"RightDownTeeVector\\\":\\\"⥝\\\",\\\"RightDownVectorBar\\\":\\\"⥕\\\",\\\"RightDownVector\\\":\\\"⇂\\\",\\\"RightFloor\\\":\\\"⌋\\\",\\\"rightharpoondown\\\":\\\"⇁\\\",\\\"rightharpoonup\\\":\\\"⇀\\\",\\\"rightleftarrows\\\":\\\"⇄\\\",\\\"rightleftharpoons\\\":\\\"⇌\\\",\\\"rightrightarrows\\\":\\\"⇉\\\",\\\"rightsquigarrow\\\":\\\"↝\\\",\\\"RightTeeArrow\\\":\\\"↦\\\",\\\"RightTee\\\":\\\"⊢\\\",\\\"RightTeeVector\\\":\\\"⥛\\\",\\\"rightthreetimes\\\":\\\"⋌\\\",\\\"RightTriangleBar\\\":\\\"⧐\\\",\\\"RightTriangle\\\":\\\"⊳\\\",\\\"RightTriangleEqual\\\":\\\"⊵\\\",\\\"RightUpDownVector\\\":\\\"⥏\\\",\\\"RightUpTeeVector\\\":\\\"⥜\\\",\\\"RightUpVectorBar\\\":\\\"⥔\\\",\\\"RightUpVector\\\":\\\"↾\\\",\\\"RightVectorBar\\\":\\\"⥓\\\",\\\"RightVector\\\":\\\"⇀\\\",\\\"ring\\\":\\\"˚\\\",\\\"risingdotseq\\\":\\\"≓\\\",\\\"rlarr\\\":\\\"⇄\\\",\\\"rlhar\\\":\\\"⇌\\\",\\\"rlm\\\":\\\"‏\\\",\\\"rmoustache\\\":\\\"⎱\\\",\\\"rmoust\\\":\\\"⎱\\\",\\\"rnmid\\\":\\\"⫮\\\",\\\"roang\\\":\\\"⟭\\\",\\\"roarr\\\":\\\"⇾\\\",\\\"robrk\\\":\\\"⟧\\\",\\\"ropar\\\":\\\"⦆\\\",\\\"ropf\\\":\\\"𝕣\\\",\\\"Ropf\\\":\\\"ℝ\\\",\\\"roplus\\\":\\\"⨮\\\",\\\"rotimes\\\":\\\"⨵\\\",\\\"RoundImplies\\\":\\\"⥰\\\",\\\"rpar\\\":\\\")\\\",\\\"rpargt\\\":\\\"⦔\\\",\\\"rppolint\\\":\\\"⨒\\\",\\\"rrarr\\\":\\\"⇉\\\",\\\"Rrightarrow\\\":\\\"⇛\\\",\\\"rsaquo\\\":\\\"›\\\",\\\"rscr\\\":\\\"𝓇\\\",\\\"Rscr\\\":\\\"ℛ\\\",\\\"rsh\\\":\\\"↱\\\",\\\"Rsh\\\":\\\"↱\\\",\\\"rsqb\\\":\\\"]\\\",\\\"rsquo\\\":\\\"’\\\",\\\"rsquor\\\":\\\"’\\\",\\\"rthree\\\":\\\"⋌\\\",\\\"rtimes\\\":\\\"⋊\\\",\\\"rtri\\\":\\\"▹\\\",\\\"rtrie\\\":\\\"⊵\\\",\\\"rtrif\\\":\\\"▸\\\",\\\"rtriltri\\\":\\\"⧎\\\",\\\"RuleDelayed\\\":\\\"⧴\\\",\\\"ruluhar\\\":\\\"⥨\\\",\\\"rx\\\":\\\"℞\\\",\\\"Sacute\\\":\\\"Ś\\\",\\\"sacute\\\":\\\"ś\\\",\\\"sbquo\\\":\\\"‚\\\",\\\"scap\\\":\\\"⪸\\\",\\\"Scaron\\\":\\\"Š\\\",\\\"scaron\\\":\\\"š\\\",\\\"Sc\\\":\\\"⪼\\\",\\\"sc\\\":\\\"≻\\\",\\\"sccue\\\":\\\"≽\\\",\\\"sce\\\":\\\"⪰\\\",\\\"scE\\\":\\\"⪴\\\",\\\"Scedil\\\":\\\"Ş\\\",\\\"scedil\\\":\\\"ş\\\",\\\"Scirc\\\":\\\"Ŝ\\\",\\\"scirc\\\":\\\"ŝ\\\",\\\"scnap\\\":\\\"⪺\\\",\\\"scnE\\\":\\\"⪶\\\",\\\"scnsim\\\":\\\"⋩\\\",\\\"scpolint\\\":\\\"⨓\\\",\\\"scsim\\\":\\\"≿\\\",\\\"Scy\\\":\\\"С\\\",\\\"scy\\\":\\\"с\\\",\\\"sdotb\\\":\\\"⊡\\\",\\\"sdot\\\":\\\"⋅\\\",\\\"sdote\\\":\\\"⩦\\\",\\\"searhk\\\":\\\"⤥\\\",\\\"searr\\\":\\\"↘\\\",\\\"seArr\\\":\\\"⇘\\\",\\\"searrow\\\":\\\"↘\\\",\\\"sect\\\":\\\"§\\\",\\\"semi\\\":\\\";\\\",\\\"seswar\\\":\\\"⤩\\\",\\\"setminus\\\":\\\"∖\\\",\\\"setmn\\\":\\\"∖\\\",\\\"sext\\\":\\\"✶\\\",\\\"Sfr\\\":\\\"𝔖\\\",\\\"sfr\\\":\\\"𝔰\\\",\\\"sfrown\\\":\\\"⌢\\\",\\\"sharp\\\":\\\"♯\\\",\\\"SHCHcy\\\":\\\"Щ\\\",\\\"shchcy\\\":\\\"щ\\\",\\\"SHcy\\\":\\\"Ш\\\",\\\"shcy\\\":\\\"ш\\\",\\\"ShortDownArrow\\\":\\\"↓\\\",\\\"ShortLeftArrow\\\":\\\"←\\\",\\\"shortmid\\\":\\\"∣\\\",\\\"shortparallel\\\":\\\"∥\\\",\\\"ShortRightArrow\\\":\\\"→\\\",\\\"ShortUpArrow\\\":\\\"↑\\\",\\\"shy\\\":\\\"­\\\",\\\"Sigma\\\":\\\"Σ\\\",\\\"sigma\\\":\\\"σ\\\",\\\"sigmaf\\\":\\\"ς\\\",\\\"sigmav\\\":\\\"ς\\\",\\\"sim\\\":\\\"∼\\\",\\\"simdot\\\":\\\"⩪\\\",\\\"sime\\\":\\\"≃\\\",\\\"simeq\\\":\\\"≃\\\",\\\"simg\\\":\\\"⪞\\\",\\\"simgE\\\":\\\"⪠\\\",\\\"siml\\\":\\\"⪝\\\",\\\"simlE\\\":\\\"⪟\\\",\\\"simne\\\":\\\"≆\\\",\\\"simplus\\\":\\\"⨤\\\",\\\"simrarr\\\":\\\"⥲\\\",\\\"slarr\\\":\\\"←\\\",\\\"SmallCircle\\\":\\\"∘\\\",\\\"smallsetminus\\\":\\\"∖\\\",\\\"smashp\\\":\\\"⨳\\\",\\\"smeparsl\\\":\\\"⧤\\\",\\\"smid\\\":\\\"∣\\\",\\\"smile\\\":\\\"⌣\\\",\\\"smt\\\":\\\"⪪\\\",\\\"smte\\\":\\\"⪬\\\",\\\"smtes\\\":\\\"⪬︀\\\",\\\"SOFTcy\\\":\\\"Ь\\\",\\\"softcy\\\":\\\"ь\\\",\\\"solbar\\\":\\\"⌿\\\",\\\"solb\\\":\\\"⧄\\\",\\\"sol\\\":\\\"/\\\",\\\"Sopf\\\":\\\"𝕊\\\",\\\"sopf\\\":\\\"𝕤\\\",\\\"spades\\\":\\\"♠\\\",\\\"spadesuit\\\":\\\"♠\\\",\\\"spar\\\":\\\"∥\\\",\\\"sqcap\\\":\\\"⊓\\\",\\\"sqcaps\\\":\\\"⊓︀\\\",\\\"sqcup\\\":\\\"⊔\\\",\\\"sqcups\\\":\\\"⊔︀\\\",\\\"Sqrt\\\":\\\"√\\\",\\\"sqsub\\\":\\\"⊏\\\",\\\"sqsube\\\":\\\"⊑\\\",\\\"sqsubset\\\":\\\"⊏\\\",\\\"sqsubseteq\\\":\\\"⊑\\\",\\\"sqsup\\\":\\\"⊐\\\",\\\"sqsupe\\\":\\\"⊒\\\",\\\"sqsupset\\\":\\\"⊐\\\",\\\"sqsupseteq\\\":\\\"⊒\\\",\\\"square\\\":\\\"□\\\",\\\"Square\\\":\\\"□\\\",\\\"SquareIntersection\\\":\\\"⊓\\\",\\\"SquareSubset\\\":\\\"⊏\\\",\\\"SquareSubsetEqual\\\":\\\"⊑\\\",\\\"SquareSuperset\\\":\\\"⊐\\\",\\\"SquareSupersetEqual\\\":\\\"⊒\\\",\\\"SquareUnion\\\":\\\"⊔\\\",\\\"squarf\\\":\\\"▪\\\",\\\"squ\\\":\\\"□\\\",\\\"squf\\\":\\\"▪\\\",\\\"srarr\\\":\\\"→\\\",\\\"Sscr\\\":\\\"𝒮\\\",\\\"sscr\\\":\\\"𝓈\\\",\\\"ssetmn\\\":\\\"∖\\\",\\\"ssmile\\\":\\\"⌣\\\",\\\"sstarf\\\":\\\"⋆\\\",\\\"Star\\\":\\\"⋆\\\",\\\"star\\\":\\\"☆\\\",\\\"starf\\\":\\\"★\\\",\\\"straightepsilon\\\":\\\"ϵ\\\",\\\"straightphi\\\":\\\"ϕ\\\",\\\"strns\\\":\\\"¯\\\",\\\"sub\\\":\\\"⊂\\\",\\\"Sub\\\":\\\"⋐\\\",\\\"subdot\\\":\\\"⪽\\\",\\\"subE\\\":\\\"⫅\\\",\\\"sube\\\":\\\"⊆\\\",\\\"subedot\\\":\\\"⫃\\\",\\\"submult\\\":\\\"⫁\\\",\\\"subnE\\\":\\\"⫋\\\",\\\"subne\\\":\\\"⊊\\\",\\\"subplus\\\":\\\"⪿\\\",\\\"subrarr\\\":\\\"⥹\\\",\\\"subset\\\":\\\"⊂\\\",\\\"Subset\\\":\\\"⋐\\\",\\\"subseteq\\\":\\\"⊆\\\",\\\"subseteqq\\\":\\\"⫅\\\",\\\"SubsetEqual\\\":\\\"⊆\\\",\\\"subsetneq\\\":\\\"⊊\\\",\\\"subsetneqq\\\":\\\"⫋\\\",\\\"subsim\\\":\\\"⫇\\\",\\\"subsub\\\":\\\"⫕\\\",\\\"subsup\\\":\\\"⫓\\\",\\\"succapprox\\\":\\\"⪸\\\",\\\"succ\\\":\\\"≻\\\",\\\"succcurlyeq\\\":\\\"≽\\\",\\\"Succeeds\\\":\\\"≻\\\",\\\"SucceedsEqual\\\":\\\"⪰\\\",\\\"SucceedsSlantEqual\\\":\\\"≽\\\",\\\"SucceedsTilde\\\":\\\"≿\\\",\\\"succeq\\\":\\\"⪰\\\",\\\"succnapprox\\\":\\\"⪺\\\",\\\"succneqq\\\":\\\"⪶\\\",\\\"succnsim\\\":\\\"⋩\\\",\\\"succsim\\\":\\\"≿\\\",\\\"SuchThat\\\":\\\"∋\\\",\\\"sum\\\":\\\"∑\\\",\\\"Sum\\\":\\\"∑\\\",\\\"sung\\\":\\\"♪\\\",\\\"sup1\\\":\\\"¹\\\",\\\"sup2\\\":\\\"²\\\",\\\"sup3\\\":\\\"³\\\",\\\"sup\\\":\\\"⊃\\\",\\\"Sup\\\":\\\"⋑\\\",\\\"supdot\\\":\\\"⪾\\\",\\\"supdsub\\\":\\\"⫘\\\",\\\"supE\\\":\\\"⫆\\\",\\\"supe\\\":\\\"⊇\\\",\\\"supedot\\\":\\\"⫄\\\",\\\"Superset\\\":\\\"⊃\\\",\\\"SupersetEqual\\\":\\\"⊇\\\",\\\"suphsol\\\":\\\"⟉\\\",\\\"suphsub\\\":\\\"⫗\\\",\\\"suplarr\\\":\\\"⥻\\\",\\\"supmult\\\":\\\"⫂\\\",\\\"supnE\\\":\\\"⫌\\\",\\\"supne\\\":\\\"⊋\\\",\\\"supplus\\\":\\\"⫀\\\",\\\"supset\\\":\\\"⊃\\\",\\\"Supset\\\":\\\"⋑\\\",\\\"supseteq\\\":\\\"⊇\\\",\\\"supseteqq\\\":\\\"⫆\\\",\\\"supsetneq\\\":\\\"⊋\\\",\\\"supsetneqq\\\":\\\"⫌\\\",\\\"supsim\\\":\\\"⫈\\\",\\\"supsub\\\":\\\"⫔\\\",\\\"supsup\\\":\\\"⫖\\\",\\\"swarhk\\\":\\\"⤦\\\",\\\"swarr\\\":\\\"↙\\\",\\\"swArr\\\":\\\"⇙\\\",\\\"swarrow\\\":\\\"↙\\\",\\\"swnwar\\\":\\\"⤪\\\",\\\"szlig\\\":\\\"ß\\\",\\\"Tab\\\":\\\"\\\\t\\\",\\\"target\\\":\\\"⌖\\\",\\\"Tau\\\":\\\"Τ\\\",\\\"tau\\\":\\\"τ\\\",\\\"tbrk\\\":\\\"⎴\\\",\\\"Tcaron\\\":\\\"Ť\\\",\\\"tcaron\\\":\\\"ť\\\",\\\"Tcedil\\\":\\\"Ţ\\\",\\\"tcedil\\\":\\\"ţ\\\",\\\"Tcy\\\":\\\"Т\\\",\\\"tcy\\\":\\\"т\\\",\\\"tdot\\\":\\\"⃛\\\",\\\"telrec\\\":\\\"⌕\\\",\\\"Tfr\\\":\\\"𝔗\\\",\\\"tfr\\\":\\\"𝔱\\\",\\\"there4\\\":\\\"∴\\\",\\\"therefore\\\":\\\"∴\\\",\\\"Therefore\\\":\\\"∴\\\",\\\"Theta\\\":\\\"Θ\\\",\\\"theta\\\":\\\"θ\\\",\\\"thetasym\\\":\\\"ϑ\\\",\\\"thetav\\\":\\\"ϑ\\\",\\\"thickapprox\\\":\\\"≈\\\",\\\"thicksim\\\":\\\"∼\\\",\\\"ThickSpace\\\":\\\"  \\\",\\\"ThinSpace\\\":\\\" \\\",\\\"thinsp\\\":\\\" \\\",\\\"thkap\\\":\\\"≈\\\",\\\"thksim\\\":\\\"∼\\\",\\\"THORN\\\":\\\"Þ\\\",\\\"thorn\\\":\\\"þ\\\",\\\"tilde\\\":\\\"˜\\\",\\\"Tilde\\\":\\\"∼\\\",\\\"TildeEqual\\\":\\\"≃\\\",\\\"TildeFullEqual\\\":\\\"≅\\\",\\\"TildeTilde\\\":\\\"≈\\\",\\\"timesbar\\\":\\\"⨱\\\",\\\"timesb\\\":\\\"⊠\\\",\\\"times\\\":\\\"×\\\",\\\"timesd\\\":\\\"⨰\\\",\\\"tint\\\":\\\"∭\\\",\\\"toea\\\":\\\"⤨\\\",\\\"topbot\\\":\\\"⌶\\\",\\\"topcir\\\":\\\"⫱\\\",\\\"top\\\":\\\"⊤\\\",\\\"Topf\\\":\\\"𝕋\\\",\\\"topf\\\":\\\"𝕥\\\",\\\"topfork\\\":\\\"⫚\\\",\\\"tosa\\\":\\\"⤩\\\",\\\"tprime\\\":\\\"‴\\\",\\\"trade\\\":\\\"™\\\",\\\"TRADE\\\":\\\"™\\\",\\\"triangle\\\":\\\"▵\\\",\\\"triangledown\\\":\\\"▿\\\",\\\"triangleleft\\\":\\\"◃\\\",\\\"trianglelefteq\\\":\\\"⊴\\\",\\\"triangleq\\\":\\\"≜\\\",\\\"triangleright\\\":\\\"▹\\\",\\\"trianglerighteq\\\":\\\"⊵\\\",\\\"tridot\\\":\\\"◬\\\",\\\"trie\\\":\\\"≜\\\",\\\"triminus\\\":\\\"⨺\\\",\\\"TripleDot\\\":\\\"⃛\\\",\\\"triplus\\\":\\\"⨹\\\",\\\"trisb\\\":\\\"⧍\\\",\\\"tritime\\\":\\\"⨻\\\",\\\"trpezium\\\":\\\"⏢\\\",\\\"Tscr\\\":\\\"𝒯\\\",\\\"tscr\\\":\\\"𝓉\\\",\\\"TScy\\\":\\\"Ц\\\",\\\"tscy\\\":\\\"ц\\\",\\\"TSHcy\\\":\\\"Ћ\\\",\\\"tshcy\\\":\\\"ћ\\\",\\\"Tstrok\\\":\\\"Ŧ\\\",\\\"tstrok\\\":\\\"ŧ\\\",\\\"twixt\\\":\\\"≬\\\",\\\"twoheadleftarrow\\\":\\\"↞\\\",\\\"twoheadrightarrow\\\":\\\"↠\\\",\\\"Uacute\\\":\\\"Ú\\\",\\\"uacute\\\":\\\"ú\\\",\\\"uarr\\\":\\\"↑\\\",\\\"Uarr\\\":\\\"↟\\\",\\\"uArr\\\":\\\"⇑\\\",\\\"Uarrocir\\\":\\\"⥉\\\",\\\"Ubrcy\\\":\\\"Ў\\\",\\\"ubrcy\\\":\\\"ў\\\",\\\"Ubreve\\\":\\\"Ŭ\\\",\\\"ubreve\\\":\\\"ŭ\\\",\\\"Ucirc\\\":\\\"Û\\\",\\\"ucirc\\\":\\\"û\\\",\\\"Ucy\\\":\\\"У\\\",\\\"ucy\\\":\\\"у\\\",\\\"udarr\\\":\\\"⇅\\\",\\\"Udblac\\\":\\\"Ű\\\",\\\"udblac\\\":\\\"ű\\\",\\\"udhar\\\":\\\"⥮\\\",\\\"ufisht\\\":\\\"⥾\\\",\\\"Ufr\\\":\\\"𝔘\\\",\\\"ufr\\\":\\\"𝔲\\\",\\\"Ugrave\\\":\\\"Ù\\\",\\\"ugrave\\\":\\\"ù\\\",\\\"uHar\\\":\\\"⥣\\\",\\\"uharl\\\":\\\"↿\\\",\\\"uharr\\\":\\\"↾\\\",\\\"uhblk\\\":\\\"▀\\\",\\\"ulcorn\\\":\\\"⌜\\\",\\\"ulcorner\\\":\\\"⌜\\\",\\\"ulcrop\\\":\\\"⌏\\\",\\\"ultri\\\":\\\"◸\\\",\\\"Umacr\\\":\\\"Ū\\\",\\\"umacr\\\":\\\"ū\\\",\\\"uml\\\":\\\"¨\\\",\\\"UnderBar\\\":\\\"_\\\",\\\"UnderBrace\\\":\\\"⏟\\\",\\\"UnderBracket\\\":\\\"⎵\\\",\\\"UnderParenthesis\\\":\\\"⏝\\\",\\\"Union\\\":\\\"⋃\\\",\\\"UnionPlus\\\":\\\"⊎\\\",\\\"Uogon\\\":\\\"Ų\\\",\\\"uogon\\\":\\\"ų\\\",\\\"Uopf\\\":\\\"𝕌\\\",\\\"uopf\\\":\\\"𝕦\\\",\\\"UpArrowBar\\\":\\\"⤒\\\",\\\"uparrow\\\":\\\"↑\\\",\\\"UpArrow\\\":\\\"↑\\\",\\\"Uparrow\\\":\\\"⇑\\\",\\\"UpArrowDownArrow\\\":\\\"⇅\\\",\\\"updownarrow\\\":\\\"↕\\\",\\\"UpDownArrow\\\":\\\"↕\\\",\\\"Updownarrow\\\":\\\"⇕\\\",\\\"UpEquilibrium\\\":\\\"⥮\\\",\\\"upharpoonleft\\\":\\\"↿\\\",\\\"upharpoonright\\\":\\\"↾\\\",\\\"uplus\\\":\\\"⊎\\\",\\\"UpperLeftArrow\\\":\\\"↖\\\",\\\"UpperRightArrow\\\":\\\"↗\\\",\\\"upsi\\\":\\\"υ\\\",\\\"Upsi\\\":\\\"ϒ\\\",\\\"upsih\\\":\\\"ϒ\\\",\\\"Upsilon\\\":\\\"Υ\\\",\\\"upsilon\\\":\\\"υ\\\",\\\"UpTeeArrow\\\":\\\"↥\\\",\\\"UpTee\\\":\\\"⊥\\\",\\\"upuparrows\\\":\\\"⇈\\\",\\\"urcorn\\\":\\\"⌝\\\",\\\"urcorner\\\":\\\"⌝\\\",\\\"urcrop\\\":\\\"⌎\\\",\\\"Uring\\\":\\\"Ů\\\",\\\"uring\\\":\\\"ů\\\",\\\"urtri\\\":\\\"◹\\\",\\\"Uscr\\\":\\\"𝒰\\\",\\\"uscr\\\":\\\"𝓊\\\",\\\"utdot\\\":\\\"⋰\\\",\\\"Utilde\\\":\\\"Ũ\\\",\\\"utilde\\\":\\\"ũ\\\",\\\"utri\\\":\\\"▵\\\",\\\"utrif\\\":\\\"▴\\\",\\\"uuarr\\\":\\\"⇈\\\",\\\"Uuml\\\":\\\"Ü\\\",\\\"uuml\\\":\\\"ü\\\",\\\"uwangle\\\":\\\"⦧\\\",\\\"vangrt\\\":\\\"⦜\\\",\\\"varepsilon\\\":\\\"ϵ\\\",\\\"varkappa\\\":\\\"ϰ\\\",\\\"varnothing\\\":\\\"∅\\\",\\\"varphi\\\":\\\"ϕ\\\",\\\"varpi\\\":\\\"ϖ\\\",\\\"varpropto\\\":\\\"∝\\\",\\\"varr\\\":\\\"↕\\\",\\\"vArr\\\":\\\"⇕\\\",\\\"varrho\\\":\\\"ϱ\\\",\\\"varsigma\\\":\\\"ς\\\",\\\"varsubsetneq\\\":\\\"⊊︀\\\",\\\"varsubsetneqq\\\":\\\"⫋︀\\\",\\\"varsupsetneq\\\":\\\"⊋︀\\\",\\\"varsupsetneqq\\\":\\\"⫌︀\\\",\\\"vartheta\\\":\\\"ϑ\\\",\\\"vartriangleleft\\\":\\\"⊲\\\",\\\"vartriangleright\\\":\\\"⊳\\\",\\\"vBar\\\":\\\"⫨\\\",\\\"Vbar\\\":\\\"⫫\\\",\\\"vBarv\\\":\\\"⫩\\\",\\\"Vcy\\\":\\\"В\\\",\\\"vcy\\\":\\\"в\\\",\\\"vdash\\\":\\\"⊢\\\",\\\"vDash\\\":\\\"⊨\\\",\\\"Vdash\\\":\\\"⊩\\\",\\\"VDash\\\":\\\"⊫\\\",\\\"Vdashl\\\":\\\"⫦\\\",\\\"veebar\\\":\\\"⊻\\\",\\\"vee\\\":\\\"∨\\\",\\\"Vee\\\":\\\"⋁\\\",\\\"veeeq\\\":\\\"≚\\\",\\\"vellip\\\":\\\"⋮\\\",\\\"verbar\\\":\\\"|\\\",\\\"Verbar\\\":\\\"‖\\\",\\\"vert\\\":\\\"|\\\",\\\"Vert\\\":\\\"‖\\\",\\\"VerticalBar\\\":\\\"∣\\\",\\\"VerticalLine\\\":\\\"|\\\",\\\"VerticalSeparator\\\":\\\"❘\\\",\\\"VerticalTilde\\\":\\\"≀\\\",\\\"VeryThinSpace\\\":\\\" \\\",\\\"Vfr\\\":\\\"𝔙\\\",\\\"vfr\\\":\\\"𝔳\\\",\\\"vltri\\\":\\\"⊲\\\",\\\"vnsub\\\":\\\"⊂⃒\\\",\\\"vnsup\\\":\\\"⊃⃒\\\",\\\"Vopf\\\":\\\"𝕍\\\",\\\"vopf\\\":\\\"𝕧\\\",\\\"vprop\\\":\\\"∝\\\",\\\"vrtri\\\":\\\"⊳\\\",\\\"Vscr\\\":\\\"𝒱\\\",\\\"vscr\\\":\\\"𝓋\\\",\\\"vsubnE\\\":\\\"⫋︀\\\",\\\"vsubne\\\":\\\"⊊︀\\\",\\\"vsupnE\\\":\\\"⫌︀\\\",\\\"vsupne\\\":\\\"⊋︀\\\",\\\"Vvdash\\\":\\\"⊪\\\",\\\"vzigzag\\\":\\\"⦚\\\",\\\"Wcirc\\\":\\\"Ŵ\\\",\\\"wcirc\\\":\\\"ŵ\\\",\\\"wedbar\\\":\\\"⩟\\\",\\\"wedge\\\":\\\"∧\\\",\\\"Wedge\\\":\\\"⋀\\\",\\\"wedgeq\\\":\\\"≙\\\",\\\"weierp\\\":\\\"℘\\\",\\\"Wfr\\\":\\\"𝔚\\\",\\\"wfr\\\":\\\"𝔴\\\",\\\"Wopf\\\":\\\"𝕎\\\",\\\"wopf\\\":\\\"𝕨\\\",\\\"wp\\\":\\\"℘\\\",\\\"wr\\\":\\\"≀\\\",\\\"wreath\\\":\\\"≀\\\",\\\"Wscr\\\":\\\"𝒲\\\",\\\"wscr\\\":\\\"𝓌\\\",\\\"xcap\\\":\\\"⋂\\\",\\\"xcirc\\\":\\\"◯\\\",\\\"xcup\\\":\\\"⋃\\\",\\\"xdtri\\\":\\\"▽\\\",\\\"Xfr\\\":\\\"𝔛\\\",\\\"xfr\\\":\\\"𝔵\\\",\\\"xharr\\\":\\\"⟷\\\",\\\"xhArr\\\":\\\"⟺\\\",\\\"Xi\\\":\\\"Ξ\\\",\\\"xi\\\":\\\"ξ\\\",\\\"xlarr\\\":\\\"⟵\\\",\\\"xlArr\\\":\\\"⟸\\\",\\\"xmap\\\":\\\"⟼\\\",\\\"xnis\\\":\\\"⋻\\\",\\\"xodot\\\":\\\"⨀\\\",\\\"Xopf\\\":\\\"𝕏\\\",\\\"xopf\\\":\\\"𝕩\\\",\\\"xoplus\\\":\\\"⨁\\\",\\\"xotime\\\":\\\"⨂\\\",\\\"xrarr\\\":\\\"⟶\\\",\\\"xrArr\\\":\\\"⟹\\\",\\\"Xscr\\\":\\\"𝒳\\\",\\\"xscr\\\":\\\"𝓍\\\",\\\"xsqcup\\\":\\\"⨆\\\",\\\"xuplus\\\":\\\"⨄\\\",\\\"xutri\\\":\\\"△\\\",\\\"xvee\\\":\\\"⋁\\\",\\\"xwedge\\\":\\\"⋀\\\",\\\"Yacute\\\":\\\"Ý\\\",\\\"yacute\\\":\\\"ý\\\",\\\"YAcy\\\":\\\"Я\\\",\\\"yacy\\\":\\\"я\\\",\\\"Ycirc\\\":\\\"Ŷ\\\",\\\"ycirc\\\":\\\"ŷ\\\",\\\"Ycy\\\":\\\"Ы\\\",\\\"ycy\\\":\\\"ы\\\",\\\"yen\\\":\\\"¥\\\",\\\"Yfr\\\":\\\"𝔜\\\",\\\"yfr\\\":\\\"𝔶\\\",\\\"YIcy\\\":\\\"Ї\\\",\\\"yicy\\\":\\\"ї\\\",\\\"Yopf\\\":\\\"𝕐\\\",\\\"yopf\\\":\\\"𝕪\\\",\\\"Yscr\\\":\\\"𝒴\\\",\\\"yscr\\\":\\\"𝓎\\\",\\\"YUcy\\\":\\\"Ю\\\",\\\"yucy\\\":\\\"ю\\\",\\\"yuml\\\":\\\"ÿ\\\",\\\"Yuml\\\":\\\"Ÿ\\\",\\\"Zacute\\\":\\\"Ź\\\",\\\"zacute\\\":\\\"ź\\\",\\\"Zcaron\\\":\\\"Ž\\\",\\\"zcaron\\\":\\\"ž\\\",\\\"Zcy\\\":\\\"З\\\",\\\"zcy\\\":\\\"з\\\",\\\"Zdot\\\":\\\"Ż\\\",\\\"zdot\\\":\\\"ż\\\",\\\"zeetrf\\\":\\\"ℨ\\\",\\\"ZeroWidthSpace\\\":\\\"​\\\",\\\"Zeta\\\":\\\"Ζ\\\",\\\"zeta\\\":\\\"ζ\\\",\\\"zfr\\\":\\\"𝔷\\\",\\\"Zfr\\\":\\\"ℨ\\\",\\\"ZHcy\\\":\\\"Ж\\\",\\\"zhcy\\\":\\\"ж\\\",\\\"zigrarr\\\":\\\"⇝\\\",\\\"zopf\\\":\\\"𝕫\\\",\\\"Zopf\\\":\\\"ℤ\\\",\\\"Zscr\\\":\\\"𝒵\\\",\\\"zscr\\\":\\\"𝓏\\\",\\\"zwj\\\":\\\"‍\\\",\\\"zwnj\\\":\\\"‌\\\"}\");\n\n//# sourceURL=webpack:///./node_modules/entities/lib/maps/entities.json?"); /***/ }), /***/ "./node_modules/linkify-it/index.js": /*!******************************************!*\ !*** ./node_modules/linkify-it/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Helpers\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\nfunction isString(obj) { return _class(obj) === '[object String]'; }\nfunction isObject(obj) { return _class(obj) === '[object Object]'; }\nfunction isRegExp(obj) { return _class(obj) === '[object RegExp]'; }\nfunction isFunction(obj) { return _class(obj) === '[object Function]'; }\n\n\nfunction escapeRE(str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&'); }\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\n\nvar defaultSchemas = {\n 'http:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp(\n '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n );\n }\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp(\n '^' +\n self.re.src_auth +\n // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n self.re.src_port +\n self.re.src_host_terminator +\n self.re.src_path,\n\n 'i'\n );\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') { return 0; }\n if (pos >= 3 && text[pos - 3] === '/') { return 0; }\n return tail.match(self.re.no_http)[0].length;\n }\n return 0;\n }\n },\n 'mailto:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp(\n '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n );\n }\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n return 0;\n }\n }\n};\n\n/*eslint-disable max-len*/\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n\n/*eslint-enable max-len*/\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"./node_modules/linkify-it/lib/re.js\")(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options);\n\n // Cache last tested result. Used to skip repeating steps on next `match` call.\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n this.__schema__ = '';\n this.__text_cache__ = '';\n\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n\n this.re = {};\n\n compile(this);\n}\n\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) { return false; }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos;\n\n // try to scan for link with schema - that's the most simple rule\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ ||\n (shift === this.__index__ && next > this.__last_index__)) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0, result = [];\n\n // Try to take previous element from cache, if .test() called before\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n }\n\n // Cut head if cache was used\n var tail = shift ? text.slice(shift) : text;\n\n // Scan string until end reached\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [ list ];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list)\n .sort()\n .filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n })\n .reverse();\n\n compile(this);\n return this;\n};\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize(match) {\n\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n if (!match.schema) { match.url = 'http://' + match.url; }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile() {\n};\n\n\nmodule.exports = LinkifyIt;\n\n\n//# sourceURL=webpack:///./node_modules/linkify-it/index.js?"); +eval(" ////////////////////////////////////////////////////////////////////////////////\n// Helpers\n// Merge objects\n//\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n}\n\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return _class(obj) === '[object String]';\n}\n\nfunction isObject(obj) {\n return _class(obj) === '[object Object]';\n}\n\nfunction isRegExp(obj) {\n return _class(obj) === '[object RegExp]';\n}\n\nfunction isFunction(obj) {\n return _class(obj) === '[object Function]';\n}\n\nfunction escapeRE(str) {\n return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\nvar defaultSchemas = {\n 'http:': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp('^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i');\n }\n\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp('^' + self.re.src_auth + // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i');\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') {\n return 0;\n }\n\n if (pos >= 3 && text[pos - 3] === '/') {\n return 0;\n }\n\n return tail.match(self.re.no_http)[0].length;\n }\n\n return 0;\n }\n },\n 'mailto:': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i');\n }\n\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n\n return 0;\n }\n }\n};\n/*eslint-disable max-len*/\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\n\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'; // DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\n\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n/*eslint-enable max-len*/\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n} // Schemas compiler. Build regexps.\n//\n\n\nfunction compile(self) {\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"./node_modules/linkify-it/lib/re.js\")(self.__opts__); // Define dynamic patterns\n\n\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n\n tlds.push(re.src_xn);\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) {\n return tpl.replace('%TLDS%', re.src_tlds);\n }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i'); //\n // Compile each schema\n //\n\n var aliases = [];\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name]; // skip disabled methods\n\n if (val === null) {\n return;\n }\n\n var compiled = {\n validate: null,\n link: null\n };\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n }); //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize;\n }); //\n // Fake record for guessed links\n //\n\n self.__compiled__[''] = {\n validate: null,\n normalize: createNormalizer()\n }; //\n // Build schema condition\n //\n\n var slist = Object.keys(self.__compiled__).filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n }).map(escapeRE).join('|'); // (?!_) cause 1.5x slowdown\n\n self.re.schema_test = RegExp(\"(^|(?!_)(?:[><\\uFF5C]|\" + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp(\"(^|(?!_)(?:[><\\uFF5C]|\" + re.src_ZPCc + '))(' + slist + ')', 'ig');\n self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i'); //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\n\n\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n\n\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\n\n\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options); // Cache last tested result. Used to skip repeating steps on next `match` call.\n\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n\n this.__schema__ = '';\n this.__text_cache__ = '';\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n this.re = {};\n compile(this);\n}\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\n\n\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\n\n\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\n\n\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) {\n return false;\n }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos; // try to scan for link with schema - that's the most simple rule\n\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\n\n\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\n\n\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\n\n\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0,\n result = []; // Try to take previous element from cache, if .test() called before\n\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n } // Cut head if cache was used\n\n\n var tail = shift ? text.slice(shift) : text; // Scan string until end reached\n\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\n\n\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [list];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list).sort().filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n }).reverse();\n compile(this);\n return this;\n};\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\n\n\nLinkifyIt.prototype.normalize = function normalize(match) {\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n if (!match.schema) {\n match.url = 'http://' + match.url;\n }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\n\n\nLinkifyIt.prototype.onCompile = function onCompile() {};\n\nmodule.exports = LinkifyIt;\n\n//# sourceURL=webpack:///./node_modules/linkify-it/index.js?"); /***/ }), /***/ "./node_modules/linkify-it/lib/re.js": /*!*******************************************!*\ !*** ./node_modules/linkify-it/lib/re.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\nmodule.exports = function (opts) {\n var re = {};\n\n // Use direct extract instead of `regenerate` to reduse browserified size\n re.src_Any = __webpack_require__(/*! uc.micro/properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\").source;\n re.src_Cc = __webpack_require__(/*! uc.micro/categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\").source;\n re.src_Z = __webpack_require__(/*! uc.micro/categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\").source;\n re.src_P = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\").source;\n\n // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');\n\n // \\p{\\Z\\Cc} (white spaces + control)\n re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');\n\n // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n var text_separators = '[><\\uff5c]';\n\n // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';\n // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 =\n\n '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';\n\n // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n\n re.src_port =\n\n '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n\n re.src_host_terminator =\n\n '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n\n re.src_path =\n\n '(?:' +\n '[/?#]' +\n '(?:' +\n '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-]).|' +\n '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n \"\\\\'(?=\" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found\n '\\\\.{2,4}[a-zA-Z0-9%/]|' + // github has ... in commit range links,\n // google has .... in links (issue #66)\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]).|' +\n (opts && opts['---'] ?\n '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n :\n '\\\\-+|'\n ) +\n '\\\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths\n '\\\\!(?!' + re.src_ZCc + '|[!]).|' +\n '\\\\?(?!' + re.src_ZCc + '|[?]).' +\n ')+' +\n '|\\\\/' +\n ')?';\n\n // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n re.src_email_name =\n\n '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n\n re.src_xn =\n\n 'xn--[a-z0-9\\\\-]{1,59}';\n\n // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root =\n\n // Allow letters & digits (http://test1)\n '(?:' +\n re.src_xn +\n '|' +\n re.src_pseudo_letter + '{1,63}' +\n ')';\n\n re.src_domain =\n\n '(?:' +\n re.src_xn +\n '|' +\n '(?:' + re.src_pseudo_letter + ')' +\n '|' +\n '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n ')';\n\n re.src_host =\n\n '(?:' +\n // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/*_root*/ + ')' +\n ')';\n\n re.tpl_host_fuzzy =\n\n '(?:' +\n re.src_ip4 +\n '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n ')';\n\n re.tpl_host_no_ip_fuzzy =\n\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n\n re.src_host_strict =\n\n re.src_host + re.src_host_terminator;\n\n re.tpl_host_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_host_terminator;\n\n re.src_host_port_strict =\n\n re.src_host + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_no_ip_fuzzy_strict =\n\n re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;\n\n\n ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n\n // Rude test fuzzy links by host, for quick deny\n re.tpl_host_fuzzy_test =\n\n 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n\n re.tpl_email_fuzzy =\n\n '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n\n re.tpl_link_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n\n re.tpl_link_no_ip_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n\n return re;\n};\n\n\n//# sourceURL=webpack:///./node_modules/linkify-it/lib/re.js?"); +eval("\n\nmodule.exports = function (opts) {\n var re = {}; // Use direct extract instead of `regenerate` to reduse browserified size\n\n re.src_Any = __webpack_require__(/*! uc.micro/properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\").source;\n re.src_Cc = __webpack_require__(/*! uc.micro/categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\").source;\n re.src_Z = __webpack_require__(/*! uc.micro/categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\").source;\n re.src_P = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\").source; // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n\n re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|'); // \\p{\\Z\\Cc} (white spaces + control)\n\n re.src_ZCc = [re.src_Z, re.src_Cc].join('|'); // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n\n var text_separators = \"[><\\uFF5C]\"; // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'; // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n re.src_port = '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-]).|' + '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' + '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' + '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' + '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' + \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" + \"\\\\'(?=\" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found\n '\\\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in \"google search\" links (#66, #81).\n // github has ... in commit range links,\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // - params separator\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]).|' + (opts && opts['---'] ? '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n : '\\\\-+|') + '\\\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths\n '\\\\!+(?!' + re.src_ZCc + '|[!]).|' + // allow `!!!` in paths, but not at the end\n '\\\\?(?!' + re.src_ZCc + '|[?]).' + ')+' + '|\\\\/' + ')?'; // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n\n re.src_email_name = '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n re.src_xn = 'xn--[a-z0-9\\\\-]{1,59}'; // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root = // Allow letters & digits (http://test1)\n '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')';\n re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')';\n re.src_host = '(?:' + // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain\n /*_root*/\n + ')' + ')';\n re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' + ')';\n re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n re.src_host_strict = re.src_host + re.src_host_terminator;\n re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator;\n re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator;\n re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator; ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n // Rude test fuzzy links by host, for quick deny\n\n re.tpl_host_fuzzy_test = 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n re.tpl_email_fuzzy = '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n re.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uFF5C]|\" + re.src_ZPCc + '))' + \"((?![$+<=>^`|\\uFF5C])\" + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n re.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uFF5C]|\" + re.src_ZPCc + '))' + \"((?![$+<=>^`|\\uFF5C])\" + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n return re;\n};\n\n//# sourceURL=webpack:///./node_modules/linkify-it/lib/re.js?"); /***/ }), /***/ "./node_modules/markdown-it/index.js": /*!*******************************************!*\ !*** ./node_modules/markdown-it/index.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\nmodule.exports = __webpack_require__(/*! ./lib/ */ \"./node_modules/markdown-it/lib/index.js\");\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/index.js?"); +eval("\n\nmodule.exports = __webpack_require__(/*! ./lib/ */ \"./node_modules/markdown-it/lib/index.js\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/index.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/common/entities.js": /*!*********************************************************!*\ !*** ./node_modules/markdown-it/lib/common/entities.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// HTML5 entities map: { name -> utf16string }\n//\n\n\n/*eslint quotes:0*/\nmodule.exports = __webpack_require__(/*! entities/lib/maps/entities.json */ \"./node_modules/entities/lib/maps/entities.json\");\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/entities.js?"); +eval("// HTML5 entities map: { name -> utf16string }\n//\n\n/*eslint quotes:0*/\n\nmodule.exports = __webpack_require__(/*! entities/lib/maps/entities.json */ \"./node_modules/entities/lib/maps/entities.json\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/entities.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/common/html_blocks.js": /*!************************************************************!*\ !*** ./node_modules/markdown-it/lib/common/html_blocks.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\n\n\n\nmodule.exports = [\n 'address',\n 'article',\n 'aside',\n 'base',\n 'basefont',\n 'blockquote',\n 'body',\n 'caption',\n 'center',\n 'col',\n 'colgroup',\n 'dd',\n 'details',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'meta',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'section',\n 'source',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n];\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_blocks.js?"); +eval("// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\n\nmodule.exports = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'section', 'source', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'];\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_blocks.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/common/html_re.js": /*!********************************************************!*\ !*** ./node_modules/markdown-it/lib/common/html_re.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Regexps to match html elements\n\n\n\nvar attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\n\nvar unquoted = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar single_quoted = \"'[^']*'\";\nvar double_quoted = '\"[^\"]*\"';\n\nvar attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';\n\nvar attribute = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)';\n\nvar open_tag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>';\n\nvar close_tag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>';\nvar comment = '|';\nvar processing = '<[?].*?[?]>';\nvar declaration = ']*>';\nvar cdata = '';\n\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\n\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_re.js?"); +eval("// Regexps to match html elements\n\n\nvar attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\nvar unquoted = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar single_quoted = \"'[^']*'\";\nvar double_quoted = '\"[^\"]*\"';\nvar attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';\nvar attribute = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)';\nvar open_tag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>';\nvar close_tag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>';\nvar comment = '|';\nvar processing = '<[?][\\\\s\\\\S]*?[?]>';\nvar declaration = ']*>';\nvar cdata = '';\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_re.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/common/utils.js": /*!******************************************************!*\ !*** ./node_modules/markdown-it/lib/common/utils.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Utilities\n//\n\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction isString(obj) { return _class(obj) === '[object String]'; }\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n}\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\n\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = __webpack_require__(/*! ./entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str; }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) { return escaped; }\n return replaceEntityPattern(match, entity);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n return false;\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) { return true; }\n switch (code) {\n case 0x09: // \\t\n case 0x0A: // \\n\n case 0x0B: // \\v\n case 0x0C: // \\f\n case 0x0D: // \\r\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n return false;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\nvar UNICODE_PUNCT_RE = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\");\n\n// Currently without astral characters support.\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n}\n\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21/* ! */:\n case 0x22/* \" */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x27/* ' */:\n case 0x28/* ( */:\n case 0x29/* ) */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2C/* , */:\n case 0x2D/* - */:\n case 0x2E/* . */:\n case 0x2F/* / */:\n case 0x3A/* : */:\n case 0x3B/* ; */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x3F/* ? */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7C/* | */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' ');\n\n // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n }\n\n // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n return str.toLowerCase().toUpperCase();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nexports.lib = {};\nexports.lib.mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\nexports.lib.ucmicro = __webpack_require__(/*! uc.micro */ \"./node_modules/uc.micro/index.js\");\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\n// exports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/utils.js?"); +eval("// Utilities\n//\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return _class(obj) === '[object String]';\n}\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n} // Merge objects\n//\n\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n if (_typeof(source) !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n} // Remove element from array and put another array at those position.\n// Useful for some operations with tokens\n\n\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) {\n return false;\n } // never used\n\n\n if (c >= 0xFDD0 && c <= 0xFDEF) {\n return false;\n }\n\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {\n return false;\n } // control codes\n\n\n if (c >= 0x00 && c <= 0x08) {\n return false;\n }\n\n if (c === 0x0B) {\n return false;\n }\n\n if (c >= 0x0E && c <= 0x1F) {\n return false;\n }\n\n if (c >= 0x7F && c <= 0x9F) {\n return false;\n } // out of range\n\n\n if (c > 0x10FFFF) {\n return false;\n }\n\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n }\n\n return String.fromCharCode(c);\n}\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = __webpack_require__(/*! ./entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23\n /* # */\n && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) {\n return escaped;\n }\n\n return replaceEntityPattern(match, entity);\n });\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n\n return str;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n\n return false;\n} // Zs (unicode class) || [\\t\\f\\v\\r\\n]\n\n\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) {\n return true;\n }\n\n switch (code) {\n case 0x09: // \\t\n\n case 0x0A: // \\n\n\n case 0x0B: // \\v\n\n case 0x0C: // \\f\n\n case 0x0D: // \\r\n\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n\n return false;\n} ////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\n\n\nvar UNICODE_PUNCT_RE = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\"); // Currently without astral characters support.\n\n\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n} // Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\n\n\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21\n /* ! */\n :\n case 0x22\n /* \" */\n :\n case 0x23\n /* # */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x26\n /* & */\n :\n case 0x27\n /* ' */\n :\n case 0x28\n /* ( */\n :\n case 0x29\n /* ) */\n :\n case 0x2A\n /* * */\n :\n case 0x2B\n /* + */\n :\n case 0x2C\n /* , */\n :\n case 0x2D\n /* - */\n :\n case 0x2E\n /* . */\n :\n case 0x2F\n /* / */\n :\n case 0x3A\n /* : */\n :\n case 0x3B\n /* ; */\n :\n case 0x3C\n /* < */\n :\n case 0x3D\n /* = */\n :\n case 0x3E\n /* > */\n :\n case 0x3F\n /* ? */\n :\n case 0x40\n /* @ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5C\n /* \\ */\n :\n case 0x5D\n /* ] */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5F\n /* _ */\n :\n case 0x60\n /* ` */\n :\n case 0x7B\n /* { */\n :\n case 0x7C\n /* | */\n :\n case 0x7D\n /* } */\n :\n case 0x7E\n /* ~ */\n :\n return true;\n\n default:\n return false;\n }\n} // Hepler to unify [reference labels].\n//\n\n\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' '); // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n } // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n\n\n return str.toLowerCase().toUpperCase();\n} ////////////////////////////////////////////////////////////////////////////////\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\n\n\nexports.lib = {};\nexports.lib.mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\nexports.lib.ucmicro = __webpack_require__(/*! uc.micro */ \"./node_modules/uc.micro/index.js\");\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint; // exports.replaceEntities = replaceEntities;\n\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/utils.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/helpers/index.js": /*!*******************************************************!*\ !*** ./node_modules/markdown-it/lib/helpers/index.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Just a shortcut for bulk export\n\n\n\nexports.parseLinkLabel = __webpack_require__(/*! ./parse_link_label */ \"./node_modules/markdown-it/lib/helpers/parse_link_label.js\");\nexports.parseLinkDestination = __webpack_require__(/*! ./parse_link_destination */ \"./node_modules/markdown-it/lib/helpers/parse_link_destination.js\");\nexports.parseLinkTitle = __webpack_require__(/*! ./parse_link_title */ \"./node_modules/markdown-it/lib/helpers/parse_link_title.js\");\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/index.js?"); +eval("// Just a shortcut for bulk export\n\n\nexports.parseLinkLabel = __webpack_require__(/*! ./parse_link_label */ \"./node_modules/markdown-it/lib/helpers/parse_link_label.js\");\nexports.parseLinkDestination = __webpack_require__(/*! ./parse_link_destination */ \"./node_modules/markdown-it/lib/helpers/parse_link_destination.js\");\nexports.parseLinkTitle = __webpack_require__(/*! ./parse_link_title */ \"./node_modules/markdown-it/lib/helpers/parse_link_title.js\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/index.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/helpers/parse_link_destination.js": /*!************************************************************************!*\ !*** ./node_modules/markdown-it/lib/helpers/parse_link_destination.js ***! \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Parse link destination\n//\n\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\n\nmodule.exports = function parseLinkDestination(str, pos, max) {\n var code, level,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === 0x0A /* \\n */) { return result; }\n if (code === 0x3E /* > */) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n // no closing '>'\n return result;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) { break; }\n\n // ascii control characters\n if (code < 0x20 || code === 0x7F) { break; }\n\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n if (code === 0x28 /* ( */) {\n level++;\n }\n\n if (code === 0x29 /* ) */) {\n if (level === 0) { break; }\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) { return result; }\n if (level !== 0) { return result; }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.lines = lines;\n result.pos = pos;\n result.ok = true;\n return result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_destination.js?"); +eval("// Parse link destination\n//\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\nmodule.exports = function parseLinkDestination(str, pos, max) {\n var code,\n level,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C\n /* < */\n ) {\n pos++;\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x0A\n /* \\n */\n ) {\n return result;\n }\n\n if (code === 0x3C\n /* < */\n ) {\n return result;\n }\n\n if (code === 0x3E\n /* > */\n ) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n\n if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n } // no closing '>'\n\n\n return result;\n } // this should be ... } else { ... branch\n\n\n level = 0;\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) {\n break;\n } // ascii control characters\n\n\n if (code < 0x20 || code === 0x7F) {\n break;\n }\n\n if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n if (str.charCodeAt(pos + 1) === 0x20) {\n break;\n }\n\n pos += 2;\n continue;\n }\n\n if (code === 0x28\n /* ( */\n ) {\n level++;\n\n if (level > 32) {\n return result;\n }\n }\n\n if (code === 0x29\n /* ) */\n ) {\n if (level === 0) {\n break;\n }\n\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) {\n return result;\n }\n\n if (level !== 0) {\n return result;\n }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.lines = lines;\n result.pos = pos;\n result.ok = true;\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_destination.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/helpers/parse_link_label.js": /*!******************************************************************!*\ !*** ./node_modules/markdown-it/lib/helpers/parse_link_label.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level, found, marker, prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n if (marker === 0x5B /* [ */) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n }\n\n // restore old state\n state.pos = oldPos;\n\n return labelEnd;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_label.js?"); +eval("// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level,\n found,\n marker,\n prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n\n if (marker === 0x5D\n /* ] */\n ) {\n level--;\n\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n\n if (marker === 0x5B\n /* [ */\n ) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n } // restore old state\n\n\n state.pos = oldPos;\n return labelEnd;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_label.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/helpers/parse_link_title.js": /*!******************************************************************!*\ !*** ./node_modules/markdown-it/lib/helpers/parse_link_title.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Parse link title\n//\n\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\n\nmodule.exports = function parseLinkTitle(str, pos, max) {\n var code,\n marker,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) { return result; }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }\n\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) { marker = 0x29; }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos++;\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_title.js?"); +eval("// Parse link title\n//\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\nmodule.exports = function parseLinkTitle(str, pos, max) {\n var code,\n marker,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) {\n return result;\n }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22\n /* \" */\n && marker !== 0x27\n /* ' */\n && marker !== 0x28\n /* ( */\n ) {\n return result;\n }\n\n pos++; // if opening marker is \"(\", switch it to closing marker \")\"\n\n if (marker === 0x28) {\n marker = 0x29;\n }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x28\n /* ( */\n && marker === 0x29\n /* ) */\n ) {\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n pos++;\n\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_title.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/index.js": /*!***********************************************!*\ !*** ./node_modules/markdown-it/lib/index.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Main parser class\n\n\n\n\nvar utils = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\");\nvar helpers = __webpack_require__(/*! ./helpers */ \"./node_modules/markdown-it/lib/helpers/index.js\");\nvar Renderer = __webpack_require__(/*! ./renderer */ \"./node_modules/markdown-it/lib/renderer.js\");\nvar ParserCore = __webpack_require__(/*! ./parser_core */ \"./node_modules/markdown-it/lib/parser_core.js\");\nvar ParserBlock = __webpack_require__(/*! ./parser_block */ \"./node_modules/markdown-it/lib/parser_block.js\");\nvar ParserInline = __webpack_require__(/*! ./parser_inline */ \"./node_modules/markdown-it/lib/parser_inline.js\");\nvar LinkifyIt = __webpack_require__(/*! linkify-it */ \"./node_modules/linkify-it/index.js\");\nvar mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/node-libs-browser/node_modules/punycode/punycode.js\");\n\n\nvar config = {\n 'default': __webpack_require__(/*! ./presets/default */ \"./node_modules/markdown-it/lib/presets/default.js\"),\n zero: __webpack_require__(/*! ./presets/zero */ \"./node_modules/markdown-it/lib/presets/zero.js\"),\n commonmark: __webpack_require__(/*! ./presets/commonmark */ \"./node_modules/markdown-it/lib/presets/commonmark.js\")\n};\n\n////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n\n return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n return mdurl.decode(mdurl.format(parsed));\n}\n\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`
`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `
`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with `):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '
' +\n *                hljs.highlight(lang, str, true).value +\n *                '
';\n * } catch (__) {}\n * }\n *\n * return '
' + md.utils.escapeHtml(str) + '
';\n * }\n * });\n * ```\n *\n **/\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.inline = new ParserInline();\n\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.block = new ParserBlock();\n\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.core = new ParserCore();\n\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n this.renderer = new Renderer();\n\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n this.linkify = new LinkifyIt();\n\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n this.validateLink = validateLink;\n\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n this.normalizeLink = normalizeLink;\n\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n this.normalizeLinkText = normalizeLinkText;\n\n\n // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n this.utils = utils;\n\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n this.helpers = utils.assign({}, helpers);\n\n\n this.options = {};\n this.configure(presetName);\n\n if (options) { this.set(options); }\n}\n\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you with - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n var self = this, presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name'); }\n }\n\n if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty'); }\n\n if (presets.options) { self.set(presets.options); }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.enable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.disable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and returns list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n\n state.inlineMode = true;\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `

` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\n\nmodule.exports = MarkdownIt;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/index.js?"); +eval("// Main parser class\n\n\nvar utils = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\");\n\nvar helpers = __webpack_require__(/*! ./helpers */ \"./node_modules/markdown-it/lib/helpers/index.js\");\n\nvar Renderer = __webpack_require__(/*! ./renderer */ \"./node_modules/markdown-it/lib/renderer.js\");\n\nvar ParserCore = __webpack_require__(/*! ./parser_core */ \"./node_modules/markdown-it/lib/parser_core.js\");\n\nvar ParserBlock = __webpack_require__(/*! ./parser_block */ \"./node_modules/markdown-it/lib/parser_block.js\");\n\nvar ParserInline = __webpack_require__(/*! ./parser_inline */ \"./node_modules/markdown-it/lib/parser_inline.js\");\n\nvar LinkifyIt = __webpack_require__(/*! linkify-it */ \"./node_modules/linkify-it/index.js\");\n\nvar mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/node-libs-browser/node_modules/punycode/punycode.js\");\n\nvar config = {\n \"default\": __webpack_require__(/*! ./presets/default */ \"./node_modules/markdown-it/lib/presets/default.js\"),\n zero: __webpack_require__(/*! ./presets/zero */ \"./node_modules/markdown-it/lib/presets/zero.js\"),\n commonmark: __webpack_require__(/*! ./presets/commonmark */ \"./node_modules/markdown-it/lib/presets/commonmark.js\")\n}; ////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) ? true : false : true;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:'];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) {\n /**/\n }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) {\n /**/\n }\n }\n } // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n\n\n return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%');\n}\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`
`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `
`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with `):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '

' +\n *                hljs.highlight(lang, str, true).value +\n *                '
';\n * } catch (__) {}\n * }\n *\n * return '
' + md.utils.escapeHtml(str) + '
';\n * }\n * });\n * ```\n *\n **/\n\n\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n\n this.inline = new ParserInline();\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n this.block = new ParserBlock();\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n this.core = new ParserCore();\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n\n this.renderer = new Renderer();\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n\n this.linkify = new LinkifyIt();\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n\n this.validateLink = validateLink;\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n\n this.normalizeLink = normalizeLink;\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n\n this.normalizeLinkText = normalizeLinkText; // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n\n this.utils = utils;\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n\n this.helpers = utils.assign({}, helpers);\n this.options = {};\n this.configure(presetName);\n\n if (options) {\n this.set(options);\n }\n}\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\n\n\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\n\n\nMarkdownIt.prototype.configure = function (presets) {\n var self = this,\n presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n\n if (!presets) {\n throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name');\n }\n }\n\n if (!presets) {\n throw new Error('Wrong `markdown-it` preset, can\\'t be empty');\n }\n\n if (presets.options) {\n self.set(presets.options);\n }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\n\n\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n ['core', 'block', 'inline'].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n result = result.concat(this.inline.ruler2.enable(list, true));\n var missed = list.filter(function (name) {\n return result.indexOf(name) < 0;\n });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\n\n\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n ['core', 'block', 'inline'].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n result = result.concat(this.inline.ruler2.disable(list, true));\n var missed = list.filter(function (name) {\n return result.indexOf(name) < 0;\n });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\n\n\nMarkdownIt.prototype.use = function (plugin\n/*, params, ... */\n) {\n var args = [this].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\n\n\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n this.core.process(state);\n return state.tokens;\n};\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\n\n\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\n\n\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n state.inlineMode = true;\n this.core.process(state);\n return state.tokens;\n};\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `

` tags.\n **/\n\n\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\nmodule.exports = MarkdownIt;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/index.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/parser_block.js": /*!******************************************************!*\ !*** ./node_modules/markdown-it/lib/parser_block.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\n\nvar _rules = [\n // First 2 params - rule name & source. Secondary array - list of rules,\n // which can be terminated by this one.\n [ 'table', __webpack_require__(/*! ./rules_block/table */ \"./node_modules/markdown-it/lib/rules_block/table.js\"), [ 'paragraph', 'reference' ] ],\n [ 'code', __webpack_require__(/*! ./rules_block/code */ \"./node_modules/markdown-it/lib/rules_block/code.js\") ],\n [ 'fence', __webpack_require__(/*! ./rules_block/fence */ \"./node_modules/markdown-it/lib/rules_block/fence.js\"), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'blockquote', __webpack_require__(/*! ./rules_block/blockquote */ \"./node_modules/markdown-it/lib/rules_block/blockquote.js\"), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'hr', __webpack_require__(/*! ./rules_block/hr */ \"./node_modules/markdown-it/lib/rules_block/hr.js\"), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'list', __webpack_require__(/*! ./rules_block/list */ \"./node_modules/markdown-it/lib/rules_block/list.js\"), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'reference', __webpack_require__(/*! ./rules_block/reference */ \"./node_modules/markdown-it/lib/rules_block/reference.js\") ],\n [ 'heading', __webpack_require__(/*! ./rules_block/heading */ \"./node_modules/markdown-it/lib/rules_block/heading.js\"), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'lheading', __webpack_require__(/*! ./rules_block/lheading */ \"./node_modules/markdown-it/lib/rules_block/lheading.js\") ],\n [ 'html_block', __webpack_require__(/*! ./rules_block/html_block */ \"./node_modules/markdown-it/lib/rules_block/html_block.js\"), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'paragraph', __webpack_require__(/*! ./rules_block/paragraph */ \"./node_modules/markdown-it/lib/rules_block/paragraph.js\") ]\n];\n\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });\n }\n}\n\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) { break; }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.sCount[line] < state.blkIndent) { break; }\n\n // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) { break; }\n }\n\n // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) { return; }\n\n state = new this.State(src, md, env, outTokens);\n\n this.tokenize(state, state.line, state.lineMax);\n};\n\n\nParserBlock.prototype.State = __webpack_require__(/*! ./rules_block/state_block */ \"./node_modules/markdown-it/lib/rules_block/state_block.js\");\n\n\nmodule.exports = ParserBlock;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_block.js?"); +eval("/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\nvar _rules = [// First 2 params - rule name & source. Secondary array - list of rules,\n// which can be terminated by this one.\n['table', __webpack_require__(/*! ./rules_block/table */ \"./node_modules/markdown-it/lib/rules_block/table.js\"), ['paragraph', 'reference']], ['code', __webpack_require__(/*! ./rules_block/code */ \"./node_modules/markdown-it/lib/rules_block/code.js\")], ['fence', __webpack_require__(/*! ./rules_block/fence */ \"./node_modules/markdown-it/lib/rules_block/fence.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['blockquote', __webpack_require__(/*! ./rules_block/blockquote */ \"./node_modules/markdown-it/lib/rules_block/blockquote.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['hr', __webpack_require__(/*! ./rules_block/hr */ \"./node_modules/markdown-it/lib/rules_block/hr.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['list', __webpack_require__(/*! ./rules_block/list */ \"./node_modules/markdown-it/lib/rules_block/list.js\"), ['paragraph', 'reference', 'blockquote']], ['reference', __webpack_require__(/*! ./rules_block/reference */ \"./node_modules/markdown-it/lib/rules_block/reference.js\")], ['heading', __webpack_require__(/*! ./rules_block/heading */ \"./node_modules/markdown-it/lib/rules_block/heading.js\"), ['paragraph', 'reference', 'blockquote']], ['lheading', __webpack_require__(/*! ./rules_block/lheading */ \"./node_modules/markdown-it/lib/rules_block/lheading.js\")], ['html_block', __webpack_require__(/*! ./rules_block/html_block */ \"./node_modules/markdown-it/lib/rules_block/html_block.js\"), ['paragraph', 'reference', 'blockquote']], ['paragraph', __webpack_require__(/*! ./rules_block/paragraph */ \"./node_modules/markdown-it/lib/rules_block/paragraph.js\")]];\n/**\n * new ParserBlock()\n **/\n\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], {\n alt: (_rules[i][2] || []).slice()\n });\n }\n} // Generate tokens for input range\n//\n\n\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok,\n i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n\n if (line >= endLine) {\n break;\n } // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n\n\n if (state.sCount[line] < state.blkIndent) {\n break;\n } // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n\n\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n } // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n\n if (ok) {\n break;\n }\n } // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n\n\n state.tight = !hasEmptyLines; // paragraph might \"eat\" one newline after it in nested lists\n\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\n\n\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) {\n return;\n }\n\n state = new this.State(src, md, env, outTokens);\n this.tokenize(state, state.line, state.lineMax);\n};\n\nParserBlock.prototype.State = __webpack_require__(/*! ./rules_block/state_block */ \"./node_modules/markdown-it/lib/rules_block/state_block.js\");\nmodule.exports = ParserBlock;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_block.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/parser_core.js": /*!*****************************************************!*\ !*** ./node_modules/markdown-it/lib/parser_core.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\n\nvar _rules = [\n [ 'normalize', __webpack_require__(/*! ./rules_core/normalize */ \"./node_modules/markdown-it/lib/rules_core/normalize.js\") ],\n [ 'block', __webpack_require__(/*! ./rules_core/block */ \"./node_modules/markdown-it/lib/rules_core/block.js\") ],\n [ 'inline', __webpack_require__(/*! ./rules_core/inline */ \"./node_modules/markdown-it/lib/rules_core/inline.js\") ],\n [ 'linkify', __webpack_require__(/*! ./rules_core/linkify */ \"./node_modules/markdown-it/lib/rules_core/linkify.js\") ],\n [ 'replacements', __webpack_require__(/*! ./rules_core/replacements */ \"./node_modules/markdown-it/lib/rules_core/replacements.js\") ],\n [ 'smartquotes', __webpack_require__(/*! ./rules_core/smartquotes */ \"./node_modules/markdown-it/lib/rules_core/smartquotes.js\") ]\n];\n\n\n/**\n * new Core()\n **/\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n var i, l, rules;\n\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = __webpack_require__(/*! ./rules_core/state_core */ \"./node_modules/markdown-it/lib/rules_core/state_core.js\");\n\n\nmodule.exports = Core;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_core.js?"); +eval("/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\nvar _rules = [['normalize', __webpack_require__(/*! ./rules_core/normalize */ \"./node_modules/markdown-it/lib/rules_core/normalize.js\")], ['block', __webpack_require__(/*! ./rules_core/block */ \"./node_modules/markdown-it/lib/rules_core/block.js\")], ['inline', __webpack_require__(/*! ./rules_core/inline */ \"./node_modules/markdown-it/lib/rules_core/inline.js\")], ['linkify', __webpack_require__(/*! ./rules_core/linkify */ \"./node_modules/markdown-it/lib/rules_core/linkify.js\")], ['replacements', __webpack_require__(/*! ./rules_core/replacements */ \"./node_modules/markdown-it/lib/rules_core/replacements.js\")], ['smartquotes', __webpack_require__(/*! ./rules_core/smartquotes */ \"./node_modules/markdown-it/lib/rules_core/smartquotes.js\")]];\n/**\n * new Core()\n **/\n\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\n\n\nCore.prototype.process = function (state) {\n var i, l, rules;\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = __webpack_require__(/*! ./rules_core/state_core */ \"./node_modules/markdown-it/lib/rules_core/state_core.js\");\nmodule.exports = Core;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_core.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/parser_inline.js": /*!*******************************************************!*\ !*** ./node_modules/markdown-it/lib/parser_inline.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\nvar _rules = [\n [ 'text', __webpack_require__(/*! ./rules_inline/text */ \"./node_modules/markdown-it/lib/rules_inline/text.js\") ],\n [ 'newline', __webpack_require__(/*! ./rules_inline/newline */ \"./node_modules/markdown-it/lib/rules_inline/newline.js\") ],\n [ 'escape', __webpack_require__(/*! ./rules_inline/escape */ \"./node_modules/markdown-it/lib/rules_inline/escape.js\") ],\n [ 'backticks', __webpack_require__(/*! ./rules_inline/backticks */ \"./node_modules/markdown-it/lib/rules_inline/backticks.js\") ],\n [ 'strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").tokenize ],\n [ 'emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").tokenize ],\n [ 'link', __webpack_require__(/*! ./rules_inline/link */ \"./node_modules/markdown-it/lib/rules_inline/link.js\") ],\n [ 'image', __webpack_require__(/*! ./rules_inline/image */ \"./node_modules/markdown-it/lib/rules_inline/image.js\") ],\n [ 'autolink', __webpack_require__(/*! ./rules_inline/autolink */ \"./node_modules/markdown-it/lib/rules_inline/autolink.js\") ],\n [ 'html_inline', __webpack_require__(/*! ./rules_inline/html_inline */ \"./node_modules/markdown-it/lib/rules_inline/html_inline.js\") ],\n [ 'entity', __webpack_require__(/*! ./rules_inline/entity */ \"./node_modules/markdown-it/lib/rules_inline/entity.js\") ]\n];\n\nvar _rules2 = [\n [ 'balance_pairs', __webpack_require__(/*! ./rules_inline/balance_pairs */ \"./node_modules/markdown-it/lib/rules_inline/balance_pairs.js\") ],\n [ 'strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").postProcess ],\n [ 'emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").postProcess ],\n [ 'text_collapse', __webpack_require__(/*! ./rules_inline/text_collapse */ \"./node_modules/markdown-it/lib/rules_inline/text_collapse.js\") ]\n];\n\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline() {\n var i;\n\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n}\n\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n var ok, i, pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) { break; }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) { state.pos++; }\n cache[pos] = state.pos;\n};\n\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n if (ok) { break; }\n }\n }\n\n if (ok) {\n if (state.pos >= end) { break; }\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n\n this.tokenize(state);\n\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\n\nParserInline.prototype.State = __webpack_require__(/*! ./rules_inline/state_inline */ \"./node_modules/markdown-it/lib/rules_inline/state_inline.js\");\n\n\nmodule.exports = ParserInline;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_inline.js?"); +eval("/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\"); ////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\n\nvar _rules = [['text', __webpack_require__(/*! ./rules_inline/text */ \"./node_modules/markdown-it/lib/rules_inline/text.js\")], ['newline', __webpack_require__(/*! ./rules_inline/newline */ \"./node_modules/markdown-it/lib/rules_inline/newline.js\")], ['escape', __webpack_require__(/*! ./rules_inline/escape */ \"./node_modules/markdown-it/lib/rules_inline/escape.js\")], ['backticks', __webpack_require__(/*! ./rules_inline/backticks */ \"./node_modules/markdown-it/lib/rules_inline/backticks.js\")], ['strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").tokenize], ['emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").tokenize], ['link', __webpack_require__(/*! ./rules_inline/link */ \"./node_modules/markdown-it/lib/rules_inline/link.js\")], ['image', __webpack_require__(/*! ./rules_inline/image */ \"./node_modules/markdown-it/lib/rules_inline/image.js\")], ['autolink', __webpack_require__(/*! ./rules_inline/autolink */ \"./node_modules/markdown-it/lib/rules_inline/autolink.js\")], ['html_inline', __webpack_require__(/*! ./rules_inline/html_inline */ \"./node_modules/markdown-it/lib/rules_inline/html_inline.js\")], ['entity', __webpack_require__(/*! ./rules_inline/entity */ \"./node_modules/markdown-it/lib/rules_inline/entity.js\")]];\nvar _rules2 = [['balance_pairs', __webpack_require__(/*! ./rules_inline/balance_pairs */ \"./node_modules/markdown-it/lib/rules_inline/balance_pairs.js\")], ['strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").postProcess], ['emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").postProcess], ['text_collapse', __webpack_require__(/*! ./rules_inline/text_collapse */ \"./node_modules/markdown-it/lib/rules_inline/text_collapse.js\")]];\n/**\n * new ParserInline()\n **/\n\nfunction ParserInline() {\n var i;\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n\n\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n} // Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\n\n\nParserInline.prototype.skipToken = function (state) {\n var ok,\n i,\n pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) {\n break;\n }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) {\n state.pos++;\n }\n\n cache[pos] = state.pos;\n}; // Generate tokens for input range\n//\n\n\nParserInline.prototype.tokenize = function (state) {\n var ok,\n i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n\n if (ok) {\n break;\n }\n }\n }\n\n if (ok) {\n if (state.pos >= end) {\n break;\n }\n\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\n\n\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n this.tokenize(state);\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\nParserInline.prototype.State = __webpack_require__(/*! ./rules_inline/state_inline */ \"./node_modules/markdown-it/lib/rules_inline/state_inline.js\");\nmodule.exports = ParserInline;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_inline.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/presets/commonmark.js": /*!************************************************************!*\ !*** ./node_modules/markdown-it/lib/presets/commonmark.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Commonmark default options\n\n\n\n\nmodule.exports = {\n options: {\n html: true, // Enable HTML tags in source\n xhtmlOut: true, // Use '/' to close single tags (
)\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with ' +\n escapeHtml(tokens[idx].content) +\n '';\n};\n\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '' +\n escapeHtml(tokens[idx].content) +\n '\\n';\n};\n\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n highlighted, i, tmpAttrs, tmpToken;\n\n if (info) {\n langName = info.split(/\\s+/g)[0];\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf(''\n + highlighted\n + '\\n';\n }\n\n\n return '

'\n        + highlighted\n        + '
\\n';\n};\n\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] =\n slf.renderInlineAsText(token.children, options, env);\n\n return slf.renderToken(tokens, idx, options);\n};\n\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '
\\n' : '
\\n';\n};\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '
\\n' : '
\\n') : '\\n';\n};\n\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer() {\n\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return ''; };\n * md.renderer.rules.strong_close = function () { return ''; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) { return ''; }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx];\n\n // Tight list paragraphs\n if (token.hidden) {\n return '';\n }\n\n // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n }\n\n // Add token name, e.g. ``.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n\n return result;\n};\n\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n }\n }\n\n return result;\n};\n\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n var i, len, type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[tokens[i].type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/renderer.js?"); +eval("/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n\n\nvar assign = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").assign;\n\nvar unescapeAll = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\nvar escapeHtml = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").escapeHtml; ////////////////////////////////////////////////////////////////////////////////\n\n\nvar default_rules = {};\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n return '' + escapeHtml(tokens[idx].content) + '\\n';\n};\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n langAttrs = '',\n highlighted,\n i,\n arr,\n tmpAttrs,\n tmpToken;\n\n if (info) {\n arr = info.split(/(\\s+)/g);\n langName = arr[0];\n langAttrs = arr.slice(2).join('');\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf('' + highlighted + '\\n';\n }\n\n return '
' + highlighted + '
\\n';\n};\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx]; // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env);\n return slf.renderToken(tokens, idx, options);\n};\n\ndefault_rules.hardbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.xhtmlOut ? '
\\n' : '
\\n';\n};\n\ndefault_rules.softbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.breaks ? options.xhtmlOut ? '
\\n' : '
\\n' : '\\n';\n};\n\ndefault_rules.text = function (tokens, idx\n/*, options, env */\n) {\n return escapeHtml(tokens[idx].content);\n};\n\ndefault_rules.html_block = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n\ndefault_rules.html_inline = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\n\n\nfunction Renderer() {\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return ''; };\n * md.renderer.rules.strong_close = function () { return ''; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\n\n\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) {\n return '';\n }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\n\n\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx]; // Tight list paragraphs\n\n if (token.hidden) {\n return '';\n } // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n\n\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n } // Add token name, e.g. ``.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n return result;\n};\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\n\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\n\n\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n }\n }\n\n return result;\n};\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\n\n\nRenderer.prototype.render = function (tokens, options, env) {\n var i,\n len,\n type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[tokens[i].type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/renderer.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/ruler.js": /*!***********************************************!*\ !*** ./node_modules/markdown-it/lib/ruler.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n\n\n\n/**\n * new Ruler()\n **/\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n if (chain && rule.alt.indexOf(chain) < 0) { return; }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + name); }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n this.__rules__.forEach(function (rule) { rule.enabled = false; });\n\n this.enable(list, ignoreInvalid);\n};\n\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n\n // Chain can be empty, if rules disabled. But we still have to return Array.\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/ruler.js?"); +eval("/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n\n/**\n * new Ruler()\n **/\n\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = []; // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n\n this.__cache__ = null;\n} ////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n// Find rule index by name\n//\n\n\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n\n return -1;\n}; // Build rules lookup cache\n//\n\n\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = ['']; // collect unique names\n\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n if (chain && rule.alt.indexOf(chain) < 0) {\n return;\n }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + name);\n }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + beforeName);\n }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + afterName);\n }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\n\n\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n var result = []; // Search by name and enable\n\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) {\n return;\n }\n\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n this.__cache__ = null;\n return result;\n};\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\n\n\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n this.__rules__.forEach(function (rule) {\n rule.enabled = false;\n });\n\n this.enable(list, ignoreInvalid);\n};\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\n\n\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n var result = []; // Search by name and disable\n\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) {\n return;\n }\n\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n this.__cache__ = null;\n return result;\n};\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\n\n\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n } // Chain can be empty, if rules disabled. But we still have to return Array.\n\n\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/ruler.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/blockquote.js": /*!****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/blockquote.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Block quotes\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n wasOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }\n\n // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n if (silent) { return true; }\n\n // skip spaces after \">\" and re-calculate offset\n initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[startLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks = [ state.bMarks[startLine] ];\n state.bMarks[startLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n oldBSCount = [ state.bsCount[startLine] ];\n state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n lastLineEmpty = pos >= max;\n\n oldSCount = [ state.sCount[startLine] ];\n state.sCount[startLine] = offset - initial;\n\n oldTShift = [ state.tShift[startLine] ];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n wasOutdented = false;\n\n // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n if (state.sCount[nextLine] < state.blkIndent) wasOutdented = true;\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !wasOutdented) {\n // This line is inside the blockquote.\n\n // skip spaces after \">\" and re-calculate offset\n initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) { break; }\n\n // Case 3: another tag found.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n\n // A negative indentation means that this is a paragraph continuation\n //\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [ startLine, 0 ];\n\n state.md.block.tokenize(state, startLine, nextLine);\n\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n state.blkIndent = oldIndent;\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/blockquote.js?"); +eval("// Block quotes\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n isOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n } // check the block quote marker\n\n\n if (state.src.charCodeAt(pos++) !== 0x3E\n /* > */\n ) {\n return false;\n } // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n\n\n if (silent) {\n return true;\n } // set offset past spaces and \">\"\n\n\n initial = offset = state.sCount[startLine] + 1; // skip one optional space after '>'\n\n if (state.src.charCodeAt(pos) === 0x20\n /* space */\n ) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09\n /* tab */\n ) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[startLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks = [state.bMarks[startLine]];\n state.bMarks[startLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n oldBSCount = [state.bsCount[startLine]];\n state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);\n lastLineEmpty = pos >= max;\n oldSCount = [state.sCount[startLine]];\n state.sCount[startLine] = offset - initial;\n oldTShift = [state.tShift[startLine]];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n oldParentType = state.parentType;\n state.parentType = 'blockquote'; // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n isOutdented = state.sCount[nextLine] < state.blkIndent;\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E\n /* > */\n && !isOutdented) {\n // This line is inside the blockquote.\n // set offset past spaces and \">\"\n initial = offset = state.sCount[nextLine] + 1; // skip one optional space after '>'\n\n if (state.src.charCodeAt(pos) === 0x20\n /* space */\n ) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09\n /* tab */\n ) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n } // Case 2: line is not inside the blockquote, and the last line was empty.\n\n\n if (lastLineEmpty) {\n break;\n } // Case 3: another tag found.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]); // A negative indentation means that this is a paragraph continuation\n //\n\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [startLine, 0];\n state.md.block.tokenize(state, startLine, nextLine);\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line; // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n\n state.blkIndent = oldIndent;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/blockquote.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/code.js": /*!**********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/code.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Code block (4 spaces padded)\n\n\n\n\nmodule.exports = function code(state, startLine, endLine/*, silent*/) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) { return false; }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n\n state.line = last;\n\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);\n token.map = [ startLine, state.line ];\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/code.js?"); +eval("// Code block (4 spaces padded)\n\n\nmodule.exports = function code(state, startLine, endLine\n/*, silent*/\n) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) {\n return false;\n }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n\n break;\n }\n\n state.line = last;\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);\n token.map = [startLine, state.line];\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/code.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/fence.js": /*!***********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/fence.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// fences (``` lang, ~~~ lang)\n\n\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker, len, params, nextLine, mem, token, markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (pos + 3 > max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n\n len = pos - mem;\n\n if (len < 3) { return false; }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60 /* ` */) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n }\n\n // Since start is found, we can report success here in validation mode\n if (silent) { return true; }\n\n // search end of block\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) { continue; }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) { continue; }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n\n if (pos < max) { continue; }\n\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.sCount[startLine];\n\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [ startLine, state.line ];\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/fence.js?"); +eval("// fences (``` lang, ~~~ lang)\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker,\n len,\n params,\n nextLine,\n mem,\n token,\n markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (pos + 3 > max) {\n return false;\n }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E\n /* ~ */\n && marker !== 0x60\n /* ` */\n ) {\n return false;\n } // scan marker length\n\n\n mem = pos;\n pos = state.skipChars(pos, marker);\n len = pos - mem;\n\n if (len < 3) {\n return false;\n }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60\n /* ` */\n ) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n } // Since start is found, we can report success here in validation mode\n\n\n if (silent) {\n return true;\n } // search end of block\n\n\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) {\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker); // closing code fence must be at least as long as the opening one\n\n if (pos - mem < len) {\n continue;\n } // make sure tail has spaces only\n\n\n pos = state.skipSpaces(pos);\n\n if (pos < max) {\n continue;\n }\n\n haveEndMarker = true; // found!\n\n break;\n } // If a fence has heading spaces, they should be removed from its inner block\n\n\n len = state.sCount[startLine];\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [startLine, state.line];\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/fence.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/heading.js": /*!*************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/heading.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// heading (#, ##, ...)\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch, level, tmp, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23/* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || (pos < max && !isSpace(ch))) { return false; }\n\n if (silent) { return true; }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/heading.js?"); +eval("// heading (#, ##, ...)\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch,\n level,\n tmp,\n token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23\n /* # */\n || pos >= max) {\n return false;\n } // count heading level\n\n\n level = 1;\n ch = state.src.charCodeAt(++pos);\n\n while (ch === 0x23\n /* # */\n && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || pos < max && !isSpace(ch)) {\n return false;\n }\n\n if (silent) {\n return true;\n } // Let's cut tails like ' ### ' from the end of string\n\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [startLine, state.line];\n token.children = [];\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/heading.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/hr.js": /*!********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/hr.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Horizontal rule\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker, cnt, ch, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x5F/* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 of them\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && !isSpace(ch)) { return false; }\n if (ch === marker) { cnt++; }\n }\n\n if (cnt < 3) { return false; }\n\n if (silent) { return true; }\n\n state.line = startLine + 1;\n\n token = state.push('hr', 'hr', 0);\n token.map = [ startLine, state.line ];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/hr.js?"); +eval("// Horizontal rule\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker,\n cnt,\n ch,\n token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n marker = state.src.charCodeAt(pos++); // Check hr marker\n\n if (marker !== 0x2A\n /* * */\n && marker !== 0x2D\n /* - */\n && marker !== 0x5F\n /* _ */\n ) {\n return false;\n } // markers can be mixed with spaces, but there should be at least 3 of them\n\n\n cnt = 1;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n\n if (ch !== marker && !isSpace(ch)) {\n return false;\n }\n\n if (ch === marker) {\n cnt++;\n }\n }\n\n if (cnt < 3) {\n return false;\n }\n\n if (silent) {\n return true;\n }\n\n state.line = startLine + 1;\n token = state.push('hr', 'hr', 0);\n token.map = [startLine, state.line];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/hr.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/html_block.js": /*!****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/html_block.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// HTML block\n\n\n\n\nvar block_names = __webpack_require__(/*! ../common/html_blocks */ \"./node_modules/markdown-it/lib/common/html_blocks.js\");\nvar HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_OPEN_CLOSE_TAG_RE;\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nvar HTML_SEQUENCES = [\n [ /^<(script|pre|style)(?=(\\s|>|$))/i, /<\\/(script|pre|style)>/i, true ],\n [ /^/, true ],\n [ /^<\\?/, /\\?>/, true ],\n [ /^/, true ],\n [ /^/, true ],\n [ new RegExp('^|$))', 'i'), /^$/, true ],\n [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false ]\n];\n\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i, nextLine, token, lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (!state.md.options.html) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) { break; }\n }\n\n if (i === HTML_SEQUENCES.length) { return false; }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1;\n\n // If we are here - we detected HTML block.\n // Let's roll down till block end.\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) { nextLine++; }\n break;\n }\n }\n }\n\n state.line = nextLine;\n\n token = state.push('html_block', '', 0);\n token.map = [ startLine, nextLine ];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/html_block.js?"); +eval("// HTML block\n\n\nvar block_names = __webpack_require__(/*! ../common/html_blocks */ \"./node_modules/markdown-it/lib/common/html_blocks.js\");\n\nvar HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_OPEN_CLOSE_TAG_RE; // An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\n\n\nvar HTML_SEQUENCES = [[/^<(script|pre|style)(?=(\\s|>|$))/i, /<\\/(script|pre|style)>/i, true], [/^/, true], [/^<\\?/, /\\?>/, true], [/^/, true], [/^/, true], [new RegExp('^|$))', 'i'), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false]];\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i,\n nextLine,\n token,\n lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (!state.md.options.html) {\n return false;\n }\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n ) {\n return false;\n }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) {\n break;\n }\n }\n\n if (i === HTML_SEQUENCES.length) {\n return false;\n }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1; // If we are here - we detected HTML block.\n // Let's roll down till block end.\n\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) {\n nextLine++;\n }\n\n break;\n }\n }\n }\n\n state.line = nextLine;\n token = state.push('html_block', '', 0);\n token.map = [startLine, nextLine];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/html_block.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/lheading.js": /*!**************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/lheading.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// lheading (---, ===)\n\n\n\n\nmodule.exports = function lheading(state, startLine, endLine/*, silent*/) {\n var content, terminate, i, l, token, pos, max, level, marker,\n nextLine = startLine + 1, oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph');\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n //\n // Check for underline in setext header\n //\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = (marker === 0x3D/* = */ ? 1 : 2);\n break;\n }\n }\n }\n }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line - 1 ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n\n state.parentType = oldParentType;\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/lheading.js?"); +eval("// lheading (---, ===)\n\n\nmodule.exports = function lheading(state, startLine, endLine\n/*, silent*/\n) {\n var content,\n terminate,\n i,\n l,\n token,\n pos,\n max,\n level,\n marker,\n nextLine = startLine + 1,\n oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph'); // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n // jump line-by-line until empty one or EOF\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } //\n // Check for underline in setext header\n //\n\n\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D\n /* - */\n || marker === 0x3D\n /* = */\n ) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = marker === 0x3D\n /* = */\n ? 1 : 2;\n break;\n }\n }\n }\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n state.line = nextLine + 1;\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [startLine, state.line - 1];\n token.children = [];\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n state.parentType = oldParentType;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/lheading.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/list.js": /*!**********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/list.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Lists\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x2B/* + */) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine];\n\n // List marker should have at least 2 chars (digit + dot)\n if (pos + 1 >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) { return -1; }\n\n continue;\n }\n\n // found valid marker\n if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n break;\n }\n\n return -1;\n }\n\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i, l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n nextLine,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n isTerminatingParagraph = false,\n tight = true;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n if (state.listIndent >= 0 &&\n state.sCount[startLine] - state.listIndent >= 4 &&\n state.sCount[startLine] < state.blkIndent) {\n return false;\n }\n\n // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.tShift[startLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n }\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));\n\n // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n if (isTerminatingParagraph && markerValue !== 1) return false;\n\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n\n } else {\n return false;\n }\n\n // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;\n }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // For validation mode we can terminate immediately\n if (silent) { return true; }\n\n // Start list\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n if (markerValue !== 1) {\n token.attrs = [ [ 'start', markerValue ] ];\n }\n\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [ startLine, 0 ];\n token.markup = String.fromCharCode(markerCharCode);\n\n //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = initial + indentAfterMarker;\n\n // Run subparser & write tokens\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [ startLine, 0 ];\n\n // change current state, then restore it after parser subcall\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldSCount = state.sCount[startLine];\n\n // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n\n state.tight = true;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.sCount[startLine] = offset;\n\n if (contentStart >= max && state.isEmpty(startLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, startLine, endLine, true);\n }\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);\n\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[startLine] = oldTShift;\n state.sCount[startLine] = oldSCount;\n state.tight = oldTight;\n\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) { break; }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { break; }\n\n // fail if terminating block found\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n }\n\n // Finalize list\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n token.markup = String.fromCharCode(markerCharCode);\n\n listLines[1] = nextLine;\n state.line = nextLine;\n\n state.parentType = oldParentType;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/list.js?"); +eval("// Lists\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace; // Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\n\n\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n marker = state.src.charCodeAt(pos++); // Check bullet\n\n if (marker !== 0x2A\n /* * */\n && marker !== 0x2D\n /* - */\n && marker !== 0x2B\n /* + */\n ) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n} // Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\n\n\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine]; // List marker should have at least 2 chars (digit + dot)\n\n if (pos + 1 >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30\n /* 0 */\n || ch > 0x39\n /* 9 */\n ) {\n return -1;\n }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30\n /* 0 */\n && ch <= 0x39\n /* 9 */\n ) {\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) {\n return -1;\n }\n\n continue;\n } // found valid marker\n\n\n if (ch === 0x29\n /* ) */\n || ch === 0x2e\n /* . */\n ) {\n break;\n }\n\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i,\n l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n nextLine,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n isTerminatingParagraph = false,\n tight = true; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n } // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n\n\n if (state.listIndent >= 0 && state.sCount[startLine] - state.listIndent >= 4 && state.sCount[startLine] < state.blkIndent) {\n return false;\n } // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n\n\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.tShift[startLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n } // Detect list type and position after marker\n\n\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1)); // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n\n if (isTerminatingParagraph && markerValue !== 1) return false;\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n } else {\n return false;\n } // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n\n\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;\n } // We should terminate list on style change. Remember first one to compare.\n\n\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1); // For validation mode we can terminate immediately\n\n if (silent) {\n return true;\n } // Start list\n\n\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n\n if (markerValue !== 1) {\n token.attrs = [['start', markerValue]];\n }\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [startLine, 0];\n token.markup = String.fromCharCode(markerCharCode); //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n } // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n\n\n if (indentAfterMarker > 4) {\n indentAfterMarker = 1;\n } // \" - test\"\n // ^^^^^ - calculating total length of this thing\n\n\n indent = initial + indentAfterMarker; // Run subparser & write tokens\n\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [startLine, 0]; // change current state, then restore it after parser subcall\n\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldSCount = state.sCount[startLine]; // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n state.tight = true;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.sCount[startLine] = offset;\n\n if (contentStart >= max && state.isEmpty(startLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, startLine, endLine, true);\n } // If any of list item is tight, mark list as tight\n\n\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n } // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n\n\n prevEmptyEnd = state.line - startLine > 1 && state.isEmpty(state.line - 1);\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[startLine] = oldTShift;\n state.sCount[startLine] = oldSCount;\n state.tight = oldTight;\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) {\n break;\n } //\n // Try to check if list is terminated or continued.\n //\n\n\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n } // if it's indented more than 3 spaces, it should be a code block\n\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n break;\n } // fail if terminating block found\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n } // fail if list has another type\n\n\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {\n break;\n }\n } // Finalize list\n\n\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n\n token.markup = String.fromCharCode(markerCharCode);\n listLines[1] = nextLine;\n state.line = nextLine;\n state.parentType = oldParentType; // mark paragraphs tight if needed\n\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/list.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/paragraph.js": /*!***************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/paragraph.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Paragraph\n\n\n\n\nmodule.exports = function paragraph(state, startLine/*, endLine*/) {\n var content, terminate, i, l, token, oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph'),\n endLine = state.lineMax;\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph';\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine;\n\n token = state.push('paragraph_open', 'p', 1);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('paragraph_close', 'p', -1);\n\n state.parentType = oldParentType;\n\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/paragraph.js?"); +eval("// Paragraph\n\n\nmodule.exports = function paragraph(state, startLine\n/*, endLine*/\n) {\n var content,\n terminate,\n i,\n l,\n token,\n oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph'),\n endLine = state.lineMax;\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // jump line-by-line until empty one or EOF\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n state.line = nextLine;\n token = state.push('paragraph_open', 'p', 1);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [startLine, state.line];\n token.children = [];\n token = state.push('paragraph_close', 'p', -1);\n state.parentType = oldParentType;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/paragraph.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/reference.js": /*!***************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/reference.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }\n\n // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&\n state.src.charCodeAt(pos - 1) !== 0x5C/* \\ */) {\n if (pos + 1 === max) { return false; }\n if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }\n break;\n }\n }\n\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n terminatorRules = state.md.block.ruler.getRules('reference');\n\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x5B /* [ */) {\n return false;\n } else if (ch === 0x5D /* ] */) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A /* \\n */) {\n lines++;\n } else if (ch === 0x5C /* \\ */) {\n pos++;\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n if (!res.ok) { return false; }\n\n href = state.md.normalizeLink(res.str);\n if (!state.md.validateLink(href)) { return false; }\n\n pos = res.pos;\n lines += res.lines;\n\n // save cursor state, we could require to rollback later\n destEndPos = pos;\n destEndLineNo = lines;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n }\n\n // skip trailing spaces until the rest of the line\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n }\n\n // Reference can not terminate anything. This check is for safety only.\n /*istanbul ignore if*/\n if (silent) { return true; }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = { title: title, href: href };\n }\n\n state.parentType = oldParentType;\n\n state.line = startLine + lines + 1;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/reference.js?"); +eval("\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (state.src.charCodeAt(pos) !== 0x5B\n /* [ */\n ) {\n return false;\n } // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n\n\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D\n /* ] */\n && state.src.charCodeAt(pos - 1) !== 0x5C\n /* \\ */\n ) {\n if (pos + 1 === max) {\n return false;\n }\n\n if (state.src.charCodeAt(pos + 1) !== 0x3A\n /* : */\n ) {\n return false;\n }\n\n break;\n }\n }\n\n endLine = state.lineMax; // jump line-by-line until empty one or EOF\n\n terminatorRules = state.md.block.ruler.getRules('reference');\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x5B\n /* [ */\n ) {\n return false;\n } else if (ch === 0x5D\n /* ] */\n ) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A\n /* \\n */\n ) {\n lines++;\n } else if (ch === 0x5C\n /* \\ */\n ) {\n pos++;\n\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A\n /* : */\n ) {\n return false;\n } // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n\n\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n } // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n\n\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n\n if (!res.ok) {\n return false;\n }\n\n href = state.md.normalizeLink(res.str);\n\n if (!state.md.validateLink(href)) {\n return false;\n }\n\n pos = res.pos;\n lines += res.lines; // save cursor state, we could require to rollback later\n\n destEndPos = pos;\n destEndLineNo = lines; // [label]: destination 'title'\n // ^^^ skipping those spaces\n\n start = pos;\n\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n } // [label]: destination 'title'\n // ^^^^^^^ parse this\n\n\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n } // skip trailing spaces until the rest of the line\n\n\n while (pos < max) {\n ch = str.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n\n while (pos < max) {\n ch = str.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n } // Reference can not terminate anything. This check is for safety only.\n\n /*istanbul ignore if*/\n\n\n if (silent) {\n return true;\n }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = {\n title: title,\n href: href\n };\n }\n\n state.parentType = oldParentType;\n state.line = startLine + lines + 1;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/reference.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/state_block.js": /*!*****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/state_block.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Parser state class\n\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n\n this.src = src;\n\n // link to parser instance\n this.md = md;\n\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n this.sCount = []; // indents for each line (tabs expanded)\n\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n this.bsCount = [];\n\n // block parser variables\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n this.parentType = 'root';\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++; }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n\n if (nesting < 0) this.level--; // closing tag\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n }\n return pos;\n};\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break; }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i, lineIndent, ch, first, last, queue, lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n};\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token;\n\n\nmodule.exports = StateBlock;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/state_block.js?"); +eval("// Parser state class\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n this.src = src; // link to parser instance\n\n this.md = md;\n this.env = env; //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n this.bMarks = []; // line begin offsets for fast jumps\n\n this.eMarks = []; // line end offsets for fast jumps\n\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n\n this.sCount = []; // indents for each line (tabs expanded)\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n\n this.bsCount = []; // block parser variables\n\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n\n this.line = 0; // line index in src\n\n this.lineMax = 0; // lines count\n\n this.tight = false; // loose/tight mode for lists\n\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n\n this.parentType = 'root';\n this.level = 0; // renderer\n\n this.result = ''; // Create caches\n // Generate markers.\n\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) {\n pos++;\n }\n\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n } // Push fake entry to simplify cache bounds checks\n\n\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n} // Push new token to \"stream\".\n//\n\n\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n if (nesting < 0) this.level--; // closing tag\n\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n\n return from;\n}; // Skip spaces from given position.\n\n\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n }\n\n return pos;\n}; // Skip spaces from given position in reverse.\n\n\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) {\n return pos;\n }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) {\n return pos + 1;\n }\n }\n\n return pos;\n}; // Skip char codes from given position\n\n\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) {\n break;\n }\n }\n\n return pos;\n}; // Skip char codes reverse from given position - 1\n\n\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) {\n return pos;\n }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) {\n return pos + 1;\n }\n }\n\n return pos;\n}; // cut lines range from source.\n\n\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i,\n lineIndent,\n ch,\n first,\n last,\n queue,\n lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n}; // re-export Token class to use in block rules\n\n\nStateBlock.prototype.Token = Token;\nmodule.exports = StateBlock;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/state_block.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_block/table.js": /*!***********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_block/table.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// GFM table, non-standard\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.blkIndent,\n max = state.eMarks[line];\n\n return state.src.substr(pos, max - pos);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n escapes = 0,\n lastPos = 0,\n backTicked = false,\n lastBackTick = 0;\n\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x60/* ` */) {\n if (backTicked) {\n // make \\` close code sequence, but not open it;\n // the reason is: `\\` is correct code block\n backTicked = false;\n lastBackTick = pos;\n } else if (escapes % 2 === 0) {\n backTicked = true;\n lastBackTick = pos;\n }\n } else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {\n result.push(str.substring(lastPos, pos));\n lastPos = pos + 1;\n }\n\n if (ch === 0x5c/* \\ */) {\n escapes++;\n } else {\n escapes = 0;\n }\n\n pos++;\n\n // If there was an un-closed backtick, go back to just after\n // the last backtick, but as if it was a normal character\n if (pos === max && backTicked) {\n backTicked = false;\n pos = lastBackTick + 1;\n }\n\n ch = str.charCodeAt(pos);\n }\n\n result.push(str.substring(lastPos));\n\n return result;\n}\n\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, nextLine, columns, columnCount, token,\n aligns, t, tableLines, tbodyLines;\n\n // should have at least two lines\n if (startLine + 2 > endLine) { return false; }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) { return false; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }\n\n // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n ch = state.src.charCodeAt(pos++);\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n\n columns = lineText.split('|');\n aligns = [];\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) { return false; }\n if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A/* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) { return false; }\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n columns = escapedSplit(lineText.replace(/^\\||\\|$/g, ''));\n\n // header row will define an amount of columns in the entire table,\n // and align row shouldn't be smaller than that (the rest of the rows can)\n columnCount = columns.length;\n if (columnCount > aligns.length) { return false; }\n\n if (silent) { return true; }\n\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [ startLine, 0 ];\n\n token = state.push('thead_open', 'thead', 1);\n token.map = [ startLine, startLine + 1 ];\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ startLine, startLine + 1 ];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n token.map = [ startLine, startLine + 1 ];\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.map = [ startLine, startLine + 1 ];\n token.children = [];\n\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [ startLine + 2, 0 ];\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n lineText = getLine(state, nextLine).trim();\n if (lineText.indexOf('|') === -1) { break; }\n if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }\n columns = escapedSplit(lineText.replace(/^\\||\\|$/g, ''));\n\n token = state.push('tr_open', 'tr', 1);\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n\n token = state.push('td_close', 'td', -1);\n }\n token = state.push('tr_close', 'tr', -1);\n }\n token = state.push('tbody_close', 'tbody', -1);\n token = state.push('table_close', 'table', -1);\n\n tableLines[1] = tbodyLines[1] = nextLine;\n state.line = nextLine;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/table.js?"); +eval("// GFM table, https://github.github.com/gfm/#tables-extension-\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n return state.src.substr(pos, max - pos);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n isEscaped = false,\n lastPos = 0,\n current = '';\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x7c\n /* | */\n ) {\n if (!isEscaped) {\n // pipe separating cells, '|'\n result.push(current + str.substring(lastPos, pos));\n current = '';\n lastPos = pos + 1;\n } else {\n // escaped pipe, '\\|'\n current += str.substring(lastPos, pos - 1);\n lastPos = pos;\n }\n }\n\n isEscaped = ch === 0x5c\n /* \\ */\n ;\n pos++;\n ch = str.charCodeAt(pos);\n }\n\n result.push(current + str.substring(lastPos));\n return result;\n}\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, l, nextLine, columns, columnCount, token, aligns, t, tableLines, tbodyLines, oldParentType, terminate, terminatorRules; // should have at least two lines\n\n if (startLine + 2 > endLine) {\n return false;\n }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) {\n return false;\n } // if it's indented more than 3 spaces, it should be a code block\n\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n return false;\n } // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n\n if (pos >= state.eMarks[nextLine]) {\n return false;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch !== 0x7C\n /* | */\n && ch !== 0x2D\n /* - */\n && ch !== 0x3A\n /* : */\n ) {\n return false;\n }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C\n /* | */\n && ch !== 0x2D\n /* - */\n && ch !== 0x3A\n /* : */\n && !isSpace(ch)) {\n return false;\n }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n columns = lineText.split('|');\n aligns = [];\n\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) {\n return false;\n }\n\n if (t.charCodeAt(t.length - 1) === 0x3A\n /* : */\n ) {\n aligns.push(t.charCodeAt(0) === 0x3A\n /* : */\n ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A\n /* : */\n ) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n\n if (lineText.indexOf('|') === -1) {\n return false;\n }\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop(); // header row will define an amount of columns in the entire table,\n // and align row should be exactly the same (the rest of the rows can differ)\n\n columnCount = columns.length;\n\n if (columnCount === 0 || columnCount !== aligns.length) {\n return false;\n }\n\n if (silent) {\n return true;\n }\n\n oldParentType = state.parentType;\n state.parentType = 'table'; // use 'blockquote' lists for termination because it's\n // the most similar to tables\n\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [startLine, 0];\n token = state.push('thead_open', 'thead', 1);\n token.map = [startLine, startLine + 1];\n token = state.push('tr_open', 'tr', 1);\n token.map = [startLine, startLine + 1];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n\n if (aligns[i]) {\n token.attrs = [['style', 'text-align:' + aligns[i]]];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.children = [];\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n }\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n\n lineText = getLine(state, nextLine).trim();\n\n if (!lineText) {\n break;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n break;\n }\n\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n if (nextLine === startLine + 2) {\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [startLine + 2, 0];\n }\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [nextLine, nextLine + 1];\n\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n\n if (aligns[i]) {\n token.attrs = [['style', 'text-align:' + aligns[i]]];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n token = state.push('td_close', 'td', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n }\n\n if (tbodyLines) {\n token = state.push('tbody_close', 'tbody', -1);\n tbodyLines[1] = nextLine;\n }\n\n token = state.push('table_close', 'table', -1);\n tableLines[1] = nextLine;\n state.parentType = oldParentType;\n state.line = nextLine;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/table.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/block.js": /*!**********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/block.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [ 0, 1 ];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/block.js?"); +eval("\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [0, 1];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/block.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/inline.js": /*!***********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/inline.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/inline.js?"); +eval("\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens,\n tok,\n i,\n l; // Parse inlines\n\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/inline.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/linkify.js": /*!************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/linkify.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n\n\n\nvar arrayReplaceAt = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").arrayReplaceAt;\n\n\nfunction isLinkOpen(str) {\n return /^\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nmodule.exports = function linkify(state) {\n var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,\n level, htmlLinkLevel, url, fullUrl, urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) { return; }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' ||\n !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n\n htmlLinkLevel = 0;\n\n // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i];\n\n // Skip content of markdown links\n if (currentToken.type === 'link_close') {\n i--;\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n continue;\n }\n\n // Skip content of html tag links\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n if (htmlLinkLevel > 0) { continue; }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n\n text = currentToken.content;\n links = state.md.linkify.match(text);\n\n // Now split string to nodes\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n for (ln = 0; ln < links.length; ln++) {\n\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { continue; }\n\n urlText = links[ln].text;\n\n // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n lastPos = links[ln].lastIndex;\n }\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n }\n\n // replace current node\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/linkify.js?"); +eval("// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n\n\nvar arrayReplaceAt = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").arrayReplaceAt;\n\nfunction isLinkOpen(str) {\n return /^\\s]/i.test(str);\n}\n\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\nmodule.exports = function linkify(state) {\n var i,\n j,\n l,\n tokens,\n token,\n currentToken,\n nodes,\n ln,\n text,\n pos,\n lastPos,\n level,\n htmlLinkLevel,\n url,\n fullUrl,\n urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) {\n return;\n }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n htmlLinkLevel = 0; // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i]; // Skip content of markdown links\n\n if (currentToken.type === 'link_close') {\n i--;\n\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n\n continue;\n } // Skip content of html tag links\n\n\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n\n if (htmlLinkLevel > 0) {\n continue;\n }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n text = currentToken.content;\n links = state.md.linkify.match(text); // Now split string to nodes\n\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n for (ln = 0; ln < links.length; ln++) {\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n\n if (!state.md.validateLink(fullUrl)) {\n continue;\n }\n\n urlText = links[ln].text; // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n lastPos = links[ln].lastIndex;\n }\n\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n } // replace current node\n\n\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/linkify.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/normalize.js": /*!**************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/normalize.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Normalize input string\n\n\n\n\n// https://spec.commonmark.org/0.29/#line-ending\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\n\nmodule.exports = function normalize(state) {\n var str;\n\n // Normalize newlines\n str = state.src.replace(NEWLINES_RE, '\\n');\n\n // Replace NULL characters\n str = str.replace(NULL_RE, '\\uFFFD');\n\n state.src = str;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/normalize.js?"); +eval("// Normalize input string\n // https://spec.commonmark.org/0.29/#line-ending\n\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\nmodule.exports = function normalize(state) {\n var str; // Normalize newlines\n\n str = state.src.replace(NEWLINES_RE, '\\n'); // Replace NULL characters\n\n str = str.replace(NULL_RE, \"\\uFFFD\");\n state.src = str;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/normalize.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/replacements.js": /*!*****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/replacements.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// (p) (P) -> §\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r|p)\\)/i;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n p: '§',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content\n .replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---([^-]|$)/mg, '$1\\u2014$2')\n // en-dash\n .replace(/(^|\\s)--(\\s|$)/mg, '$1\\u2013$2')\n .replace(/(^|[^-\\s])--([^-\\s]|$)/mg, '$1\\u2013$2');\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/replacements.js?"); +eval("// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// (p) (P) -> §\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n // TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/; // Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\n\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r|p)\\)/i;\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n p: '§',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i,\n token,\n inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i,\n token,\n inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content.replace(/\\+-/g, '±') // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') // em-dash\n .replace(/(^|[^-])---(?=[^-]|$)/mg, \"$1\\u2014\") // en-dash\n .replace(/(^|\\s)--(?=\\s|$)/mg, \"$1\\u2013\").replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, \"$1\\u2013\");\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) {\n return;\n }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline') {\n continue;\n }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/replacements.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/smartquotes.js": /*!****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/smartquotes.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Convert straight quotation marks to typographic ones\n//\n\n\n\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = '\\u2019'; /* ’ */\n\n\nfunction replaceAt(str, index, ch) {\n return str.substr(0, index) + ch + str.substr(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,\n isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,\n canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) { break; }\n }\n stack.length = j + 1;\n\n if (token.type !== 'text') { continue; }\n\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) { break; }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = (t[0] === \"'\");\n\n // Find previous character,\n // default to space if it's the beginning of the line\n //\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n if (tokens[j].type !== 'text') continue;\n\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n }\n\n // Find next character,\n // default to space if it's the end of the line\n //\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n if (tokens[j].type !== 'text') continue;\n\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // treat this as the middle of the word\n canOpen = false;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n if (stack[j].level < thisLevel) { break; }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n }\n\n // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(\n tokens[item.token].content, item.pos, openQuote);\n\n pos += closeQuote.length - 1;\n if (item.token === i) { pos += openQuote.length - 1; }\n\n text = token.content;\n max = text.length;\n\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline' ||\n !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/smartquotes.js?"); +eval("// Convert straight quotation marks to typographic ones\n//\n\n\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\n\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\n\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = \"\\u2019\";\n/* ’ */\n\nfunction replaceAt(str, index, ch) {\n return str.substr(0, index) + ch + str.substr(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar, isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace, canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) {\n break;\n }\n }\n\n stack.length = j + 1;\n\n if (token.type !== 'text') {\n continue;\n }\n\n text = token.content;\n pos = 0;\n max = text.length;\n /*eslint no-labels:0,block-scoped-var:0*/\n\n OUTER: while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n\n if (!t) {\n break;\n }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = t[0] === \"'\"; // Find previous character,\n // default to space if it's the beginning of the line\n //\n\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n } // Find next character,\n // default to space if it's the end of the line\n //\n\n\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22\n /* \" */\n && t[0] === '\"') {\n if (lastChar >= 0x30\n /* 0 */\n && lastChar <= 0x39\n /* 9 */\n ) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // Replace quotes in the middle of punctuation sequence, but not\n // in the middle of the words, i.e.:\n //\n // 1. foo \" bar \" baz - not replaced\n // 2. foo-\"-bar-\"-baz - replaced\n // 3. foo\"bar\"baz - not replaced\n //\n canOpen = isLastPunctChar;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n\n if (stack[j].level < thisLevel) {\n break;\n }\n\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n } // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n\n\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);\n pos += closeQuote.length - 1;\n\n if (item.token === i) {\n pos += openQuote.length - 1;\n }\n\n text = token.content;\n max = text.length;\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) {\n return;\n }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/smartquotes.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_core/state_core.js": /*!***************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_core/state_core.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Core state object\n//\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token;\n\n\nmodule.exports = StateCore;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/state_core.js?"); +eval("// Core state object\n//\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n} // re-export Token class to use in core rules\n\n\nStateCore.prototype.Token = Token;\nmodule.exports = StateCore;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/state_core.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/autolink.js": /*!***************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/autolink.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process autolinks ''\n\n\n\n\n/*eslint max-len:0*/\nvar EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;\nvar AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)>/;\n\n\nmodule.exports = function autolink(state, silent) {\n var tail, linkMatch, emailMatch, url, fullUrl, token,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n tail = state.src.slice(pos);\n\n if (tail.indexOf('>') < 0) { return false; }\n\n if (AUTOLINK_RE.test(tail)) {\n linkMatch = tail.match(AUTOLINK_RE);\n\n url = linkMatch[0].slice(1, -1);\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += linkMatch[0].length;\n return true;\n }\n\n if (EMAIL_RE.test(tail)) {\n emailMatch = tail.match(EMAIL_RE);\n\n url = emailMatch[0].slice(1, -1);\n fullUrl = state.md.normalizeLink('mailto:' + url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += emailMatch[0].length;\n return true;\n }\n\n return false;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/autolink.js?"); +eval("// Process autolinks ''\n\n/*eslint max-len:0*/\n\nvar EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;\nvar AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)$/;\n\nmodule.exports = function autolink(state, silent) {\n var url,\n fullUrl,\n token,\n ch,\n start,\n max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n ) {\n return false;\n }\n\n start = state.pos;\n max = state.posMax;\n\n for (;;) {\n if (++pos >= max) return false;\n ch = state.src.charCodeAt(pos);\n if (ch === 0x3C\n /* < */\n ) return false;\n if (ch === 0x3E\n /* > */\n ) break;\n }\n\n url = state.src.slice(start + 1, pos);\n\n if (AUTOLINK_RE.test(url)) {\n fullUrl = state.md.normalizeLink(url);\n\n if (!state.md.validateLink(fullUrl)) {\n return false;\n }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.markup = 'autolink';\n token.info = 'auto';\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n if (EMAIL_RE.test(url)) {\n fullUrl = state.md.normalizeLink('mailto:' + url);\n\n if (!state.md.validateLink(fullUrl)) {\n return false;\n }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.markup = 'autolink';\n token.info = 'auto';\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n return false;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/autolink.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/backticks.js": /*!****************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/backticks.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Parse backticks\n\n\n\nmodule.exports = function backtick(state, silent) {\n var start, max, marker, matchStart, matchEnd, token,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60/* ` */) { return false; }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n marker = state.src.slice(start, pos);\n\n matchStart = matchEnd = pos;\n\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }\n\n if (matchEnd - matchStart === marker.length) {\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart)\n .replace(/\\n/g, ' ')\n .replace(/^ (.+) $/, '$1');\n }\n state.pos = matchEnd;\n return true;\n }\n }\n\n if (!silent) { state.pending += marker; }\n state.pos += marker.length;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/backticks.js?"); +eval("// Parse backticks\n\n\nmodule.exports = function backtick(state, silent) {\n var start,\n max,\n marker,\n token,\n matchStart,\n matchEnd,\n openerLength,\n closerLength,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60\n /* ` */\n ) {\n return false;\n }\n\n start = pos;\n pos++;\n max = state.posMax; // scan marker length\n\n while (pos < max && state.src.charCodeAt(pos) === 0x60\n /* ` */\n ) {\n pos++;\n }\n\n marker = state.src.slice(start, pos);\n openerLength = marker.length;\n\n if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n }\n\n matchStart = matchEnd = pos; // Nothing found in the cache, scan until the end of the line (or until marker is found)\n\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1; // scan marker length\n\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60\n /* ` */\n ) {\n matchEnd++;\n }\n\n closerLength = matchEnd - matchStart;\n\n if (closerLength === openerLength) {\n // Found matching closer length.\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart).replace(/\\n/g, ' ').replace(/^ (.+) $/, '$1');\n }\n\n state.pos = matchEnd;\n return true;\n } // Some different length found, put it in cache as upper limit of where closer can be found\n\n\n state.backticks[closerLength] = matchStart;\n } // Scanned through the end, didn't find anything\n\n\n state.backticksScanned = true;\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/backticks.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/balance_pairs.js": /*!********************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/balance_pairs.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// For each opening emphasis-like marker find a matching closing one\n//\n\n\n\nfunction processDelimiters(state, delimiters) {\n var closerIdx, openerIdx, closer, opener, minOpenerIdx, newMinOpenerIdx,\n isOddMatch, lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx];\n\n // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n closer.length = closer.length || 0;\n\n if (!closer.close) continue;\n\n // Previously calculated lower bounds (previous fails)\n // for each marker and each delimiter length modulo 3.\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [ -1, -1, -1 ];\n }\n\n minOpenerIdx = openersBottom[closer.marker][closer.length % 3];\n newMinOpenerIdx = -1;\n\n openerIdx = closerIdx - closer.jump - 1;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= opener.jump + 1) {\n opener = delimiters[openerIdx];\n\n if (opener.marker !== closer.marker) continue;\n\n if (newMinOpenerIdx === -1) newMinOpenerIdx = openerIdx;\n\n if (opener.open &&\n opener.end < 0 &&\n opener.level === closer.level) {\n\n isOddMatch = false;\n\n // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ?\n delimiters[openerIdx - 1].jump + 1 :\n 0;\n\n closer.jump = closerIdx - openerIdx + lastJump;\n closer.open = false;\n opener.end = closerIdx;\n opener.jump = lastJump;\n opener.close = false;\n newMinOpenerIdx = -1;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.length || 0) % 3] = newMinOpenerIdx;\n }\n }\n}\n\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n processDelimiters(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/balance_pairs.js?"); +eval("// For each opening emphasis-like marker find a matching closing one\n//\n\n\nfunction processDelimiters(state, delimiters) {\n var closerIdx,\n openerIdx,\n closer,\n opener,\n minOpenerIdx,\n newMinOpenerIdx,\n isOddMatch,\n lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx]; // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n\n closer.length = closer.length || 0;\n if (!closer.close) continue; // Previously calculated lower bounds (previous fails)\n // for each marker and each delimiter length modulo 3.\n\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [-1, -1, -1];\n }\n\n minOpenerIdx = openersBottom[closer.marker][closer.length % 3];\n openerIdx = closerIdx - closer.jump - 1; // avoid crash if `closer.jump` is pointing outside of the array, see #742\n\n if (openerIdx < -1) openerIdx = -1;\n newMinOpenerIdx = openerIdx;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= opener.jump + 1) {\n opener = delimiters[openerIdx];\n if (opener.marker !== closer.marker) continue;\n\n if (opener.open && opener.end < 0) {\n isOddMatch = false; // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? delimiters[openerIdx - 1].jump + 1 : 0;\n closer.jump = closerIdx - openerIdx + lastJump;\n closer.open = false;\n opener.end = closerIdx;\n opener.jump = lastJump;\n opener.close = false;\n newMinOpenerIdx = -1;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.length || 0) % 3] = newMinOpenerIdx;\n }\n }\n}\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n processDelimiters(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/balance_pairs.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/emphasis.js": /*!***************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/emphasis.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process *this* and _that_\n//\n\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i, scanned, token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n\n // An amount of characters before this one that's equivalent to\n // current one. In plain English: if this delimiter does not open\n // an emphasis, neither do previous `jump` characters.\n //\n // Used to skip sequences like \"*****\" in one step, for 1st asterisk\n // value will be 0, for 2nd it's 1 and so on.\n //\n jump: i,\n\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n continue;\n }\n\n // Process only opening markers\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `whatever` -> `whatever`\n //\n isStrong = i > 0 &&\n delimiters[i - 1].end === startDelim.end + 1 &&\n delimiters[i - 1].token === startDelim.token - 1 &&\n delimiters[startDelim.end + 1].token === endDelim.token + 1 &&\n delimiters[i - 1].marker === startDelim.marker;\n\n ch = String.fromCharCode(startDelim.marker);\n\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/emphasis.js?"); +eval("// Process *this* and _that_\n//\n // Insert each marker as a separate text token, and add it to delimiter list\n//\n\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i,\n scanned,\n token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) {\n return false;\n }\n\n if (marker !== 0x5F\n /* _ */\n && marker !== 0x2A\n /* * */\n ) {\n return false;\n }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n // An amount of characters before this one that's equivalent to\n // current one. In plain English: if this delimiter does not open\n // an emphasis, neither do previous `jump` characters.\n //\n // Used to skip sequences like \"*****\" in one step, for 1st asterisk\n // value will be 0, for 2nd it's 1 and so on.\n //\n jump: i,\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n return true;\n};\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F\n /* _ */\n && startDelim.marker !== 0x2A\n /* * */\n ) {\n continue;\n } // Process only opening markers\n\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end]; // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `whatever` -> `whatever`\n //\n\n isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && delimiters[i - 1].token === startDelim.token - 1 && delimiters[startDelim.end + 1].token === endDelim.token + 1 && delimiters[i - 1].marker === startDelim.marker;\n ch = String.fromCharCode(startDelim.marker);\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n} // Walk through delimiter list and replace text tokens with tags\n//\n\n\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/emphasis.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/entity.js": /*!*************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/entity.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process html entity - {, ¯, ", ...\n\n\n\nvar entities = __webpack_require__(/*! ../common/entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\nvar has = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").has;\nvar isValidEntityCode = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isValidEntityCode;\nvar fromCodePoint = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").fromCodePoint;\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nmodule.exports = function entity(state, silent) {\n var ch, code, match, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }\n\n if (pos + 1 < max) {\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n }\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) { state.pending += entities[match[1]]; }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n }\n\n if (!silent) { state.pending += '&'; }\n state.pos++;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/entity.js?"); +eval("// Process html entity - {, ¯, ", ...\n\n\nvar entities = __webpack_require__(/*! ../common/entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\n\nvar has = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").has;\n\nvar isValidEntityCode = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isValidEntityCode;\n\nvar fromCodePoint = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").fromCodePoint;\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\nmodule.exports = function entity(state, silent) {\n var ch,\n code,\n match,\n pos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26\n /* & */\n ) {\n return false;\n }\n\n if (pos + 1 < max) {\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23\n /* # */\n ) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n }\n\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) {\n state.pending += entities[match[1]];\n }\n\n state.pos += match[0].length;\n return true;\n }\n }\n }\n }\n\n if (!silent) {\n state.pending += '&';\n }\n\n state.pos++;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/entity.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/escape.js": /*!*************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/escape.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process escaped chars and hardbreaks\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nmodule.exports = function escape(state, silent) {\n var ch, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) { return false; }\n\n pos++;\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch < 256 && ESCAPED[ch] !== 0) {\n if (!silent) { state.pending += state.src[pos]; }\n state.pos += 2;\n return true;\n }\n\n if (ch === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++;\n // skip leading whitespaces from next line\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n }\n\n if (!silent) { state.pending += '\\\\'; }\n state.pos++;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/escape.js?"); +eval("// Process escaped chars and hardbreaks\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) {\n ESCAPED.push(0);\n}\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) {\n ESCAPED[ch.charCodeAt(0)] = 1;\n});\n\nmodule.exports = function escape(state, silent) {\n var ch,\n pos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C\n /* \\ */\n ) {\n return false;\n }\n\n pos++;\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch < 256 && ESCAPED[ch] !== 0) {\n if (!silent) {\n state.pending += state.src[pos];\n }\n\n state.pos += 2;\n return true;\n }\n\n if (ch === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++; // skip leading whitespaces from next line\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n }\n\n if (!silent) {\n state.pending += '\\\\';\n }\n\n state.pos++;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/escape.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/html_inline.js": /*!******************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/html_inline.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process html tags\n\n\n\n\nvar HTML_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_TAG_RE;\n\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nmodule.exports = function html_inline(state, silent) {\n var ch, match, max, token,\n pos = state.pos;\n\n if (!state.md.options.html) { return false; }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21/* ! */ &&\n ch !== 0x3F/* ? */ &&\n ch !== 0x2F/* / */ &&\n !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) { return false; }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = state.src.slice(pos, pos + match[0].length);\n }\n state.pos += match[0].length;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/html_inline.js?"); +eval("// Process html tags\n\n\nvar HTML_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_TAG_RE;\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n\n return lc >= 0x61\n /* a */\n && lc <= 0x7a\n /* z */\n ;\n}\n\nmodule.exports = function html_inline(state, silent) {\n var ch,\n match,\n max,\n token,\n pos = state.pos;\n\n if (!state.md.options.html) {\n return false;\n } // Check start\n\n\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n || pos + 2 >= max) {\n return false;\n } // Quick fail on second char\n\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch !== 0x21\n /* ! */\n && ch !== 0x3F\n /* ? */\n && ch !== 0x2F\n /* / */\n && !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n\n if (!match) {\n return false;\n }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = state.src.slice(pos, pos + match[0].length);\n }\n\n state.pos += match[0].length;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/html_inline.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/image.js": /*!************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/image.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process ![image]( \"title\")\n\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n\n state.md.inline.parse(\n content,\n state.md,\n state.env,\n tokens = []\n );\n\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push([ 'title', title ]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/image.js?"); +eval("// Process ![image]( \"title\")\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21\n /* ! */\n ) {\n return false;\n }\n\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B\n /* [ */\n ) {\n return false;\n }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false); // parser failed to find ']', so it's not a valid link\n\n if (labelEnd < 0) {\n return false;\n }\n\n pos = labelEnd + 1;\n\n if (pos < max && state.src.charCodeAt(pos) === 0x28\n /* ( */\n ) {\n //\n // Inline link\n //\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n\n if (pos >= max) {\n return false;\n } // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n\n\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n } // [link]( \"title\" )\n // ^^ skipping these spaces\n\n\n start = pos;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n } // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n\n\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29\n /* ) */\n ) {\n state.pos = oldPos;\n return false;\n }\n\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') {\n return false;\n }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B\n /* [ */\n ) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n } // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n\n\n if (!label) {\n label = state.src.slice(labelStart, labelEnd);\n }\n\n ref = state.env.references[normalizeReference(label)];\n\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n\n href = ref.href;\n title = ref.title;\n } //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n\n\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n state.md.inline.parse(content, state.md, state.env, tokens = []);\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [['src', href], ['alt', '']];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push(['title', title]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/image.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/link.js": /*!***********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/link.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Process [link]( \"stuff\")\n\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n title,\n token,\n href = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [ [ 'href', href ] ];\n if (title) {\n attrs.push([ 'title', title ]);\n }\n\n state.md.inline.tokenize(state);\n\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/link.js?"); +eval("// Process [link]( \"stuff\")\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n token,\n href = '',\n title = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B\n /* [ */\n ) {\n return false;\n }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true); // parser failed to find ']', so it's not a valid link\n\n if (labelEnd < 0) {\n return false;\n }\n\n pos = labelEnd + 1;\n\n if (pos < max && state.src.charCodeAt(pos) === 0x28\n /* ( */\n ) {\n //\n // Inline link\n //\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n pos++;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n\n if (pos >= max) {\n return false;\n } // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n\n\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n } // [link]( \"title\" )\n // ^^ skipping these spaces\n\n\n start = pos;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n } // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n\n\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n }\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29\n /* ) */\n ) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') {\n return false;\n }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B\n /* [ */\n ) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n } // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n\n\n if (!label) {\n label = state.src.slice(labelStart, labelEnd);\n }\n\n ref = state.env.references[normalizeReference(label)];\n\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n\n href = ref.href;\n title = ref.title;\n } //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n\n\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [['href', href]];\n\n if (title) {\n attrs.push(['title', title]);\n }\n\n state.md.inline.tokenize(state);\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/link.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/newline.js": /*!**************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/newline.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Proceess '\\n'\n\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\n\nmodule.exports = function newline(state, silent) {\n var pmax, max, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n state.pending = state.pending.replace(/ +$/, '');\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }\n\n state.pos = pos;\n return true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/newline.js?"); +eval("// Proceess '\\n'\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function newline(state, silent) {\n var pmax,\n max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A\n /* \\n */\n ) {\n return false;\n }\n\n pmax = state.pending.length - 1;\n max = state.posMax; // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n state.pending = state.pending.replace(/ +$/, '');\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++; // skip heading spaces for next line\n\n while (pos < max && isSpace(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n state.pos = pos;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/newline.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/state_inline.js": /*!*******************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/state_inline.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Inline parser state\n\n\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n\n // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n this.cache = {};\n\n // List of emphasis-like delimiters for current tag\n this.delimiters = [];\n\n // Stack of delimiter lists for upper level tags\n this._prev_delimiters = [];\n}\n\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n};\n\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n this._prev_delimiters.push(this.delimiters);\n this.delimiters = [];\n token_meta = { delimiters: this.delimiters };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n};\n\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start, lastChar, nextChar, count, can_open, can_close,\n isLastWhiteSpace, isLastPunctChar,\n isNextWhiteSpace, isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start);\n\n // treat beginning of the line as a whitespace\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }\n\n count = pos - start;\n\n // treat end of the line as a whitespace\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n};\n\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token;\n\n\nmodule.exports = StateInline;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/state_inline.js?"); +eval("// Inline parser state\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\n\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\n\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0; // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n\n this.cache = {}; // List of emphasis-like delimiters for current tag\n\n this.delimiters = []; // Stack of delimiter lists for upper level tags\n\n this._prev_delimiters = []; // backtick length => last seen position\n\n this.backticks = {};\n this.backticksScanned = false;\n} // Flush pending text\n//\n\n\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n}; // Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\n\n\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n\n this._prev_delimiters.push(this.delimiters);\n\n this.delimiters = [];\n token_meta = {\n delimiters: this.delimiters\n };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n}; // Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\n\n\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start,\n lastChar,\n nextChar,\n count,\n can_open,\n can_close,\n isLastWhiteSpace,\n isLastPunctChar,\n isNextWhiteSpace,\n isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start); // treat beginning of the line as a whitespace\n\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) {\n pos++;\n }\n\n count = pos - start; // treat end of the line as a whitespace\n\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n}; // re-export Token class to use in block rules\n\n\nStateInline.prototype.Token = Token;\nmodule.exports = StateInline;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/state_inline.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/strikethrough.js": /*!********************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/strikethrough.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// ~~strike through~~\n//\n\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i, scanned, token, len, ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x7E/* ~ */) { return false; }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) { return false; }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n\n state.delimiters.push({\n marker: marker,\n length: 0, // disable \"rule of 3\" length checks meant for emphasis\n jump: i,\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i, j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E/* ~ */) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' &&\n state.tokens[endDelim.token - 1].content === '~') {\n\n loneMarkers.push(endDelim.token - 1);\n }\n }\n\n // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/strikethrough.js?"); +eval("// ~~strike through~~\n//\n // Insert each marker as a separate text token, and add it to delimiter list\n//\n\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i,\n scanned,\n token,\n len,\n ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) {\n return false;\n }\n\n if (marker !== 0x7E\n /* ~ */\n ) {\n return false;\n }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) {\n return false;\n }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n state.delimiters.push({\n marker: marker,\n length: 0,\n // disable \"rule of 3\" length checks meant for emphasis\n jump: i / 2,\n // for `~~` 1 marker = 2 characters\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n return true;\n};\n\nfunction postProcess(state, delimiters) {\n var i,\n j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E\n /* ~ */\n ) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') {\n loneMarkers.push(endDelim.token - 1);\n }\n } // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n\n\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n} // Walk through delimiter list and replace text tokens with tags\n//\n\n\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/strikethrough.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/text.js": /*!***********************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/text.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n\n\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A/* \\n */:\n case 0x21/* ! */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2D/* - */:\n case 0x3A/* : */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) { return false; }\n\n if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n state.pos = pos;\n\n return true;\n};\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text.js?"); +eval("// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n // Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A\n /* \\n */\n :\n case 0x21\n /* ! */\n :\n case 0x23\n /* # */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x26\n /* & */\n :\n case 0x2A\n /* * */\n :\n case 0x2B\n /* + */\n :\n case 0x2D\n /* - */\n :\n case 0x3A\n /* : */\n :\n case 0x3C\n /* < */\n :\n case 0x3D\n /* = */\n :\n case 0x3E\n /* > */\n :\n case 0x40\n /* @ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5C\n /* \\ */\n :\n case 0x5D\n /* ] */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5F\n /* _ */\n :\n case 0x60\n /* ` */\n :\n case 0x7B\n /* { */\n :\n case 0x7D\n /* } */\n :\n case 0x7E\n /* ~ */\n :\n return true;\n\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) {\n return false;\n }\n\n if (!silent) {\n state.pending += state.src.slice(state.pos, pos);\n }\n\n state.pos = pos;\n return true;\n}; // Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/rules_inline/text_collapse.js": /*!********************************************************************!*\ !*** ./node_modules/markdown-it/lib/rules_inline/text_collapse.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n\n\n\nmodule.exports = function text_collapse(state) {\n var curr, last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text_collapse.js?"); +eval("// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n\n\nmodule.exports = function text_collapse(state) {\n var curr,\n last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) {\n tokens[last] = tokens[curr];\n }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text_collapse.js?"); /***/ }), /***/ "./node_modules/markdown-it/lib/token.js": /*!***********************************************!*\ !*** ./node_modules/markdown-it/lib/token.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Token class\n\n\n\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n this.tag = tag;\n\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n this.attrs = null;\n\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n this.map = null;\n\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n this.nesting = nesting;\n\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n this.level = 0;\n\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n this.children = null;\n\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n this.content = '';\n\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n this.markup = '';\n\n /**\n * Token#info -> String\n *\n * fence infostring\n **/\n this.info = '';\n\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n this.meta = null;\n\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n this.block = false;\n\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n this.hidden = false;\n}\n\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) { return -1; }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) { return i; }\n }\n return -1;\n};\n\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [ attrData ];\n }\n};\n\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [ name, value ];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name), value = null;\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n return value;\n};\n\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([ name, value ]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\n\nmodule.exports = Token;\n\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/token.js?"); +eval("// Token class\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\n\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n\n this.tag = tag;\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n\n this.attrs = null;\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n\n this.map = null;\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n\n this.nesting = nesting;\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n\n this.level = 0;\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n\n this.children = null;\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n\n this.content = '';\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n\n this.markup = '';\n /**\n * Token#info -> String\n *\n * fence infostring\n **/\n\n this.info = '';\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n\n this.meta = null;\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n\n this.block = false;\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n\n this.hidden = false;\n}\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\n\n\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) {\n return -1;\n }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) {\n return i;\n }\n }\n\n return -1;\n};\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\n\n\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [attrData];\n }\n};\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\n\n\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [name, value];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\n\n\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name),\n value = null;\n\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n\n return value;\n};\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\n\n\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([name, value]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\nmodule.exports = Token;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/token.js?"); /***/ }), /***/ "./node_modules/mdurl/decode.js": /*!**************************************!*\ !*** ./node_modules/mdurl/decode.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\n\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i, ch, cache = decodeCache[exclude];\n if (cache) { return cache; }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n}\n\n\n// Decode percent-encoded string.\n//\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n\n return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {\n var i, l, b1, b2, b3, b4, chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);\n\n if (chr < 0x80) {\n result += '\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);\n\n if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n result += '\\ufffd\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += '\\ufffd\\ufffd\\ufffd\\ufffd';\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += '\\ufffd';\n }\n\n return result;\n });\n}\n\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\n\n\nmodule.exports = decode;\n\n\n//# sourceURL=webpack:///./node_modules/mdurl/decode.js?"); +eval("\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i,\n ch,\n cache = decodeCache[exclude];\n\n if (cache) {\n return cache;\n }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n} // Decode percent-encoded string.\n//\n\n\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {\n var i,\n l,\n b1,\n b2,\n b3,\n b4,\n chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && i + 3 < l) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = b1 << 6 & 0x7C0 | b2 & 0x3F;\n\n if (chr < 0x80) {\n result += \"\\uFFFD\\uFFFD\";\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && i + 6 < l) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F;\n\n if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) {\n result += \"\\uFFFD\\uFFFD\\uFFFD\";\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && i + 9 < l) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F;\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += \"\\uFFFD\\uFFFD\\uFFFD\\uFFFD\";\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += \"\\uFFFD\";\n }\n\n return result;\n });\n}\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\nmodule.exports = decode;\n\n//# sourceURL=webpack:///./node_modules/mdurl/decode.js?"); /***/ }), /***/ "./node_modules/mdurl/encode.js": /*!**************************************!*\ !*** ./node_modules/mdurl/encode.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n\n\n//# sourceURL=webpack:///./node_modules/mdurl/encode.js?"); +eval("\n\nvar encodeCache = {}; // Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\n\nfunction getEncodeCache(exclude) {\n var i,\n ch,\n cache = encodeCache[exclude];\n\n if (cache) {\n return cache;\n }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n} // Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\n\n\nfunction encode(string, exclude, keepEscaped) {\n var i,\n l,\n code,\n nextCode,\n cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25\n /* % */\n && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\nmodule.exports = encode;\n\n//# sourceURL=webpack:///./node_modules/mdurl/encode.js?"); /***/ }), /***/ "./node_modules/mdurl/format.js": /*!**************************************!*\ !*** ./node_modules/mdurl/format.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\n\nmodule.exports = function format(url) {\n var result = '';\n\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n\n return result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/mdurl/format.js?"); +eval("\n\nmodule.exports = function format(url) {\n var result = '';\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/mdurl/format.js?"); /***/ }), /***/ "./node_modules/mdurl/index.js": /*!*************************************!*\ !*** ./node_modules/mdurl/index.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\n\nmodule.exports.encode = __webpack_require__(/*! ./encode */ \"./node_modules/mdurl/encode.js\");\nmodule.exports.decode = __webpack_require__(/*! ./decode */ \"./node_modules/mdurl/decode.js\");\nmodule.exports.format = __webpack_require__(/*! ./format */ \"./node_modules/mdurl/format.js\");\nmodule.exports.parse = __webpack_require__(/*! ./parse */ \"./node_modules/mdurl/parse.js\");\n\n\n//# sourceURL=webpack:///./node_modules/mdurl/index.js?"); +eval("\n\nmodule.exports.encode = __webpack_require__(/*! ./encode */ \"./node_modules/mdurl/encode.js\");\nmodule.exports.decode = __webpack_require__(/*! ./decode */ \"./node_modules/mdurl/decode.js\");\nmodule.exports.format = __webpack_require__(/*! ./format */ \"./node_modules/mdurl/format.js\");\nmodule.exports.parse = __webpack_require__(/*! ./parse */ \"./node_modules/mdurl/parse.js\");\n\n//# sourceURL=webpack:///./node_modules/mdurl/index.js?"); /***/ }), /***/ "./node_modules/mdurl/parse.js": /*!*************************************!*\ !*** ./node_modules/mdurl/parse.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = [ '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t' ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [ '{', '}', '|', '\\\\', '^', '`' ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = [ '\\'' ].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),\n hostEndingChars = [ '/', '?', '#' ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n /* eslint-disable no-script-url */\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n };\n /* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, slashesDenoteHost) {\n var i, l, lowerProto, hec, slashes,\n rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') { hostEnd--; }\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost(host);\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n }\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function(host) {\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nmodule.exports = urlParse;\n\n\n//# sourceURL=webpack:///./node_modules/mdurl/parse.js?"); +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n} // Reference: RFC 3986, RFC 1808, RFC 2396\n// define these here so at least they only have to be\n// compiled once on the first module load.\n\n\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\nsimplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n // RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\ndelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\nunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\nautoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nnonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n\n/* eslint-disable no-script-url */\n// protocols that never have a hostname.\nhostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n // protocols that always contain a // bit.\nslashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n};\n/* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) {\n return url;\n }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, slashesDenoteHost) {\n var i,\n l,\n lowerProto,\n hec,\n slashes,\n rest = url; // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n\n if (simplePath) {\n this.pathname = simplePath[1];\n\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n } // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n\n\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n } // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n\n\n var auth, atSign;\n\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n } // Now we have a portion which is definitely the auth.\n // Pull that off.\n\n\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n } // the host is the remaining to the left of the first non-host char\n\n\n hostEnd = -1;\n\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n } // if we still have not hit it, then the entire thing is a host.\n\n\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') {\n hostEnd--;\n }\n\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd); // pull out port.\n\n this.parseHost(host); // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n\n this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little.\n\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n\n if (!part) {\n continue;\n }\n\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n } // we test again with ASCII char only\n\n\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } // strip [ and ] from the hostname\n // the host field still retains them, though\n\n\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n } // chop off from the tail first.\n\n\n var hash = rest.indexOf('#');\n\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n\n var qm = rest.indexOf('?');\n\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n\n if (rest) {\n this.pathname = rest;\n }\n\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function (host) {\n var port = portPattern.exec(host);\n\n if (port) {\n port = port[0];\n\n if (port !== ':') {\n this.port = port.substr(1);\n }\n\n host = host.substr(0, host.length - port.length);\n }\n\n if (host) {\n this.hostname = host;\n }\n};\n\nmodule.exports = urlParse;\n\n//# sourceURL=webpack:///./node_modules/mdurl/parse.js?"); /***/ }), /***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js": /*!**************************************************************************!*\ !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = true && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = true && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttrue\n\t) {\n\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\t\treturn punycode;\n\t\t}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n\n}(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/punycode/punycode.js?"); +eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! https://mths.be/punycode v1.4.1 by @mathias */\n;\n\n(function (root) {\n /** Detect free variables */\n var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n var freeModule = ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;\n var freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global;\n\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n root = freeGlobal;\n }\n /**\n * The `punycode` object.\n * @name punycode\n * @type Object\n */\n\n\n var punycode,\n\n /** Highest positive signed 32-bit float value */\n maxInt = 2147483647,\n // aka. 0x7FFFFFFF or 2^31-1\n\n /** Bootstring parameters */\n base = 36,\n tMin = 1,\n tMax = 26,\n skew = 38,\n damp = 700,\n initialBias = 72,\n initialN = 128,\n // 0x80\n delimiter = '-',\n // '\\x2D'\n\n /** Regular expressions */\n regexPunycode = /^xn--/,\n regexNonASCII = /[^\\x20-\\x7E]/,\n // unprintable ASCII chars + non-ASCII chars\n regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n // RFC 3490 separators\n\n /** Error messages */\n errors = {\n 'overflow': 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n },\n\n /** Convenience shortcuts */\n baseMinusTMin = base - tMin,\n floor = Math.floor,\n stringFromCharCode = String.fromCharCode,\n\n /** Temporary variable */\n key;\n /*--------------------------------------------------------------------------*/\n\n /**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\n\n function error(type) {\n throw new RangeError(errors[type]);\n }\n /**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\n\n\n function map(array, fn) {\n var length = array.length;\n var result = [];\n\n while (length--) {\n result[length] = fn(array[length]);\n }\n\n return result;\n }\n /**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\n\n\n function mapDomain(string, fn) {\n var parts = string.split('@');\n var result = '';\n\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n string = parts[1];\n } // Avoid `split(regex)` for IE8 compatibility. See #17.\n\n\n string = string.replace(regexSeparators, '\\x2E');\n var labels = string.split('.');\n var encoded = map(labels, fn).join('.');\n return result + encoded;\n }\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n\n\n function ucs2decode(string) {\n var output = [],\n counter = 0,\n length = string.length,\n value,\n extra;\n\n while (counter < length) {\n value = string.charCodeAt(counter++);\n\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n\n return output;\n }\n /**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\n\n\n function ucs2encode(array) {\n return map(array, function (value) {\n var output = '';\n\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n\n output += stringFromCharCode(value);\n return output;\n }).join('');\n }\n /**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\n\n\n function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) {\n return codePoint - 22;\n }\n\n if (codePoint - 65 < 26) {\n return codePoint - 65;\n }\n\n if (codePoint - 97 < 26) {\n return codePoint - 97;\n }\n\n return base;\n }\n /**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\n\n\n function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\n\n\n function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n\n for (;\n /* no initialization */\n delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n /**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\n\n\n function decode(input) {\n // Don't use UCS-2\n var output = [],\n inputLength = input.length,\n out,\n i = 0,\n n = initialN,\n bias = initialBias,\n basic,\n j,\n index,\n oldi,\n w,\n k,\n digit,\n t,\n\n /** Cached calculation results */\n baseMinusT; // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n basic = input.lastIndexOf(delimiter);\n\n if (basic < 0) {\n basic = 0;\n }\n\n for (j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n\n output.push(input.charCodeAt(j));\n } // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n\n for (index = basic > 0 ? basic + 1 : 0; index < inputLength;)\n /* no final expression */\n {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for (oldi = i, w = 1, k = base;;\n /* no condition */\n k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base || digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n baseMinusT = base - t;\n\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out; // Insert `n` at position `i` of the output\n\n output.splice(i++, 0, n);\n }\n\n return ucs2encode(output);\n }\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\n\n\n function encode(input) {\n var n,\n delta,\n handledCPCount,\n basicLength,\n bias,\n j,\n m,\n q,\n k,\n t,\n currentValue,\n output = [],\n\n /** `inputLength` will hold the number of code points in `input`. */\n inputLength,\n\n /** Cached calculation results */\n handledCPCountPlusOne,\n baseMinusT,\n qMinusT; // Convert the input in UCS-2 to Unicode\n\n input = ucs2decode(input); // Cache the length\n\n inputLength = input.length; // Initialize the state\n\n n = initialN;\n delta = 0;\n bias = initialBias; // Handle the basic code points\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n // Finish the basic string - if it is not empty - with a delimiter\n\n if (basicLength) {\n output.push(delimiter);\n } // Main encoding loop:\n\n\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for (m = maxInt, j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n } // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n\n\n handledCPCountPlusOne = handledCPCount + 1;\n\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for (q = delta, k = base;;\n /* no condition */\n k += base) {\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (q < t) {\n break;\n }\n\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n\n return output.join('');\n }\n /**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\n\n\n function toUnicode(input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n /**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\n\n\n function toASCII(input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n }\n /*--------------------------------------------------------------------------*/\n\n /** Define the public API */\n\n\n punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n 'version': '1.4.1',\n\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n 'ucs2': {\n 'decode': ucs2decode,\n 'encode': ucs2encode\n },\n 'decode': decode,\n 'encode': encode,\n 'toASCII': toASCII,\n 'toUnicode': toUnicode\n };\n /** Expose `punycode` */\n // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n\n if ( true && _typeof(__webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\")) == 'object' && __webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\")) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return punycode;\n }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (freeExports && freeModule) {\n if (module.exports == freeExports) {\n // in Node.js, io.js, or RingoJS v0.8.0+\n freeModule.exports = punycode;\n } else {\n // in Narwhal or RingoJS v0.7.0-\n for (key in punycode) {\n punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n }\n }\n } else {\n // in Rhino or a web browser\n root.punycode = punycode;\n }\n})(this);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/punycode/punycode.js?"); /***/ }), /***/ "./node_modules/orderedmap/index.es.js": /*!*********************************************!*\ !*** ./node_modules/orderedmap/index.es.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n\n find: function(key) {\n for (var i = 0; i < this.content.length; i += 2)\n if (this.content[i] === key) return i\n return -1\n },\n\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1]\n },\n\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key), content = self.content.slice();\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n return new OrderedMap(content)\n },\n\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function(key) {\n var found = this.find(key);\n if (found == -1) return this\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content)\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content))\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content)\n },\n\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function(place, key, value) {\n var without = this.remove(key), content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content)\n },\n\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function(f) {\n for (var i = 0; i < this.content.length; i += 2)\n f(this.content[i], this.content[i + 1]);\n },\n\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(map.content.concat(this.subtract(map).content))\n },\n\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(this.subtract(map).content.concat(map.content))\n },\n\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function(map) {\n var result = this;\n map = OrderedMap.from(map);\n for (var i = 0; i < map.content.length; i += 2)\n result = result.remove(map.content[i]);\n return result\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1\n }\n};\n\n// :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\nOrderedMap.from = function(value) {\n if (value instanceof OrderedMap) return value\n var content = [];\n if (value) for (var prop in value) content.push(prop, value[prop]);\n return new OrderedMap(content)\n};\n\nvar orderedmap = OrderedMap;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (orderedmap);\n\n\n//# sourceURL=webpack:///./node_modules/orderedmap/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n find: function find(key) {\n for (var i = 0; i < this.content.length; i += 2) {\n if (this.content[i] === key) return i;\n }\n\n return -1;\n },\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function get(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1];\n },\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function update(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key),\n content = self.content.slice();\n\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n\n return new OrderedMap(content);\n },\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function remove(key) {\n var found = this.find(key);\n if (found == -1) return this;\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content);\n },\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function addToStart(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content));\n },\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function addToEnd(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content);\n },\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function addBefore(place, key, value) {\n var without = this.remove(key),\n content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content);\n },\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function forEach(f) {\n for (var i = 0; i < this.content.length; i += 2) {\n f(this.content[i], this.content[i + 1]);\n }\n },\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function prepend(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this;\n return new OrderedMap(map.content.concat(this.subtract(map).content));\n },\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function append(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this;\n return new OrderedMap(this.subtract(map).content.concat(map.content));\n },\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function subtract(map) {\n var result = this;\n map = OrderedMap.from(map);\n\n for (var i = 0; i < map.content.length; i += 2) {\n result = result.remove(map.content[i]);\n }\n\n return result;\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1;\n }\n\n}; // :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\n\nOrderedMap.from = function (value) {\n if (value instanceof OrderedMap) return value;\n var content = [];\n if (value) for (var prop in value) {\n content.push(prop, value[prop]);\n }\n return new OrderedMap(content);\n};\n\nvar orderedmap = OrderedMap;\n/* harmony default export */ __webpack_exports__[\"default\"] = (orderedmap);\n\n//# sourceURL=webpack:///./node_modules/orderedmap/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-commands/dist/index.es.js": /*!************************************************************!*\ !*** ./node_modules/prosemirror-commands/dist/index.es.js ***! \************************************************************/ /*! exports provided: autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, setBlockType, splitBlock, splitBlockKeepMarks, toggleMark, wrapIn */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"autoJoin\", function() { return autoJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"baseKeymap\", function() { return baseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"chainCommands\", function() { return chainCommands; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createParagraphNear\", function() { return createParagraphNear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteSelection\", function() { return deleteSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exitCode\", function() { return exitCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinBackward\", function() { return joinBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinDown\", function() { return joinDown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinForward\", function() { return joinForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUp\", function() { return joinUp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lift\", function() { return lift; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftEmptyBlock\", function() { return liftEmptyBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"macBaseKeymap\", function() { return macBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newlineInCode\", function() { return newlineInCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pcBaseKeymap\", function() { return pcBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return selectAll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeBackward\", function() { return selectNodeBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeForward\", function() { return selectNodeForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNode\", function() { return selectParentNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBlockType\", function() { return setBlockType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlock\", function() { return splitBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlockKeepMarks\", function() { return splitBlockKeepMarks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleMark\", function() { return toggleMark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapIn\", function() { return wrapIn; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Delete the selection, if there is one.\nfunction deleteSelection(state, dispatch) {\n if (state.selection.empty) { return false }\n if (dispatch) { dispatch(state.tr.deleteSelection().scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and at the start of a textblock, try to\n// reduce the distance between that block and the one before it—if\n// there's a block directly before it that can be joined, join them.\n// If not, try to move the selected block closer to the next one in\n// the document structure by lifting it out of its parent or moving it\n// into a parent of the previous block. Will use the view for accurate\n// (bidi-aware) start-of-textblock detection if given.\nfunction joinBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state)\n : $cursor.parentOffset > 0))\n { return false }\n\n var $cut = findCutBefore($cursor);\n\n // If there is no node before this, try to lift\n if (!$cut) {\n var range = $cursor.blockRange(), target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n }\n\n var before = $cut.nodeBefore;\n // Apply the joining algorithm\n if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch))\n { return true }\n\n // If the node below has no content and the node above is\n // selectable, delete the node below and select the one above.\n if ($cursor.parent.content.size == 0 &&\n (textblockAt(before, \"end\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(before))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(before, \"end\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1)\n : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, $cut.pos - before.nodeSize));\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n // If the node before is an atom, delete it\n if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) { dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView()); }\n return true\n }\n\n return false\n}\n\nfunction textblockAt(node, side) {\n for (; node; node = (side == \"start\" ? node.firstChild : node.lastChild))\n { if (node.isTextblock) { return true } }\n return false\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the start of a textblock, select\n// the node before that textblock, if possible. This is intended to be\n// bound to keys like backspace, after\n// [`joinBackward`](#commands.joinBackward) or other deleting\n// commands, as a fall-back behavior when the schema doesn't allow\n// deletion at the selected point.\nfunction selectNodeBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state)\n : $cursor.parentOffset > 0))\n { return false }\n\n var $cut = findCutBefore($cursor), node = $cut && $cut.nodeBefore;\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) { return false }\n if (dispatch)\n { dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView()); }\n return true\n}\n\nfunction findCutBefore($pos) {\n if (!$pos.parent.type.spec.isolating) { for (var i = $pos.depth - 1; i >= 0; i--) {\n if ($pos.index(i) > 0) { return $pos.doc.resolve($pos.before(i + 1)) }\n if ($pos.node(i).type.spec.isolating) { break }\n } }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and the cursor is at the end of a\n// textblock, try to reduce or remove the boundary between that block\n// and the one after it, either by joining them or by moving the other\n// block closer to this one in the tree structure. Will use the view\n// for accurate start-of-textblock detection if given.\nfunction joinForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state)\n : $cursor.parentOffset < $cursor.parent.content.size))\n { return false }\n\n var $cut = findCutAfter($cursor);\n\n // If there is no node after this, there's nothing to do\n if (!$cut) { return false }\n\n var after = $cut.nodeAfter;\n // Try the joining algorithm\n if (deleteBarrier(state, $cut, dispatch)) { return true }\n\n // If the node above has no content and the node below is\n // selectable, delete the node above and select the one below.\n if ($cursor.parent.content.size == 0 &&\n (textblockAt(after, \"start\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(after))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(after, \"start\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1)\n : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, tr.mapping.map($cut.pos)));\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n // If the next node is an atom, delete it\n if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) { dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView()); }\n return true\n }\n\n return false\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the end of a textblock, select\n// the node coming after that textblock, if possible. This is intended\n// to be bound to keys like delete, after\n// [`joinForward`](#commands.joinForward) and similar deleting\n// commands, to provide a fall-back behavior when the schema doesn't\n// allow deletion at the selected point.\nfunction selectNodeForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state)\n : $cursor.parentOffset < $cursor.parent.content.size))\n { return false }\n\n var $cut = findCutAfter($cursor), node = $cut && $cut.nodeAfter;\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) { return false }\n if (dispatch)\n { dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos)).scrollIntoView()); }\n return true\n}\n\nfunction findCutAfter($pos) {\n if (!$pos.parent.type.spec.isolating) { for (var i = $pos.depth - 1; i >= 0; i--) {\n var parent = $pos.node(i);\n if ($pos.index(i) + 1 < parent.childCount) { return $pos.doc.resolve($pos.after(i + 1)) }\n if (parent.type.spec.isolating) { break }\n } }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block or, if there is a text selection, the\n// closest ancestor block of the selection that can be joined, with\n// the sibling above it.\nfunction joinUp(state, dispatch) {\n var sel = state.selection, nodeSel = sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"], point;\n if (nodeSel) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.from)) { return false }\n point = sel.from;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.from, -1);\n if (point == null) { return false }\n }\n if (dispatch) {\n var tr = state.tr.join(point);\n if (nodeSel) { tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize)); }\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block, or the closest ancestor of the selection\n// that can be joined, with the sibling after it.\nfunction joinDown(state, dispatch) {\n var sel = state.selection, point;\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"]) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.to)) { return false }\n point = sel.to;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.to, 1);\n if (point == null) { return false }\n }\n if (dispatch)\n { dispatch(state.tr.join(point).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Lift the selected block, or the closest ancestor block of the\n// selection that can be lifted, out of its parent node.\nfunction lift(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If the selection is in a node whose type has a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, replace the\n// selection with a newline character.\nfunction newlineInCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) { return false }\n if (dispatch) { dispatch(state.tr.insertText(\"\\n\").scrollIntoView()); }\n return true\n}\n\nfunction defaultBlockAt(match) {\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n if (type.isTextblock && !type.hasRequiredAttrs()) { return type }\n }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// When the selection is in a node with a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, create a\n// default block after the code block, and move the cursor there.\nfunction exitCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) { return false }\n var above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt(above.contentMatchAt(after));\n if (!above.canReplaceWith(after, after, type)) { return false }\n if (dispatch) {\n var pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].near(tr.doc.resolve(pos), 1));\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If a block node is selected, create an empty paragraph before (if\n// it is its parent's first child) or after it.\nfunction createParagraphNear(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n if ($from.parent.inlineContent || $to.parent.inlineContent) { return false }\n var type = defaultBlockAt($from.parent.contentMatchAt($to.indexAfter()));\n if (!type || !type.isTextblock) { return false }\n if (dispatch) {\n var side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n var tr = state.tr.insert(side, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"].create(tr.doc, side + 1));\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If the cursor is in an empty textblock that can be lifted, lift the\n// block.\nfunction liftEmptyBlock(state, dispatch) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || $cursor.parent.content.size) { return false }\n if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n var before = $cursor.before();\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, before)) {\n if (dispatch) { dispatch(state.tr.split(before).scrollIntoView()); }\n return true\n }\n }\n var range = $cursor.blockRange(), target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Split the parent block of the selection. If the selection is a text\n// selection, also delete its content.\nfunction splitBlock(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"] && state.selection.node.isBlock) {\n if (!$from.parentOffset || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, $from.pos)) { return false }\n if (dispatch) { dispatch(state.tr.split($from.pos).scrollIntoView()); }\n return true\n }\n\n if (!$from.parent.isBlock) { return false }\n\n if (dispatch) {\n var atEnd = $to.parentOffset == $to.parent.content.size;\n var tr = state.tr;\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"]) { tr.deleteSelection(); }\n var deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n var types = atEnd && deflt ? [{type: deflt}] : null;\n var can = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, types);\n if (!types && !can && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{type: deflt}])) {\n types = [{type: deflt}];\n can = true;\n }\n if (can) {\n tr.split(tr.mapping.map($from.pos), 1, types);\n if (!atEnd && !$from.parentOffset && $from.parent.type != deflt &&\n $from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(deflt.create(), $from.parent)))\n { tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); }\n }\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Acts like [`splitBlock`](#commands.splitBlock), but without\n// resetting the set of active marks at the cursor.\nfunction splitBlockKeepMarks(state, dispatch) {\n return splitBlock(state, dispatch && (function (tr) {\n var marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());\n if (marks) { tr.ensureMarks(marks); }\n dispatch(tr);\n }))\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Move the selection to the node wrapping the current selection, if\n// any. (Will not select the document node.)\nfunction selectParentNode(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var pos;\n var same = $from.sharedDepth(to);\n if (same == 0) { return false }\n pos = $from.before(same);\n if (dispatch) { dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, pos))); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Select the whole document.\nfunction selectAll(state, dispatch) {\n if (dispatch) { dispatch(state.tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"AllSelection\"](state.doc))); }\n return true\n}\n\nfunction joinMaybeClear(state, $pos, dispatch) {\n var before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index();\n if (!before || !after || !before.type.compatibleContent(after.type)) { return false }\n if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n if (dispatch) { dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView()); }\n return true\n }\n if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, $pos.pos)))\n { return false }\n if (dispatch)\n { dispatch(state.tr\n .clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount))\n .join($pos.pos)\n .scrollIntoView()); }\n return true\n}\n\nfunction deleteBarrier(state, $cut, dispatch) {\n var before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match;\n if (before.type.spec.isolating || after.type.spec.isolating) { return false }\n if (joinMaybeClear(state, $cut, dispatch)) { return true }\n\n if ($cut.parent.canReplace($cut.index(), $cut.index() + 1) &&\n (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) &&\n match.matchType(conn[0] || after.type).validEnd) {\n if (dispatch) {\n var end = $cut.pos + after.nodeSize, wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n for (var i = conn.length - 1; i >= 0; i--)\n { wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(conn[i].create(null, wrap)); }\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(before.copy(wrap));\n var tr = state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"]($cut.pos - 1, end, $cut.pos, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, 1, 0), conn.length, true));\n var joinAt = end + 2 * conn.length;\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinAt)) { tr.join(joinAt); }\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n var selAfter = prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom($cut, 1);\n var range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n if (target != null && target >= $cut.depth) {\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n }\n\n return false\n}\n\n// Parameterized commands\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Wrap the selection in a node of the given type with the given\n// attributes.\nfunction wrapIn(nodeType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(range, nodeType, attrs);\n if (!wrapping) { return false }\n if (dispatch) { dispatch(state.tr.wrap(range, wrapping).scrollIntoView()); }\n return true\n }\n}\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command that tries to set the selected textblocks to the\n// given node type with the given attributes.\nfunction setBlockType(nodeType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var applicable = false;\n state.doc.nodesBetween(from, to, function (node, pos) {\n if (applicable) { return false }\n if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) { return }\n if (node.type == nodeType) {\n applicable = true;\n } else {\n var $pos = state.doc.resolve(pos), index = $pos.index();\n applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n }\n });\n if (!applicable) { return false }\n if (dispatch) { dispatch(state.tr.setBlockType(from, to, nodeType, attrs).scrollIntoView()); }\n return true\n }\n}\n\nfunction markApplies(doc, ranges, type) {\n var loop = function ( i ) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var can = $from.depth == 0 ? doc.type.allowsMarkType(type) : false;\n doc.nodesBetween($from.pos, $to.pos, function (node) {\n if (can) { return false }\n can = node.inlineContent && node.type.allowsMarkType(type);\n });\n if (can) { return { v: true } }\n };\n\n for (var i = 0; i < ranges.length; i++) {\n var returned = loop( i );\n\n if ( returned ) return returned.v;\n }\n return false\n}\n\n// :: (MarkType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command function that toggles the given mark with the\n// given attributes. Will return `false` when the current selection\n// doesn't support that mark. This will remove the mark if any marks\n// of that type exist in the selection, or add it otherwise. If the\n// selection is empty, this applies to the [stored\n// marks](#state.EditorState.storedMarks) instead of a range of the\n// document.\nfunction toggleMark(markType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var empty = ref.empty;\n var $cursor = ref.$cursor;\n var ranges = ref.ranges;\n if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType)) { return false }\n if (dispatch) {\n if ($cursor) {\n if (markType.isInSet(state.storedMarks || $cursor.marks()))\n { dispatch(state.tr.removeStoredMark(markType)); }\n else\n { dispatch(state.tr.addStoredMark(markType.create(attrs))); }\n } else {\n var has = false, tr = state.tr;\n for (var i = 0; !has && i < ranges.length; i++) {\n var ref$1 = ranges[i];\n var $from = ref$1.$from;\n var $to = ref$1.$to;\n has = state.doc.rangeHasMark($from.pos, $to.pos, markType);\n }\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref$2 = ranges[i$1];\n var $from$1 = ref$2.$from;\n var $to$1 = ref$2.$to;\n if (has) { tr.removeMark($from$1.pos, $to$1.pos, markType); }\n else { tr.addMark($from$1.pos, $to$1.pos, markType.create(attrs)); }\n }\n dispatch(tr.scrollIntoView());\n }\n }\n return true\n }\n}\n\nfunction wrapDispatchForJoin(dispatch, isJoinable) {\n return function (tr) {\n if (!tr.isGeneric) { return dispatch(tr) }\n\n var ranges = [];\n for (var i = 0; i < tr.mapping.maps.length; i++) {\n var map = tr.mapping.maps[i];\n for (var j = 0; j < ranges.length; j++)\n { ranges[j] = map.map(ranges[j]); }\n map.forEach(function (_s, _e, from, to) { return ranges.push(from, to); });\n }\n\n // Figure out which joinable points exist inside those ranges,\n // by checking all node boundaries in their parent nodes.\n var joinable = [];\n for (var i$1 = 0; i$1 < ranges.length; i$1 += 2) {\n var from = ranges[i$1], to = ranges[i$1 + 1];\n var $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth);\n for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {\n var after = parent.maybeChild(index);\n if (!after) { break }\n if (index && joinable.indexOf(pos) == -1) {\n var before = parent.child(index - 1);\n if (before.type == after.type && isJoinable(before, after))\n { joinable.push(pos); }\n }\n pos += after.nodeSize;\n }\n }\n // Join the joinable points\n joinable.sort(function (a, b) { return a - b; });\n for (var i$2 = joinable.length - 1; i$2 >= 0; i$2--) {\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinable[i$2])) { tr.join(joinable[i$2]); }\n }\n dispatch(tr);\n }\n}\n\n// :: ((state: EditorState, ?(tr: Transaction)) → bool, union<(before: Node, after: Node) → bool, [string]>) → (state: EditorState, ?(tr: Transaction)) → bool\n// Wrap a command so that, when it produces a transform that causes\n// two joinable nodes to end up next to each other, those are joined.\n// Nodes are considered joinable when they are of the same type and\n// when the `isJoinable` predicate returns true for them or, if an\n// array of strings was passed, if their node type name is in that\n// array.\nfunction autoJoin(command, isJoinable) {\n if (Array.isArray(isJoinable)) {\n var types = isJoinable;\n isJoinable = function (node) { return types.indexOf(node.type.name) > -1; };\n }\n return function (state, dispatch) { return command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable)); }\n}\n\n// :: (...[(EditorState, ?(tr: Transaction), ?EditorView) → bool]) → (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// Combine a number of command functions into a single function (which\n// calls them one by one until one returns true).\nfunction chainCommands() {\n var commands = [], len = arguments.length;\n while ( len-- ) commands[ len ] = arguments[ len ];\n\n return function(state, dispatch, view) {\n for (var i = 0; i < commands.length; i++)\n { if (commands[i](state, dispatch, view)) { return true } }\n return false\n }\n}\n\nvar backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward);\nvar del = chainCommands(deleteSelection, joinForward, selectNodeForward);\n\n// :: Object\n// A basic keymap containing bindings not specific to any schema.\n// Binds the following keys (when multiple commands are listed, they\n// are chained with [`chainCommands`](#commands.chainCommands)):\n//\n// * **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n// * **Mod-Enter** to `exitCode`\n// * **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n// * **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-a** to `selectAll`\nvar pcBaseKeymap = {\n \"Enter\": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock),\n \"Mod-Enter\": exitCode,\n \"Backspace\": backspace,\n \"Mod-Backspace\": backspace,\n \"Delete\": del,\n \"Mod-Delete\": del,\n \"Mod-a\": selectAll\n};\n\n// :: Object\n// A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n// **Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n// **Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\n// Ctrl-Delete.\nvar macBaseKeymap = {\n \"Ctrl-h\": pcBaseKeymap[\"Backspace\"],\n \"Alt-Backspace\": pcBaseKeymap[\"Mod-Backspace\"],\n \"Ctrl-d\": pcBaseKeymap[\"Delete\"],\n \"Ctrl-Alt-Backspace\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-Delete\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-d\": pcBaseKeymap[\"Mod-Delete\"]\n};\nfor (var key in pcBaseKeymap) { macBaseKeymap[key] = pcBaseKeymap[key]; }\n\n// declare global: os, navigator\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform)\n : typeof os != \"undefined\" ? os.platform() == \"darwin\" : false;\n\n// :: Object\n// Depending on the detected platform, this will hold\n// [`pcBasekeymap`](#commands.pcBaseKeymap) or\n// [`macBaseKeymap`](#commands.macBaseKeymap).\nvar baseKeymap = mac ? macBaseKeymap : pcBaseKeymap;\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-commands/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"autoJoin\", function() { return autoJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"baseKeymap\", function() { return baseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"chainCommands\", function() { return chainCommands; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createParagraphNear\", function() { return createParagraphNear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteSelection\", function() { return deleteSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exitCode\", function() { return exitCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinBackward\", function() { return joinBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinDown\", function() { return joinDown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinForward\", function() { return joinForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUp\", function() { return joinUp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lift\", function() { return lift; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftEmptyBlock\", function() { return liftEmptyBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"macBaseKeymap\", function() { return macBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newlineInCode\", function() { return newlineInCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pcBaseKeymap\", function() { return pcBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return selectAll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeBackward\", function() { return selectNodeBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeForward\", function() { return selectNodeForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNode\", function() { return selectParentNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBlockType\", function() { return setBlockType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlock\", function() { return splitBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlockKeepMarks\", function() { return splitBlockKeepMarks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleMark\", function() { return toggleMark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapIn\", function() { return wrapIn; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n // :: (EditorState, ?(tr: Transaction)) → bool\n// Delete the selection, if there is one.\n\nfunction deleteSelection(state, dispatch) {\n if (state.selection.empty) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.deleteSelection().scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and at the start of a textblock, try to\n// reduce the distance between that block and the one before it—if\n// there's a block directly before it that can be joined, join them.\n// If not, try to move the selected block closer to the next one in\n// the document structure by lifting it out of its parent or moving it\n// into a parent of the previous block. Will use the view for accurate\n// (bidi-aware) start-of-textblock detection if given.\n\n\nfunction joinBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state) : $cursor.parentOffset > 0)) {\n return false;\n }\n\n var $cut = findCutBefore($cursor); // If there is no node before this, try to lift\n\n if (!$cut) {\n var range = $cursor.blockRange(),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n }\n\n var before = $cut.nodeBefore; // Apply the joining algorithm\n\n if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch)) {\n return true;\n } // If the node below has no content and the node above is\n // selectable, delete the node below and select the one above.\n\n\n if ($cursor.parent.content.size == 0 && (textblockAt(before, \"end\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(before))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(before, \"end\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1) : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, $cut.pos - before.nodeSize));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n } // If the node before is an atom, delete it\n\n\n if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction textblockAt(node, side) {\n for (; node; node = side == \"start\" ? node.firstChild : node.lastChild) {\n if (node.isTextblock) {\n return true;\n }\n }\n\n return false;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the start of a textblock, select\n// the node before that textblock, if possible. This is intended to be\n// bound to keys like backspace, after\n// [`joinBackward`](#commands.joinBackward) or other deleting\n// commands, as a fall-back behavior when the schema doesn't allow\n// deletion at the selected point.\n\n\nfunction selectNodeBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state) : $cursor.parentOffset > 0)) {\n return false;\n }\n\n var $cut = findCutBefore($cursor),\n node = $cut && $cut.nodeBefore;\n\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());\n }\n\n return true;\n}\n\nfunction findCutBefore($pos) {\n if (!$pos.parent.type.spec.isolating) {\n for (var i = $pos.depth - 1; i >= 0; i--) {\n if ($pos.index(i) > 0) {\n return $pos.doc.resolve($pos.before(i + 1));\n }\n\n if ($pos.node(i).type.spec.isolating) {\n break;\n }\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and the cursor is at the end of a\n// textblock, try to reduce or remove the boundary between that block\n// and the one after it, either by joining them or by moving the other\n// block closer to this one in the tree structure. Will use the view\n// for accurate start-of-textblock detection if given.\n\n\nfunction joinForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state) : $cursor.parentOffset < $cursor.parent.content.size)) {\n return false;\n }\n\n var $cut = findCutAfter($cursor); // If there is no node after this, there's nothing to do\n\n if (!$cut) {\n return false;\n }\n\n var after = $cut.nodeAfter; // Try the joining algorithm\n\n if (deleteBarrier(state, $cut, dispatch)) {\n return true;\n } // If the node above has no content and the node below is\n // selectable, delete the node above and select the one below.\n\n\n if ($cursor.parent.content.size == 0 && (textblockAt(after, \"start\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(after))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(after, \"start\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1) : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, tr.mapping.map($cut.pos)));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n } // If the next node is an atom, delete it\n\n\n if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the end of a textblock, select\n// the node coming after that textblock, if possible. This is intended\n// to be bound to keys like delete, after\n// [`joinForward`](#commands.joinForward) and similar deleting\n// commands, to provide a fall-back behavior when the schema doesn't\n// allow deletion at the selected point.\n\n\nfunction selectNodeForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state) : $cursor.parentOffset < $cursor.parent.content.size)) {\n return false;\n }\n\n var $cut = findCutAfter($cursor),\n node = $cut && $cut.nodeAfter;\n\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos)).scrollIntoView());\n }\n\n return true;\n}\n\nfunction findCutAfter($pos) {\n if (!$pos.parent.type.spec.isolating) {\n for (var i = $pos.depth - 1; i >= 0; i--) {\n var parent = $pos.node(i);\n\n if ($pos.index(i) + 1 < parent.childCount) {\n return $pos.doc.resolve($pos.after(i + 1));\n }\n\n if (parent.type.spec.isolating) {\n break;\n }\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block or, if there is a text selection, the\n// closest ancestor block of the selection that can be joined, with\n// the sibling above it.\n\n\nfunction joinUp(state, dispatch) {\n var sel = state.selection,\n nodeSel = sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"],\n point;\n\n if (nodeSel) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.from)) {\n return false;\n }\n\n point = sel.from;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.from, -1);\n\n if (point == null) {\n return false;\n }\n }\n\n if (dispatch) {\n var tr = state.tr.join(point);\n\n if (nodeSel) {\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize));\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block, or the closest ancestor of the selection\n// that can be joined, with the sibling after it.\n\n\nfunction joinDown(state, dispatch) {\n var sel = state.selection,\n point;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"]) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.to)) {\n return false;\n }\n\n point = sel.to;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.to, 1);\n\n if (point == null) {\n return false;\n }\n }\n\n if (dispatch) {\n dispatch(state.tr.join(point).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Lift the selected block, or the closest ancestor block of the\n// selection that can be lifted, out of its parent node.\n\n\nfunction lift(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If the selection is in a node whose type has a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, replace the\n// selection with a newline character.\n\n\nfunction newlineInCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.insertText(\"\\n\").scrollIntoView());\n }\n\n return true;\n}\n\nfunction defaultBlockAt(match) {\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n\n if (type.isTextblock && !type.hasRequiredAttrs()) {\n return type;\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// When the selection is in a node with a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, create a\n// default block after the code block, and move the cursor there.\n\n\nfunction exitCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) {\n return false;\n }\n\n var above = $head.node(-1),\n after = $head.indexAfter(-1),\n type = defaultBlockAt(above.contentMatchAt(after));\n\n if (!above.canReplaceWith(after, after, type)) {\n return false;\n }\n\n if (dispatch) {\n var pos = $head.after(),\n tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].near(tr.doc.resolve(pos), 1));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If a block node is selected, create an empty paragraph before (if\n// it is its parent's first child) or after it.\n\n\nfunction createParagraphNear(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n\n if ($from.parent.inlineContent || $to.parent.inlineContent) {\n return false;\n }\n\n var type = defaultBlockAt($from.parent.contentMatchAt($to.indexAfter()));\n\n if (!type || !type.isTextblock) {\n return false;\n }\n\n if (dispatch) {\n var side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n var tr = state.tr.insert(side, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"].create(tr.doc, side + 1));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If the cursor is in an empty textblock that can be lifted, lift the\n// block.\n\n\nfunction liftEmptyBlock(state, dispatch) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || $cursor.parent.content.size) {\n return false;\n }\n\n if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n var before = $cursor.before();\n\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, before)) {\n if (dispatch) {\n dispatch(state.tr.split(before).scrollIntoView());\n }\n\n return true;\n }\n }\n\n var range = $cursor.blockRange(),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Split the parent block of the selection. If the selection is a text\n// selection, also delete its content.\n\n\nfunction splitBlock(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"] && state.selection.node.isBlock) {\n if (!$from.parentOffset || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, $from.pos)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.split($from.pos).scrollIntoView());\n }\n\n return true;\n }\n\n if (!$from.parent.isBlock) {\n return false;\n }\n\n if (dispatch) {\n var atEnd = $to.parentOffset == $to.parent.content.size;\n var tr = state.tr;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"]) {\n tr.deleteSelection();\n }\n\n var deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n var types = atEnd && deflt ? [{\n type: deflt\n }] : null;\n var can = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, types);\n\n if (!types && !can && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{\n type: deflt\n }])) {\n types = [{\n type: deflt\n }];\n can = true;\n }\n\n if (can) {\n tr.split(tr.mapping.map($from.pos), 1, types);\n\n if (!atEnd && !$from.parentOffset && $from.parent.type != deflt && $from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(deflt.create(), $from.parent))) {\n tr.setNodeMarkup(tr.mapping.map($from.before()), deflt);\n }\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Acts like [`splitBlock`](#commands.splitBlock), but without\n// resetting the set of active marks at the cursor.\n\n\nfunction splitBlockKeepMarks(state, dispatch) {\n return splitBlock(state, dispatch && function (tr) {\n var marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();\n\n if (marks) {\n tr.ensureMarks(marks);\n }\n\n dispatch(tr);\n });\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Move the selection to the node wrapping the current selection, if\n// any. (Will not select the document node.)\n\n\nfunction selectParentNode(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var pos;\n var same = $from.sharedDepth(to);\n\n if (same == 0) {\n return false;\n }\n\n pos = $from.before(same);\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, pos)));\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Select the whole document.\n\n\nfunction selectAll(state, dispatch) {\n if (dispatch) {\n dispatch(state.tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"AllSelection\"](state.doc)));\n }\n\n return true;\n}\n\nfunction joinMaybeClear(state, $pos, dispatch) {\n var before = $pos.nodeBefore,\n after = $pos.nodeAfter,\n index = $pos.index();\n\n if (!before || !after || !before.type.compatibleContent(after.type)) {\n return false;\n }\n\n if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());\n }\n\n return true;\n }\n\n if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, $pos.pos))) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());\n }\n\n return true;\n}\n\nfunction deleteBarrier(state, $cut, dispatch) {\n var before = $cut.nodeBefore,\n after = $cut.nodeAfter,\n conn,\n match;\n\n if (before.type.spec.isolating || after.type.spec.isolating) {\n return false;\n }\n\n if (joinMaybeClear(state, $cut, dispatch)) {\n return true;\n }\n\n if ($cut.parent.canReplace($cut.index(), $cut.index() + 1) && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {\n if (dispatch) {\n var end = $cut.pos + after.nodeSize,\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n\n for (var i = conn.length - 1; i >= 0; i--) {\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(conn[i].create(null, wrap));\n }\n\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(before.copy(wrap));\n var tr = state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"]($cut.pos - 1, end, $cut.pos, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, 1, 0), conn.length, true));\n var joinAt = end + 2 * conn.length;\n\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinAt)) {\n tr.join(joinAt);\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n }\n\n var selAfter = prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom($cut, 1);\n var range = selAfter && selAfter.$from.blockRange(selAfter.$to),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target != null && target >= $cut.depth) {\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n} // Parameterized commands\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Wrap the selection in a node of the given type with the given\n// attributes.\n\n\nfunction wrapIn(nodeType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(range, nodeType, attrs);\n\n if (!wrapping) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.wrap(range, wrapping).scrollIntoView());\n }\n\n return true;\n };\n} // :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command that tries to set the selected textblocks to the\n// given node type with the given attributes.\n\n\nfunction setBlockType(nodeType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var applicable = false;\n state.doc.nodesBetween(from, to, function (node, pos) {\n if (applicable) {\n return false;\n }\n\n if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) {\n return;\n }\n\n if (node.type == nodeType) {\n applicable = true;\n } else {\n var $pos = state.doc.resolve(pos),\n index = $pos.index();\n applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n }\n });\n\n if (!applicable) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setBlockType(from, to, nodeType, attrs).scrollIntoView());\n }\n\n return true;\n };\n}\n\nfunction markApplies(doc, ranges, type) {\n var loop = function loop(i) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var can = $from.depth == 0 ? doc.type.allowsMarkType(type) : false;\n doc.nodesBetween($from.pos, $to.pos, function (node) {\n if (can) {\n return false;\n }\n\n can = node.inlineContent && node.type.allowsMarkType(type);\n });\n\n if (can) {\n return {\n v: true\n };\n }\n };\n\n for (var i = 0; i < ranges.length; i++) {\n var returned = loop(i);\n if (returned) return returned.v;\n }\n\n return false;\n} // :: (MarkType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command function that toggles the given mark with the\n// given attributes. Will return `false` when the current selection\n// doesn't support that mark. This will remove the mark if any marks\n// of that type exist in the selection, or add it otherwise. If the\n// selection is empty, this applies to the [stored\n// marks](#state.EditorState.storedMarks) instead of a range of the\n// document.\n\n\nfunction toggleMark(markType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var empty = ref.empty;\n var $cursor = ref.$cursor;\n var ranges = ref.ranges;\n\n if (empty && !$cursor || !markApplies(state.doc, ranges, markType)) {\n return false;\n }\n\n if (dispatch) {\n if ($cursor) {\n if (markType.isInSet(state.storedMarks || $cursor.marks())) {\n dispatch(state.tr.removeStoredMark(markType));\n } else {\n dispatch(state.tr.addStoredMark(markType.create(attrs)));\n }\n } else {\n var has = false,\n tr = state.tr;\n\n for (var i = 0; !has && i < ranges.length; i++) {\n var ref$1 = ranges[i];\n var $from = ref$1.$from;\n var $to = ref$1.$to;\n has = state.doc.rangeHasMark($from.pos, $to.pos, markType);\n }\n\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref$2 = ranges[i$1];\n var $from$1 = ref$2.$from;\n var $to$1 = ref$2.$to;\n\n if (has) {\n tr.removeMark($from$1.pos, $to$1.pos, markType);\n } else {\n tr.addMark($from$1.pos, $to$1.pos, markType.create(attrs));\n }\n }\n\n dispatch(tr.scrollIntoView());\n }\n }\n\n return true;\n };\n}\n\nfunction wrapDispatchForJoin(dispatch, isJoinable) {\n return function (tr) {\n if (!tr.isGeneric) {\n return dispatch(tr);\n }\n\n var ranges = [];\n\n for (var i = 0; i < tr.mapping.maps.length; i++) {\n var map = tr.mapping.maps[i];\n\n for (var j = 0; j < ranges.length; j++) {\n ranges[j] = map.map(ranges[j]);\n }\n\n map.forEach(function (_s, _e, from, to) {\n return ranges.push(from, to);\n });\n } // Figure out which joinable points exist inside those ranges,\n // by checking all node boundaries in their parent nodes.\n\n\n var joinable = [];\n\n for (var i$1 = 0; i$1 < ranges.length; i$1 += 2) {\n var from = ranges[i$1],\n to = ranges[i$1 + 1];\n var $from = tr.doc.resolve(from),\n depth = $from.sharedDepth(to),\n parent = $from.node(depth);\n\n for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {\n var after = parent.maybeChild(index);\n\n if (!after) {\n break;\n }\n\n if (index && joinable.indexOf(pos) == -1) {\n var before = parent.child(index - 1);\n\n if (before.type == after.type && isJoinable(before, after)) {\n joinable.push(pos);\n }\n }\n\n pos += after.nodeSize;\n }\n } // Join the joinable points\n\n\n joinable.sort(function (a, b) {\n return a - b;\n });\n\n for (var i$2 = joinable.length - 1; i$2 >= 0; i$2--) {\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinable[i$2])) {\n tr.join(joinable[i$2]);\n }\n }\n\n dispatch(tr);\n };\n} // :: ((state: EditorState, ?(tr: Transaction)) → bool, union<(before: Node, after: Node) → bool, [string]>) → (state: EditorState, ?(tr: Transaction)) → bool\n// Wrap a command so that, when it produces a transform that causes\n// two joinable nodes to end up next to each other, those are joined.\n// Nodes are considered joinable when they are of the same type and\n// when the `isJoinable` predicate returns true for them or, if an\n// array of strings was passed, if their node type name is in that\n// array.\n\n\nfunction autoJoin(command, isJoinable) {\n if (Array.isArray(isJoinable)) {\n var types = isJoinable;\n\n isJoinable = function isJoinable(node) {\n return types.indexOf(node.type.name) > -1;\n };\n }\n\n return function (state, dispatch) {\n return command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable));\n };\n} // :: (...[(EditorState, ?(tr: Transaction), ?EditorView) → bool]) → (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// Combine a number of command functions into a single function (which\n// calls them one by one until one returns true).\n\n\nfunction chainCommands() {\n var commands = [],\n len = arguments.length;\n\n while (len--) {\n commands[len] = arguments[len];\n }\n\n return function (state, dispatch, view) {\n for (var i = 0; i < commands.length; i++) {\n if (commands[i](state, dispatch, view)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward);\nvar del = chainCommands(deleteSelection, joinForward, selectNodeForward); // :: Object\n// A basic keymap containing bindings not specific to any schema.\n// Binds the following keys (when multiple commands are listed, they\n// are chained with [`chainCommands`](#commands.chainCommands)):\n//\n// * **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n// * **Mod-Enter** to `exitCode`\n// * **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n// * **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-a** to `selectAll`\n\nvar pcBaseKeymap = {\n \"Enter\": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock),\n \"Mod-Enter\": exitCode,\n \"Backspace\": backspace,\n \"Mod-Backspace\": backspace,\n \"Delete\": del,\n \"Mod-Delete\": del,\n \"Mod-a\": selectAll\n}; // :: Object\n// A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n// **Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n// **Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\n// Ctrl-Delete.\n\nvar macBaseKeymap = {\n \"Ctrl-h\": pcBaseKeymap[\"Backspace\"],\n \"Alt-Backspace\": pcBaseKeymap[\"Mod-Backspace\"],\n \"Ctrl-d\": pcBaseKeymap[\"Delete\"],\n \"Ctrl-Alt-Backspace\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-Delete\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-d\": pcBaseKeymap[\"Mod-Delete\"]\n};\n\nfor (var key in pcBaseKeymap) {\n macBaseKeymap[key] = pcBaseKeymap[key];\n} // declare global: os, navigator\n\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : typeof os != \"undefined\" ? os.platform() == \"darwin\" : false; // :: Object\n// Depending on the detected platform, this will hold\n// [`pcBasekeymap`](#commands.pcBaseKeymap) or\n// [`macBaseKeymap`](#commands.macBaseKeymap).\n\nvar baseKeymap = mac ? macBaseKeymap : pcBaseKeymap;\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-commands/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-dropcursor/dist/index.es.js": /*!**************************************************************!*\ !*** ./node_modules/prosemirror-dropcursor/dist/index.es.js ***! \**************************************************************/ /*! exports provided: dropCursor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropCursor\", function() { return dropCursor; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\n// :: (options: ?Object) → Plugin\n// Create a plugin that, when added to a ProseMirror instance,\n// causes a decoration to show up at the drop position when something\n// is dragged over the editor.\n//\n// options::- These options are supported:\n//\n// color:: ?string\n// The color of the cursor. Defaults to `black`.\n//\n// width:: ?number\n// The precise width of the cursor in pixels. Defaults to 1.\n//\n// class:: ?string\n// A CSS class name to add to the cursor element.\nfunction dropCursor(options) {\n if ( options === void 0 ) options = {};\n\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n view: function view(editorView) { return new DropCursorView(editorView, options) }\n })\n}\n\nvar DropCursorView = function DropCursorView(editorView, options) {\n var this$1 = this;\n\n this.editorView = editorView;\n this.width = options.width || 1;\n this.color = options.color || \"black\";\n this.class = options.class;\n this.cursorPos = null;\n this.element = null;\n this.timeout = null;\n\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(function (name) {\n var handler = function (e) { return this$1[name](e); };\n editorView.dom.addEventListener(name, handler);\n return {name: name, handler: handler}\n });\n};\n\nDropCursorView.prototype.destroy = function destroy () {\n var this$1 = this;\n\n this.handlers.forEach(function (ref) {\n var name = ref.name;\n var handler = ref.handler;\n\n return this$1.editorView.dom.removeEventListener(name, handler);\n });\n};\n\nDropCursorView.prototype.update = function update (editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) { this.updateOverlay(); }\n};\n\nDropCursorView.prototype.setCursor = function setCursor (pos) {\n if (pos == this.cursorPos) { return }\n this.cursorPos = pos;\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n } else {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.updateOverlay = function updateOverlay () {\n var $pos = this.editorView.state.doc.resolve(this.cursorPos), rect;\n if (!$pos.parent.inlineContent) {\n var before = $pos.nodeBefore, after = $pos.nodeAfter;\n if (before || after) {\n var nodeRect = this.editorView.nodeDOM(this.cursorPos - (before ?before.nodeSize : 0)).getBoundingClientRect();\n var top = before ? nodeRect.bottom : nodeRect.top;\n if (before && after)\n { top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2; }\n rect = {left: nodeRect.left, right: nodeRect.right, top: top - this.width / 2, bottom: top + this.width / 2};\n }\n }\n if (!rect) {\n var coords = this.editorView.coordsAtPos(this.cursorPos);\n rect = {left: coords.left - this.width / 2, right: coords.left + this.width / 2, top: coords.top, bottom: coords.bottom};\n }\n\n var parent = this.editorView.dom.offsetParent;\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n if (this.class) { this.element.className = this.class; }\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none; background-color: \" + this.color;\n }\n var parentRect = !parent || parent == document.body && getComputedStyle(parent).position == \"static\"\n ? {left: -pageXOffset, top: -pageYOffset} : parent.getBoundingClientRect();\n this.element.style.left = (rect.left - parentRect.left) + \"px\";\n this.element.style.top = (rect.top - parentRect.top) + \"px\";\n this.element.style.width = (rect.right - rect.left) + \"px\";\n this.element.style.height = (rect.bottom - rect.top) + \"px\";\n};\n\nDropCursorView.prototype.scheduleRemoval = function scheduleRemoval (timeout) {\n var this$1 = this;\n\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () { return this$1.setCursor(null); }, timeout);\n};\n\nDropCursorView.prototype.dragover = function dragover (event) {\n if (!this.editorView.editable) { return }\n var pos = this.editorView.posAtCoords({left: event.clientX, top: event.clientY});\n if (pos) {\n var target = pos.pos;\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n target = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"dropPoint\"])(this.editorView.state.doc, target, this.editorView.dragging.slice);\n if (target == null) { target = pos.pos; }\n }\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n};\n\nDropCursorView.prototype.dragend = function dragend () {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.drop = function drop () {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.dragleave = function dragleave (event) {\n if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget))\n { this.setCursor(null); }\n};\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-dropcursor/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropCursor\", function() { return dropCursor; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n // :: (options: ?Object) → Plugin\n// Create a plugin that, when added to a ProseMirror instance,\n// causes a decoration to show up at the drop position when something\n// is dragged over the editor.\n//\n// options::- These options are supported:\n//\n// color:: ?string\n// The color of the cursor. Defaults to `black`.\n//\n// width:: ?number\n// The precise width of the cursor in pixels. Defaults to 1.\n//\n// class:: ?string\n// A CSS class name to add to the cursor element.\n\nfunction dropCursor(options) {\n if (options === void 0) options = {};\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n view: function view(editorView) {\n return new DropCursorView(editorView, options);\n }\n });\n}\n\nvar DropCursorView = function DropCursorView(editorView, options) {\n var this$1 = this;\n this.editorView = editorView;\n this.width = options.width || 1;\n this.color = options.color || \"black\";\n this[\"class\"] = options[\"class\"];\n this.cursorPos = null;\n this.element = null;\n this.timeout = null;\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(function (name) {\n var handler = function handler(e) {\n return this$1[name](e);\n };\n\n editorView.dom.addEventListener(name, handler);\n return {\n name: name,\n handler: handler\n };\n });\n};\n\nDropCursorView.prototype.destroy = function destroy() {\n var this$1 = this;\n this.handlers.forEach(function (ref) {\n var name = ref.name;\n var handler = ref.handler;\n return this$1.editorView.dom.removeEventListener(name, handler);\n });\n};\n\nDropCursorView.prototype.update = function update(editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.setCursor = function setCursor(pos) {\n if (pos == this.cursorPos) {\n return;\n }\n\n this.cursorPos = pos;\n\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n } else {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.updateOverlay = function updateOverlay() {\n var $pos = this.editorView.state.doc.resolve(this.cursorPos),\n rect;\n\n if (!$pos.parent.inlineContent) {\n var before = $pos.nodeBefore,\n after = $pos.nodeAfter;\n\n if (before || after) {\n var nodeRect = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0)).getBoundingClientRect();\n var top = before ? nodeRect.bottom : nodeRect.top;\n\n if (before && after) {\n top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n }\n\n rect = {\n left: nodeRect.left,\n right: nodeRect.right,\n top: top - this.width / 2,\n bottom: top + this.width / 2\n };\n }\n }\n\n if (!rect) {\n var coords = this.editorView.coordsAtPos(this.cursorPos);\n rect = {\n left: coords.left - this.width / 2,\n right: coords.left + this.width / 2,\n top: coords.top,\n bottom: coords.bottom\n };\n }\n\n var parent = this.editorView.dom.offsetParent;\n\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n\n if (this[\"class\"]) {\n this.element.className = this[\"class\"];\n }\n\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none; background-color: \" + this.color;\n }\n\n var parentRect = !parent || parent == document.body && getComputedStyle(parent).position == \"static\" ? {\n left: -pageXOffset,\n top: -pageYOffset\n } : parent.getBoundingClientRect();\n this.element.style.left = rect.left - parentRect.left + \"px\";\n this.element.style.top = rect.top - parentRect.top + \"px\";\n this.element.style.width = rect.right - rect.left + \"px\";\n this.element.style.height = rect.bottom - rect.top + \"px\";\n};\n\nDropCursorView.prototype.scheduleRemoval = function scheduleRemoval(timeout) {\n var this$1 = this;\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () {\n return this$1.setCursor(null);\n }, timeout);\n};\n\nDropCursorView.prototype.dragover = function dragover(event) {\n if (!this.editorView.editable) {\n return;\n }\n\n var pos = this.editorView.posAtCoords({\n left: event.clientX,\n top: event.clientY\n });\n\n if (pos) {\n var target = pos.pos;\n\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n target = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"dropPoint\"])(this.editorView.state.doc, target, this.editorView.dragging.slice);\n\n if (target == null) {\n target = pos.pos;\n }\n }\n\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n};\n\nDropCursorView.prototype.dragend = function dragend() {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.drop = function drop() {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.dragleave = function dragleave(event) {\n if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget)) {\n this.setCursor(null);\n }\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-dropcursor/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-example-setup/dist/index.es.js": /*!*****************************************************************!*\ !*** ./node_modules/prosemirror-example-setup/dist/index.es.js ***! \*****************************************************************/ /*! exports provided: buildInputRules, buildKeymap, buildMenuItems, exampleSetup */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildInputRules\", function() { return buildInputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildKeymap\", function() { return buildKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildMenuItems\", function() { return buildMenuItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exampleSetup\", function() { return exampleSetup; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prosemirror-dropcursor */ \"./node_modules/prosemirror-dropcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prosemirror-gapcursor */ \"./node_modules/prosemirror-gapcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prosemirror-menu */ \"./node_modules/prosemirror-menu/dist/index.es.js\");\n/* harmony import */ var prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prosemirror-schema-list */ \"./node_modules/prosemirror-schema-list/dist/index.es.js\");\n/* harmony import */ var prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prosemirror-inputrules */ \"./node_modules/prosemirror-inputrules/dist/index.es.js\");\n\n\n\n\n\n\n\n\n\n\nvar prefix = \"ProseMirror-prompt\";\n\nfunction openPrompt(options) {\n var wrapper = document.body.appendChild(document.createElement(\"div\"));\n wrapper.className = prefix;\n\n var mouseOutside = function (e) { if (!wrapper.contains(e.target)) { close(); } };\n setTimeout(function () { return window.addEventListener(\"mousedown\", mouseOutside); }, 50);\n var close = function () {\n window.removeEventListener(\"mousedown\", mouseOutside);\n if (wrapper.parentNode) { wrapper.parentNode.removeChild(wrapper); }\n };\n\n var domFields = [];\n for (var name in options.fields) { domFields.push(options.fields[name].render()); }\n\n var submitButton = document.createElement(\"button\");\n submitButton.type = \"submit\";\n submitButton.className = prefix + \"-submit\";\n submitButton.textContent = \"OK\";\n var cancelButton = document.createElement(\"button\");\n cancelButton.type = \"button\";\n cancelButton.className = prefix + \"-cancel\";\n cancelButton.textContent = \"Cancel\";\n cancelButton.addEventListener(\"click\", close);\n\n var form = wrapper.appendChild(document.createElement(\"form\"));\n if (options.title) { form.appendChild(document.createElement(\"h5\")).textContent = options.title; }\n domFields.forEach(function (field) {\n form.appendChild(document.createElement(\"div\")).appendChild(field);\n });\n var buttons = form.appendChild(document.createElement(\"div\"));\n buttons.className = prefix + \"-buttons\";\n buttons.appendChild(submitButton);\n buttons.appendChild(document.createTextNode(\" \"));\n buttons.appendChild(cancelButton);\n\n var box = wrapper.getBoundingClientRect();\n wrapper.style.top = ((window.innerHeight - box.height) / 2) + \"px\";\n wrapper.style.left = ((window.innerWidth - box.width) / 2) + \"px\";\n\n var submit = function () {\n var params = getValues(options.fields, domFields);\n if (params) {\n close();\n options.callback(params);\n }\n };\n\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n submit();\n });\n\n form.addEventListener(\"keydown\", function (e) {\n if (e.keyCode == 27) {\n e.preventDefault();\n close();\n } else if (e.keyCode == 13 && !(e.ctrlKey || e.metaKey || e.shiftKey)) {\n e.preventDefault();\n submit();\n } else if (e.keyCode == 9) {\n window.setTimeout(function () {\n if (!wrapper.contains(document.activeElement)) { close(); }\n }, 500);\n }\n });\n\n var input = form.elements[0];\n if (input) { input.focus(); }\n}\n\nfunction getValues(fields, domFields) {\n var result = Object.create(null), i = 0;\n for (var name in fields) {\n var field = fields[name], dom = domFields[i++];\n var value = field.read(dom), bad = field.validate(value);\n if (bad) {\n reportInvalid(dom, bad);\n return null\n }\n result[name] = field.clean(value);\n }\n return result\n}\n\nfunction reportInvalid(dom, message) {\n // FIXME this is awful and needs a lot more work\n var parent = dom.parentNode;\n var msg = parent.appendChild(document.createElement(\"div\"));\n msg.style.left = (dom.offsetLeft + dom.offsetWidth + 2) + \"px\";\n msg.style.top = (dom.offsetTop - 5) + \"px\";\n msg.className = \"ProseMirror-invalid\";\n msg.textContent = message;\n setTimeout(function () { return parent.removeChild(msg); }, 1500);\n}\n\n// ::- The type of field that `FieldPrompt` expects to be passed to it.\nvar Field = function Field(options) { this.options = options; };\n\n// render:: (state: EditorState, props: Object) → dom.Node\n// Render the field to the DOM. Should be implemented by all subclasses.\n\n// :: (dom.Node) → any\n// Read the field's value from its DOM node.\nField.prototype.read = function read (dom) { return dom.value };\n\n// :: (any) → ?string\n// A field-type-specific validation function.\nField.prototype.validateType = function validateType (_value) {};\n\nField.prototype.validate = function validate (value) {\n if (!value && this.options.required)\n { return \"Required field\" }\n return this.validateType(value) || (this.options.validate && this.options.validate(value))\n};\n\nField.prototype.clean = function clean (value) {\n return this.options.clean ? this.options.clean(value) : value\n};\n\n// ::- A field class for single-line text fields.\nvar TextField = /*@__PURE__*/(function (Field) {\n function TextField () {\n Field.apply(this, arguments);\n }\n\n if ( Field ) TextField.__proto__ = Field;\n TextField.prototype = Object.create( Field && Field.prototype );\n TextField.prototype.constructor = TextField;\n\n TextField.prototype.render = function render () {\n var input = document.createElement(\"input\");\n input.type = \"text\";\n input.placeholder = this.options.label;\n input.value = this.options.value || \"\";\n input.autocomplete = \"off\";\n return input\n };\n\n return TextField;\n}(Field));\n\n// Helpers to create specific types of items\n\nfunction canInsert(state, nodeType) {\n var $from = state.selection.$from;\n for (var d = $from.depth; d >= 0; d--) {\n var index = $from.index(d);\n if ($from.node(d).canReplaceWith(index, index, nodeType)) { return true }\n }\n return false\n}\n\nfunction insertImageItem(nodeType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert image\",\n label: \"Image\",\n enable: function enable(state) { return canInsert(state, nodeType) },\n run: function run(state, _, view) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var attrs = null;\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"NodeSelection\"] && state.selection.node.type == nodeType)\n { attrs = state.selection.node.attrs; }\n openPrompt({\n title: \"Insert image\",\n fields: {\n src: new TextField({label: \"Location\", required: true, value: attrs && attrs.src}),\n title: new TextField({label: \"Title\", value: attrs && attrs.title}),\n alt: new TextField({label: \"Description\",\n value: attrs ? attrs.alt : state.doc.textBetween(from, to, \" \")})\n },\n callback: function callback(attrs) {\n view.dispatch(view.state.tr.replaceSelectionWith(nodeType.createAndFill(attrs)));\n view.focus();\n }\n });\n }\n })\n}\n\nfunction cmdItem(cmd, options) {\n var passedOptions = {\n label: options.title,\n run: cmd\n };\n for (var prop in options) { passedOptions[prop] = options[prop]; }\n if ((!options.enable || options.enable === true) && !options.select)\n { passedOptions[options.enable ? \"enable\" : \"select\"] = function (state) { return cmd(state); }; }\n\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"](passedOptions)\n}\n\nfunction markActive(state, type) {\n var ref = state.selection;\n var from = ref.from;\n var $from = ref.$from;\n var to = ref.to;\n var empty = ref.empty;\n if (empty) { return type.isInSet(state.storedMarks || $from.marks()) }\n else { return state.doc.rangeHasMark(from, to, type) }\n}\n\nfunction markItem(markType, options) {\n var passedOptions = {\n active: function active(state) { return markActive(state, markType) },\n enable: true\n };\n for (var prop in options) { passedOptions[prop] = options[prop]; }\n return cmdItem(Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType), passedOptions)\n}\n\nfunction linkItem(markType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Add or remove link\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].link,\n active: function active(state) { return markActive(state, markType) },\n enable: function enable(state) { return !state.selection.empty },\n run: function run(state, dispatch, view) {\n if (markActive(state, markType)) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType)(state, dispatch);\n return true\n }\n openPrompt({\n title: \"Create a link\",\n fields: {\n href: new TextField({\n label: \"Link target\",\n required: true\n }),\n title: new TextField({label: \"Title\"})\n },\n callback: function callback(attrs) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType, attrs)(view.state, view.dispatch);\n view.focus();\n }\n });\n }\n })\n}\n\nfunction wrapListItem(nodeType, options) {\n return cmdItem(Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(nodeType, options.attrs), options)\n}\n\n// :: (Schema) → Object\n// Given a schema, look for default mark and node types in it and\n// return an object with relevant menu items relating to those marks:\n//\n// **`toggleStrong`**`: MenuItem`\n// : A menu item to toggle the [strong mark](#schema-basic.StrongMark).\n//\n// **`toggleEm`**`: MenuItem`\n// : A menu item to toggle the [emphasis mark](#schema-basic.EmMark).\n//\n// **`toggleCode`**`: MenuItem`\n// : A menu item to toggle the [code font mark](#schema-basic.CodeMark).\n//\n// **`toggleLink`**`: MenuItem`\n// : A menu item to toggle the [link mark](#schema-basic.LinkMark).\n//\n// **`insertImage`**`: MenuItem`\n// : A menu item to insert an [image](#schema-basic.Image).\n//\n// **`wrapBulletList`**`: MenuItem`\n// : A menu item to wrap the selection in a [bullet list](#schema-list.BulletList).\n//\n// **`wrapOrderedList`**`: MenuItem`\n// : A menu item to wrap the selection in an [ordered list](#schema-list.OrderedList).\n//\n// **`wrapBlockQuote`**`: MenuItem`\n// : A menu item to wrap the selection in a [block quote](#schema-basic.BlockQuote).\n//\n// **`makeParagraph`**`: MenuItem`\n// : A menu item to set the current textblock to be a normal\n// [paragraph](#schema-basic.Paragraph).\n//\n// **`makeCodeBlock`**`: MenuItem`\n// : A menu item to set the current textblock to be a\n// [code block](#schema-basic.CodeBlock).\n//\n// **`makeHead[N]`**`: MenuItem`\n// : Where _N_ is 1 to 6. Menu items to set the current textblock to\n// be a [heading](#schema-basic.Heading) of level _N_.\n//\n// **`insertHorizontalRule`**`: MenuItem`\n// : A menu item to insert a horizontal rule.\n//\n// The return value also contains some prefabricated menu elements and\n// menus, that you can use instead of composing your own menu from\n// scratch:\n//\n// **`insertMenu`**`: Dropdown`\n// : A dropdown containing the `insertImage` and\n// `insertHorizontalRule` items.\n//\n// **`typeMenu`**`: Dropdown`\n// : A dropdown containing the items for making the current\n// textblock a paragraph, code block, or heading.\n//\n// **`fullMenu`**`: [[MenuElement]]`\n// : An array of arrays of menu elements for use as the full menu\n// for, for example the [menu bar](https://github.com/prosemirror/prosemirror-menu#user-content-menubar).\nfunction buildMenuItems(schema) {\n var r = {}, type;\n if (type = schema.marks.strong)\n { r.toggleStrong = markItem(type, {title: \"Toggle strong style\", icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].strong}); }\n if (type = schema.marks.em)\n { r.toggleEm = markItem(type, {title: \"Toggle emphasis\", icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].em}); }\n if (type = schema.marks.code)\n { r.toggleCode = markItem(type, {title: \"Toggle code font\", icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].code}); }\n if (type = schema.marks.link)\n { r.toggleLink = linkItem(type); }\n\n if (type = schema.nodes.image)\n { r.insertImage = insertImageItem(type); }\n if (type = schema.nodes.bullet_list)\n { r.wrapBulletList = wrapListItem(type, {\n title: \"Wrap in bullet list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].bulletList\n }); }\n if (type = schema.nodes.ordered_list)\n { r.wrapOrderedList = wrapListItem(type, {\n title: \"Wrap in ordered list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].orderedList\n }); }\n if (type = schema.nodes.blockquote)\n { r.wrapBlockQuote = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"wrapItem\"])(type, {\n title: \"Wrap in block quote\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].blockquote\n }); }\n if (type = schema.nodes.paragraph)\n { r.makeParagraph = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to paragraph\",\n label: \"Plain\"\n }); }\n if (type = schema.nodes.code_block)\n { r.makeCodeBlock = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to code block\",\n label: \"Code\"\n }); }\n if (type = schema.nodes.heading)\n { for (var i = 1; i <= 10; i++)\n { r[\"makeHead\" + i] = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to heading \" + i,\n label: \"Level \" + i,\n attrs: {level: i}\n }); } }\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n r.insertHorizontalRule = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert horizontal rule\",\n label: \"Horizontal rule\",\n enable: function enable(state) { return canInsert(state, hr) },\n run: function run(state, dispatch) { dispatch(state.tr.replaceSelectionWith(hr.create())); }\n });\n }\n\n var cut = function (arr) { return arr.filter(function (x) { return x; }); };\n r.insertMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.insertImage, r.insertHorizontalRule]), {label: \"Insert\"});\n r.typeMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.makeParagraph, r.makeCodeBlock, r.makeHead1 && new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"DropdownSubmenu\"](cut([\n r.makeHead1, r.makeHead2, r.makeHead3, r.makeHead4, r.makeHead5, r.makeHead6\n ]), {label: \"Heading\"})]), {label: \"Type...\"});\n\n r.inlineMenu = [cut([r.toggleStrong, r.toggleEm, r.toggleCode, r.toggleLink])];\n r.blockMenu = [cut([r.wrapBulletList, r.wrapOrderedList, r.wrapBlockQuote, prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"joinUpItem\"],\n prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"liftItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"selectParentNodeItem\"]])];\n r.fullMenu = r.inlineMenu.concat([[r.insertMenu, r.typeMenu]], [[prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"undoItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"redoItem\"]]], r.blockMenu);\n\n return r\n}\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false;\n\n// :: (Schema, ?Object) → Object\n// Inspect the given schema looking for marks and nodes from the\n// basic schema, and if found, add key bindings related to them.\n// This will add:\n//\n// * **Mod-b** for toggling [strong](#schema-basic.StrongMark)\n// * **Mod-i** for toggling [emphasis](#schema-basic.EmMark)\n// * **Mod-`** for toggling [code font](#schema-basic.CodeMark)\n// * **Ctrl-Shift-0** for making the current textblock a paragraph\n// * **Ctrl-Shift-1** to **Ctrl-Shift-Digit6** for making the current\n// textblock a heading of the corresponding level\n// * **Ctrl-Shift-Backslash** to make the current textblock a code block\n// * **Ctrl-Shift-8** to wrap the selection in an ordered list\n// * **Ctrl-Shift-9** to wrap the selection in a bullet list\n// * **Ctrl->** to wrap the selection in a block quote\n// * **Enter** to split a non-empty textblock in a list item while at\n// the same time splitting the list item\n// * **Mod-Enter** to insert a hard break\n// * **Mod-_** to insert a horizontal rule\n// * **Backspace** to undo an input rule\n// * **Alt-ArrowUp** to `joinUp`\n// * **Alt-ArrowDown** to `joinDown`\n// * **Mod-BracketLeft** to `lift`\n// * **Escape** to `selectParentNode`\n//\n// You can suppress or map these bindings by passing a `mapKeys`\n// argument, which maps key names (say `\"Mod-B\"` to either `false`, to\n// remove the binding, or a new key name string.\nfunction buildKeymap(schema, mapKeys) {\n var keys = {}, type;\n function bind(key, cmd) {\n if (mapKeys) {\n var mapped = mapKeys[key];\n if (mapped === false) { return }\n if (mapped) { key = mapped; }\n }\n keys[key] = cmd;\n }\n\n\n bind(\"Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"undo\"]);\n bind(\"Shift-Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]);\n bind(\"Backspace\", prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"undoInputRule\"]);\n if (!mac) { bind(\"Mod-y\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]); }\n\n bind(\"Alt-ArrowUp\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinUp\"]);\n bind(\"Alt-ArrowDown\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinDown\"]);\n bind(\"Mod-BracketLeft\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"lift\"]);\n bind(\"Escape\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"selectParentNode\"]);\n\n if (type = schema.marks.strong) {\n bind(\"Mod-b\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-B\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n if (type = schema.marks.em) {\n bind(\"Mod-i\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-I\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n if (type = schema.marks.code)\n { bind(\"Mod-`\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type)); }\n\n if (type = schema.nodes.bullet_list)\n { bind(\"Shift-Ctrl-8\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type)); }\n if (type = schema.nodes.ordered_list)\n { bind(\"Shift-Ctrl-9\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type)); }\n if (type = schema.nodes.blockquote)\n { bind(\"Ctrl->\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"wrapIn\"])(type)); }\n if (type = schema.nodes.hard_break) {\n var br = type, cmd = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"chainCommands\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"exitCode\"], function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());\n return true\n });\n bind(\"Mod-Enter\", cmd);\n bind(\"Shift-Enter\", cmd);\n if (mac) { bind(\"Ctrl-Enter\", cmd); }\n }\n if (type = schema.nodes.list_item) {\n bind(\"Enter\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"splitListItem\"])(type));\n bind(\"Mod-[\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"liftListItem\"])(type));\n bind(\"Mod-]\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"sinkListItem\"])(type));\n }\n if (type = schema.nodes.paragraph)\n { bind(\"Shift-Ctrl-0\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type)); }\n if (type = schema.nodes.code_block)\n { bind(\"Shift-Ctrl-\\\\\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type)); }\n if (type = schema.nodes.heading)\n { for (var i = 1; i <= 6; i++) { bind(\"Shift-Ctrl-\" + i, Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type, {level: i})); } }\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n bind(\"Mod-_\", function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(hr.create()).scrollIntoView());\n return true\n });\n }\n\n return keys\n}\n\n// : (NodeType) → InputRule\n// Given a blockquote node type, returns an input rule that turns `\"> \"`\n// at the start of a textblock into a blockquote.\nfunction blockQuoteRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*>\\s$/, nodeType)\n}\n\n// : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a number\n// followed by a dot at the start of a textblock into an ordered list.\nfunction orderedListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^(\\d+)\\.\\s$/, nodeType, function (match) { return ({order: +match[1]}); },\n function (match, node) { return node.childCount + node.attrs.order == +match[1]; })\n}\n\n// : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a bullet\n// (dash, plush, or asterisk) at the start of a textblock into a\n// bullet list.\nfunction bulletListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*([-+*])\\s$/, nodeType)\n}\n\n// : (NodeType) → InputRule\n// Given a code block node type, returns an input rule that turns a\n// textblock starting with three backticks into a code block.\nfunction codeBlockRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(/^```$/, nodeType)\n}\n\n// : (NodeType, number) → InputRule\n// Given a node type and a maximum level, creates an input rule that\n// turns up to that number of `#` characters followed by a space at\n// the start of a textblock into a heading whose level corresponds to\n// the number of `#` signs.\nfunction headingRule(nodeType, maxLevel) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(new RegExp(\"^(#{1,\" + maxLevel + \"})\\\\s$\"),\n nodeType, function (match) { return ({level: match[1].length}); })\n}\n\n// : (Schema) → Plugin\n// A set of input rules for creating the basic block quotes, lists,\n// code blocks, and heading.\nfunction buildInputRules(schema) {\n var rules = prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"smartQuotes\"].concat(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"ellipsis\"], prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"emDash\"]), type;\n if (type = schema.nodes.blockquote) { rules.push(blockQuoteRule(type)); }\n if (type = schema.nodes.ordered_list) { rules.push(orderedListRule(type)); }\n if (type = schema.nodes.bullet_list) { rules.push(bulletListRule(type)); }\n if (type = schema.nodes.code_block) { rules.push(codeBlockRule(type)); }\n if (type = schema.nodes.heading) { rules.push(headingRule(type, 6)); }\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"inputRules\"])({rules: rules})\n}\n\n// !! This module exports helper functions for deriving a set of basic\n// menu items, input rules, or key bindings from a schema. These\n// values need to know about the schema for two reasons—they need\n// access to specific instances of node and mark types, and they need\n// to know which of the node and mark types that they know about are\n// actually present in the schema.\n//\n// The `exampleSetup` plugin ties these together into a plugin that\n// will automatically enable this basic functionality in an editor.\n\n// :: (Object) → [Plugin]\n// A convenience plugin that bundles together a simple menu with basic\n// key bindings, input rules, and styling for the example schema.\n// Probably only useful for quickly setting up a passable\n// editor—you'll need more control over your settings in most\n// real-world situations.\n//\n// options::- The following options are recognized:\n//\n// schema:: Schema\n// The schema to generate key bindings and menu items for.\n//\n// mapKeys:: ?Object\n// Can be used to [adjust](#example-setup.buildKeymap) the key bindings created.\n//\n// menuBar:: ?bool\n// Set to false to disable the menu bar.\n//\n// history:: ?bool\n// Set to false to disable the history plugin.\n//\n// floatingMenu:: ?bool\n// Set to false to make the menu bar non-floating.\n//\n// menuContent:: [[MenuItem]]\n// Can be used to override the menu content.\nfunction exampleSetup(options) {\n var plugins = [\n buildInputRules(options.schema),\n Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(buildKeymap(options.schema, options.mapKeys)),\n Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"baseKeymap\"]),\n Object(prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__[\"dropCursor\"])(),\n Object(prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__[\"gapCursor\"])()\n ];\n if (options.menuBar !== false)\n { plugins.push(Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"menuBar\"])({floating: options.floatingMenu !== false,\n content: options.menuContent || buildMenuItems(options.schema).fullMenu})); }\n if (options.history !== false)\n { plugins.push(Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"history\"])()); }\n\n return plugins.concat(new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n props: {\n attributes: {class: \"ProseMirror-example-setup-style\"}\n }\n }))\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-example-setup/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildInputRules\", function() { return buildInputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildKeymap\", function() { return buildKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildMenuItems\", function() { return buildMenuItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exampleSetup\", function() { return exampleSetup; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prosemirror-dropcursor */ \"./node_modules/prosemirror-dropcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prosemirror-gapcursor */ \"./node_modules/prosemirror-gapcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prosemirror-menu */ \"./node_modules/prosemirror-menu/dist/index.es.js\");\n/* harmony import */ var prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prosemirror-schema-list */ \"./node_modules/prosemirror-schema-list/dist/index.es.js\");\n/* harmony import */ var prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prosemirror-inputrules */ \"./node_modules/prosemirror-inputrules/dist/index.es.js\");\n\n\n\n\n\n\n\n\n\nvar prefix = \"ProseMirror-prompt\";\n\nfunction openPrompt(options) {\n var wrapper = document.body.appendChild(document.createElement(\"div\"));\n wrapper.className = prefix;\n\n var mouseOutside = function mouseOutside(e) {\n if (!wrapper.contains(e.target)) {\n close();\n }\n };\n\n setTimeout(function () {\n return window.addEventListener(\"mousedown\", mouseOutside);\n }, 50);\n\n var close = function close() {\n window.removeEventListener(\"mousedown\", mouseOutside);\n\n if (wrapper.parentNode) {\n wrapper.parentNode.removeChild(wrapper);\n }\n };\n\n var domFields = [];\n\n for (var name in options.fields) {\n domFields.push(options.fields[name].render());\n }\n\n var submitButton = document.createElement(\"button\");\n submitButton.type = \"submit\";\n submitButton.className = prefix + \"-submit\";\n submitButton.textContent = \"OK\";\n var cancelButton = document.createElement(\"button\");\n cancelButton.type = \"button\";\n cancelButton.className = prefix + \"-cancel\";\n cancelButton.textContent = \"Cancel\";\n cancelButton.addEventListener(\"click\", close);\n var form = wrapper.appendChild(document.createElement(\"form\"));\n\n if (options.title) {\n form.appendChild(document.createElement(\"h5\")).textContent = options.title;\n }\n\n domFields.forEach(function (field) {\n form.appendChild(document.createElement(\"div\")).appendChild(field);\n });\n var buttons = form.appendChild(document.createElement(\"div\"));\n buttons.className = prefix + \"-buttons\";\n buttons.appendChild(submitButton);\n buttons.appendChild(document.createTextNode(\" \"));\n buttons.appendChild(cancelButton);\n var box = wrapper.getBoundingClientRect();\n wrapper.style.top = (window.innerHeight - box.height) / 2 + \"px\";\n wrapper.style.left = (window.innerWidth - box.width) / 2 + \"px\";\n\n var submit = function submit() {\n var params = getValues(options.fields, domFields);\n\n if (params) {\n close();\n options.callback(params);\n }\n };\n\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n submit();\n });\n form.addEventListener(\"keydown\", function (e) {\n if (e.keyCode == 27) {\n e.preventDefault();\n close();\n } else if (e.keyCode == 13 && !(e.ctrlKey || e.metaKey || e.shiftKey)) {\n e.preventDefault();\n submit();\n } else if (e.keyCode == 9) {\n window.setTimeout(function () {\n if (!wrapper.contains(document.activeElement)) {\n close();\n }\n }, 500);\n }\n });\n var input = form.elements[0];\n\n if (input) {\n input.focus();\n }\n}\n\nfunction getValues(fields, domFields) {\n var result = Object.create(null),\n i = 0;\n\n for (var name in fields) {\n var field = fields[name],\n dom = domFields[i++];\n var value = field.read(dom),\n bad = field.validate(value);\n\n if (bad) {\n reportInvalid(dom, bad);\n return null;\n }\n\n result[name] = field.clean(value);\n }\n\n return result;\n}\n\nfunction reportInvalid(dom, message) {\n // FIXME this is awful and needs a lot more work\n var parent = dom.parentNode;\n var msg = parent.appendChild(document.createElement(\"div\"));\n msg.style.left = dom.offsetLeft + dom.offsetWidth + 2 + \"px\";\n msg.style.top = dom.offsetTop - 5 + \"px\";\n msg.className = \"ProseMirror-invalid\";\n msg.textContent = message;\n setTimeout(function () {\n return parent.removeChild(msg);\n }, 1500);\n} // ::- The type of field that `FieldPrompt` expects to be passed to it.\n\n\nvar Field = function Field(options) {\n this.options = options;\n}; // render:: (state: EditorState, props: Object) → dom.Node\n// Render the field to the DOM. Should be implemented by all subclasses.\n// :: (dom.Node) → any\n// Read the field's value from its DOM node.\n\n\nField.prototype.read = function read(dom) {\n return dom.value;\n}; // :: (any) → ?string\n// A field-type-specific validation function.\n\n\nField.prototype.validateType = function validateType(_value) {};\n\nField.prototype.validate = function validate(value) {\n if (!value && this.options.required) {\n return \"Required field\";\n }\n\n return this.validateType(value) || this.options.validate && this.options.validate(value);\n};\n\nField.prototype.clean = function clean(value) {\n return this.options.clean ? this.options.clean(value) : value;\n}; // ::- A field class for single-line text fields.\n\n\nvar TextField = /*@__PURE__*/function (Field) {\n function TextField() {\n Field.apply(this, arguments);\n }\n\n if (Field) TextField.__proto__ = Field;\n TextField.prototype = Object.create(Field && Field.prototype);\n TextField.prototype.constructor = TextField;\n\n TextField.prototype.render = function render() {\n var input = document.createElement(\"input\");\n input.type = \"text\";\n input.placeholder = this.options.label;\n input.value = this.options.value || \"\";\n input.autocomplete = \"off\";\n return input;\n };\n\n return TextField;\n}(Field); // Helpers to create specific types of items\n\n\nfunction canInsert(state, nodeType) {\n var $from = state.selection.$from;\n\n for (var d = $from.depth; d >= 0; d--) {\n var index = $from.index(d);\n\n if ($from.node(d).canReplaceWith(index, index, nodeType)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction insertImageItem(nodeType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert image\",\n label: \"Image\",\n enable: function enable(state) {\n return canInsert(state, nodeType);\n },\n run: function run(state, _, view) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var attrs = null;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"NodeSelection\"] && state.selection.node.type == nodeType) {\n attrs = state.selection.node.attrs;\n }\n\n openPrompt({\n title: \"Insert image\",\n fields: {\n src: new TextField({\n label: \"Location\",\n required: true,\n value: attrs && attrs.src\n }),\n title: new TextField({\n label: \"Title\",\n value: attrs && attrs.title\n }),\n alt: new TextField({\n label: \"Description\",\n value: attrs ? attrs.alt : state.doc.textBetween(from, to, \" \")\n })\n },\n callback: function callback(attrs) {\n view.dispatch(view.state.tr.replaceSelectionWith(nodeType.createAndFill(attrs)));\n view.focus();\n }\n });\n }\n });\n}\n\nfunction cmdItem(cmd, options) {\n var passedOptions = {\n label: options.title,\n run: cmd\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n if ((!options.enable || options.enable === true) && !options.select) {\n passedOptions[options.enable ? \"enable\" : \"select\"] = function (state) {\n return cmd(state);\n };\n }\n\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"](passedOptions);\n}\n\nfunction markActive(state, type) {\n var ref = state.selection;\n var from = ref.from;\n var $from = ref.$from;\n var to = ref.to;\n var empty = ref.empty;\n\n if (empty) {\n return type.isInSet(state.storedMarks || $from.marks());\n } else {\n return state.doc.rangeHasMark(from, to, type);\n }\n}\n\nfunction markItem(markType, options) {\n var passedOptions = {\n active: function active(state) {\n return markActive(state, markType);\n },\n enable: true\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return cmdItem(Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType), passedOptions);\n}\n\nfunction linkItem(markType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Add or remove link\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].link,\n active: function active(state) {\n return markActive(state, markType);\n },\n enable: function enable(state) {\n return !state.selection.empty;\n },\n run: function run(state, dispatch, view) {\n if (markActive(state, markType)) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType)(state, dispatch);\n return true;\n }\n\n openPrompt({\n title: \"Create a link\",\n fields: {\n href: new TextField({\n label: \"Link target\",\n required: true\n }),\n title: new TextField({\n label: \"Title\"\n })\n },\n callback: function callback(attrs) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType, attrs)(view.state, view.dispatch);\n view.focus();\n }\n });\n }\n });\n}\n\nfunction wrapListItem(nodeType, options) {\n return cmdItem(Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(nodeType, options.attrs), options);\n} // :: (Schema) → Object\n// Given a schema, look for default mark and node types in it and\n// return an object with relevant menu items relating to those marks:\n//\n// **`toggleStrong`**`: MenuItem`\n// : A menu item to toggle the [strong mark](#schema-basic.StrongMark).\n//\n// **`toggleEm`**`: MenuItem`\n// : A menu item to toggle the [emphasis mark](#schema-basic.EmMark).\n//\n// **`toggleCode`**`: MenuItem`\n// : A menu item to toggle the [code font mark](#schema-basic.CodeMark).\n//\n// **`toggleLink`**`: MenuItem`\n// : A menu item to toggle the [link mark](#schema-basic.LinkMark).\n//\n// **`insertImage`**`: MenuItem`\n// : A menu item to insert an [image](#schema-basic.Image).\n//\n// **`wrapBulletList`**`: MenuItem`\n// : A menu item to wrap the selection in a [bullet list](#schema-list.BulletList).\n//\n// **`wrapOrderedList`**`: MenuItem`\n// : A menu item to wrap the selection in an [ordered list](#schema-list.OrderedList).\n//\n// **`wrapBlockQuote`**`: MenuItem`\n// : A menu item to wrap the selection in a [block quote](#schema-basic.BlockQuote).\n//\n// **`makeParagraph`**`: MenuItem`\n// : A menu item to set the current textblock to be a normal\n// [paragraph](#schema-basic.Paragraph).\n//\n// **`makeCodeBlock`**`: MenuItem`\n// : A menu item to set the current textblock to be a\n// [code block](#schema-basic.CodeBlock).\n//\n// **`makeHead[N]`**`: MenuItem`\n// : Where _N_ is 1 to 6. Menu items to set the current textblock to\n// be a [heading](#schema-basic.Heading) of level _N_.\n//\n// **`insertHorizontalRule`**`: MenuItem`\n// : A menu item to insert a horizontal rule.\n//\n// The return value also contains some prefabricated menu elements and\n// menus, that you can use instead of composing your own menu from\n// scratch:\n//\n// **`insertMenu`**`: Dropdown`\n// : A dropdown containing the `insertImage` and\n// `insertHorizontalRule` items.\n//\n// **`typeMenu`**`: Dropdown`\n// : A dropdown containing the items for making the current\n// textblock a paragraph, code block, or heading.\n//\n// **`fullMenu`**`: [[MenuElement]]`\n// : An array of arrays of menu elements for use as the full menu\n// for, for example the [menu bar](https://github.com/prosemirror/prosemirror-menu#user-content-menubar).\n\n\nfunction buildMenuItems(schema) {\n var r = {},\n type;\n\n if (type = schema.marks.strong) {\n r.toggleStrong = markItem(type, {\n title: \"Toggle strong style\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].strong\n });\n }\n\n if (type = schema.marks.em) {\n r.toggleEm = markItem(type, {\n title: \"Toggle emphasis\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].em\n });\n }\n\n if (type = schema.marks.code) {\n r.toggleCode = markItem(type, {\n title: \"Toggle code font\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].code\n });\n }\n\n if (type = schema.marks.link) {\n r.toggleLink = linkItem(type);\n }\n\n if (type = schema.nodes.image) {\n r.insertImage = insertImageItem(type);\n }\n\n if (type = schema.nodes.bullet_list) {\n r.wrapBulletList = wrapListItem(type, {\n title: \"Wrap in bullet list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].bulletList\n });\n }\n\n if (type = schema.nodes.ordered_list) {\n r.wrapOrderedList = wrapListItem(type, {\n title: \"Wrap in ordered list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].orderedList\n });\n }\n\n if (type = schema.nodes.blockquote) {\n r.wrapBlockQuote = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"wrapItem\"])(type, {\n title: \"Wrap in block quote\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].blockquote\n });\n }\n\n if (type = schema.nodes.paragraph) {\n r.makeParagraph = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to paragraph\",\n label: \"Plain\"\n });\n }\n\n if (type = schema.nodes.code_block) {\n r.makeCodeBlock = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to code block\",\n label: \"Code\"\n });\n }\n\n if (type = schema.nodes.heading) {\n for (var i = 1; i <= 10; i++) {\n r[\"makeHead\" + i] = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to heading \" + i,\n label: \"Level \" + i,\n attrs: {\n level: i\n }\n });\n }\n }\n\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n r.insertHorizontalRule = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert horizontal rule\",\n label: \"Horizontal rule\",\n enable: function enable(state) {\n return canInsert(state, hr);\n },\n run: function run(state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(hr.create()));\n }\n });\n }\n\n var cut = function cut(arr) {\n return arr.filter(function (x) {\n return x;\n });\n };\n\n r.insertMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.insertImage, r.insertHorizontalRule]), {\n label: \"Insert\"\n });\n r.typeMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.makeParagraph, r.makeCodeBlock, r.makeHead1 && new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"DropdownSubmenu\"](cut([r.makeHead1, r.makeHead2, r.makeHead3, r.makeHead4, r.makeHead5, r.makeHead6]), {\n label: \"Heading\"\n })]), {\n label: \"Type...\"\n });\n r.inlineMenu = [cut([r.toggleStrong, r.toggleEm, r.toggleCode, r.toggleLink])];\n r.blockMenu = [cut([r.wrapBulletList, r.wrapOrderedList, r.wrapBlockQuote, prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"joinUpItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"liftItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"selectParentNodeItem\"]])];\n r.fullMenu = r.inlineMenu.concat([[r.insertMenu, r.typeMenu]], [[prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"undoItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"redoItem\"]]], r.blockMenu);\n return r;\n}\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false; // :: (Schema, ?Object) → Object\n// Inspect the given schema looking for marks and nodes from the\n// basic schema, and if found, add key bindings related to them.\n// This will add:\n//\n// * **Mod-b** for toggling [strong](#schema-basic.StrongMark)\n// * **Mod-i** for toggling [emphasis](#schema-basic.EmMark)\n// * **Mod-`** for toggling [code font](#schema-basic.CodeMark)\n// * **Ctrl-Shift-0** for making the current textblock a paragraph\n// * **Ctrl-Shift-1** to **Ctrl-Shift-Digit6** for making the current\n// textblock a heading of the corresponding level\n// * **Ctrl-Shift-Backslash** to make the current textblock a code block\n// * **Ctrl-Shift-8** to wrap the selection in an ordered list\n// * **Ctrl-Shift-9** to wrap the selection in a bullet list\n// * **Ctrl->** to wrap the selection in a block quote\n// * **Enter** to split a non-empty textblock in a list item while at\n// the same time splitting the list item\n// * **Mod-Enter** to insert a hard break\n// * **Mod-_** to insert a horizontal rule\n// * **Backspace** to undo an input rule\n// * **Alt-ArrowUp** to `joinUp`\n// * **Alt-ArrowDown** to `joinDown`\n// * **Mod-BracketLeft** to `lift`\n// * **Escape** to `selectParentNode`\n//\n// You can suppress or map these bindings by passing a `mapKeys`\n// argument, which maps key names (say `\"Mod-B\"` to either `false`, to\n// remove the binding, or a new key name string.\n\nfunction buildKeymap(schema, mapKeys) {\n var keys = {},\n type;\n\n function bind(key, cmd) {\n if (mapKeys) {\n var mapped = mapKeys[key];\n\n if (mapped === false) {\n return;\n }\n\n if (mapped) {\n key = mapped;\n }\n }\n\n keys[key] = cmd;\n }\n\n bind(\"Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"undo\"]);\n bind(\"Shift-Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]);\n bind(\"Backspace\", prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"undoInputRule\"]);\n\n if (!mac) {\n bind(\"Mod-y\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]);\n }\n\n bind(\"Alt-ArrowUp\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinUp\"]);\n bind(\"Alt-ArrowDown\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinDown\"]);\n bind(\"Mod-BracketLeft\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"lift\"]);\n bind(\"Escape\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"selectParentNode\"]);\n\n if (type = schema.marks.strong) {\n bind(\"Mod-b\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-B\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.marks.em) {\n bind(\"Mod-i\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-I\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.marks.code) {\n bind(\"Mod-`\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.nodes.bullet_list) {\n bind(\"Shift-Ctrl-8\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type));\n }\n\n if (type = schema.nodes.ordered_list) {\n bind(\"Shift-Ctrl-9\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type));\n }\n\n if (type = schema.nodes.blockquote) {\n bind(\"Ctrl->\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"wrapIn\"])(type));\n }\n\n if (type = schema.nodes.hard_break) {\n var br = type,\n cmd = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"chainCommands\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"exitCode\"], function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());\n return true;\n });\n bind(\"Mod-Enter\", cmd);\n bind(\"Shift-Enter\", cmd);\n\n if (mac) {\n bind(\"Ctrl-Enter\", cmd);\n }\n }\n\n if (type = schema.nodes.list_item) {\n bind(\"Enter\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"splitListItem\"])(type));\n bind(\"Mod-[\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"liftListItem\"])(type));\n bind(\"Mod-]\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"sinkListItem\"])(type));\n }\n\n if (type = schema.nodes.paragraph) {\n bind(\"Shift-Ctrl-0\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type));\n }\n\n if (type = schema.nodes.code_block) {\n bind(\"Shift-Ctrl-\\\\\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type));\n }\n\n if (type = schema.nodes.heading) {\n for (var i = 1; i <= 6; i++) {\n bind(\"Shift-Ctrl-\" + i, Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type, {\n level: i\n }));\n }\n }\n\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n bind(\"Mod-_\", function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(hr.create()).scrollIntoView());\n return true;\n });\n }\n\n return keys;\n} // : (NodeType) → InputRule\n// Given a blockquote node type, returns an input rule that turns `\"> \"`\n// at the start of a textblock into a blockquote.\n\n\nfunction blockQuoteRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*>\\s$/, nodeType);\n} // : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a number\n// followed by a dot at the start of a textblock into an ordered list.\n\n\nfunction orderedListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^(\\d+)\\.\\s$/, nodeType, function (match) {\n return {\n order: +match[1]\n };\n }, function (match, node) {\n return node.childCount + node.attrs.order == +match[1];\n });\n} // : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a bullet\n// (dash, plush, or asterisk) at the start of a textblock into a\n// bullet list.\n\n\nfunction bulletListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*([-+*])\\s$/, nodeType);\n} // : (NodeType) → InputRule\n// Given a code block node type, returns an input rule that turns a\n// textblock starting with three backticks into a code block.\n\n\nfunction codeBlockRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(/^```$/, nodeType);\n} // : (NodeType, number) → InputRule\n// Given a node type and a maximum level, creates an input rule that\n// turns up to that number of `#` characters followed by a space at\n// the start of a textblock into a heading whose level corresponds to\n// the number of `#` signs.\n\n\nfunction headingRule(nodeType, maxLevel) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(new RegExp(\"^(#{1,\" + maxLevel + \"})\\\\s$\"), nodeType, function (match) {\n return {\n level: match[1].length\n };\n });\n} // : (Schema) → Plugin\n// A set of input rules for creating the basic block quotes, lists,\n// code blocks, and heading.\n\n\nfunction buildInputRules(schema) {\n var rules = prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"smartQuotes\"].concat(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"ellipsis\"], prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"emDash\"]),\n type;\n\n if (type = schema.nodes.blockquote) {\n rules.push(blockQuoteRule(type));\n }\n\n if (type = schema.nodes.ordered_list) {\n rules.push(orderedListRule(type));\n }\n\n if (type = schema.nodes.bullet_list) {\n rules.push(bulletListRule(type));\n }\n\n if (type = schema.nodes.code_block) {\n rules.push(codeBlockRule(type));\n }\n\n if (type = schema.nodes.heading) {\n rules.push(headingRule(type, 6));\n }\n\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"inputRules\"])({\n rules: rules\n });\n} // !! This module exports helper functions for deriving a set of basic\n// menu items, input rules, or key bindings from a schema. These\n// values need to know about the schema for two reasons—they need\n// access to specific instances of node and mark types, and they need\n// to know which of the node and mark types that they know about are\n// actually present in the schema.\n//\n// The `exampleSetup` plugin ties these together into a plugin that\n// will automatically enable this basic functionality in an editor.\n// :: (Object) → [Plugin]\n// A convenience plugin that bundles together a simple menu with basic\n// key bindings, input rules, and styling for the example schema.\n// Probably only useful for quickly setting up a passable\n// editor—you'll need more control over your settings in most\n// real-world situations.\n//\n// options::- The following options are recognized:\n//\n// schema:: Schema\n// The schema to generate key bindings and menu items for.\n//\n// mapKeys:: ?Object\n// Can be used to [adjust](#example-setup.buildKeymap) the key bindings created.\n//\n// menuBar:: ?bool\n// Set to false to disable the menu bar.\n//\n// history:: ?bool\n// Set to false to disable the history plugin.\n//\n// floatingMenu:: ?bool\n// Set to false to make the menu bar non-floating.\n//\n// menuContent:: [[MenuItem]]\n// Can be used to override the menu content.\n\n\nfunction exampleSetup(options) {\n var plugins = [buildInputRules(options.schema), Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(buildKeymap(options.schema, options.mapKeys)), Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"baseKeymap\"]), Object(prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__[\"dropCursor\"])(), Object(prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__[\"gapCursor\"])()];\n\n if (options.menuBar !== false) {\n plugins.push(Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"menuBar\"])({\n floating: options.floatingMenu !== false,\n content: options.menuContent || buildMenuItems(options.schema).fullMenu\n }));\n }\n\n if (options.history !== false) {\n plugins.push(Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"history\"])());\n }\n\n return plugins.concat(new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n props: {\n attributes: {\n \"class\": \"ProseMirror-example-setup-style\"\n }\n }\n }));\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-example-setup/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-gapcursor/dist/index.es.js": /*!*************************************************************!*\ !*** ./node_modules/prosemirror-gapcursor/dist/index.es.js ***! \*************************************************************/ /*! exports provided: GapCursor, gapCursor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GapCursor\", function() { return GapCursor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gapCursor\", function() { return gapCursor; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-view */ \"./node_modules/prosemirror-view/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\n\n\n\n// ::- Gap cursor selections are represented using this class. Its\n// `$anchor` and `$head` properties both point at the cursor position.\nvar GapCursor = /*@__PURE__*/(function (Selection) {\n function GapCursor($pos) {\n Selection.call(this, $pos, $pos);\n }\n\n if ( Selection ) GapCursor.__proto__ = Selection;\n GapCursor.prototype = Object.create( Selection && Selection.prototype );\n GapCursor.prototype.constructor = GapCursor;\n\n GapCursor.prototype.map = function map (doc, mapping) {\n var $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos)\n };\n\n GapCursor.prototype.content = function content () { return prosemirror_model__WEBPACK_IMPORTED_MODULE_3__[\"Slice\"].empty };\n\n GapCursor.prototype.eq = function eq (other) {\n return other instanceof GapCursor && other.head == this.head\n };\n\n GapCursor.prototype.toJSON = function toJSON () {\n return {type: \"gapcursor\", pos: this.head}\n };\n\n GapCursor.fromJSON = function fromJSON (doc, json) {\n if (typeof json.pos != \"number\") { throw new RangeError(\"Invalid input for GapCursor.fromJSON\") }\n return new GapCursor(doc.resolve(json.pos))\n };\n\n GapCursor.prototype.getBookmark = function getBookmark () { return new GapBookmark(this.anchor) };\n\n GapCursor.valid = function valid ($pos) {\n var parent = $pos.parent;\n if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) { return false }\n var override = parent.type.spec.allowGapCursor;\n if (override != null) { return override }\n var deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock\n };\n\n GapCursor.findFrom = function findFrom ($pos, dir, mustMove) {\n if (!mustMove && GapCursor.valid($pos)) { return $pos }\n\n var pos = $pos.pos, next = null;\n // Scan up from this position\n for (var d = $pos.depth;; d--) {\n var parent = $pos.node(d);\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.maybeChild(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break\n } else if (d == 0) {\n return null\n }\n pos += dir;\n var $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur)) { return $cur }\n }\n\n // And then down into the next node\n for (;;) {\n next = dir > 0 ? next.firstChild : next.lastChild;\n if (!next) { break }\n pos += dir;\n var $cur$1 = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur$1)) { return $cur$1 }\n }\n\n return null\n };\n\n return GapCursor;\n}(prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]));\n\nGapCursor.prototype.visible = false;\n\nprosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].jsonID(\"gapcursor\", GapCursor);\n\nvar GapBookmark = function GapBookmark(pos) {\n this.pos = pos;\n};\nGapBookmark.prototype.map = function map (mapping) {\n return new GapBookmark(mapping.map(this.pos))\n};\nGapBookmark.prototype.resolve = function resolve (doc) {\n var $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].near($pos)\n};\n\nfunction closedBefore($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.index(d);\n // At the start of this parent, look at next one\n if (index == 0) { continue }\n // See if the node before (or its first ancestor) is closed\n for (var before = $pos.node(d).child(index - 1);; before = before.lastChild) {\n if ((before.childCount == 0 && !before.inlineContent) || before.isAtom || before.type.spec.isolating) { return true }\n if (before.inlineContent) { return false }\n }\n }\n // Hit start of document\n return true\n}\n\nfunction closedAfter($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.indexAfter(d), parent = $pos.node(d);\n if (index == parent.childCount) { continue }\n for (var after = parent.child(index);; after = after.firstChild) {\n if ((after.childCount == 0 && !after.inlineContent) || after.isAtom || after.type.spec.isolating) { return true }\n if (after.inlineContent) { return false }\n }\n }\n return true\n}\n\n// :: () → Plugin\n// Create a gap cursor plugin. When enabled, this will capture clicks\n// near and arrow-key-motion past places that don't have a normally\n// selectable position nearby, and create a gap cursor selection for\n// them. The cursor is drawn as an element with class\n// `ProseMirror-gapcursor`. You can either include\n// `style/gapcursor.css` from the package's directory or add your own\n// styles to make it visible.\nvar gapCursor = function() {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({\n props: {\n decorations: drawGapCursor,\n\n createSelectionBetween: function createSelectionBetween(_view, $anchor, $head) {\n if ($anchor.pos == $head.pos && GapCursor.valid($head)) { return new GapCursor($head) }\n },\n\n handleClick: handleClick,\n handleKeyDown: handleKeyDown\n }\n })\n};\n\nvar handleKeyDown = Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keydownHandler\"])({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\n\nfunction arrow(axis, dir) {\n var dirStr = axis == \"vert\" ? (dir > 0 ? \"down\" : \"up\") : (dir > 0 ? \"right\" : \"left\");\n return function(state, dispatch, view) {\n var sel = state.selection;\n var $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"TextSelection\"]) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0) { return false }\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n var $found = GapCursor.findFrom($start, dir, mustMove);\n if (!$found) { return false }\n if (dispatch) { dispatch(state.tr.setSelection(new GapCursor($found))); }\n return true\n }\n}\n\nfunction handleClick(view, pos, event) {\n if (!view.editable) { return false }\n var $pos = view.state.doc.resolve(pos);\n if (!GapCursor.valid($pos)) { return false }\n var ref = view.posAtCoords({left: event.clientX, top: event.clientY});\n var inside = ref.inside;\n if (inside > -1 && prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"NodeSelection\"].isSelectable(view.state.doc.nodeAt(inside))) { return false }\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true\n}\n\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor)) { return null }\n var node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"DecorationSet\"].create(state.doc, [prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"Decoration\"].widget(state.selection.head, node, {key: \"gapcursor\"})])\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-gapcursor/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GapCursor\", function() { return GapCursor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gapCursor\", function() { return gapCursor; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-view */ \"./node_modules/prosemirror-view/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\n\n // ::- Gap cursor selections are represented using this class. Its\n// `$anchor` and `$head` properties both point at the cursor position.\n\nvar GapCursor = /*@__PURE__*/function (Selection) {\n function GapCursor($pos) {\n Selection.call(this, $pos, $pos);\n }\n\n if (Selection) GapCursor.__proto__ = Selection;\n GapCursor.prototype = Object.create(Selection && Selection.prototype);\n GapCursor.prototype.constructor = GapCursor;\n\n GapCursor.prototype.map = function map(doc, mapping) {\n var $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n };\n\n GapCursor.prototype.content = function content() {\n return prosemirror_model__WEBPACK_IMPORTED_MODULE_3__[\"Slice\"].empty;\n };\n\n GapCursor.prototype.eq = function eq(other) {\n return other instanceof GapCursor && other.head == this.head;\n };\n\n GapCursor.prototype.toJSON = function toJSON() {\n return {\n type: \"gapcursor\",\n pos: this.head\n };\n };\n\n GapCursor.fromJSON = function fromJSON(doc, json) {\n if (typeof json.pos != \"number\") {\n throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n }\n\n return new GapCursor(doc.resolve(json.pos));\n };\n\n GapCursor.prototype.getBookmark = function getBookmark() {\n return new GapBookmark(this.anchor);\n };\n\n GapCursor.valid = function valid($pos) {\n var parent = $pos.parent;\n\n if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) {\n return false;\n }\n\n var override = parent.type.spec.allowGapCursor;\n\n if (override != null) {\n return override;\n }\n\n var deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock;\n };\n\n GapCursor.findFrom = function findFrom($pos, dir, mustMove) {\n if (!mustMove && GapCursor.valid($pos)) {\n return $pos;\n }\n\n var pos = $pos.pos,\n next = null; // Scan up from this position\n\n for (var d = $pos.depth;; d--) {\n var parent = $pos.node(d);\n\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.maybeChild(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break;\n } else if (d == 0) {\n return null;\n }\n\n pos += dir;\n var $cur = $pos.doc.resolve(pos);\n\n if (GapCursor.valid($cur)) {\n return $cur;\n }\n } // And then down into the next node\n\n\n for (;;) {\n next = dir > 0 ? next.firstChild : next.lastChild;\n\n if (!next) {\n break;\n }\n\n pos += dir;\n var $cur$1 = $pos.doc.resolve(pos);\n\n if (GapCursor.valid($cur$1)) {\n return $cur$1;\n }\n }\n\n return null;\n };\n\n return GapCursor;\n}(prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]);\n\nGapCursor.prototype.visible = false;\nprosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].jsonID(\"gapcursor\", GapCursor);\n\nvar GapBookmark = function GapBookmark(pos) {\n this.pos = pos;\n};\n\nGapBookmark.prototype.map = function map(mapping) {\n return new GapBookmark(mapping.map(this.pos));\n};\n\nGapBookmark.prototype.resolve = function resolve(doc) {\n var $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].near($pos);\n};\n\nfunction closedBefore($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.index(d); // At the start of this parent, look at next one\n\n if (index == 0) {\n continue;\n } // See if the node before (or its first ancestor) is closed\n\n\n for (var before = $pos.node(d).child(index - 1);; before = before.lastChild) {\n if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) {\n return true;\n }\n\n if (before.inlineContent) {\n return false;\n }\n }\n } // Hit start of document\n\n\n return true;\n}\n\nfunction closedAfter($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.indexAfter(d),\n parent = $pos.node(d);\n\n if (index == parent.childCount) {\n continue;\n }\n\n for (var after = parent.child(index);; after = after.firstChild) {\n if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) {\n return true;\n }\n\n if (after.inlineContent) {\n return false;\n }\n }\n }\n\n return true;\n} // :: () → Plugin\n// Create a gap cursor plugin. When enabled, this will capture clicks\n// near and arrow-key-motion past places that don't have a normally\n// selectable position nearby, and create a gap cursor selection for\n// them. The cursor is drawn as an element with class\n// `ProseMirror-gapcursor`. You can either include\n// `style/gapcursor.css` from the package's directory or add your own\n// styles to make it visible.\n\n\nvar gapCursor = function gapCursor() {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({\n props: {\n decorations: drawGapCursor,\n createSelectionBetween: function createSelectionBetween(_view, $anchor, $head) {\n if ($anchor.pos == $head.pos && GapCursor.valid($head)) {\n return new GapCursor($head);\n }\n },\n handleClick: handleClick,\n handleKeyDown: handleKeyDown\n }\n });\n};\n\nvar handleKeyDown = Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keydownHandler\"])({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\n\nfunction arrow(axis, dir) {\n var dirStr = axis == \"vert\" ? dir > 0 ? \"down\" : \"up\" : dir > 0 ? \"right\" : \"left\";\n return function (state, dispatch, view) {\n var sel = state.selection;\n var $start = dir > 0 ? sel.$to : sel.$from,\n mustMove = sel.empty;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"TextSelection\"]) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0) {\n return false;\n }\n\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n\n var $found = GapCursor.findFrom($start, dir, mustMove);\n\n if (!$found) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(new GapCursor($found)));\n }\n\n return true;\n };\n}\n\nfunction handleClick(view, pos, event) {\n if (!view.editable) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(pos);\n\n if (!GapCursor.valid($pos)) {\n return false;\n }\n\n var ref = view.posAtCoords({\n left: event.clientX,\n top: event.clientY\n });\n var inside = ref.inside;\n\n if (inside > -1 && prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"NodeSelection\"].isSelectable(view.state.doc.nodeAt(inside))) {\n return false;\n }\n\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true;\n}\n\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor)) {\n return null;\n }\n\n var node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"DecorationSet\"].create(state.doc, [prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"Decoration\"].widget(state.selection.head, node, {\n key: \"gapcursor\"\n })]);\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-gapcursor/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-history/dist/index.es.js": /*!***********************************************************!*\ !*** ./node_modules/prosemirror-history/dist/index.es.js ***! \***********************************************************/ /*! exports provided: HistoryState, closeHistory, history, redo, redoDepth, undo, undoDepth */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HistoryState\", function() { return HistoryState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeHistory\", function() { return closeHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"history\", function() { return history; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redo\", function() { return redo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoDepth\", function() { return redoDepth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undo\", function() { return undo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoDepth\", function() { return undoDepth; });\n/* harmony import */ var rope_sequence__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rope-sequence */ \"./node_modules/rope-sequence/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n\n// ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n\n// Used to schedule history compression\nvar max_empty_items = 500;\n\nvar Branch = function Branch(items, eventCount) {\n this.items = items;\n this.eventCount = eventCount;\n};\n\n// : (EditorState, bool) → ?{transform: Transform, selection: ?SelectionBookmark, remaining: Branch}\n// Pop the latest event off the branch's history and apply it\n// to a document transform.\nBranch.prototype.popEvent = function popEvent (state, preserveItems) {\n var this$1 = this;\n\n if (this.eventCount == 0) { return null }\n\n var end = this.items.length;\n for (;; end--) {\n var next = this.items.get(end - 1);\n if (next.selection) { --end; break }\n }\n\n var remap, mapFrom;\n if (preserveItems) {\n remap = this.remapping(end, this.items.length);\n mapFrom = remap.maps.length;\n }\n var transform = state.tr;\n var selection, remaining;\n var addAfter = [], addBefore = [];\n\n this.items.forEach(function (item, i) {\n if (!item.step) {\n if (!remap) {\n remap = this$1.remapping(end, i + 1);\n mapFrom = remap.maps.length;\n }\n mapFrom--;\n addBefore.push(item);\n return\n }\n\n if (remap) {\n addBefore.push(new Item(item.map));\n var step = item.step.map(remap.slice(mapFrom)), map;\n\n if (step && transform.maybeStep(step).doc) {\n map = transform.mapping.maps[transform.mapping.maps.length - 1];\n addAfter.push(new Item(map, null, null, addAfter.length + addBefore.length));\n }\n mapFrom--;\n if (map) { remap.appendMap(map, mapFrom); }\n } else {\n transform.maybeStep(item.step);\n }\n\n if (item.selection) {\n selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n remaining = new Branch(this$1.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this$1.eventCount - 1);\n return false\n }\n }, this.items.length, 0);\n\n return {remaining: remaining, transform: transform, selection: selection}\n};\n\n// : (Transform, ?SelectionBookmark, Object) → Branch\n// Create a new branch with the given transform added.\nBranch.prototype.addTransform = function addTransform (transform, selection, histOptions, preserveItems) {\n var newItems = [], eventCount = this.eventCount;\n var oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n\n for (var i = 0; i < transform.steps.length; i++) {\n var step = transform.steps[i].invert(transform.docs[i]);\n var item = new Item(transform.mapping.maps[i], step, selection), merged = (void 0);\n if (merged = lastItem && lastItem.merge(item)) {\n item = merged;\n if (i) { newItems.pop(); }\n else { oldItems = oldItems.slice(0, oldItems.length - 1); }\n }\n newItems.push(item);\n if (selection) {\n eventCount++;\n selection = null;\n }\n if (!preserveItems) { lastItem = item; }\n }\n var overflow = eventCount - histOptions.depth;\n if (overflow > DEPTH_OVERFLOW) {\n oldItems = cutOffEvents(oldItems, overflow);\n eventCount -= overflow;\n }\n return new Branch(oldItems.append(newItems), eventCount)\n};\n\nBranch.prototype.remapping = function remapping (from, to) {\n var maps = new prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Mapping\"];\n this.items.forEach(function (item, i) {\n var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from\n ? maps.maps.length - item.mirrorOffset : null;\n maps.appendMap(item.map, mirrorPos);\n }, from, to);\n return maps\n};\n\nBranch.prototype.addMaps = function addMaps (array) {\n if (this.eventCount == 0) { return this }\n return new Branch(this.items.append(array.map(function (map) { return new Item(map); })), this.eventCount)\n};\n\n// : (Transform, number)\n// When the collab module receives remote changes, the history has\n// to know about those, so that it can adjust the steps that were\n// rebased on top of the remote changes, and include the position\n// maps for the remote changes in its array of items.\nBranch.prototype.rebased = function rebased (rebasedTransform, rebasedCount) {\n if (!this.eventCount) { return this }\n\n var rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount);\n\n var mapping = rebasedTransform.mapping;\n var newUntil = rebasedTransform.steps.length;\n var eventCount = this.eventCount;\n this.items.forEach(function (item) { if (item.selection) { eventCount--; } }, start);\n\n var iRebased = rebasedCount;\n this.items.forEach(function (item) {\n var pos = mapping.getMirror(--iRebased);\n if (pos == null) { return }\n newUntil = Math.min(newUntil, pos);\n var map = mapping.maps[pos];\n if (item.step) {\n var step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n var selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n if (selection) { eventCount++; }\n rebasedItems.push(new Item(map, step, selection));\n } else {\n rebasedItems.push(new Item(map));\n }\n }, start);\n\n var newMaps = [];\n for (var i = rebasedCount; i < newUntil; i++)\n { newMaps.push(new Item(mapping.maps[i])); }\n var items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n var branch = new Branch(items, eventCount);\n\n if (branch.emptyItemCount() > max_empty_items)\n { branch = branch.compress(this.items.length - rebasedItems.length); }\n return branch\n};\n\nBranch.prototype.emptyItemCount = function emptyItemCount () {\n var count = 0;\n this.items.forEach(function (item) { if (!item.step) { count++; } });\n return count\n};\n\n// Compressing a branch means rewriting it to push the air (map-only\n// items) out. During collaboration, these naturally accumulate\n// because each remote change adds one. The `upto` argument is used\n// to ensure that only the items below a given level are compressed,\n// because `rebased` relies on a clean, untouched set of items in\n// order to associate old items with rebased steps.\nBranch.prototype.compress = function compress (upto) {\n if ( upto === void 0 ) upto = this.items.length;\n\n var remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n var items = [], events = 0;\n this.items.forEach(function (item, i) {\n if (i >= upto) {\n items.push(item);\n if (item.selection) { events++; }\n } else if (item.step) {\n var step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap();\n mapFrom--;\n if (map) { remap.appendMap(map, mapFrom); }\n if (step) {\n var selection = item.selection && item.selection.map(remap.slice(mapFrom));\n if (selection) { events++; }\n var newItem = new Item(map.invert(), step, selection), merged, last = items.length - 1;\n if (merged = items.length && items[last].merge(newItem))\n { items[last] = merged; }\n else\n { items.push(newItem); }\n }\n } else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(items.reverse()), events)\n};\n\nBranch.empty = new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].empty, 0);\n\nfunction cutOffEvents(items, n) {\n var cutPoint;\n items.forEach(function (item, i) {\n if (item.selection && (n-- == 0)) {\n cutPoint = i;\n return false\n }\n });\n return items.slice(cutPoint)\n}\n\nvar Item = function Item(map, step, selection, mirrorOffset) {\n // The (forward) step map for this item.\n this.map = map;\n // The inverted step\n this.step = step;\n // If this is non-null, this item is the start of a group, and\n // this selection is the starting selection for the group (the one\n // that was active before the first step was applied)\n this.selection = selection;\n // If this item is the inverse of a previous mapping on the stack,\n // this points at the inverse's offset\n this.mirrorOffset = mirrorOffset;\n};\n\nItem.prototype.merge = function merge (other) {\n if (this.step && other.step && !other.selection) {\n var step = other.step.merge(this.step);\n if (step) { return new Item(step.getMap().invert(), step, this.selection) }\n }\n};\n\n// The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\nvar HistoryState = function HistoryState(done, undone, prevRanges, prevTime) {\n this.done = done;\n this.undone = undone;\n this.prevRanges = prevRanges;\n this.prevTime = prevTime;\n};\n\nvar DEPTH_OVERFLOW = 20;\n\n// : (HistoryState, EditorState, Transaction, Object)\n// Record a transformation in undo history.\nfunction applyTransaction(history, state, tr, options) {\n var historyTr = tr.getMeta(historyKey), rebased;\n if (historyTr) { return historyTr.historyState }\n\n if (tr.getMeta(closeHistoryKey)) { history = new HistoryState(history.done, history.undone, null, 0); }\n\n var appended = tr.getMeta(\"appendedTransaction\");\n\n if (tr.steps.length == 0) {\n return history\n } else if (appended && appended.getMeta(historyKey)) {\n if (appended.getMeta(historyKey).redo)\n { return new HistoryState(history.done.addTransform(tr, null, options, mustPreserveItems(state)),\n history.undone, rangesFor(tr.mapping.maps[tr.steps.length - 1]), history.prevTime) }\n else\n { return new HistoryState(history.done, history.undone.addTransform(tr, null, options, mustPreserveItems(state)),\n null, history.prevTime) }\n } else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n // Group transforms that occur in quick succession into one event.\n var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay ||\n !isAdjacentTo(tr, history.prevRanges));\n var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);\n return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null,\n options, mustPreserveItems(state)),\n Branch.empty, prevRanges, tr.time)\n } else if (rebased = tr.getMeta(\"rebased\")) {\n // Used by the collab module to tell the history that some of its\n // content has been rebased.\n return new HistoryState(history.done.rebased(tr, rebased),\n history.undone.rebased(tr, rebased),\n mapRanges(history.prevRanges, tr.mapping), history.prevTime)\n } else {\n return new HistoryState(history.done.addMaps(tr.mapping.maps),\n history.undone.addMaps(tr.mapping.maps),\n mapRanges(history.prevRanges, tr.mapping), history.prevTime)\n }\n}\n\nfunction isAdjacentTo(transform, prevRanges) {\n if (!prevRanges) { return false }\n if (!transform.docChanged) { return true }\n var adjacent = false;\n transform.mapping.maps[0].forEach(function (start, end) {\n for (var i = 0; i < prevRanges.length; i += 2)\n { if (start <= prevRanges[i + 1] && end >= prevRanges[i])\n { adjacent = true; } }\n });\n return adjacent\n}\n\nfunction rangesFor(map) {\n var result = [];\n map.forEach(function (_from, _to, from, to) { return result.push(from, to); });\n return result\n}\n\nfunction mapRanges(ranges, mapping) {\n if (!ranges) { return null }\n var result = [];\n for (var i = 0; i < ranges.length; i += 2) {\n var from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1);\n if (from <= to) { result.push(from, to); }\n }\n return result\n}\n\n// : (HistoryState, EditorState, (tr: Transaction), bool)\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\nfunction histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state), histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop) { return }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(),\n histOptions, preserveItems);\n\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {redo: redo, historyState: newHist}).scrollIntoView());\n}\n\nvar cachedPreserveItems = false, cachedPreserveItemsPlugins = null;\n// Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\nfunction mustPreserveItems(state) {\n var plugins = state.plugins;\n if (cachedPreserveItemsPlugins != plugins) {\n cachedPreserveItems = false;\n cachedPreserveItemsPlugins = plugins;\n for (var i = 0; i < plugins.length; i++) { if (plugins[i].spec.historyPreserveItems) {\n cachedPreserveItems = true;\n break\n } }\n }\n return cachedPreserveItems\n}\n\n// :: (Transaction) → Transaction\n// Set a flag on the given transaction that will prevent further steps\n// from being appended to an existing history event (so that they\n// require a separate undo command to undo).\nfunction closeHistory(tr) {\n return tr.setMeta(closeHistoryKey, true)\n}\n\nvar historyKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"history\");\nvar closeHistoryKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"closeHistory\");\n\n// :: (?Object) → Plugin\n// Returns a plugin that enables the undo history for an editor. The\n// plugin will track undo and redo stacks, which can be used with the\n// [`undo`](#history.undo) and [`redo`](#history.redo) commands.\n//\n// You can set an `\"addToHistory\"` [metadata\n// property](#state.Transaction.setMeta) of `false` on a transaction\n// to prevent it from being rolled back by undo.\n//\n// config::-\n// Supports the following configuration options:\n//\n// depth:: ?number\n// The amount of history events that are collected before the\n// oldest events are discarded. Defaults to 100.\n//\n// newGroupDelay:: ?number\n// The delay between changes after which a new group should be\n// started. Defaults to 500 (milliseconds). Note that when changes\n// aren't adjacent, a new group is always started.\nfunction history(config) {\n config = {depth: config && config.depth || 100,\n newGroupDelay: config && config.newGroupDelay || 500};\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Plugin\"]({\n key: historyKey,\n\n state: {\n init: function init() {\n return new HistoryState(Branch.empty, Branch.empty, null, 0)\n },\n apply: function apply(tr, hist, state) {\n return applyTransaction(hist, state, tr, config)\n }\n },\n\n config: config\n })\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that undoes the last change, if any.\nfunction undo(state, dispatch) {\n var hist = historyKey.getState(state);\n if (!hist || hist.done.eventCount == 0) { return false }\n if (dispatch) { histTransaction(hist, state, dispatch, false); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that redoes the last undone change, if any.\nfunction redo(state, dispatch) {\n var hist = historyKey.getState(state);\n if (!hist || hist.undone.eventCount == 0) { return false }\n if (dispatch) { histTransaction(hist, state, dispatch, true); }\n return true\n}\n\n// :: (EditorState) → number\n// The amount of undoable events available in a given state.\nfunction undoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.done.eventCount : 0\n}\n\n// :: (EditorState) → number\n// The amount of redoable events available in a given editor state.\nfunction redoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.undone.eventCount : 0\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-history/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HistoryState\", function() { return HistoryState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeHistory\", function() { return closeHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"history\", function() { return history; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redo\", function() { return redo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoDepth\", function() { return redoDepth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undo\", function() { return undo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoDepth\", function() { return undoDepth; });\n/* harmony import */ var rope_sequence__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rope-sequence */ \"./node_modules/rope-sequence/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n // ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n// Used to schedule history compression\n\nvar max_empty_items = 500;\n\nvar Branch = function Branch(items, eventCount) {\n this.items = items;\n this.eventCount = eventCount;\n}; // : (EditorState, bool) → ?{transform: Transform, selection: ?SelectionBookmark, remaining: Branch}\n// Pop the latest event off the branch's history and apply it\n// to a document transform.\n\n\nBranch.prototype.popEvent = function popEvent(state, preserveItems) {\n var this$1 = this;\n\n if (this.eventCount == 0) {\n return null;\n }\n\n var end = this.items.length;\n\n for (;; end--) {\n var next = this.items.get(end - 1);\n\n if (next.selection) {\n --end;\n break;\n }\n }\n\n var remap, mapFrom;\n\n if (preserveItems) {\n remap = this.remapping(end, this.items.length);\n mapFrom = remap.maps.length;\n }\n\n var transform = state.tr;\n var selection, remaining;\n var addAfter = [],\n addBefore = [];\n this.items.forEach(function (item, i) {\n if (!item.step) {\n if (!remap) {\n remap = this$1.remapping(end, i + 1);\n mapFrom = remap.maps.length;\n }\n\n mapFrom--;\n addBefore.push(item);\n return;\n }\n\n if (remap) {\n addBefore.push(new Item(item.map));\n var step = item.step.map(remap.slice(mapFrom)),\n map;\n\n if (step && transform.maybeStep(step).doc) {\n map = transform.mapping.maps[transform.mapping.maps.length - 1];\n addAfter.push(new Item(map, null, null, addAfter.length + addBefore.length));\n }\n\n mapFrom--;\n\n if (map) {\n remap.appendMap(map, mapFrom);\n }\n } else {\n transform.maybeStep(item.step);\n }\n\n if (item.selection) {\n selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n remaining = new Branch(this$1.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this$1.eventCount - 1);\n return false;\n }\n }, this.items.length, 0);\n return {\n remaining: remaining,\n transform: transform,\n selection: selection\n };\n}; // : (Transform, ?SelectionBookmark, Object) → Branch\n// Create a new branch with the given transform added.\n\n\nBranch.prototype.addTransform = function addTransform(transform, selection, histOptions, preserveItems) {\n var newItems = [],\n eventCount = this.eventCount;\n var oldItems = this.items,\n lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n\n for (var i = 0; i < transform.steps.length; i++) {\n var step = transform.steps[i].invert(transform.docs[i]);\n var item = new Item(transform.mapping.maps[i], step, selection),\n merged = void 0;\n\n if (merged = lastItem && lastItem.merge(item)) {\n item = merged;\n\n if (i) {\n newItems.pop();\n } else {\n oldItems = oldItems.slice(0, oldItems.length - 1);\n }\n }\n\n newItems.push(item);\n\n if (selection) {\n eventCount++;\n selection = null;\n }\n\n if (!preserveItems) {\n lastItem = item;\n }\n }\n\n var overflow = eventCount - histOptions.depth;\n\n if (overflow > DEPTH_OVERFLOW) {\n oldItems = cutOffEvents(oldItems, overflow);\n eventCount -= overflow;\n }\n\n return new Branch(oldItems.append(newItems), eventCount);\n};\n\nBranch.prototype.remapping = function remapping(from, to) {\n var maps = new prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Mapping\"]();\n this.items.forEach(function (item, i) {\n var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : null;\n maps.appendMap(item.map, mirrorPos);\n }, from, to);\n return maps;\n};\n\nBranch.prototype.addMaps = function addMaps(array) {\n if (this.eventCount == 0) {\n return this;\n }\n\n return new Branch(this.items.append(array.map(function (map) {\n return new Item(map);\n })), this.eventCount);\n}; // : (Transform, number)\n// When the collab module receives remote changes, the history has\n// to know about those, so that it can adjust the steps that were\n// rebased on top of the remote changes, and include the position\n// maps for the remote changes in its array of items.\n\n\nBranch.prototype.rebased = function rebased(rebasedTransform, rebasedCount) {\n if (!this.eventCount) {\n return this;\n }\n\n var rebasedItems = [],\n start = Math.max(0, this.items.length - rebasedCount);\n var mapping = rebasedTransform.mapping;\n var newUntil = rebasedTransform.steps.length;\n var eventCount = this.eventCount;\n this.items.forEach(function (item) {\n if (item.selection) {\n eventCount--;\n }\n }, start);\n var iRebased = rebasedCount;\n this.items.forEach(function (item) {\n var pos = mapping.getMirror(--iRebased);\n\n if (pos == null) {\n return;\n }\n\n newUntil = Math.min(newUntil, pos);\n var map = mapping.maps[pos];\n\n if (item.step) {\n var step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n var selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n\n if (selection) {\n eventCount++;\n }\n\n rebasedItems.push(new Item(map, step, selection));\n } else {\n rebasedItems.push(new Item(map));\n }\n }, start);\n var newMaps = [];\n\n for (var i = rebasedCount; i < newUntil; i++) {\n newMaps.push(new Item(mapping.maps[i]));\n }\n\n var items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n var branch = new Branch(items, eventCount);\n\n if (branch.emptyItemCount() > max_empty_items) {\n branch = branch.compress(this.items.length - rebasedItems.length);\n }\n\n return branch;\n};\n\nBranch.prototype.emptyItemCount = function emptyItemCount() {\n var count = 0;\n this.items.forEach(function (item) {\n if (!item.step) {\n count++;\n }\n });\n return count;\n}; // Compressing a branch means rewriting it to push the air (map-only\n// items) out. During collaboration, these naturally accumulate\n// because each remote change adds one. The `upto` argument is used\n// to ensure that only the items below a given level are compressed,\n// because `rebased` relies on a clean, untouched set of items in\n// order to associate old items with rebased steps.\n\n\nBranch.prototype.compress = function compress(upto) {\n if (upto === void 0) upto = this.items.length;\n var remap = this.remapping(0, upto),\n mapFrom = remap.maps.length;\n var items = [],\n events = 0;\n this.items.forEach(function (item, i) {\n if (i >= upto) {\n items.push(item);\n\n if (item.selection) {\n events++;\n }\n } else if (item.step) {\n var step = item.step.map(remap.slice(mapFrom)),\n map = step && step.getMap();\n mapFrom--;\n\n if (map) {\n remap.appendMap(map, mapFrom);\n }\n\n if (step) {\n var selection = item.selection && item.selection.map(remap.slice(mapFrom));\n\n if (selection) {\n events++;\n }\n\n var newItem = new Item(map.invert(), step, selection),\n merged,\n last = items.length - 1;\n\n if (merged = items.length && items[last].merge(newItem)) {\n items[last] = merged;\n } else {\n items.push(newItem);\n }\n }\n } else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(items.reverse()), events);\n};\n\nBranch.empty = new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].empty, 0);\n\nfunction cutOffEvents(items, n) {\n var cutPoint;\n items.forEach(function (item, i) {\n if (item.selection && n-- == 0) {\n cutPoint = i;\n return false;\n }\n });\n return items.slice(cutPoint);\n}\n\nvar Item = function Item(map, step, selection, mirrorOffset) {\n // The (forward) step map for this item.\n this.map = map; // The inverted step\n\n this.step = step; // If this is non-null, this item is the start of a group, and\n // this selection is the starting selection for the group (the one\n // that was active before the first step was applied)\n\n this.selection = selection; // If this item is the inverse of a previous mapping on the stack,\n // this points at the inverse's offset\n\n this.mirrorOffset = mirrorOffset;\n};\n\nItem.prototype.merge = function merge(other) {\n if (this.step && other.step && !other.selection) {\n var step = other.step.merge(this.step);\n\n if (step) {\n return new Item(step.getMap().invert(), step, this.selection);\n }\n }\n}; // The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\n\n\nvar HistoryState = function HistoryState(done, undone, prevRanges, prevTime) {\n this.done = done;\n this.undone = undone;\n this.prevRanges = prevRanges;\n this.prevTime = prevTime;\n};\n\nvar DEPTH_OVERFLOW = 20; // : (HistoryState, EditorState, Transaction, Object)\n// Record a transformation in undo history.\n\nfunction applyTransaction(history, state, tr, options) {\n var historyTr = tr.getMeta(historyKey),\n rebased;\n\n if (historyTr) {\n return historyTr.historyState;\n }\n\n if (tr.getMeta(closeHistoryKey)) {\n history = new HistoryState(history.done, history.undone, null, 0);\n }\n\n var appended = tr.getMeta(\"appendedTransaction\");\n\n if (tr.steps.length == 0) {\n return history;\n } else if (appended && appended.getMeta(historyKey)) {\n if (appended.getMeta(historyKey).redo) {\n return new HistoryState(history.done.addTransform(tr, null, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps[tr.steps.length - 1]), history.prevTime);\n } else {\n return new HistoryState(history.done, history.undone.addTransform(tr, null, options, mustPreserveItems(state)), null, history.prevTime);\n }\n } else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n // Group transforms that occur in quick succession into one event.\n var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));\n var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);\n return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time);\n } else if (rebased = tr.getMeta(\"rebased\")) {\n // Used by the collab module to tell the history that some of its\n // content has been rebased.\n return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime);\n } else {\n return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime);\n }\n}\n\nfunction isAdjacentTo(transform, prevRanges) {\n if (!prevRanges) {\n return false;\n }\n\n if (!transform.docChanged) {\n return true;\n }\n\n var adjacent = false;\n transform.mapping.maps[0].forEach(function (start, end) {\n for (var i = 0; i < prevRanges.length; i += 2) {\n if (start <= prevRanges[i + 1] && end >= prevRanges[i]) {\n adjacent = true;\n }\n }\n });\n return adjacent;\n}\n\nfunction rangesFor(map) {\n var result = [];\n map.forEach(function (_from, _to, from, to) {\n return result.push(from, to);\n });\n return result;\n}\n\nfunction mapRanges(ranges, mapping) {\n if (!ranges) {\n return null;\n }\n\n var result = [];\n\n for (var i = 0; i < ranges.length; i += 2) {\n var from = mapping.map(ranges[i], 1),\n to = mapping.map(ranges[i + 1], -1);\n\n if (from <= to) {\n result.push(from, to);\n }\n }\n\n return result;\n} // : (HistoryState, EditorState, (tr: Transaction), bool)\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\n\n\nfunction histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state),\n histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n\n if (!pop) {\n return;\n }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {\n redo: redo,\n historyState: newHist\n }).scrollIntoView());\n}\n\nvar cachedPreserveItems = false,\n cachedPreserveItemsPlugins = null; // Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\n\nfunction mustPreserveItems(state) {\n var plugins = state.plugins;\n\n if (cachedPreserveItemsPlugins != plugins) {\n cachedPreserveItems = false;\n cachedPreserveItemsPlugins = plugins;\n\n for (var i = 0; i < plugins.length; i++) {\n if (plugins[i].spec.historyPreserveItems) {\n cachedPreserveItems = true;\n break;\n }\n }\n }\n\n return cachedPreserveItems;\n} // :: (Transaction) → Transaction\n// Set a flag on the given transaction that will prevent further steps\n// from being appended to an existing history event (so that they\n// require a separate undo command to undo).\n\n\nfunction closeHistory(tr) {\n return tr.setMeta(closeHistoryKey, true);\n}\n\nvar historyKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"history\");\nvar closeHistoryKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"closeHistory\"); // :: (?Object) → Plugin\n// Returns a plugin that enables the undo history for an editor. The\n// plugin will track undo and redo stacks, which can be used with the\n// [`undo`](#history.undo) and [`redo`](#history.redo) commands.\n//\n// You can set an `\"addToHistory\"` [metadata\n// property](#state.Transaction.setMeta) of `false` on a transaction\n// to prevent it from being rolled back by undo.\n//\n// config::-\n// Supports the following configuration options:\n//\n// depth:: ?number\n// The amount of history events that are collected before the\n// oldest events are discarded. Defaults to 100.\n//\n// newGroupDelay:: ?number\n// The delay between changes after which a new group should be\n// started. Defaults to 500 (milliseconds). Note that when changes\n// aren't adjacent, a new group is always started.\n\nfunction history(config) {\n config = {\n depth: config && config.depth || 100,\n newGroupDelay: config && config.newGroupDelay || 500\n };\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Plugin\"]({\n key: historyKey,\n state: {\n init: function init() {\n return new HistoryState(Branch.empty, Branch.empty, null, 0);\n },\n apply: function apply(tr, hist, state) {\n return applyTransaction(hist, state, tr, config);\n }\n },\n config: config\n });\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that undoes the last change, if any.\n\n\nfunction undo(state, dispatch) {\n var hist = historyKey.getState(state);\n\n if (!hist || hist.done.eventCount == 0) {\n return false;\n }\n\n if (dispatch) {\n histTransaction(hist, state, dispatch, false);\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that redoes the last undone change, if any.\n\n\nfunction redo(state, dispatch) {\n var hist = historyKey.getState(state);\n\n if (!hist || hist.undone.eventCount == 0) {\n return false;\n }\n\n if (dispatch) {\n histTransaction(hist, state, dispatch, true);\n }\n\n return true;\n} // :: (EditorState) → number\n// The amount of undoable events available in a given state.\n\n\nfunction undoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.done.eventCount : 0;\n} // :: (EditorState) → number\n// The amount of redoable events available in a given editor state.\n\n\nfunction redoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.undone.eventCount : 0;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-history/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-inputrules/dist/index.es.js": /*!**************************************************************!*\ !*** ./node_modules/prosemirror-inputrules/dist/index.es.js ***! \**************************************************************/ /*! exports provided: InputRule, closeDoubleQuote, closeSingleQuote, ellipsis, emDash, inputRules, openDoubleQuote, openSingleQuote, smartQuotes, textblockTypeInputRule, undoInputRule, wrappingInputRule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"InputRule\", function() { return InputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeDoubleQuote\", function() { return closeDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeSingleQuote\", function() { return closeSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ellipsis\", function() { return ellipsis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emDash\", function() { return emDash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inputRules\", function() { return inputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openDoubleQuote\", function() { return openDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openSingleQuote\", function() { return openSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"smartQuotes\", function() { return smartQuotes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"textblockTypeInputRule\", function() { return textblockTypeInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoInputRule\", function() { return undoInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrappingInputRule\", function() { return wrappingInputRule; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\n// ::- Input rules are regular expressions describing a piece of text\n// that, when typed, causes something to happen. This might be\n// changing two dashes into an emdash, wrapping a paragraph starting\n// with `\"> \"` into a blockquote, or something entirely different.\nvar InputRule = function InputRule(match, handler) {\n this.match = match;\n this.handler = typeof handler == \"string\" ? stringHandler(handler) : handler;\n};\n\nfunction stringHandler(string) {\n return function(state, match, start, end) {\n var insert = string;\n if (match[1]) {\n var offset = match[0].lastIndexOf(match[1]);\n insert += match[0].slice(offset + match[1].length);\n start += offset;\n var cutOff = start - end;\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert;\n start = end;\n }\n }\n return state.tr.insertText(insert, start, end)\n }\n}\n\nvar MAX_MATCH = 500;\n\n// :: (config: {rules: [InputRule]}) → Plugin\n// Create an input rules plugin. When enabled, it will cause text\n// input that matches any of the given rules to trigger the rule's\n// action.\nfunction inputRules(ref) {\n var rules = ref.rules;\n\n var plugin = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n state: {\n init: function init() { return null },\n apply: function apply(tr, prev) {\n var stored = tr.getMeta(this);\n if (stored) { return stored }\n return tr.selectionSet || tr.docChanged ? null : prev\n }\n },\n\n props: {\n handleTextInput: function handleTextInput(view, from, to, text) {\n return run(view, from, to, text, rules, plugin)\n },\n handleDOMEvents: {\n compositionend: function (view) {\n setTimeout(function () {\n var ref = view.state.selection;\n var $cursor = ref.$cursor;\n if ($cursor) { run(view, $cursor.pos, $cursor.pos, \"\", rules, plugin); }\n });\n }\n }\n },\n\n isInputRules: true\n });\n return plugin\n}\n\nfunction run(view, from, to, text, rules, plugin) {\n if (view.composing) { return false }\n var state = view.state, $from = state.doc.resolve(from);\n if ($from.parent.type.spec.code) { return false }\n var textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset,\n null, \"\\ufffc\") + text;\n for (var i = 0; i < rules.length; i++) {\n var match = rules[i].match.exec(textBefore);\n var tr = match && rules[i].handler(state, match, from - (match[0].length - text.length), to);\n if (!tr) { continue }\n view.dispatch(tr.setMeta(plugin, {transform: tr, from: from, to: to, text: text}));\n return true\n }\n return false\n}\n\n// :: (EditorState, ?(Transaction)) → bool\n// This is a command that will undo an input rule, if applying such a\n// rule was the last thing that the user did.\nfunction undoInputRule(state, dispatch) {\n var plugins = state.plugins;\n for (var i = 0; i < plugins.length; i++) {\n var plugin = plugins[i], undoable = (void 0);\n if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n if (dispatch) {\n var tr = state.tr, toUndo = undoable.transform;\n for (var j = toUndo.steps.length - 1; j >= 0; j--)\n { tr.step(toUndo.steps[j].invert(toUndo.docs[j])); }\n var marks = tr.doc.resolve(undoable.from).marks();\n dispatch(tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)));\n }\n return true\n }\n }\n return false\n}\n\n// :: InputRule Converts double dashes to an emdash.\nvar emDash = new InputRule(/--$/, \"—\");\n// :: InputRule Converts three dots to an ellipsis character.\nvar ellipsis = new InputRule(/\\.\\.\\.$/, \"…\");\n// :: InputRule “Smart” opening double quotes.\nvar openDoubleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(\")$/, \"“\");\n// :: InputRule “Smart” closing double quotes.\nvar closeDoubleQuote = new InputRule(/\"$/, \"”\");\n// :: InputRule “Smart” opening single quotes.\nvar openSingleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(')$/, \"‘\");\n// :: InputRule “Smart” closing single quotes.\nvar closeSingleQuote = new InputRule(/'$/, \"’\");\n\n// :: [InputRule] Smart-quote related input rules.\nvar smartQuotes = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote];\n\n// :: (RegExp, NodeType, ?union, ?([string], Node) → bool) → InputRule\n// Build an input rule for automatically wrapping a textblock when a\n// given string is typed. The `regexp` argument is\n// directly passed through to the `InputRule` constructor. You'll\n// probably want the regexp to start with `^`, so that the pattern can\n// only occur at the start of a textblock.\n//\n// `nodeType` is the type of node to wrap in. If it needs attributes,\n// you can either pass them directly, or pass a function that will\n// compute them from the regular expression match.\n//\n// By default, if there's a node with the same type above the newly\n// wrapped node, the rule will try to [join](#transform.Transform.join) those\n// two nodes. You can pass a join predicate, which takes a regular\n// expression match and the node before the wrapped node, and can\n// return a boolean to indicate whether a join should happen.\nfunction wrappingInputRule(regexp, nodeType, getAttrs, joinPredicate) {\n return new InputRule(regexp, function (state, match, start, end) {\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n var tr = state.tr.delete(start, end);\n var $start = tr.doc.resolve(start), range = $start.blockRange(), wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"findWrapping\"])(range, nodeType, attrs);\n if (!wrapping) { return null }\n tr.wrap(range, wrapping);\n var before = tr.doc.resolve(start - 1).nodeBefore;\n if (before && before.type == nodeType && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"canJoin\"])(tr.doc, start - 1) &&\n (!joinPredicate || joinPredicate(match, before)))\n { tr.join(start - 1); }\n return tr\n })\n}\n\n// :: (RegExp, NodeType, ?union) → InputRule\n// Build an input rule that changes the type of a textblock when the\n// matched text is typed into it. You'll usually want to start your\n// regexp with `^` to that it is only matched at the start of a\n// textblock. The optional `getAttrs` parameter can be used to compute\n// the new node's attributes, and works the same as in the\n// `wrappingInputRule` function.\nfunction textblockTypeInputRule(regexp, nodeType, getAttrs) {\n return new InputRule(regexp, function (state, match, start, end) {\n var $start = state.doc.resolve(start);\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) { return null }\n return state.tr\n .delete(start, end)\n .setBlockType(start, start, nodeType, attrs)\n })\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-inputrules/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"InputRule\", function() { return InputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeDoubleQuote\", function() { return closeDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeSingleQuote\", function() { return closeSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ellipsis\", function() { return ellipsis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emDash\", function() { return emDash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inputRules\", function() { return inputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openDoubleQuote\", function() { return openDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openSingleQuote\", function() { return openSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"smartQuotes\", function() { return smartQuotes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"textblockTypeInputRule\", function() { return textblockTypeInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoInputRule\", function() { return undoInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrappingInputRule\", function() { return wrappingInputRule; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n // ::- Input rules are regular expressions describing a piece of text\n// that, when typed, causes something to happen. This might be\n// changing two dashes into an emdash, wrapping a paragraph starting\n// with `\"> \"` into a blockquote, or something entirely different.\n\nvar InputRule = function InputRule(match, handler) {\n this.match = match;\n this.handler = typeof handler == \"string\" ? stringHandler(handler) : handler;\n};\n\nfunction stringHandler(string) {\n return function (state, match, start, end) {\n var insert = string;\n\n if (match[1]) {\n var offset = match[0].lastIndexOf(match[1]);\n insert += match[0].slice(offset + match[1].length);\n start += offset;\n var cutOff = start - end;\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert;\n start = end;\n }\n }\n\n return state.tr.insertText(insert, start, end);\n };\n}\n\nvar MAX_MATCH = 500; // :: (config: {rules: [InputRule]}) → Plugin\n// Create an input rules plugin. When enabled, it will cause text\n// input that matches any of the given rules to trigger the rule's\n// action.\n\nfunction inputRules(ref) {\n var rules = ref.rules;\n var plugin = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n state: {\n init: function init() {\n return null;\n },\n apply: function apply(tr, prev) {\n var stored = tr.getMeta(this);\n\n if (stored) {\n return stored;\n }\n\n return tr.selectionSet || tr.docChanged ? null : prev;\n }\n },\n props: {\n handleTextInput: function handleTextInput(view, from, to, text) {\n return run(view, from, to, text, rules, plugin);\n },\n handleDOMEvents: {\n compositionend: function compositionend(view) {\n setTimeout(function () {\n var ref = view.state.selection;\n var $cursor = ref.$cursor;\n\n if ($cursor) {\n run(view, $cursor.pos, $cursor.pos, \"\", rules, plugin);\n }\n });\n }\n }\n },\n isInputRules: true\n });\n return plugin;\n}\n\nfunction run(view, from, to, text, rules, plugin) {\n if (view.composing) {\n return false;\n }\n\n var state = view.state,\n $from = state.doc.resolve(from);\n\n if ($from.parent.type.spec.code) {\n return false;\n }\n\n var textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset, null, \"\\uFFFC\") + text;\n\n for (var i = 0; i < rules.length; i++) {\n var match = rules[i].match.exec(textBefore);\n var tr = match && rules[i].handler(state, match, from - (match[0].length - text.length), to);\n\n if (!tr) {\n continue;\n }\n\n view.dispatch(tr.setMeta(plugin, {\n transform: tr,\n from: from,\n to: to,\n text: text\n }));\n return true;\n }\n\n return false;\n} // :: (EditorState, ?(Transaction)) → bool\n// This is a command that will undo an input rule, if applying such a\n// rule was the last thing that the user did.\n\n\nfunction undoInputRule(state, dispatch) {\n var plugins = state.plugins;\n\n for (var i = 0; i < plugins.length; i++) {\n var plugin = plugins[i],\n undoable = void 0;\n\n if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n if (dispatch) {\n var tr = state.tr,\n toUndo = undoable.transform;\n\n for (var j = toUndo.steps.length - 1; j >= 0; j--) {\n tr.step(toUndo.steps[j].invert(toUndo.docs[j]));\n }\n\n var marks = tr.doc.resolve(undoable.from).marks();\n dispatch(tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)));\n }\n\n return true;\n }\n }\n\n return false;\n} // :: InputRule Converts double dashes to an emdash.\n\n\nvar emDash = new InputRule(/--$/, \"—\"); // :: InputRule Converts three dots to an ellipsis character.\n\nvar ellipsis = new InputRule(/\\.\\.\\.$/, \"…\"); // :: InputRule “Smart” opening double quotes.\n\nvar openDoubleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(\")$/, \"“\"); // :: InputRule “Smart” closing double quotes.\n\nvar closeDoubleQuote = new InputRule(/\"$/, \"”\"); // :: InputRule “Smart” opening single quotes.\n\nvar openSingleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(')$/, \"‘\"); // :: InputRule “Smart” closing single quotes.\n\nvar closeSingleQuote = new InputRule(/'$/, \"’\"); // :: [InputRule] Smart-quote related input rules.\n\nvar smartQuotes = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote]; // :: (RegExp, NodeType, ?union, ?([string], Node) → bool) → InputRule\n// Build an input rule for automatically wrapping a textblock when a\n// given string is typed. The `regexp` argument is\n// directly passed through to the `InputRule` constructor. You'll\n// probably want the regexp to start with `^`, so that the pattern can\n// only occur at the start of a textblock.\n//\n// `nodeType` is the type of node to wrap in. If it needs attributes,\n// you can either pass them directly, or pass a function that will\n// compute them from the regular expression match.\n//\n// By default, if there's a node with the same type above the newly\n// wrapped node, the rule will try to [join](#transform.Transform.join) those\n// two nodes. You can pass a join predicate, which takes a regular\n// expression match and the node before the wrapped node, and can\n// return a boolean to indicate whether a join should happen.\n\nfunction wrappingInputRule(regexp, nodeType, getAttrs, joinPredicate) {\n return new InputRule(regexp, function (state, match, start, end) {\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n var tr = state.tr[\"delete\"](start, end);\n var $start = tr.doc.resolve(start),\n range = $start.blockRange(),\n wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"findWrapping\"])(range, nodeType, attrs);\n\n if (!wrapping) {\n return null;\n }\n\n tr.wrap(range, wrapping);\n var before = tr.doc.resolve(start - 1).nodeBefore;\n\n if (before && before.type == nodeType && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"canJoin\"])(tr.doc, start - 1) && (!joinPredicate || joinPredicate(match, before))) {\n tr.join(start - 1);\n }\n\n return tr;\n });\n} // :: (RegExp, NodeType, ?union) → InputRule\n// Build an input rule that changes the type of a textblock when the\n// matched text is typed into it. You'll usually want to start your\n// regexp with `^` to that it is only matched at the start of a\n// textblock. The optional `getAttrs` parameter can be used to compute\n// the new node's attributes, and works the same as in the\n// `wrappingInputRule` function.\n\n\nfunction textblockTypeInputRule(regexp, nodeType, getAttrs) {\n return new InputRule(regexp, function (state, match, start, end) {\n var $start = state.doc.resolve(start);\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n\n if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) {\n return null;\n }\n\n return state.tr[\"delete\"](start, end).setBlockType(start, start, nodeType, attrs);\n });\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-inputrules/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-keymap/dist/index.es.js": /*!**********************************************************!*\ !*** ./node_modules/prosemirror-keymap/dist/index.es.js ***! \**********************************************************/ /*! exports provided: keydownHandler, keymap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keydownHandler\", function() { return keydownHandler; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keymap\", function() { return keymap; });\n/* harmony import */ var w3c_keyname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! w3c-keyname */ \"./node_modules/w3c-keyname/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n// declare global: navigator\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false;\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/), result = parts[parts.length - 1];\n if (result == \"Space\") { result = \" \"; }\n var alt, ctrl, shift, meta;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { meta = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else if (/^mod$/i.test(mod)) { if (mac) { meta = true; } else { ctrl = true; } }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { result = \"Alt-\" + result; }\n if (ctrl) { result = \"Ctrl-\" + result; }\n if (meta) { result = \"Meta-\" + result; }\n if (shift) { result = \"Shift-\" + result; }\n return result\n}\n\nfunction normalize(map) {\n var copy = Object.create(null);\n for (var prop in map) { copy[normalizeKeyName(prop)] = map[prop]; }\n return copy\n}\n\nfunction modifiers(name, event, shift) {\n if (event.altKey) { name = \"Alt-\" + name; }\n if (event.ctrlKey) { name = \"Ctrl-\" + name; }\n if (event.metaKey) { name = \"Meta-\" + name; }\n if (shift !== false && event.shiftKey) { name = \"Shift-\" + name; }\n return name\n}\n\n// :: (Object) → Plugin\n// Create a keymap plugin for the given set of bindings.\n//\n// Bindings should map key names to [command](#commands)-style\n// functions, which will be called with `(EditorState, dispatch,\n// EditorView)` arguments, and should return true when they've handled\n// the key. Note that the view argument isn't part of the command\n// protocol, but can be used as an escape hatch if a binding needs to\n// directly interact with the UI.\n//\n// Key names may be strings like `\"Shift-Ctrl-Enter\"`—a key\n// identifier prefixed with zero or more modifiers. Key identifiers\n// are based on the strings that can appear in\n// [`KeyEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\n// Use lowercase letters to refer to letter keys (or uppercase letters\n// if you want shift to be held). You may use `\"Space\"` as an alias\n// for the `\" \"` name.\n//\n// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n// `Meta-`) are recognized. For characters that are created by holding\n// shift, the `Shift-` prefix is implied, and should not be added\n// explicitly.\n//\n// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\n// other platforms.\n//\n// You can add multiple keymap plugins to an editor. The order in\n// which they appear determines their precedence (the ones early in\n// the array get to dispatch first).\nfunction keymap(bindings) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({props: {handleKeyDown: keydownHandler(bindings)}})\n}\n\n// :: (Object) → (view: EditorView, event: dom.Event) → bool\n// Given a set of bindings (using the same format as\n// [`keymap`](#keymap.keymap), return a [keydown\n// handler](#view.EditorProps.handleKeyDown) that handles them.\nfunction keydownHandler(bindings) {\n var map = normalize(bindings);\n return function(view, event) {\n var name = Object(w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"keyName\"])(event), isChar = name.length == 1 && name != \" \", baseName;\n var direct = map[modifiers(name, event, !isChar)];\n if (direct && direct(view.state, view.dispatch, view)) { return true }\n if (isChar && (event.shiftKey || event.altKey || event.metaKey) &&\n (baseName = w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"base\"][event.keyCode]) && baseName != name) {\n var fromCode = map[modifiers(baseName, event, true)];\n if (fromCode && fromCode(view.state, view.dispatch, view)) { return true }\n } else if (isChar && event.shiftKey) {\n var withShift = map[modifiers(name, event, true)];\n if (withShift && withShift(view.state, view.dispatch, view)) { return true }\n }\n return false\n }\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-keymap/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keydownHandler\", function() { return keydownHandler; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keymap\", function() { return keymap; });\n/* harmony import */ var w3c_keyname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! w3c-keyname */ \"./node_modules/w3c-keyname/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n // declare global: navigator\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false;\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/),\n result = parts[parts.length - 1];\n\n if (result == \"Space\") {\n result = \" \";\n }\n\n var alt, ctrl, shift, meta;\n\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n\n if (/^(cmd|meta|m)$/i.test(mod)) {\n meta = true;\n } else if (/^a(lt)?$/i.test(mod)) {\n alt = true;\n } else if (/^(c|ctrl|control)$/i.test(mod)) {\n ctrl = true;\n } else if (/^s(hift)?$/i.test(mod)) {\n shift = true;\n } else if (/^mod$/i.test(mod)) {\n if (mac) {\n meta = true;\n } else {\n ctrl = true;\n }\n } else {\n throw new Error(\"Unrecognized modifier name: \" + mod);\n }\n }\n\n if (alt) {\n result = \"Alt-\" + result;\n }\n\n if (ctrl) {\n result = \"Ctrl-\" + result;\n }\n\n if (meta) {\n result = \"Meta-\" + result;\n }\n\n if (shift) {\n result = \"Shift-\" + result;\n }\n\n return result;\n}\n\nfunction normalize(map) {\n var copy = Object.create(null);\n\n for (var prop in map) {\n copy[normalizeKeyName(prop)] = map[prop];\n }\n\n return copy;\n}\n\nfunction modifiers(name, event, shift) {\n if (event.altKey) {\n name = \"Alt-\" + name;\n }\n\n if (event.ctrlKey) {\n name = \"Ctrl-\" + name;\n }\n\n if (event.metaKey) {\n name = \"Meta-\" + name;\n }\n\n if (shift !== false && event.shiftKey) {\n name = \"Shift-\" + name;\n }\n\n return name;\n} // :: (Object) → Plugin\n// Create a keymap plugin for the given set of bindings.\n//\n// Bindings should map key names to [command](#commands)-style\n// functions, which will be called with `(EditorState, dispatch,\n// EditorView)` arguments, and should return true when they've handled\n// the key. Note that the view argument isn't part of the command\n// protocol, but can be used as an escape hatch if a binding needs to\n// directly interact with the UI.\n//\n// Key names may be strings like `\"Shift-Ctrl-Enter\"`—a key\n// identifier prefixed with zero or more modifiers. Key identifiers\n// are based on the strings that can appear in\n// [`KeyEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\n// Use lowercase letters to refer to letter keys (or uppercase letters\n// if you want shift to be held). You may use `\"Space\"` as an alias\n// for the `\" \"` name.\n//\n// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n// `Meta-`) are recognized. For characters that are created by holding\n// shift, the `Shift-` prefix is implied, and should not be added\n// explicitly.\n//\n// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\n// other platforms.\n//\n// You can add multiple keymap plugins to an editor. The order in\n// which they appear determines their precedence (the ones early in\n// the array get to dispatch first).\n\n\nfunction keymap(bindings) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({\n props: {\n handleKeyDown: keydownHandler(bindings)\n }\n });\n} // :: (Object) → (view: EditorView, event: dom.Event) → bool\n// Given a set of bindings (using the same format as\n// [`keymap`](#keymap.keymap), return a [keydown\n// handler](#view.EditorProps.handleKeyDown) that handles them.\n\n\nfunction keydownHandler(bindings) {\n var map = normalize(bindings);\n return function (view, event) {\n var name = Object(w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"keyName\"])(event),\n isChar = name.length == 1 && name != \" \",\n baseName;\n var direct = map[modifiers(name, event, !isChar)];\n\n if (direct && direct(view.state, view.dispatch, view)) {\n return true;\n }\n\n if (isChar && (event.shiftKey || event.altKey || event.metaKey || name.charCodeAt(0) > 127) && (baseName = w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"base\"][event.keyCode]) && baseName != name) {\n // Try falling back to the keyCode when there's a modifier\n // active or the character produced isn't ASCII, and our table\n // produces a different name from the the keyCode. See #668,\n // #1060\n var fromCode = map[modifiers(baseName, event, true)];\n\n if (fromCode && fromCode(view.state, view.dispatch, view)) {\n return true;\n }\n } else if (isChar && event.shiftKey) {\n // Otherwise, if shift is active, also try the binding with the\n // Shift- prefix enabled. See #997\n var withShift = map[modifiers(name, event, true)];\n\n if (withShift && withShift(view.state, view.dispatch, view)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-keymap/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-markdown/dist/index.es.js": /*!************************************************************!*\ !*** ./node_modules/prosemirror-markdown/dist/index.es.js ***! \************************************************************/ /*! exports provided: MarkdownParser, MarkdownSerializer, MarkdownSerializerState, defaultMarkdownParser, defaultMarkdownSerializer, schema */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownParser\", function() { return MarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializer\", function() { return MarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializerState\", function() { return MarkdownSerializerState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownParser\", function() { return defaultMarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownSerializer\", function() { return defaultMarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"schema\", function() { return schema; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! markdown-it */ \"./node_modules/markdown-it/index.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(markdown_it__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n// ::Schema Document schema for the data model used by CommonMark.\nvar schema = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Schema\"]({\n nodes: {\n doc: {\n content: \"block+\"\n },\n\n paragraph: {\n content: \"inline*\",\n group: \"block\",\n parseDOM: [{tag: \"p\"}],\n toDOM: function toDOM() { return [\"p\", 0] }\n },\n\n blockquote: {\n content: \"block+\",\n group: \"block\",\n parseDOM: [{tag: \"blockquote\"}],\n toDOM: function toDOM() { return [\"blockquote\", 0] }\n },\n\n horizontal_rule: {\n group: \"block\",\n parseDOM: [{tag: \"hr\"}],\n toDOM: function toDOM() { return [\"div\", [\"hr\"]] }\n },\n\n heading: {\n attrs: {level: {default: 1}},\n content: \"inline*\",\n group: \"block\",\n defining: true,\n parseDOM: [{tag: \"h1\", attrs: {level: 1}},\n {tag: \"h2\", attrs: {level: 2}},\n {tag: \"h3\", attrs: {level: 3}},\n {tag: \"h4\", attrs: {level: 4}},\n {tag: \"h5\", attrs: {level: 5}},\n {tag: \"h6\", attrs: {level: 6}}],\n toDOM: function toDOM(node) { return [\"h\" + node.attrs.level, 0] }\n },\n\n code_block: {\n content: \"text*\",\n group: \"block\",\n code: true,\n defining: true,\n marks: \"\",\n attrs: {params: {default: \"\"}},\n parseDOM: [{tag: \"pre\", preserveWhitespace: \"full\", getAttrs: function (node) { return (\n {params: node.getAttribute(\"data-params\") || \"\"}\n ); }}],\n toDOM: function toDOM(node) { return [\"pre\", node.attrs.params ? {\"data-params\": node.attrs.params} : {}, [\"code\", 0]] }\n },\n\n ordered_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {order: {default: 1}, tight: {default: false}},\n parseDOM: [{tag: \"ol\", getAttrs: function getAttrs(dom) {\n return {order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1,\n tight: dom.hasAttribute(\"data-tight\")}\n }}],\n toDOM: function toDOM(node) {\n return [\"ol\", {start: node.attrs.order == 1 ? null : node.attrs.order,\n \"data-tight\": node.attrs.tight ? \"true\" : null}, 0]\n }\n },\n\n bullet_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {tight: {default: false}},\n parseDOM: [{tag: \"ul\", getAttrs: function (dom) { return ({tight: dom.hasAttribute(\"data-tight\")}); }}],\n toDOM: function toDOM(node) { return [\"ul\", {\"data-tight\": node.attrs.tight ? \"true\" : null}, 0] }\n },\n\n list_item: {\n content: \"paragraph block*\",\n defining: true,\n parseDOM: [{tag: \"li\"}],\n toDOM: function toDOM() { return [\"li\", 0] }\n },\n\n text: {\n group: \"inline\"\n },\n\n image: {\n inline: true,\n attrs: {\n src: {},\n alt: {default: null},\n title: {default: null}\n },\n group: \"inline\",\n draggable: true,\n parseDOM: [{tag: \"img[src]\", getAttrs: function getAttrs(dom) {\n return {\n src: dom.getAttribute(\"src\"),\n title: dom.getAttribute(\"title\"),\n alt: dom.getAttribute(\"alt\")\n }\n }}],\n toDOM: function toDOM(node) { return [\"img\", node.attrs] }\n },\n\n hard_break: {\n inline: true,\n group: \"inline\",\n selectable: false,\n parseDOM: [{tag: \"br\"}],\n toDOM: function toDOM() { return [\"br\"] }\n }\n },\n\n marks: {\n em: {\n parseDOM: [{tag: \"i\"}, {tag: \"em\"},\n {style: \"font-style\", getAttrs: function (value) { return value == \"italic\" && null; }}],\n toDOM: function toDOM() { return [\"em\"] }\n },\n\n strong: {\n parseDOM: [{tag: \"b\"}, {tag: \"strong\"},\n {style: \"font-weight\", getAttrs: function (value) { return /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null; }}],\n toDOM: function toDOM() { return [\"strong\"] }\n },\n\n link: {\n attrs: {\n href: {},\n title: {default: null}\n },\n inclusive: false,\n parseDOM: [{tag: \"a[href]\", getAttrs: function getAttrs(dom) {\n return {href: dom.getAttribute(\"href\"), title: dom.getAttribute(\"title\")}\n }}],\n toDOM: function toDOM(node) { return [\"a\", node.attrs] }\n },\n\n code: {\n parseDOM: [{tag: \"code\"}],\n toDOM: function toDOM() { return [\"code\"] }\n }\n }\n});\n\nfunction maybeMerge(a, b) {\n if (a.isText && b.isText && prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(a.marks, b.marks))\n { return a.withText(a.text + b.text) }\n}\n\n// Object used to track the context of a running parse.\nvar MarkdownParseState = function MarkdownParseState(schema, tokenHandlers) {\n this.schema = schema;\n this.stack = [{type: schema.topNodeType, content: []}];\n this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none;\n this.tokenHandlers = tokenHandlers;\n};\n\nMarkdownParseState.prototype.top = function top () {\n return this.stack[this.stack.length - 1]\n};\n\nMarkdownParseState.prototype.push = function push (elt) {\n if (this.stack.length) { this.top().content.push(elt); }\n};\n\n// : (string)\n// Adds the given text to the current position in the document,\n// using the current marks as styling.\nMarkdownParseState.prototype.addText = function addText (text) {\n if (!text) { return }\n var nodes = this.top().content, last = nodes[nodes.length - 1];\n var node = this.schema.text(text, this.marks), merged;\n if (last && (merged = maybeMerge(last, node))) { nodes[nodes.length - 1] = merged; }\n else { nodes.push(node); }\n};\n\n// : (Mark)\n// Adds the given mark to the set of active marks.\nMarkdownParseState.prototype.openMark = function openMark (mark) {\n this.marks = mark.addToSet(this.marks);\n};\n\n// : (Mark)\n// Removes the given mark from the set of active marks.\nMarkdownParseState.prototype.closeMark = function closeMark (mark) {\n this.marks = mark.removeFromSet(this.marks);\n};\n\nMarkdownParseState.prototype.parseTokens = function parseTokens (toks) {\n for (var i = 0; i < toks.length; i++) {\n var tok = toks[i];\n var handler = this.tokenHandlers[tok.type];\n if (!handler)\n { throw new Error(\"Token type `\" + tok.type + \"` not supported by Markdown parser\") }\n handler(this, tok);\n }\n};\n\n// : (NodeType, ?Object, ?[Node]) → ?Node\n// Add a node at the current position.\nMarkdownParseState.prototype.addNode = function addNode (type, attrs, content) {\n var node = type.createAndFill(attrs, content, this.marks);\n if (!node) { return null }\n this.push(node);\n return node\n};\n\n// : (NodeType, ?Object)\n// Wrap subsequent content in a node of the given type.\nMarkdownParseState.prototype.openNode = function openNode (type, attrs) {\n this.stack.push({type: type, attrs: attrs, content: []});\n};\n\n// : () → ?Node\n// Close and return the node that is currently on top of the stack.\nMarkdownParseState.prototype.closeNode = function closeNode () {\n if (this.marks.length) { this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none; }\n var info = this.stack.pop();\n return this.addNode(info.type, info.attrs, info.content)\n};\n\nfunction attrs(spec, token) {\n if (spec.getAttrs) { return spec.getAttrs(token) }\n // For backwards compatibility when `attrs` is a Function\n else if (spec.attrs instanceof Function) { return spec.attrs(token) }\n else { return spec.attrs }\n}\n\n// Code content is represented as a single token with a `content`\n// property in Markdown-it.\nfunction noOpenClose(type) {\n return type == \"code_inline\" || type == \"code_block\" || type == \"fence\"\n}\n\nfunction withoutTrailingNewline(str) {\n return str[str.length - 1] == \"\\n\" ? str.slice(0, str.length - 1) : str\n}\n\nfunction noOp() {}\n\nfunction tokenHandlers(schema, tokens) {\n var handlers = Object.create(null);\n var loop = function ( type ) {\n var spec = tokens[type];\n if (spec.block) {\n var nodeType = schema.nodeType(spec.block);\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openNode(nodeType, attrs(spec, tok));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeNode();\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) { return state.openNode(nodeType, attrs(spec, tok)); };\n handlers[type + \"_close\"] = function (state) { return state.closeNode(); };\n }\n } else if (spec.node) {\n var nodeType$1 = schema.nodeType(spec.node);\n handlers[type] = function (state, tok) { return state.addNode(nodeType$1, attrs(spec, tok)); };\n } else if (spec.mark) {\n var markType = schema.marks[spec.mark];\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openMark(markType.create(attrs(spec, tok)));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeMark(markType);\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) { return state.openMark(markType.create(attrs(spec, tok))); };\n handlers[type + \"_close\"] = function (state) { return state.closeMark(markType); };\n }\n } else if (spec.ignore) {\n if (noOpenClose(type)) {\n handlers[type] = noOp;\n } else {\n handlers[type + '_open'] = noOp;\n handlers[type + '_close'] = noOp;\n }\n } else {\n throw new RangeError(\"Unrecognized parsing spec \" + JSON.stringify(spec))\n }\n };\n\n for (var type in tokens) loop( type );\n\n handlers.text = function (state, tok) { return state.addText(tok.content); };\n handlers.inline = function (state, tok) { return state.parseTokens(tok.children); };\n handlers.softbreak = handlers.softbreak || (function (state) { return state.addText(\"\\n\"); });\n\n return handlers\n}\n\n// ::- A configuration of a Markdown parser. Such a parser uses\n// [markdown-it](https://github.com/markdown-it/markdown-it) to\n// tokenize a file, and then runs the custom rules it is given over\n// the tokens to create a ProseMirror document tree.\nvar MarkdownParser = function MarkdownParser(schema, tokenizer, tokens) {\n // :: Object The value of the `tokens` object used to construct\n // this parser. Can be useful to copy and modify to base other\n // parsers on.\n this.tokens = tokens;\n this.schema = schema;\n this.tokenizer = tokenizer;\n this.tokenHandlers = tokenHandlers(schema, tokens);\n};\n\n// :: (string) → Node\n// Parse a string as [CommonMark](http://commonmark.org/) markup,\n// and create a ProseMirror document as prescribed by this parser's\n// rules.\nMarkdownParser.prototype.parse = function parse (text) {\n var state = new MarkdownParseState(this.schema, this.tokenHandlers), doc;\n state.parseTokens(this.tokenizer.parse(text, {}));\n do { doc = state.closeNode(); } while (state.stack.length)\n return doc\n};\n\n// :: MarkdownParser\n// A parser parsing unextended [CommonMark](http://commonmark.org/),\n// without inline HTML, and producing a document in the basic schema.\nvar defaultMarkdownParser = new MarkdownParser(schema, markdown_it__WEBPACK_IMPORTED_MODULE_1___default()(\"commonmark\", {html: false}), {\n blockquote: {block: \"blockquote\"},\n paragraph: {block: \"paragraph\"},\n list_item: {block: \"list_item\"},\n bullet_list: {block: \"bullet_list\"},\n ordered_list: {block: \"ordered_list\", getAttrs: function (tok) { return ({order: +tok.attrGet(\"start\") || 1}); }},\n heading: {block: \"heading\", getAttrs: function (tok) { return ({level: +tok.tag.slice(1)}); }},\n code_block: {block: \"code_block\"},\n fence: {block: \"code_block\", getAttrs: function (tok) { return ({params: tok.info || \"\"}); }},\n hr: {node: \"horizontal_rule\"},\n image: {node: \"image\", getAttrs: function (tok) { return ({\n src: tok.attrGet(\"src\"),\n title: tok.attrGet(\"title\") || null,\n alt: tok.children[0] && tok.children[0].content || null\n }); }},\n hardbreak: {node: \"hard_break\"},\n\n em: {mark: \"em\"},\n strong: {mark: \"strong\"},\n link: {mark: \"link\", getAttrs: function (tok) { return ({\n href: tok.attrGet(\"href\"),\n title: tok.attrGet(\"title\") || null\n }); }},\n code_inline: {mark: \"code\"}\n});\n\n// ::- A specification for serializing a ProseMirror document as\n// Markdown/CommonMark text.\nvar MarkdownSerializer = function MarkdownSerializer(nodes, marks) {\n // :: Object<(MarkdownSerializerState, Node)> The node serializer\n // functions for this serializer.\n this.nodes = nodes;\n // :: Object The mark serializer info.\n this.marks = marks;\n};\n\n// :: (Node, ?Object) → string\n// Serialize the content of the given node to\n// [CommonMark](http://commonmark.org/).\nMarkdownSerializer.prototype.serialize = function serialize (content, options) {\n var state = new MarkdownSerializerState(this.nodes, this.marks, options);\n state.renderContent(content);\n return state.out\n};\n\n// :: MarkdownSerializer\n// A serializer for the [basic schema](#schema).\nvar defaultMarkdownSerializer = new MarkdownSerializer({\n blockquote: function blockquote(state, node) {\n state.wrapBlock(\"> \", null, node, function () { return state.renderContent(node); });\n },\n code_block: function code_block(state, node) {\n state.write(\"```\" + (node.attrs.params || \"\") + \"\\n\");\n state.text(node.textContent, false);\n state.ensureNewLine();\n state.write(\"```\");\n state.closeBlock(node);\n },\n heading: function heading(state, node) {\n state.write(state.repeat(\"#\", node.attrs.level) + \" \");\n state.renderInline(node);\n state.closeBlock(node);\n },\n horizontal_rule: function horizontal_rule(state, node) {\n state.write(node.attrs.markup || \"---\");\n state.closeBlock(node);\n },\n bullet_list: function bullet_list(state, node) {\n state.renderList(node, \" \", function () { return (node.attrs.bullet || \"*\") + \" \"; });\n },\n ordered_list: function ordered_list(state, node) {\n var start = node.attrs.order || 1;\n var maxW = String(start + node.childCount - 1).length;\n var space = state.repeat(\" \", maxW + 2);\n state.renderList(node, space, function (i) {\n var nStr = String(start + i);\n return state.repeat(\" \", maxW - nStr.length) + nStr + \". \"\n });\n },\n list_item: function list_item(state, node) {\n state.renderContent(node);\n },\n paragraph: function paragraph(state, node) {\n state.renderInline(node);\n state.closeBlock(node);\n },\n\n image: function image(state, node) {\n state.write(\"![\" + state.esc(node.attrs.alt || \"\") + \"](\" + state.esc(node.attrs.src) +\n (node.attrs.title ? \" \" + state.quote(node.attrs.title) : \"\") + \")\");\n },\n hard_break: function hard_break(state, node, parent, index) {\n for (var i = index + 1; i < parent.childCount; i++)\n { if (parent.child(i).type != node.type) {\n state.write(\"\\\\\\n\");\n return\n } }\n },\n text: function text(state, node) {\n state.text(node.text);\n }\n}, {\n em: {open: \"*\", close: \"*\", mixable: true, expelEnclosingWhitespace: true},\n strong: {open: \"**\", close: \"**\", mixable: true, expelEnclosingWhitespace: true},\n link: {\n open: function open(_state, mark, parent, index) {\n return isPlainURL(mark, parent, index, 1) ? \"<\" : \"[\"\n },\n close: function close(state, mark, parent, index) {\n return isPlainURL(mark, parent, index, -1) ? \">\"\n : \"](\" + state.esc(mark.attrs.href) + (mark.attrs.title ? \" \" + state.quote(mark.attrs.title) : \"\") + \")\"\n }\n },\n code: {open: function open(_state, _mark, parent, index) { return backticksFor(parent.child(index), -1) },\n close: function close(_state, _mark, parent, index) { return backticksFor(parent.child(index - 1), 1) },\n escape: false}\n});\n\nfunction backticksFor(node, side) {\n var ticks = /`+/g, m, len = 0;\n if (node.isText) { while (m = ticks.exec(node.text)) { len = Math.max(len, m[0].length); } }\n var result = len > 0 && side > 0 ? \" `\" : \"`\";\n for (var i = 0; i < len; i++) { result += \"`\"; }\n if (len > 0 && side < 0) { result += \" \"; }\n return result\n}\n\nfunction isPlainURL(link, parent, index, side) {\n if (link.attrs.title || !/^\\w+:/.test(link.attrs.href)) { return false }\n var content = parent.child(index + (side < 0 ? -1 : 0));\n if (!content.isText || content.text != link.attrs.href || content.marks[content.marks.length - 1] != link) { return false }\n if (index == (side < 0 ? 1 : parent.childCount - 1)) { return true }\n var next = parent.child(index + (side < 0 ? -2 : 1));\n return !link.isInSet(next.marks)\n}\n\n// ::- This is an object used to track state and expose\n// methods related to markdown serialization. Instances are passed to\n// node and mark serialization methods (see `toMarkdown`).\nvar MarkdownSerializerState = function MarkdownSerializerState(nodes, marks, options) {\n this.nodes = nodes;\n this.marks = marks;\n this.delim = this.out = \"\";\n this.closed = false;\n this.inTightList = false;\n // :: Object\n // The options passed to the serializer.\n // tightLists:: ?bool\n // Whether to render lists in a tight style. This can be overridden\n // on a node level by specifying a tight attribute on the node.\n // Defaults to false.\n this.options = options || {};\n if (typeof this.options.tightLists == \"undefined\")\n { this.options.tightLists = false; }\n};\n\nMarkdownSerializerState.prototype.flushClose = function flushClose (size) {\n if (this.closed) {\n if (!this.atBlank()) { this.out += \"\\n\"; }\n if (size == null) { size = 2; }\n if (size > 1) {\n var delimMin = this.delim;\n var trim = /\\s+$/.exec(delimMin);\n if (trim) { delimMin = delimMin.slice(0, delimMin.length - trim[0].length); }\n for (var i = 1; i < size; i++)\n { this.out += delimMin + \"\\n\"; }\n }\n this.closed = false;\n }\n};\n\n// :: (string, ?string, Node, ())\n// Render a block, prefixing each line with `delim`, and the first\n// line in `firstDelim`. `node` should be the node that is closed at\n// the end of the block, and `f` is a function that renders the\n// content of the block.\nMarkdownSerializerState.prototype.wrapBlock = function wrapBlock (delim, firstDelim, node, f) {\n var old = this.delim;\n this.write(firstDelim || delim);\n this.delim += delim;\n f();\n this.delim = old;\n this.closeBlock(node);\n};\n\nMarkdownSerializerState.prototype.atBlank = function atBlank () {\n return /(^|\\n)$/.test(this.out)\n};\n\n// :: ()\n// Ensure the current content ends with a newline.\nMarkdownSerializerState.prototype.ensureNewLine = function ensureNewLine () {\n if (!this.atBlank()) { this.out += \"\\n\"; }\n};\n\n// :: (?string)\n// Prepare the state for writing output (closing closed paragraphs,\n// adding delimiters, and so on), and then optionally add content\n// (unescaped) to the output.\nMarkdownSerializerState.prototype.write = function write (content) {\n this.flushClose();\n if (this.delim && this.atBlank())\n { this.out += this.delim; }\n if (content) { this.out += content; }\n};\n\n// :: (Node)\n// Close the block for the given node.\nMarkdownSerializerState.prototype.closeBlock = function closeBlock (node) {\n this.closed = node;\n};\n\n// :: (string, ?bool)\n// Add the given text to the document. When escape is not `false`,\n// it will be escaped.\nMarkdownSerializerState.prototype.text = function text (text$1, escape) {\n var lines = text$1.split(\"\\n\");\n for (var i = 0; i < lines.length; i++) {\n var startOfLine = this.atBlank() || this.closed;\n this.write();\n this.out += escape !== false ? this.esc(lines[i], startOfLine) : lines[i];\n if (i != lines.length - 1) { this.out += \"\\n\"; }\n }\n};\n\n// :: (Node)\n// Render the given node as a block.\nMarkdownSerializerState.prototype.render = function render (node, parent, index) {\n if (typeof parent == \"number\") { throw new Error(\"!\") }\n this.nodes[node.type.name](this, node, parent, index);\n};\n\n// :: (Node)\n// Render the contents of `parent` as block nodes.\nMarkdownSerializerState.prototype.renderContent = function renderContent (parent) {\n var this$1 = this;\n\n parent.forEach(function (node, _, i) { return this$1.render(node, parent, i); });\n};\n\n// :: (Node)\n// Render the contents of `parent` as inline content.\nMarkdownSerializerState.prototype.renderInline = function renderInline (parent) {\n var this$1 = this;\n\n var active = [], trailing = \"\";\n var progress = function (node, _, index) {\n var marks = node ? node.marks : [];\n\n // Remove marks from `hard_break` that are the last node inside\n // that mark to prevent parser edge cases with new lines just\n // before closing marks.\n // (FIXME it'd be nice if we had a schema-agnostic way to\n // identify nodes that serialize as hard breaks)\n if (node && node.type.name === \"hard_break\")\n { marks = marks.filter(function (m) {\n if (index + 1 == parent.childCount) { return false }\n var next = parent.child(index + 1);\n return m.isInSet(next.marks) && (!next.isText || /\\S/.test(next.text))\n }); }\n\n var leading = trailing;\n trailing = \"\";\n // If whitespace has to be expelled from the node, adjust\n // leading and trailing accordingly.\n if (node && node.isText && marks.some(function (mark) {\n var info = this$1.marks[mark.type.name];\n return info && info.expelEnclosingWhitespace\n })) {\n var ref = /^(\\s*)(.*?)(\\s*)$/m.exec(node.text);\n var _$1 = ref[0];\n var lead = ref[1];\n var inner$1 = ref[2];\n var trail = ref[3];\n leading += lead;\n trailing = trail;\n if (lead || trail) {\n node = inner$1 ? node.withText(inner$1) : null;\n if (!node) { marks = active; }\n }\n }\n\n var inner = marks.length && marks[marks.length - 1], noEsc = inner && this$1.marks[inner.type.name].escape === false;\n var len = marks.length - (noEsc ? 1 : 0);\n\n // Try to reorder 'mixable' marks, such as em and strong, which\n // in Markdown may be opened and closed in different order, so\n // that order of the marks for the token matches the order in\n // active.\n outer: for (var i = 0; i < len; i++) {\n var mark = marks[i];\n if (!this$1.marks[mark.type.name].mixable) { break }\n for (var j = 0; j < active.length; j++) {\n var other = active[j];\n if (!this$1.marks[other.type.name].mixable) { break }\n if (mark.eq(other)) {\n if (i > j)\n { marks = marks.slice(0, j).concat(mark).concat(marks.slice(j, i)).concat(marks.slice(i + 1, len)); }\n else if (j > i)\n { marks = marks.slice(0, i).concat(marks.slice(i + 1, j)).concat(mark).concat(marks.slice(j, len)); }\n continue outer\n }\n }\n }\n\n // Find the prefix of the mark set that didn't change\n var keep = 0;\n while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep])) { ++keep; }\n\n // Close the marks that need to be closed\n while (keep < active.length)\n { this$1.text(this$1.markString(active.pop(), false, parent, index), false); }\n\n // Output any previously expelled trailing whitespace outside the marks\n if (leading) { this$1.text(leading); }\n\n // Open the marks that need to be opened\n if (node) {\n while (active.length < len) {\n var add = marks[active.length];\n active.push(add);\n this$1.text(this$1.markString(add, true, parent, index), false);\n }\n\n // Render the node. Special case code marks, since their content\n // may not be escaped.\n if (noEsc && node.isText)\n { this$1.text(this$1.markString(inner, true, parent, index) + node.text +\n this$1.markString(inner, false, parent, index + 1), false); }\n else\n { this$1.render(node, parent, index); }\n }\n };\n parent.forEach(progress);\n progress(null, null, parent.childCount);\n};\n\n// :: (Node, string, (number) → string)\n// Render a node's content as a list. `delim` should be the extra\n// indentation added to all lines except the first in an item,\n// `firstDelim` is a function going from an item index to a\n// delimiter for the first line of the item.\nMarkdownSerializerState.prototype.renderList = function renderList (node, delim, firstDelim) {\n var this$1 = this;\n\n if (this.closed && this.closed.type == node.type)\n { this.flushClose(3); }\n else if (this.inTightList)\n { this.flushClose(1); }\n\n var isTight = typeof node.attrs.tight != \"undefined\" ? node.attrs.tight : this.options.tightLists;\n var prevTight = this.inTightList;\n this.inTightList = isTight;\n node.forEach(function (child, _, i) {\n if (i && isTight) { this$1.flushClose(1); }\n this$1.wrapBlock(delim, firstDelim(i), node, function () { return this$1.render(child, node, i); });\n });\n this.inTightList = prevTight;\n};\n\n// :: (string, ?bool) → string\n// Escape the given string so that it can safely appear in Markdown\n// content. If `startOfLine` is true, also escape characters that\n// has special meaning only at the start of the line.\nMarkdownSerializerState.prototype.esc = function esc (str, startOfLine) {\n str = str.replace(/[`*\\\\~\\[\\]]/g, \"\\\\$&\");\n if (startOfLine) { str = str.replace(/^[:#\\-*+]/, \"\\\\$&\").replace(/^(\\d+)\\./, \"$1\\\\.\"); }\n return str\n};\n\nMarkdownSerializerState.prototype.quote = function quote (str) {\n var wrap = str.indexOf('\"') == -1 ? '\"\"' : str.indexOf(\"'\") == -1 ? \"''\" : \"()\";\n return wrap[0] + str + wrap[1]\n};\n\n// :: (string, number) → string\n// Repeat the given string `n` times.\nMarkdownSerializerState.prototype.repeat = function repeat (str, n) {\n var out = \"\";\n for (var i = 0; i < n; i++) { out += str; }\n return out\n};\n\n// : (Mark, bool, string?) → string\n// Get the markdown string for a given opening or closing mark.\nMarkdownSerializerState.prototype.markString = function markString (mark, open, parent, index) {\n var info = this.marks[mark.type.name];\n var value = open ? info.open : info.close;\n return typeof value == \"string\" ? value : value(this, mark, parent, index)\n};\n\n// :: (string) → { leading: ?string, trailing: ?string }\n// Get leading and trailing whitespace from a string. Values of\n// leading or trailing property of the return object will be undefined\n// if there is no match.\nMarkdownSerializerState.prototype.getEnclosingWhitespace = function getEnclosingWhitespace (text) {\n return {\n leading: (text.match(/^(\\s+)/) || [])[0],\n trailing: (text.match(/(\\s+)$/) || [])[0]\n }\n};\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-markdown/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownParser\", function() { return MarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializer\", function() { return MarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializerState\", function() { return MarkdownSerializerState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownParser\", function() { return defaultMarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownSerializer\", function() { return defaultMarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"schema\", function() { return schema; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! markdown-it */ \"./node_modules/markdown-it/index.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(markdown_it__WEBPACK_IMPORTED_MODULE_1__);\n\n // ::Schema Document schema for the data model used by CommonMark.\n\nvar schema = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Schema\"]({\n nodes: {\n doc: {\n content: \"block+\"\n },\n paragraph: {\n content: \"inline*\",\n group: \"block\",\n parseDOM: [{\n tag: \"p\"\n }],\n toDOM: function toDOM() {\n return [\"p\", 0];\n }\n },\n blockquote: {\n content: \"block+\",\n group: \"block\",\n parseDOM: [{\n tag: \"blockquote\"\n }],\n toDOM: function toDOM() {\n return [\"blockquote\", 0];\n }\n },\n horizontal_rule: {\n group: \"block\",\n parseDOM: [{\n tag: \"hr\"\n }],\n toDOM: function toDOM() {\n return [\"div\", [\"hr\"]];\n }\n },\n heading: {\n attrs: {\n level: {\n \"default\": 1\n }\n },\n content: \"inline*\",\n group: \"block\",\n defining: true,\n parseDOM: [{\n tag: \"h1\",\n attrs: {\n level: 1\n }\n }, {\n tag: \"h2\",\n attrs: {\n level: 2\n }\n }, {\n tag: \"h3\",\n attrs: {\n level: 3\n }\n }, {\n tag: \"h4\",\n attrs: {\n level: 4\n }\n }, {\n tag: \"h5\",\n attrs: {\n level: 5\n }\n }, {\n tag: \"h6\",\n attrs: {\n level: 6\n }\n }],\n toDOM: function toDOM(node) {\n return [\"h\" + node.attrs.level, 0];\n }\n },\n code_block: {\n content: \"text*\",\n group: \"block\",\n code: true,\n defining: true,\n marks: \"\",\n attrs: {\n params: {\n \"default\": \"\"\n }\n },\n parseDOM: [{\n tag: \"pre\",\n preserveWhitespace: \"full\",\n getAttrs: function getAttrs(node) {\n return {\n params: node.getAttribute(\"data-params\") || \"\"\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"pre\", node.attrs.params ? {\n \"data-params\": node.attrs.params\n } : {}, [\"code\", 0]];\n }\n },\n ordered_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {\n order: {\n \"default\": 1\n },\n tight: {\n \"default\": false\n }\n },\n parseDOM: [{\n tag: \"ol\",\n getAttrs: function getAttrs(dom) {\n return {\n order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1,\n tight: dom.hasAttribute(\"data-tight\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"ol\", {\n start: node.attrs.order == 1 ? null : node.attrs.order,\n \"data-tight\": node.attrs.tight ? \"true\" : null\n }, 0];\n }\n },\n bullet_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {\n tight: {\n \"default\": false\n }\n },\n parseDOM: [{\n tag: \"ul\",\n getAttrs: function getAttrs(dom) {\n return {\n tight: dom.hasAttribute(\"data-tight\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"ul\", {\n \"data-tight\": node.attrs.tight ? \"true\" : null\n }, 0];\n }\n },\n list_item: {\n content: \"paragraph block*\",\n defining: true,\n parseDOM: [{\n tag: \"li\"\n }],\n toDOM: function toDOM() {\n return [\"li\", 0];\n }\n },\n text: {\n group: \"inline\"\n },\n image: {\n inline: true,\n attrs: {\n src: {},\n alt: {\n \"default\": null\n },\n title: {\n \"default\": null\n }\n },\n group: \"inline\",\n draggable: true,\n parseDOM: [{\n tag: \"img[src]\",\n getAttrs: function getAttrs(dom) {\n return {\n src: dom.getAttribute(\"src\"),\n title: dom.getAttribute(\"title\"),\n alt: dom.getAttribute(\"alt\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"img\", node.attrs];\n }\n },\n hard_break: {\n inline: true,\n group: \"inline\",\n selectable: false,\n parseDOM: [{\n tag: \"br\"\n }],\n toDOM: function toDOM() {\n return [\"br\"];\n }\n }\n },\n marks: {\n em: {\n parseDOM: [{\n tag: \"i\"\n }, {\n tag: \"em\"\n }, {\n style: \"font-style\",\n getAttrs: function getAttrs(value) {\n return value == \"italic\" && null;\n }\n }],\n toDOM: function toDOM() {\n return [\"em\"];\n }\n },\n strong: {\n parseDOM: [{\n tag: \"b\"\n }, {\n tag: \"strong\"\n }, {\n style: \"font-weight\",\n getAttrs: function getAttrs(value) {\n return /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null;\n }\n }],\n toDOM: function toDOM() {\n return [\"strong\"];\n }\n },\n link: {\n attrs: {\n href: {},\n title: {\n \"default\": null\n }\n },\n inclusive: false,\n parseDOM: [{\n tag: \"a[href]\",\n getAttrs: function getAttrs(dom) {\n return {\n href: dom.getAttribute(\"href\"),\n title: dom.getAttribute(\"title\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"a\", node.attrs];\n }\n },\n code: {\n parseDOM: [{\n tag: \"code\"\n }],\n toDOM: function toDOM() {\n return [\"code\"];\n }\n }\n }\n});\n\nfunction maybeMerge(a, b) {\n if (a.isText && b.isText && prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(a.marks, b.marks)) {\n return a.withText(a.text + b.text);\n }\n} // Object used to track the context of a running parse.\n\n\nvar MarkdownParseState = function MarkdownParseState(schema, tokenHandlers) {\n this.schema = schema;\n this.stack = [{\n type: schema.topNodeType,\n content: []\n }];\n this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none;\n this.tokenHandlers = tokenHandlers;\n};\n\nMarkdownParseState.prototype.top = function top() {\n return this.stack[this.stack.length - 1];\n};\n\nMarkdownParseState.prototype.push = function push(elt) {\n if (this.stack.length) {\n this.top().content.push(elt);\n }\n}; // : (string)\n// Adds the given text to the current position in the document,\n// using the current marks as styling.\n\n\nMarkdownParseState.prototype.addText = function addText(text) {\n if (!text) {\n return;\n }\n\n var nodes = this.top().content,\n last = nodes[nodes.length - 1];\n var node = this.schema.text(text, this.marks),\n merged;\n\n if (last && (merged = maybeMerge(last, node))) {\n nodes[nodes.length - 1] = merged;\n } else {\n nodes.push(node);\n }\n}; // : (Mark)\n// Adds the given mark to the set of active marks.\n\n\nMarkdownParseState.prototype.openMark = function openMark(mark) {\n this.marks = mark.addToSet(this.marks);\n}; // : (Mark)\n// Removes the given mark from the set of active marks.\n\n\nMarkdownParseState.prototype.closeMark = function closeMark(mark) {\n this.marks = mark.removeFromSet(this.marks);\n};\n\nMarkdownParseState.prototype.parseTokens = function parseTokens(toks) {\n for (var i = 0; i < toks.length; i++) {\n var tok = toks[i];\n var handler = this.tokenHandlers[tok.type];\n\n if (!handler) {\n throw new Error(\"Token type `\" + tok.type + \"` not supported by Markdown parser\");\n }\n\n handler(this, tok);\n }\n}; // : (NodeType, ?Object, ?[Node]) → ?Node\n// Add a node at the current position.\n\n\nMarkdownParseState.prototype.addNode = function addNode(type, attrs, content) {\n var node = type.createAndFill(attrs, content, this.marks);\n\n if (!node) {\n return null;\n }\n\n this.push(node);\n return node;\n}; // : (NodeType, ?Object)\n// Wrap subsequent content in a node of the given type.\n\n\nMarkdownParseState.prototype.openNode = function openNode(type, attrs) {\n this.stack.push({\n type: type,\n attrs: attrs,\n content: []\n });\n}; // : () → ?Node\n// Close and return the node that is currently on top of the stack.\n\n\nMarkdownParseState.prototype.closeNode = function closeNode() {\n if (this.marks.length) {\n this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none;\n }\n\n var info = this.stack.pop();\n return this.addNode(info.type, info.attrs, info.content);\n};\n\nfunction attrs(spec, token) {\n if (spec.getAttrs) {\n return spec.getAttrs(token);\n } // For backwards compatibility when `attrs` is a Function\n else if (spec.attrs instanceof Function) {\n return spec.attrs(token);\n } else {\n return spec.attrs;\n }\n} // Code content is represented as a single token with a `content`\n// property in Markdown-it.\n\n\nfunction noOpenClose(type) {\n return type == \"code_inline\" || type == \"code_block\" || type == \"fence\";\n}\n\nfunction withoutTrailingNewline(str) {\n return str[str.length - 1] == \"\\n\" ? str.slice(0, str.length - 1) : str;\n}\n\nfunction noOp() {}\n\nfunction tokenHandlers(schema, tokens) {\n var handlers = Object.create(null);\n\n var loop = function loop(type) {\n var spec = tokens[type];\n\n if (spec.block) {\n var nodeType = schema.nodeType(spec.block);\n\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openNode(nodeType, attrs(spec, tok));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeNode();\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) {\n return state.openNode(nodeType, attrs(spec, tok));\n };\n\n handlers[type + \"_close\"] = function (state) {\n return state.closeNode();\n };\n }\n } else if (spec.node) {\n var nodeType$1 = schema.nodeType(spec.node);\n\n handlers[type] = function (state, tok) {\n return state.addNode(nodeType$1, attrs(spec, tok));\n };\n } else if (spec.mark) {\n var markType = schema.marks[spec.mark];\n\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openMark(markType.create(attrs(spec, tok)));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeMark(markType);\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) {\n return state.openMark(markType.create(attrs(spec, tok)));\n };\n\n handlers[type + \"_close\"] = function (state) {\n return state.closeMark(markType);\n };\n }\n } else if (spec.ignore) {\n if (noOpenClose(type)) {\n handlers[type] = noOp;\n } else {\n handlers[type + '_open'] = noOp;\n handlers[type + '_close'] = noOp;\n }\n } else {\n throw new RangeError(\"Unrecognized parsing spec \" + JSON.stringify(spec));\n }\n };\n\n for (var type in tokens) {\n loop(type);\n }\n\n handlers.text = function (state, tok) {\n return state.addText(tok.content);\n };\n\n handlers.inline = function (state, tok) {\n return state.parseTokens(tok.children);\n };\n\n handlers.softbreak = handlers.softbreak || function (state) {\n return state.addText(\"\\n\");\n };\n\n return handlers;\n} // ::- A configuration of a Markdown parser. Such a parser uses\n// [markdown-it](https://github.com/markdown-it/markdown-it) to\n// tokenize a file, and then runs the custom rules it is given over\n// the tokens to create a ProseMirror document tree.\n\n\nvar MarkdownParser = function MarkdownParser(schema, tokenizer, tokens) {\n // :: Object The value of the `tokens` object used to construct\n // this parser. Can be useful to copy and modify to base other\n // parsers on.\n this.tokens = tokens;\n this.schema = schema;\n this.tokenizer = tokenizer;\n this.tokenHandlers = tokenHandlers(schema, tokens);\n}; // :: (string) → Node\n// Parse a string as [CommonMark](http://commonmark.org/) markup,\n// and create a ProseMirror document as prescribed by this parser's\n// rules.\n\n\nMarkdownParser.prototype.parse = function parse(text) {\n var state = new MarkdownParseState(this.schema, this.tokenHandlers),\n doc;\n state.parseTokens(this.tokenizer.parse(text, {}));\n\n do {\n doc = state.closeNode();\n } while (state.stack.length);\n\n return doc;\n}; // :: MarkdownParser\n// A parser parsing unextended [CommonMark](http://commonmark.org/),\n// without inline HTML, and producing a document in the basic schema.\n\n\nvar defaultMarkdownParser = new MarkdownParser(schema, markdown_it__WEBPACK_IMPORTED_MODULE_1___default()(\"commonmark\", {\n html: false\n}), {\n blockquote: {\n block: \"blockquote\"\n },\n paragraph: {\n block: \"paragraph\"\n },\n list_item: {\n block: \"list_item\"\n },\n bullet_list: {\n block: \"bullet_list\"\n },\n ordered_list: {\n block: \"ordered_list\",\n getAttrs: function getAttrs(tok) {\n return {\n order: +tok.attrGet(\"start\") || 1\n };\n }\n },\n heading: {\n block: \"heading\",\n getAttrs: function getAttrs(tok) {\n return {\n level: +tok.tag.slice(1)\n };\n }\n },\n code_block: {\n block: \"code_block\"\n },\n fence: {\n block: \"code_block\",\n getAttrs: function getAttrs(tok) {\n return {\n params: tok.info || \"\"\n };\n }\n },\n hr: {\n node: \"horizontal_rule\"\n },\n image: {\n node: \"image\",\n getAttrs: function getAttrs(tok) {\n return {\n src: tok.attrGet(\"src\"),\n title: tok.attrGet(\"title\") || null,\n alt: tok.children[0] && tok.children[0].content || null\n };\n }\n },\n hardbreak: {\n node: \"hard_break\"\n },\n em: {\n mark: \"em\"\n },\n strong: {\n mark: \"strong\"\n },\n link: {\n mark: \"link\",\n getAttrs: function getAttrs(tok) {\n return {\n href: tok.attrGet(\"href\"),\n title: tok.attrGet(\"title\") || null\n };\n }\n },\n code_inline: {\n mark: \"code\"\n }\n}); // ::- A specification for serializing a ProseMirror document as\n// Markdown/CommonMark text.\n\nvar MarkdownSerializer = function MarkdownSerializer(nodes, marks) {\n // :: Object<(MarkdownSerializerState, Node)> The node serializer\n // functions for this serializer.\n this.nodes = nodes; // :: Object The mark serializer info.\n\n this.marks = marks;\n}; // :: (Node, ?Object) → string\n// Serialize the content of the given node to\n// [CommonMark](http://commonmark.org/).\n\n\nMarkdownSerializer.prototype.serialize = function serialize(content, options) {\n var state = new MarkdownSerializerState(this.nodes, this.marks, options);\n state.renderContent(content);\n return state.out;\n}; // :: MarkdownSerializer\n// A serializer for the [basic schema](#schema).\n\n\nvar defaultMarkdownSerializer = new MarkdownSerializer({\n blockquote: function blockquote(state, node) {\n state.wrapBlock(\"> \", null, node, function () {\n return state.renderContent(node);\n });\n },\n code_block: function code_block(state, node) {\n state.write(\"```\" + (node.attrs.params || \"\") + \"\\n\");\n state.text(node.textContent, false);\n state.ensureNewLine();\n state.write(\"```\");\n state.closeBlock(node);\n },\n heading: function heading(state, node) {\n state.write(state.repeat(\"#\", node.attrs.level) + \" \");\n state.renderInline(node);\n state.closeBlock(node);\n },\n horizontal_rule: function horizontal_rule(state, node) {\n state.write(node.attrs.markup || \"---\");\n state.closeBlock(node);\n },\n bullet_list: function bullet_list(state, node) {\n state.renderList(node, \" \", function () {\n return (node.attrs.bullet || \"*\") + \" \";\n });\n },\n ordered_list: function ordered_list(state, node) {\n var start = node.attrs.order || 1;\n var maxW = String(start + node.childCount - 1).length;\n var space = state.repeat(\" \", maxW + 2);\n state.renderList(node, space, function (i) {\n var nStr = String(start + i);\n return state.repeat(\" \", maxW - nStr.length) + nStr + \". \";\n });\n },\n list_item: function list_item(state, node) {\n state.renderContent(node);\n },\n paragraph: function paragraph(state, node) {\n state.renderInline(node);\n state.closeBlock(node);\n },\n image: function image(state, node) {\n state.write(\"![\" + state.esc(node.attrs.alt || \"\") + \"](\" + state.esc(node.attrs.src) + (node.attrs.title ? \" \" + state.quote(node.attrs.title) : \"\") + \")\");\n },\n hard_break: function hard_break(state, node, parent, index) {\n for (var i = index + 1; i < parent.childCount; i++) {\n if (parent.child(i).type != node.type) {\n state.write(\"\\\\\\n\");\n return;\n }\n }\n },\n text: function text(state, node) {\n state.text(node.text);\n }\n}, {\n em: {\n open: \"*\",\n close: \"*\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n strong: {\n open: \"**\",\n close: \"**\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n link: {\n open: function open(_state, mark, parent, index) {\n return isPlainURL(mark, parent, index, 1) ? \"<\" : \"[\";\n },\n close: function close(state, mark, parent, index) {\n return isPlainURL(mark, parent, index, -1) ? \">\" : \"](\" + state.esc(mark.attrs.href) + (mark.attrs.title ? \" \" + state.quote(mark.attrs.title) : \"\") + \")\";\n }\n },\n code: {\n open: function open(_state, _mark, parent, index) {\n return backticksFor(parent.child(index), -1);\n },\n close: function close(_state, _mark, parent, index) {\n return backticksFor(parent.child(index - 1), 1);\n },\n escape: false\n }\n});\n\nfunction backticksFor(node, side) {\n var ticks = /`+/g,\n m,\n len = 0;\n\n if (node.isText) {\n while (m = ticks.exec(node.text)) {\n len = Math.max(len, m[0].length);\n }\n }\n\n var result = len > 0 && side > 0 ? \" `\" : \"`\";\n\n for (var i = 0; i < len; i++) {\n result += \"`\";\n }\n\n if (len > 0 && side < 0) {\n result += \" \";\n }\n\n return result;\n}\n\nfunction isPlainURL(link, parent, index, side) {\n if (link.attrs.title || !/^\\w+:/.test(link.attrs.href)) {\n return false;\n }\n\n var content = parent.child(index + (side < 0 ? -1 : 0));\n\n if (!content.isText || content.text != link.attrs.href || content.marks[content.marks.length - 1] != link) {\n return false;\n }\n\n if (index == (side < 0 ? 1 : parent.childCount - 1)) {\n return true;\n }\n\n var next = parent.child(index + (side < 0 ? -2 : 1));\n return !link.isInSet(next.marks);\n} // ::- This is an object used to track state and expose\n// methods related to markdown serialization. Instances are passed to\n// node and mark serialization methods (see `toMarkdown`).\n\n\nvar MarkdownSerializerState = function MarkdownSerializerState(nodes, marks, options) {\n this.nodes = nodes;\n this.marks = marks;\n this.delim = this.out = \"\";\n this.closed = false;\n this.inTightList = false; // :: Object\n // The options passed to the serializer.\n // tightLists:: ?bool\n // Whether to render lists in a tight style. This can be overridden\n // on a node level by specifying a tight attribute on the node.\n // Defaults to false.\n\n this.options = options || {};\n\n if (typeof this.options.tightLists == \"undefined\") {\n this.options.tightLists = false;\n }\n};\n\nMarkdownSerializerState.prototype.flushClose = function flushClose(size) {\n if (this.closed) {\n if (!this.atBlank()) {\n this.out += \"\\n\";\n }\n\n if (size == null) {\n size = 2;\n }\n\n if (size > 1) {\n var delimMin = this.delim;\n var trim = /\\s+$/.exec(delimMin);\n\n if (trim) {\n delimMin = delimMin.slice(0, delimMin.length - trim[0].length);\n }\n\n for (var i = 1; i < size; i++) {\n this.out += delimMin + \"\\n\";\n }\n }\n\n this.closed = false;\n }\n}; // :: (string, ?string, Node, ())\n// Render a block, prefixing each line with `delim`, and the first\n// line in `firstDelim`. `node` should be the node that is closed at\n// the end of the block, and `f` is a function that renders the\n// content of the block.\n\n\nMarkdownSerializerState.prototype.wrapBlock = function wrapBlock(delim, firstDelim, node, f) {\n var old = this.delim;\n this.write(firstDelim || delim);\n this.delim += delim;\n f();\n this.delim = old;\n this.closeBlock(node);\n};\n\nMarkdownSerializerState.prototype.atBlank = function atBlank() {\n return /(^|\\n)$/.test(this.out);\n}; // :: ()\n// Ensure the current content ends with a newline.\n\n\nMarkdownSerializerState.prototype.ensureNewLine = function ensureNewLine() {\n if (!this.atBlank()) {\n this.out += \"\\n\";\n }\n}; // :: (?string)\n// Prepare the state for writing output (closing closed paragraphs,\n// adding delimiters, and so on), and then optionally add content\n// (unescaped) to the output.\n\n\nMarkdownSerializerState.prototype.write = function write(content) {\n this.flushClose();\n\n if (this.delim && this.atBlank()) {\n this.out += this.delim;\n }\n\n if (content) {\n this.out += content;\n }\n}; // :: (Node)\n// Close the block for the given node.\n\n\nMarkdownSerializerState.prototype.closeBlock = function closeBlock(node) {\n this.closed = node;\n}; // :: (string, ?bool)\n// Add the given text to the document. When escape is not `false`,\n// it will be escaped.\n\n\nMarkdownSerializerState.prototype.text = function text(text$1, escape) {\n var lines = text$1.split(\"\\n\");\n\n for (var i = 0; i < lines.length; i++) {\n var startOfLine = this.atBlank() || this.closed;\n this.write();\n this.out += escape !== false ? this.esc(lines[i], startOfLine) : lines[i];\n\n if (i != lines.length - 1) {\n this.out += \"\\n\";\n }\n }\n}; // :: (Node)\n// Render the given node as a block.\n\n\nMarkdownSerializerState.prototype.render = function render(node, parent, index) {\n if (typeof parent == \"number\") {\n throw new Error(\"!\");\n }\n\n this.nodes[node.type.name](this, node, parent, index);\n}; // :: (Node)\n// Render the contents of `parent` as block nodes.\n\n\nMarkdownSerializerState.prototype.renderContent = function renderContent(parent) {\n var this$1 = this;\n parent.forEach(function (node, _, i) {\n return this$1.render(node, parent, i);\n });\n}; // :: (Node)\n// Render the contents of `parent` as inline content.\n\n\nMarkdownSerializerState.prototype.renderInline = function renderInline(parent) {\n var this$1 = this;\n var active = [],\n trailing = \"\";\n\n var progress = function progress(node, _, index) {\n var marks = node ? node.marks : []; // Remove marks from `hard_break` that are the last node inside\n // that mark to prevent parser edge cases with new lines just\n // before closing marks.\n // (FIXME it'd be nice if we had a schema-agnostic way to\n // identify nodes that serialize as hard breaks)\n\n if (node && node.type.name === \"hard_break\") {\n marks = marks.filter(function (m) {\n if (index + 1 == parent.childCount) {\n return false;\n }\n\n var next = parent.child(index + 1);\n return m.isInSet(next.marks) && (!next.isText || /\\S/.test(next.text));\n });\n }\n\n var leading = trailing;\n trailing = \"\"; // If whitespace has to be expelled from the node, adjust\n // leading and trailing accordingly.\n\n if (node && node.isText && marks.some(function (mark) {\n var info = this$1.marks[mark.type.name];\n return info && info.expelEnclosingWhitespace;\n })) {\n var ref = /^(\\s*)(.*?)(\\s*)$/m.exec(node.text);\n var _$1 = ref[0];\n var lead = ref[1];\n var inner$1 = ref[2];\n var trail = ref[3];\n leading += lead;\n trailing = trail;\n\n if (lead || trail) {\n node = inner$1 ? node.withText(inner$1) : null;\n\n if (!node) {\n marks = active;\n }\n }\n }\n\n var inner = marks.length && marks[marks.length - 1],\n noEsc = inner && this$1.marks[inner.type.name].escape === false;\n var len = marks.length - (noEsc ? 1 : 0); // Try to reorder 'mixable' marks, such as em and strong, which\n // in Markdown may be opened and closed in different order, so\n // that order of the marks for the token matches the order in\n // active.\n\n outer: for (var i = 0; i < len; i++) {\n var mark = marks[i];\n\n if (!this$1.marks[mark.type.name].mixable) {\n break;\n }\n\n for (var j = 0; j < active.length; j++) {\n var other = active[j];\n\n if (!this$1.marks[other.type.name].mixable) {\n break;\n }\n\n if (mark.eq(other)) {\n if (i > j) {\n marks = marks.slice(0, j).concat(mark).concat(marks.slice(j, i)).concat(marks.slice(i + 1, len));\n } else if (j > i) {\n marks = marks.slice(0, i).concat(marks.slice(i + 1, j)).concat(mark).concat(marks.slice(j, len));\n }\n\n continue outer;\n }\n }\n } // Find the prefix of the mark set that didn't change\n\n\n var keep = 0;\n\n while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep])) {\n ++keep;\n } // Close the marks that need to be closed\n\n\n while (keep < active.length) {\n this$1.text(this$1.markString(active.pop(), false, parent, index), false);\n } // Output any previously expelled trailing whitespace outside the marks\n\n\n if (leading) {\n this$1.text(leading);\n } // Open the marks that need to be opened\n\n\n if (node) {\n while (active.length < len) {\n var add = marks[active.length];\n active.push(add);\n this$1.text(this$1.markString(add, true, parent, index), false);\n } // Render the node. Special case code marks, since their content\n // may not be escaped.\n\n\n if (noEsc && node.isText) {\n this$1.text(this$1.markString(inner, true, parent, index) + node.text + this$1.markString(inner, false, parent, index + 1), false);\n } else {\n this$1.render(node, parent, index);\n }\n }\n };\n\n parent.forEach(progress);\n progress(null, null, parent.childCount);\n}; // :: (Node, string, (number) → string)\n// Render a node's content as a list. `delim` should be the extra\n// indentation added to all lines except the first in an item,\n// `firstDelim` is a function going from an item index to a\n// delimiter for the first line of the item.\n\n\nMarkdownSerializerState.prototype.renderList = function renderList(node, delim, firstDelim) {\n var this$1 = this;\n\n if (this.closed && this.closed.type == node.type) {\n this.flushClose(3);\n } else if (this.inTightList) {\n this.flushClose(1);\n }\n\n var isTight = typeof node.attrs.tight != \"undefined\" ? node.attrs.tight : this.options.tightLists;\n var prevTight = this.inTightList;\n this.inTightList = isTight;\n node.forEach(function (child, _, i) {\n if (i && isTight) {\n this$1.flushClose(1);\n }\n\n this$1.wrapBlock(delim, firstDelim(i), node, function () {\n return this$1.render(child, node, i);\n });\n });\n this.inTightList = prevTight;\n}; // :: (string, ?bool) → string\n// Escape the given string so that it can safely appear in Markdown\n// content. If `startOfLine` is true, also escape characters that\n// has special meaning only at the start of the line.\n\n\nMarkdownSerializerState.prototype.esc = function esc(str, startOfLine) {\n str = str.replace(/[`*\\\\~\\[\\]]/g, \"\\\\$&\");\n\n if (startOfLine) {\n str = str.replace(/^[:#\\-*+]/, \"\\\\$&\").replace(/^(\\d+)\\./, \"$1\\\\.\");\n }\n\n return str;\n};\n\nMarkdownSerializerState.prototype.quote = function quote(str) {\n var wrap = str.indexOf('\"') == -1 ? '\"\"' : str.indexOf(\"'\") == -1 ? \"''\" : \"()\";\n return wrap[0] + str + wrap[1];\n}; // :: (string, number) → string\n// Repeat the given string `n` times.\n\n\nMarkdownSerializerState.prototype.repeat = function repeat(str, n) {\n var out = \"\";\n\n for (var i = 0; i < n; i++) {\n out += str;\n }\n\n return out;\n}; // : (Mark, bool, string?) → string\n// Get the markdown string for a given opening or closing mark.\n\n\nMarkdownSerializerState.prototype.markString = function markString(mark, open, parent, index) {\n var info = this.marks[mark.type.name];\n var value = open ? info.open : info.close;\n return typeof value == \"string\" ? value : value(this, mark, parent, index);\n}; // :: (string) → { leading: ?string, trailing: ?string }\n// Get leading and trailing whitespace from a string. Values of\n// leading or trailing property of the return object will be undefined\n// if there is no match.\n\n\nMarkdownSerializerState.prototype.getEnclosingWhitespace = function getEnclosingWhitespace(text) {\n return {\n leading: (text.match(/^(\\s+)/) || [])[0],\n trailing: (text.match(/(\\s+)$/) || [])[0]\n };\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-markdown/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-menu/dist/index.es.js": /*!********************************************************!*\ !*** ./node_modules/prosemirror-menu/dist/index.es.js ***! \********************************************************/ /*! exports provided: Dropdown, DropdownSubmenu, MenuItem, blockTypeItem, icons, joinUpItem, liftItem, menuBar, redoItem, renderGrouped, selectParentNodeItem, undoItem, wrapItem */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Dropdown\", function() { return Dropdown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DropdownSubmenu\", function() { return DropdownSubmenu; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MenuItem\", function() { return MenuItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blockTypeItem\", function() { return blockTypeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"icons\", function() { return icons; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUpItem\", function() { return joinUpItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftItem\", function() { return liftItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"menuBar\", function() { return menuBar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoItem\", function() { return redoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderGrouped\", function() { return renderGrouped; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNodeItem\", function() { return selectParentNodeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoItem\", function() { return undoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapItem\", function() { return wrapItem; });\n/* harmony import */ var crel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crel */ \"./node_modules/crel/crel.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n\n\nvar SVG = \"http://www.w3.org/2000/svg\";\nvar XLINK = \"http://www.w3.org/1999/xlink\";\n\nvar prefix = \"ProseMirror-icon\";\n\nfunction hashPath(path) {\n var hash = 0;\n for (var i = 0; i < path.length; i++)\n { hash = (((hash << 5) - hash) + path.charCodeAt(i)) | 0; }\n return hash\n}\n\nfunction getIcon(icon) {\n var node = document.createElement(\"div\");\n node.className = prefix;\n if (icon.path) {\n var name = \"pm-icon-\" + hashPath(icon.path).toString(16);\n if (!document.getElementById(name)) { buildSVG(name, icon); }\n var svg = node.appendChild(document.createElementNS(SVG, \"svg\"));\n svg.style.width = (icon.width / icon.height) + \"em\";\n var use = svg.appendChild(document.createElementNS(SVG, \"use\"));\n use.setAttributeNS(XLINK, \"href\", /([^#]*)/.exec(document.location)[1] + \"#\" + name);\n } else if (icon.dom) {\n node.appendChild(icon.dom.cloneNode(true));\n } else {\n node.appendChild(document.createElement(\"span\")).textContent = icon.text || '';\n if (icon.css) { node.firstChild.style.cssText = icon.css; }\n }\n return node\n}\n\nfunction buildSVG(name, data) {\n var collection = document.getElementById(prefix + \"-collection\");\n if (!collection) {\n collection = document.createElementNS(SVG, \"svg\");\n collection.id = prefix + \"-collection\";\n collection.style.display = \"none\";\n document.body.insertBefore(collection, document.body.firstChild);\n }\n var sym = document.createElementNS(SVG, \"symbol\");\n sym.id = name;\n sym.setAttribute(\"viewBox\", \"0 0 \" + data.width + \" \" + data.height);\n var path = sym.appendChild(document.createElementNS(SVG, \"path\"));\n path.setAttribute(\"d\", data.path);\n collection.appendChild(sym);\n}\n\nvar prefix$1 = \"ProseMirror-menu\";\n\n// ::- An icon or label that, when clicked, executes a command.\nvar MenuItem = function MenuItem(spec) {\n // :: MenuItemSpec\n // The spec used to create the menu item.\n this.spec = spec;\n};\n\n// :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the icon according to its [display\n// spec](#menu.MenuItemSpec.display), and adds an event handler which\n// executes the command when the representation is clicked.\nMenuItem.prototype.render = function render (view) {\n var spec = this.spec;\n var dom = spec.render ? spec.render(view)\n : spec.icon ? getIcon(spec.icon)\n : spec.label ? Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", null, translate(view, spec.label))\n : null;\n if (!dom) { throw new RangeError(\"MenuItem without icon or label property\") }\n if (spec.title) {\n var title = (typeof spec.title === \"function\" ? spec.title(view.state) : spec.title);\n dom.setAttribute(\"title\", translate(view, title));\n }\n if (spec.class) { dom.classList.add(spec.class); }\n if (spec.css) { dom.style.cssText += spec.css; }\n\n dom.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n if (!dom.classList.contains(prefix$1 + \"-disabled\"))\n { spec.run(view.state, view.dispatch, view, e); }\n });\n\n function update(state) {\n if (spec.select) {\n var selected = spec.select(state);\n dom.style.display = selected ? \"\" : \"none\";\n if (!selected) { return false }\n }\n var enabled = true;\n if (spec.enable) {\n enabled = spec.enable(state) || false;\n setClass(dom, prefix$1 + \"-disabled\", !enabled);\n }\n if (spec.active) {\n var active = enabled && spec.active(state) || false;\n setClass(dom, prefix$1 + \"-active\", active);\n }\n return true\n }\n\n return {dom: dom, update: update}\n};\n\nfunction translate(view, text) {\n return view._props.translate ? view._props.translate(text) : text\n}\n\n// MenuItemSpec:: interface\n// The configuration object passed to the `MenuItem` constructor.\n//\n// run:: (EditorState, (Transaction), EditorView, dom.Event)\n// The function to execute when the menu item is activated.\n//\n// select:: ?(EditorState) → bool\n// Optional function that is used to determine whether the item is\n// appropriate at the moment. Deselected items will be hidden.\n//\n// enable:: ?(EditorState) → bool\n// Function that is used to determine if the item is enabled. If\n// given and returning false, the item will be given a disabled\n// styling.\n//\n// active:: ?(EditorState) → bool\n// A predicate function to determine whether the item is 'active' (for\n// example, the item for toggling the strong mark might be active then\n// the cursor is in strong text).\n//\n// render:: ?(EditorView) → dom.Node\n// A function that renders the item. You must provide either this,\n// [`icon`](#menu.MenuItemSpec.icon), or [`label`](#MenuItemSpec.label).\n//\n// icon:: ?Object\n// Describes an icon to show for this item. The object may specify\n// an SVG icon, in which case its `path` property should be an [SVG\n// path\n// spec](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d),\n// and `width` and `height` should provide the viewbox in which that\n// path exists. Alternatively, it may have a `text` property\n// specifying a string of text that makes up the icon, with an\n// optional `css` property giving additional CSS styling for the\n// text. _Or_ it may contain `dom` property containing a DOM node.\n//\n// label:: ?string\n// Makes the item show up as a text label. Mostly useful for items\n// wrapped in a [drop-down](#menu.Dropdown) or similar menu. The object\n// should have a `label` property providing the text to display.\n//\n// title:: ?union\n// Defines DOM title (mouseover) text for the item.\n//\n// class:: ?string\n// Optionally adds a CSS class to the item's DOM representation.\n//\n// css:: ?string\n// Optionally adds a string of inline CSS to the item's DOM\n// representation.\n\nvar lastMenuEvent = {time: 0, node: null};\nfunction markMenuEvent(e) {\n lastMenuEvent.time = Date.now();\n lastMenuEvent.node = e.target;\n}\nfunction isMenuEvent(wrapper) {\n return Date.now() - 100 < lastMenuEvent.time &&\n lastMenuEvent.node && wrapper.contains(lastMenuEvent.node)\n}\n\n// ::- A drop-down menu, displayed as a label with a downwards-pointing\n// triangle to the right of it.\nvar Dropdown = function Dropdown(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n};\n\n// :: (EditorView) → {dom: dom.Node, update: (EditorState)}\n// Render the dropdown menu and sub-items.\nDropdown.prototype.render = function render (view) {\n var this$1 = this;\n\n var content = renderDropdownItems(this.content, view);\n\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-dropdown \" + (this.options.class || \"\"),\n style: this.options.css},\n translate(view, this.options.label));\n if (this.options.title) { label.setAttribute(\"title\", translate(view, this.options.title)); }\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-dropdown-wrap\"}, label);\n var open = null, listeningOnClose = null;\n var close = function () {\n if (open && open.close()) {\n open = null;\n window.removeEventListener(\"mousedown\", listeningOnClose);\n }\n };\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n if (open) {\n close();\n } else {\n open = this$1.expand(wrap, content.dom);\n window.addEventListener(\"mousedown\", listeningOnClose = function () {\n if (!isMenuEvent(wrap)) { close(); }\n });\n }\n });\n\n function update(state) {\n var inner = content.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner\n }\n\n return {dom: wrap, update: update}\n};\n\nDropdown.prototype.expand = function expand (dom, items) {\n var menuDOM = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-dropdown-menu \" + (this.options.class || \"\")}, items);\n\n var done = false;\n function close() {\n if (done) { return }\n done = true;\n dom.removeChild(menuDOM);\n return true\n }\n dom.appendChild(menuDOM);\n return {close: close, node: menuDOM}\n};\n\nfunction renderDropdownItems(items, view) {\n var rendered = [], updates = [];\n for (var i = 0; i < items.length; i++) {\n var ref = items[i].render(view);\n var dom = ref.dom;\n var update = ref.update;\n rendered.push(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-dropdown-item\"}, dom));\n updates.push(update);\n }\n return {dom: rendered, update: combineUpdates(updates, rendered)}\n}\n\nfunction combineUpdates(updates, nodes) {\n return function (state) {\n var something = false;\n for (var i = 0; i < updates.length; i++) {\n var up = updates[i](state);\n nodes[i].style.display = up ? \"\" : \"none\";\n if (up) { something = true; }\n }\n return something\n }\n}\n\n// ::- Represents a submenu wrapping a group of elements that start\n// hidden and expand to the right when hovered over or tapped.\nvar DropdownSubmenu = function DropdownSubmenu(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n};\n\n// :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the submenu.\nDropdownSubmenu.prototype.render = function render (view) {\n var items = renderDropdownItems(this.content, view);\n\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-submenu-label\"}, translate(view, this.options.label));\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-submenu-wrap\"}, label,\n Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$1 + \"-submenu\"}, items.dom));\n var listeningOnClose = null;\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n setClass(wrap, prefix$1 + \"-submenu-wrap-active\");\n if (!listeningOnClose)\n { window.addEventListener(\"mousedown\", listeningOnClose = function () {\n if (!isMenuEvent(wrap)) {\n wrap.classList.remove(prefix$1 + \"-submenu-wrap-active\");\n window.removeEventListener(\"mousedown\", listeningOnClose);\n listeningOnClose = null;\n }\n }); }\n });\n\n function update(state) {\n var inner = items.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner\n }\n return {dom: wrap, update: update}\n};\n\n// :: (EditorView, [union]) → {dom: ?dom.DocumentFragment, update: (EditorState) → bool}\n// Render the given, possibly nested, array of menu elements into a\n// document fragment, placing separators between them (and ensuring no\n// superfluous separators appear when some of the groups turn out to\n// be empty).\nfunction renderGrouped(view, content) {\n var result = document.createDocumentFragment();\n var updates = [], separators = [];\n for (var i = 0; i < content.length; i++) {\n var items = content[i], localUpdates = [], localNodes = [];\n for (var j = 0; j < items.length; j++) {\n var ref = items[j].render(view);\n var dom = ref.dom;\n var update$1 = ref.update;\n var span = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {class: prefix$1 + \"item\"}, dom);\n result.appendChild(span);\n localNodes.push(span);\n localUpdates.push(update$1);\n }\n if (localUpdates.length) {\n updates.push(combineUpdates(localUpdates, localNodes));\n if (i < content.length - 1)\n { separators.push(result.appendChild(separator())); }\n }\n }\n\n function update(state) {\n var something = false, needSep = false;\n for (var i = 0; i < updates.length; i++) {\n var hasContent = updates[i](state);\n if (i) { separators[i - 1].style.display = needSep && hasContent ? \"\" : \"none\"; }\n needSep = hasContent;\n if (hasContent) { something = true; }\n }\n return something\n }\n return {dom: result, update: update}\n}\n\nfunction separator() {\n return Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {class: prefix$1 + \"separator\"})\n}\n\n// :: Object\n// A set of basic editor-related icons. Contains the properties\n// `join`, `lift`, `selectParentNode`, `undo`, `redo`, `strong`, `em`,\n// `code`, `link`, `bulletList`, `orderedList`, and `blockquote`, each\n// holding an object that can be used as the `icon` option to\n// `MenuItem`.\nvar icons = {\n join: {\n width: 800, height: 900,\n path: \"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z\"\n },\n lift: {\n width: 1024, height: 1024,\n path: \"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z\"\n },\n selectParentNode: {text: \"\\u2b1a\", css: \"font-weight: bold\"},\n undo: {\n width: 1024, height: 1024,\n path: \"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z\"\n },\n redo: {\n width: 1024, height: 1024,\n path: \"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z\"\n },\n strong: {\n width: 805, height: 1024,\n path: \"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z\"\n },\n em: {\n width: 585, height: 1024,\n path: \"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z\"\n },\n code: {\n width: 896, height: 1024,\n path: \"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z\"\n },\n link: {\n width: 951, height: 1024,\n path: \"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z\"\n },\n bulletList: {\n width: 768, height: 896,\n path: \"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z\"\n },\n orderedList: {\n width: 768, height: 896,\n path: \"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z\"\n },\n blockquote: {\n width: 640, height: 896,\n path: \"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z\"\n }\n};\n\n// :: MenuItem\n// Menu item for the `joinUp` command.\nvar joinUpItem = new MenuItem({\n title: \"Join with above block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"],\n select: function (state) { return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"])(state); },\n icon: icons.join\n});\n\n// :: MenuItem\n// Menu item for the `lift` command.\nvar liftItem = new MenuItem({\n title: \"Lift out of enclosing block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"],\n select: function (state) { return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"])(state); },\n icon: icons.lift\n});\n\n// :: MenuItem\n// Menu item for the `selectParentNode` command.\nvar selectParentNodeItem = new MenuItem({\n title: \"Select parent node\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"],\n select: function (state) { return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"])(state); },\n icon: icons.selectParentNode\n});\n\n// :: MenuItem\n// Menu item for the `undo` command.\nvar undoItem = new MenuItem({\n title: \"Undo last change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"],\n enable: function (state) { return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"])(state); },\n icon: icons.undo\n});\n\n// :: MenuItem\n// Menu item for the `redo` command.\nvar redoItem = new MenuItem({\n title: \"Redo last undone change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"],\n enable: function (state) { return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"])(state); },\n icon: icons.redo\n});\n\n// :: (NodeType, Object) → MenuItem\n// Build a menu item for wrapping the selection in a given node type.\n// Adds `run` and `select` properties to the ones present in\n// `options`. `options.attrs` may be an object or a function.\nfunction wrapItem(nodeType, options) {\n var passedOptions = {\n run: function run(state, dispatch) {\n // FIXME if (options.attrs instanceof Function) options.attrs(state, attrs => wrapIn(nodeType, attrs)(state))\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs)(state, dispatch)\n },\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs instanceof Function ? null : options.attrs)(state)\n }\n };\n for (var prop in options) { passedOptions[prop] = options[prop]; }\n return new MenuItem(passedOptions)\n}\n\n// :: (NodeType, Object) → MenuItem\n// Build a menu item for changing the type of the textblock around the\n// selection to the given type. Provides `run`, `active`, and `select`\n// properties. Others must be given in `options`. `options.attrs` may\n// be an object to provide the attributes for the textblock node.\nfunction blockTypeItem(nodeType, options) {\n var command = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"setBlockType\"])(nodeType, options.attrs);\n var passedOptions = {\n run: command,\n enable: function enable(state) { return command(state) },\n active: function active(state) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var node = ref.node;\n if (node) { return node.hasMarkup(nodeType, options.attrs) }\n return to <= $from.end() && $from.parent.hasMarkup(nodeType, options.attrs)\n }\n };\n for (var prop in options) { passedOptions[prop] = options[prop]; }\n return new MenuItem(passedOptions)\n}\n\n// Work around classList.toggle being broken in IE11\nfunction setClass(dom, cls, on) {\n if (on) { dom.classList.add(cls); }\n else { dom.classList.remove(cls); }\n}\n\nvar prefix$2 = \"ProseMirror-menubar\";\n\nfunction isIOS() {\n if (typeof navigator == \"undefined\") { return false }\n var agent = navigator.userAgent;\n return !/Edge\\/\\d/.test(agent) && /AppleWebKit/.test(agent) && /Mobile\\/\\w+/.test(agent)\n}\n\n// :: (Object) → Plugin\n// A plugin that will place a menu bar above the editor. Note that\n// this involves wrapping the editor in an additional `
`.\n//\n// options::-\n// Supports the following options:\n//\n// content:: [[MenuElement]]\n// Provides the content of the menu, as a nested array to be\n// passed to `renderGrouped`.\n//\n// floating:: ?bool\n// Determines whether the menu floats, i.e. whether it sticks to\n// the top of the viewport when the editor is partially scrolled\n// out of view.\nfunction menuBar(options) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n view: function view(editorView) { return new MenuBarView(editorView, options) }\n })\n}\n\nvar MenuBarView = function MenuBarView(editorView, options) {\n var this$1 = this;\n\n this.editorView = editorView;\n this.options = options;\n\n this.wrapper = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$2 + \"-wrapper\"});\n this.menu = this.wrapper.appendChild(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$2}));\n this.menu.className = prefix$2;\n this.spacer = null;\n\n editorView.dom.parentNode.replaceChild(this.wrapper, editorView.dom);\n this.wrapper.appendChild(editorView.dom);\n\n this.maxHeight = 0;\n this.widthForMaxHeight = 0;\n this.floating = false;\n\n var ref = renderGrouped(this.editorView, this.options.content);\n var dom = ref.dom;\n var update = ref.update;\n this.contentUpdate = update;\n this.menu.appendChild(dom);\n this.update();\n\n if (options.floating && !isIOS()) {\n this.updateFloat();\n var potentialScrollers = getAllWrapping(this.wrapper);\n this.scrollFunc = function (e) {\n var root = this$1.editorView.root;\n if (!(root.body || root).contains(this$1.wrapper)) {\n potentialScrollers.forEach(function (el) { return el.removeEventListener(\"scroll\", this$1.scrollFunc); });\n } else {\n this$1.updateFloat(e.target.getBoundingClientRect && e.target);\n }\n };\n potentialScrollers.forEach(function (el) { return el.addEventListener('scroll', this$1.scrollFunc); });\n }\n};\n\nMenuBarView.prototype.update = function update () {\n this.contentUpdate(this.editorView.state);\n\n if (this.floating) {\n this.updateScrollCursor();\n } else {\n if (this.menu.offsetWidth != this.widthForMaxHeight) {\n this.widthForMaxHeight = this.menu.offsetWidth;\n this.maxHeight = 0;\n }\n if (this.menu.offsetHeight > this.maxHeight) {\n this.maxHeight = this.menu.offsetHeight;\n this.menu.style.minHeight = this.maxHeight + \"px\";\n }\n }\n};\n\nMenuBarView.prototype.updateScrollCursor = function updateScrollCursor () {\n var selection = this.editorView.root.getSelection();\n if (!selection.focusNode) { return }\n var rects = selection.getRangeAt(0).getClientRects();\n var selRect = rects[selectionIsInverted(selection) ? 0 : rects.length - 1];\n if (!selRect) { return }\n var menuRect = this.menu.getBoundingClientRect();\n if (selRect.top < menuRect.bottom && selRect.bottom > menuRect.top) {\n var scrollable = findWrappingScrollable(this.wrapper);\n if (scrollable) { scrollable.scrollTop -= (menuRect.bottom - selRect.top); }\n }\n};\n\nMenuBarView.prototype.updateFloat = function updateFloat (scrollAncestor) {\n var parent = this.wrapper, editorRect = parent.getBoundingClientRect(),\n top = scrollAncestor ? Math.max(0, scrollAncestor.getBoundingClientRect().top) : 0;\n\n if (this.floating) {\n if (editorRect.top >= top || editorRect.bottom < this.menu.offsetHeight + 10) {\n this.floating = false;\n this.menu.style.position = this.menu.style.left = this.menu.style.top = this.menu.style.width = \"\";\n this.menu.style.display = \"\";\n this.spacer.parentNode.removeChild(this.spacer);\n this.spacer = null;\n } else {\n var border = (parent.offsetWidth - parent.clientWidth) / 2;\n this.menu.style.left = (editorRect.left + border) + \"px\";\n this.menu.style.display = (editorRect.top > window.innerHeight ? \"none\" : \"\");\n if (scrollAncestor) { this.menu.style.top = top + \"px\"; }\n }\n } else {\n if (editorRect.top < top && editorRect.bottom >= this.menu.offsetHeight + 10) {\n this.floating = true;\n var menuRect = this.menu.getBoundingClientRect();\n this.menu.style.left = menuRect.left + \"px\";\n this.menu.style.width = menuRect.width + \"px\";\n if (scrollAncestor) { this.menu.style.top = top + \"px\"; }\n this.menu.style.position = \"fixed\";\n this.spacer = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {class: prefix$2 + \"-spacer\", style: (\"height: \" + (menuRect.height) + \"px\")});\n parent.insertBefore(this.spacer, this.menu);\n }\n }\n};\n\nMenuBarView.prototype.destroy = function destroy () {\n if (this.wrapper.parentNode)\n { this.wrapper.parentNode.replaceChild(this.editorView.dom, this.wrapper); }\n};\n\n// Not precise, but close enough\nfunction selectionIsInverted(selection) {\n if (selection.anchorNode == selection.focusNode) { return selection.anchorOffset > selection.focusOffset }\n return selection.anchorNode.compareDocumentPosition(selection.focusNode) == Node.DOCUMENT_POSITION_FOLLOWING\n}\n\nfunction findWrappingScrollable(node) {\n for (var cur = node.parentNode; cur; cur = cur.parentNode)\n { if (cur.scrollHeight > cur.clientHeight) { return cur } }\n}\n\nfunction getAllWrapping(node) {\n var res = [window];\n for (var cur = node.parentNode; cur; cur = cur.parentNode)\n { res.push(cur); }\n return res\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-menu/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Dropdown\", function() { return Dropdown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DropdownSubmenu\", function() { return DropdownSubmenu; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MenuItem\", function() { return MenuItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blockTypeItem\", function() { return blockTypeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"icons\", function() { return icons; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUpItem\", function() { return joinUpItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftItem\", function() { return liftItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"menuBar\", function() { return menuBar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoItem\", function() { return redoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderGrouped\", function() { return renderGrouped; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNodeItem\", function() { return selectParentNodeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoItem\", function() { return undoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapItem\", function() { return wrapItem; });\n/* harmony import */ var crel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crel */ \"./node_modules/crel/crel.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n\nvar SVG = \"http://www.w3.org/2000/svg\";\nvar XLINK = \"http://www.w3.org/1999/xlink\";\nvar prefix = \"ProseMirror-icon\";\n\nfunction hashPath(path) {\n var hash = 0;\n\n for (var i = 0; i < path.length; i++) {\n hash = (hash << 5) - hash + path.charCodeAt(i) | 0;\n }\n\n return hash;\n}\n\nfunction getIcon(icon) {\n var node = document.createElement(\"div\");\n node.className = prefix;\n\n if (icon.path) {\n var name = \"pm-icon-\" + hashPath(icon.path).toString(16);\n\n if (!document.getElementById(name)) {\n buildSVG(name, icon);\n }\n\n var svg = node.appendChild(document.createElementNS(SVG, \"svg\"));\n svg.style.width = icon.width / icon.height + \"em\";\n var use = svg.appendChild(document.createElementNS(SVG, \"use\"));\n use.setAttributeNS(XLINK, \"href\", /([^#]*)/.exec(document.location)[1] + \"#\" + name);\n } else if (icon.dom) {\n node.appendChild(icon.dom.cloneNode(true));\n } else {\n node.appendChild(document.createElement(\"span\")).textContent = icon.text || '';\n\n if (icon.css) {\n node.firstChild.style.cssText = icon.css;\n }\n }\n\n return node;\n}\n\nfunction buildSVG(name, data) {\n var collection = document.getElementById(prefix + \"-collection\");\n\n if (!collection) {\n collection = document.createElementNS(SVG, \"svg\");\n collection.id = prefix + \"-collection\";\n collection.style.display = \"none\";\n document.body.insertBefore(collection, document.body.firstChild);\n }\n\n var sym = document.createElementNS(SVG, \"symbol\");\n sym.id = name;\n sym.setAttribute(\"viewBox\", \"0 0 \" + data.width + \" \" + data.height);\n var path = sym.appendChild(document.createElementNS(SVG, \"path\"));\n path.setAttribute(\"d\", data.path);\n collection.appendChild(sym);\n}\n\nvar prefix$1 = \"ProseMirror-menu\"; // ::- An icon or label that, when clicked, executes a command.\n\nvar MenuItem = function MenuItem(spec) {\n // :: MenuItemSpec\n // The spec used to create the menu item.\n this.spec = spec;\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the icon according to its [display\n// spec](#menu.MenuItemSpec.display), and adds an event handler which\n// executes the command when the representation is clicked.\n\n\nMenuItem.prototype.render = function render(view) {\n var spec = this.spec;\n var dom = spec.render ? spec.render(view) : spec.icon ? getIcon(spec.icon) : spec.label ? Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", null, translate(view, spec.label)) : null;\n\n if (!dom) {\n throw new RangeError(\"MenuItem without icon or label property\");\n }\n\n if (spec.title) {\n var title = typeof spec.title === \"function\" ? spec.title(view.state) : spec.title;\n dom.setAttribute(\"title\", translate(view, title));\n }\n\n if (spec[\"class\"]) {\n dom.classList.add(spec[\"class\"]);\n }\n\n if (spec.css) {\n dom.style.cssText += spec.css;\n }\n\n dom.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n\n if (!dom.classList.contains(prefix$1 + \"-disabled\")) {\n spec.run(view.state, view.dispatch, view, e);\n }\n });\n\n function update(state) {\n if (spec.select) {\n var selected = spec.select(state);\n dom.style.display = selected ? \"\" : \"none\";\n\n if (!selected) {\n return false;\n }\n }\n\n var enabled = true;\n\n if (spec.enable) {\n enabled = spec.enable(state) || false;\n setClass(dom, prefix$1 + \"-disabled\", !enabled);\n }\n\n if (spec.active) {\n var active = enabled && spec.active(state) || false;\n setClass(dom, prefix$1 + \"-active\", active);\n }\n\n return true;\n }\n\n return {\n dom: dom,\n update: update\n };\n};\n\nfunction translate(view, text) {\n return view._props.translate ? view._props.translate(text) : text;\n} // MenuItemSpec:: interface\n// The configuration object passed to the `MenuItem` constructor.\n//\n// run:: (EditorState, (Transaction), EditorView, dom.Event)\n// The function to execute when the menu item is activated.\n//\n// select:: ?(EditorState) → bool\n// Optional function that is used to determine whether the item is\n// appropriate at the moment. Deselected items will be hidden.\n//\n// enable:: ?(EditorState) → bool\n// Function that is used to determine if the item is enabled. If\n// given and returning false, the item will be given a disabled\n// styling.\n//\n// active:: ?(EditorState) → bool\n// A predicate function to determine whether the item is 'active' (for\n// example, the item for toggling the strong mark might be active then\n// the cursor is in strong text).\n//\n// render:: ?(EditorView) → dom.Node\n// A function that renders the item. You must provide either this,\n// [`icon`](#menu.MenuItemSpec.icon), or [`label`](#MenuItemSpec.label).\n//\n// icon:: ?Object\n// Describes an icon to show for this item. The object may specify\n// an SVG icon, in which case its `path` property should be an [SVG\n// path\n// spec](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d),\n// and `width` and `height` should provide the viewbox in which that\n// path exists. Alternatively, it may have a `text` property\n// specifying a string of text that makes up the icon, with an\n// optional `css` property giving additional CSS styling for the\n// text. _Or_ it may contain `dom` property containing a DOM node.\n//\n// label:: ?string\n// Makes the item show up as a text label. Mostly useful for items\n// wrapped in a [drop-down](#menu.Dropdown) or similar menu. The object\n// should have a `label` property providing the text to display.\n//\n// title:: ?union\n// Defines DOM title (mouseover) text for the item.\n//\n// class:: ?string\n// Optionally adds a CSS class to the item's DOM representation.\n//\n// css:: ?string\n// Optionally adds a string of inline CSS to the item's DOM\n// representation.\n\n\nvar lastMenuEvent = {\n time: 0,\n node: null\n};\n\nfunction markMenuEvent(e) {\n lastMenuEvent.time = Date.now();\n lastMenuEvent.node = e.target;\n}\n\nfunction isMenuEvent(wrapper) {\n return Date.now() - 100 < lastMenuEvent.time && lastMenuEvent.node && wrapper.contains(lastMenuEvent.node);\n} // ::- A drop-down menu, displayed as a label with a downwards-pointing\n// triangle to the right of it.\n\n\nvar Dropdown = function Dropdown(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState)}\n// Render the dropdown menu and sub-items.\n\n\nDropdown.prototype.render = function render(view) {\n var this$1 = this;\n var content = renderDropdownItems(this.content, view);\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown \" + (this.options[\"class\"] || \"\"),\n style: this.options.css\n }, translate(view, this.options.label));\n\n if (this.options.title) {\n label.setAttribute(\"title\", translate(view, this.options.title));\n }\n\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-wrap\"\n }, label);\n var open = null,\n listeningOnClose = null;\n\n var close = function close() {\n if (open && open.close()) {\n open = null;\n window.removeEventListener(\"mousedown\", listeningOnClose);\n }\n };\n\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n\n if (open) {\n close();\n } else {\n open = this$1.expand(wrap, content.dom);\n window.addEventListener(\"mousedown\", listeningOnClose = function listeningOnClose() {\n if (!isMenuEvent(wrap)) {\n close();\n }\n });\n }\n });\n\n function update(state) {\n var inner = content.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner;\n }\n\n return {\n dom: wrap,\n update: update\n };\n};\n\nDropdown.prototype.expand = function expand(dom, items) {\n var menuDOM = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-menu \" + (this.options[\"class\"] || \"\")\n }, items);\n var done = false;\n\n function close() {\n if (done) {\n return;\n }\n\n done = true;\n dom.removeChild(menuDOM);\n return true;\n }\n\n dom.appendChild(menuDOM);\n return {\n close: close,\n node: menuDOM\n };\n};\n\nfunction renderDropdownItems(items, view) {\n var rendered = [],\n updates = [];\n\n for (var i = 0; i < items.length; i++) {\n var ref = items[i].render(view);\n var dom = ref.dom;\n var update = ref.update;\n rendered.push(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-item\"\n }, dom));\n updates.push(update);\n }\n\n return {\n dom: rendered,\n update: combineUpdates(updates, rendered)\n };\n}\n\nfunction combineUpdates(updates, nodes) {\n return function (state) {\n var something = false;\n\n for (var i = 0; i < updates.length; i++) {\n var up = updates[i](state);\n nodes[i].style.display = up ? \"\" : \"none\";\n\n if (up) {\n something = true;\n }\n }\n\n return something;\n };\n} // ::- Represents a submenu wrapping a group of elements that start\n// hidden and expand to the right when hovered over or tapped.\n\n\nvar DropdownSubmenu = function DropdownSubmenu(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the submenu.\n\n\nDropdownSubmenu.prototype.render = function render(view) {\n var items = renderDropdownItems(this.content, view);\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu-label\"\n }, translate(view, this.options.label));\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu-wrap\"\n }, label, Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu\"\n }, items.dom));\n var _listeningOnClose = null;\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n setClass(wrap, prefix$1 + \"-submenu-wrap-active\");\n\n if (!_listeningOnClose) {\n window.addEventListener(\"mousedown\", _listeningOnClose = function listeningOnClose() {\n if (!isMenuEvent(wrap)) {\n wrap.classList.remove(prefix$1 + \"-submenu-wrap-active\");\n window.removeEventListener(\"mousedown\", _listeningOnClose);\n _listeningOnClose = null;\n }\n });\n }\n });\n\n function update(state) {\n var inner = items.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner;\n }\n\n return {\n dom: wrap,\n update: update\n };\n}; // :: (EditorView, [union]) → {dom: ?dom.DocumentFragment, update: (EditorState) → bool}\n// Render the given, possibly nested, array of menu elements into a\n// document fragment, placing separators between them (and ensuring no\n// superfluous separators appear when some of the groups turn out to\n// be empty).\n\n\nfunction renderGrouped(view, content) {\n var result = document.createDocumentFragment();\n var updates = [],\n separators = [];\n\n for (var i = 0; i < content.length; i++) {\n var items = content[i],\n localUpdates = [],\n localNodes = [];\n\n for (var j = 0; j < items.length; j++) {\n var ref = items[j].render(view);\n var dom = ref.dom;\n var update$1 = ref.update;\n var span = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {\n \"class\": prefix$1 + \"item\"\n }, dom);\n result.appendChild(span);\n localNodes.push(span);\n localUpdates.push(update$1);\n }\n\n if (localUpdates.length) {\n updates.push(combineUpdates(localUpdates, localNodes));\n\n if (i < content.length - 1) {\n separators.push(result.appendChild(separator()));\n }\n }\n }\n\n function update(state) {\n var something = false,\n needSep = false;\n\n for (var i = 0; i < updates.length; i++) {\n var hasContent = updates[i](state);\n\n if (i) {\n separators[i - 1].style.display = needSep && hasContent ? \"\" : \"none\";\n }\n\n needSep = hasContent;\n\n if (hasContent) {\n something = true;\n }\n }\n\n return something;\n }\n\n return {\n dom: result,\n update: update\n };\n}\n\nfunction separator() {\n return Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {\n \"class\": prefix$1 + \"separator\"\n });\n} // :: Object\n// A set of basic editor-related icons. Contains the properties\n// `join`, `lift`, `selectParentNode`, `undo`, `redo`, `strong`, `em`,\n// `code`, `link`, `bulletList`, `orderedList`, and `blockquote`, each\n// holding an object that can be used as the `icon` option to\n// `MenuItem`.\n\n\nvar icons = {\n join: {\n width: 800,\n height: 900,\n path: \"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z\"\n },\n lift: {\n width: 1024,\n height: 1024,\n path: \"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z\"\n },\n selectParentNode: {\n text: \"\\u2B1A\",\n css: \"font-weight: bold\"\n },\n undo: {\n width: 1024,\n height: 1024,\n path: \"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z\"\n },\n redo: {\n width: 1024,\n height: 1024,\n path: \"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z\"\n },\n strong: {\n width: 805,\n height: 1024,\n path: \"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z\"\n },\n em: {\n width: 585,\n height: 1024,\n path: \"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z\"\n },\n code: {\n width: 896,\n height: 1024,\n path: \"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z\"\n },\n link: {\n width: 951,\n height: 1024,\n path: \"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z\"\n },\n bulletList: {\n width: 768,\n height: 896,\n path: \"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z\"\n },\n orderedList: {\n width: 768,\n height: 896,\n path: \"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z\"\n },\n blockquote: {\n width: 640,\n height: 896,\n path: \"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z\"\n }\n}; // :: MenuItem\n// Menu item for the `joinUp` command.\n\nvar joinUpItem = new MenuItem({\n title: \"Join with above block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"])(state);\n },\n icon: icons.join\n}); // :: MenuItem\n// Menu item for the `lift` command.\n\nvar liftItem = new MenuItem({\n title: \"Lift out of enclosing block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"])(state);\n },\n icon: icons.lift\n}); // :: MenuItem\n// Menu item for the `selectParentNode` command.\n\nvar selectParentNodeItem = new MenuItem({\n title: \"Select parent node\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"])(state);\n },\n icon: icons.selectParentNode\n}); // :: MenuItem\n// Menu item for the `undo` command.\n\nvar undoItem = new MenuItem({\n title: \"Undo last change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"],\n enable: function enable(state) {\n return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"])(state);\n },\n icon: icons.undo\n}); // :: MenuItem\n// Menu item for the `redo` command.\n\nvar redoItem = new MenuItem({\n title: \"Redo last undone change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"],\n enable: function enable(state) {\n return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"])(state);\n },\n icon: icons.redo\n}); // :: (NodeType, Object) → MenuItem\n// Build a menu item for wrapping the selection in a given node type.\n// Adds `run` and `select` properties to the ones present in\n// `options`. `options.attrs` may be an object or a function.\n\nfunction wrapItem(nodeType, options) {\n var passedOptions = {\n run: function run(state, dispatch) {\n // FIXME if (options.attrs instanceof Function) options.attrs(state, attrs => wrapIn(nodeType, attrs)(state))\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs)(state, dispatch);\n },\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs instanceof Function ? null : options.attrs)(state);\n }\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return new MenuItem(passedOptions);\n} // :: (NodeType, Object) → MenuItem\n// Build a menu item for changing the type of the textblock around the\n// selection to the given type. Provides `run`, `active`, and `select`\n// properties. Others must be given in `options`. `options.attrs` may\n// be an object to provide the attributes for the textblock node.\n\n\nfunction blockTypeItem(nodeType, options) {\n var command = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"setBlockType\"])(nodeType, options.attrs);\n var passedOptions = {\n run: command,\n enable: function enable(state) {\n return command(state);\n },\n active: function active(state) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var node = ref.node;\n\n if (node) {\n return node.hasMarkup(nodeType, options.attrs);\n }\n\n return to <= $from.end() && $from.parent.hasMarkup(nodeType, options.attrs);\n }\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return new MenuItem(passedOptions);\n} // Work around classList.toggle being broken in IE11\n\n\nfunction setClass(dom, cls, on) {\n if (on) {\n dom.classList.add(cls);\n } else {\n dom.classList.remove(cls);\n }\n}\n\nvar prefix$2 = \"ProseMirror-menubar\";\n\nfunction isIOS() {\n if (typeof navigator == \"undefined\") {\n return false;\n }\n\n var agent = navigator.userAgent;\n return !/Edge\\/\\d/.test(agent) && /AppleWebKit/.test(agent) && /Mobile\\/\\w+/.test(agent);\n} // :: (Object) → Plugin\n// A plugin that will place a menu bar above the editor. Note that\n// this involves wrapping the editor in an additional `
`.\n//\n// options::-\n// Supports the following options:\n//\n// content:: [[MenuElement]]\n// Provides the content of the menu, as a nested array to be\n// passed to `renderGrouped`.\n//\n// floating:: ?bool\n// Determines whether the menu floats, i.e. whether it sticks to\n// the top of the viewport when the editor is partially scrolled\n// out of view.\n\n\nfunction menuBar(options) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n view: function view(editorView) {\n return new MenuBarView(editorView, options);\n }\n });\n}\n\nvar MenuBarView = function MenuBarView(editorView, options) {\n var this$1 = this;\n this.editorView = editorView;\n this.options = options;\n this.wrapper = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2 + \"-wrapper\"\n });\n this.menu = this.wrapper.appendChild(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2\n }));\n this.menu.className = prefix$2;\n this.spacer = null;\n editorView.dom.parentNode.replaceChild(this.wrapper, editorView.dom);\n this.wrapper.appendChild(editorView.dom);\n this.maxHeight = 0;\n this.widthForMaxHeight = 0;\n this.floating = false;\n var ref = renderGrouped(this.editorView, this.options.content);\n var dom = ref.dom;\n var update = ref.update;\n this.contentUpdate = update;\n this.menu.appendChild(dom);\n this.update();\n\n if (options.floating && !isIOS()) {\n this.updateFloat();\n var potentialScrollers = getAllWrapping(this.wrapper);\n\n this.scrollFunc = function (e) {\n var root = this$1.editorView.root;\n\n if (!(root.body || root).contains(this$1.wrapper)) {\n potentialScrollers.forEach(function (el) {\n return el.removeEventListener(\"scroll\", this$1.scrollFunc);\n });\n } else {\n this$1.updateFloat(e.target.getBoundingClientRect && e.target);\n }\n };\n\n potentialScrollers.forEach(function (el) {\n return el.addEventListener('scroll', this$1.scrollFunc);\n });\n }\n};\n\nMenuBarView.prototype.update = function update() {\n this.contentUpdate(this.editorView.state);\n\n if (this.floating) {\n this.updateScrollCursor();\n } else {\n if (this.menu.offsetWidth != this.widthForMaxHeight) {\n this.widthForMaxHeight = this.menu.offsetWidth;\n this.maxHeight = 0;\n }\n\n if (this.menu.offsetHeight > this.maxHeight) {\n this.maxHeight = this.menu.offsetHeight;\n this.menu.style.minHeight = this.maxHeight + \"px\";\n }\n }\n};\n\nMenuBarView.prototype.updateScrollCursor = function updateScrollCursor() {\n var selection = this.editorView.root.getSelection();\n\n if (!selection.focusNode) {\n return;\n }\n\n var rects = selection.getRangeAt(0).getClientRects();\n var selRect = rects[selectionIsInverted(selection) ? 0 : rects.length - 1];\n\n if (!selRect) {\n return;\n }\n\n var menuRect = this.menu.getBoundingClientRect();\n\n if (selRect.top < menuRect.bottom && selRect.bottom > menuRect.top) {\n var scrollable = findWrappingScrollable(this.wrapper);\n\n if (scrollable) {\n scrollable.scrollTop -= menuRect.bottom - selRect.top;\n }\n }\n};\n\nMenuBarView.prototype.updateFloat = function updateFloat(scrollAncestor) {\n var parent = this.wrapper,\n editorRect = parent.getBoundingClientRect(),\n top = scrollAncestor ? Math.max(0, scrollAncestor.getBoundingClientRect().top) : 0;\n\n if (this.floating) {\n if (editorRect.top >= top || editorRect.bottom < this.menu.offsetHeight + 10) {\n this.floating = false;\n this.menu.style.position = this.menu.style.left = this.menu.style.top = this.menu.style.width = \"\";\n this.menu.style.display = \"\";\n this.spacer.parentNode.removeChild(this.spacer);\n this.spacer = null;\n } else {\n var border = (parent.offsetWidth - parent.clientWidth) / 2;\n this.menu.style.left = editorRect.left + border + \"px\";\n this.menu.style.display = editorRect.top > window.innerHeight ? \"none\" : \"\";\n\n if (scrollAncestor) {\n this.menu.style.top = top + \"px\";\n }\n }\n } else {\n if (editorRect.top < top && editorRect.bottom >= this.menu.offsetHeight + 10) {\n this.floating = true;\n var menuRect = this.menu.getBoundingClientRect();\n this.menu.style.left = menuRect.left + \"px\";\n this.menu.style.width = menuRect.width + \"px\";\n\n if (scrollAncestor) {\n this.menu.style.top = top + \"px\";\n }\n\n this.menu.style.position = \"fixed\";\n this.spacer = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2 + \"-spacer\",\n style: \"height: \" + menuRect.height + \"px\"\n });\n parent.insertBefore(this.spacer, this.menu);\n }\n }\n};\n\nMenuBarView.prototype.destroy = function destroy() {\n if (this.wrapper.parentNode) {\n this.wrapper.parentNode.replaceChild(this.editorView.dom, this.wrapper);\n }\n}; // Not precise, but close enough\n\n\nfunction selectionIsInverted(selection) {\n if (selection.anchorNode == selection.focusNode) {\n return selection.anchorOffset > selection.focusOffset;\n }\n\n return selection.anchorNode.compareDocumentPosition(selection.focusNode) == Node.DOCUMENT_POSITION_FOLLOWING;\n}\n\nfunction findWrappingScrollable(node) {\n for (var cur = node.parentNode; cur; cur = cur.parentNode) {\n if (cur.scrollHeight > cur.clientHeight) {\n return cur;\n }\n }\n}\n\nfunction getAllWrapping(node) {\n var res = [window];\n\n for (var cur = node.parentNode; cur; cur = cur.parentNode) {\n res.push(cur);\n }\n\n return res;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-menu/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-model/dist/index.es.js": /*!*********************************************************!*\ !*** ./node_modules/prosemirror-model/dist/index.es.js ***! \*********************************************************/ /*! exports provided: ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContentMatch\", function() { return ContentMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMParser\", function() { return DOMParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMSerializer\", function() { return DOMSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Fragment\", function() { return Fragment; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mark\", function() { return Mark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkType\", function() { return MarkType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeRange\", function() { return NodeRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeType\", function() { return NodeType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceError\", function() { return ReplaceError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResolvedPos\", function() { return ResolvedPos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Schema\", function() { return Schema; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Slice\", function() { return Slice; });\n/* harmony import */ var orderedmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! orderedmap */ \"./node_modules/orderedmap/index.es.js\");\n\n\nfunction findDiffStart(a, b, pos) {\n for (var i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n { return a.childCount == b.childCount ? null : pos }\n\n var childA = a.child(i), childB = b.child(i);\n if (childA == childB) { pos += childA.nodeSize; continue }\n\n if (!childA.sameMarkup(childB)) { return pos }\n\n if (childA.isText && childA.text != childB.text) {\n for (var j = 0; childA.text[j] == childB.text[j]; j++)\n { pos++; }\n return pos\n }\n if (childA.content.size || childB.content.size) {\n var inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null) { return inner }\n }\n pos += childA.nodeSize;\n }\n}\n\nfunction findDiffEnd(a, b, posA, posB) {\n for (var iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n { return iA == iB ? null : {a: posA, b: posB} }\n\n var childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size; posB -= size;\n continue\n }\n\n if (!childA.sameMarkup(childB)) { return {a: posA, b: posB} }\n\n if (childA.isText && childA.text != childB.text) {\n var same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++; posA--; posB--;\n }\n return {a: posA, b: posB}\n }\n if (childA.content.size || childB.content.size) {\n var inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner) { return inner }\n }\n posA -= size; posB -= size;\n }\n}\n\n// ::- A fragment represents a node's collection of child nodes.\n//\n// Like nodes, fragments are persistent data structures, and you\n// should not mutate them or their content. Rather, you create new\n// instances whenever needed. The API tries to make this easy.\nvar Fragment = function Fragment(content, size) {\n this.content = content;\n // :: number\n // The size of the fragment, which is the total of the size of its\n // content nodes.\n this.size = size || 0;\n if (size == null) { for (var i = 0; i < content.length; i++)\n { this.size += content[i].nodeSize; } }\n};\n\nvar prototypeAccessors = { firstChild: { configurable: true },lastChild: { configurable: true },childCount: { configurable: true } };\n\n// :: (number, number, (node: Node, start: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes between the given two\n// positions (relative to start of this fragment). Doesn't descend\n// into a node when the callback returns `false`.\nFragment.prototype.nodesBetween = function nodesBetween (from, to, f, nodeStart, parent) {\n if ( nodeStart === void 0 ) nodeStart = 0;\n\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent, i) !== false && child.content.size) {\n var start = pos + 1;\n child.nodesBetween(Math.max(0, from - start),\n Math.min(child.content.size, to - start),\n f, nodeStart + start);\n }\n pos = end;\n }\n};\n\n// :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. The callback\n// may return `false` to prevent traversal of a given node's children.\nFragment.prototype.descendants = function descendants (f) {\n this.nodesBetween(0, this.size, f);\n};\n\n// : (number, number, ?string, ?string) → string\nFragment.prototype.textBetween = function textBetween (from, to, blockSeparator, leafText) {\n var text = \"\", separated = true;\n this.nodesBetween(from, to, function (node, pos) {\n if (node.isText) {\n text += node.text.slice(Math.max(from, pos) - pos, to - pos);\n separated = !blockSeparator;\n } else if (node.isLeaf && leafText) {\n text += leafText;\n separated = !blockSeparator;\n } else if (!separated && node.isBlock) {\n text += blockSeparator;\n separated = true;\n }\n }, 0);\n return text\n};\n\n// :: (Fragment) → Fragment\n// Create a new fragment containing the combined content of this\n// fragment and the other.\nFragment.prototype.append = function append (other) {\n if (!other.size) { return this }\n if (!this.size) { return other }\n var last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++) { content.push(other.content[i]); }\n return new Fragment(content, this.size + other.size)\n};\n\n// :: (number, ?number) → Fragment\n// Cut out the sub-fragment between the two given positions.\nFragment.prototype.cut = function cut (from, to) {\n if (to == null) { to = this.size; }\n if (from == 0 && to == this.size) { return this }\n var result = [], size = 0;\n if (to > from) { for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n { child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); }\n else\n { child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); }\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n } }\n return new Fragment(result, size)\n};\n\nFragment.prototype.cutByIndex = function cutByIndex (from, to) {\n if (from == to) { return Fragment.empty }\n if (from == 0 && to == this.content.length) { return this }\n return new Fragment(this.content.slice(from, to))\n};\n\n// :: (number, Node) → Fragment\n// Create a new fragment in which the node at the given index is\n// replaced by the given node.\nFragment.prototype.replaceChild = function replaceChild (index, node) {\n var current = this.content[index];\n if (current == node) { return this }\n var copy = this.content.slice();\n var size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size)\n};\n\n// : (Node) → Fragment\n// Create a new fragment by prepending the given node to this\n// fragment.\nFragment.prototype.addToStart = function addToStart (node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize)\n};\n\n// : (Node) → Fragment\n// Create a new fragment by appending the given node to this\n// fragment.\nFragment.prototype.addToEnd = function addToEnd (node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize)\n};\n\n// :: (Fragment) → bool\n// Compare this fragment to another one.\nFragment.prototype.eq = function eq (other) {\n if (this.content.length != other.content.length) { return false }\n for (var i = 0; i < this.content.length; i++)\n { if (!this.content[i].eq(other.content[i])) { return false } }\n return true\n};\n\n// :: ?Node\n// The first child of the fragment, or `null` if it is empty.\nprototypeAccessors.firstChild.get = function () { return this.content.length ? this.content[0] : null };\n\n// :: ?Node\n// The last child of the fragment, or `null` if it is empty.\nprototypeAccessors.lastChild.get = function () { return this.content.length ? this.content[this.content.length - 1] : null };\n\n// :: number\n// The number of child nodes in this fragment.\nprototypeAccessors.childCount.get = function () { return this.content.length };\n\n// :: (number) → Node\n// Get the child node at the given index. Raise an error when the\n// index is out of range.\nFragment.prototype.child = function child (index) {\n var found = this.content[index];\n if (!found) { throw new RangeError(\"Index \" + index + \" out of range for \" + this) }\n return found\n};\n\n// :: (number) → ?Node\n// Get the child node at the given index, if it exists.\nFragment.prototype.maybeChild = function maybeChild (index) {\n return this.content[index]\n};\n\n// :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\nFragment.prototype.forEach = function forEach (f) {\n for (var i = 0, p = 0; i < this.content.length; i++) {\n var child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n};\n\n// :: (Fragment) → ?number\n// Find the first position at which this fragment and another\n// fragment differ, or `null` if they are the same.\nFragment.prototype.findDiffStart = function findDiffStart$1 (other, pos) {\n if ( pos === void 0 ) pos = 0;\n\n return findDiffStart(this, other, pos)\n};\n\n// :: (Fragment) → ?{a: number, b: number}\n// Find the first position, searching from the end, at which this\n// fragment and the given fragment differ, or `null` if they are the\n// same. Since this position will not be the same in both nodes, an\n// object with two separate positions is returned.\nFragment.prototype.findDiffEnd = function findDiffEnd$1 (other, pos, otherPos) {\n if ( pos === void 0 ) pos = this.size;\n if ( otherPos === void 0 ) otherPos = other.size;\n\n return findDiffEnd(this, other, pos, otherPos)\n};\n\n// : (number, ?number) → {index: number, offset: number}\n// Find the index and inner offset corresponding to a given relative\n// position in this fragment. The result object will be reused\n// (overwritten) the next time the function is called. (Not public.)\nFragment.prototype.findIndex = function findIndex (pos, round) {\n if ( round === void 0 ) round = -1;\n\n if (pos == 0) { return retIndex(0, pos) }\n if (pos == this.size) { return retIndex(this.content.length, pos) }\n if (pos > this.size || pos < 0) { throw new RangeError((\"Position \" + pos + \" outside of fragment (\" + (this) + \")\")) }\n for (var i = 0, curPos = 0;; i++) {\n var cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos || round > 0) { return retIndex(i + 1, end) }\n return retIndex(i, curPos)\n }\n curPos = end;\n }\n};\n\n// :: () → string\n// Return a debugging string that describes this fragment.\nFragment.prototype.toString = function toString () { return \"<\" + this.toStringInner() + \">\" };\n\nFragment.prototype.toStringInner = function toStringInner () { return this.content.join(\", \") };\n\n// :: () → ?Object\n// Create a JSON-serializeable representation of this fragment.\nFragment.prototype.toJSON = function toJSON () {\n return this.content.length ? this.content.map(function (n) { return n.toJSON(); }) : null\n};\n\n// :: (Schema, ?Object) → Fragment\n// Deserialize a fragment from its JSON representation.\nFragment.fromJSON = function fromJSON (schema, value) {\n if (!value) { return Fragment.empty }\n if (!Array.isArray(value)) { throw new RangeError(\"Invalid input for Fragment.fromJSON\") }\n return new Fragment(value.map(schema.nodeFromJSON))\n};\n\n// :: ([Node]) → Fragment\n// Build a fragment from an array of nodes. Ensures that adjacent\n// text nodes with the same marks are joined together.\nFragment.fromArray = function fromArray (array) {\n if (!array.length) { return Fragment.empty }\n var joined, size = 0;\n for (var i = 0; i < array.length; i++) {\n var node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined) { joined = array.slice(0, i); }\n joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n } else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size)\n};\n\n// :: (?union) → Fragment\n// Create a fragment from something that can be interpreted as a set\n// of nodes. For `null`, it returns the empty fragment. For a\n// fragment, the fragment itself. For a node or array of nodes, a\n// fragment containing those nodes.\nFragment.from = function from (nodes) {\n if (!nodes) { return Fragment.empty }\n if (nodes instanceof Fragment) { return nodes }\n if (Array.isArray(nodes)) { return this.fromArray(nodes) }\n if (nodes.attrs) { return new Fragment([nodes], nodes.nodeSize) }\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"))\n};\n\nObject.defineProperties( Fragment.prototype, prototypeAccessors );\n\nvar found = {index: 0, offset: 0};\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found\n}\n\n// :: Fragment\n// An empty fragment. Intended to be reused whenever a node doesn't\n// contain anything (rather than allocating a new empty fragment for\n// each leaf node).\nFragment.empty = new Fragment([], 0);\n\nfunction compareDeep(a, b) {\n if (a === b) { return true }\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\")) { return false }\n var array = Array.isArray(a);\n if (Array.isArray(b) != array) { return false }\n if (array) {\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++) { if (!compareDeep(a[i], b[i])) { return false } }\n } else {\n for (var p in a) { if (!(p in b) || !compareDeep(a[p], b[p])) { return false } }\n for (var p$1 in b) { if (!(p$1 in a)) { return false } }\n }\n return true\n}\n\n// ::- A mark is a piece of information that can be attached to a node,\n// such as it being emphasized, in code font, or a link. It has a type\n// and optionally a set of attributes that provide further information\n// (such as the target of the link). Marks are created through a\n// `Schema`, which controls which types exist and which\n// attributes they have.\nvar Mark = function Mark(type, attrs) {\n // :: MarkType\n // The type of this mark.\n this.type = type;\n // :: Object\n // The attributes associated with this mark.\n this.attrs = attrs;\n};\n\n// :: ([Mark]) → [Mark]\n// Given a set of marks, create a new set which contains this one as\n// well, in the right position. If this mark is already in the set,\n// the set itself is returned. If any marks that are set to be\n// [exclusive](#model.MarkSpec.excludes) with this mark are present,\n// those are replaced by this one.\nMark.prototype.addToSet = function addToSet (set) {\n var copy, placed = false;\n for (var i = 0; i < set.length; i++) {\n var other = set[i];\n if (this.eq(other)) { return set }\n if (this.type.excludes(other.type)) {\n if (!copy) { copy = set.slice(0, i); }\n } else if (other.type.excludes(this.type)) {\n return set\n } else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy) { copy = set.slice(0, i); }\n copy.push(this);\n placed = true;\n }\n if (copy) { copy.push(other); }\n }\n }\n if (!copy) { copy = set.slice(); }\n if (!placed) { copy.push(this); }\n return copy\n};\n\n// :: ([Mark]) → [Mark]\n// Remove this mark from the given set, returning a new set. If this\n// mark is not in the set, the set itself is returned.\nMark.prototype.removeFromSet = function removeFromSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (this.eq(set[i]))\n { return set.slice(0, i).concat(set.slice(i + 1)) } }\n return set\n};\n\n// :: ([Mark]) → bool\n// Test whether this mark is in the given set of marks.\nMark.prototype.isInSet = function isInSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (this.eq(set[i])) { return true } }\n return false\n};\n\n// :: (Mark) → bool\n// Test whether this mark has the same type and attributes as\n// another mark.\nMark.prototype.eq = function eq (other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs))\n};\n\n// :: () → Object\n// Convert this mark to a JSON-serializeable representation.\nMark.prototype.toJSON = function toJSON () {\n var obj = {type: this.type.name};\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break\n }\n return obj\n};\n\n// :: (Schema, Object) → Mark\nMark.fromJSON = function fromJSON (schema, json) {\n if (!json) { throw new RangeError(\"Invalid input for Mark.fromJSON\") }\n var type = schema.marks[json.type];\n if (!type) { throw new RangeError((\"There is no mark type \" + (json.type) + \" in this schema\")) }\n return type.create(json.attrs)\n};\n\n// :: ([Mark], [Mark]) → bool\n// Test whether two sets of marks are identical.\nMark.sameSet = function sameSet (a, b) {\n if (a == b) { return true }\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++)\n { if (!a[i].eq(b[i])) { return false } }\n return true\n};\n\n// :: (?union) → [Mark]\n// Create a properly sorted mark set from null, a single mark, or an\n// unsorted array of marks.\nMark.setFrom = function setFrom (marks) {\n if (!marks || marks.length == 0) { return Mark.none }\n if (marks instanceof Mark) { return [marks] }\n var copy = marks.slice();\n copy.sort(function (a, b) { return a.type.rank - b.type.rank; });\n return copy\n};\n\n// :: [Mark] The empty set of marks.\nMark.none = [];\n\n// ReplaceError:: class extends Error\n// Error type raised by [`Node.replace`](#model.Node.replace) when\n// given an invalid replacement.\n\nfunction ReplaceError(message) {\n var err = Error.call(this, message);\n err.__proto__ = ReplaceError.prototype;\n return err\n}\n\nReplaceError.prototype = Object.create(Error.prototype);\nReplaceError.prototype.constructor = ReplaceError;\nReplaceError.prototype.name = \"ReplaceError\";\n\n// ::- A slice represents a piece cut out of a larger document. It\n// stores not only a fragment, but also the depth up to which nodes on\n// both side are ‘open’ (cut through).\nvar Slice = function Slice(content, openStart, openEnd) {\n // :: Fragment The slice's content.\n this.content = content;\n // :: number The open depth at the start.\n this.openStart = openStart;\n // :: number The open depth at the end.\n this.openEnd = openEnd;\n};\n\nvar prototypeAccessors$1 = { size: { configurable: true } };\n\n// :: number\n// The size this slice would add when inserted into a document.\nprototypeAccessors$1.size.get = function () {\n return this.content.size - this.openStart - this.openEnd\n};\n\nSlice.prototype.insertAt = function insertAt (pos, fragment) {\n var content = insertInto(this.content, pos + this.openStart, fragment, null);\n return content && new Slice(content, this.openStart, this.openEnd)\n};\n\nSlice.prototype.removeBetween = function removeBetween (from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd)\n};\n\n// :: (Slice) → bool\n// Tests whether this slice is equal to another slice.\nSlice.prototype.eq = function eq (other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd\n};\n\nSlice.prototype.toString = function toString () {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\"\n};\n\n// :: () → ?Object\n// Convert a slice to a JSON-serializable representation.\nSlice.prototype.toJSON = function toJSON () {\n if (!this.content.size) { return null }\n var json = {content: this.content.toJSON()};\n if (this.openStart > 0) { json.openStart = this.openStart; }\n if (this.openEnd > 0) { json.openEnd = this.openEnd; }\n return json\n};\n\n// :: (Schema, ?Object) → Slice\n// Deserialize a slice from its JSON representation.\nSlice.fromJSON = function fromJSON (schema, json) {\n if (!json) { return Slice.empty }\n var openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n { throw new RangeError(\"Invalid input for Slice.fromJSON\") }\n return new Slice(Fragment.fromJSON(schema, json.content), json.openStart || 0, json.openEnd || 0)\n};\n\n// :: (Fragment, ?bool) → Slice\n// Create a slice from a fragment by taking the maximum possible\n// open value on both side of the fragment.\nSlice.maxOpen = function maxOpen (fragment, openIsolating) {\n if ( openIsolating === void 0 ) openIsolating=true;\n\n var openStart = 0, openEnd = 0;\n for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) { openStart++; }\n for (var n$1 = fragment.lastChild; n$1 && !n$1.isLeaf && (openIsolating || !n$1.type.spec.isolating); n$1 = n$1.lastChild) { openEnd++; }\n return new Slice(fragment, openStart, openEnd)\n};\n\nObject.defineProperties( Slice.prototype, prototypeAccessors$1 );\n\nfunction removeRange(content, from, to) {\n var ref = content.findIndex(from);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n var ref$1 = content.findIndex(to);\n var indexTo = ref$1.index;\n var offsetTo = ref$1.offset;\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText) { throw new RangeError(\"Removing non-flat range\") }\n return content.cut(0, from).append(content.cut(to))\n }\n if (index != indexTo) { throw new RangeError(\"Removing non-flat range\") }\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)))\n}\n\nfunction insertInto(content, dist, insert, parent) {\n var ref = content.findIndex(dist);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert)) { return null }\n return content.cut(0, dist).append(insert).append(content.cut(dist))\n }\n var inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner))\n}\n\n// :: Slice\n// The empty slice.\nSlice.empty = new Slice(Fragment.empty, 0, 0);\n\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n { throw new ReplaceError(\"Inserted content deeper than insertion position\") }\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n { throw new ReplaceError(\"Inconsistent open depths\") }\n return replaceOuter($from, $to, slice, 0)\n}\n\nfunction replaceOuter($from, $to, slice, depth) {\n var index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n var inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner))\n } else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth))\n } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n var parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)))\n } else {\n var ref = prepareSliceForReplace(slice, $from);\n var start = ref.start;\n var end = ref.end;\n return close(node, replaceThreeWay($from, start, end, $to, depth))\n }\n}\n\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n { throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name) }\n}\n\nfunction joinable($before, $after, depth) {\n var node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node\n}\n\nfunction addNode(child, target) {\n var last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n { target[last] = child.withText(target[last].text + child.text); }\n else\n { target.push(child); }\n}\n\nfunction addRange($start, $end, depth, target) {\n var node = ($end || $start).node(depth);\n var startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n } else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (var i = startIndex; i < endIndex; i++) { addNode(node.child(i), target); }\n if ($end && $end.depth == depth && $end.textOffset)\n { addNode($end.nodeBefore, target); }\n}\n\nfunction close(node, content) {\n if (!node.type.validContent(content))\n { throw new ReplaceError(\"Invalid content for node \" + node.type.name) }\n return node.copy(content)\n}\n\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n var openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n var openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n\n var content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n } else {\n if (openStart)\n { addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); }\n addRange($start, $end, depth, content);\n if (openEnd)\n { addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); }\n }\n addRange($to, null, depth, content);\n return new Fragment(content)\n}\n\nfunction replaceTwoWay($from, $to, depth) {\n var content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n var type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content)\n}\n\nfunction prepareSliceForReplace(slice, $along) {\n var extra = $along.depth - slice.openStart, parent = $along.node(extra);\n var node = parent.copy(slice.content);\n for (var i = extra - 1; i >= 0; i--)\n { node = $along.node(i).copy(Fragment.from(node)); }\n return {start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra)}\n}\n\n// ::- You can [_resolve_](#model.Node.resolve) a position to get more\n// information about it. Objects of this class represent such a\n// resolved position, providing various pieces of context information,\n// and some helper methods.\n//\n// Throughout this interface, methods that take an optional `depth`\n// parameter will interpret undefined as `this.depth` and negative\n// numbers as `this.depth + value`.\nvar ResolvedPos = function ResolvedPos(pos, path, parentOffset) {\n // :: number The position that was resolved.\n this.pos = pos;\n this.path = path;\n // :: number\n // The number of levels the parent node is from the root. If this\n // position points directly into the root node, it is 0. If it\n // points into a top-level paragraph, 1, and so on.\n this.depth = path.length / 3 - 1;\n // :: number The offset this position has into its parent node.\n this.parentOffset = parentOffset;\n};\n\nvar prototypeAccessors$2 = { parent: { configurable: true },doc: { configurable: true },textOffset: { configurable: true },nodeAfter: { configurable: true },nodeBefore: { configurable: true } };\n\nResolvedPos.prototype.resolveDepth = function resolveDepth (val) {\n if (val == null) { return this.depth }\n if (val < 0) { return this.depth + val }\n return val\n};\n\n// :: Node\n// The parent node that the position points into. Note that even if\n// a position points into a text node, that node is not considered\n// the parent—text nodes are ‘flat’ in this model, and have no content.\nprototypeAccessors$2.parent.get = function () { return this.node(this.depth) };\n\n// :: Node\n// The root node in which the position was resolved.\nprototypeAccessors$2.doc.get = function () { return this.node(0) };\n\n// :: (?number) → Node\n// The ancestor node at the given level. `p.node(p.depth)` is the\n// same as `p.parent`.\nResolvedPos.prototype.node = function node (depth) { return this.path[this.resolveDepth(depth) * 3] };\n\n// :: (?number) → number\n// The index into the ancestor at the given level. If this points at\n// the 3rd node in the 2nd paragraph on the top level, for example,\n// `p.index(0)` is 1 and `p.index(1)` is 2.\nResolvedPos.prototype.index = function index (depth) { return this.path[this.resolveDepth(depth) * 3 + 1] };\n\n// :: (?number) → number\n// The index pointing after this position into the ancestor at the\n// given level.\nResolvedPos.prototype.indexAfter = function indexAfter (depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1)\n};\n\n// :: (?number) → number\n// The (absolute) position at the start of the node at the given\n// level.\nResolvedPos.prototype.start = function start (depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1\n};\n\n// :: (?number) → number\n// The (absolute) position at the end of the node at the given\n// level.\nResolvedPos.prototype.end = function end (depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size\n};\n\n// :: (?number) → number\n// The (absolute) position directly before the wrapping node at the\n// given level, or, when `depth` is `this.depth + 1`, the original\n// position.\nResolvedPos.prototype.before = function before (depth) {\n depth = this.resolveDepth(depth);\n if (!depth) { throw new RangeError(\"There is no position before the top-level node\") }\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]\n};\n\n// :: (?number) → number\n// The (absolute) position directly after the wrapping node at the\n// given level, or the original position when `depth` is `this.depth + 1`.\nResolvedPos.prototype.after = function after (depth) {\n depth = this.resolveDepth(depth);\n if (!depth) { throw new RangeError(\"There is no position after the top-level node\") }\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize\n};\n\n// :: number\n// When this position points into a text node, this returns the\n// distance between the position and the start of the text node.\n// Will be zero for positions that point between nodes.\nprototypeAccessors$2.textOffset.get = function () { return this.pos - this.path[this.path.length - 1] };\n\n// :: ?Node\n// Get the node directly after the position, if any. If the position\n// points into a text node, only the part of that node after the\n// position is returned.\nprototypeAccessors$2.nodeAfter.get = function () {\n var parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount) { return null }\n var dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child\n};\n\n// :: ?Node\n// Get the node directly before the position, if any. If the\n// position points into a text node, only the part of that node\n// before the position is returned.\nprototypeAccessors$2.nodeBefore.get = function () {\n var index = this.index(this.depth);\n var dOff = this.pos - this.path[this.path.length - 1];\n if (dOff) { return this.parent.child(index).cut(0, dOff) }\n return index == 0 ? null : this.parent.child(index - 1)\n};\n\n// :: () → [Mark]\n// Get the marks at this position, factoring in the surrounding\n// marks' [`inclusive`](#model.MarkSpec.inclusive) property. If the\n// position is at the start of a non-empty node, the marks of the\n// node after it (if any) are returned.\nResolvedPos.prototype.marks = function marks () {\n var parent = this.parent, index = this.index();\n\n // In an empty parent, return the empty array\n if (parent.content.size == 0) { return Mark.none }\n\n // When inside a text node, just return the text node's marks\n if (this.textOffset) { return parent.child(index).marks }\n\n var main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) { var tmp = main; main = other; other = tmp; }\n\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n var marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n { if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n { marks = marks[i--].removeFromSet(marks); } }\n\n return marks\n};\n\n// :: (ResolvedPos) → ?[Mark]\n// Get the marks after the current position, if any, except those\n// that are non-inclusive and not present at position `$end`. This\n// is mostly useful for getting the set of marks to preserve after a\n// deletion. Will return `null` if this position is at the end of\n// its parent node or its parent node isn't a textblock (in which\n// case no marks should be preserved).\nResolvedPos.prototype.marksAcross = function marksAcross ($end) {\n var after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline) { return null }\n\n var marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n { if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n { marks = marks[i--].removeFromSet(marks); } }\n return marks\n};\n\n// :: (number) → number\n// The depth up to which this position and the given (non-resolved)\n// position share the same parent nodes.\nResolvedPos.prototype.sharedDepth = function sharedDepth (pos) {\n for (var depth = this.depth; depth > 0; depth--)\n { if (this.start(depth) <= pos && this.end(depth) >= pos) { return depth } }\n return 0\n};\n\n// :: (?ResolvedPos, ?(Node) → bool) → ?NodeRange\n// Returns a range based on the place where this position and the\n// given position diverge around block content. If both point into\n// the same textblock, for example, a range around that textblock\n// will be returned. If they point into different blocks, the range\n// around those blocks in their shared ancestor is returned. You can\n// pass in an optional predicate that will be called with a parent\n// node to see if a range into that parent is acceptable.\nResolvedPos.prototype.blockRange = function blockRange (other, pred) {\n if ( other === void 0 ) other = this;\n\n if (other.pos < this.pos) { return other.blockRange(this) }\n for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n { if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n { return new NodeRange(this, other, d) } }\n};\n\n// :: (ResolvedPos) → bool\n// Query whether the given position shares the same parent node.\nResolvedPos.prototype.sameParent = function sameParent (other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset\n};\n\n// :: (ResolvedPos) → ResolvedPos\n// Return the greater of this and the given position.\nResolvedPos.prototype.max = function max (other) {\n return other.pos > this.pos ? other : this\n};\n\n// :: (ResolvedPos) → ResolvedPos\n// Return the smaller of this and the given position.\nResolvedPos.prototype.min = function min (other) {\n return other.pos < this.pos ? other : this\n};\n\nResolvedPos.prototype.toString = function toString () {\n var str = \"\";\n for (var i = 1; i <= this.depth; i++)\n { str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1); }\n return str + \":\" + this.parentOffset\n};\n\nResolvedPos.resolve = function resolve (doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size)) { throw new RangeError(\"Position \" + pos + \" out of range\") }\n var path = [];\n var start = 0, parentOffset = pos;\n for (var node = doc;;) {\n var ref = node.content.findIndex(parentOffset);\n var index = ref.index;\n var offset = ref.offset;\n var rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem) { break }\n node = node.child(index);\n if (node.isText) { break }\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset)\n};\n\nResolvedPos.resolveCached = function resolveCached (doc, pos) {\n for (var i = 0; i < resolveCache.length; i++) {\n var cached = resolveCache[i];\n if (cached.pos == pos && cached.doc == doc) { return cached }\n }\n var result = resolveCache[resolveCachePos] = ResolvedPos.resolve(doc, pos);\n resolveCachePos = (resolveCachePos + 1) % resolveCacheSize;\n return result\n};\n\nObject.defineProperties( ResolvedPos.prototype, prototypeAccessors$2 );\n\nvar resolveCache = [], resolveCachePos = 0, resolveCacheSize = 12;\n\n// ::- Represents a flat range of content, i.e. one that starts and\n// ends in the same node.\nvar NodeRange = function NodeRange($from, $to, depth) {\n // :: ResolvedPos A resolved position along the start of the\n // content. May have a `depth` greater than this object's `depth`\n // property, since these are the positions that were used to\n // compute the range, not re-resolved positions directly at its\n // boundaries.\n this.$from = $from;\n // :: ResolvedPos A position along the end of the content. See\n // caveat for [`$from`](#model.NodeRange.$from).\n this.$to = $to;\n // :: number The depth of the node that this range points into.\n this.depth = depth;\n};\n\nvar prototypeAccessors$1$1 = { start: { configurable: true },end: { configurable: true },parent: { configurable: true },startIndex: { configurable: true },endIndex: { configurable: true } };\n\n// :: number The position at the start of the range.\nprototypeAccessors$1$1.start.get = function () { return this.$from.before(this.depth + 1) };\n// :: number The position at the end of the range.\nprototypeAccessors$1$1.end.get = function () { return this.$to.after(this.depth + 1) };\n\n// :: Node The parent node that the range points into.\nprototypeAccessors$1$1.parent.get = function () { return this.$from.node(this.depth) };\n// :: number The start index of the range in the parent node.\nprototypeAccessors$1$1.startIndex.get = function () { return this.$from.index(this.depth) };\n// :: number The end index of the range in the parent node.\nprototypeAccessors$1$1.endIndex.get = function () { return this.$to.indexAfter(this.depth) };\n\nObject.defineProperties( NodeRange.prototype, prototypeAccessors$1$1 );\n\nvar emptyAttrs = Object.create(null);\n\n// ::- This class represents a node in the tree that makes up a\n// ProseMirror document. So a document is an instance of `Node`, with\n// children that are also instances of `Node`.\n//\n// Nodes are persistent data structures. Instead of changing them, you\n// create new ones with the content you want. Old ones keep pointing\n// at the old document shape. This is made cheaper by sharing\n// structure between the old and new data as much as possible, which a\n// tree shape like this (without back pointers) makes easy.\n//\n// **Do not** directly mutate the properties of a `Node` object. See\n// [the guide](/docs/guide/#doc) for more information.\nvar Node = function Node(type, attrs, content, marks) {\n // :: NodeType\n // The type of node that this is.\n this.type = type;\n\n // :: Object\n // An object mapping attribute names to values. The kind of\n // attributes allowed and required are\n // [determined](#model.NodeSpec.attrs) by the node type.\n this.attrs = attrs;\n\n // :: Fragment\n // A container holding the node's children.\n this.content = content || Fragment.empty;\n\n // :: [Mark]\n // The marks (things like whether it is emphasized or part of a\n // link) applied to this node.\n this.marks = marks || Mark.none;\n};\n\nvar prototypeAccessors$3 = { nodeSize: { configurable: true },childCount: { configurable: true },textContent: { configurable: true },firstChild: { configurable: true },lastChild: { configurable: true },isBlock: { configurable: true },isTextblock: { configurable: true },inlineContent: { configurable: true },isInline: { configurable: true },isText: { configurable: true },isLeaf: { configurable: true },isAtom: { configurable: true } };\n\n// text:: ?string\n// For text nodes, this contains the node's text content.\n\n// :: number\n// The size of this node, as defined by the integer-based [indexing\n// scheme](/docs/guide/#doc.indexing). For text nodes, this is the\n// amount of characters. For other leaf nodes, it is one. For\n// non-leaf nodes, it is the size of the content plus two (the start\n// and end token).\nprototypeAccessors$3.nodeSize.get = function () { return this.isLeaf ? 1 : 2 + this.content.size };\n\n// :: number\n// The number of children that the node has.\nprototypeAccessors$3.childCount.get = function () { return this.content.childCount };\n\n// :: (number) → Node\n// Get the child node at the given index. Raises an error when the\n// index is out of range.\nNode.prototype.child = function child (index) { return this.content.child(index) };\n\n// :: (number) → ?Node\n// Get the child node at the given index, if it exists.\nNode.prototype.maybeChild = function maybeChild (index) { return this.content.maybeChild(index) };\n\n// :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\nNode.prototype.forEach = function forEach (f) { this.content.forEach(f); };\n\n// :: (number, number, (node: Node, pos: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes recursively between\n// the given two positions that are relative to start of this node's\n// content. The callback is invoked with the node, its\n// parent-relative position, its parent node, and its child index.\n// When the callback returns false for a given node, that node's\n// children will not be recursed over. The last parameter can be\n// used to specify a starting position to count from.\nNode.prototype.nodesBetween = function nodesBetween (from, to, f, startPos) {\n if ( startPos === void 0 ) startPos = 0;\n\n this.content.nodesBetween(from, to, f, startPos, this);\n};\n\n// :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. Doesn't\n// descend into a node when the callback returns `false`.\nNode.prototype.descendants = function descendants (f) {\n this.nodesBetween(0, this.content.size, f);\n};\n\n// :: string\n// Concatenates all the text nodes found in this fragment and its\n// children.\nprototypeAccessors$3.textContent.get = function () { return this.textBetween(0, this.content.size, \"\") };\n\n// :: (number, number, ?string, ?string) → string\n// Get all text between positions `from` and `to`. When\n// `blockSeparator` is given, it will be inserted whenever a new\n// block node is started. When `leafText` is given, it'll be\n// inserted for every non-text leaf node encountered.\nNode.prototype.textBetween = function textBetween (from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText)\n};\n\n// :: ?Node\n// Returns this node's first child, or `null` if there are no\n// children.\nprototypeAccessors$3.firstChild.get = function () { return this.content.firstChild };\n\n// :: ?Node\n// Returns this node's last child, or `null` if there are no\n// children.\nprototypeAccessors$3.lastChild.get = function () { return this.content.lastChild };\n\n// :: (Node) → bool\n// Test whether two nodes represent the same piece of document.\nNode.prototype.eq = function eq (other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content))\n};\n\n// :: (Node) → bool\n// Compare the markup (type, attributes, and marks) of this node to\n// those of another. Returns `true` if both have the same markup.\nNode.prototype.sameMarkup = function sameMarkup (other) {\n return this.hasMarkup(other.type, other.attrs, other.marks)\n};\n\n// :: (NodeType, ?Object, ?[Mark]) → bool\n// Check whether this node's markup correspond to the given type,\n// attributes, and marks.\nNode.prototype.hasMarkup = function hasMarkup (type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none)\n};\n\n// :: (?Fragment) → Node\n// Create a new node with the same markup as this node, containing\n// the given content (or empty, if no content is given).\nNode.prototype.copy = function copy (content) {\n if ( content === void 0 ) content = null;\n\n if (content == this.content) { return this }\n return new this.constructor(this.type, this.attrs, content, this.marks)\n};\n\n// :: ([Mark]) → Node\n// Create a copy of this node, with the given set of marks instead\n// of the node's own marks.\nNode.prototype.mark = function mark (marks) {\n return marks == this.marks ? this : new this.constructor(this.type, this.attrs, this.content, marks)\n};\n\n// :: (number, ?number) → Node\n// Create a copy of this node with only the content between the\n// given positions. If `to` is not given, it defaults to the end of\n// the node.\nNode.prototype.cut = function cut (from, to) {\n if (from == 0 && to == this.content.size) { return this }\n return this.copy(this.content.cut(from, to))\n};\n\n// :: (number, ?number) → Slice\n// Cut out the part of the document between the given positions, and\n// return it as a `Slice` object.\nNode.prototype.slice = function slice (from, to, includeParents) {\n if ( to === void 0 ) to = this.content.size;\n if ( includeParents === void 0 ) includeParents = false;\n\n if (from == to) { return Slice.empty }\n\n var $from = this.resolve(from), $to = this.resolve(to);\n var depth = includeParents ? 0 : $from.sharedDepth(to);\n var start = $from.start(depth), node = $from.node(depth);\n var content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth)\n};\n\n// :: (number, number, Slice) → Node\n// Replace the part of the document between the given positions with\n// the given slice. The slice must 'fit', meaning its open sides\n// must be able to connect to the surrounding content, and its\n// content nodes must be valid children for the node they are placed\n// into. If any of this is violated, an error of type\n// [`ReplaceError`](#model.ReplaceError) is thrown.\nNode.prototype.replace = function replace$1 (from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice)\n};\n\n// :: (number) → ?Node\n// Find the node directly after the given position.\nNode.prototype.nodeAt = function nodeAt (pos) {\n for (var node = this;;) {\n var ref = node.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n node = node.maybeChild(index);\n if (!node) { return null }\n if (offset == pos || node.isText) { return node }\n pos -= offset + 1;\n }\n};\n\n// :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node after the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\nNode.prototype.childAfter = function childAfter (pos) {\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n return {node: this.content.maybeChild(index), index: index, offset: offset}\n};\n\n// :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node before the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\nNode.prototype.childBefore = function childBefore (pos) {\n if (pos == 0) { return {node: null, index: 0, offset: 0} }\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n if (offset < pos) { return {node: this.content.child(index), index: index, offset: offset} }\n var node = this.content.child(index - 1);\n return {node: node, index: index - 1, offset: offset - node.nodeSize}\n};\n\n// :: (number) → ResolvedPos\n// Resolve the given position in the document, returning an\n// [object](#model.ResolvedPos) with information about its context.\nNode.prototype.resolve = function resolve (pos) { return ResolvedPos.resolveCached(this, pos) };\n\nNode.prototype.resolveNoCache = function resolveNoCache (pos) { return ResolvedPos.resolve(this, pos) };\n\n// :: (number, number, MarkType) → bool\n// Test whether a mark of the given type occurs in this document\n// between the two given positions.\nNode.prototype.rangeHasMark = function rangeHasMark (from, to, type) {\n var found = false;\n if (to > from) { this.nodesBetween(from, to, function (node) {\n if (type.isInSet(node.marks)) { found = true; }\n return !found\n }); }\n return found\n};\n\n// :: bool\n// True when this is a block (non-inline node)\nprototypeAccessors$3.isBlock.get = function () { return this.type.isBlock };\n\n// :: bool\n// True when this is a textblock node, a block node with inline\n// content.\nprototypeAccessors$3.isTextblock.get = function () { return this.type.isTextblock };\n\n// :: bool\n// True when this node allows inline content.\nprototypeAccessors$3.inlineContent.get = function () { return this.type.inlineContent };\n\n// :: bool\n// True when this is an inline node (a text node or a node that can\n// appear among text).\nprototypeAccessors$3.isInline.get = function () { return this.type.isInline };\n\n// :: bool\n// True when this is a text node.\nprototypeAccessors$3.isText.get = function () { return this.type.isText };\n\n// :: bool\n// True when this is a leaf node.\nprototypeAccessors$3.isLeaf.get = function () { return this.type.isLeaf };\n\n// :: bool\n// True when this is an atom, i.e. when it does not have directly\n// editable content. This is usually the same as `isLeaf`, but can\n// be configured with the [`atom` property](#model.NodeSpec.atom) on\n// a node's spec (typically used when the node is displayed as an\n// uneditable [node view](#view.NodeView)).\nprototypeAccessors$3.isAtom.get = function () { return this.type.isAtom };\n\n// :: () → string\n// Return a string representation of this node for debugging\n// purposes.\nNode.prototype.toString = function toString () {\n if (this.type.spec.toDebugString) { return this.type.spec.toDebugString(this) }\n var name = this.type.name;\n if (this.content.size)\n { name += \"(\" + this.content.toStringInner() + \")\"; }\n return wrapMarks(this.marks, name)\n};\n\n// :: (number) → ContentMatch\n// Get the content match in this node at the given index.\nNode.prototype.contentMatchAt = function contentMatchAt (index) {\n var match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match) { throw new Error(\"Called contentMatchAt on a node with invalid content\") }\n return match\n};\n\n// :: (number, number, ?Fragment, ?number, ?number) → bool\n// Test whether replacing the range between `from` and `to` (by\n// child index) with the given replacement fragment (which defaults\n// to the empty fragment) would leave the node's content valid. You\n// can optionally pass `start` and `end` indices into the\n// replacement fragment.\nNode.prototype.canReplace = function canReplace (from, to, replacement, start, end) {\n if ( replacement === void 0 ) replacement = Fragment.empty;\n if ( start === void 0 ) start = 0;\n if ( end === void 0 ) end = replacement.childCount;\n\n var one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n var two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd) { return false }\n for (var i = start; i < end; i++) { if (!this.type.allowsMarks(replacement.child(i).marks)) { return false } }\n return true\n};\n\n// :: (number, number, NodeType, ?[Mark]) → bool\n// Test whether replacing the range `from` to `to` (by index) with a\n// node of the given type would leave the node's content valid.\nNode.prototype.canReplaceWith = function canReplaceWith (from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks)) { return false }\n var start = this.contentMatchAt(from).matchType(type);\n var end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false\n};\n\n// :: (Node) → bool\n// Test whether the given node's content could be appended to this\n// node. If that node is empty, this will only return true if there\n// is at least one node type that can appear in both nodes (to avoid\n// merging completely incompatible nodes).\nNode.prototype.canAppend = function canAppend (other) {\n if (other.content.size) { return this.canReplace(this.childCount, this.childCount, other.content) }\n else { return this.type.compatibleContent(other.type) }\n};\n\n// :: ()\n// Check whether this node and its descendants conform to the\n// schema, and raise error when they do not.\nNode.prototype.check = function check () {\n if (!this.type.validContent(this.content))\n { throw new RangeError((\"Invalid content for node \" + (this.type.name) + \": \" + (this.content.toString().slice(0, 50)))) }\n this.content.forEach(function (node) { return node.check(); });\n};\n\n// :: () → Object\n// Return a JSON-serializeable representation of this node.\nNode.prototype.toJSON = function toJSON () {\n var obj = {type: this.type.name};\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break\n }\n if (this.content.size)\n { obj.content = this.content.toJSON(); }\n if (this.marks.length)\n { obj.marks = this.marks.map(function (n) { return n.toJSON(); }); }\n return obj\n};\n\n// :: (Schema, Object) → Node\n// Deserialize a node from its JSON representation.\nNode.fromJSON = function fromJSON (schema, json) {\n if (!json) { throw new RangeError(\"Invalid input for Node.fromJSON\") }\n var marks = null;\n if (json.marks) {\n if (!Array.isArray(json.marks)) { throw new RangeError(\"Invalid mark data for Node.fromJSON\") }\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\") { throw new RangeError(\"Invalid text node in JSON\") }\n return schema.text(json.text, marks)\n }\n var content = Fragment.fromJSON(schema, json.content);\n return schema.nodeType(json.type).create(json.attrs, content, marks)\n};\n\nObject.defineProperties( Node.prototype, prototypeAccessors$3 );\n\nvar TextNode = /*@__PURE__*/(function (Node) {\n function TextNode(type, attrs, content, marks) {\n Node.call(this, type, attrs, null, marks);\n\n if (!content) { throw new RangeError(\"Empty text nodes are not allowed\") }\n\n this.text = content;\n }\n\n if ( Node ) TextNode.__proto__ = Node;\n TextNode.prototype = Object.create( Node && Node.prototype );\n TextNode.prototype.constructor = TextNode;\n\n var prototypeAccessors$1 = { textContent: { configurable: true },nodeSize: { configurable: true } };\n\n TextNode.prototype.toString = function toString () {\n if (this.type.spec.toDebugString) { return this.type.spec.toDebugString(this) }\n return wrapMarks(this.marks, JSON.stringify(this.text))\n };\n\n prototypeAccessors$1.textContent.get = function () { return this.text };\n\n TextNode.prototype.textBetween = function textBetween (from, to) { return this.text.slice(from, to) };\n\n prototypeAccessors$1.nodeSize.get = function () { return this.text.length };\n\n TextNode.prototype.mark = function mark (marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks)\n };\n\n TextNode.prototype.withText = function withText (text) {\n if (text == this.text) { return this }\n return new TextNode(this.type, this.attrs, text, this.marks)\n };\n\n TextNode.prototype.cut = function cut (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.text.length;\n\n if (from == 0 && to == this.text.length) { return this }\n return this.withText(this.text.slice(from, to))\n };\n\n TextNode.prototype.eq = function eq (other) {\n return this.sameMarkup(other) && this.text == other.text\n };\n\n TextNode.prototype.toJSON = function toJSON () {\n var base = Node.prototype.toJSON.call(this);\n base.text = this.text;\n return base\n };\n\n Object.defineProperties( TextNode.prototype, prototypeAccessors$1 );\n\n return TextNode;\n}(Node));\n\nfunction wrapMarks(marks, str) {\n for (var i = marks.length - 1; i >= 0; i--)\n { str = marks[i].type.name + \"(\" + str + \")\"; }\n return str\n}\n\n// ::- Instances of this class represent a match state of a node\n// type's [content expression](#model.NodeSpec.content), and can be\n// used to find out whether further content matches here, and whether\n// a given position is a valid end of the node.\nvar ContentMatch = function ContentMatch(validEnd) {\n // :: bool\n // True when this match state represents a valid end of the node.\n this.validEnd = validEnd;\n this.next = [];\n this.wrapCache = [];\n};\n\nvar prototypeAccessors$4 = { inlineContent: { configurable: true },defaultType: { configurable: true },edgeCount: { configurable: true } };\n\nContentMatch.parse = function parse (string, nodeTypes) {\n var stream = new TokenStream(string, nodeTypes);\n if (stream.next == null) { return ContentMatch.empty }\n var expr = parseExpr(stream);\n if (stream.next) { stream.err(\"Unexpected trailing text\"); }\n var match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match\n};\n\n// :: (NodeType) → ?ContentMatch\n// Match a node type, returning a match after that node if\n// successful.\nContentMatch.prototype.matchType = function matchType (type) {\n for (var i = 0; i < this.next.length; i += 2)\n { if (this.next[i] == type) { return this.next[i + 1] } }\n return null\n};\n\n// :: (Fragment, ?number, ?number) → ?ContentMatch\n// Try to match a fragment. Returns the resulting match when\n// successful.\nContentMatch.prototype.matchFragment = function matchFragment (frag, start, end) {\n if ( start === void 0 ) start = 0;\n if ( end === void 0 ) end = frag.childCount;\n\n var cur = this;\n for (var i = start; cur && i < end; i++)\n { cur = cur.matchType(frag.child(i).type); }\n return cur\n};\n\nprototypeAccessors$4.inlineContent.get = function () {\n var first = this.next[0];\n return first ? first.isInline : false\n};\n\n// :: ?NodeType\n// Get the first matching node type at this match position that can\n// be generated.\nprototypeAccessors$4.defaultType.get = function () {\n for (var i = 0; i < this.next.length; i += 2) {\n var type = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs())) { return type }\n }\n};\n\nContentMatch.prototype.compatible = function compatible (other) {\n for (var i = 0; i < this.next.length; i += 2)\n { for (var j = 0; j < other.next.length; j += 2)\n { if (this.next[i] == other.next[j]) { return true } } }\n return false\n};\n\n// :: (Fragment, bool, ?number) → ?Fragment\n// Try to match the given fragment, and if that fails, see if it can\n// be made to match by inserting nodes in front of it. When\n// successful, return a fragment of inserted nodes (which may be\n// empty if nothing had to be inserted). When `toEnd` is true, only\n// return a fragment if the resulting match goes to the end of the\n// content expression.\nContentMatch.prototype.fillBefore = function fillBefore (after, toEnd, startIndex) {\n if ( toEnd === void 0 ) toEnd = false;\n if ( startIndex === void 0 ) startIndex = 0;\n\n var seen = [this];\n function search(match, types) {\n var finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n { return Fragment.from(types.map(function (tp) { return tp.createAndFill(); })) }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i], next = match.next[i + 1];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n var found = search(next, types.concat(type));\n if (found) { return found }\n }\n }\n }\n\n return search(this, [])\n};\n\n// :: (NodeType) → ?[NodeType]\n// Find a set of wrapping node types that would allow a node of the\n// given type to appear at this position. The result may be empty\n// (when it fits directly) and will be null when no such wrapping\n// exists.\nContentMatch.prototype.findWrapping = function findWrapping (target) {\n for (var i = 0; i < this.wrapCache.length; i += 2)\n { if (this.wrapCache[i] == target) { return this.wrapCache[i + 1] } }\n var computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed\n};\n\nContentMatch.prototype.computeWrapping = function computeWrapping (target) {\n var seen = Object.create(null), active = [{match: this, type: null, via: null}];\n while (active.length) {\n var current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n var result = [];\n for (var obj = current; obj.type; obj = obj.via)\n { result.push(obj.type); }\n return result.reverse()\n }\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) {\n active.push({match: type.contentMatch, type: type, via: current});\n seen[type.name] = true;\n }\n }\n }\n};\n\n// :: number\n// The number of outgoing edges this node has in the finite\n// automaton that describes the content expression.\nprototypeAccessors$4.edgeCount.get = function () {\n return this.next.length >> 1\n};\n\n// :: (number) → {type: NodeType, next: ContentMatch}\n// Get the _n_​th outgoing edge from this node in the finite\n// automaton that describes the content expression.\nContentMatch.prototype.edge = function edge (n) {\n var i = n << 1;\n if (i >= this.next.length) { throw new RangeError((\"There's no \" + n + \"th edge in this content match\")) }\n return {type: this.next[i], next: this.next[i + 1]}\n};\n\nContentMatch.prototype.toString = function toString () {\n var seen = [];\n function scan(m) {\n seen.push(m);\n for (var i = 1; i < m.next.length; i += 2)\n { if (seen.indexOf(m.next[i]) == -1) { scan(m.next[i]); } }\n }\n scan(this);\n return seen.map(function (m, i) {\n var out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (var i$1 = 0; i$1 < m.next.length; i$1 += 2)\n { out += (i$1 ? \", \" : \"\") + m.next[i$1].name + \"->\" + seen.indexOf(m.next[i$1 + 1]); }\n return out\n }).join(\"\\n\")\n};\n\nObject.defineProperties( ContentMatch.prototype, prototypeAccessors$4 );\n\nContentMatch.empty = new ContentMatch(true);\n\nvar TokenStream = function TokenStream(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\") { this.tokens.pop(); }\n if (this.tokens[0] == \"\") { this.tokens.unshift(); }\n};\n\nvar prototypeAccessors$1$2 = { next: { configurable: true } };\n\nprototypeAccessors$1$2.next.get = function () { return this.tokens[this.pos] };\n\nTokenStream.prototype.eat = function eat (tok) { return this.next == tok && (this.pos++ || true) };\n\nTokenStream.prototype.err = function err (str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\") };\n\nObject.defineProperties( TokenStream.prototype, prototypeAccessors$1$2 );\n\nfunction parseExpr(stream) {\n var exprs = [];\n do { exprs.push(parseExprSeq(stream)); }\n while (stream.eat(\"|\"))\n return exprs.length == 1 ? exprs[0] : {type: \"choice\", exprs: exprs}\n}\n\nfunction parseExprSeq(stream) {\n var exprs = [];\n do { exprs.push(parseExprSubscript(stream)); }\n while (stream.next && stream.next != \")\" && stream.next != \"|\")\n return exprs.length == 1 ? exprs[0] : {type: \"seq\", exprs: exprs}\n}\n\nfunction parseExprSubscript(stream) {\n var expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n { expr = {type: \"plus\", expr: expr}; }\n else if (stream.eat(\"*\"))\n { expr = {type: \"star\", expr: expr}; }\n else if (stream.eat(\"?\"))\n { expr = {type: \"opt\", expr: expr}; }\n else if (stream.eat(\"{\"))\n { expr = parseExprRange(stream, expr); }\n else { break }\n }\n return expr\n}\n\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next)) { stream.err(\"Expected number, got '\" + stream.next + \"'\"); }\n var result = Number(stream.next);\n stream.pos++;\n return result\n}\n\nfunction parseExprRange(stream, expr) {\n var min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\") { max = parseNum(stream); }\n else { max = -1; }\n }\n if (!stream.eat(\"}\")) { stream.err(\"Unclosed braced range\"); }\n return {type: \"range\", min: min, max: max, expr: expr}\n}\n\nfunction resolveName(stream, name) {\n var types = stream.nodeTypes, type = types[name];\n if (type) { return [type] }\n var result = [];\n for (var typeName in types) {\n var type$1 = types[typeName];\n if (type$1.groups.indexOf(name) > -1) { result.push(type$1); }\n }\n if (result.length == 0) { stream.err(\"No node type or group '\" + name + \"' found\"); }\n return result\n}\n\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n var expr = parseExpr(stream);\n if (!stream.eat(\")\")) { stream.err(\"Missing closing paren\"); }\n return expr\n } else if (!/\\W/.test(stream.next)) {\n var exprs = resolveName(stream, stream.next).map(function (type) {\n if (stream.inline == null) { stream.inline = type.isInline; }\n else if (stream.inline != type.isInline) { stream.err(\"Mixing inline and block content\"); }\n return {type: \"name\", value: type}\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : {type: \"choice\", exprs: exprs}\n } else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n\n// The code below helps compile a regular-expression-like language\n// into a deterministic finite automaton. For a good introduction to\n// these concepts, see https://swtch.com/~rsc/regexp/regexp1.html\n\n// : (Object) → [[{term: ?any, to: number}]]\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n var nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa\n\n function node() { return nfa.push([]) - 1 }\n function edge(from, to, term) {\n var edge = {term: term, to: to};\n nfa[from].push(edge);\n return edge\n }\n function connect(edges, to) { edges.forEach(function (edge) { return edge.to = to; }); }\n\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce(function (out, expr) { return out.concat(compile(expr, from)); }, [])\n } else if (expr.type == \"seq\") {\n for (var i = 0;; i++) {\n var next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1) { return next }\n connect(next, from = node());\n }\n } else if (expr.type == \"star\") {\n var loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)]\n } else if (expr.type == \"plus\") {\n var loop$1 = node();\n connect(compile(expr.expr, from), loop$1);\n connect(compile(expr.expr, loop$1), loop$1);\n return [edge(loop$1)]\n } else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from))\n } else if (expr.type == \"range\") {\n var cur = from;\n for (var i$1 = 0; i$1 < expr.min; i$1++) {\n var next$1 = node();\n connect(compile(expr.expr, cur), next$1);\n cur = next$1;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n } else {\n for (var i$2 = expr.min; i$2 < expr.max; i$2++) {\n var next$2 = node();\n edge(cur, next$2);\n connect(compile(expr.expr, cur), next$2);\n cur = next$2;\n }\n }\n return [edge(cur)]\n } else if (expr.type == \"name\") {\n return [edge(from, null, expr.value)]\n }\n }\n}\n\nfunction cmp(a, b) { return b - a }\n\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n var result = [];\n scan(node);\n return result.sort(cmp)\n\n function scan(node) {\n var edges = nfa[node];\n if (edges.length == 1 && !edges[0].term) { return scan(edges[0].to) }\n result.push(node);\n for (var i = 0; i < edges.length; i++) {\n var ref = edges[i];\n var term = ref.term;\n var to = ref.to;\n if (!term && result.indexOf(to) == -1) { scan(to); }\n }\n }\n}\n\n// : ([[{term: ?any, to: number}]]) → ContentMatch\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n var labeled = Object.create(null);\n return explore(nullFrom(nfa, 0))\n\n function explore(states) {\n var out = [];\n states.forEach(function (node) {\n nfa[node].forEach(function (ref) {\n var term = ref.term;\n var to = ref.to;\n\n if (!term) { return }\n var known = out.indexOf(term), set = known > -1 && out[known + 1];\n nullFrom(nfa, to).forEach(function (node) {\n if (!set) { out.push(term, set = []); }\n if (set.indexOf(node) == -1) { set.push(node); }\n });\n });\n });\n var state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (var i = 0; i < out.length; i += 2) {\n var states$1 = out[i + 1].sort(cmp);\n state.next.push(out[i], labeled[states$1.join(\",\")] || explore(states$1));\n }\n return state\n }\n}\n\nfunction checkForDeadEnds(match, stream) {\n for (var i = 0, work = [match]; i < work.length; i++) {\n var state = work[i], dead = !state.validEnd, nodes = [];\n for (var j = 0; j < state.next.length; j += 2) {\n var node = state.next[j], next = state.next[j + 1];\n nodes.push(node.name);\n if (dead && !(node.isText || node.hasRequiredAttrs())) { dead = false; }\n if (work.indexOf(next) == -1) { work.push(next); }\n }\n if (dead) { stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position\"); }\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n var defaults = Object.create(null);\n for (var attrName in attrs) {\n var attr = attrs[attrName];\n if (!attr.hasDefault) { return null }\n defaults[attrName] = attr.default;\n }\n return defaults\n}\n\nfunction computeAttrs(attrs, value) {\n var built = Object.create(null);\n for (var name in attrs) {\n var given = value && value[name];\n if (given === undefined) {\n var attr = attrs[name];\n if (attr.hasDefault) { given = attr.default; }\n else { throw new RangeError(\"No value supplied for attribute \" + name) }\n }\n built[name] = given;\n }\n return built\n}\n\nfunction initAttrs(attrs) {\n var result = Object.create(null);\n if (attrs) { for (var name in attrs) { result[name] = new Attribute(attrs[name]); } }\n return result\n}\n\n// ::- Node types are objects allocated once per `Schema` and used to\n// [tag](#model.Node.type) `Node` instances. They contain information\n// about the node type, such as its name and what kind of node it\n// represents.\nvar NodeType = function NodeType(name, schema, spec) {\n // :: string\n // The name the node type has in this schema.\n this.name = name;\n\n // :: Schema\n // A link back to the `Schema` the node type belongs to.\n this.schema = schema;\n\n // :: NodeSpec\n // The spec that this type is based on\n this.spec = spec;\n\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(spec.attrs);\n\n this.defaultAttrs = defaultAttrs(this.attrs);\n\n // :: ContentMatch\n // The starting match of the node type's content expression.\n this.contentMatch = null;\n\n // : ?[MarkType]\n // The set of marks allowed in this node. `null` means all marks\n // are allowed.\n this.markSet = null;\n\n // :: bool\n // True if this node type has inline content.\n this.inlineContent = null;\n\n // :: bool\n // True if this is a block type\n this.isBlock = !(spec.inline || name == \"text\");\n\n // :: bool\n // True if this is the text node type.\n this.isText = name == \"text\";\n};\n\nvar prototypeAccessors$5 = { isInline: { configurable: true },isTextblock: { configurable: true },isLeaf: { configurable: true },isAtom: { configurable: true } };\n\n// :: bool\n// True if this is an inline type.\nprototypeAccessors$5.isInline.get = function () { return !this.isBlock };\n\n// :: bool\n// True if this is a textblock type, a block that contains inline\n// content.\nprototypeAccessors$5.isTextblock.get = function () { return this.isBlock && this.inlineContent };\n\n// :: bool\n// True for node types that allow no content.\nprototypeAccessors$5.isLeaf.get = function () { return this.contentMatch == ContentMatch.empty };\n\n// :: bool\n// True when this node is an atom, i.e. when it does not have\n// directly editable content.\nprototypeAccessors$5.isAtom.get = function () { return this.isLeaf || this.spec.atom };\n\n// :: () → bool\n// Tells you whether this node type has any required attributes.\nNodeType.prototype.hasRequiredAttrs = function hasRequiredAttrs () {\n for (var n in this.attrs) { if (this.attrs[n].isRequired) { return true } }\n return false\n};\n\nNodeType.prototype.compatibleContent = function compatibleContent (other) {\n return this == other || this.contentMatch.compatible(other.contentMatch)\n};\n\nNodeType.prototype.computeAttrs = function computeAttrs$1 (attrs) {\n if (!attrs && this.defaultAttrs) { return this.defaultAttrs }\n else { return computeAttrs(this.attrs, attrs) }\n};\n\n// :: (?Object, ?union, ?[Mark]) → Node\n// Create a `Node` of this type. The given attributes are\n// checked and defaulted (you can pass `null` to use the type's\n// defaults entirely, if no required attributes exist). `content`\n// may be a `Fragment`, a node, an array of nodes, or\n// `null`. Similarly `marks` may be `null` to default to the empty\n// set of marks.\nNodeType.prototype.create = function create (attrs, content, marks) {\n if (this.isText) { throw new Error(\"NodeType.create can't construct text nodes\") }\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks))\n};\n\n// :: (?Object, ?union, ?[Mark]) → Node\n// Like [`create`](#model.NodeType.create), but check the given content\n// against the node type's content restrictions, and throw an error\n// if it doesn't match.\nNodeType.prototype.createChecked = function createChecked (attrs, content, marks) {\n content = Fragment.from(content);\n if (!this.validContent(content))\n { throw new RangeError(\"Invalid content for node \" + this.name) }\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks))\n};\n\n// :: (?Object, ?union, ?[Mark]) → ?Node\n// Like [`create`](#model.NodeType.create), but see if it is necessary to\n// add nodes to the start or end of the given fragment to make it\n// fit the node. If no fitting wrapping can be found, return null.\n// Note that, due to the fact that required nodes can always be\n// created, this will always succeed if you pass null or\n// `Fragment.empty` as content.\nNodeType.prototype.createAndFill = function createAndFill (attrs, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n var before = this.contentMatch.fillBefore(content);\n if (!before) { return null }\n content = before.append(content);\n }\n var after = this.contentMatch.matchFragment(content).fillBefore(Fragment.empty, true);\n if (!after) { return null }\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks))\n};\n\n// :: (Fragment) → bool\n// Returns true if the given fragment is valid content for this node\n// type with the given attributes.\nNodeType.prototype.validContent = function validContent (content) {\n var result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd) { return false }\n for (var i = 0; i < content.childCount; i++)\n { if (!this.allowsMarks(content.child(i).marks)) { return false } }\n return true\n};\n\n// :: (MarkType) → bool\n// Check whether the given mark type is allowed in this node.\nNodeType.prototype.allowsMarkType = function allowsMarkType (markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1\n};\n\n// :: ([Mark]) → bool\n// Test whether the given set of marks are allowed in this node.\nNodeType.prototype.allowsMarks = function allowsMarks (marks) {\n if (this.markSet == null) { return true }\n for (var i = 0; i < marks.length; i++) { if (!this.allowsMarkType(marks[i].type)) { return false } }\n return true\n};\n\n// :: ([Mark]) → [Mark]\n// Removes the marks that are not allowed in this node from the given set.\nNodeType.prototype.allowedMarks = function allowedMarks (marks) {\n if (this.markSet == null) { return marks }\n var copy;\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy) { copy = marks.slice(0, i); }\n } else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.empty\n};\n\nNodeType.compile = function compile (nodes, schema) {\n var result = Object.create(null);\n nodes.forEach(function (name, spec) { return result[name] = new NodeType(name, schema, spec); });\n\n var topType = schema.spec.topNode || \"doc\";\n if (!result[topType]) { throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\") }\n if (!result.text) { throw new RangeError(\"Every schema needs a 'text' type\") }\n for (var _ in result.text.attrs) { throw new RangeError(\"The text node type should not have attributes\") }\n\n return result\n};\n\nObject.defineProperties( NodeType.prototype, prototypeAccessors$5 );\n\n// Attribute descriptors\n\nvar Attribute = function Attribute(options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n};\n\nvar prototypeAccessors$1$3 = { isRequired: { configurable: true } };\n\nprototypeAccessors$1$3.isRequired.get = function () {\n return !this.hasDefault\n};\n\nObject.defineProperties( Attribute.prototype, prototypeAccessors$1$3 );\n\n// Marks\n\n// ::- Like nodes, marks (which are associated with nodes to signify\n// things like emphasis or being part of a link) are\n// [tagged](#model.Mark.type) with type objects, which are\n// instantiated once per `Schema`.\nvar MarkType = function MarkType(name, rank, schema, spec) {\n // :: string\n // The name of the mark type.\n this.name = name;\n\n // :: Schema\n // The schema that this mark type instance is part of.\n this.schema = schema;\n\n // :: MarkSpec\n // The spec on which the type is based.\n this.spec = spec;\n\n this.attrs = initAttrs(spec.attrs);\n\n this.rank = rank;\n this.excluded = null;\n var defaults = defaultAttrs(this.attrs);\n this.instance = defaults && new Mark(this, defaults);\n};\n\n// :: (?Object) → Mark\n// Create a mark of this type. `attrs` may be `null` or an object\n// containing only some of the mark's attributes. The others, if\n// they have defaults, will be added.\nMarkType.prototype.create = function create (attrs) {\n if (!attrs && this.instance) { return this.instance }\n return new Mark(this, computeAttrs(this.attrs, attrs))\n};\n\nMarkType.compile = function compile (marks, schema) {\n var result = Object.create(null), rank = 0;\n marks.forEach(function (name, spec) { return result[name] = new MarkType(name, rank++, schema, spec); });\n return result\n};\n\n// :: ([Mark]) → [Mark]\n// When there is a mark of this type in the given set, a new set\n// without it is returned. Otherwise, the input set is returned.\nMarkType.prototype.removeFromSet = function removeFromSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (set[i].type == this)\n { return set.slice(0, i).concat(set.slice(i + 1)) } }\n return set\n};\n\n// :: ([Mark]) → ?Mark\n// Tests whether there is a mark of this type in the given set.\nMarkType.prototype.isInSet = function isInSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (set[i].type == this) { return set[i] } }\n};\n\n// :: (MarkType) → bool\n// Queries whether a given mark type is\n// [excluded](#model.MarkSpec.excludes) by this one.\nMarkType.prototype.excludes = function excludes (other) {\n return this.excluded.indexOf(other) > -1\n};\n\n// SchemaSpec:: interface\n// An object describing a schema, as passed to the [`Schema`](#model.Schema)\n// constructor.\n//\n// nodes:: union, OrderedMap>\n// The node types in this schema. Maps names to\n// [`NodeSpec`](#model.NodeSpec) objects that describe the node type\n// associated with that name. Their order is significant—it\n// determines which [parse rules](#model.NodeSpec.parseDOM) take\n// precedence by default, and which nodes come first in a given\n// [group](#model.NodeSpec.group).\n//\n// marks:: ?union, OrderedMap>\n// The mark types that exist in this schema. The order in which they\n// are provided determines the order in which [mark\n// sets](#model.Mark.addToSet) are sorted and in which [parse\n// rules](#model.MarkSpec.parseDOM) are tried.\n//\n// topNode:: ?string\n// The name of the default top-level node for the schema. Defaults\n// to `\"doc\"`.\n\n// NodeSpec:: interface\n//\n// content:: ?string\n// The content expression for this node, as described in the [schema\n// guide](/docs/guide/#schema.content_expressions). When not given,\n// the node does not allow any content.\n//\n// marks:: ?string\n// The marks that are allowed inside of this node. May be a\n// space-separated string referring to mark names or groups, `\"_\"`\n// to explicitly allow all marks, or `\"\"` to disallow marks. When\n// not given, nodes with inline content default to allowing all\n// marks, other nodes default to not allowing marks.\n//\n// group:: ?string\n// The group or space-separated groups to which this node belongs,\n// which can be referred to in the content expressions for the\n// schema.\n//\n// inline:: ?bool\n// Should be set to true for inline nodes. (Implied for text nodes.)\n//\n// atom:: ?bool\n// Can be set to true to indicate that, though this isn't a [leaf\n// node](#model.NodeType.isLeaf), it doesn't have directly editable\n// content and should be treated as a single unit in the view.\n//\n// attrs:: ?Object\n// The attributes that nodes of this type get.\n//\n// selectable:: ?bool\n// Controls whether nodes of this type can be selected as a [node\n// selection](#state.NodeSelection). Defaults to true for non-text\n// nodes.\n//\n// draggable:: ?bool\n// Determines whether nodes of this type can be dragged without\n// being selected. Defaults to false.\n//\n// code:: ?bool\n// Can be used to indicate that this node contains code, which\n// causes some commands to behave differently.\n//\n// defining:: ?bool\n// Determines whether this node is considered an important parent\n// node during replace operations (such as paste). Non-defining (the\n// default) nodes get dropped when their entire content is replaced,\n// whereas defining nodes persist and wrap the inserted content.\n// Likewise, in _inserted_ content the defining parents of the\n// content are preserved when possible. Typically,\n// non-default-paragraph textblock types, and possibly list items,\n// are marked as defining.\n//\n// isolating:: ?bool\n// When enabled (default is false), the sides of nodes of this type\n// count as boundaries that regular editing operations, like\n// backspacing or lifting, won't cross. An example of a node that\n// should probably have this enabled is a table cell.\n//\n// toDOM:: ?(node: Node) → DOMOutputSpec\n// Defines the default way a node of this type should be serialized\n// to DOM/HTML (as used by\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)).\n// Should return a DOM node or an [array\n// structure](#model.DOMOutputSpec) that describes one, with an\n// optional number zero (“hole”) in it to indicate where the node's\n// content should be inserted.\n//\n// For text nodes, the default is to create a text DOM node. Though\n// it is possible to create a serializer where text is rendered\n// differently, this is not supported inside the editor, so you\n// shouldn't override that in your text node spec.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this node, which can be\n// used by [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) to\n// automatically derive a parser. The `node` field in the rules is\n// implied (the name of this node will be filled in automatically).\n// If you supply your own parser, you do not need to also specify\n// parsing rules in your schema.\n//\n// toDebugString:: ?(node: Node) -> string\n// Defines the default way a node of this type should be serialized\n// to a string representation for debugging (e.g. in error messages).\n\n// MarkSpec:: interface\n//\n// attrs:: ?Object\n// The attributes that marks of this type get.\n//\n// inclusive:: ?bool\n// Whether this mark should be active when the cursor is positioned\n// at its end (or at its start when that is also the start of the\n// parent node). Defaults to true.\n//\n// excludes:: ?string\n// Determines which other marks this mark can coexist with. Should\n// be a space-separated strings naming other marks or groups of marks.\n// When a mark is [added](#model.Mark.addToSet) to a set, all marks\n// that it excludes are removed in the process. If the set contains\n// any mark that excludes the new mark but is not, itself, excluded\n// by the new mark, the mark can not be added an the set. You can\n// use the value `\"_\"` to indicate that the mark excludes all\n// marks in the schema.\n//\n// Defaults to only being exclusive with marks of the same type. You\n// can set it to an empty string (or any string not containing the\n// mark's own name) to allow multiple marks of a given type to\n// coexist (as long as they have different attributes).\n//\n// group:: ?string\n// The group or space-separated groups to which this mark belongs.\n//\n// spanning:: ?bool\n// Determines whether marks of this type can span multiple adjacent\n// nodes when serialized to DOM/HTML. Defaults to true.\n//\n// toDOM:: ?(mark: Mark, inline: bool) → DOMOutputSpec\n// Defines the default way marks of this type should be serialized\n// to DOM/HTML. When the resulting spec contains a hole, that is\n// where the marked content is placed. Otherwise, it is appended to\n// the top node.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this mark (see the\n// corresponding [node spec field](#model.NodeSpec.parseDOM)). The\n// `mark` field in the rules is implied.\n\n// AttributeSpec:: interface\n//\n// Used to [define](#model.NodeSpec.attrs) attributes on nodes or\n// marks.\n//\n// default:: ?any\n// The default value for this attribute, to use when no explicit\n// value is provided. Attributes that have no default must be\n// provided whenever a node or mark of a type that has them is\n// created.\n\n// ::- A document schema. Holds [node](#model.NodeType) and [mark\n// type](#model.MarkType) objects for the nodes and marks that may\n// occur in conforming documents, and provides functionality for\n// creating and deserializing such documents.\nvar Schema = function Schema(spec) {\n // :: SchemaSpec\n // The [spec](#model.SchemaSpec) on which the schema is based,\n // with the added guarantee that its `nodes` and `marks`\n // properties are\n // [`OrderedMap`](https://github.com/marijnh/orderedmap) instances\n // (not raw objects).\n this.spec = {};\n for (var prop in spec) { this.spec[prop] = spec[prop]; }\n this.spec.nodes = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.nodes);\n this.spec.marks = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.marks);\n\n // :: Object\n // An object mapping the schema's node names to node type objects.\n this.nodes = NodeType.compile(this.spec.nodes, this);\n\n // :: Object\n // A map from mark names to mark type objects.\n this.marks = MarkType.compile(this.spec.marks, this);\n\n var contentExprCache = Object.create(null);\n for (var prop$1 in this.nodes) {\n if (prop$1 in this.marks)\n { throw new RangeError(prop$1 + \" can not be both a node and a mark\") }\n var type = this.nodes[prop$1], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (var prop$2 in this.marks) {\n var type$1 = this.marks[prop$2], excl = type$1.spec.excludes;\n type$1.excluded = excl == null ? [type$1] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n\n // :: NodeType\n // The type of the [default top node](#model.SchemaSpec.topNode)\n // for this schema.\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n\n // :: Object\n // An object for storing whatever values modules may want to\n // compute and cache per schema. (If you want to store something\n // in it, try to use property names unlikely to clash.)\n this.cached = Object.create(null);\n this.cached.wrappings = Object.create(null);\n};\n\n// :: (union, ?Object, ?union, ?[Mark]) → Node\n// Create a node in this schema. The `type` may be a string or a\n// `NodeType` instance. Attributes will be extended\n// with defaults, `content` may be a `Fragment`,\n// `null`, a `Node`, or an array of nodes.\nSchema.prototype.node = function node (type, attrs, content, marks) {\n if (typeof type == \"string\")\n { type = this.nodeType(type); }\n else if (!(type instanceof NodeType))\n { throw new RangeError(\"Invalid node type: \" + type) }\n else if (type.schema != this)\n { throw new RangeError(\"Node type from different schema used (\" + type.name + \")\") }\n\n return type.createChecked(attrs, content, marks)\n};\n\n// :: (string, ?[Mark]) → Node\n// Create a text node in the schema. Empty text nodes are not\n// allowed.\nSchema.prototype.text = function text (text$1, marks) {\n var type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text$1, Mark.setFrom(marks))\n};\n\n// :: (union, ?Object) → Mark\n// Create a mark with the given type and attributes.\nSchema.prototype.mark = function mark (type, attrs) {\n if (typeof type == \"string\") { type = this.marks[type]; }\n return type.create(attrs)\n};\n\n// :: (Object) → Node\n// Deserialize a node from its JSON representation. This method is\n// bound.\nSchema.prototype.nodeFromJSON = function nodeFromJSON (json) {\n return Node.fromJSON(this, json)\n};\n\n// :: (Object) → Mark\n// Deserialize a mark from its JSON representation. This method is\n// bound.\nSchema.prototype.markFromJSON = function markFromJSON (json) {\n return Mark.fromJSON(this, json)\n};\n\nSchema.prototype.nodeType = function nodeType (name) {\n var found = this.nodes[name];\n if (!found) { throw new RangeError(\"Unknown node type: \" + name) }\n return found\n};\n\nfunction gatherMarks(schema, marks) {\n var found = [];\n for (var i = 0; i < marks.length; i++) {\n var name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n } else {\n for (var prop in schema.marks) {\n var mark$1 = schema.marks[prop];\n if (name == \"_\" || (mark$1.spec.group && mark$1.spec.group.split(\" \").indexOf(name) > -1))\n { found.push(ok = mark$1); }\n }\n }\n if (!ok) { throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\") }\n }\n return found\n}\n\n// ParseOptions:: interface\n// These are the options recognized by the\n// [`parse`](#model.DOMParser.parse) and\n// [`parseSlice`](#model.DOMParser.parseSlice) methods.\n//\n// preserveWhitespace:: ?union\n// By default, whitespace is collapsed as per HTML's rules. Pass\n// `true` to preserve whitespace, but normalize newlines to\n// spaces, and `\"full\"` to preserve whitespace entirely.\n//\n// findPositions:: ?[{node: dom.Node, offset: number}]\n// When given, the parser will, beside parsing the content,\n// record the document positions of the given DOM positions. It\n// will do so by writing to the objects, adding a `pos` property\n// that holds the document position. DOM positions that are not\n// in the parsed content will not be written to.\n//\n// from:: ?number\n// The child node index to start parsing from.\n//\n// to:: ?number\n// The child node index to stop parsing at.\n//\n// topNode:: ?Node\n// By default, the content is parsed into the schema's default\n// [top node type](#model.Schema.topNodeType). You can pass this\n// option to use the type and attributes from a different node\n// as the top container.\n//\n// topMatch:: ?ContentMatch\n// Provide the starting content match that content parsed into the\n// top node is matched against.\n//\n// context:: ?ResolvedPos\n// A set of additional nodes to count as\n// [context](#model.ParseRule.context) when parsing, above the\n// given [top node](#model.ParseOptions.topNode).\n\n// ParseRule:: interface\n// A value that describes how to parse a given DOM node or inline\n// style as a ProseMirror node or mark.\n//\n// tag:: ?string\n// A CSS selector describing the kind of DOM elements to match. A\n// single rule should have _either_ a `tag` or a `style` property.\n//\n// namespace:: ?string\n// The namespace to match. This should be used with `tag`.\n// Nodes are only matched when the namespace matches or this property\n// is null.\n//\n// style:: ?string\n// A CSS property name to match. When given, this rule matches\n// inline styles that list that property. May also have the form\n// `\"property=value\"`, in which case the rule only matches if the\n// propery's value exactly matches the given value. (For more\n// complicated filters, use [`getAttrs`](#model.ParseRule.getAttrs)\n// and return false to indicate that the match failed.)\n//\n// priority:: ?number\n// Can be used to change the order in which the parse rules in a\n// schema are tried. Those with higher priority come first. Rules\n// without a priority are counted as having priority 50. This\n// property is only meaningful in a schema—when directly\n// constructing a parser, the order of the rule array is used.\n//\n// context:: ?string\n// When given, restricts this rule to only match when the current\n// context—the parent nodes into which the content is being\n// parsed—matches this expression. Should contain one or more node\n// names or node group names followed by single or double slashes.\n// For example `\"paragraph/\"` means the rule only matches when the\n// parent node is a paragraph, `\"blockquote/paragraph/\"` restricts\n// it to be in a paragraph that is inside a blockquote, and\n// `\"section//\"` matches any position inside a section—a double\n// slash matches any sequence of ancestor nodes. To allow multiple\n// different contexts, they can be separated by a pipe (`|`)\n// character, as in `\"blockquote/|list_item/\"`.\n//\n// node:: ?string\n// The name of the node type to create when this rule matches. Only\n// valid for rules with a `tag` property, not for style rules. Each\n// rule should have one of a `node`, `mark`, or `ignore` property\n// (except when it appears in a [node](#model.NodeSpec.parseDOM) or\n// [mark spec](#model.MarkSpec.parseDOM), in which case the `node`\n// or `mark` property will be derived from its position).\n//\n// mark:: ?string\n// The name of the mark type to wrap the matched content in.\n//\n// ignore:: ?bool\n// When true, ignore content that matches this rule.\n//\n// skip:: ?bool\n// When true, ignore the node that matches this rule, but do parse\n// its content.\n//\n// attrs:: ?Object\n// Attributes for the node or mark created by this rule. When\n// `getAttrs` is provided, it takes precedence.\n//\n// getAttrs:: ?(union) → ?union\n// A function used to compute the attributes for the node or mark\n// created by this rule. Can also be used to describe further\n// conditions the DOM element or style must match. When it returns\n// `false`, the rule won't match. When it returns null or undefined,\n// that is interpreted as an empty/default set of attributes.\n//\n// Called with a DOM Element for `tag` rules, and with a string (the\n// style's value) for `style` rules.\n//\n// contentElement:: ?union\n// For `tag` rules that produce non-leaf nodes or marks, by default\n// the content of the DOM element is parsed as content of the mark\n// or node. If the child nodes are in a descendent node, this may be\n// a CSS selector string that the parser must use to find the actual\n// content element, or a function that returns the actual content\n// element to the parser.\n//\n// getContent:: ?(dom.Node, schema: Schema) → Fragment\n// Can be used to override the content of a matched node. When\n// present, instead of parsing the node's child nodes, the result of\n// this function is used.\n//\n// preserveWhitespace:: ?union\n// Controls whether whitespace should be preserved when parsing the\n// content inside the matched element. `false` means whitespace may\n// be collapsed, `true` means that whitespace should be preserved\n// but newlines normalized to spaces, and `\"full\"` means that\n// newlines should also be preserved.\n\n// ::- A DOM parser represents a strategy for parsing DOM content into\n// a ProseMirror document conforming to a given schema. Its behavior\n// is defined by an array of [rules](#model.ParseRule).\nvar DOMParser = function DOMParser(schema, rules) {\n var this$1 = this;\n\n // :: Schema\n // The schema into which the parser parses.\n this.schema = schema;\n // :: [ParseRule]\n // The set of [parse rules](#model.ParseRule) that the parser\n // uses, in order of precedence.\n this.rules = rules;\n this.tags = [];\n this.styles = [];\n\n rules.forEach(function (rule) {\n if (rule.tag) { this$1.tags.push(rule); }\n else if (rule.style) { this$1.styles.push(rule); }\n });\n};\n\n// :: (dom.Node, ?ParseOptions) → Node\n// Parse a document from the content of a DOM node.\nDOMParser.prototype.parse = function parse (dom, options) {\n if ( options === void 0 ) options = {};\n\n var context = new ParseContext(this, options, false);\n context.addAll(dom, null, options.from, options.to);\n return context.finish()\n};\n\n// :: (dom.Node, ?ParseOptions) → Slice\n// Parses the content of the given DOM node, like\n// [`parse`](#model.DOMParser.parse), and takes the same set of\n// options. But unlike that method, which produces a whole node,\n// this one returns a slice that is open at the sides, meaning that\n// the schema constraints aren't applied to the start of nodes to\n// the left of the input and the end of nodes at the end.\nDOMParser.prototype.parseSlice = function parseSlice (dom, options) {\n if ( options === void 0 ) options = {};\n\n var context = new ParseContext(this, options, true);\n context.addAll(dom, null, options.from, options.to);\n return Slice.maxOpen(context.finish())\n};\n\nDOMParser.prototype.matchTag = function matchTag (dom, context) {\n for (var i = 0; i < this.tags.length; i++) {\n var rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n var result = rule.getAttrs(dom);\n if (result === false) { continue }\n rule.attrs = result;\n }\n return rule\n }\n }\n};\n\nDOMParser.prototype.matchStyle = function matchStyle (prop, value, context) {\n for (var i = 0; i < this.styles.length; i++) {\n var rule = this.styles[i];\n if (rule.style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n rule.style.length > prop.length &&\n (rule.style.charCodeAt(prop.length) != 61 || rule.style.slice(prop.length + 1) != value))\n { continue }\n if (rule.getAttrs) {\n var result = rule.getAttrs(value);\n if (result === false) { continue }\n rule.attrs = result;\n }\n return rule\n }\n};\n\n// : (Schema) → [ParseRule]\nDOMParser.schemaRules = function schemaRules (schema) {\n var result = [];\n function insert(rule) {\n var priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n var next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority) { break }\n }\n result.splice(i, 0, rule);\n }\n\n var loop = function ( name ) {\n var rules = schema.marks[name].spec.parseDOM;\n if (rules) { rules.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.mark = name;\n }); }\n };\n\n for (var name in schema.marks) loop( name );\n var loop$1 = function ( name ) {\n var rules$1 = schema.nodes[name$1].spec.parseDOM;\n if (rules$1) { rules$1.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.node = name$1;\n }); }\n };\n\n for (var name$1 in schema.nodes) loop$1();\n return result\n};\n\n// :: (Schema) → DOMParser\n// Construct a DOM parser using the parsing rules listed in a\n// schema's [node specs](#model.NodeSpec.parseDOM), reordered by\n// [priority](#model.ParseRule.priority).\nDOMParser.fromSchema = function fromSchema (schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)))\n};\n\n// : Object The block-level tags in HTML5\nvar blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\n\n// : Object The tags that we normally ignore.\nvar ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\n\n// : Object List tags.\nvar listTags = {ol: true, ul: true};\n\n// Using a bitfield for node context options\nvar OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\n\nfunction wsOptionsFor(preserveWhitespace) {\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0)\n}\n\nvar NodeContext = function NodeContext(type, attrs, marks, pendingMarks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.solid = solid;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n this.options = options;\n this.content = [];\n // Marks applied to this node itself\n this.marks = marks;\n // Marks applied to its children\n this.activeMarks = Mark.none;\n // Marks that can't apply here, but will be used in children if possible\n this.pendingMarks = pendingMarks;\n};\n\nNodeContext.prototype.findWrapping = function findWrapping (node) {\n if (!this.match) {\n if (!this.type) { return [] }\n var fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n } else {\n var start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap\n } else {\n return null\n }\n }\n }\n return this.match.findWrapping(node.type)\n};\n\nNodeContext.prototype.finish = function finish (openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n var last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n if (last.text.length == m[0].length) { this.content.pop(); }\n else { this.content[this.content.length - 1] = last.withText(last.text.slice(0, last.text.length - m[0].length)); }\n }\n }\n var content = Fragment.from(this.content);\n if (!openEnd && this.match)\n { content = content.append(this.match.fillBefore(Fragment.empty, true)); }\n return this.type ? this.type.create(this.attrs, content, this.marks) : content\n};\n\nNodeContext.prototype.applyPending = function applyPending (nextType) {\n for (var i = 0, pending = this.pendingMarks; i < pending.length; i++) {\n var mark = pending[i];\n if ((this.type ? this.type.allowsMarkType(mark.type) : markMayApply(mark.type, nextType)) &&\n !mark.isInSet(this.activeMarks)) {\n this.activeMarks = mark.addToSet(this.activeMarks);\n this.pendingMarks = mark.removeFromSet(this.pendingMarks);\n }\n }\n};\n\nvar ParseContext = function ParseContext(parser, options, open) {\n // : DOMParser The parser we are using.\n this.parser = parser;\n // : Object The options passed to this parse.\n this.options = options;\n this.isOpen = open;\n var topNode = options.topNode, topContext;\n var topOptions = wsOptionsFor(options.preserveWhitespace) | (open ? OPT_OPEN_LEFT : 0);\n if (topNode)\n { topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, Mark.none, true,\n options.topMatch || topNode.type.contentMatch, topOptions); }\n else if (open)\n { topContext = new NodeContext(null, null, Mark.none, Mark.none, true, null, topOptions); }\n else\n { topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, Mark.none, true, null, topOptions); }\n this.nodes = [topContext];\n // : [Mark] The current set of marks\n this.open = 0;\n this.find = options.findPositions;\n this.needsBlock = false;\n};\n\nvar prototypeAccessors$6 = { top: { configurable: true },currentPos: { configurable: true } };\n\nprototypeAccessors$6.top.get = function () {\n return this.nodes[this.open]\n};\n\n// : (dom.Node)\n// Add a DOM node to the content. Text is inserted as text node,\n// otherwise, the node is passed to `addElement` or, if it has a\n// `style` attribute, `addElementWithStyles`.\nParseContext.prototype.addDOM = function addDOM (dom) {\n if (dom.nodeType == 3) {\n this.addTextNode(dom);\n } else if (dom.nodeType == 1) {\n var style = dom.getAttribute(\"style\");\n var marks = style ? this.readStyles(parseStyles(style)) : null, top = this.top;\n if (marks != null) { for (var i = 0; i < marks.length; i++) { this.addPendingMark(marks[i]); } }\n this.addElement(dom);\n if (marks != null) { for (var i$1 = 0; i$1 < marks.length; i$1++) { this.removePendingMark(marks[i$1], top); } }\n }\n};\n\nParseContext.prototype.addTextNode = function addTextNode (dom) {\n var value = dom.nodeValue;\n var top = this.top;\n if ((top.type ? top.type.inlineContent : top.content.length && top.content[0].isInline) || /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!(top.options & OPT_PRESERVE_WS)) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n var nodeBefore = top.content[top.content.length - 1];\n var domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n { value = value.slice(1); }\n }\n } else if (!(top.options & OPT_PRESERVE_WS_FULL)) {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n if (value) { this.insertNode(this.parser.schema.text(value)); }\n this.findInText(dom);\n } else {\n this.findInside(dom);\n }\n};\n\n// : (dom.Element)\n// Try to find a handler for the given tag and use that to parse. If\n// none is found, the element's content nodes are added directly.\nParseContext.prototype.addElement = function addElement (dom) {\n var name = dom.nodeName.toLowerCase();\n if (listTags.hasOwnProperty(name)) { normalizeList(dom); }\n var rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) || this.parser.matchTag(dom, this);\n if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n } else if (!rule || rule.skip) {\n if (rule && rule.skip.nodeType) { dom = rule.skip; }\n var sync, top = this.top, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n sync = true;\n if (!top.type) { this.needsBlock = true; }\n } else if (!dom.firstChild) {\n this.leafFallback(dom);\n return\n }\n this.addAll(dom);\n if (sync) { this.sync(top); }\n this.needsBlock = oldNeedsBlock;\n } else {\n this.addElementByRule(dom, rule);\n }\n};\n\n// Called for leaf DOM nodes that would otherwise be ignored\nParseContext.prototype.leafFallback = function leafFallback (dom) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n { this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\")); }\n};\n\n// Run any style parser associated with the node's styles. Either\n// return an array of marks, or null to indicate some of the styles\n// had a rule with `ignore` set.\nParseContext.prototype.readStyles = function readStyles (styles) {\n var marks = Mark.none;\n for (var i = 0; i < styles.length; i += 2) {\n var rule = this.parser.matchStyle(styles[i], styles[i + 1], this);\n if (!rule) { continue }\n if (rule.ignore) { return null }\n marks = this.parser.schema.marks[rule.mark].create(rule.attrs).addToSet(marks);\n }\n return marks\n};\n\n// : (dom.Element, ParseRule) → bool\n// Look up a handler for the given node. If none are found, return\n// false. Otherwise, apply it, use its return value to drive the way\n// the node's content is wrapped, and return true.\nParseContext.prototype.addElementByRule = function addElementByRule (dom, rule) {\n var this$1 = this;\n\n var sync, nodeType, markType, mark;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n sync = this.enter(nodeType, rule.attrs, rule.preserveWhitespace);\n } else if (!this.insertNode(nodeType.create(rule.attrs))) {\n this.leafFallback(dom);\n }\n } else {\n markType = this.parser.schema.marks[rule.mark];\n mark = markType.create(rule.attrs);\n this.addPendingMark(mark);\n }\n var startIn = this.top;\n\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n } else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(function (node) { return this$1.insertNode(node); });\n } else {\n var contentDOM = rule.contentElement;\n if (typeof contentDOM == \"string\") { contentDOM = dom.querySelector(contentDOM); }\n else if (typeof contentDOM == \"function\") { contentDOM = contentDOM(dom); }\n if (!contentDOM) { contentDOM = dom; }\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, sync);\n }\n if (sync) { this.sync(startIn); this.open--; }\n if (mark) { this.removePendingMark(mark, startIn); }\n};\n\n// : (dom.Node, ?NodeBuilder, ?number, ?number)\n// Add all child nodes between `startIndex` and `endIndex` (or the\n// whole node, if not given). If `sync` is passed, use it to\n// synchronize after every block element.\nParseContext.prototype.addAll = function addAll (parent, sync, startIndex, endIndex) {\n var index = startIndex || 0;\n for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild,\n end = endIndex == null ? null : parent.childNodes[endIndex];\n dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom);\n if (sync && blockTags.hasOwnProperty(dom.nodeName.toLowerCase()))\n { this.sync(sync); }\n }\n this.findAtPoint(parent, index);\n};\n\n// Try to find a way to fit the given node type into the current\n// context. May add intermediate wrappers and/or leave non-solid\n// nodes that we're in.\nParseContext.prototype.findPlace = function findPlace (node) {\n var route, sync;\n for (var depth = this.open; depth >= 0; depth--) {\n var cx = this.nodes[depth];\n var found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length)) {\n route = found;\n sync = cx;\n if (!found.length) { break }\n }\n if (cx.solid) { break }\n }\n if (!route) { return false }\n this.sync(sync);\n for (var i = 0; i < route.length; i++)\n { this.enterInner(route[i], null, false); }\n return true\n};\n\n// : (Node) → ?Node\n// Try to insert the given node, adjusting the context when needed.\nParseContext.prototype.insertNode = function insertNode (node) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n var block = this.textblockFromContext();\n if (block) { this.enterInner(block); }\n }\n if (this.findPlace(node)) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(node.type);\n if (top.match) { top.match = top.match.matchType(node.type); }\n var marks = top.activeMarks;\n for (var i = 0; i < node.marks.length; i++)\n { if (!top.type || top.type.allowsMarkType(node.marks[i].type))\n { marks = node.marks[i].addToSet(marks); } }\n top.content.push(node.mark(marks));\n return true\n }\n return false\n};\n\n// : (NodeType, ?Object) → bool\n// Try to start a node of the given type, adjusting the context when\n// necessary.\nParseContext.prototype.enter = function enter (type, attrs, preserveWS) {\n var ok = this.findPlace(type.create(attrs));\n if (ok) { this.enterInner(type, attrs, true, preserveWS); }\n return ok\n};\n\n// Open a node of the given type\nParseContext.prototype.enterInner = function enterInner (type, attrs, solid, preserveWS) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(type);\n top.match = top.match && top.match.matchType(type, attrs);\n var options = preserveWS == null ? top.options & ~OPT_OPEN_LEFT : wsOptionsFor(preserveWS);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0) { options |= OPT_OPEN_LEFT; }\n this.nodes.push(new NodeContext(type, attrs, top.activeMarks, top.pendingMarks, solid, null, options));\n this.open++;\n};\n\n// Make sure all nodes above this.open are finished and added to\n// their parents\nParseContext.prototype.closeExtra = function closeExtra (openEnd) {\n var i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--) { this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd)); }\n this.nodes.length = this.open + 1;\n }\n};\n\nParseContext.prototype.finish = function finish () {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(this.isOpen || this.options.topOpen)\n};\n\nParseContext.prototype.sync = function sync (to) {\n for (var i = this.open; i >= 0; i--) { if (this.nodes[i] == to) {\n this.open = i;\n return\n } }\n};\n\nprototypeAccessors$6.currentPos.get = function () {\n this.closeExtra();\n var pos = 0;\n for (var i = this.open; i >= 0; i--) {\n var content = this.nodes[i].content;\n for (var j = content.length - 1; j >= 0; j--)\n { pos += content[j].nodeSize; }\n if (i) { pos++; }\n }\n return pos\n};\n\nParseContext.prototype.findAtPoint = function findAtPoint (parent, offset) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n { this.find[i].pos = this.currentPos; }\n } }\n};\n\nParseContext.prototype.findInside = function findInside (parent) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n { this.find[i].pos = this.currentPos; }\n } }\n};\n\nParseContext.prototype.findAround = function findAround (parent, content, before) {\n if (parent != content && this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n var pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n { this.find[i].pos = this.currentPos; }\n }\n } }\n};\n\nParseContext.prototype.findInText = function findInText (textNode) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n { this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset); }\n } }\n};\n\n// : (string) → bool\n// Determines whether the given [context\n// string](#ParseRule.context) matches this context.\nParseContext.prototype.matchesContext = function matchesContext (context) {\n var this$1 = this;\n\n if (context.indexOf(\"|\") > -1)\n { return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this) }\n\n var parts = context.split(\"/\");\n var option = this.options.context;\n var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n var match = function (i, depth) {\n for (; i >= 0; i--) {\n var part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0) { continue }\n for (; depth >= minDepth; depth--)\n { if (match(i - 1, depth)) { return true } }\n return false\n } else {\n var next = depth > 0 || (depth == 0 && useRoot) ? this$1.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && next.groups.indexOf(part) == -1))\n { return false }\n depth--;\n }\n }\n return true\n };\n return match(parts.length - 1, this.open)\n};\n\nParseContext.prototype.textblockFromContext = function textblockFromContext () {\n var $context = this.options.context;\n if ($context) { for (var d = $context.depth; d >= 0; d--) {\n var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs) { return deflt }\n } }\n for (var name in this.parser.schema.nodes) {\n var type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs) { return type }\n }\n};\n\nParseContext.prototype.addPendingMark = function addPendingMark (mark) {\n this.top.pendingMarks = mark.addToSet(this.top.pendingMarks);\n};\n\nParseContext.prototype.removePendingMark = function removePendingMark (mark, upto) {\n for (var depth = this.open; depth >= 0; depth--) {\n var level = this.nodes[depth];\n var found = level.pendingMarks.lastIndexOf(mark);\n if (found > -1) { level.pendingMarks = mark.removeFromSet(level.pendingMarks); }\n else { level.activeMarks = mark.removeFromSet(level.activeMarks); }\n if (level == upto) { break }\n }\n};\n\nObject.defineProperties( ParseContext.prototype, prototypeAccessors$6 );\n\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n } else if (name == \"li\") {\n prevItem = child;\n } else if (name) {\n prevItem = null;\n }\n }\n}\n\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector)\n}\n\n// : (string) → [string]\n// Tokenize a style attribute into property/value pairs.\nfunction parseStyles(style) {\n var re = /\\s*([\\w-]+)\\s*:\\s*([^;]+)/g, m, result = [];\n while (m = re.exec(style)) { result.push(m[1], m[2].trim()); }\n return result\n}\n\nfunction copy(obj) {\n var copy = {};\n for (var prop in obj) { copy[prop] = obj[prop]; }\n return copy\n}\n\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n var nodes = nodeType.schema.nodes;\n var loop = function ( name ) {\n var parent = nodes[name];\n if (!parent.allowsMarkType(markType)) { return }\n var seen = [], scan = function (match) {\n seen.push(match);\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n var next = ref.next;\n if (type == nodeType) { return true }\n if (seen.indexOf(next) < 0 && scan(next)) { return true }\n }\n };\n if (scan(parent.contentMatch)) { return { v: true } }\n };\n\n for (var name in nodes) {\n var returned = loop( name );\n\n if ( returned ) return returned.v;\n }\n}\n\n// DOMOutputSpec:: interface\n// A description of a DOM structure. Can be either a string, which is\n// interpreted as a text node, a DOM node, which is interpreted as\n// itself, or an array.\n//\n// An array describes a DOM element. The first value in the array\n// should be a string—the name of the DOM element, optionally prefixed\n// by a namespace URL and a space. If the second element is plain\n// object, it is interpreted as a set of attributes for the element.\n// Any elements after that (including the 2nd if it's not an attribute\n// object) are interpreted as children of the DOM elements, and must\n// either be valid `DOMOutputSpec` values, or the number zero.\n//\n// The number zero (pronounced “hole”) is used to indicate the place\n// where a node's child nodes should be inserted. If it occurs in an\n// output spec, it should be the only child element in its parent\n// node.\n\n// ::- A DOM serializer knows how to convert ProseMirror nodes and\n// marks of various types to DOM nodes.\nvar DOMSerializer = function DOMSerializer(nodes, marks) {\n // :: Object<(node: Node) → DOMOutputSpec>\n // The node serialization functions.\n this.nodes = nodes || {};\n // :: Object\n // The mark serialization functions.\n this.marks = marks || {};\n};\n\n// :: (Fragment, ?Object) → dom.DocumentFragment\n// Serialize the content of this fragment to a DOM fragment. When\n// not in the browser, the `document` option, containing a DOM\n// document, should be passed so that the serializer can create\n// nodes.\nDOMSerializer.prototype.serializeFragment = function serializeFragment (fragment, options, target) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n if (!target) { target = doc(options).createDocumentFragment(); }\n\n var top = target, active = null;\n fragment.forEach(function (node) {\n if (active || node.marks.length) {\n if (!active) { active = []; }\n var keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n var next = node.marks[rendered];\n if (!this$1.marks[next.type.name]) { rendered++; continue }\n if (!next.eq(active[keep]) || next.type.spec.spanning === false) { break }\n keep += 2; rendered++;\n }\n while (keep < active.length) {\n top = active.pop();\n active.pop();\n }\n while (rendered < node.marks.length) {\n var add = node.marks[rendered++];\n var markDOM = this$1.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push(add, top);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this$1.serializeNode(node, options));\n });\n\n return target\n};\n\n// :: (Node, ?Object) → dom.Node\n// Serialize this node to a DOM node. This can be useful when you\n// need to serialize a part of a document, as opposed to the whole\n// document. To serialize a whole document, use\n// [`serializeFragment`](#model.DOMSerializer.serializeFragment) on\n// its [content](#model.Node.content).\nDOMSerializer.prototype.serializeNode = function serializeNode (node, options) {\n if ( options === void 0 ) options = {};\n\n var ref =\n DOMSerializer.renderSpec(doc(options), this.nodes[node.type.name](node));\n var dom = ref.dom;\n var contentDOM = ref.contentDOM;\n if (contentDOM) {\n if (node.isLeaf)\n { throw new RangeError(\"Content hole not allowed in a leaf node spec\") }\n if (options.onContent)\n { options.onContent(node, contentDOM, options); }\n else\n { this.serializeFragment(node.content, options, contentDOM); }\n }\n return dom\n};\n\nDOMSerializer.prototype.serializeNodeAndMarks = function serializeNodeAndMarks (node, options) {\n if ( options === void 0 ) options = {};\n\n var dom = this.serializeNode(node, options);\n for (var i = node.marks.length - 1; i >= 0; i--) {\n var wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n(wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom\n};\n\nDOMSerializer.prototype.serializeMark = function serializeMark (mark, inline, options) {\n if ( options === void 0 ) options = {};\n\n var toDOM = this.marks[mark.type.name];\n return toDOM && DOMSerializer.renderSpec(doc(options), toDOM(mark, inline))\n};\n\n// :: (dom.Document, DOMOutputSpec) → {dom: dom.Node, contentDOM: ?dom.Node}\n// Render an [output spec](#model.DOMOutputSpec) to a DOM node. If\n// the spec has a hole (zero) in it, `contentDOM` will point at the\n// node with the hole.\nDOMSerializer.renderSpec = function renderSpec (doc, structure, xmlNS) {\n if ( xmlNS === void 0 ) xmlNS = null;\n\n if (typeof structure == \"string\")\n { return {dom: doc.createTextNode(structure)} }\n if (structure.nodeType != null)\n { return {dom: structure} }\n var tagName = structure[0], space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n var contentDOM = null, dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n var attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (var name in attrs) { if (attrs[name] != null) {\n var space$1 = name.indexOf(\" \");\n if (space$1 > 0) { dom.setAttributeNS(name.slice(0, space$1), name.slice(space$1 + 1), attrs[name]); }\n else { dom.setAttribute(name, attrs[name]); }\n } }\n }\n for (var i = start; i < structure.length; i++) {\n var child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n { throw new RangeError(\"Content hole must be the only child of its parent node\") }\n return {dom: dom, contentDOM: dom}\n } else {\n var ref = DOMSerializer.renderSpec(doc, child, xmlNS);\n var inner = ref.dom;\n var innerContent = ref.contentDOM;\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM) { throw new RangeError(\"Multiple content holes\") }\n contentDOM = innerContent;\n }\n }\n }\n return {dom: dom, contentDOM: contentDOM}\n};\n\n// :: (Schema) → DOMSerializer\n// Build a serializer using the [`toDOM`](#model.NodeSpec.toDOM)\n// properties in a schema's node and mark specs.\nDOMSerializer.fromSchema = function fromSchema (schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)))\n};\n\n// : (Schema) → Object<(node: Node) → DOMOutputSpec>\n// Gather the serializers in a schema's node specs into an object.\n// This can be useful as a base to build a custom serializer from.\nDOMSerializer.nodesFromSchema = function nodesFromSchema (schema) {\n var result = gatherToDOM(schema.nodes);\n if (!result.text) { result.text = function (node) { return node.text; }; }\n return result\n};\n\n// : (Schema) → Object<(mark: Mark) → DOMOutputSpec>\n// Gather the serializers in a schema's mark specs into an object.\nDOMSerializer.marksFromSchema = function marksFromSchema (schema) {\n return gatherToDOM(schema.marks)\n};\n\nfunction gatherToDOM(obj) {\n var result = {};\n for (var name in obj) {\n var toDOM = obj[name].spec.toDOM;\n if (toDOM) { result[name] = toDOM; }\n }\n return result\n}\n\nfunction doc(options) {\n // declare global: window\n return options.document || window.document\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-model/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContentMatch\", function() { return ContentMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMParser\", function() { return DOMParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMSerializer\", function() { return DOMSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Fragment\", function() { return Fragment; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mark\", function() { return Mark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkType\", function() { return MarkType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeRange\", function() { return NodeRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeType\", function() { return NodeType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceError\", function() { return ReplaceError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResolvedPos\", function() { return ResolvedPos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Schema\", function() { return Schema; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Slice\", function() { return Slice; });\n/* harmony import */ var orderedmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! orderedmap */ \"./node_modules/orderedmap/index.es.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\nfunction findDiffStart(a, b, pos) {\n for (var i = 0;; i++) {\n if (i == a.childCount || i == b.childCount) {\n return a.childCount == b.childCount ? null : pos;\n }\n\n var childA = a.child(i),\n childB = b.child(i);\n\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n\n if (!childA.sameMarkup(childB)) {\n return pos;\n }\n\n if (childA.isText && childA.text != childB.text) {\n for (var j = 0; childA.text[j] == childB.text[j]; j++) {\n pos++;\n }\n\n return pos;\n }\n\n if (childA.content.size || childB.content.size) {\n var inner = findDiffStart(childA.content, childB.content, pos + 1);\n\n if (inner != null) {\n return inner;\n }\n }\n\n pos += childA.nodeSize;\n }\n}\n\nfunction findDiffEnd(a, b, posA, posB) {\n for (var iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0) {\n return iA == iB ? null : {\n a: posA,\n b: posB\n };\n }\n\n var childA = a.child(--iA),\n childB = b.child(--iB),\n size = childA.nodeSize;\n\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n\n if (!childA.sameMarkup(childB)) {\n return {\n a: posA,\n b: posB\n };\n }\n\n if (childA.isText && childA.text != childB.text) {\n var same = 0,\n minSize = Math.min(childA.text.length, childB.text.length);\n\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n\n return {\n a: posA,\n b: posB\n };\n }\n\n if (childA.content.size || childB.content.size) {\n var inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n\n if (inner) {\n return inner;\n }\n }\n\n posA -= size;\n posB -= size;\n }\n} // ::- A fragment represents a node's collection of child nodes.\n//\n// Like nodes, fragments are persistent data structures, and you\n// should not mutate them or their content. Rather, you create new\n// instances whenever needed. The API tries to make this easy.\n\n\nvar Fragment = function Fragment(content, size) {\n this.content = content; // :: number\n // The size of the fragment, which is the total of the size of its\n // content nodes.\n\n this.size = size || 0;\n\n if (size == null) {\n for (var i = 0; i < content.length; i++) {\n this.size += content[i].nodeSize;\n }\n }\n};\n\nvar prototypeAccessors = {\n firstChild: {\n configurable: true\n },\n lastChild: {\n configurable: true\n },\n childCount: {\n configurable: true\n }\n}; // :: (number, number, (node: Node, start: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes between the given two\n// positions (relative to start of this fragment). Doesn't descend\n// into a node when the callback returns `false`.\n\nFragment.prototype.nodesBetween = function nodesBetween(from, to, f, nodeStart, parent) {\n if (nodeStart === void 0) nodeStart = 0;\n\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n\n if (end > from && f(child, nodeStart + pos, parent, i) !== false && child.content.size) {\n var start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n\n pos = end;\n }\n}; // :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. The callback\n// may return `false` to prevent traversal of a given node's children.\n\n\nFragment.prototype.descendants = function descendants(f) {\n this.nodesBetween(0, this.size, f);\n}; // : (number, number, ?string, ?string) → string\n\n\nFragment.prototype.textBetween = function textBetween(from, to, blockSeparator, leafText) {\n var text = \"\",\n separated = true;\n this.nodesBetween(from, to, function (node, pos) {\n if (node.isText) {\n text += node.text.slice(Math.max(from, pos) - pos, to - pos);\n separated = !blockSeparator;\n } else if (node.isLeaf && leafText) {\n text += leafText;\n separated = !blockSeparator;\n } else if (!separated && node.isBlock) {\n text += blockSeparator;\n separated = true;\n }\n }, 0);\n return text;\n}; // :: (Fragment) → Fragment\n// Create a new fragment containing the combined content of this\n// fragment and the other.\n\n\nFragment.prototype.append = function append(other) {\n if (!other.size) {\n return this;\n }\n\n if (!this.size) {\n return other;\n }\n\n var last = this.lastChild,\n first = other.firstChild,\n content = this.content.slice(),\n i = 0;\n\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n\n for (; i < other.content.length; i++) {\n content.push(other.content[i]);\n }\n\n return new Fragment(content, this.size + other.size);\n}; // :: (number, ?number) → Fragment\n// Cut out the sub-fragment between the two given positions.\n\n\nFragment.prototype.cut = function cut(from, to) {\n if (to == null) {\n to = this.size;\n }\n\n if (from == 0 && to == this.size) {\n return this;\n }\n\n var result = [],\n size = 0;\n\n if (to > from) {\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText) {\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n } else {\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n }\n\n result.push(child);\n size += child.nodeSize;\n }\n\n pos = end;\n }\n }\n\n return new Fragment(result, size);\n};\n\nFragment.prototype.cutByIndex = function cutByIndex(from, to) {\n if (from == to) {\n return Fragment.empty;\n }\n\n if (from == 0 && to == this.content.length) {\n return this;\n }\n\n return new Fragment(this.content.slice(from, to));\n}; // :: (number, Node) → Fragment\n// Create a new fragment in which the node at the given index is\n// replaced by the given node.\n\n\nFragment.prototype.replaceChild = function replaceChild(index, node) {\n var current = this.content[index];\n\n if (current == node) {\n return this;\n }\n\n var copy = this.content.slice();\n var size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n}; // : (Node) → Fragment\n// Create a new fragment by prepending the given node to this\n// fragment.\n\n\nFragment.prototype.addToStart = function addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n}; // : (Node) → Fragment\n// Create a new fragment by appending the given node to this\n// fragment.\n\n\nFragment.prototype.addToEnd = function addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n}; // :: (Fragment) → bool\n// Compare this fragment to another one.\n\n\nFragment.prototype.eq = function eq(other) {\n if (this.content.length != other.content.length) {\n return false;\n }\n\n for (var i = 0; i < this.content.length; i++) {\n if (!this.content[i].eq(other.content[i])) {\n return false;\n }\n }\n\n return true;\n}; // :: ?Node\n// The first child of the fragment, or `null` if it is empty.\n\n\nprototypeAccessors.firstChild.get = function () {\n return this.content.length ? this.content[0] : null;\n}; // :: ?Node\n// The last child of the fragment, or `null` if it is empty.\n\n\nprototypeAccessors.lastChild.get = function () {\n return this.content.length ? this.content[this.content.length - 1] : null;\n}; // :: number\n// The number of child nodes in this fragment.\n\n\nprototypeAccessors.childCount.get = function () {\n return this.content.length;\n}; // :: (number) → Node\n// Get the child node at the given index. Raise an error when the\n// index is out of range.\n\n\nFragment.prototype.child = function child(index) {\n var found = this.content[index];\n\n if (!found) {\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n }\n\n return found;\n}; // :: (number) → ?Node\n// Get the child node at the given index, if it exists.\n\n\nFragment.prototype.maybeChild = function maybeChild(index) {\n return this.content[index];\n}; // :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\n\n\nFragment.prototype.forEach = function forEach(f) {\n for (var i = 0, p = 0; i < this.content.length; i++) {\n var child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n}; // :: (Fragment) → ?number\n// Find the first position at which this fragment and another\n// fragment differ, or `null` if they are the same.\n\n\nFragment.prototype.findDiffStart = function findDiffStart$1(other, pos) {\n if (pos === void 0) pos = 0;\n return findDiffStart(this, other, pos);\n}; // :: (Fragment) → ?{a: number, b: number}\n// Find the first position, searching from the end, at which this\n// fragment and the given fragment differ, or `null` if they are the\n// same. Since this position will not be the same in both nodes, an\n// object with two separate positions is returned.\n\n\nFragment.prototype.findDiffEnd = function findDiffEnd$1(other, pos, otherPos) {\n if (pos === void 0) pos = this.size;\n if (otherPos === void 0) otherPos = other.size;\n return findDiffEnd(this, other, pos, otherPos);\n}; // : (number, ?number) → {index: number, offset: number}\n// Find the index and inner offset corresponding to a given relative\n// position in this fragment. The result object will be reused\n// (overwritten) the next time the function is called. (Not public.)\n\n\nFragment.prototype.findIndex = function findIndex(pos, round) {\n if (round === void 0) round = -1;\n\n if (pos == 0) {\n return retIndex(0, pos);\n }\n\n if (pos == this.size) {\n return retIndex(this.content.length, pos);\n }\n\n if (pos > this.size || pos < 0) {\n throw new RangeError(\"Position \" + pos + \" outside of fragment (\" + this + \")\");\n }\n\n for (var i = 0, curPos = 0;; i++) {\n var cur = this.child(i),\n end = curPos + cur.nodeSize;\n\n if (end >= pos) {\n if (end == pos || round > 0) {\n return retIndex(i + 1, end);\n }\n\n return retIndex(i, curPos);\n }\n\n curPos = end;\n }\n}; // :: () → string\n// Return a debugging string that describes this fragment.\n\n\nFragment.prototype.toString = function toString() {\n return \"<\" + this.toStringInner() + \">\";\n};\n\nFragment.prototype.toStringInner = function toStringInner() {\n return this.content.join(\", \");\n}; // :: () → ?Object\n// Create a JSON-serializeable representation of this fragment.\n\n\nFragment.prototype.toJSON = function toJSON() {\n return this.content.length ? this.content.map(function (n) {\n return n.toJSON();\n }) : null;\n}; // :: (Schema, ?Object) → Fragment\n// Deserialize a fragment from its JSON representation.\n\n\nFragment.fromJSON = function fromJSON(schema, value) {\n if (!value) {\n return Fragment.empty;\n }\n\n if (!Array.isArray(value)) {\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n }\n\n return new Fragment(value.map(schema.nodeFromJSON));\n}; // :: ([Node]) → Fragment\n// Build a fragment from an array of nodes. Ensures that adjacent\n// text nodes with the same marks are joined together.\n\n\nFragment.fromArray = function fromArray(array) {\n if (!array.length) {\n return Fragment.empty;\n }\n\n var joined,\n size = 0;\n\n for (var i = 0; i < array.length; i++) {\n var node = array[i];\n size += node.nodeSize;\n\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined) {\n joined = array.slice(0, i);\n }\n\n joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n } else if (joined) {\n joined.push(node);\n }\n }\n\n return new Fragment(joined || array, size);\n}; // :: (?union) → Fragment\n// Create a fragment from something that can be interpreted as a set\n// of nodes. For `null`, it returns the empty fragment. For a\n// fragment, the fragment itself. For a node or array of nodes, a\n// fragment containing those nodes.\n\n\nFragment.from = function from(nodes) {\n if (!nodes) {\n return Fragment.empty;\n }\n\n if (nodes instanceof Fragment) {\n return nodes;\n }\n\n if (Array.isArray(nodes)) {\n return this.fromArray(nodes);\n }\n\n if (nodes.attrs) {\n return new Fragment([nodes], nodes.nodeSize);\n }\n\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" + (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n};\n\nObject.defineProperties(Fragment.prototype, prototypeAccessors);\nvar found = {\n index: 0,\n offset: 0\n};\n\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n} // :: Fragment\n// An empty fragment. Intended to be reused whenever a node doesn't\n// contain anything (rather than allocating a new empty fragment for\n// each leaf node).\n\n\nFragment.empty = new Fragment([], 0);\n\nfunction compareDeep(a, b) {\n if (a === b) {\n return true;\n }\n\n if (!(a && _typeof(a) == \"object\") || !(b && _typeof(b) == \"object\")) {\n return false;\n }\n\n var array = Array.isArray(a);\n\n if (Array.isArray(b) != array) {\n return false;\n }\n\n if (array) {\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!compareDeep(a[i], b[i])) {\n return false;\n }\n }\n } else {\n for (var p in a) {\n if (!(p in b) || !compareDeep(a[p], b[p])) {\n return false;\n }\n }\n\n for (var p$1 in b) {\n if (!(p$1 in a)) {\n return false;\n }\n }\n }\n\n return true;\n} // ::- A mark is a piece of information that can be attached to a node,\n// such as it being emphasized, in code font, or a link. It has a type\n// and optionally a set of attributes that provide further information\n// (such as the target of the link). Marks are created through a\n// `Schema`, which controls which types exist and which\n// attributes they have.\n\n\nvar Mark = function Mark(type, attrs) {\n // :: MarkType\n // The type of this mark.\n this.type = type; // :: Object\n // The attributes associated with this mark.\n\n this.attrs = attrs;\n}; // :: ([Mark]) → [Mark]\n// Given a set of marks, create a new set which contains this one as\n// well, in the right position. If this mark is already in the set,\n// the set itself is returned. If any marks that are set to be\n// [exclusive](#model.MarkSpec.excludes) with this mark are present,\n// those are replaced by this one.\n\n\nMark.prototype.addToSet = function addToSet(set) {\n var copy,\n placed = false;\n\n for (var i = 0; i < set.length; i++) {\n var other = set[i];\n\n if (this.eq(other)) {\n return set;\n }\n\n if (this.type.excludes(other.type)) {\n if (!copy) {\n copy = set.slice(0, i);\n }\n } else if (other.type.excludes(this.type)) {\n return set;\n } else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy) {\n copy = set.slice(0, i);\n }\n\n copy.push(this);\n placed = true;\n }\n\n if (copy) {\n copy.push(other);\n }\n }\n }\n\n if (!copy) {\n copy = set.slice();\n }\n\n if (!placed) {\n copy.push(this);\n }\n\n return copy;\n}; // :: ([Mark]) → [Mark]\n// Remove this mark from the given set, returning a new set. If this\n// mark is not in the set, the set itself is returned.\n\n\nMark.prototype.removeFromSet = function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (this.eq(set[i])) {\n return set.slice(0, i).concat(set.slice(i + 1));\n }\n }\n\n return set;\n}; // :: ([Mark]) → bool\n// Test whether this mark is in the given set of marks.\n\n\nMark.prototype.isInSet = function isInSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (this.eq(set[i])) {\n return true;\n }\n }\n\n return false;\n}; // :: (Mark) → bool\n// Test whether this mark has the same type and attributes as\n// another mark.\n\n\nMark.prototype.eq = function eq(other) {\n return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs);\n}; // :: () → Object\n// Convert this mark to a JSON-serializeable representation.\n\n\nMark.prototype.toJSON = function toJSON() {\n var obj = {\n type: this.type.name\n };\n\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n\n return obj;\n}; // :: (Schema, Object) → Mark\n\n\nMark.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n }\n\n var type = schema.marks[json.type];\n\n if (!type) {\n throw new RangeError(\"There is no mark type \" + json.type + \" in this schema\");\n }\n\n return type.create(json.attrs);\n}; // :: ([Mark], [Mark]) → bool\n// Test whether two sets of marks are identical.\n\n\nMark.sameSet = function sameSet(a, b) {\n if (a == b) {\n return true;\n }\n\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!a[i].eq(b[i])) {\n return false;\n }\n }\n\n return true;\n}; // :: (?union) → [Mark]\n// Create a properly sorted mark set from null, a single mark, or an\n// unsorted array of marks.\n\n\nMark.setFrom = function setFrom(marks) {\n if (!marks || marks.length == 0) {\n return Mark.none;\n }\n\n if (marks instanceof Mark) {\n return [marks];\n }\n\n var copy = marks.slice();\n copy.sort(function (a, b) {\n return a.type.rank - b.type.rank;\n });\n return copy;\n}; // :: [Mark] The empty set of marks.\n\n\nMark.none = []; // ReplaceError:: class extends Error\n// Error type raised by [`Node.replace`](#model.Node.replace) when\n// given an invalid replacement.\n\nfunction ReplaceError(message) {\n var err = Error.call(this, message);\n err.__proto__ = ReplaceError.prototype;\n return err;\n}\n\nReplaceError.prototype = Object.create(Error.prototype);\nReplaceError.prototype.constructor = ReplaceError;\nReplaceError.prototype.name = \"ReplaceError\"; // ::- A slice represents a piece cut out of a larger document. It\n// stores not only a fragment, but also the depth up to which nodes on\n// both side are ‘open’ (cut through).\n\nvar Slice = function Slice(content, openStart, openEnd) {\n // :: Fragment The slice's content.\n this.content = content; // :: number The open depth at the start.\n\n this.openStart = openStart; // :: number The open depth at the end.\n\n this.openEnd = openEnd;\n};\n\nvar prototypeAccessors$1 = {\n size: {\n configurable: true\n }\n}; // :: number\n// The size this slice would add when inserted into a document.\n\nprototypeAccessors$1.size.get = function () {\n return this.content.size - this.openStart - this.openEnd;\n};\n\nSlice.prototype.insertAt = function insertAt(pos, fragment) {\n var content = insertInto(this.content, pos + this.openStart, fragment, null);\n return content && new Slice(content, this.openStart, this.openEnd);\n};\n\nSlice.prototype.removeBetween = function removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n}; // :: (Slice) → bool\n// Tests whether this slice is equal to another slice.\n\n\nSlice.prototype.eq = function eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n};\n\nSlice.prototype.toString = function toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n}; // :: () → ?Object\n// Convert a slice to a JSON-serializable representation.\n\n\nSlice.prototype.toJSON = function toJSON() {\n if (!this.content.size) {\n return null;\n }\n\n var json = {\n content: this.content.toJSON()\n };\n\n if (this.openStart > 0) {\n json.openStart = this.openStart;\n }\n\n if (this.openEnd > 0) {\n json.openEnd = this.openEnd;\n }\n\n return json;\n}; // :: (Schema, ?Object) → Slice\n// Deserialize a slice from its JSON representation.\n\n\nSlice.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n return Slice.empty;\n }\n\n var openStart = json.openStart || 0,\n openEnd = json.openEnd || 0;\n\n if (typeof openStart != \"number\" || typeof openEnd != \"number\") {\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n }\n\n return new Slice(Fragment.fromJSON(schema, json.content), json.openStart || 0, json.openEnd || 0);\n}; // :: (Fragment, ?bool) → Slice\n// Create a slice from a fragment by taking the maximum possible\n// open value on both side of the fragment.\n\n\nSlice.maxOpen = function maxOpen(fragment, openIsolating) {\n if (openIsolating === void 0) openIsolating = true;\n var openStart = 0,\n openEnd = 0;\n\n for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) {\n openStart++;\n }\n\n for (var n$1 = fragment.lastChild; n$1 && !n$1.isLeaf && (openIsolating || !n$1.type.spec.isolating); n$1 = n$1.lastChild) {\n openEnd++;\n }\n\n return new Slice(fragment, openStart, openEnd);\n};\n\nObject.defineProperties(Slice.prototype, prototypeAccessors$1);\n\nfunction removeRange(content, from, to) {\n var ref = content.findIndex(from);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n var ref$1 = content.findIndex(to);\n var indexTo = ref$1.index;\n var offsetTo = ref$1.offset;\n\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText) {\n throw new RangeError(\"Removing non-flat range\");\n }\n\n return content.cut(0, from).append(content.cut(to));\n }\n\n if (index != indexTo) {\n throw new RangeError(\"Removing non-flat range\");\n }\n\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\n\nfunction insertInto(content, dist, insert, parent) {\n var ref = content.findIndex(dist);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert)) {\n return null;\n }\n\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n\n var inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner));\n} // :: Slice\n// The empty slice.\n\n\nSlice.empty = new Slice(Fragment.empty, 0, 0);\n\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth) {\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n }\n\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd) {\n throw new ReplaceError(\"Inconsistent open depths\");\n }\n\n return replaceOuter($from, $to, slice, 0);\n}\n\nfunction replaceOuter($from, $to, slice, depth) {\n var index = $from.index(depth),\n node = $from.node(depth);\n\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n var inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n } else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) {\n // Simple, flat case\n var parent = $from.parent,\n content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n } else {\n var ref = prepareSliceForReplace(slice, $from);\n var start = ref.start;\n var end = ref.end;\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\n\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type)) {\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n }\n}\n\nfunction joinable($before, $after, depth) {\n var node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\n\nfunction addNode(child, target) {\n var last = target.length - 1;\n\n if (last >= 0 && child.isText && child.sameMarkup(target[last])) {\n target[last] = child.withText(target[last].text + child.text);\n } else {\n target.push(child);\n }\n}\n\nfunction addRange($start, $end, depth, target) {\n var node = ($end || $start).node(depth);\n var startIndex = 0,\n endIndex = $end ? $end.index(depth) : node.childCount;\n\n if ($start) {\n startIndex = $start.index(depth);\n\n if ($start.depth > depth) {\n startIndex++;\n } else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n\n for (var i = startIndex; i < endIndex; i++) {\n addNode(node.child(i), target);\n }\n\n if ($end && $end.depth == depth && $end.textOffset) {\n addNode($end.nodeBefore, target);\n }\n}\n\nfunction close(node, content) {\n if (!node.type.validContent(content)) {\n throw new ReplaceError(\"Invalid content for node \" + node.type.name);\n }\n\n return node.copy(content);\n}\n\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n var openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n var openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n var content = [];\n addRange(null, $from, depth, content);\n\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n } else {\n if (openStart) {\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n }\n\n addRange($start, $end, depth, content);\n\n if (openEnd) {\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n }\n\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\n\nfunction replaceTwoWay($from, $to, depth) {\n var content = [];\n addRange(null, $from, depth, content);\n\n if ($from.depth > depth) {\n var type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\n\nfunction prepareSliceForReplace(slice, $along) {\n var extra = $along.depth - slice.openStart,\n parent = $along.node(extra);\n var node = parent.copy(slice.content);\n\n for (var i = extra - 1; i >= 0; i--) {\n node = $along.node(i).copy(Fragment.from(node));\n }\n\n return {\n start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra)\n };\n} // ::- You can [_resolve_](#model.Node.resolve) a position to get more\n// information about it. Objects of this class represent such a\n// resolved position, providing various pieces of context information,\n// and some helper methods.\n//\n// Throughout this interface, methods that take an optional `depth`\n// parameter will interpret undefined as `this.depth` and negative\n// numbers as `this.depth + value`.\n\n\nvar ResolvedPos = function ResolvedPos(pos, path, parentOffset) {\n // :: number The position that was resolved.\n this.pos = pos;\n this.path = path; // :: number\n // The number of levels the parent node is from the root. If this\n // position points directly into the root node, it is 0. If it\n // points into a top-level paragraph, 1, and so on.\n\n this.depth = path.length / 3 - 1; // :: number The offset this position has into its parent node.\n\n this.parentOffset = parentOffset;\n};\n\nvar prototypeAccessors$2 = {\n parent: {\n configurable: true\n },\n doc: {\n configurable: true\n },\n textOffset: {\n configurable: true\n },\n nodeAfter: {\n configurable: true\n },\n nodeBefore: {\n configurable: true\n }\n};\n\nResolvedPos.prototype.resolveDepth = function resolveDepth(val) {\n if (val == null) {\n return this.depth;\n }\n\n if (val < 0) {\n return this.depth + val;\n }\n\n return val;\n}; // :: Node\n// The parent node that the position points into. Note that even if\n// a position points into a text node, that node is not considered\n// the parent—text nodes are ‘flat’ in this model, and have no content.\n\n\nprototypeAccessors$2.parent.get = function () {\n return this.node(this.depth);\n}; // :: Node\n// The root node in which the position was resolved.\n\n\nprototypeAccessors$2.doc.get = function () {\n return this.node(0);\n}; // :: (?number) → Node\n// The ancestor node at the given level. `p.node(p.depth)` is the\n// same as `p.parent`.\n\n\nResolvedPos.prototype.node = function node(depth) {\n return this.path[this.resolveDepth(depth) * 3];\n}; // :: (?number) → number\n// The index into the ancestor at the given level. If this points at\n// the 3rd node in the 2nd paragraph on the top level, for example,\n// `p.index(0)` is 1 and `p.index(1)` is 2.\n\n\nResolvedPos.prototype.index = function index(depth) {\n return this.path[this.resolveDepth(depth) * 3 + 1];\n}; // :: (?number) → number\n// The index pointing after this position into the ancestor at the\n// given level.\n\n\nResolvedPos.prototype.indexAfter = function indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n}; // :: (?number) → number\n// The (absolute) position at the start of the node at the given\n// level.\n\n\nResolvedPos.prototype.start = function start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n}; // :: (?number) → number\n// The (absolute) position at the end of the node at the given\n// level.\n\n\nResolvedPos.prototype.end = function end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n}; // :: (?number) → number\n// The (absolute) position directly before the wrapping node at the\n// given level, or, when `depth` is `this.depth + 1`, the original\n// position.\n\n\nResolvedPos.prototype.before = function before(depth) {\n depth = this.resolveDepth(depth);\n\n if (!depth) {\n throw new RangeError(\"There is no position before the top-level node\");\n }\n\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n}; // :: (?number) → number\n// The (absolute) position directly after the wrapping node at the\n// given level, or the original position when `depth` is `this.depth + 1`.\n\n\nResolvedPos.prototype.after = function after(depth) {\n depth = this.resolveDepth(depth);\n\n if (!depth) {\n throw new RangeError(\"There is no position after the top-level node\");\n }\n\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n}; // :: number\n// When this position points into a text node, this returns the\n// distance between the position and the start of the text node.\n// Will be zero for positions that point between nodes.\n\n\nprototypeAccessors$2.textOffset.get = function () {\n return this.pos - this.path[this.path.length - 1];\n}; // :: ?Node\n// Get the node directly after the position, if any. If the position\n// points into a text node, only the part of that node after the\n// position is returned.\n\n\nprototypeAccessors$2.nodeAfter.get = function () {\n var parent = this.parent,\n index = this.index(this.depth);\n\n if (index == parent.childCount) {\n return null;\n }\n\n var dOff = this.pos - this.path[this.path.length - 1],\n child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n}; // :: ?Node\n// Get the node directly before the position, if any. If the\n// position points into a text node, only the part of that node\n// before the position is returned.\n\n\nprototypeAccessors$2.nodeBefore.get = function () {\n var index = this.index(this.depth);\n var dOff = this.pos - this.path[this.path.length - 1];\n\n if (dOff) {\n return this.parent.child(index).cut(0, dOff);\n }\n\n return index == 0 ? null : this.parent.child(index - 1);\n}; // :: () → [Mark]\n// Get the marks at this position, factoring in the surrounding\n// marks' [`inclusive`](#model.MarkSpec.inclusive) property. If the\n// position is at the start of a non-empty node, the marks of the\n// node after it (if any) are returned.\n\n\nResolvedPos.prototype.marks = function marks() {\n var parent = this.parent,\n index = this.index(); // In an empty parent, return the empty array\n\n if (parent.content.size == 0) {\n return Mark.none;\n } // When inside a text node, just return the text node's marks\n\n\n if (this.textOffset) {\n return parent.child(index).marks;\n }\n\n var main = parent.maybeChild(index - 1),\n other = parent.maybeChild(index); // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n\n if (!main) {\n var tmp = main;\n main = other;\n other = tmp;\n } // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n\n\n var marks = main.marks;\n\n for (var i = 0; i < marks.length; i++) {\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) {\n marks = marks[i--].removeFromSet(marks);\n }\n }\n\n return marks;\n}; // :: (ResolvedPos) → ?[Mark]\n// Get the marks after the current position, if any, except those\n// that are non-inclusive and not present at position `$end`. This\n// is mostly useful for getting the set of marks to preserve after a\n// deletion. Will return `null` if this position is at the end of\n// its parent node or its parent node isn't a textblock (in which\n// case no marks should be preserved).\n\n\nResolvedPos.prototype.marksAcross = function marksAcross($end) {\n var after = this.parent.maybeChild(this.index());\n\n if (!after || !after.isInline) {\n return null;\n }\n\n var marks = after.marks,\n next = $end.parent.maybeChild($end.index());\n\n for (var i = 0; i < marks.length; i++) {\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) {\n marks = marks[i--].removeFromSet(marks);\n }\n }\n\n return marks;\n}; // :: (number) → number\n// The depth up to which this position and the given (non-resolved)\n// position share the same parent nodes.\n\n\nResolvedPos.prototype.sharedDepth = function sharedDepth(pos) {\n for (var depth = this.depth; depth > 0; depth--) {\n if (this.start(depth) <= pos && this.end(depth) >= pos) {\n return depth;\n }\n }\n\n return 0;\n}; // :: (?ResolvedPos, ?(Node) → bool) → ?NodeRange\n// Returns a range based on the place where this position and the\n// given position diverge around block content. If both point into\n// the same textblock, for example, a range around that textblock\n// will be returned. If they point into different blocks, the range\n// around those blocks in their shared ancestor is returned. You can\n// pass in an optional predicate that will be called with a parent\n// node to see if a range into that parent is acceptable.\n\n\nResolvedPos.prototype.blockRange = function blockRange(other, pred) {\n if (other === void 0) other = this;\n\n if (other.pos < this.pos) {\n return other.blockRange(this);\n }\n\n for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) {\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) {\n return new NodeRange(this, other, d);\n }\n }\n}; // :: (ResolvedPos) → bool\n// Query whether the given position shares the same parent node.\n\n\nResolvedPos.prototype.sameParent = function sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n}; // :: (ResolvedPos) → ResolvedPos\n// Return the greater of this and the given position.\n\n\nResolvedPos.prototype.max = function max(other) {\n return other.pos > this.pos ? other : this;\n}; // :: (ResolvedPos) → ResolvedPos\n// Return the smaller of this and the given position.\n\n\nResolvedPos.prototype.min = function min(other) {\n return other.pos < this.pos ? other : this;\n};\n\nResolvedPos.prototype.toString = function toString() {\n var str = \"\";\n\n for (var i = 1; i <= this.depth; i++) {\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n }\n\n return str + \":\" + this.parentOffset;\n};\n\nResolvedPos.resolve = function resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size)) {\n throw new RangeError(\"Position \" + pos + \" out of range\");\n }\n\n var path = [];\n var start = 0,\n parentOffset = pos;\n\n for (var node = doc;;) {\n var ref = node.content.findIndex(parentOffset);\n var index = ref.index;\n var offset = ref.offset;\n var rem = parentOffset - offset;\n path.push(node, index, start + offset);\n\n if (!rem) {\n break;\n }\n\n node = node.child(index);\n\n if (node.isText) {\n break;\n }\n\n parentOffset = rem - 1;\n start += offset + 1;\n }\n\n return new ResolvedPos(pos, path, parentOffset);\n};\n\nResolvedPos.resolveCached = function resolveCached(doc, pos) {\n for (var i = 0; i < resolveCache.length; i++) {\n var cached = resolveCache[i];\n\n if (cached.pos == pos && cached.doc == doc) {\n return cached;\n }\n }\n\n var result = resolveCache[resolveCachePos] = ResolvedPos.resolve(doc, pos);\n resolveCachePos = (resolveCachePos + 1) % resolveCacheSize;\n return result;\n};\n\nObject.defineProperties(ResolvedPos.prototype, prototypeAccessors$2);\nvar resolveCache = [],\n resolveCachePos = 0,\n resolveCacheSize = 12; // ::- Represents a flat range of content, i.e. one that starts and\n// ends in the same node.\n\nvar NodeRange = function NodeRange($from, $to, depth) {\n // :: ResolvedPos A resolved position along the start of the\n // content. May have a `depth` greater than this object's `depth`\n // property, since these are the positions that were used to\n // compute the range, not re-resolved positions directly at its\n // boundaries.\n this.$from = $from; // :: ResolvedPos A position along the end of the content. See\n // caveat for [`$from`](#model.NodeRange.$from).\n\n this.$to = $to; // :: number The depth of the node that this range points into.\n\n this.depth = depth;\n};\n\nvar prototypeAccessors$1$1 = {\n start: {\n configurable: true\n },\n end: {\n configurable: true\n },\n parent: {\n configurable: true\n },\n startIndex: {\n configurable: true\n },\n endIndex: {\n configurable: true\n }\n}; // :: number The position at the start of the range.\n\nprototypeAccessors$1$1.start.get = function () {\n return this.$from.before(this.depth + 1);\n}; // :: number The position at the end of the range.\n\n\nprototypeAccessors$1$1.end.get = function () {\n return this.$to.after(this.depth + 1);\n}; // :: Node The parent node that the range points into.\n\n\nprototypeAccessors$1$1.parent.get = function () {\n return this.$from.node(this.depth);\n}; // :: number The start index of the range in the parent node.\n\n\nprototypeAccessors$1$1.startIndex.get = function () {\n return this.$from.index(this.depth);\n}; // :: number The end index of the range in the parent node.\n\n\nprototypeAccessors$1$1.endIndex.get = function () {\n return this.$to.indexAfter(this.depth);\n};\n\nObject.defineProperties(NodeRange.prototype, prototypeAccessors$1$1);\nvar emptyAttrs = Object.create(null); // ::- This class represents a node in the tree that makes up a\n// ProseMirror document. So a document is an instance of `Node`, with\n// children that are also instances of `Node`.\n//\n// Nodes are persistent data structures. Instead of changing them, you\n// create new ones with the content you want. Old ones keep pointing\n// at the old document shape. This is made cheaper by sharing\n// structure between the old and new data as much as possible, which a\n// tree shape like this (without back pointers) makes easy.\n//\n// **Do not** directly mutate the properties of a `Node` object. See\n// [the guide](/docs/guide/#doc) for more information.\n\nvar Node = function Node(type, attrs, content, marks) {\n // :: NodeType\n // The type of node that this is.\n this.type = type; // :: Object\n // An object mapping attribute names to values. The kind of\n // attributes allowed and required are\n // [determined](#model.NodeSpec.attrs) by the node type.\n\n this.attrs = attrs; // :: Fragment\n // A container holding the node's children.\n\n this.content = content || Fragment.empty; // :: [Mark]\n // The marks (things like whether it is emphasized or part of a\n // link) applied to this node.\n\n this.marks = marks || Mark.none;\n};\n\nvar prototypeAccessors$3 = {\n nodeSize: {\n configurable: true\n },\n childCount: {\n configurable: true\n },\n textContent: {\n configurable: true\n },\n firstChild: {\n configurable: true\n },\n lastChild: {\n configurable: true\n },\n isBlock: {\n configurable: true\n },\n isTextblock: {\n configurable: true\n },\n inlineContent: {\n configurable: true\n },\n isInline: {\n configurable: true\n },\n isText: {\n configurable: true\n },\n isLeaf: {\n configurable: true\n },\n isAtom: {\n configurable: true\n }\n}; // text:: ?string\n// For text nodes, this contains the node's text content.\n// :: number\n// The size of this node, as defined by the integer-based [indexing\n// scheme](/docs/guide/#doc.indexing). For text nodes, this is the\n// amount of characters. For other leaf nodes, it is one. For\n// non-leaf nodes, it is the size of the content plus two (the start\n// and end token).\n\nprototypeAccessors$3.nodeSize.get = function () {\n return this.isLeaf ? 1 : 2 + this.content.size;\n}; // :: number\n// The number of children that the node has.\n\n\nprototypeAccessors$3.childCount.get = function () {\n return this.content.childCount;\n}; // :: (number) → Node\n// Get the child node at the given index. Raises an error when the\n// index is out of range.\n\n\nNode.prototype.child = function child(index) {\n return this.content.child(index);\n}; // :: (number) → ?Node\n// Get the child node at the given index, if it exists.\n\n\nNode.prototype.maybeChild = function maybeChild(index) {\n return this.content.maybeChild(index);\n}; // :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\n\n\nNode.prototype.forEach = function forEach(f) {\n this.content.forEach(f);\n}; // :: (number, number, (node: Node, pos: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes recursively between\n// the given two positions that are relative to start of this node's\n// content. The callback is invoked with the node, its\n// parent-relative position, its parent node, and its child index.\n// When the callback returns false for a given node, that node's\n// children will not be recursed over. The last parameter can be\n// used to specify a starting position to count from.\n\n\nNode.prototype.nodesBetween = function nodesBetween(from, to, f, startPos) {\n if (startPos === void 0) startPos = 0;\n this.content.nodesBetween(from, to, f, startPos, this);\n}; // :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. Doesn't\n// descend into a node when the callback returns `false`.\n\n\nNode.prototype.descendants = function descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n}; // :: string\n// Concatenates all the text nodes found in this fragment and its\n// children.\n\n\nprototypeAccessors$3.textContent.get = function () {\n return this.textBetween(0, this.content.size, \"\");\n}; // :: (number, number, ?string, ?string) → string\n// Get all text between positions `from` and `to`. When\n// `blockSeparator` is given, it will be inserted whenever a new\n// block node is started. When `leafText` is given, it'll be\n// inserted for every non-text leaf node encountered.\n\n\nNode.prototype.textBetween = function textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n}; // :: ?Node\n// Returns this node's first child, or `null` if there are no\n// children.\n\n\nprototypeAccessors$3.firstChild.get = function () {\n return this.content.firstChild;\n}; // :: ?Node\n// Returns this node's last child, or `null` if there are no\n// children.\n\n\nprototypeAccessors$3.lastChild.get = function () {\n return this.content.lastChild;\n}; // :: (Node) → bool\n// Test whether two nodes represent the same piece of document.\n\n\nNode.prototype.eq = function eq(other) {\n return this == other || this.sameMarkup(other) && this.content.eq(other.content);\n}; // :: (Node) → bool\n// Compare the markup (type, attributes, and marks) of this node to\n// those of another. Returns `true` if both have the same markup.\n\n\nNode.prototype.sameMarkup = function sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n}; // :: (NodeType, ?Object, ?[Mark]) → bool\n// Check whether this node's markup correspond to the given type,\n// attributes, and marks.\n\n\nNode.prototype.hasMarkup = function hasMarkup(type, attrs, marks) {\n return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none);\n}; // :: (?Fragment) → Node\n// Create a new node with the same markup as this node, containing\n// the given content (or empty, if no content is given).\n\n\nNode.prototype.copy = function copy(content) {\n if (content === void 0) content = null;\n\n if (content == this.content) {\n return this;\n }\n\n return new this.constructor(this.type, this.attrs, content, this.marks);\n}; // :: ([Mark]) → Node\n// Create a copy of this node, with the given set of marks instead\n// of the node's own marks.\n\n\nNode.prototype.mark = function mark(marks) {\n return marks == this.marks ? this : new this.constructor(this.type, this.attrs, this.content, marks);\n}; // :: (number, ?number) → Node\n// Create a copy of this node with only the content between the\n// given positions. If `to` is not given, it defaults to the end of\n// the node.\n\n\nNode.prototype.cut = function cut(from, to) {\n if (from == 0 && to == this.content.size) {\n return this;\n }\n\n return this.copy(this.content.cut(from, to));\n}; // :: (number, ?number) → Slice\n// Cut out the part of the document between the given positions, and\n// return it as a `Slice` object.\n\n\nNode.prototype.slice = function slice(from, to, includeParents) {\n if (to === void 0) to = this.content.size;\n if (includeParents === void 0) includeParents = false;\n\n if (from == to) {\n return Slice.empty;\n }\n\n var $from = this.resolve(from),\n $to = this.resolve(to);\n var depth = includeParents ? 0 : $from.sharedDepth(to);\n var start = $from.start(depth),\n node = $from.node(depth);\n var content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n}; // :: (number, number, Slice) → Node\n// Replace the part of the document between the given positions with\n// the given slice. The slice must 'fit', meaning its open sides\n// must be able to connect to the surrounding content, and its\n// content nodes must be valid children for the node they are placed\n// into. If any of this is violated, an error of type\n// [`ReplaceError`](#model.ReplaceError) is thrown.\n\n\nNode.prototype.replace = function replace$1(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n}; // :: (number) → ?Node\n// Find the node directly after the given position.\n\n\nNode.prototype.nodeAt = function nodeAt(pos) {\n for (var node = this;;) {\n var ref = node.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n node = node.maybeChild(index);\n\n if (!node) {\n return null;\n }\n\n if (offset == pos || node.isText) {\n return node;\n }\n\n pos -= offset + 1;\n }\n}; // :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node after the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\n\n\nNode.prototype.childAfter = function childAfter(pos) {\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n return {\n node: this.content.maybeChild(index),\n index: index,\n offset: offset\n };\n}; // :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node before the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\n\n\nNode.prototype.childBefore = function childBefore(pos) {\n if (pos == 0) {\n return {\n node: null,\n index: 0,\n offset: 0\n };\n }\n\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n\n if (offset < pos) {\n return {\n node: this.content.child(index),\n index: index,\n offset: offset\n };\n }\n\n var node = this.content.child(index - 1);\n return {\n node: node,\n index: index - 1,\n offset: offset - node.nodeSize\n };\n}; // :: (number) → ResolvedPos\n// Resolve the given position in the document, returning an\n// [object](#model.ResolvedPos) with information about its context.\n\n\nNode.prototype.resolve = function resolve(pos) {\n return ResolvedPos.resolveCached(this, pos);\n};\n\nNode.prototype.resolveNoCache = function resolveNoCache(pos) {\n return ResolvedPos.resolve(this, pos);\n}; // :: (number, number, MarkType) → bool\n// Test whether a mark of the given type occurs in this document\n// between the two given positions.\n\n\nNode.prototype.rangeHasMark = function rangeHasMark(from, to, type) {\n var found = false;\n\n if (to > from) {\n this.nodesBetween(from, to, function (node) {\n if (type.isInSet(node.marks)) {\n found = true;\n }\n\n return !found;\n });\n }\n\n return found;\n}; // :: bool\n// True when this is a block (non-inline node)\n\n\nprototypeAccessors$3.isBlock.get = function () {\n return this.type.isBlock;\n}; // :: bool\n// True when this is a textblock node, a block node with inline\n// content.\n\n\nprototypeAccessors$3.isTextblock.get = function () {\n return this.type.isTextblock;\n}; // :: bool\n// True when this node allows inline content.\n\n\nprototypeAccessors$3.inlineContent.get = function () {\n return this.type.inlineContent;\n}; // :: bool\n// True when this is an inline node (a text node or a node that can\n// appear among text).\n\n\nprototypeAccessors$3.isInline.get = function () {\n return this.type.isInline;\n}; // :: bool\n// True when this is a text node.\n\n\nprototypeAccessors$3.isText.get = function () {\n return this.type.isText;\n}; // :: bool\n// True when this is a leaf node.\n\n\nprototypeAccessors$3.isLeaf.get = function () {\n return this.type.isLeaf;\n}; // :: bool\n// True when this is an atom, i.e. when it does not have directly\n// editable content. This is usually the same as `isLeaf`, but can\n// be configured with the [`atom` property](#model.NodeSpec.atom) on\n// a node's spec (typically used when the node is displayed as an\n// uneditable [node view](#view.NodeView)).\n\n\nprototypeAccessors$3.isAtom.get = function () {\n return this.type.isAtom;\n}; // :: () → string\n// Return a string representation of this node for debugging\n// purposes.\n\n\nNode.prototype.toString = function toString() {\n if (this.type.spec.toDebugString) {\n return this.type.spec.toDebugString(this);\n }\n\n var name = this.type.name;\n\n if (this.content.size) {\n name += \"(\" + this.content.toStringInner() + \")\";\n }\n\n return wrapMarks(this.marks, name);\n}; // :: (number) → ContentMatch\n// Get the content match in this node at the given index.\n\n\nNode.prototype.contentMatchAt = function contentMatchAt(index) {\n var match = this.type.contentMatch.matchFragment(this.content, 0, index);\n\n if (!match) {\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n }\n\n return match;\n}; // :: (number, number, ?Fragment, ?number, ?number) → bool\n// Test whether replacing the range between `from` and `to` (by\n// child index) with the given replacement fragment (which defaults\n// to the empty fragment) would leave the node's content valid. You\n// can optionally pass `start` and `end` indices into the\n// replacement fragment.\n\n\nNode.prototype.canReplace = function canReplace(from, to, replacement, start, end) {\n if (replacement === void 0) replacement = Fragment.empty;\n if (start === void 0) start = 0;\n if (end === void 0) end = replacement.childCount;\n var one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n var two = one && one.matchFragment(this.content, to);\n\n if (!two || !two.validEnd) {\n return false;\n }\n\n for (var i = start; i < end; i++) {\n if (!this.type.allowsMarks(replacement.child(i).marks)) {\n return false;\n }\n }\n\n return true;\n}; // :: (number, number, NodeType, ?[Mark]) → bool\n// Test whether replacing the range `from` to `to` (by index) with a\n// node of the given type would leave the node's content valid.\n\n\nNode.prototype.canReplaceWith = function canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks)) {\n return false;\n }\n\n var start = this.contentMatchAt(from).matchType(type);\n var end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n}; // :: (Node) → bool\n// Test whether the given node's content could be appended to this\n// node. If that node is empty, this will only return true if there\n// is at least one node type that can appear in both nodes (to avoid\n// merging completely incompatible nodes).\n\n\nNode.prototype.canAppend = function canAppend(other) {\n if (other.content.size) {\n return this.canReplace(this.childCount, this.childCount, other.content);\n } else {\n return this.type.compatibleContent(other.type);\n }\n}; // :: ()\n// Check whether this node and its descendants conform to the\n// schema, and raise error when they do not.\n\n\nNode.prototype.check = function check() {\n if (!this.type.validContent(this.content)) {\n throw new RangeError(\"Invalid content for node \" + this.type.name + \": \" + this.content.toString().slice(0, 50));\n }\n\n this.content.forEach(function (node) {\n return node.check();\n });\n}; // :: () → Object\n// Return a JSON-serializeable representation of this node.\n\n\nNode.prototype.toJSON = function toJSON() {\n var obj = {\n type: this.type.name\n };\n\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n\n if (this.content.size) {\n obj.content = this.content.toJSON();\n }\n\n if (this.marks.length) {\n obj.marks = this.marks.map(function (n) {\n return n.toJSON();\n });\n }\n\n return obj;\n}; // :: (Schema, Object) → Node\n// Deserialize a node from its JSON representation.\n\n\nNode.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n }\n\n var marks = null;\n\n if (json.marks) {\n if (!Array.isArray(json.marks)) {\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n }\n\n marks = json.marks.map(schema.markFromJSON);\n }\n\n if (json.type == \"text\") {\n if (typeof json.text != \"string\") {\n throw new RangeError(\"Invalid text node in JSON\");\n }\n\n return schema.text(json.text, marks);\n }\n\n var content = Fragment.fromJSON(schema, json.content);\n return schema.nodeType(json.type).create(json.attrs, content, marks);\n};\n\nObject.defineProperties(Node.prototype, prototypeAccessors$3);\n\nvar TextNode = /*@__PURE__*/function (Node) {\n function TextNode(type, attrs, content, marks) {\n Node.call(this, type, attrs, null, marks);\n\n if (!content) {\n throw new RangeError(\"Empty text nodes are not allowed\");\n }\n\n this.text = content;\n }\n\n if (Node) TextNode.__proto__ = Node;\n TextNode.prototype = Object.create(Node && Node.prototype);\n TextNode.prototype.constructor = TextNode;\n var prototypeAccessors$1 = {\n textContent: {\n configurable: true\n },\n nodeSize: {\n configurable: true\n }\n };\n\n TextNode.prototype.toString = function toString() {\n if (this.type.spec.toDebugString) {\n return this.type.spec.toDebugString(this);\n }\n\n return wrapMarks(this.marks, JSON.stringify(this.text));\n };\n\n prototypeAccessors$1.textContent.get = function () {\n return this.text;\n };\n\n TextNode.prototype.textBetween = function textBetween(from, to) {\n return this.text.slice(from, to);\n };\n\n prototypeAccessors$1.nodeSize.get = function () {\n return this.text.length;\n };\n\n TextNode.prototype.mark = function mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n };\n\n TextNode.prototype.withText = function withText(text) {\n if (text == this.text) {\n return this;\n }\n\n return new TextNode(this.type, this.attrs, text, this.marks);\n };\n\n TextNode.prototype.cut = function cut(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.text.length;\n\n if (from == 0 && to == this.text.length) {\n return this;\n }\n\n return this.withText(this.text.slice(from, to));\n };\n\n TextNode.prototype.eq = function eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n };\n\n TextNode.prototype.toJSON = function toJSON() {\n var base = Node.prototype.toJSON.call(this);\n base.text = this.text;\n return base;\n };\n\n Object.defineProperties(TextNode.prototype, prototypeAccessors$1);\n return TextNode;\n}(Node);\n\nfunction wrapMarks(marks, str) {\n for (var i = marks.length - 1; i >= 0; i--) {\n str = marks[i].type.name + \"(\" + str + \")\";\n }\n\n return str;\n} // ::- Instances of this class represent a match state of a node\n// type's [content expression](#model.NodeSpec.content), and can be\n// used to find out whether further content matches here, and whether\n// a given position is a valid end of the node.\n\n\nvar ContentMatch = function ContentMatch(validEnd) {\n // :: bool\n // True when this match state represents a valid end of the node.\n this.validEnd = validEnd;\n this.next = [];\n this.wrapCache = [];\n};\n\nvar prototypeAccessors$4 = {\n inlineContent: {\n configurable: true\n },\n defaultType: {\n configurable: true\n },\n edgeCount: {\n configurable: true\n }\n};\n\nContentMatch.parse = function parse(string, nodeTypes) {\n var stream = new TokenStream(string, nodeTypes);\n\n if (stream.next == null) {\n return ContentMatch.empty;\n }\n\n var expr = parseExpr(stream);\n\n if (stream.next) {\n stream.err(\"Unexpected trailing text\");\n }\n\n var match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n}; // :: (NodeType) → ?ContentMatch\n// Match a node type, returning a match after that node if\n// successful.\n\n\nContentMatch.prototype.matchType = function matchType(type) {\n for (var i = 0; i < this.next.length; i += 2) {\n if (this.next[i] == type) {\n return this.next[i + 1];\n }\n }\n\n return null;\n}; // :: (Fragment, ?number, ?number) → ?ContentMatch\n// Try to match a fragment. Returns the resulting match when\n// successful.\n\n\nContentMatch.prototype.matchFragment = function matchFragment(frag, start, end) {\n if (start === void 0) start = 0;\n if (end === void 0) end = frag.childCount;\n var cur = this;\n\n for (var i = start; cur && i < end; i++) {\n cur = cur.matchType(frag.child(i).type);\n }\n\n return cur;\n};\n\nprototypeAccessors$4.inlineContent.get = function () {\n var first = this.next[0];\n return first ? first.isInline : false;\n}; // :: ?NodeType\n// Get the first matching node type at this match position that can\n// be generated.\n\n\nprototypeAccessors$4.defaultType.get = function () {\n for (var i = 0; i < this.next.length; i += 2) {\n var type = this.next[i];\n\n if (!(type.isText || type.hasRequiredAttrs())) {\n return type;\n }\n }\n};\n\nContentMatch.prototype.compatible = function compatible(other) {\n for (var i = 0; i < this.next.length; i += 2) {\n for (var j = 0; j < other.next.length; j += 2) {\n if (this.next[i] == other.next[j]) {\n return true;\n }\n }\n }\n\n return false;\n}; // :: (Fragment, bool, ?number) → ?Fragment\n// Try to match the given fragment, and if that fails, see if it can\n// be made to match by inserting nodes in front of it. When\n// successful, return a fragment of inserted nodes (which may be\n// empty if nothing had to be inserted). When `toEnd` is true, only\n// return a fragment if the resulting match goes to the end of the\n// content expression.\n\n\nContentMatch.prototype.fillBefore = function fillBefore(after, toEnd, startIndex) {\n if (toEnd === void 0) toEnd = false;\n if (startIndex === void 0) startIndex = 0;\n var seen = [this];\n\n function search(match, types) {\n var finished = match.matchFragment(after, startIndex);\n\n if (finished && (!toEnd || finished.validEnd)) {\n return Fragment.from(types.map(function (tp) {\n return tp.createAndFill();\n }));\n }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i],\n next = match.next[i + 1];\n\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n var found = search(next, types.concat(type));\n\n if (found) {\n return found;\n }\n }\n }\n }\n\n return search(this, []);\n}; // :: (NodeType) → ?[NodeType]\n// Find a set of wrapping node types that would allow a node of the\n// given type to appear at this position. The result may be empty\n// (when it fits directly) and will be null when no such wrapping\n// exists.\n\n\nContentMatch.prototype.findWrapping = function findWrapping(target) {\n for (var i = 0; i < this.wrapCache.length; i += 2) {\n if (this.wrapCache[i] == target) {\n return this.wrapCache[i + 1];\n }\n }\n\n var computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n};\n\nContentMatch.prototype.computeWrapping = function computeWrapping(target) {\n var seen = Object.create(null),\n active = [{\n match: this,\n type: null,\n via: null\n }];\n\n while (active.length) {\n var current = active.shift(),\n match = current.match;\n\n if (match.matchType(target)) {\n var result = [];\n\n for (var obj = current; obj.type; obj = obj.via) {\n result.push(obj.type);\n }\n\n return result.reverse();\n }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i];\n\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) {\n active.push({\n match: type.contentMatch,\n type: type,\n via: current\n });\n seen[type.name] = true;\n }\n }\n }\n}; // :: number\n// The number of outgoing edges this node has in the finite\n// automaton that describes the content expression.\n\n\nprototypeAccessors$4.edgeCount.get = function () {\n return this.next.length >> 1;\n}; // :: (number) → {type: NodeType, next: ContentMatch}\n// Get the _n_​th outgoing edge from this node in the finite\n// automaton that describes the content expression.\n\n\nContentMatch.prototype.edge = function edge(n) {\n var i = n << 1;\n\n if (i >= this.next.length) {\n throw new RangeError(\"There's no \" + n + \"th edge in this content match\");\n }\n\n return {\n type: this.next[i],\n next: this.next[i + 1]\n };\n};\n\nContentMatch.prototype.toString = function toString() {\n var seen = [];\n\n function scan(m) {\n seen.push(m);\n\n for (var i = 1; i < m.next.length; i += 2) {\n if (seen.indexOf(m.next[i]) == -1) {\n scan(m.next[i]);\n }\n }\n }\n\n scan(this);\n return seen.map(function (m, i) {\n var out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n\n for (var i$1 = 0; i$1 < m.next.length; i$1 += 2) {\n out += (i$1 ? \", \" : \"\") + m.next[i$1].name + \"->\" + seen.indexOf(m.next[i$1 + 1]);\n }\n\n return out;\n }).join(\"\\n\");\n};\n\nObject.defineProperties(ContentMatch.prototype, prototypeAccessors$4);\nContentMatch.empty = new ContentMatch(true);\n\nvar TokenStream = function TokenStream(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n\n if (this.tokens[this.tokens.length - 1] == \"\") {\n this.tokens.pop();\n }\n\n if (this.tokens[0] == \"\") {\n this.tokens.unshift();\n }\n};\n\nvar prototypeAccessors$1$2 = {\n next: {\n configurable: true\n }\n};\n\nprototypeAccessors$1$2.next.get = function () {\n return this.tokens[this.pos];\n};\n\nTokenStream.prototype.eat = function eat(tok) {\n return this.next == tok && (this.pos++ || true);\n};\n\nTokenStream.prototype.err = function err(str) {\n throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\");\n};\n\nObject.defineProperties(TokenStream.prototype, prototypeAccessors$1$2);\n\nfunction parseExpr(stream) {\n var exprs = [];\n\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n}\n\nfunction parseExprSeq(stream) {\n var exprs = [];\n\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n\n return exprs.length == 1 ? exprs[0] : {\n type: \"seq\",\n exprs: exprs\n };\n}\n\nfunction parseExprSubscript(stream) {\n var expr = parseExprAtom(stream);\n\n for (;;) {\n if (stream.eat(\"+\")) {\n expr = {\n type: \"plus\",\n expr: expr\n };\n } else if (stream.eat(\"*\")) {\n expr = {\n type: \"star\",\n expr: expr\n };\n } else if (stream.eat(\"?\")) {\n expr = {\n type: \"opt\",\n expr: expr\n };\n } else if (stream.eat(\"{\")) {\n expr = parseExprRange(stream, expr);\n } else {\n break;\n }\n }\n\n return expr;\n}\n\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next)) {\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n }\n\n var result = Number(stream.next);\n stream.pos++;\n return result;\n}\n\nfunction parseExprRange(stream, expr) {\n var min = parseNum(stream),\n max = min;\n\n if (stream.eat(\",\")) {\n if (stream.next != \"}\") {\n max = parseNum(stream);\n } else {\n max = -1;\n }\n }\n\n if (!stream.eat(\"}\")) {\n stream.err(\"Unclosed braced range\");\n }\n\n return {\n type: \"range\",\n min: min,\n max: max,\n expr: expr\n };\n}\n\nfunction resolveName(stream, name) {\n var types = stream.nodeTypes,\n type = types[name];\n\n if (type) {\n return [type];\n }\n\n var result = [];\n\n for (var typeName in types) {\n var type$1 = types[typeName];\n\n if (type$1.groups.indexOf(name) > -1) {\n result.push(type$1);\n }\n }\n\n if (result.length == 0) {\n stream.err(\"No node type or group '\" + name + \"' found\");\n }\n\n return result;\n}\n\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n var expr = parseExpr(stream);\n\n if (!stream.eat(\")\")) {\n stream.err(\"Missing closing paren\");\n }\n\n return expr;\n } else if (!/\\W/.test(stream.next)) {\n var exprs = resolveName(stream, stream.next).map(function (type) {\n if (stream.inline == null) {\n stream.inline = type.isInline;\n } else if (stream.inline != type.isInline) {\n stream.err(\"Mixing inline and block content\");\n }\n\n return {\n type: \"name\",\n value: type\n };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n } else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n} // The code below helps compile a regular-expression-like language\n// into a deterministic finite automaton. For a good introduction to\n// these concepts, see https://swtch.com/~rsc/regexp/regexp1.html\n// : (Object) → [[{term: ?any, to: number}]]\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\n\n\nfunction nfa(expr) {\n var nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n\n function node() {\n return nfa.push([]) - 1;\n }\n\n function edge(from, to, term) {\n var edge = {\n term: term,\n to: to\n };\n nfa[from].push(edge);\n return edge;\n }\n\n function connect(edges, to) {\n edges.forEach(function (edge) {\n return edge.to = to;\n });\n }\n\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce(function (out, expr) {\n return out.concat(compile(expr, from));\n }, []);\n } else if (expr.type == \"seq\") {\n for (var i = 0;; i++) {\n var next = compile(expr.exprs[i], from);\n\n if (i == expr.exprs.length - 1) {\n return next;\n }\n\n connect(next, from = node());\n }\n } else if (expr.type == \"star\") {\n var loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n } else if (expr.type == \"plus\") {\n var loop$1 = node();\n connect(compile(expr.expr, from), loop$1);\n connect(compile(expr.expr, loop$1), loop$1);\n return [edge(loop$1)];\n } else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n } else if (expr.type == \"range\") {\n var cur = from;\n\n for (var i$1 = 0; i$1 < expr.min; i$1++) {\n var next$1 = node();\n connect(compile(expr.expr, cur), next$1);\n cur = next$1;\n }\n\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n } else {\n for (var i$2 = expr.min; i$2 < expr.max; i$2++) {\n var next$2 = node();\n edge(cur, next$2);\n connect(compile(expr.expr, cur), next$2);\n cur = next$2;\n }\n }\n\n return [edge(cur)];\n } else if (expr.type == \"name\") {\n return [edge(from, null, expr.value)];\n }\n }\n}\n\nfunction cmp(a, b) {\n return b - a;\n} // Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\n\n\nfunction nullFrom(nfa, node) {\n var result = [];\n scan(node);\n return result.sort(cmp);\n\n function scan(node) {\n var edges = nfa[node];\n\n if (edges.length == 1 && !edges[0].term) {\n return scan(edges[0].to);\n }\n\n result.push(node);\n\n for (var i = 0; i < edges.length; i++) {\n var ref = edges[i];\n var term = ref.term;\n var to = ref.to;\n\n if (!term && result.indexOf(to) == -1) {\n scan(to);\n }\n }\n }\n} // : ([[{term: ?any, to: number}]]) → ContentMatch\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\n\n\nfunction dfa(nfa) {\n var labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n\n function explore(states) {\n var out = [];\n states.forEach(function (node) {\n nfa[node].forEach(function (ref) {\n var term = ref.term;\n var to = ref.to;\n\n if (!term) {\n return;\n }\n\n var known = out.indexOf(term),\n set = known > -1 && out[known + 1];\n nullFrom(nfa, to).forEach(function (node) {\n if (!set) {\n out.push(term, set = []);\n }\n\n if (set.indexOf(node) == -1) {\n set.push(node);\n }\n });\n });\n });\n var state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n\n for (var i = 0; i < out.length; i += 2) {\n var states$1 = out[i + 1].sort(cmp);\n state.next.push(out[i], labeled[states$1.join(\",\")] || explore(states$1));\n }\n\n return state;\n }\n}\n\nfunction checkForDeadEnds(match, stream) {\n for (var i = 0, work = [match]; i < work.length; i++) {\n var state = work[i],\n dead = !state.validEnd,\n nodes = [];\n\n for (var j = 0; j < state.next.length; j += 2) {\n var node = state.next[j],\n next = state.next[j + 1];\n nodes.push(node.name);\n\n if (dead && !(node.isText || node.hasRequiredAttrs())) {\n dead = false;\n }\n\n if (work.indexOf(next) == -1) {\n work.push(next);\n }\n }\n\n if (dead) {\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position\");\n }\n }\n} // For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\n\n\nfunction defaultAttrs(attrs) {\n var defaults = Object.create(null);\n\n for (var attrName in attrs) {\n var attr = attrs[attrName];\n\n if (!attr.hasDefault) {\n return null;\n }\n\n defaults[attrName] = attr[\"default\"];\n }\n\n return defaults;\n}\n\nfunction computeAttrs(attrs, value) {\n var built = Object.create(null);\n\n for (var name in attrs) {\n var given = value && value[name];\n\n if (given === undefined) {\n var attr = attrs[name];\n\n if (attr.hasDefault) {\n given = attr[\"default\"];\n } else {\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n }\n\n built[name] = given;\n }\n\n return built;\n}\n\nfunction initAttrs(attrs) {\n var result = Object.create(null);\n\n if (attrs) {\n for (var name in attrs) {\n result[name] = new Attribute(attrs[name]);\n }\n }\n\n return result;\n} // ::- Node types are objects allocated once per `Schema` and used to\n// [tag](#model.Node.type) `Node` instances. They contain information\n// about the node type, such as its name and what kind of node it\n// represents.\n\n\nvar NodeType = function NodeType(name, schema, spec) {\n // :: string\n // The name the node type has in this schema.\n this.name = name; // :: Schema\n // A link back to the `Schema` the node type belongs to.\n\n this.schema = schema; // :: NodeSpec\n // The spec that this type is based on\n\n this.spec = spec;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs); // :: ContentMatch\n // The starting match of the node type's content expression.\n\n this.contentMatch = null; // : ?[MarkType]\n // The set of marks allowed in this node. `null` means all marks\n // are allowed.\n\n this.markSet = null; // :: bool\n // True if this node type has inline content.\n\n this.inlineContent = null; // :: bool\n // True if this is a block type\n\n this.isBlock = !(spec.inline || name == \"text\"); // :: bool\n // True if this is the text node type.\n\n this.isText = name == \"text\";\n};\n\nvar prototypeAccessors$5 = {\n isInline: {\n configurable: true\n },\n isTextblock: {\n configurable: true\n },\n isLeaf: {\n configurable: true\n },\n isAtom: {\n configurable: true\n }\n}; // :: bool\n// True if this is an inline type.\n\nprototypeAccessors$5.isInline.get = function () {\n return !this.isBlock;\n}; // :: bool\n// True if this is a textblock type, a block that contains inline\n// content.\n\n\nprototypeAccessors$5.isTextblock.get = function () {\n return this.isBlock && this.inlineContent;\n}; // :: bool\n// True for node types that allow no content.\n\n\nprototypeAccessors$5.isLeaf.get = function () {\n return this.contentMatch == ContentMatch.empty;\n}; // :: bool\n// True when this node is an atom, i.e. when it does not have\n// directly editable content.\n\n\nprototypeAccessors$5.isAtom.get = function () {\n return this.isLeaf || this.spec.atom;\n}; // :: () → bool\n// Tells you whether this node type has any required attributes.\n\n\nNodeType.prototype.hasRequiredAttrs = function hasRequiredAttrs() {\n for (var n in this.attrs) {\n if (this.attrs[n].isRequired) {\n return true;\n }\n }\n\n return false;\n};\n\nNodeType.prototype.compatibleContent = function compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n};\n\nNodeType.prototype.computeAttrs = function computeAttrs$1(attrs) {\n if (!attrs && this.defaultAttrs) {\n return this.defaultAttrs;\n } else {\n return computeAttrs(this.attrs, attrs);\n }\n}; // :: (?Object, ?union, ?[Mark]) → Node\n// Create a `Node` of this type. The given attributes are\n// checked and defaulted (you can pass `null` to use the type's\n// defaults entirely, if no required attributes exist). `content`\n// may be a `Fragment`, a node, an array of nodes, or\n// `null`. Similarly `marks` may be `null` to default to the empty\n// set of marks.\n\n\nNodeType.prototype.create = function create(attrs, content, marks) {\n if (this.isText) {\n throw new Error(\"NodeType.create can't construct text nodes\");\n }\n\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n}; // :: (?Object, ?union, ?[Mark]) → Node\n// Like [`create`](#model.NodeType.create), but check the given content\n// against the node type's content restrictions, and throw an error\n// if it doesn't match.\n\n\nNodeType.prototype.createChecked = function createChecked(attrs, content, marks) {\n content = Fragment.from(content);\n\n if (!this.validContent(content)) {\n throw new RangeError(\"Invalid content for node \" + this.name);\n }\n\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n}; // :: (?Object, ?union, ?[Mark]) → ?Node\n// Like [`create`](#model.NodeType.create), but see if it is necessary to\n// add nodes to the start or end of the given fragment to make it\n// fit the node. If no fitting wrapping can be found, return null.\n// Note that, due to the fact that required nodes can always be\n// created, this will always succeed if you pass null or\n// `Fragment.empty` as content.\n\n\nNodeType.prototype.createAndFill = function createAndFill(attrs, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n\n if (content.size) {\n var before = this.contentMatch.fillBefore(content);\n\n if (!before) {\n return null;\n }\n\n content = before.append(content);\n }\n\n var after = this.contentMatch.matchFragment(content).fillBefore(Fragment.empty, true);\n\n if (!after) {\n return null;\n }\n\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n}; // :: (Fragment) → bool\n// Returns true if the given fragment is valid content for this node\n// type with the given attributes.\n\n\nNodeType.prototype.validContent = function validContent(content) {\n var result = this.contentMatch.matchFragment(content);\n\n if (!result || !result.validEnd) {\n return false;\n }\n\n for (var i = 0; i < content.childCount; i++) {\n if (!this.allowsMarks(content.child(i).marks)) {\n return false;\n }\n }\n\n return true;\n}; // :: (MarkType) → bool\n// Check whether the given mark type is allowed in this node.\n\n\nNodeType.prototype.allowsMarkType = function allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n}; // :: ([Mark]) → bool\n// Test whether the given set of marks are allowed in this node.\n\n\nNodeType.prototype.allowsMarks = function allowsMarks(marks) {\n if (this.markSet == null) {\n return true;\n }\n\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n return false;\n }\n }\n\n return true;\n}; // :: ([Mark]) → [Mark]\n// Removes the marks that are not allowed in this node from the given set.\n\n\nNodeType.prototype.allowedMarks = function allowedMarks(marks) {\n if (this.markSet == null) {\n return marks;\n }\n\n var copy;\n\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy) {\n copy = marks.slice(0, i);\n }\n } else if (copy) {\n copy.push(marks[i]);\n }\n }\n\n return !copy ? marks : copy.length ? copy : Mark.empty;\n};\n\nNodeType.compile = function compile(nodes, schema) {\n var result = Object.create(null);\n nodes.forEach(function (name, spec) {\n return result[name] = new NodeType(name, schema, spec);\n });\n var topType = schema.spec.topNode || \"doc\";\n\n if (!result[topType]) {\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n }\n\n if (!result.text) {\n throw new RangeError(\"Every schema needs a 'text' type\");\n }\n\n for (var _ in result.text.attrs) {\n throw new RangeError(\"The text node type should not have attributes\");\n }\n\n return result;\n};\n\nObject.defineProperties(NodeType.prototype, prototypeAccessors$5); // Attribute descriptors\n\nvar Attribute = function Attribute(options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this[\"default\"] = options[\"default\"];\n};\n\nvar prototypeAccessors$1$3 = {\n isRequired: {\n configurable: true\n }\n};\n\nprototypeAccessors$1$3.isRequired.get = function () {\n return !this.hasDefault;\n};\n\nObject.defineProperties(Attribute.prototype, prototypeAccessors$1$3); // Marks\n// ::- Like nodes, marks (which are associated with nodes to signify\n// things like emphasis or being part of a link) are\n// [tagged](#model.Mark.type) with type objects, which are\n// instantiated once per `Schema`.\n\nvar MarkType = function MarkType(name, rank, schema, spec) {\n // :: string\n // The name of the mark type.\n this.name = name; // :: Schema\n // The schema that this mark type instance is part of.\n\n this.schema = schema; // :: MarkSpec\n // The spec on which the type is based.\n\n this.spec = spec;\n this.attrs = initAttrs(spec.attrs);\n this.rank = rank;\n this.excluded = null;\n var defaults = defaultAttrs(this.attrs);\n this.instance = defaults && new Mark(this, defaults);\n}; // :: (?Object) → Mark\n// Create a mark of this type. `attrs` may be `null` or an object\n// containing only some of the mark's attributes. The others, if\n// they have defaults, will be added.\n\n\nMarkType.prototype.create = function create(attrs) {\n if (!attrs && this.instance) {\n return this.instance;\n }\n\n return new Mark(this, computeAttrs(this.attrs, attrs));\n};\n\nMarkType.compile = function compile(marks, schema) {\n var result = Object.create(null),\n rank = 0;\n marks.forEach(function (name, spec) {\n return result[name] = new MarkType(name, rank++, schema, spec);\n });\n return result;\n}; // :: ([Mark]) → [Mark]\n// When there is a mark of this type in the given set, a new set\n// without it is returned. Otherwise, the input set is returned.\n\n\nMarkType.prototype.removeFromSet = function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (set[i].type == this) {\n return set.slice(0, i).concat(set.slice(i + 1));\n }\n }\n\n return set;\n}; // :: ([Mark]) → ?Mark\n// Tests whether there is a mark of this type in the given set.\n\n\nMarkType.prototype.isInSet = function isInSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (set[i].type == this) {\n return set[i];\n }\n }\n}; // :: (MarkType) → bool\n// Queries whether a given mark type is\n// [excluded](#model.MarkSpec.excludes) by this one.\n\n\nMarkType.prototype.excludes = function excludes(other) {\n return this.excluded.indexOf(other) > -1;\n}; // SchemaSpec:: interface\n// An object describing a schema, as passed to the [`Schema`](#model.Schema)\n// constructor.\n//\n// nodes:: union, OrderedMap>\n// The node types in this schema. Maps names to\n// [`NodeSpec`](#model.NodeSpec) objects that describe the node type\n// associated with that name. Their order is significant—it\n// determines which [parse rules](#model.NodeSpec.parseDOM) take\n// precedence by default, and which nodes come first in a given\n// [group](#model.NodeSpec.group).\n//\n// marks:: ?union, OrderedMap>\n// The mark types that exist in this schema. The order in which they\n// are provided determines the order in which [mark\n// sets](#model.Mark.addToSet) are sorted and in which [parse\n// rules](#model.MarkSpec.parseDOM) are tried.\n//\n// topNode:: ?string\n// The name of the default top-level node for the schema. Defaults\n// to `\"doc\"`.\n// NodeSpec:: interface\n//\n// content:: ?string\n// The content expression for this node, as described in the [schema\n// guide](/docs/guide/#schema.content_expressions). When not given,\n// the node does not allow any content.\n//\n// marks:: ?string\n// The marks that are allowed inside of this node. May be a\n// space-separated string referring to mark names or groups, `\"_\"`\n// to explicitly allow all marks, or `\"\"` to disallow marks. When\n// not given, nodes with inline content default to allowing all\n// marks, other nodes default to not allowing marks.\n//\n// group:: ?string\n// The group or space-separated groups to which this node belongs,\n// which can be referred to in the content expressions for the\n// schema.\n//\n// inline:: ?bool\n// Should be set to true for inline nodes. (Implied for text nodes.)\n//\n// atom:: ?bool\n// Can be set to true to indicate that, though this isn't a [leaf\n// node](#model.NodeType.isLeaf), it doesn't have directly editable\n// content and should be treated as a single unit in the view.\n//\n// attrs:: ?Object\n// The attributes that nodes of this type get.\n//\n// selectable:: ?bool\n// Controls whether nodes of this type can be selected as a [node\n// selection](#state.NodeSelection). Defaults to true for non-text\n// nodes.\n//\n// draggable:: ?bool\n// Determines whether nodes of this type can be dragged without\n// being selected. Defaults to false.\n//\n// code:: ?bool\n// Can be used to indicate that this node contains code, which\n// causes some commands to behave differently.\n//\n// defining:: ?bool\n// Determines whether this node is considered an important parent\n// node during replace operations (such as paste). Non-defining (the\n// default) nodes get dropped when their entire content is replaced,\n// whereas defining nodes persist and wrap the inserted content.\n// Likewise, in _inserted_ content the defining parents of the\n// content are preserved when possible. Typically,\n// non-default-paragraph textblock types, and possibly list items,\n// are marked as defining.\n//\n// isolating:: ?bool\n// When enabled (default is false), the sides of nodes of this type\n// count as boundaries that regular editing operations, like\n// backspacing or lifting, won't cross. An example of a node that\n// should probably have this enabled is a table cell.\n//\n// toDOM:: ?(node: Node) → DOMOutputSpec\n// Defines the default way a node of this type should be serialized\n// to DOM/HTML (as used by\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)).\n// Should return a DOM node or an [array\n// structure](#model.DOMOutputSpec) that describes one, with an\n// optional number zero (“hole”) in it to indicate where the node's\n// content should be inserted.\n//\n// For text nodes, the default is to create a text DOM node. Though\n// it is possible to create a serializer where text is rendered\n// differently, this is not supported inside the editor, so you\n// shouldn't override that in your text node spec.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this node, which can be\n// used by [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) to\n// automatically derive a parser. The `node` field in the rules is\n// implied (the name of this node will be filled in automatically).\n// If you supply your own parser, you do not need to also specify\n// parsing rules in your schema.\n//\n// toDebugString:: ?(node: Node) -> string\n// Defines the default way a node of this type should be serialized\n// to a string representation for debugging (e.g. in error messages).\n// MarkSpec:: interface\n//\n// attrs:: ?Object\n// The attributes that marks of this type get.\n//\n// inclusive:: ?bool\n// Whether this mark should be active when the cursor is positioned\n// at its end (or at its start when that is also the start of the\n// parent node). Defaults to true.\n//\n// excludes:: ?string\n// Determines which other marks this mark can coexist with. Should\n// be a space-separated strings naming other marks or groups of marks.\n// When a mark is [added](#model.Mark.addToSet) to a set, all marks\n// that it excludes are removed in the process. If the set contains\n// any mark that excludes the new mark but is not, itself, excluded\n// by the new mark, the mark can not be added an the set. You can\n// use the value `\"_\"` to indicate that the mark excludes all\n// marks in the schema.\n//\n// Defaults to only being exclusive with marks of the same type. You\n// can set it to an empty string (or any string not containing the\n// mark's own name) to allow multiple marks of a given type to\n// coexist (as long as they have different attributes).\n//\n// group:: ?string\n// The group or space-separated groups to which this mark belongs.\n//\n// spanning:: ?bool\n// Determines whether marks of this type can span multiple adjacent\n// nodes when serialized to DOM/HTML. Defaults to true.\n//\n// toDOM:: ?(mark: Mark, inline: bool) → DOMOutputSpec\n// Defines the default way marks of this type should be serialized\n// to DOM/HTML. When the resulting spec contains a hole, that is\n// where the marked content is placed. Otherwise, it is appended to\n// the top node.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this mark (see the\n// corresponding [node spec field](#model.NodeSpec.parseDOM)). The\n// `mark` field in the rules is implied.\n// AttributeSpec:: interface\n//\n// Used to [define](#model.NodeSpec.attrs) attributes on nodes or\n// marks.\n//\n// default:: ?any\n// The default value for this attribute, to use when no explicit\n// value is provided. Attributes that have no default must be\n// provided whenever a node or mark of a type that has them is\n// created.\n// ::- A document schema. Holds [node](#model.NodeType) and [mark\n// type](#model.MarkType) objects for the nodes and marks that may\n// occur in conforming documents, and provides functionality for\n// creating and deserializing such documents.\n\n\nvar Schema = function Schema(spec) {\n // :: SchemaSpec\n // The [spec](#model.SchemaSpec) on which the schema is based,\n // with the added guarantee that its `nodes` and `marks`\n // properties are\n // [`OrderedMap`](https://github.com/marijnh/orderedmap) instances\n // (not raw objects).\n this.spec = {};\n\n for (var prop in spec) {\n this.spec[prop] = spec[prop];\n }\n\n this.spec.nodes = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.nodes);\n this.spec.marks = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.marks); // :: Object\n // An object mapping the schema's node names to node type objects.\n\n this.nodes = NodeType.compile(this.spec.nodes, this); // :: Object\n // A map from mark names to mark type objects.\n\n this.marks = MarkType.compile(this.spec.marks, this);\n var contentExprCache = Object.create(null);\n\n for (var prop$1 in this.nodes) {\n if (prop$1 in this.marks) {\n throw new RangeError(prop$1 + \" can not be both a node and a mark\");\n }\n\n var type = this.nodes[prop$1],\n contentExpr = type.spec.content || \"\",\n markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n\n for (var prop$2 in this.marks) {\n var type$1 = this.marks[prop$2],\n excl = type$1.spec.excludes;\n type$1.excluded = excl == null ? [type$1] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this); // :: NodeType\n // The type of the [default top node](#model.SchemaSpec.topNode)\n // for this schema.\n\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"]; // :: Object\n // An object for storing whatever values modules may want to\n // compute and cache per schema. (If you want to store something\n // in it, try to use property names unlikely to clash.)\n\n this.cached = Object.create(null);\n this.cached.wrappings = Object.create(null);\n}; // :: (union, ?Object, ?union, ?[Mark]) → Node\n// Create a node in this schema. The `type` may be a string or a\n// `NodeType` instance. Attributes will be extended\n// with defaults, `content` may be a `Fragment`,\n// `null`, a `Node`, or an array of nodes.\n\n\nSchema.prototype.node = function node(type, attrs, content, marks) {\n if (typeof type == \"string\") {\n type = this.nodeType(type);\n } else if (!(type instanceof NodeType)) {\n throw new RangeError(\"Invalid node type: \" + type);\n } else if (type.schema != this) {\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n }\n\n return type.createChecked(attrs, content, marks);\n}; // :: (string, ?[Mark]) → Node\n// Create a text node in the schema. Empty text nodes are not\n// allowed.\n\n\nSchema.prototype.text = function text(text$1, marks) {\n var type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text$1, Mark.setFrom(marks));\n}; // :: (union, ?Object) → Mark\n// Create a mark with the given type and attributes.\n\n\nSchema.prototype.mark = function mark(type, attrs) {\n if (typeof type == \"string\") {\n type = this.marks[type];\n }\n\n return type.create(attrs);\n}; // :: (Object) → Node\n// Deserialize a node from its JSON representation. This method is\n// bound.\n\n\nSchema.prototype.nodeFromJSON = function nodeFromJSON(json) {\n return Node.fromJSON(this, json);\n}; // :: (Object) → Mark\n// Deserialize a mark from its JSON representation. This method is\n// bound.\n\n\nSchema.prototype.markFromJSON = function markFromJSON(json) {\n return Mark.fromJSON(this, json);\n};\n\nSchema.prototype.nodeType = function nodeType(name) {\n var found = this.nodes[name];\n\n if (!found) {\n throw new RangeError(\"Unknown node type: \" + name);\n }\n\n return found;\n};\n\nfunction gatherMarks(schema, marks) {\n var found = [];\n\n for (var i = 0; i < marks.length; i++) {\n var name = marks[i],\n mark = schema.marks[name],\n ok = mark;\n\n if (mark) {\n found.push(mark);\n } else {\n for (var prop in schema.marks) {\n var mark$1 = schema.marks[prop];\n\n if (name == \"_\" || mark$1.spec.group && mark$1.spec.group.split(\" \").indexOf(name) > -1) {\n found.push(ok = mark$1);\n }\n }\n }\n\n if (!ok) {\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n }\n\n return found;\n} // ParseOptions:: interface\n// These are the options recognized by the\n// [`parse`](#model.DOMParser.parse) and\n// [`parseSlice`](#model.DOMParser.parseSlice) methods.\n//\n// preserveWhitespace:: ?union\n// By default, whitespace is collapsed as per HTML's rules. Pass\n// `true` to preserve whitespace, but normalize newlines to\n// spaces, and `\"full\"` to preserve whitespace entirely.\n//\n// findPositions:: ?[{node: dom.Node, offset: number}]\n// When given, the parser will, beside parsing the content,\n// record the document positions of the given DOM positions. It\n// will do so by writing to the objects, adding a `pos` property\n// that holds the document position. DOM positions that are not\n// in the parsed content will not be written to.\n//\n// from:: ?number\n// The child node index to start parsing from.\n//\n// to:: ?number\n// The child node index to stop parsing at.\n//\n// topNode:: ?Node\n// By default, the content is parsed into the schema's default\n// [top node type](#model.Schema.topNodeType). You can pass this\n// option to use the type and attributes from a different node\n// as the top container.\n//\n// topMatch:: ?ContentMatch\n// Provide the starting content match that content parsed into the\n// top node is matched against.\n//\n// context:: ?ResolvedPos\n// A set of additional nodes to count as\n// [context](#model.ParseRule.context) when parsing, above the\n// given [top node](#model.ParseOptions.topNode).\n// ParseRule:: interface\n// A value that describes how to parse a given DOM node or inline\n// style as a ProseMirror node or mark.\n//\n// tag:: ?string\n// A CSS selector describing the kind of DOM elements to match. A\n// single rule should have _either_ a `tag` or a `style` property.\n//\n// namespace:: ?string\n// The namespace to match. This should be used with `tag`.\n// Nodes are only matched when the namespace matches or this property\n// is null.\n//\n// style:: ?string\n// A CSS property name to match. When given, this rule matches\n// inline styles that list that property. May also have the form\n// `\"property=value\"`, in which case the rule only matches if the\n// propery's value exactly matches the given value. (For more\n// complicated filters, use [`getAttrs`](#model.ParseRule.getAttrs)\n// and return false to indicate that the match failed.)\n//\n// priority:: ?number\n// Can be used to change the order in which the parse rules in a\n// schema are tried. Those with higher priority come first. Rules\n// without a priority are counted as having priority 50. This\n// property is only meaningful in a schema—when directly\n// constructing a parser, the order of the rule array is used.\n//\n// context:: ?string\n// When given, restricts this rule to only match when the current\n// context—the parent nodes into which the content is being\n// parsed—matches this expression. Should contain one or more node\n// names or node group names followed by single or double slashes.\n// For example `\"paragraph/\"` means the rule only matches when the\n// parent node is a paragraph, `\"blockquote/paragraph/\"` restricts\n// it to be in a paragraph that is inside a blockquote, and\n// `\"section//\"` matches any position inside a section—a double\n// slash matches any sequence of ancestor nodes. To allow multiple\n// different contexts, they can be separated by a pipe (`|`)\n// character, as in `\"blockquote/|list_item/\"`.\n//\n// node:: ?string\n// The name of the node type to create when this rule matches. Only\n// valid for rules with a `tag` property, not for style rules. Each\n// rule should have one of a `node`, `mark`, or `ignore` property\n// (except when it appears in a [node](#model.NodeSpec.parseDOM) or\n// [mark spec](#model.MarkSpec.parseDOM), in which case the `node`\n// or `mark` property will be derived from its position).\n//\n// mark:: ?string\n// The name of the mark type to wrap the matched content in.\n//\n// ignore:: ?bool\n// When true, ignore content that matches this rule.\n//\n// skip:: ?bool\n// When true, ignore the node that matches this rule, but do parse\n// its content.\n//\n// attrs:: ?Object\n// Attributes for the node or mark created by this rule. When\n// `getAttrs` is provided, it takes precedence.\n//\n// getAttrs:: ?(union) → ?union\n// A function used to compute the attributes for the node or mark\n// created by this rule. Can also be used to describe further\n// conditions the DOM element or style must match. When it returns\n// `false`, the rule won't match. When it returns null or undefined,\n// that is interpreted as an empty/default set of attributes.\n//\n// Called with a DOM Element for `tag` rules, and with a string (the\n// style's value) for `style` rules.\n//\n// contentElement:: ?union\n// For `tag` rules that produce non-leaf nodes or marks, by default\n// the content of the DOM element is parsed as content of the mark\n// or node. If the child nodes are in a descendent node, this may be\n// a CSS selector string that the parser must use to find the actual\n// content element, or a function that returns the actual content\n// element to the parser.\n//\n// getContent:: ?(dom.Node, schema: Schema) → Fragment\n// Can be used to override the content of a matched node. When\n// present, instead of parsing the node's child nodes, the result of\n// this function is used.\n//\n// preserveWhitespace:: ?union\n// Controls whether whitespace should be preserved when parsing the\n// content inside the matched element. `false` means whitespace may\n// be collapsed, `true` means that whitespace should be preserved\n// but newlines normalized to spaces, and `\"full\"` means that\n// newlines should also be preserved.\n// ::- A DOM parser represents a strategy for parsing DOM content into\n// a ProseMirror document conforming to a given schema. Its behavior\n// is defined by an array of [rules](#model.ParseRule).\n\n\nvar DOMParser = function DOMParser(schema, rules) {\n var this$1 = this; // :: Schema\n // The schema into which the parser parses.\n\n this.schema = schema; // :: [ParseRule]\n // The set of [parse rules](#model.ParseRule) that the parser\n // uses, in order of precedence.\n\n this.rules = rules;\n this.tags = [];\n this.styles = [];\n rules.forEach(function (rule) {\n if (rule.tag) {\n this$1.tags.push(rule);\n } else if (rule.style) {\n this$1.styles.push(rule);\n }\n });\n}; // :: (dom.Node, ?ParseOptions) → Node\n// Parse a document from the content of a DOM node.\n\n\nDOMParser.prototype.parse = function parse(dom, options) {\n if (options === void 0) options = {};\n var context = new ParseContext(this, options, false);\n context.addAll(dom, null, options.from, options.to);\n return context.finish();\n}; // :: (dom.Node, ?ParseOptions) → Slice\n// Parses the content of the given DOM node, like\n// [`parse`](#model.DOMParser.parse), and takes the same set of\n// options. But unlike that method, which produces a whole node,\n// this one returns a slice that is open at the sides, meaning that\n// the schema constraints aren't applied to the start of nodes to\n// the left of the input and the end of nodes at the end.\n\n\nDOMParser.prototype.parseSlice = function parseSlice(dom, options) {\n if (options === void 0) options = {};\n var context = new ParseContext(this, options, true);\n context.addAll(dom, null, options.from, options.to);\n return Slice.maxOpen(context.finish());\n};\n\nDOMParser.prototype.matchTag = function matchTag(dom, context) {\n for (var i = 0; i < this.tags.length; i++) {\n var rule = this.tags[i];\n\n if (matches(dom, rule.tag) && (rule.namespace === undefined || dom.namespaceURI == rule.namespace) && (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n var result = rule.getAttrs(dom);\n\n if (result === false) {\n continue;\n }\n\n rule.attrs = result;\n }\n\n return rule;\n }\n }\n};\n\nDOMParser.prototype.matchStyle = function matchStyle(prop, value, context) {\n for (var i = 0; i < this.styles.length; i++) {\n var rule = this.styles[i];\n\n if (rule.style.indexOf(prop) != 0 || rule.context && !context.matchesContext(rule.context) || // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n rule.style.length > prop.length && (rule.style.charCodeAt(prop.length) != 61 || rule.style.slice(prop.length + 1) != value)) {\n continue;\n }\n\n if (rule.getAttrs) {\n var result = rule.getAttrs(value);\n\n if (result === false) {\n continue;\n }\n\n rule.attrs = result;\n }\n\n return rule;\n }\n}; // : (Schema) → [ParseRule]\n\n\nDOMParser.schemaRules = function schemaRules(schema) {\n var result = [];\n\n function insert(rule) {\n var priority = rule.priority == null ? 50 : rule.priority,\n i = 0;\n\n for (; i < result.length; i++) {\n var next = result[i],\n nextPriority = next.priority == null ? 50 : next.priority;\n\n if (nextPriority < priority) {\n break;\n }\n }\n\n result.splice(i, 0, rule);\n }\n\n var loop = function loop(name) {\n var rules = schema.marks[name].spec.parseDOM;\n\n if (rules) {\n rules.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.mark = name;\n });\n }\n };\n\n for (var name in schema.marks) {\n loop(name);\n }\n\n var loop$1 = function loop$1(name) {\n var rules$1 = schema.nodes[name$1].spec.parseDOM;\n\n if (rules$1) {\n rules$1.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.node = name$1;\n });\n }\n };\n\n for (var name$1 in schema.nodes) {\n loop$1();\n }\n\n return result;\n}; // :: (Schema) → DOMParser\n// Construct a DOM parser using the parsing rules listed in a\n// schema's [node specs](#model.NodeSpec.parseDOM), reordered by\n// [priority](#model.ParseRule.priority).\n\n\nDOMParser.fromSchema = function fromSchema(schema) {\n return schema.cached.domParser || (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n}; // : Object The block-level tags in HTML5\n\n\nvar blockTags = {\n address: true,\n article: true,\n aside: true,\n blockquote: true,\n canvas: true,\n dd: true,\n div: true,\n dl: true,\n fieldset: true,\n figcaption: true,\n figure: true,\n footer: true,\n form: true,\n h1: true,\n h2: true,\n h3: true,\n h4: true,\n h5: true,\n h6: true,\n header: true,\n hgroup: true,\n hr: true,\n li: true,\n noscript: true,\n ol: true,\n output: true,\n p: true,\n pre: true,\n section: true,\n table: true,\n tfoot: true,\n ul: true\n}; // : Object The tags that we normally ignore.\n\nvar ignoreTags = {\n head: true,\n noscript: true,\n object: true,\n script: true,\n style: true,\n title: true\n}; // : Object List tags.\n\nvar listTags = {\n ol: true,\n ul: true\n}; // Using a bitfield for node context options\n\nvar OPT_PRESERVE_WS = 1,\n OPT_PRESERVE_WS_FULL = 2,\n OPT_OPEN_LEFT = 4;\n\nfunction wsOptionsFor(preserveWhitespace) {\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n}\n\nvar NodeContext = function NodeContext(type, attrs, marks, pendingMarks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.solid = solid;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n this.options = options;\n this.content = []; // Marks applied to this node itself\n\n this.marks = marks; // Marks applied to its children\n\n this.activeMarks = Mark.none; // Marks that can't apply here, but will be used in children if possible\n\n this.pendingMarks = pendingMarks;\n};\n\nNodeContext.prototype.findWrapping = function findWrapping(node) {\n if (!this.match) {\n if (!this.type) {\n return [];\n }\n\n var fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n } else {\n var start = this.type.contentMatch,\n wrap;\n\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n } else {\n return null;\n }\n }\n }\n\n return this.match.findWrapping(node.type);\n};\n\nNodeContext.prototype.finish = function finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) {\n // Strip trailing whitespace\n var last = this.content[this.content.length - 1],\n m;\n\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n if (last.text.length == m[0].length) {\n this.content.pop();\n } else {\n this.content[this.content.length - 1] = last.withText(last.text.slice(0, last.text.length - m[0].length));\n }\n }\n }\n\n var content = Fragment.from(this.content);\n\n if (!openEnd && this.match) {\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n }\n\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n};\n\nNodeContext.prototype.applyPending = function applyPending(nextType) {\n for (var i = 0, pending = this.pendingMarks; i < pending.length; i++) {\n var mark = pending[i];\n\n if ((this.type ? this.type.allowsMarkType(mark.type) : markMayApply(mark.type, nextType)) && !mark.isInSet(this.activeMarks)) {\n this.activeMarks = mark.addToSet(this.activeMarks);\n this.pendingMarks = mark.removeFromSet(this.pendingMarks);\n }\n }\n};\n\nvar ParseContext = function ParseContext(parser, options, open) {\n // : DOMParser The parser we are using.\n this.parser = parser; // : Object The options passed to this parse.\n\n this.options = options;\n this.isOpen = open;\n var topNode = options.topNode,\n topContext;\n var topOptions = wsOptionsFor(options.preserveWhitespace) | (open ? OPT_OPEN_LEFT : 0);\n\n if (topNode) {\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n } else if (open) {\n topContext = new NodeContext(null, null, Mark.none, Mark.none, true, null, topOptions);\n } else {\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, Mark.none, true, null, topOptions);\n }\n\n this.nodes = [topContext]; // : [Mark] The current set of marks\n\n this.open = 0;\n this.find = options.findPositions;\n this.needsBlock = false;\n};\n\nvar prototypeAccessors$6 = {\n top: {\n configurable: true\n },\n currentPos: {\n configurable: true\n }\n};\n\nprototypeAccessors$6.top.get = function () {\n return this.nodes[this.open];\n}; // : (dom.Node)\n// Add a DOM node to the content. Text is inserted as text node,\n// otherwise, the node is passed to `addElement` or, if it has a\n// `style` attribute, `addElementWithStyles`.\n\n\nParseContext.prototype.addDOM = function addDOM(dom) {\n if (dom.nodeType == 3) {\n this.addTextNode(dom);\n } else if (dom.nodeType == 1) {\n var style = dom.getAttribute(\"style\");\n var marks = style ? this.readStyles(parseStyles(style)) : null,\n top = this.top;\n\n if (marks != null) {\n for (var i = 0; i < marks.length; i++) {\n this.addPendingMark(marks[i]);\n }\n }\n\n this.addElement(dom);\n\n if (marks != null) {\n for (var i$1 = 0; i$1 < marks.length; i$1++) {\n this.removePendingMark(marks[i$1], top);\n }\n }\n }\n};\n\nParseContext.prototype.addTextNode = function addTextNode(dom) {\n var value = dom.nodeValue;\n var top = this.top;\n\n if ((top.type ? top.type.inlineContent : top.content.length && top.content[0].isInline) || /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!(top.options & OPT_PRESERVE_WS)) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \"); // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n var nodeBefore = top.content[top.content.length - 1];\n var domNodeBefore = dom.previousSibling;\n\n if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == 'BR' || nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)) {\n value = value.slice(1);\n }\n }\n } else if (!(top.options & OPT_PRESERVE_WS_FULL)) {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n\n if (value) {\n this.insertNode(this.parser.schema.text(value));\n }\n\n this.findInText(dom);\n } else {\n this.findInside(dom);\n }\n}; // : (dom.Element)\n// Try to find a handler for the given tag and use that to parse. If\n// none is found, the element's content nodes are added directly.\n\n\nParseContext.prototype.addElement = function addElement(dom) {\n var name = dom.nodeName.toLowerCase();\n\n if (listTags.hasOwnProperty(name)) {\n normalizeList(dom);\n }\n\n var rule = this.options.ruleFromNode && this.options.ruleFromNode(dom) || this.parser.matchTag(dom, this);\n\n if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n } else if (!rule || rule.skip) {\n if (rule && rule.skip.nodeType) {\n dom = rule.skip;\n }\n\n var sync,\n top = this.top,\n oldNeedsBlock = this.needsBlock;\n\n if (blockTags.hasOwnProperty(name)) {\n sync = true;\n\n if (!top.type) {\n this.needsBlock = true;\n }\n } else if (!dom.firstChild) {\n this.leafFallback(dom);\n return;\n }\n\n this.addAll(dom);\n\n if (sync) {\n this.sync(top);\n }\n\n this.needsBlock = oldNeedsBlock;\n } else {\n this.addElementByRule(dom, rule);\n }\n}; // Called for leaf DOM nodes that would otherwise be ignored\n\n\nParseContext.prototype.leafFallback = function leafFallback(dom) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent) {\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"));\n }\n}; // Run any style parser associated with the node's styles. Either\n// return an array of marks, or null to indicate some of the styles\n// had a rule with `ignore` set.\n\n\nParseContext.prototype.readStyles = function readStyles(styles) {\n var marks = Mark.none;\n\n for (var i = 0; i < styles.length; i += 2) {\n var rule = this.parser.matchStyle(styles[i], styles[i + 1], this);\n\n if (!rule) {\n continue;\n }\n\n if (rule.ignore) {\n return null;\n }\n\n marks = this.parser.schema.marks[rule.mark].create(rule.attrs).addToSet(marks);\n }\n\n return marks;\n}; // : (dom.Element, ParseRule) → bool\n// Look up a handler for the given node. If none are found, return\n// false. Otherwise, apply it, use its return value to drive the way\n// the node's content is wrapped, and return true.\n\n\nParseContext.prototype.addElementByRule = function addElementByRule(dom, rule) {\n var this$1 = this;\n var sync, nodeType, markType, mark;\n\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n\n if (!nodeType.isLeaf) {\n sync = this.enter(nodeType, rule.attrs, rule.preserveWhitespace);\n } else if (!this.insertNode(nodeType.create(rule.attrs))) {\n this.leafFallback(dom);\n }\n } else {\n markType = this.parser.schema.marks[rule.mark];\n mark = markType.create(rule.attrs);\n this.addPendingMark(mark);\n }\n\n var startIn = this.top;\n\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n } else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(function (node) {\n return this$1.insertNode(node);\n });\n } else {\n var contentDOM = rule.contentElement;\n\n if (typeof contentDOM == \"string\") {\n contentDOM = dom.querySelector(contentDOM);\n } else if (typeof contentDOM == \"function\") {\n contentDOM = contentDOM(dom);\n }\n\n if (!contentDOM) {\n contentDOM = dom;\n }\n\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, sync);\n }\n\n if (sync) {\n this.sync(startIn);\n this.open--;\n }\n\n if (mark) {\n this.removePendingMark(mark, startIn);\n }\n}; // : (dom.Node, ?NodeBuilder, ?number, ?number)\n// Add all child nodes between `startIndex` and `endIndex` (or the\n// whole node, if not given). If `sync` is passed, use it to\n// synchronize after every block element.\n\n\nParseContext.prototype.addAll = function addAll(parent, sync, startIndex, endIndex) {\n var index = startIndex || 0;\n\n for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom);\n\n if (sync && blockTags.hasOwnProperty(dom.nodeName.toLowerCase())) {\n this.sync(sync);\n }\n }\n\n this.findAtPoint(parent, index);\n}; // Try to find a way to fit the given node type into the current\n// context. May add intermediate wrappers and/or leave non-solid\n// nodes that we're in.\n\n\nParseContext.prototype.findPlace = function findPlace(node) {\n var route, sync;\n\n for (var depth = this.open; depth >= 0; depth--) {\n var cx = this.nodes[depth];\n var found = cx.findWrapping(node);\n\n if (found && (!route || route.length > found.length)) {\n route = found;\n sync = cx;\n\n if (!found.length) {\n break;\n }\n }\n\n if (cx.solid) {\n break;\n }\n }\n\n if (!route) {\n return false;\n }\n\n this.sync(sync);\n\n for (var i = 0; i < route.length; i++) {\n this.enterInner(route[i], null, false);\n }\n\n return true;\n}; // : (Node) → ?Node\n// Try to insert the given node, adjusting the context when needed.\n\n\nParseContext.prototype.insertNode = function insertNode(node) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n var block = this.textblockFromContext();\n\n if (block) {\n this.enterInner(block);\n }\n }\n\n if (this.findPlace(node)) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(node.type);\n\n if (top.match) {\n top.match = top.match.matchType(node.type);\n }\n\n var marks = top.activeMarks;\n\n for (var i = 0; i < node.marks.length; i++) {\n if (!top.type || top.type.allowsMarkType(node.marks[i].type)) {\n marks = node.marks[i].addToSet(marks);\n }\n }\n\n top.content.push(node.mark(marks));\n return true;\n }\n\n return false;\n}; // : (NodeType, ?Object) → bool\n// Try to start a node of the given type, adjusting the context when\n// necessary.\n\n\nParseContext.prototype.enter = function enter(type, attrs, preserveWS) {\n var ok = this.findPlace(type.create(attrs));\n\n if (ok) {\n this.enterInner(type, attrs, true, preserveWS);\n }\n\n return ok;\n}; // Open a node of the given type\n\n\nParseContext.prototype.enterInner = function enterInner(type, attrs, solid, preserveWS) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(type);\n top.match = top.match && top.match.matchType(type, attrs);\n var options = preserveWS == null ? top.options & ~OPT_OPEN_LEFT : wsOptionsFor(preserveWS);\n\n if (top.options & OPT_OPEN_LEFT && top.content.length == 0) {\n options |= OPT_OPEN_LEFT;\n }\n\n this.nodes.push(new NodeContext(type, attrs, top.activeMarks, top.pendingMarks, solid, null, options));\n this.open++;\n}; // Make sure all nodes above this.open are finished and added to\n// their parents\n\n\nParseContext.prototype.closeExtra = function closeExtra(openEnd) {\n var i = this.nodes.length - 1;\n\n if (i > this.open) {\n for (; i > this.open; i--) {\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n }\n\n this.nodes.length = this.open + 1;\n }\n};\n\nParseContext.prototype.finish = function finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(this.isOpen || this.options.topOpen);\n};\n\nParseContext.prototype.sync = function sync(to) {\n for (var i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return;\n }\n }\n};\n\nprototypeAccessors$6.currentPos.get = function () {\n this.closeExtra();\n var pos = 0;\n\n for (var i = this.open; i >= 0; i--) {\n var content = this.nodes[i].content;\n\n for (var j = content.length - 1; j >= 0; j--) {\n pos += content[j].nodeSize;\n }\n\n if (i) {\n pos++;\n }\n }\n\n return pos;\n};\n\nParseContext.prototype.findAtPoint = function findAtPoint(parent, offset) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n};\n\nParseContext.prototype.findInside = function findInside(parent) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n};\n\nParseContext.prototype.findAround = function findAround(parent, content, before) {\n if (parent != content && this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n var pos = content.compareDocumentPosition(this.find[i].node);\n\n if (pos & (before ? 2 : 4)) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n }\n};\n\nParseContext.prototype.findInText = function findInText(textNode) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode) {\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n }\n}; // : (string) → bool\n// Determines whether the given [context\n// string](#ParseRule.context) matches this context.\n\n\nParseContext.prototype.matchesContext = function matchesContext(context) {\n var this$1 = this;\n\n if (context.indexOf(\"|\") > -1) {\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n }\n\n var parts = context.split(\"/\");\n var option = this.options.context;\n var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n\n var match = function match(i, depth) {\n for (; i >= 0; i--) {\n var part = parts[i];\n\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0) {\n continue;\n }\n\n for (; depth >= minDepth; depth--) {\n if (match(i - 1, depth)) {\n return true;\n }\n }\n\n return false;\n } else {\n var next = depth > 0 || depth == 0 && useRoot ? this$1.nodes[depth].type : option && depth >= minDepth ? option.node(depth - minDepth).type : null;\n\n if (!next || next.name != part && next.groups.indexOf(part) == -1) {\n return false;\n }\n\n depth--;\n }\n }\n\n return true;\n };\n\n return match(parts.length - 1, this.open);\n};\n\nParseContext.prototype.textblockFromContext = function textblockFromContext() {\n var $context = this.options.context;\n\n if ($context) {\n for (var d = $context.depth; d >= 0; d--) {\n var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n\n if (deflt && deflt.isTextblock && deflt.defaultAttrs) {\n return deflt;\n }\n }\n }\n\n for (var name in this.parser.schema.nodes) {\n var type = this.parser.schema.nodes[name];\n\n if (type.isTextblock && type.defaultAttrs) {\n return type;\n }\n }\n};\n\nParseContext.prototype.addPendingMark = function addPendingMark(mark) {\n this.top.pendingMarks = mark.addToSet(this.top.pendingMarks);\n};\n\nParseContext.prototype.removePendingMark = function removePendingMark(mark, upto) {\n for (var depth = this.open; depth >= 0; depth--) {\n var level = this.nodes[depth];\n var found = level.pendingMarks.lastIndexOf(mark);\n\n if (found > -1) {\n level.pendingMarks = mark.removeFromSet(level.pendingMarks);\n } else {\n level.activeMarks = mark.removeFromSet(level.activeMarks);\n }\n\n if (level == upto) {\n break;\n }\n }\n};\n\nObject.defineProperties(ParseContext.prototype, prototypeAccessors$6); // Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\n\nfunction normalizeList(dom) {\n for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n } else if (name == \"li\") {\n prevItem = child;\n } else if (name) {\n prevItem = null;\n }\n }\n} // Apply a CSS selector.\n\n\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n} // : (string) → [string]\n// Tokenize a style attribute into property/value pairs.\n\n\nfunction parseStyles(style) {\n var re = /\\s*([\\w-]+)\\s*:\\s*([^;]+)/g,\n m,\n result = [];\n\n while (m = re.exec(style)) {\n result.push(m[1], m[2].trim());\n }\n\n return result;\n}\n\nfunction copy(obj) {\n var copy = {};\n\n for (var prop in obj) {\n copy[prop] = obj[prop];\n }\n\n return copy;\n} // Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\n\n\nfunction markMayApply(markType, nodeType) {\n var nodes = nodeType.schema.nodes;\n\n var loop = function loop(name) {\n var parent = nodes[name];\n\n if (!parent.allowsMarkType(markType)) {\n return;\n }\n\n var seen = [],\n scan = function scan(match) {\n seen.push(match);\n\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n var next = ref.next;\n\n if (type == nodeType) {\n return true;\n }\n\n if (seen.indexOf(next) < 0 && scan(next)) {\n return true;\n }\n }\n };\n\n if (scan(parent.contentMatch)) {\n return {\n v: true\n };\n }\n };\n\n for (var name in nodes) {\n var returned = loop(name);\n if (returned) return returned.v;\n }\n} // DOMOutputSpec:: interface\n// A description of a DOM structure. Can be either a string, which is\n// interpreted as a text node, a DOM node, which is interpreted as\n// itself, or an array.\n//\n// An array describes a DOM element. The first value in the array\n// should be a string—the name of the DOM element, optionally prefixed\n// by a namespace URL and a space. If the second element is plain\n// object, it is interpreted as a set of attributes for the element.\n// Any elements after that (including the 2nd if it's not an attribute\n// object) are interpreted as children of the DOM elements, and must\n// either be valid `DOMOutputSpec` values, or the number zero.\n//\n// The number zero (pronounced “hole”) is used to indicate the place\n// where a node's child nodes should be inserted. If it occurs in an\n// output spec, it should be the only child element in its parent\n// node.\n// ::- A DOM serializer knows how to convert ProseMirror nodes and\n// marks of various types to DOM nodes.\n\n\nvar DOMSerializer = function DOMSerializer(nodes, marks) {\n // :: Object<(node: Node) → DOMOutputSpec>\n // The node serialization functions.\n this.nodes = nodes || {}; // :: Object\n // The mark serialization functions.\n\n this.marks = marks || {};\n}; // :: (Fragment, ?Object) → dom.DocumentFragment\n// Serialize the content of this fragment to a DOM fragment. When\n// not in the browser, the `document` option, containing a DOM\n// document, should be passed so that the serializer can create\n// nodes.\n\n\nDOMSerializer.prototype.serializeFragment = function serializeFragment(fragment, options, target) {\n var this$1 = this;\n if (options === void 0) options = {};\n\n if (!target) {\n target = doc(options).createDocumentFragment();\n }\n\n var top = target,\n active = null;\n fragment.forEach(function (node) {\n if (active || node.marks.length) {\n if (!active) {\n active = [];\n }\n\n var keep = 0,\n rendered = 0;\n\n while (keep < active.length && rendered < node.marks.length) {\n var next = node.marks[rendered];\n\n if (!this$1.marks[next.type.name]) {\n rendered++;\n continue;\n }\n\n if (!next.eq(active[keep]) || next.type.spec.spanning === false) {\n break;\n }\n\n keep += 2;\n rendered++;\n }\n\n while (keep < active.length) {\n top = active.pop();\n active.pop();\n }\n\n while (rendered < node.marks.length) {\n var add = node.marks[rendered++];\n var markDOM = this$1.serializeMark(add, node.isInline, options);\n\n if (markDOM) {\n active.push(add, top);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n\n top.appendChild(this$1.serializeNode(node, options));\n });\n return target;\n}; // :: (Node, ?Object) → dom.Node\n// Serialize this node to a DOM node. This can be useful when you\n// need to serialize a part of a document, as opposed to the whole\n// document. To serialize a whole document, use\n// [`serializeFragment`](#model.DOMSerializer.serializeFragment) on\n// its [content](#model.Node.content).\n\n\nDOMSerializer.prototype.serializeNode = function serializeNode(node, options) {\n if (options === void 0) options = {};\n var ref = DOMSerializer.renderSpec(doc(options), this.nodes[node.type.name](node));\n var dom = ref.dom;\n var contentDOM = ref.contentDOM;\n\n if (contentDOM) {\n if (node.isLeaf) {\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n }\n\n if (options.onContent) {\n options.onContent(node, contentDOM, options);\n } else {\n this.serializeFragment(node.content, options, contentDOM);\n }\n }\n\n return dom;\n};\n\nDOMSerializer.prototype.serializeNodeAndMarks = function serializeNodeAndMarks(node, options) {\n if (options === void 0) options = {};\n var dom = this.serializeNode(node, options);\n\n for (var i = node.marks.length - 1; i >= 0; i--) {\n var wrap = this.serializeMark(node.marks[i], node.isInline, options);\n\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n\n return dom;\n};\n\nDOMSerializer.prototype.serializeMark = function serializeMark(mark, inline, options) {\n if (options === void 0) options = {};\n var toDOM = this.marks[mark.type.name];\n return toDOM && DOMSerializer.renderSpec(doc(options), toDOM(mark, inline));\n}; // :: (dom.Document, DOMOutputSpec) → {dom: dom.Node, contentDOM: ?dom.Node}\n// Render an [output spec](#model.DOMOutputSpec) to a DOM node. If\n// the spec has a hole (zero) in it, `contentDOM` will point at the\n// node with the hole.\n\n\nDOMSerializer.renderSpec = function renderSpec(doc, structure, xmlNS) {\n if (xmlNS === void 0) xmlNS = null;\n\n if (typeof structure == \"string\") {\n return {\n dom: doc.createTextNode(structure)\n };\n }\n\n if (structure.nodeType != null) {\n return {\n dom: structure\n };\n }\n\n var tagName = structure[0],\n space = tagName.indexOf(\" \");\n\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n\n var contentDOM = null,\n dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n var attrs = structure[1],\n start = 1;\n\n if (attrs && _typeof(attrs) == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n\n for (var name in attrs) {\n if (attrs[name] != null) {\n var space$1 = name.indexOf(\" \");\n\n if (space$1 > 0) {\n dom.setAttributeNS(name.slice(0, space$1), name.slice(space$1 + 1), attrs[name]);\n } else {\n dom.setAttribute(name, attrs[name]);\n }\n }\n }\n }\n\n for (var i = start; i < structure.length; i++) {\n var child = structure[i];\n\n if (child === 0) {\n if (i < structure.length - 1 || i > start) {\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n }\n\n return {\n dom: dom,\n contentDOM: dom\n };\n } else {\n var ref = DOMSerializer.renderSpec(doc, child, xmlNS);\n var inner = ref.dom;\n var innerContent = ref.contentDOM;\n dom.appendChild(inner);\n\n if (innerContent) {\n if (contentDOM) {\n throw new RangeError(\"Multiple content holes\");\n }\n\n contentDOM = innerContent;\n }\n }\n }\n\n return {\n dom: dom,\n contentDOM: contentDOM\n };\n}; // :: (Schema) → DOMSerializer\n// Build a serializer using the [`toDOM`](#model.NodeSpec.toDOM)\n// properties in a schema's node and mark specs.\n\n\nDOMSerializer.fromSchema = function fromSchema(schema) {\n return schema.cached.domSerializer || (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n}; // : (Schema) → Object<(node: Node) → DOMOutputSpec>\n// Gather the serializers in a schema's node specs into an object.\n// This can be useful as a base to build a custom serializer from.\n\n\nDOMSerializer.nodesFromSchema = function nodesFromSchema(schema) {\n var result = gatherToDOM(schema.nodes);\n\n if (!result.text) {\n result.text = function (node) {\n return node.text;\n };\n }\n\n return result;\n}; // : (Schema) → Object<(mark: Mark) → DOMOutputSpec>\n// Gather the serializers in a schema's mark specs into an object.\n\n\nDOMSerializer.marksFromSchema = function marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n};\n\nfunction gatherToDOM(obj) {\n var result = {};\n\n for (var name in obj) {\n var toDOM = obj[name].spec.toDOM;\n\n if (toDOM) {\n result[name] = toDOM;\n }\n }\n\n return result;\n}\n\nfunction doc(options) {\n // declare global: window\n return options.document || window.document;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-model/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-schema-list/dist/index.es.js": /*!***************************************************************!*\ !*** ./node_modules/prosemirror-schema-list/dist/index.es.js ***! \***************************************************************/ /*! exports provided: addListNodes, bulletList, liftListItem, listItem, orderedList, sinkListItem, splitListItem, wrapInList */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addListNodes\", function() { return addListNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bulletList\", function() { return bulletList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftListItem\", function() { return liftListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listItem\", function() { return listItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orderedList\", function() { return orderedList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinkListItem\", function() { return sinkListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitListItem\", function() { return splitListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapInList\", function() { return wrapInList; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\n\nvar olDOM = [\"ol\", 0], ulDOM = [\"ul\", 0], liDOM = [\"li\", 0];\n\n// :: NodeSpec\n// An ordered list [node spec](#model.NodeSpec). Has a single\n// attribute, `order`, which determines the number at which the list\n// starts counting, and defaults to 1. Represented as an `
    `\n// element.\nvar orderedList = {\n attrs: {order: {default: 1}},\n parseDOM: [{tag: \"ol\", getAttrs: function getAttrs(dom) {\n return {order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1}\n }}],\n toDOM: function toDOM(node) {\n return node.attrs.order == 1 ? olDOM : [\"ol\", {start: node.attrs.order}, 0]\n }\n};\n\n// :: NodeSpec\n// A bullet list node spec, represented in the DOM as `
      `.\nvar bulletList = {\n parseDOM: [{tag: \"ul\"}],\n toDOM: function toDOM() { return ulDOM }\n};\n\n// :: NodeSpec\n// A list item (`
    • `) spec.\nvar listItem = {\n parseDOM: [{tag: \"li\"}],\n toDOM: function toDOM() { return liDOM },\n defining: true\n};\n\nfunction add(obj, props) {\n var copy = {};\n for (var prop in obj) { copy[prop] = obj[prop]; }\n for (var prop$1 in props) { copy[prop$1] = props[prop$1]; }\n return copy\n}\n\n// :: (OrderedMap, string, ?string) → OrderedMap\n// Convenience function for adding list-related node types to a map\n// specifying the nodes for a schema. Adds\n// [`orderedList`](#schema-list.orderedList) as `\"ordered_list\"`,\n// [`bulletList`](#schema-list.bulletList) as `\"bullet_list\"`, and\n// [`listItem`](#schema-list.listItem) as `\"list_item\"`.\n//\n// `itemContent` determines the content expression for the list items.\n// If you want the commands defined in this module to apply to your\n// list structure, it should have a shape like `\"paragraph block*\"` or\n// `\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\n// given to assign a group name to the list node types, for example\n// `\"block\"`.\nfunction addListNodes(nodes, itemContent, listGroup) {\n return nodes.append({\n ordered_list: add(orderedList, {content: \"list_item+\", group: listGroup}),\n bullet_list: add(bulletList, {content: \"list_item+\", group: listGroup}),\n list_item: add(listItem, {content: itemContent})\n })\n}\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command function that wraps the selection in a list with\n// the given type an attributes. If `dispatch` is null, only return a\n// value to indicate whether this is possible, but don't actually\n// perform the change.\nfunction wrapInList(listType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), doJoin = false, outerRange = range;\n if (!range) { return false }\n // This is at the top of an existing list item\n if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n // Don't do anything if this is the top of the list\n if ($from.index(range.depth - 1) == 0) { return false }\n var $insert = state.doc.resolve(range.start - 2);\n outerRange = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($insert, $insert, range.depth);\n if (range.endIndex < range.parent.childCount)\n { range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($from, state.doc.resolve($to.end(range.depth)), range.depth); }\n doJoin = true;\n }\n var wrap = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(outerRange, listType, attrs, range);\n if (!wrap) { return false }\n if (dispatch) { dispatch(doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView()); }\n return true\n }\n}\n\nfunction doWrapInList(tr, range, wrappers, joinBefore, listType) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n for (var i = wrappers.length - 1; i >= 0; i--)\n { content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content)); }\n\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, 0, 0), wrappers.length, true));\n\n var found = 0;\n for (var i$1 = 0; i$1 < wrappers.length; i$1++) { if (wrappers[i$1].type == listType) { found = i$1 + 1; } }\n var splitDepth = wrappers.length - found;\n\n var splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0), parent = range.parent;\n for (var i$2 = range.startIndex, e = range.endIndex, first = true; i$2 < e; i$2++, first = false) {\n if (!first && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, splitPos, splitDepth)) {\n tr.split(splitPos, splitDepth);\n splitPos += 2 * splitDepth;\n }\n splitPos += parent.child(i$2).nodeSize;\n }\n return tr\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Build a command that splits a non-empty textblock at the top level\n// of a list item by also splitting that list item.\nfunction splitListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var node = ref.node;\n if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) { return false }\n var grandParent = $from.node(-1);\n if (grandParent.type != itemType) { return false }\n if ($from.parent.content.size == 0) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if ($from.depth == 2 || $from.node(-3).type != itemType ||\n $from.index(-2) != $from.node(-2).childCount - 1) { return false }\n if (dispatch) {\n var wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, keepItem = $from.index(-1) > 0;\n // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n for (var d = $from.depth - (keepItem ? 1 : 2); d >= $from.depth - 3; d--)\n { wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from($from.node(d).copy(wrap)); }\n // Add a second list item with an empty default start node\n wrap = wrap.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.createAndFill()));\n var tr$1 = state.tr.replace($from.before(keepItem ? null : -1), $from.after(-3), new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, keepItem ? 3 : 2, 2));\n tr$1.setSelection(state.selection.constructor.near(tr$1.doc.resolve($from.pos + (keepItem ? 3 : 2))));\n dispatch(tr$1.scrollIntoView());\n }\n return true\n }\n var nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n var tr = state.tr.delete($from.pos, $to.pos);\n var types = nextType && [null, {type: nextType}];\n if (!Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, $from.pos, 2, types)) { return false }\n if (dispatch) { dispatch(tr.split($from.pos, 2, types).scrollIntoView()); }\n return true\n }\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to lift the list item around the selection up into\n// a wrapping list.\nfunction liftListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) { return node.childCount && node.firstChild.type == itemType; });\n if (!range) { return false }\n if (!dispatch) { return true }\n if ($from.node(range.depth - 1).type == itemType) // Inside a parent list\n { return liftToOuterList(state, dispatch, itemType, range) }\n else // Outer list node\n { return liftOutOfList(state, dispatch, range) }\n }\n}\n\nfunction liftToOuterList(state, dispatch, itemType, range) {\n var tr = state.tr, end = range.end, endOfList = range.$to.end(range.depth);\n if (end < endOfList) {\n // There are siblings after the lifted items, which must become\n // children of the last item\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](end - 1, endOfList, end, endOfList,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"](tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n }\n dispatch(tr.lift(range, Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range)).scrollIntoView());\n return true\n}\n\nfunction liftOutOfList(state, dispatch, range) {\n var tr = state.tr, list = range.parent;\n // Merge the list items into a single big item\n for (var pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {\n pos -= list.child(i).nodeSize;\n tr.delete(pos - 1, pos + 1);\n }\n var $start = tr.doc.resolve(range.start), item = $start.nodeAfter;\n var atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;\n var parent = $start.node(-1), indexBefore = $start.index(-1);\n if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1,\n item.content.append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list))))\n { return false }\n var start = $start.pos, end = start + item.nodeSize;\n // Strip off the surrounding list. At the sides where we're not at\n // the end of the list, the existing list is closed. At sides where\n // this is the end, it is overwritten to its end.\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"]((atStart ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty)))\n .append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty))),\n atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n dispatch(tr.scrollIntoView());\n return true\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to sink the list item around the selection down\n// into an inner list.\nfunction sinkListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) { return node.childCount && node.firstChild.type == itemType; });\n if (!range) { return false }\n var startIndex = range.startIndex;\n if (startIndex == 0) { return false }\n var parent = range.parent, nodeBefore = parent.child(startIndex - 1);\n if (nodeBefore.type != itemType) { return false }\n\n if (dispatch) {\n var nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n var inner = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(nestedBefore ? itemType.create() : null);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(parent.type.create(null, inner)))),\n nestedBefore ? 3 : 1, 0);\n var before = range.start, after = range.end;\n dispatch(state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](before - (nestedBefore ? 3 : 1), after,\n before, after, slice, 1, true))\n .scrollIntoView());\n }\n return true\n }\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-schema-list/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addListNodes\", function() { return addListNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bulletList\", function() { return bulletList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftListItem\", function() { return liftListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listItem\", function() { return listItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orderedList\", function() { return orderedList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinkListItem\", function() { return sinkListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitListItem\", function() { return splitListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapInList\", function() { return wrapInList; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\nvar olDOM = [\"ol\", 0],\n ulDOM = [\"ul\", 0],\n liDOM = [\"li\", 0]; // :: NodeSpec\n// An ordered list [node spec](#model.NodeSpec). Has a single\n// attribute, `order`, which determines the number at which the list\n// starts counting, and defaults to 1. Represented as an `
        `\n// element.\n\nvar orderedList = {\n attrs: {\n order: {\n \"default\": 1\n }\n },\n parseDOM: [{\n tag: \"ol\",\n getAttrs: function getAttrs(dom) {\n return {\n order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1\n };\n }\n }],\n toDOM: function toDOM(node) {\n return node.attrs.order == 1 ? olDOM : [\"ol\", {\n start: node.attrs.order\n }, 0];\n }\n}; // :: NodeSpec\n// A bullet list node spec, represented in the DOM as `
          `.\n\nvar bulletList = {\n parseDOM: [{\n tag: \"ul\"\n }],\n toDOM: function toDOM() {\n return ulDOM;\n }\n}; // :: NodeSpec\n// A list item (`
        • `) spec.\n\nvar listItem = {\n parseDOM: [{\n tag: \"li\"\n }],\n toDOM: function toDOM() {\n return liDOM;\n },\n defining: true\n};\n\nfunction add(obj, props) {\n var copy = {};\n\n for (var prop in obj) {\n copy[prop] = obj[prop];\n }\n\n for (var prop$1 in props) {\n copy[prop$1] = props[prop$1];\n }\n\n return copy;\n} // :: (OrderedMap, string, ?string) → OrderedMap\n// Convenience function for adding list-related node types to a map\n// specifying the nodes for a schema. Adds\n// [`orderedList`](#schema-list.orderedList) as `\"ordered_list\"`,\n// [`bulletList`](#schema-list.bulletList) as `\"bullet_list\"`, and\n// [`listItem`](#schema-list.listItem) as `\"list_item\"`.\n//\n// `itemContent` determines the content expression for the list items.\n// If you want the commands defined in this module to apply to your\n// list structure, it should have a shape like `\"paragraph block*\"` or\n// `\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\n// given to assign a group name to the list node types, for example\n// `\"block\"`.\n\n\nfunction addListNodes(nodes, itemContent, listGroup) {\n return nodes.append({\n ordered_list: add(orderedList, {\n content: \"list_item+\",\n group: listGroup\n }),\n bullet_list: add(bulletList, {\n content: \"list_item+\",\n group: listGroup\n }),\n list_item: add(listItem, {\n content: itemContent\n })\n });\n} // :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command function that wraps the selection in a list with\n// the given type an attributes. If `dispatch` is null, only return a\n// value to indicate whether this is possible, but don't actually\n// perform the change.\n\n\nfunction wrapInList(listType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n doJoin = false,\n outerRange = range;\n\n if (!range) {\n return false;\n } // This is at the top of an existing list item\n\n\n if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n // Don't do anything if this is the top of the list\n if ($from.index(range.depth - 1) == 0) {\n return false;\n }\n\n var $insert = state.doc.resolve(range.start - 2);\n outerRange = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($insert, $insert, range.depth);\n\n if (range.endIndex < range.parent.childCount) {\n range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($from, state.doc.resolve($to.end(range.depth)), range.depth);\n }\n\n doJoin = true;\n }\n\n var wrap = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(outerRange, listType, attrs, range);\n\n if (!wrap) {\n return false;\n }\n\n if (dispatch) {\n dispatch(doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView());\n }\n\n return true;\n };\n}\n\nfunction doWrapInList(tr, range, wrappers, joinBefore, listType) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n\n for (var i = wrappers.length - 1; i >= 0; i--) {\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, 0, 0), wrappers.length, true));\n var found = 0;\n\n for (var i$1 = 0; i$1 < wrappers.length; i$1++) {\n if (wrappers[i$1].type == listType) {\n found = i$1 + 1;\n }\n }\n\n var splitDepth = wrappers.length - found;\n var splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0),\n parent = range.parent;\n\n for (var i$2 = range.startIndex, e = range.endIndex, first = true; i$2 < e; i$2++, first = false) {\n if (!first && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, splitPos, splitDepth)) {\n tr.split(splitPos, splitDepth);\n splitPos += 2 * splitDepth;\n }\n\n splitPos += parent.child(i$2).nodeSize;\n }\n\n return tr;\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Build a command that splits a non-empty textblock at the top level\n// of a list item by also splitting that list item.\n\n\nfunction splitListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var node = ref.node;\n\n if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) {\n return false;\n }\n\n var grandParent = $from.node(-1);\n\n if (grandParent.type != itemType) {\n return false;\n }\n\n if ($from.parent.content.size == 0) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if ($from.depth == 2 || $from.node(-3).type != itemType || $from.index(-2) != $from.node(-2).childCount - 1) {\n return false;\n }\n\n if (dispatch) {\n var wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty,\n keepItem = $from.index(-1) > 0; // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n\n for (var d = $from.depth - (keepItem ? 1 : 2); d >= $from.depth - 3; d--) {\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from($from.node(d).copy(wrap));\n } // Add a second list item with an empty default start node\n\n\n wrap = wrap.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.createAndFill()));\n var tr$1 = state.tr.replace($from.before(keepItem ? null : -1), $from.after(-3), new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, keepItem ? 3 : 2, 2));\n tr$1.setSelection(state.selection.constructor.near(tr$1.doc.resolve($from.pos + (keepItem ? 3 : 2))));\n dispatch(tr$1.scrollIntoView());\n }\n\n return true;\n }\n\n var nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n var tr = state.tr[\"delete\"]($from.pos, $to.pos);\n var types = nextType && [null, {\n type: nextType\n }];\n\n if (!Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, $from.pos, 2, types)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(tr.split($from.pos, 2, types).scrollIntoView());\n }\n\n return true;\n };\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to lift the list item around the selection up into\n// a wrapping list.\n\n\nfunction liftListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) {\n return node.childCount && node.firstChild.type == itemType;\n });\n\n if (!range) {\n return false;\n }\n\n if (!dispatch) {\n return true;\n }\n\n if ($from.node(range.depth - 1).type == itemType) // Inside a parent list\n {\n return liftToOuterList(state, dispatch, itemType, range);\n } else // Outer list node\n {\n return liftOutOfList(state, dispatch, range);\n }\n };\n}\n\nfunction liftToOuterList(state, dispatch, itemType, range) {\n var tr = state.tr,\n end = range.end,\n endOfList = range.$to.end(range.depth);\n\n if (end < endOfList) {\n // There are siblings after the lifted items, which must become\n // children of the last item\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](end - 1, endOfList, end, endOfList, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"](tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n }\n\n dispatch(tr.lift(range, Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range)).scrollIntoView());\n return true;\n}\n\nfunction liftOutOfList(state, dispatch, range) {\n var tr = state.tr,\n list = range.parent; // Merge the list items into a single big item\n\n for (var pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {\n pos -= list.child(i).nodeSize;\n tr[\"delete\"](pos - 1, pos + 1);\n }\n\n var $start = tr.doc.resolve(range.start),\n item = $start.nodeAfter;\n var atStart = range.startIndex == 0,\n atEnd = range.endIndex == list.childCount;\n var parent = $start.node(-1),\n indexBefore = $start.index(-1);\n\n if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list)))) {\n return false;\n }\n\n var start = $start.pos,\n end = start + item.nodeSize; // Strip off the surrounding list. At the sides where we're not at\n // the end of the list, the existing list is closed. At sides where\n // this is the end, it is overwritten to its end.\n\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"]((atStart ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty))).append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n dispatch(tr.scrollIntoView());\n return true;\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to sink the list item around the selection down\n// into an inner list.\n\n\nfunction sinkListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) {\n return node.childCount && node.firstChild.type == itemType;\n });\n\n if (!range) {\n return false;\n }\n\n var startIndex = range.startIndex;\n\n if (startIndex == 0) {\n return false;\n }\n\n var parent = range.parent,\n nodeBefore = parent.child(startIndex - 1);\n\n if (nodeBefore.type != itemType) {\n return false;\n }\n\n if (dispatch) {\n var nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n var inner = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(nestedBefore ? itemType.create() : null);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);\n var before = range.start,\n after = range.end;\n dispatch(state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true)).scrollIntoView());\n }\n\n return true;\n };\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-schema-list/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-state/dist/index.es.js": /*!*********************************************************!*\ !*** ./node_modules/prosemirror-state/dist/index.es.js ***! \*********************************************************/ /*! exports provided: AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AllSelection\", function() { return AllSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorState\", function() { return EditorState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeSelection\", function() { return NodeSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Plugin\", function() { return Plugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PluginKey\", function() { return PluginKey; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectionRange\", function() { return SelectionRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TextSelection\", function() { return TextSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transaction\", function() { return Transaction; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\nvar classesById = Object.create(null);\n\n// ::- Superclass for editor selections. Every selection type should\n// extend this. Should not be instantiated directly.\nvar Selection = function Selection($anchor, $head, ranges) {\n // :: [SelectionRange]\n // The ranges covered by the selection.\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n // :: ResolvedPos\n // The resolved anchor of the selection (the side that stays in\n // place when the selection is modified).\n this.$anchor = $anchor;\n // :: ResolvedPos\n // The resolved head of the selection (the side that moves when\n // the selection is modified).\n this.$head = $head;\n};\n\nvar prototypeAccessors = { anchor: { configurable: true },head: { configurable: true },from: { configurable: true },to: { configurable: true },$from: { configurable: true },$to: { configurable: true },empty: { configurable: true } };\n\n// :: number\n// The selection's anchor, as an unresolved position.\nprototypeAccessors.anchor.get = function () { return this.$anchor.pos };\n\n// :: number\n// The selection's head.\nprototypeAccessors.head.get = function () { return this.$head.pos };\n\n// :: number\n// The lower bound of the selection's main range.\nprototypeAccessors.from.get = function () { return this.$from.pos };\n\n// :: number\n// The upper bound of the selection's main range.\nprototypeAccessors.to.get = function () { return this.$to.pos };\n\n// :: ResolvedPos\n// The resolved lowerbound of the selection's main range.\nprototypeAccessors.$from.get = function () {\n return this.ranges[0].$from\n};\n\n// :: ResolvedPos\n// The resolved upper bound of the selection's main range.\nprototypeAccessors.$to.get = function () {\n return this.ranges[0].$to\n};\n\n// :: bool\n// Indicates whether the selection contains any content.\nprototypeAccessors.empty.get = function () {\n var ranges = this.ranges;\n for (var i = 0; i < ranges.length; i++)\n { if (ranges[i].$from.pos != ranges[i].$to.pos) { return false } }\n return true\n};\n\n// eq:: (Selection) → bool\n// Test whether the selection is the same as another selection.\n\n// map:: (doc: Node, mapping: Mappable) → Selection\n// Map this selection through a [mappable](#transform.Mappable) thing. `doc`\n// should be the new document to which we are mapping.\n\n// :: () → Slice\n// Get the content of this selection as a slice.\nSelection.prototype.content = function content () {\n return this.$from.node(0).slice(this.from, this.to, true)\n};\n\n// :: (Transaction, ?Slice)\n// Replace the selection with a slice or, if no slice is given,\n// delete the selection. Will append to the given transaction.\nSelection.prototype.replace = function replace (tr, content) {\n if ( content === void 0 ) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n var lastNode = content.content.lastChild, lastParent = null;\n for (var i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n\n var mapFrom = tr.steps.length, ranges = this.ranges;\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref = ranges[i$1];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i$1 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : content);\n if (i$1 == 0)\n { selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1); }\n }\n};\n\n// :: (Transaction, Node)\n// Replace the selection with the given node, appending the changes\n// to the given transaction.\nSelection.prototype.replaceWith = function replaceWith (tr, node) {\n var mapFrom = tr.steps.length, ranges = this.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n var from = mapping.map($from.pos), to = mapping.map($to.pos);\n if (i) {\n tr.deleteRange(from, to);\n } else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n};\n\n// toJSON:: () → Object\n// Convert the selection to a JSON representation. When implementing\n// this for a custom selection class, make sure to give the object a\n// `type` property whose value matches the ID under which you\n// [registered](#state.Selection^jsonID) your class.\n\n// :: (ResolvedPos, number, ?bool) → ?Selection\n// Find a valid cursor or leaf node selection starting at the given\n// position and searching back if `dir` is negative, and forward if\n// positive. When `textOnly` is true, only consider cursor\n// selections. Will return null when no valid selection position is\n// found.\nSelection.findFrom = function findFrom ($pos, dir, textOnly) {\n var inner = $pos.parent.inlineContent ? new TextSelection($pos)\n : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n if (inner) { return inner }\n\n for (var depth = $pos.depth - 1; depth >= 0; depth--) {\n var found = dir < 0\n ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly)\n : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n if (found) { return found }\n }\n};\n\n// :: (ResolvedPos, ?number) → Selection\n// Find a valid cursor or leaf node selection near the given\n// position. Searches forward first by default, but if `bias` is\n// negative, it will search backwards first.\nSelection.near = function near ($pos, bias) {\n if ( bias === void 0 ) bias = 1;\n\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0))\n};\n\n// :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the start of\n// the given document. Will return an\n// [`AllSelection`](#state.AllSelection) if no valid position\n// exists.\nSelection.atStart = function atStart (doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc)\n};\n\n// :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the end of the\n// given document.\nSelection.atEnd = function atEnd (doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc)\n};\n\n// :: (Node, Object) → Selection\n// Deserialize the JSON representation of a selection. Must be\n// implemented for custom classes (as a static class method).\nSelection.fromJSON = function fromJSON (doc, json) {\n if (!json || !json.type) { throw new RangeError(\"Invalid input for Selection.fromJSON\") }\n var cls = classesById[json.type];\n if (!cls) { throw new RangeError((\"No selection type \" + (json.type) + \" defined\")) }\n return cls.fromJSON(doc, json)\n};\n\n// :: (string, constructor)\n// To be able to deserialize selections from JSON, custom selection\n// classes must register themselves with an ID string, so that they\n// can be disambiguated. Try to pick something that's unlikely to\n// clash with classes from other modules.\nSelection.jsonID = function jsonID (id, selectionClass) {\n if (id in classesById) { throw new RangeError(\"Duplicate use of selection JSON ID \" + id) }\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass\n};\n\n// :: () → SelectionBookmark\n// Get a [bookmark](#state.SelectionBookmark) for this selection,\n// which is a value that can be mapped without having access to a\n// current document, and later resolved to a real selection for a\n// given document again. (This is used mostly by the history to\n// track and restore old selections.) The default implementation of\n// this method just converts the selection to a text selection and\n// returns the bookmark for that.\nSelection.prototype.getBookmark = function getBookmark () {\n return TextSelection.between(this.$anchor, this.$head).getBookmark()\n};\n\nObject.defineProperties( Selection.prototype, prototypeAccessors );\n\n// :: bool\n// Controls whether, when a selection of this type is active in the\n// browser, the selected range should be visible to the user. Defaults\n// to `true`.\nSelection.prototype.visible = true;\n\n// SelectionBookmark:: interface\n// A lightweight, document-independent representation of a selection.\n// You can define a custom bookmark type for a custom selection class\n// to make the history handle it well.\n//\n// map:: (mapping: Mapping) → SelectionBookmark\n// Map the bookmark through a set of changes.\n//\n// resolve:: (doc: Node) → Selection\n// Resolve the bookmark to a real selection again. This may need to\n// do some error checking and may fall back to a default (usually\n// [`TextSelection.between`](#state.TextSelection^between)) if\n// mapping made the bookmark invalid.\n\n// ::- Represents a selected range in a document.\nvar SelectionRange = function SelectionRange($from, $to) {\n // :: ResolvedPos\n // The lower bound of the range.\n this.$from = $from;\n // :: ResolvedPos\n // The upper bound of the range.\n this.$to = $to;\n};\n\n// ::- A text selection represents a classical editor selection, with\n// a head (the moving side) and anchor (immobile side), both of which\n// point into textblock nodes. It can be empty (a regular cursor\n// position).\nvar TextSelection = /*@__PURE__*/(function (Selection) {\n function TextSelection($anchor, $head) {\n if ( $head === void 0 ) $head = $anchor;\n\n Selection.call(this, $anchor, $head);\n }\n\n if ( Selection ) TextSelection.__proto__ = Selection;\n TextSelection.prototype = Object.create( Selection && Selection.prototype );\n TextSelection.prototype.constructor = TextSelection;\n\n var prototypeAccessors$1 = { $cursor: { configurable: true } };\n\n // :: ?ResolvedPos\n // Returns a resolved position if this is a cursor selection (an\n // empty text selection), and null otherwise.\n prototypeAccessors$1.$cursor.get = function () { return this.$anchor.pos == this.$head.pos ? this.$head : null };\n\n TextSelection.prototype.map = function map (doc, mapping) {\n var $head = doc.resolve(mapping.map(this.head));\n if (!$head.parent.inlineContent) { return Selection.near($head) }\n var $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head)\n };\n\n TextSelection.prototype.replace = function replace (tr, content) {\n if ( content === void 0 ) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n Selection.prototype.replace.call(this, tr, content);\n if (content == prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty) {\n var marks = this.$from.marksAcross(this.$to);\n if (marks) { tr.ensureMarks(marks); }\n }\n };\n\n TextSelection.prototype.eq = function eq (other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head\n };\n\n TextSelection.prototype.getBookmark = function getBookmark () {\n return new TextBookmark(this.anchor, this.head)\n };\n\n TextSelection.prototype.toJSON = function toJSON () {\n return {type: \"text\", anchor: this.anchor, head: this.head}\n };\n\n TextSelection.fromJSON = function fromJSON (doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\")\n { throw new RangeError(\"Invalid input for TextSelection.fromJSON\") }\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head))\n };\n\n // :: (Node, number, ?number) → TextSelection\n // Create a text selection from non-resolved positions.\n TextSelection.create = function create (doc, anchor, head) {\n if ( head === void 0 ) head = anchor;\n\n var $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head))\n };\n\n // :: (ResolvedPos, ResolvedPos, ?number) → Selection\n // Return a text selection that spans the given positions or, if\n // they aren't text positions, find a text selection near them.\n // `bias` determines whether the method searches forward (default)\n // or backwards (negative number) first. Will fall back to calling\n // [`Selection.near`](#state.Selection^near) when the document\n // doesn't contain a valid text position.\n TextSelection.between = function between ($anchor, $head, bias) {\n var dPos = $anchor.pos - $head.pos;\n if (!bias || dPos) { bias = dPos >= 0 ? 1 : -1; }\n if (!$head.parent.inlineContent) {\n var found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n if (found) { $head = found.$head; }\n else { return Selection.near($head, bias) }\n }\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n } else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n if (($anchor.pos < $head.pos) != (dPos < 0)) { $anchor = $head; }\n }\n }\n return new TextSelection($anchor, $head)\n };\n\n Object.defineProperties( TextSelection.prototype, prototypeAccessors$1 );\n\n return TextSelection;\n}(Selection));\n\nSelection.jsonID(\"text\", TextSelection);\n\nvar TextBookmark = function TextBookmark(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n};\nTextBookmark.prototype.map = function map (mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head))\n};\nTextBookmark.prototype.resolve = function resolve (doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head))\n};\n\n// ::- A node selection is a selection that points at a single node.\n// All nodes marked [selectable](#model.NodeSpec.selectable) can be\n// the target of a node selection. In such a selection, `from` and\n// `to` point directly before and after the selected node, `anchor`\n// equals `from`, and `head` equals `to`..\nvar NodeSelection = /*@__PURE__*/(function (Selection) {\n function NodeSelection($pos) {\n var node = $pos.nodeAfter;\n var $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n Selection.call(this, $pos, $end);\n // :: Node The selected node.\n this.node = node;\n }\n\n if ( Selection ) NodeSelection.__proto__ = Selection;\n NodeSelection.prototype = Object.create( Selection && Selection.prototype );\n NodeSelection.prototype.constructor = NodeSelection;\n\n NodeSelection.prototype.map = function map (doc, mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n var $pos = doc.resolve(pos);\n if (deleted) { return Selection.near($pos) }\n return new NodeSelection($pos)\n };\n\n NodeSelection.prototype.content = function content () {\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(this.node), 0, 0)\n };\n\n NodeSelection.prototype.eq = function eq (other) {\n return other instanceof NodeSelection && other.anchor == this.anchor\n };\n\n NodeSelection.prototype.toJSON = function toJSON () {\n return {type: \"node\", anchor: this.anchor}\n };\n\n NodeSelection.prototype.getBookmark = function getBookmark () { return new NodeBookmark(this.anchor) };\n\n NodeSelection.fromJSON = function fromJSON (doc, json) {\n if (typeof json.anchor != \"number\")\n { throw new RangeError(\"Invalid input for NodeSelection.fromJSON\") }\n return new NodeSelection(doc.resolve(json.anchor))\n };\n\n // :: (Node, number) → NodeSelection\n // Create a node selection from non-resolved positions.\n NodeSelection.create = function create (doc, from) {\n return new this(doc.resolve(from))\n };\n\n // :: (Node) → bool\n // Determines whether the given node may be selected as a node\n // selection.\n NodeSelection.isSelectable = function isSelectable (node) {\n return !node.isText && node.type.spec.selectable !== false\n };\n\n return NodeSelection;\n}(Selection));\n\nNodeSelection.prototype.visible = false;\n\nSelection.jsonID(\"node\", NodeSelection);\n\nvar NodeBookmark = function NodeBookmark(anchor) {\n this.anchor = anchor;\n};\nNodeBookmark.prototype.map = function map (mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos)\n};\nNodeBookmark.prototype.resolve = function resolve (doc) {\n var $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n if (node && NodeSelection.isSelectable(node)) { return new NodeSelection($pos) }\n return Selection.near($pos)\n};\n\n// ::- A selection type that represents selecting the whole document\n// (which can not necessarily be expressed with a text selection, when\n// there are for example leaf block nodes at the start or end of the\n// document).\nvar AllSelection = /*@__PURE__*/(function (Selection) {\n function AllSelection(doc) {\n Selection.call(this, doc.resolve(0), doc.resolve(doc.content.size));\n }\n\n if ( Selection ) AllSelection.__proto__ = Selection;\n AllSelection.prototype = Object.create( Selection && Selection.prototype );\n AllSelection.prototype.constructor = AllSelection;\n\n AllSelection.prototype.toJSON = function toJSON () { return {type: \"all\"} };\n\n AllSelection.fromJSON = function fromJSON (doc) { return new AllSelection(doc) };\n\n AllSelection.prototype.map = function map (doc) { return new AllSelection(doc) };\n\n AllSelection.prototype.eq = function eq (other) { return other instanceof AllSelection };\n\n AllSelection.prototype.getBookmark = function getBookmark () { return AllBookmark };\n\n return AllSelection;\n}(Selection));\n\nSelection.jsonID(\"all\", AllSelection);\n\nvar AllBookmark = {\n map: function map() { return this },\n resolve: function resolve(doc) { return new AllSelection(doc) }\n};\n\n// FIXME we'll need some awareness of text direction when scanning for selections\n\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction findSelectionIn(doc, node, pos, index, dir, text) {\n if (node.inlineContent) { return TextSelection.create(doc, pos) }\n for (var i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n var child = node.child(i);\n if (!child.isAtom) {\n var inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n if (inner) { return inner }\n } else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0))\n }\n pos += child.nodeSize * dir;\n }\n}\n\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n var last = tr.steps.length - 1;\n if (last < startLen) { return }\n var step = tr.steps[last];\n if (!(step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceStep\"] || step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceAroundStep\"])) { return }\n var map = tr.mapping.maps[last], end;\n map.forEach(function (_from, _to, _newFrom, newTo) { if (end == null) { end = newTo; } });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nvar UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4;\n\n// ::- An editor state transaction, which can be applied to a state to\n// create an updated state. Use\n// [`EditorState.tr`](#state.EditorState.tr) to create an instance.\n//\n// Transactions track changes to the document (they are a subclass of\n// [`Transform`](#transform.Transform)), but also other state changes,\n// like selection updates and adjustments of the set of [stored\n// marks](#state.EditorState.storedMarks). In addition, you can store\n// metadata properties in a transaction, which are extra pieces of\n// information that client code or plugins can use to describe what a\n// transacion represents, so that they can update their [own\n// state](#state.StateField) accordingly.\n//\n// The [editor view](#view.EditorView) uses a few metadata properties:\n// it will attach a property `\"pointer\"` with the value `true` to\n// selection transactions directly caused by mouse or touch input, and\n// a `\"uiEvent\"` property of that may be `\"paste\"`, `\"cut\"`, or `\"drop\"`.\nvar Transaction = /*@__PURE__*/(function (Transform) {\n function Transaction(state) {\n Transform.call(this, state.doc);\n // :: number\n // The timestamp associated with this transaction, in the same\n // format as `Date.now()`.\n this.time = Date.now();\n this.curSelection = state.selection;\n // The step count for which the current selection is valid.\n this.curSelectionFor = 0;\n // :: ?[Mark]\n // The stored marks set by this transaction, if any.\n this.storedMarks = state.storedMarks;\n // Bitfield to track which aspects of the state were updated by\n // this transaction.\n this.updated = 0;\n // Object used to store metadata properties for the transaction.\n this.meta = Object.create(null);\n }\n\n if ( Transform ) Transaction.__proto__ = Transform;\n Transaction.prototype = Object.create( Transform && Transform.prototype );\n Transaction.prototype.constructor = Transaction;\n\n var prototypeAccessors = { selection: { configurable: true },selectionSet: { configurable: true },storedMarksSet: { configurable: true },isGeneric: { configurable: true },scrolledIntoView: { configurable: true } };\n\n // :: Selection\n // The transaction's current selection. This defaults to the editor\n // selection [mapped](#state.Selection.map) through the steps in the\n // transaction, but can be overwritten with\n // [`setSelection`](#state.Transaction.setSelection).\n prototypeAccessors.selection.get = function () {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n return this.curSelection\n };\n\n // :: (Selection) → Transaction\n // Update the transaction's current selection. Will determine the\n // selection that the editor gets when the transaction is applied.\n Transaction.prototype.setSelection = function setSelection (selection) {\n if (selection.$from.doc != this.doc)\n { throw new RangeError(\"Selection passed to setSelection must point at the current document\") }\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this\n };\n\n // :: bool\n // Whether the selection was explicitly updated by this transaction.\n prototypeAccessors.selectionSet.get = function () {\n return (this.updated & UPDATED_SEL) > 0\n };\n\n // :: (?[Mark]) → Transaction\n // Set the current stored marks.\n Transaction.prototype.setStoredMarks = function setStoredMarks (marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this\n };\n\n // :: ([Mark]) → Transaction\n // Make sure the current stored marks or, if that is null, the marks\n // at the selection, match the given set of marks. Does nothing if\n // this is already the case.\n Transaction.prototype.ensureMarks = function ensureMarks (marks) {\n if (!prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(this.storedMarks || this.selection.$from.marks(), marks))\n { this.setStoredMarks(marks); }\n return this\n };\n\n // :: (Mark) → Transaction\n // Add a mark to the set of stored marks.\n Transaction.prototype.addStoredMark = function addStoredMark (mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()))\n };\n\n // :: (union) → Transaction\n // Remove a mark or mark type from the set of stored marks.\n Transaction.prototype.removeStoredMark = function removeStoredMark (mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()))\n };\n\n // :: bool\n // Whether the stored marks were explicitly set for this transaction.\n prototypeAccessors.storedMarksSet.get = function () {\n return (this.updated & UPDATED_MARKS) > 0\n };\n\n Transaction.prototype.addStep = function addStep (step, doc) {\n Transform.prototype.addStep.call(this, step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n };\n\n // :: (number) → Transaction\n // Update the timestamp for the transaction.\n Transaction.prototype.setTime = function setTime (time) {\n this.time = time;\n return this\n };\n\n // :: (Slice) → Transaction\n // Replace the current selection with the given slice.\n Transaction.prototype.replaceSelection = function replaceSelection (slice) {\n this.selection.replace(this, slice);\n return this\n };\n\n // :: (Node, ?bool) → Transaction\n // Replace the selection with the given node. When `inheritMarks` is\n // true and the content is inline, it inherits the marks from the\n // place where it is inserted.\n Transaction.prototype.replaceSelectionWith = function replaceSelectionWith (node, inheritMarks) {\n var selection = this.selection;\n if (inheritMarks !== false)\n { node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none))); }\n selection.replaceWith(this, node);\n return this\n };\n\n // :: () → Transaction\n // Delete the selection.\n Transaction.prototype.deleteSelection = function deleteSelection () {\n this.selection.replace(this);\n return this\n };\n\n // :: (string, from: ?number, to: ?number) → Transaction\n // Replace the given range, or the selection if no range is given,\n // with a text node containing the given string.\n Transaction.prototype.insertText = function insertText (text, from, to) {\n if ( to === void 0 ) to = from;\n\n var schema = this.doc.type.schema;\n if (from == null) {\n if (!text) { return this.deleteSelection() }\n return this.replaceSelectionWith(schema.text(text), true)\n } else {\n if (!text) { return this.deleteRange(from, to) }\n var marks = this.storedMarks;\n if (!marks) {\n var $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n this.replaceRangeWith(from, to, schema.text(text, marks));\n if (!this.selection.empty) { this.setSelection(Selection.near(this.selection.$to)); }\n return this\n }\n };\n\n // :: (union, any) → Transaction\n // Store a metadata property in this transaction, keyed either by\n // name or by plugin.\n Transaction.prototype.setMeta = function setMeta (key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this\n };\n\n // :: (union) → any\n // Retrieve a metadata property for a given name or plugin.\n Transaction.prototype.getMeta = function getMeta (key) {\n return this.meta[typeof key == \"string\" ? key : key.key]\n };\n\n // :: bool\n // Returns true if this transaction doesn't contain any metadata,\n // and can thus safely be extended.\n prototypeAccessors.isGeneric.get = function () {\n for (var _ in this.meta) { return false }\n return true\n };\n\n // :: () → Transaction\n // Indicate that the editor should scroll the selection into view\n // when updated to the state produced by this transaction.\n Transaction.prototype.scrollIntoView = function scrollIntoView () {\n this.updated |= UPDATED_SCROLL;\n return this\n };\n\n prototypeAccessors.scrolledIntoView.get = function () {\n return (this.updated & UPDATED_SCROLL) > 0\n };\n\n Object.defineProperties( Transaction.prototype, prototypeAccessors );\n\n return Transaction;\n}(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Transform\"]));\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self)\n}\n\nvar FieldDesc = function FieldDesc(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n};\n\nvar baseFields = [\n new FieldDesc(\"doc\", {\n init: function init(config) { return config.doc || config.schema.topNodeType.createAndFill() },\n apply: function apply(tr) { return tr.doc }\n }),\n\n new FieldDesc(\"selection\", {\n init: function init(config, instance) { return config.selection || Selection.atStart(instance.doc) },\n apply: function apply(tr) { return tr.selection }\n }),\n\n new FieldDesc(\"storedMarks\", {\n init: function init(config) { return config.storedMarks || null },\n apply: function apply(tr, _marks, _old, state) { return state.selection.$cursor ? tr.storedMarks : null }\n }),\n\n new FieldDesc(\"scrollToSelection\", {\n init: function init() { return 0 },\n apply: function apply(tr, prev) { return tr.scrolledIntoView ? prev + 1 : prev }\n })\n];\n\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nvar Configuration = function Configuration(schema, plugins) {\n var this$1 = this;\n\n this.schema = schema;\n this.fields = baseFields.concat();\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n if (plugins) { plugins.forEach(function (plugin) {\n if (this$1.pluginsByKey[plugin.key])\n { throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\") }\n this$1.plugins.push(plugin);\n this$1.pluginsByKey[plugin.key] = plugin;\n if (plugin.spec.state)\n { this$1.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin)); }\n }); }\n};\n\n// ::- The state of a ProseMirror editor is represented by an object\n// of this type. A state is a persistent data structure—it isn't\n// updated, but rather a new state value is computed from an old one\n// using the [`apply`](#state.EditorState.apply) method.\n//\n// A state holds a number of built-in fields, and plugins can\n// [define](#state.PluginSpec.state) additional fields.\nvar EditorState = function EditorState(config) {\n this.config = config;\n};\n\nvar prototypeAccessors$1 = { schema: { configurable: true },plugins: { configurable: true },tr: { configurable: true } };\n\n// doc:: Node\n// The current document.\n\n// selection:: Selection\n// The selection.\n\n// storedMarks:: ?[Mark]\n// A set of marks to apply to the next input. Will be null when\n// no explicit marks have been set.\n\n// :: Schema\n// The schema of the state's document.\nprototypeAccessors$1.schema.get = function () {\n return this.config.schema\n};\n\n// :: [Plugin]\n// The plugins that are active in this state.\nprototypeAccessors$1.plugins.get = function () {\n return this.config.plugins\n};\n\n// :: (Transaction) → EditorState\n// Apply the given transaction to produce a new state.\nEditorState.prototype.apply = function apply (tr) {\n return this.applyTransaction(tr).state\n};\n\n// : (Transaction) → bool\nEditorState.prototype.filterTransaction = function filterTransaction (tr, ignore) {\n if ( ignore === void 0 ) ignore = -1;\n\n for (var i = 0; i < this.config.plugins.length; i++) { if (i != ignore) {\n var plugin = this.config.plugins[i];\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this))\n { return false }\n } }\n return true\n};\n\n// :: (Transaction) → {state: EditorState, transactions: [Transaction]}\n// Verbose variant of [`apply`](#state.EditorState.apply) that\n// returns the precise transactions that were applied (which might\n// be influenced by the [transaction\n// hooks](#state.PluginSpec.filterTransaction) of\n// plugins) along with the new state.\nEditorState.prototype.applyTransaction = function applyTransaction (rootTr) {\n if (!this.filterTransaction(rootTr)) { return {state: this, transactions: []} }\n\n var trs = [rootTr], newState = this.applyInner(rootTr), seen = null;\n // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n for (;;) {\n var haveNew = false;\n for (var i = 0; i < this.config.plugins.length; i++) {\n var plugin = this.config.plugins[i];\n if (plugin.spec.appendTransaction) {\n var n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n var tr = n < trs.length &&\n plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n if (!seen) {\n seen = [];\n for (var j = 0; j < this.config.plugins.length; j++)\n { seen.push(j < i ? {state: newState, n: trs.length} : {state: this, n: 0}); }\n }\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n if (seen) { seen[i] = {state: newState, n: trs.length}; }\n }\n }\n if (!haveNew) { return {state: newState, transactions: trs} }\n }\n};\n\n// : (Transaction) → EditorState\nEditorState.prototype.applyInner = function applyInner (tr) {\n if (!tr.before.eq(this.doc)) { throw new RangeError(\"Applying a mismatched transaction\") }\n var newInstance = new EditorState(this.config), fields = this.config.fields;\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n for (var i$1 = 0; i$1 < applyListeners.length; i$1++) { applyListeners[i$1](this, tr, newInstance); }\n return newInstance\n};\n\n// :: Transaction\n// Start a [transaction](#state.Transaction) from this state.\nprototypeAccessors$1.tr.get = function () { return new Transaction(this) };\n\n// :: (Object) → EditorState\n// Create a new state.\n//\n// config::- Configuration options. Must contain `schema` or `doc` (or both).\n//\n// schema:: ?Schema\n// The schema to use.\n//\n// doc:: ?Node\n// The starting document.\n//\n// selection:: ?Selection\n// A valid selection in the document.\n//\n// storedMarks:: ?[Mark]\n// The initial set of [stored marks](#state.EditorState.storedMarks).\n//\n// plugins:: ?[Plugin]\n// The plugins that should be active in this state.\nEditorState.create = function create (config) {\n var $config = new Configuration(config.schema || config.doc.type.schema, config.plugins);\n var instance = new EditorState($config);\n for (var i = 0; i < $config.fields.length; i++)\n { instance[$config.fields[i].name] = $config.fields[i].init(config, instance); }\n return instance\n};\n\n// :: (Object) → EditorState\n// Create a new state based on this one, but with an adjusted set of\n// active plugins. State fields that exist in both sets of plugins\n// are kept unchanged. Those that no longer exist are dropped, and\n// those that are new are initialized using their\n// [`init`](#state.StateField.init) method, passing in the new\n// configuration object..\n//\n// config::- configuration options\n//\n// schema:: ?Schema\n// New schema to use.\n//\n// plugins:: ?[Plugin]\n// New set of active plugins.\nEditorState.prototype.reconfigure = function reconfigure (config) {\n var $config = new Configuration(config.schema || this.schema, config.plugins);\n var fields = $config.fields, instance = new EditorState($config);\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n return instance\n};\n\n// :: (?union, string, number>) → Object\n// Serialize this state to JSON. If you want to serialize the state\n// of plugins, pass an object mapping property names to use in the\n// resulting JSON object to plugin objects. The argument may also be\n// a string or number, in which case it is ignored, to support the\n// way `JSON.stringify` calls `toString` methods.\nEditorState.prototype.toJSON = function toJSON (pluginFields) {\n var result = {doc: this.doc.toJSON(), selection: this.selection.toJSON()};\n if (this.storedMarks) { result.storedMarks = this.storedMarks.map(function (m) { return m.toJSON(); }); }\n if (pluginFields && typeof pluginFields == 'object') { for (var prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\")\n { throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\") }\n var plugin = pluginFields[prop], state = plugin.spec.state;\n if (state && state.toJSON) { result[prop] = state.toJSON.call(plugin, this[plugin.key]); }\n } }\n return result\n};\n\n// :: (Object, Object, ?Object) → EditorState\n// Deserialize a JSON representation of a state. `config` should\n// have at least a `schema` field, and should contain array of\n// plugins to initialize the state with. `pluginFields` can be used\n// to deserialize the state of plugins, by associating plugin\n// instances with the property names they use in the JSON object.\n//\n// config::- configuration options\n//\n// schema:: Schema\n// The schema to use.\n//\n// plugins:: ?[Plugin]\n// The set of active plugins.\nEditorState.fromJSON = function fromJSON (config, json, pluginFields) {\n if (!json) { throw new RangeError(\"Invalid input for EditorState.fromJSON\") }\n if (!config.schema) { throw new RangeError(\"Required config field 'schema' missing\") }\n var $config = new Configuration(config.schema, config.plugins);\n var instance = new EditorState($config);\n $config.fields.forEach(function (field) {\n if (field.name == \"doc\") {\n instance.doc = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].fromJSON(config.schema, json.doc);\n } else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n } else if (field.name == \"storedMarks\") {\n if (json.storedMarks) { instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON); }\n } else {\n if (pluginFields) { for (var prop in pluginFields) {\n var plugin = pluginFields[prop], state = plugin.spec.state;\n if (plugin.key == field.name && state && state.fromJSON &&\n Object.prototype.hasOwnProperty.call(json, prop)) {\n // This field belongs to a plugin mapped to a JSON field, read it from there.\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return\n }\n } }\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance\n};\n\n// Kludge to allow the view to track mappings between different\n// instances of a state.\n//\n// FIXME this is no longer needed as of prosemirror-view 1.9.0,\n// though due to backwards-compat we should probably keep it around\n// for a while (if only as a no-op)\nEditorState.addApplyListener = function addApplyListener (f) {\n applyListeners.push(f);\n};\nEditorState.removeApplyListener = function removeApplyListener (f) {\n var found = applyListeners.indexOf(f);\n if (found > -1) { applyListeners.splice(found, 1); }\n};\n\nObject.defineProperties( EditorState.prototype, prototypeAccessors$1 );\n\nvar applyListeners = [];\n\n// PluginSpec:: interface\n//\n// This is the type passed to the [`Plugin`](#state.Plugin)\n// constructor. It provides a definition for a plugin.\n//\n// props:: ?EditorProps\n// The [view props](#view.EditorProps) added by this plugin. Props\n// that are functions will be bound to have the plugin instance as\n// their `this` binding.\n//\n// state:: ?StateField\n// Allows a plugin to define a [state field](#state.StateField), an\n// extra slot in the state object in which it can keep its own data.\n//\n// key:: ?PluginKey\n// Can be used to make this a keyed plugin. You can have only one\n// plugin with a given key in a given state, but it is possible to\n// access the plugin's configuration and state through the key,\n// without having access to the plugin instance object.\n//\n// view:: ?(EditorView) → Object\n// When the plugin needs to interact with the editor view, or\n// set something up in the DOM, use this field. The function\n// will be called when the plugin's state is associated with an\n// editor view.\n//\n// return::-\n// Should return an object with the following optional\n// properties:\n//\n// update:: ?(view: EditorView, prevState: EditorState)\n// Called whenever the view's state is updated.\n//\n// destroy:: ?()\n// Called when the view is destroyed or receives a state\n// with different plugins.\n//\n// filterTransaction:: ?(Transaction, EditorState) → bool\n// When present, this will be called before a transaction is\n// applied by the state, allowing the plugin to cancel it (by\n// returning false).\n//\n// appendTransaction:: ?(transactions: [Transaction], oldState: EditorState, newState: EditorState) → ?Transaction\n// Allows the plugin to append another transaction to be applied\n// after the given array of transactions. When another plugin\n// appends a transaction after this was called, it is called again\n// with the new state and new transactions—but only the new\n// transactions, i.e. it won't be passed transactions that it\n// already saw.\n\nfunction bindProps(obj, self, target) {\n for (var prop in obj) {\n var val = obj[prop];\n if (val instanceof Function) { val = val.bind(self); }\n else if (prop == \"handleDOMEvents\") { val = bindProps(val, self, {}); }\n target[prop] = val;\n }\n return target\n}\n\n// ::- Plugins bundle functionality that can be added to an editor.\n// They are part of the [editor state](#state.EditorState) and\n// may influence that state and the view that contains it.\nvar Plugin = function Plugin(spec) {\n // :: EditorProps\n // The [props](#view.EditorProps) exported by this plugin.\n this.props = {};\n if (spec.props) { bindProps(spec.props, this, this.props); }\n // :: Object\n // The plugin's [spec object](#state.PluginSpec).\n this.spec = spec;\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n};\n\n// :: (EditorState) → any\n// Extract the plugin's state field from an editor state.\nPlugin.prototype.getState = function getState (state) { return state[this.key] };\n\n// StateField:: interface\n// A plugin spec may provide a state field (under its\n// [`state`](#state.PluginSpec.state) property) of this type, which\n// describes the state it wants to keep. Functions provided here are\n// always called with the plugin instance as their `this` binding.\n//\n// init:: (config: Object, instance: EditorState) → T\n// Initialize the value of the field. `config` will be the object\n// passed to [`EditorState.create`](#state.EditorState^create). Note\n// that `instance` is a half-initialized state instance, and will\n// not have values for plugin fields initialized after this one.\n//\n// apply:: (tr: Transaction, value: T, oldState: EditorState, newState: EditorState) → T\n// Apply the given transaction to this state field, producing a new\n// field value. Note that the `newState` argument is again a partially\n// constructed state does not yet contain the state from plugins\n// coming after this one.\n//\n// toJSON:: ?(value: T) → *\n// Convert this field to JSON. Optional, can be left off to disable\n// JSON serialization for the field.\n//\n// fromJSON:: ?(config: Object, value: *, state: EditorState) → T\n// Deserialize the JSON representation of this field. Note that the\n// `state` argument is again a half-initialized state.\n\nvar keys = Object.create(null);\n\nfunction createKey(name) {\n if (name in keys) { return name + \"$\" + ++keys[name] }\n keys[name] = 0;\n return name + \"$\"\n}\n\n// ::- A key is used to [tag](#state.PluginSpec.key)\n// plugins in a way that makes it possible to find them, given an\n// editor state. Assigning a key does mean only one plugin of that\n// type can be active in a state.\nvar PluginKey = function PluginKey(name) {\nif ( name === void 0 ) name = \"key\";\n this.key = createKey(name); };\n\n// :: (EditorState) → ?Plugin\n// Get the active plugin with this key, if any, from an editor\n// state.\nPluginKey.prototype.get = function get (state) { return state.config.pluginsByKey[this.key] };\n\n// :: (EditorState) → ?any\n// Get the plugin's state from an editor state.\nPluginKey.prototype.getState = function getState (state) { return state[this.key] };\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-state/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AllSelection\", function() { return AllSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorState\", function() { return EditorState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeSelection\", function() { return NodeSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Plugin\", function() { return Plugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PluginKey\", function() { return PluginKey; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectionRange\", function() { return SelectionRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TextSelection\", function() { return TextSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transaction\", function() { return Transaction; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\nvar classesById = Object.create(null); // ::- Superclass for editor selections. Every selection type should\n// extend this. Should not be instantiated directly.\n\nvar Selection = function Selection($anchor, $head, ranges) {\n // :: [SelectionRange]\n // The ranges covered by the selection.\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))]; // :: ResolvedPos\n // The resolved anchor of the selection (the side that stays in\n // place when the selection is modified).\n\n this.$anchor = $anchor; // :: ResolvedPos\n // The resolved head of the selection (the side that moves when\n // the selection is modified).\n\n this.$head = $head;\n};\n\nvar prototypeAccessors = {\n anchor: {\n configurable: true\n },\n head: {\n configurable: true\n },\n from: {\n configurable: true\n },\n to: {\n configurable: true\n },\n $from: {\n configurable: true\n },\n $to: {\n configurable: true\n },\n empty: {\n configurable: true\n }\n}; // :: number\n// The selection's anchor, as an unresolved position.\n\nprototypeAccessors.anchor.get = function () {\n return this.$anchor.pos;\n}; // :: number\n// The selection's head.\n\n\nprototypeAccessors.head.get = function () {\n return this.$head.pos;\n}; // :: number\n// The lower bound of the selection's main range.\n\n\nprototypeAccessors.from.get = function () {\n return this.$from.pos;\n}; // :: number\n// The upper bound of the selection's main range.\n\n\nprototypeAccessors.to.get = function () {\n return this.$to.pos;\n}; // :: ResolvedPos\n// The resolved lowerbound of the selection's main range.\n\n\nprototypeAccessors.$from.get = function () {\n return this.ranges[0].$from;\n}; // :: ResolvedPos\n// The resolved upper bound of the selection's main range.\n\n\nprototypeAccessors.$to.get = function () {\n return this.ranges[0].$to;\n}; // :: bool\n// Indicates whether the selection contains any content.\n\n\nprototypeAccessors.empty.get = function () {\n var ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n if (ranges[i].$from.pos != ranges[i].$to.pos) {\n return false;\n }\n }\n\n return true;\n}; // eq:: (Selection) → bool\n// Test whether the selection is the same as another selection.\n// map:: (doc: Node, mapping: Mappable) → Selection\n// Map this selection through a [mappable](#transform.Mappable) thing. `doc`\n// should be the new document to which we are mapping.\n// :: () → Slice\n// Get the content of this selection as a slice.\n\n\nSelection.prototype.content = function content() {\n return this.$from.node(0).slice(this.from, this.to, true);\n}; // :: (Transaction, ?Slice)\n// Replace the selection with a slice or, if no slice is given,\n// delete the selection. Will append to the given transaction.\n\n\nSelection.prototype.replace = function replace(tr, content) {\n if (content === void 0) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty; // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n\n var lastNode = content.content.lastChild,\n lastParent = null;\n\n for (var i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref = ranges[i$1];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i$1 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : content);\n\n if (i$1 == 0) {\n selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n }\n }\n}; // :: (Transaction, Node)\n// Replace the selection with the given node, appending the changes\n// to the given transaction.\n\n\nSelection.prototype.replaceWith = function replaceWith(tr, node) {\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n var from = mapping.map($from.pos),\n to = mapping.map($to.pos);\n\n if (i) {\n tr.deleteRange(from, to);\n } else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n}; // toJSON:: () → Object\n// Convert the selection to a JSON representation. When implementing\n// this for a custom selection class, make sure to give the object a\n// `type` property whose value matches the ID under which you\n// [registered](#state.Selection^jsonID) your class.\n// :: (ResolvedPos, number, ?bool) → ?Selection\n// Find a valid cursor or leaf node selection starting at the given\n// position and searching back if `dir` is negative, and forward if\n// positive. When `textOnly` is true, only consider cursor\n// selections. Will return null when no valid selection position is\n// found.\n\n\nSelection.findFrom = function findFrom($pos, dir, textOnly) {\n var inner = $pos.parent.inlineContent ? new TextSelection($pos) : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n\n if (inner) {\n return inner;\n }\n\n for (var depth = $pos.depth - 1; depth >= 0; depth--) {\n var found = dir < 0 ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n\n if (found) {\n return found;\n }\n }\n}; // :: (ResolvedPos, ?number) → Selection\n// Find a valid cursor or leaf node selection near the given\n// position. Searches forward first by default, but if `bias` is\n// negative, it will search backwards first.\n\n\nSelection.near = function near($pos, bias) {\n if (bias === void 0) bias = 1;\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n}; // :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the start of\n// the given document. Will return an\n// [`AllSelection`](#state.AllSelection) if no valid position\n// exists.\n\n\nSelection.atStart = function atStart(doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n}; // :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the end of the\n// given document.\n\n\nSelection.atEnd = function atEnd(doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n}; // :: (Node, Object) → Selection\n// Deserialize the JSON representation of a selection. Must be\n// implemented for custom classes (as a static class method).\n\n\nSelection.fromJSON = function fromJSON(doc, json) {\n if (!json || !json.type) {\n throw new RangeError(\"Invalid input for Selection.fromJSON\");\n }\n\n var cls = classesById[json.type];\n\n if (!cls) {\n throw new RangeError(\"No selection type \" + json.type + \" defined\");\n }\n\n return cls.fromJSON(doc, json);\n}; // :: (string, constructor)\n// To be able to deserialize selections from JSON, custom selection\n// classes must register themselves with an ID string, so that they\n// can be disambiguated. Try to pick something that's unlikely to\n// clash with classes from other modules.\n\n\nSelection.jsonID = function jsonID(id, selectionClass) {\n if (id in classesById) {\n throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n }\n\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass;\n}; // :: () → SelectionBookmark\n// Get a [bookmark](#state.SelectionBookmark) for this selection,\n// which is a value that can be mapped without having access to a\n// current document, and later resolved to a real selection for a\n// given document again. (This is used mostly by the history to\n// track and restore old selections.) The default implementation of\n// this method just converts the selection to a text selection and\n// returns the bookmark for that.\n\n\nSelection.prototype.getBookmark = function getBookmark() {\n return TextSelection.between(this.$anchor, this.$head).getBookmark();\n};\n\nObject.defineProperties(Selection.prototype, prototypeAccessors); // :: bool\n// Controls whether, when a selection of this type is active in the\n// browser, the selected range should be visible to the user. Defaults\n// to `true`.\n\nSelection.prototype.visible = true; // SelectionBookmark:: interface\n// A lightweight, document-independent representation of a selection.\n// You can define a custom bookmark type for a custom selection class\n// to make the history handle it well.\n//\n// map:: (mapping: Mapping) → SelectionBookmark\n// Map the bookmark through a set of changes.\n//\n// resolve:: (doc: Node) → Selection\n// Resolve the bookmark to a real selection again. This may need to\n// do some error checking and may fall back to a default (usually\n// [`TextSelection.between`](#state.TextSelection^between)) if\n// mapping made the bookmark invalid.\n// ::- Represents a selected range in a document.\n\nvar SelectionRange = function SelectionRange($from, $to) {\n // :: ResolvedPos\n // The lower bound of the range.\n this.$from = $from; // :: ResolvedPos\n // The upper bound of the range.\n\n this.$to = $to;\n}; // ::- A text selection represents a classical editor selection, with\n// a head (the moving side) and anchor (immobile side), both of which\n// point into textblock nodes. It can be empty (a regular cursor\n// position).\n\n\nvar TextSelection = /*@__PURE__*/function (Selection) {\n function TextSelection($anchor, $head) {\n if ($head === void 0) $head = $anchor;\n Selection.call(this, $anchor, $head);\n }\n\n if (Selection) TextSelection.__proto__ = Selection;\n TextSelection.prototype = Object.create(Selection && Selection.prototype);\n TextSelection.prototype.constructor = TextSelection;\n var prototypeAccessors$1 = {\n $cursor: {\n configurable: true\n }\n }; // :: ?ResolvedPos\n // Returns a resolved position if this is a cursor selection (an\n // empty text selection), and null otherwise.\n\n prototypeAccessors$1.$cursor.get = function () {\n return this.$anchor.pos == this.$head.pos ? this.$head : null;\n };\n\n TextSelection.prototype.map = function map(doc, mapping) {\n var $head = doc.resolve(mapping.map(this.head));\n\n if (!$head.parent.inlineContent) {\n return Selection.near($head);\n }\n\n var $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n };\n\n TextSelection.prototype.replace = function replace(tr, content) {\n if (content === void 0) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n Selection.prototype.replace.call(this, tr, content);\n\n if (content == prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty) {\n var marks = this.$from.marksAcross(this.$to);\n\n if (marks) {\n tr.ensureMarks(marks);\n }\n }\n };\n\n TextSelection.prototype.eq = function eq(other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n };\n\n TextSelection.prototype.getBookmark = function getBookmark() {\n return new TextBookmark(this.anchor, this.head);\n };\n\n TextSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"text\",\n anchor: this.anchor,\n head: this.head\n };\n };\n\n TextSelection.fromJSON = function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\") {\n throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n }\n\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }; // :: (Node, number, ?number) → TextSelection\n // Create a text selection from non-resolved positions.\n\n\n TextSelection.create = function create(doc, anchor, head) {\n if (head === void 0) head = anchor;\n var $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n }; // :: (ResolvedPos, ResolvedPos, ?number) → Selection\n // Return a text selection that spans the given positions or, if\n // they aren't text positions, find a text selection near them.\n // `bias` determines whether the method searches forward (default)\n // or backwards (negative number) first. Will fall back to calling\n // [`Selection.near`](#state.Selection^near) when the document\n // doesn't contain a valid text position.\n\n\n TextSelection.between = function between($anchor, $head, bias) {\n var dPos = $anchor.pos - $head.pos;\n\n if (!bias || dPos) {\n bias = dPos >= 0 ? 1 : -1;\n }\n\n if (!$head.parent.inlineContent) {\n var found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n\n if (found) {\n $head = found.$head;\n } else {\n return Selection.near($head, bias);\n }\n }\n\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n } else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n\n if ($anchor.pos < $head.pos != dPos < 0) {\n $anchor = $head;\n }\n }\n }\n\n return new TextSelection($anchor, $head);\n };\n\n Object.defineProperties(TextSelection.prototype, prototypeAccessors$1);\n return TextSelection;\n}(Selection);\n\nSelection.jsonID(\"text\", TextSelection);\n\nvar TextBookmark = function TextBookmark(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n};\n\nTextBookmark.prototype.map = function map(mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n};\n\nTextBookmark.prototype.resolve = function resolve(doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n}; // ::- A node selection is a selection that points at a single node.\n// All nodes marked [selectable](#model.NodeSpec.selectable) can be\n// the target of a node selection. In such a selection, `from` and\n// `to` point directly before and after the selected node, `anchor`\n// equals `from`, and `head` equals `to`..\n\n\nvar NodeSelection = /*@__PURE__*/function (Selection) {\n function NodeSelection($pos) {\n var node = $pos.nodeAfter;\n var $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n Selection.call(this, $pos, $end); // :: Node The selected node.\n\n this.node = node;\n }\n\n if (Selection) NodeSelection.__proto__ = Selection;\n NodeSelection.prototype = Object.create(Selection && Selection.prototype);\n NodeSelection.prototype.constructor = NodeSelection;\n\n NodeSelection.prototype.map = function map(doc, mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n var $pos = doc.resolve(pos);\n\n if (deleted) {\n return Selection.near($pos);\n }\n\n return new NodeSelection($pos);\n };\n\n NodeSelection.prototype.content = function content() {\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(this.node), 0, 0);\n };\n\n NodeSelection.prototype.eq = function eq(other) {\n return other instanceof NodeSelection && other.anchor == this.anchor;\n };\n\n NodeSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"node\",\n anchor: this.anchor\n };\n };\n\n NodeSelection.prototype.getBookmark = function getBookmark() {\n return new NodeBookmark(this.anchor);\n };\n\n NodeSelection.fromJSON = function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\") {\n throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n }\n\n return new NodeSelection(doc.resolve(json.anchor));\n }; // :: (Node, number) → NodeSelection\n // Create a node selection from non-resolved positions.\n\n\n NodeSelection.create = function create(doc, from) {\n return new this(doc.resolve(from));\n }; // :: (Node) → bool\n // Determines whether the given node may be selected as a node\n // selection.\n\n\n NodeSelection.isSelectable = function isSelectable(node) {\n return !node.isText && node.type.spec.selectable !== false;\n };\n\n return NodeSelection;\n}(Selection);\n\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\n\nvar NodeBookmark = function NodeBookmark(anchor) {\n this.anchor = anchor;\n};\n\nNodeBookmark.prototype.map = function map(mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n};\n\nNodeBookmark.prototype.resolve = function resolve(doc) {\n var $pos = doc.resolve(this.anchor),\n node = $pos.nodeAfter;\n\n if (node && NodeSelection.isSelectable(node)) {\n return new NodeSelection($pos);\n }\n\n return Selection.near($pos);\n}; // ::- A selection type that represents selecting the whole document\n// (which can not necessarily be expressed with a text selection, when\n// there are for example leaf block nodes at the start or end of the\n// document).\n\n\nvar AllSelection = /*@__PURE__*/function (Selection) {\n function AllSelection(doc) {\n Selection.call(this, doc.resolve(0), doc.resolve(doc.content.size));\n }\n\n if (Selection) AllSelection.__proto__ = Selection;\n AllSelection.prototype = Object.create(Selection && Selection.prototype);\n AllSelection.prototype.constructor = AllSelection;\n\n AllSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"all\"\n };\n };\n\n AllSelection.fromJSON = function fromJSON(doc) {\n return new AllSelection(doc);\n };\n\n AllSelection.prototype.map = function map(doc) {\n return new AllSelection(doc);\n };\n\n AllSelection.prototype.eq = function eq(other) {\n return other instanceof AllSelection;\n };\n\n AllSelection.prototype.getBookmark = function getBookmark() {\n return AllBookmark;\n };\n\n return AllSelection;\n}(Selection);\n\nSelection.jsonID(\"all\", AllSelection);\nvar AllBookmark = {\n map: function map() {\n return this;\n },\n resolve: function resolve(doc) {\n return new AllSelection(doc);\n }\n}; // FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\n\nfunction findSelectionIn(doc, node, pos, index, dir, text) {\n if (node.inlineContent) {\n return TextSelection.create(doc, pos);\n }\n\n for (var i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n var child = node.child(i);\n\n if (!child.isAtom) {\n var inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n\n if (inner) {\n return inner;\n }\n } else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n }\n\n pos += child.nodeSize * dir;\n }\n}\n\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n var last = tr.steps.length - 1;\n\n if (last < startLen) {\n return;\n }\n\n var step = tr.steps[last];\n\n if (!(step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceStep\"] || step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceAroundStep\"])) {\n return;\n }\n\n var map = tr.mapping.maps[last],\n end;\n map.forEach(function (_from, _to, _newFrom, newTo) {\n if (end == null) {\n end = newTo;\n }\n });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nvar UPDATED_SEL = 1,\n UPDATED_MARKS = 2,\n UPDATED_SCROLL = 4; // ::- An editor state transaction, which can be applied to a state to\n// create an updated state. Use\n// [`EditorState.tr`](#state.EditorState.tr) to create an instance.\n//\n// Transactions track changes to the document (they are a subclass of\n// [`Transform`](#transform.Transform)), but also other state changes,\n// like selection updates and adjustments of the set of [stored\n// marks](#state.EditorState.storedMarks). In addition, you can store\n// metadata properties in a transaction, which are extra pieces of\n// information that client code or plugins can use to describe what a\n// transacion represents, so that they can update their [own\n// state](#state.StateField) accordingly.\n//\n// The [editor view](#view.EditorView) uses a few metadata properties:\n// it will attach a property `\"pointer\"` with the value `true` to\n// selection transactions directly caused by mouse or touch input, and\n// a `\"uiEvent\"` property of that may be `\"paste\"`, `\"cut\"`, or `\"drop\"`.\n\nvar Transaction = /*@__PURE__*/function (Transform) {\n function Transaction(state) {\n Transform.call(this, state.doc); // :: number\n // The timestamp associated with this transaction, in the same\n // format as `Date.now()`.\n\n this.time = Date.now();\n this.curSelection = state.selection; // The step count for which the current selection is valid.\n\n this.curSelectionFor = 0; // :: ?[Mark]\n // The stored marks set by this transaction, if any.\n\n this.storedMarks = state.storedMarks; // Bitfield to track which aspects of the state were updated by\n // this transaction.\n\n this.updated = 0; // Object used to store metadata properties for the transaction.\n\n this.meta = Object.create(null);\n }\n\n if (Transform) Transaction.__proto__ = Transform;\n Transaction.prototype = Object.create(Transform && Transform.prototype);\n Transaction.prototype.constructor = Transaction;\n var prototypeAccessors = {\n selection: {\n configurable: true\n },\n selectionSet: {\n configurable: true\n },\n storedMarksSet: {\n configurable: true\n },\n isGeneric: {\n configurable: true\n },\n scrolledIntoView: {\n configurable: true\n }\n }; // :: Selection\n // The transaction's current selection. This defaults to the editor\n // selection [mapped](#state.Selection.map) through the steps in the\n // transaction, but can be overwritten with\n // [`setSelection`](#state.Transaction.setSelection).\n\n prototypeAccessors.selection.get = function () {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n\n return this.curSelection;\n }; // :: (Selection) → Transaction\n // Update the transaction's current selection. Will determine the\n // selection that the editor gets when the transaction is applied.\n\n\n Transaction.prototype.setSelection = function setSelection(selection) {\n if (selection.$from.doc != this.doc) {\n throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n }\n\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this;\n }; // :: bool\n // Whether the selection was explicitly updated by this transaction.\n\n\n prototypeAccessors.selectionSet.get = function () {\n return (this.updated & UPDATED_SEL) > 0;\n }; // :: (?[Mark]) → Transaction\n // Set the current stored marks.\n\n\n Transaction.prototype.setStoredMarks = function setStoredMarks(marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this;\n }; // :: ([Mark]) → Transaction\n // Make sure the current stored marks or, if that is null, the marks\n // at the selection, match the given set of marks. Does nothing if\n // this is already the case.\n\n\n Transaction.prototype.ensureMarks = function ensureMarks(marks) {\n if (!prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(this.storedMarks || this.selection.$from.marks(), marks)) {\n this.setStoredMarks(marks);\n }\n\n return this;\n }; // :: (Mark) → Transaction\n // Add a mark to the set of stored marks.\n\n\n Transaction.prototype.addStoredMark = function addStoredMark(mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n }; // :: (union) → Transaction\n // Remove a mark or mark type from the set of stored marks.\n\n\n Transaction.prototype.removeStoredMark = function removeStoredMark(mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n }; // :: bool\n // Whether the stored marks were explicitly set for this transaction.\n\n\n prototypeAccessors.storedMarksSet.get = function () {\n return (this.updated & UPDATED_MARKS) > 0;\n };\n\n Transaction.prototype.addStep = function addStep(step, doc) {\n Transform.prototype.addStep.call(this, step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n }; // :: (number) → Transaction\n // Update the timestamp for the transaction.\n\n\n Transaction.prototype.setTime = function setTime(time) {\n this.time = time;\n return this;\n }; // :: (Slice) → Transaction\n // Replace the current selection with the given slice.\n\n\n Transaction.prototype.replaceSelection = function replaceSelection(slice) {\n this.selection.replace(this, slice);\n return this;\n }; // :: (Node, ?bool) → Transaction\n // Replace the selection with the given node. When `inheritMarks` is\n // true and the content is inline, it inherits the marks from the\n // place where it is inserted.\n\n\n Transaction.prototype.replaceSelectionWith = function replaceSelectionWith(node, inheritMarks) {\n var selection = this.selection;\n\n if (inheritMarks !== false) {\n node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to) || prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none));\n }\n\n selection.replaceWith(this, node);\n return this;\n }; // :: () → Transaction\n // Delete the selection.\n\n\n Transaction.prototype.deleteSelection = function deleteSelection() {\n this.selection.replace(this);\n return this;\n }; // :: (string, from: ?number, to: ?number) → Transaction\n // Replace the given range, or the selection if no range is given,\n // with a text node containing the given string.\n\n\n Transaction.prototype.insertText = function insertText(text, from, to) {\n if (to === void 0) to = from;\n var schema = this.doc.type.schema;\n\n if (from == null) {\n if (!text) {\n return this.deleteSelection();\n }\n\n return this.replaceSelectionWith(schema.text(text), true);\n } else {\n if (!text) {\n return this.deleteRange(from, to);\n }\n\n var marks = this.storedMarks;\n\n if (!marks) {\n var $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n\n this.replaceRangeWith(from, to, schema.text(text, marks));\n\n if (!this.selection.empty) {\n this.setSelection(Selection.near(this.selection.$to));\n }\n\n return this;\n }\n }; // :: (union, any) → Transaction\n // Store a metadata property in this transaction, keyed either by\n // name or by plugin.\n\n\n Transaction.prototype.setMeta = function setMeta(key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this;\n }; // :: (union) → any\n // Retrieve a metadata property for a given name or plugin.\n\n\n Transaction.prototype.getMeta = function getMeta(key) {\n return this.meta[typeof key == \"string\" ? key : key.key];\n }; // :: bool\n // Returns true if this transaction doesn't contain any metadata,\n // and can thus safely be extended.\n\n\n prototypeAccessors.isGeneric.get = function () {\n for (var _ in this.meta) {\n return false;\n }\n\n return true;\n }; // :: () → Transaction\n // Indicate that the editor should scroll the selection into view\n // when updated to the state produced by this transaction.\n\n\n Transaction.prototype.scrollIntoView = function scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n };\n\n prototypeAccessors.scrolledIntoView.get = function () {\n return (this.updated & UPDATED_SCROLL) > 0;\n };\n\n Object.defineProperties(Transaction.prototype, prototypeAccessors);\n return Transaction;\n}(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Transform\"]);\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self);\n}\n\nvar FieldDesc = function FieldDesc(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n};\n\nvar baseFields = [new FieldDesc(\"doc\", {\n init: function init(config) {\n return config.doc || config.schema.topNodeType.createAndFill();\n },\n apply: function apply(tr) {\n return tr.doc;\n }\n}), new FieldDesc(\"selection\", {\n init: function init(config, instance) {\n return config.selection || Selection.atStart(instance.doc);\n },\n apply: function apply(tr) {\n return tr.selection;\n }\n}), new FieldDesc(\"storedMarks\", {\n init: function init(config) {\n return config.storedMarks || null;\n },\n apply: function apply(tr, _marks, _old, state) {\n return state.selection.$cursor ? tr.storedMarks : null;\n }\n}), new FieldDesc(\"scrollToSelection\", {\n init: function init() {\n return 0;\n },\n apply: function apply(tr, prev) {\n return tr.scrolledIntoView ? prev + 1 : prev;\n }\n})]; // Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\n\nvar Configuration = function Configuration(schema, plugins) {\n var this$1 = this;\n this.schema = schema;\n this.fields = baseFields.concat();\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n\n if (plugins) {\n plugins.forEach(function (plugin) {\n if (this$1.pluginsByKey[plugin.key]) {\n throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n }\n\n this$1.plugins.push(plugin);\n this$1.pluginsByKey[plugin.key] = plugin;\n\n if (plugin.spec.state) {\n this$1.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n }\n });\n }\n}; // ::- The state of a ProseMirror editor is represented by an object\n// of this type. A state is a persistent data structure—it isn't\n// updated, but rather a new state value is computed from an old one\n// using the [`apply`](#state.EditorState.apply) method.\n//\n// A state holds a number of built-in fields, and plugins can\n// [define](#state.PluginSpec.state) additional fields.\n\n\nvar EditorState = function EditorState(config) {\n this.config = config;\n};\n\nvar prototypeAccessors$1 = {\n schema: {\n configurable: true\n },\n plugins: {\n configurable: true\n },\n tr: {\n configurable: true\n }\n}; // doc:: Node\n// The current document.\n// selection:: Selection\n// The selection.\n// storedMarks:: ?[Mark]\n// A set of marks to apply to the next input. Will be null when\n// no explicit marks have been set.\n// :: Schema\n// The schema of the state's document.\n\nprototypeAccessors$1.schema.get = function () {\n return this.config.schema;\n}; // :: [Plugin]\n// The plugins that are active in this state.\n\n\nprototypeAccessors$1.plugins.get = function () {\n return this.config.plugins;\n}; // :: (Transaction) → EditorState\n// Apply the given transaction to produce a new state.\n\n\nEditorState.prototype.apply = function apply(tr) {\n return this.applyTransaction(tr).state;\n}; // : (Transaction) → bool\n\n\nEditorState.prototype.filterTransaction = function filterTransaction(tr, ignore) {\n if (ignore === void 0) ignore = -1;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n if (i != ignore) {\n var plugin = this.config.plugins[i];\n\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this)) {\n return false;\n }\n }\n }\n\n return true;\n}; // :: (Transaction) → {state: EditorState, transactions: [Transaction]}\n// Verbose variant of [`apply`](#state.EditorState.apply) that\n// returns the precise transactions that were applied (which might\n// be influenced by the [transaction\n// hooks](#state.PluginSpec.filterTransaction) of\n// plugins) along with the new state.\n\n\nEditorState.prototype.applyTransaction = function applyTransaction(rootTr) {\n if (!this.filterTransaction(rootTr)) {\n return {\n state: this,\n transactions: []\n };\n }\n\n var trs = [rootTr],\n newState = this.applyInner(rootTr),\n seen = null; // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n\n for (;;) {\n var haveNew = false;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n var plugin = this.config.plugins[i];\n\n if (plugin.spec.appendTransaction) {\n var n = seen ? seen[i].n : 0,\n oldState = seen ? seen[i].state : this;\n var tr = n < trs.length && plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n\n if (!seen) {\n seen = [];\n\n for (var j = 0; j < this.config.plugins.length; j++) {\n seen.push(j < i ? {\n state: newState,\n n: trs.length\n } : {\n state: this,\n n: 0\n });\n }\n }\n\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n\n if (seen) {\n seen[i] = {\n state: newState,\n n: trs.length\n };\n }\n }\n }\n\n if (!haveNew) {\n return {\n state: newState,\n transactions: trs\n };\n }\n }\n}; // : (Transaction) → EditorState\n\n\nEditorState.prototype.applyInner = function applyInner(tr) {\n if (!tr.before.eq(this.doc)) {\n throw new RangeError(\"Applying a mismatched transaction\");\n }\n\n var newInstance = new EditorState(this.config),\n fields = this.config.fields;\n\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n\n for (var i$1 = 0; i$1 < applyListeners.length; i$1++) {\n applyListeners[i$1](this, tr, newInstance);\n }\n\n return newInstance;\n}; // :: Transaction\n// Start a [transaction](#state.Transaction) from this state.\n\n\nprototypeAccessors$1.tr.get = function () {\n return new Transaction(this);\n}; // :: (Object) → EditorState\n// Create a new state.\n//\n// config::- Configuration options. Must contain `schema` or `doc` (or both).\n//\n// schema:: ?Schema\n// The schema to use.\n//\n// doc:: ?Node\n// The starting document.\n//\n// selection:: ?Selection\n// A valid selection in the document.\n//\n// storedMarks:: ?[Mark]\n// The initial set of [stored marks](#state.EditorState.storedMarks).\n//\n// plugins:: ?[Plugin]\n// The plugins that should be active in this state.\n\n\nEditorState.create = function create(config) {\n var $config = new Configuration(config.schema || config.doc.type.schema, config.plugins);\n var instance = new EditorState($config);\n\n for (var i = 0; i < $config.fields.length; i++) {\n instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n }\n\n return instance;\n}; // :: (Object) → EditorState\n// Create a new state based on this one, but with an adjusted set of\n// active plugins. State fields that exist in both sets of plugins\n// are kept unchanged. Those that no longer exist are dropped, and\n// those that are new are initialized using their\n// [`init`](#state.StateField.init) method, passing in the new\n// configuration object..\n//\n// config::- configuration options\n//\n// schema:: ?Schema\n// New schema to use.\n//\n// plugins:: ?[Plugin]\n// New set of active plugins.\n\n\nEditorState.prototype.reconfigure = function reconfigure(config) {\n var $config = new Configuration(config.schema || this.schema, config.plugins);\n var fields = $config.fields,\n instance = new EditorState($config);\n\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n\n return instance;\n}; // :: (?union, string, number>) → Object\n// Serialize this state to JSON. If you want to serialize the state\n// of plugins, pass an object mapping property names to use in the\n// resulting JSON object to plugin objects. The argument may also be\n// a string or number, in which case it is ignored, to support the\n// way `JSON.stringify` calls `toString` methods.\n\n\nEditorState.prototype.toJSON = function toJSON(pluginFields) {\n var result = {\n doc: this.doc.toJSON(),\n selection: this.selection.toJSON()\n };\n\n if (this.storedMarks) {\n result.storedMarks = this.storedMarks.map(function (m) {\n return m.toJSON();\n });\n }\n\n if (pluginFields && _typeof(pluginFields) == 'object') {\n for (var prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\") {\n throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n }\n\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n\n if (state && state.toJSON) {\n result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n }\n }\n }\n\n return result;\n}; // :: (Object, Object, ?Object) → EditorState\n// Deserialize a JSON representation of a state. `config` should\n// have at least a `schema` field, and should contain array of\n// plugins to initialize the state with. `pluginFields` can be used\n// to deserialize the state of plugins, by associating plugin\n// instances with the property names they use in the JSON object.\n//\n// config::- configuration options\n//\n// schema:: Schema\n// The schema to use.\n//\n// plugins:: ?[Plugin]\n// The set of active plugins.\n\n\nEditorState.fromJSON = function fromJSON(config, json, pluginFields) {\n if (!json) {\n throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n }\n\n if (!config.schema) {\n throw new RangeError(\"Required config field 'schema' missing\");\n }\n\n var $config = new Configuration(config.schema, config.plugins);\n var instance = new EditorState($config);\n $config.fields.forEach(function (field) {\n if (field.name == \"doc\") {\n instance.doc = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].fromJSON(config.schema, json.doc);\n } else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n } else if (field.name == \"storedMarks\") {\n if (json.storedMarks) {\n instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n }\n } else {\n if (pluginFields) {\n for (var prop in pluginFields) {\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n\n if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop)) {\n // This field belongs to a plugin mapped to a JSON field, read it from there.\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return;\n }\n }\n }\n\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance;\n}; // Kludge to allow the view to track mappings between different\n// instances of a state.\n//\n// FIXME this is no longer needed as of prosemirror-view 1.9.0,\n// though due to backwards-compat we should probably keep it around\n// for a while (if only as a no-op)\n\n\nEditorState.addApplyListener = function addApplyListener(f) {\n applyListeners.push(f);\n};\n\nEditorState.removeApplyListener = function removeApplyListener(f) {\n var found = applyListeners.indexOf(f);\n\n if (found > -1) {\n applyListeners.splice(found, 1);\n }\n};\n\nObject.defineProperties(EditorState.prototype, prototypeAccessors$1);\nvar applyListeners = []; // PluginSpec:: interface\n//\n// This is the type passed to the [`Plugin`](#state.Plugin)\n// constructor. It provides a definition for a plugin.\n//\n// props:: ?EditorProps\n// The [view props](#view.EditorProps) added by this plugin. Props\n// that are functions will be bound to have the plugin instance as\n// their `this` binding.\n//\n// state:: ?StateField\n// Allows a plugin to define a [state field](#state.StateField), an\n// extra slot in the state object in which it can keep its own data.\n//\n// key:: ?PluginKey\n// Can be used to make this a keyed plugin. You can have only one\n// plugin with a given key in a given state, but it is possible to\n// access the plugin's configuration and state through the key,\n// without having access to the plugin instance object.\n//\n// view:: ?(EditorView) → Object\n// When the plugin needs to interact with the editor view, or\n// set something up in the DOM, use this field. The function\n// will be called when the plugin's state is associated with an\n// editor view.\n//\n// return::-\n// Should return an object with the following optional\n// properties:\n//\n// update:: ?(view: EditorView, prevState: EditorState)\n// Called whenever the view's state is updated.\n//\n// destroy:: ?()\n// Called when the view is destroyed or receives a state\n// with different plugins.\n//\n// filterTransaction:: ?(Transaction, EditorState) → bool\n// When present, this will be called before a transaction is\n// applied by the state, allowing the plugin to cancel it (by\n// returning false).\n//\n// appendTransaction:: ?(transactions: [Transaction], oldState: EditorState, newState: EditorState) → ?Transaction\n// Allows the plugin to append another transaction to be applied\n// after the given array of transactions. When another plugin\n// appends a transaction after this was called, it is called again\n// with the new state and new transactions—but only the new\n// transactions, i.e. it won't be passed transactions that it\n// already saw.\n\nfunction bindProps(obj, self, target) {\n for (var prop in obj) {\n var val = obj[prop];\n\n if (val instanceof Function) {\n val = val.bind(self);\n } else if (prop == \"handleDOMEvents\") {\n val = bindProps(val, self, {});\n }\n\n target[prop] = val;\n }\n\n return target;\n} // ::- Plugins bundle functionality that can be added to an editor.\n// They are part of the [editor state](#state.EditorState) and\n// may influence that state and the view that contains it.\n\n\nvar Plugin = function Plugin(spec) {\n // :: EditorProps\n // The [props](#view.EditorProps) exported by this plugin.\n this.props = {};\n\n if (spec.props) {\n bindProps(spec.props, this, this.props);\n } // :: Object\n // The plugin's [spec object](#state.PluginSpec).\n\n\n this.spec = spec;\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n}; // :: (EditorState) → any\n// Extract the plugin's state field from an editor state.\n\n\nPlugin.prototype.getState = function getState(state) {\n return state[this.key];\n}; // StateField:: interface\n// A plugin spec may provide a state field (under its\n// [`state`](#state.PluginSpec.state) property) of this type, which\n// describes the state it wants to keep. Functions provided here are\n// always called with the plugin instance as their `this` binding.\n//\n// init:: (config: Object, instance: EditorState) → T\n// Initialize the value of the field. `config` will be the object\n// passed to [`EditorState.create`](#state.EditorState^create). Note\n// that `instance` is a half-initialized state instance, and will\n// not have values for plugin fields initialized after this one.\n//\n// apply:: (tr: Transaction, value: T, oldState: EditorState, newState: EditorState) → T\n// Apply the given transaction to this state field, producing a new\n// field value. Note that the `newState` argument is again a partially\n// constructed state does not yet contain the state from plugins\n// coming after this one.\n//\n// toJSON:: ?(value: T) → *\n// Convert this field to JSON. Optional, can be left off to disable\n// JSON serialization for the field.\n//\n// fromJSON:: ?(config: Object, value: *, state: EditorState) → T\n// Deserialize the JSON representation of this field. Note that the\n// `state` argument is again a half-initialized state.\n\n\nvar keys = Object.create(null);\n\nfunction createKey(name) {\n if (name in keys) {\n return name + \"$\" + ++keys[name];\n }\n\n keys[name] = 0;\n return name + \"$\";\n} // ::- A key is used to [tag](#state.PluginSpec.key)\n// plugins in a way that makes it possible to find them, given an\n// editor state. Assigning a key does mean only one plugin of that\n// type can be active in a state.\n\n\nvar PluginKey = function PluginKey(name) {\n if (name === void 0) name = \"key\";\n this.key = createKey(name);\n}; // :: (EditorState) → ?Plugin\n// Get the active plugin with this key, if any, from an editor\n// state.\n\n\nPluginKey.prototype.get = function get(state) {\n return state.config.pluginsByKey[this.key];\n}; // :: (EditorState) → ?any\n// Get the plugin's state from an editor state.\n\n\nPluginKey.prototype.getState = function getState(state) {\n return state[this.key];\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-state/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-transform/dist/index.es.js": /*!*************************************************************!*\ !*** ./node_modules/prosemirror-transform/dist/index.es.js ***! \*************************************************************/ /*! exports provided: AddMarkStep, MapResult, Mapping, RemoveMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AddMarkStep\", function() { return AddMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MapResult\", function() { return MapResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mapping\", function() { return Mapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RemoveMarkStep\", function() { return RemoveMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceAroundStep\", function() { return ReplaceAroundStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceStep\", function() { return ReplaceStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Step\", function() { return Step; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepMap\", function() { return StepMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepResult\", function() { return StepResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TransformError\", function() { return TransformError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canJoin\", function() { return canJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canSplit\", function() { return canSplit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropPoint\", function() { return dropPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findWrapping\", function() { return findWrapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertPoint\", function() { return insertPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinPoint\", function() { return joinPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftTarget\", function() { return liftTarget; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"replaceStep\", function() { return replaceStep; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\n// Mappable:: interface\n// There are several things that positions can be mapped through.\n// Such objects conform to this interface.\n//\n// map:: (pos: number, assoc: ?number) → number\n// Map a position through this object. When given, `assoc` (should\n// be -1 or 1, defaults to 1) determines with which side the\n// position is associated, which determines in which direction to\n// move when a chunk of content is inserted at the mapped position.\n//\n// mapResult:: (pos: number, assoc: ?number) → MapResult\n// Map a position, and return an object containing additional\n// information about the mapping. The result's `deleted` field tells\n// you whether the position was deleted (completely enclosed in a\n// replaced range) during the mapping. When content on only one side\n// is deleted, the position itself is only considered deleted when\n// `assoc` points in the direction of the deleted content.\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\n\nvar lower16 = 0xffff;\nvar factor16 = Math.pow(2, 16);\n\nfunction makeRecover(index, offset) { return index + offset * factor16 }\nfunction recoverIndex(value) { return value & lower16 }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16 }\n\n// ::- An object representing a mapped position with extra\n// information.\nvar MapResult = function MapResult(pos, deleted, recover) {\n if ( deleted === void 0 ) deleted = false;\n if ( recover === void 0 ) recover = null;\n\n // :: number The mapped version of the position.\n this.pos = pos;\n // :: bool Tells you whether the position was deleted, that is,\n // whether the step removed its surroundings from the document.\n this.deleted = deleted;\n this.recover = recover;\n};\n\n// :: class extends Mappable\n// A map describing the deletions and insertions made by a step, which\n// can be used to find the correspondence between positions in the\n// pre-step version of a document and the same position in the\n// post-step version.\nvar StepMap = function StepMap(ranges, inverted) {\n if ( inverted === void 0 ) inverted = false;\n\n this.ranges = ranges;\n this.inverted = inverted;\n};\n\nStepMap.prototype.recover = function recover (value) {\n var diff = 0, index = recoverIndex(value);\n if (!this.inverted) { for (var i = 0; i < index; i++)\n { diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1]; } }\n return this.ranges[index * 3] + diff + recoverOffset(value)\n};\n\n// : (number, ?number) → MapResult\nStepMap.prototype.mapResult = function mapResult (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, false) };\n\n// : (number, ?number) → number\nStepMap.prototype.map = function map (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, true) };\n\nStepMap.prototype._map = function _map (pos, assoc, simple) {\n var diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) { break }\n var oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n if (pos <= end) {\n var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n var result = start + diff + (side < 0 ? 0 : newSize);\n if (simple) { return result }\n var recover = makeRecover(i / 3, pos - start);\n return new MapResult(result, assoc < 0 ? pos != start : pos != end, recover)\n }\n diff += newSize - oldSize;\n }\n return simple ? pos + diff : new MapResult(pos + diff)\n};\n\nStepMap.prototype.touches = function touches (pos, recover) {\n var diff = 0, index = recoverIndex(recover);\n var oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) { break }\n var oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n if (pos <= end && i == index * 3) { return true }\n diff += this.ranges[i + newIndex] - oldSize;\n }\n return false\n};\n\n// :: ((oldStart: number, oldEnd: number, newStart: number, newEnd: number))\n// Calls the given function on each of the changed ranges included in\n// this map.\nStepMap.prototype.forEach = function forEach (f) {\n var oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n var oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n};\n\n// :: () → StepMap\n// Create an inverted version of this map. The result can be used to\n// map positions in the post-step document to the pre-step document.\nStepMap.prototype.invert = function invert () {\n return new StepMap(this.ranges, !this.inverted)\n};\n\nStepMap.prototype.toString = function toString () {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges)\n};\n\n// :: (n: number) → StepMap\n// Create a map that moves all positions by offset `n` (which may be\n// negative). This can be useful when applying steps meant for a\n// sub-document to a larger document, or vice-versa.\nStepMap.offset = function offset (n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n])\n};\n\nStepMap.empty = new StepMap([]);\n\n// :: class extends Mappable\n// A mapping represents a pipeline of zero or more [step\n// maps](#transform.StepMap). It has special provisions for losslessly\n// handling mapping positions through a series of steps in which some\n// steps are inverted versions of earlier steps. (This comes up when\n// ‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\n// collaboration or history management.)\nvar Mapping = function Mapping(maps, mirror, from, to) {\n // :: [StepMap]\n // The step maps in this mapping.\n this.maps = maps || [];\n // :: number\n // The starting position in the `maps` array, used when `map` or\n // `mapResult` is called.\n this.from = from || 0;\n // :: number\n // The end position in the `maps` array.\n this.to = to == null ? this.maps.length : to;\n this.mirror = mirror;\n};\n\n// :: (?number, ?number) → Mapping\n// Create a mapping that maps only through a part of this one.\nMapping.prototype.slice = function slice (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.maps.length;\n\n return new Mapping(this.maps, this.mirror, from, to)\n};\n\nMapping.prototype.copy = function copy () {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to)\n};\n\n// :: (StepMap, ?number)\n// Add a step map to the end of this mapping. If `mirrors` is\n// given, it should be the index of the step map that is the mirror\n// image of this one.\nMapping.prototype.appendMap = function appendMap (map, mirrors) {\n this.to = this.maps.push(map);\n if (mirrors != null) { this.setMirror(this.maps.length - 1, mirrors); }\n};\n\n// :: (Mapping)\n// Add all the step maps in a given mapping to this one (preserving\n// mirroring information).\nMapping.prototype.appendMapping = function appendMapping (mapping) {\n for (var i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : null);\n }\n};\n\n// :: (number) → ?number\n// Finds the offset of the step map that mirrors the map at the\n// given offset, in this mapping (as per the second argument to\n// `appendMap`).\nMapping.prototype.getMirror = function getMirror (n) {\n if (this.mirror) { for (var i = 0; i < this.mirror.length; i++)\n { if (this.mirror[i] == n) { return this.mirror[i + (i % 2 ? -1 : 1)] } } }\n};\n\nMapping.prototype.setMirror = function setMirror (n, m) {\n if (!this.mirror) { this.mirror = []; }\n this.mirror.push(n, m);\n};\n\n// :: (Mapping)\n// Append the inverse of the given mapping to this one.\nMapping.prototype.appendMappingInverted = function appendMappingInverted (mapping) {\n for (var i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : null);\n }\n};\n\n// :: () → Mapping\n// Create an inverted version of this mapping.\nMapping.prototype.invert = function invert () {\n var inverse = new Mapping;\n inverse.appendMappingInverted(this);\n return inverse\n};\n\n// : (number, ?number) → number\n// Map a position through this mapping.\nMapping.prototype.map = function map (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n\n if (this.mirror) { return this._map(pos, assoc, true) }\n for (var i = this.from; i < this.to; i++)\n { pos = this.maps[i].map(pos, assoc); }\n return pos\n};\n\n// : (number, ?number) → MapResult\n// Map a position through this mapping, returning a mapping\n// result.\nMapping.prototype.mapResult = function mapResult (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, false) };\n\nMapping.prototype._map = function _map (pos, assoc, simple) {\n var deleted = false, recoverables = null;\n\n for (var i = this.from; i < this.to; i++) {\n var map = this.maps[i], rec = recoverables && recoverables[i];\n if (rec != null && map.touches(pos, rec)) {\n pos = map.recover(rec);\n continue\n }\n\n var result = map.mapResult(pos, assoc);\n if (result.recover != null) {\n var corr = this.getMirror(i);\n if (corr != null && corr > i && corr < this.to) {\n if (result.deleted) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue\n } else {\n(recoverables || (recoverables = Object.create(null)))[corr] = result.recover;\n }\n }\n }\n\n if (result.deleted) { deleted = true; }\n pos = result.pos;\n }\n\n return simple ? pos : new MapResult(pos, deleted)\n};\n\nfunction TransformError(message) {\n var err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err\n}\n\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n\n// ::- Abstraction to build up and track an array of\n// [steps](#transform.Step) representing a document transformation.\n//\n// Most transforming methods return the `Transform` object itself, so\n// that they can be chained.\nvar Transform = function Transform(doc) {\n // :: Node\n // The current document (the result of applying the steps in the\n // transform).\n this.doc = doc;\n // :: [Step]\n // The steps in this transform.\n this.steps = [];\n // :: [Node]\n // The documents before each of the steps.\n this.docs = [];\n // :: Mapping\n // A mapping with the maps for each of the steps in this transform.\n this.mapping = new Mapping;\n};\n\nvar prototypeAccessors = { before: { configurable: true },docChanged: { configurable: true } };\n\n// :: Node The starting document.\nprototypeAccessors.before.get = function () { return this.docs.length ? this.docs[0] : this.doc };\n\n// :: (step: Step) → this\n// Apply a new step in this transform, saving the result. Throws an\n// error when the step fails.\nTransform.prototype.step = function step (object) {\n var result = this.maybeStep(object);\n if (result.failed) { throw new TransformError(result.failed) }\n return this\n};\n\n// :: (Step) → StepResult\n// Try to apply a step in this transformation, ignoring it if it\n// fails. Returns the step result.\nTransform.prototype.maybeStep = function maybeStep (step) {\n var result = step.apply(this.doc);\n if (!result.failed) { this.addStep(step, result.doc); }\n return result\n};\n\n// :: bool\n// True when the document has been changed (when there are any\n// steps).\nprototypeAccessors.docChanged.get = function () {\n return this.steps.length > 0\n};\n\nTransform.prototype.addStep = function addStep (step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n};\n\nObject.defineProperties( Transform.prototype, prototypeAccessors );\n\nfunction mustOverride() { throw new Error(\"Override me\") }\n\nvar stepsByID = Object.create(null);\n\n// ::- A step object represents an atomic change. It generally applies\n// only to the document it was created for, since the positions\n// stored in it will only make sense for that document.\n//\n// New steps are defined by creating classes that extend `Step`,\n// overriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\n// methods, and registering your class with a unique\n// JSON-serialization identifier using\n// [`Step.jsonID`](#transform.Step^jsonID).\nvar Step = function Step () {};\n\nStep.prototype.apply = function apply (_doc) { return mustOverride() };\n\n// :: () → StepMap\n// Get the step map that represents the changes made by this step,\n// and which can be used to transform between positions in the old\n// and the new document.\nStep.prototype.getMap = function getMap () { return StepMap.empty };\n\n// :: (doc: Node) → Step\n// Create an inverted version of this step. Needs the document as it\n// was before the step as argument.\nStep.prototype.invert = function invert (_doc) { return mustOverride() };\n\n// :: (mapping: Mappable) → ?Step\n// Map this step through a mappable thing, returning either a\n// version of that step with its positions adjusted, or `null` if\n// the step was entirely deleted by the mapping.\nStep.prototype.map = function map (_mapping) { return mustOverride() };\n\n// :: (other: Step) → ?Step\n// Try to merge this step with another one, to be applied directly\n// after it. Returns the merged step when possible, null if the\n// steps can't be merged.\nStep.prototype.merge = function merge (_other) { return null };\n\n// :: () → Object\n// Create a JSON-serializeable representation of this step. When\n// defining this for a custom subclass, make sure the result object\n// includes the step type's [JSON id](#transform.Step^jsonID) under\n// the `stepType` property.\nStep.prototype.toJSON = function toJSON () { return mustOverride() };\n\n// :: (Schema, Object) → Step\n// Deserialize a step from its JSON representation. Will call\n// through to the step class' own implementation of this method.\nStep.fromJSON = function fromJSON (schema, json) {\n if (!json || !json.stepType) { throw new RangeError(\"Invalid input for Step.fromJSON\") }\n var type = stepsByID[json.stepType];\n if (!type) { throw new RangeError((\"No step type \" + (json.stepType) + \" defined\")) }\n return type.fromJSON(schema, json)\n};\n\n// :: (string, constructor)\n// To be able to serialize steps to JSON, each step needs a string\n// ID to attach to its JSON representation. Use this method to\n// register an ID for your step classes. Try to pick something\n// that's unlikely to clash with steps from other modules.\nStep.jsonID = function jsonID (id, stepClass) {\n if (id in stepsByID) { throw new RangeError(\"Duplicate use of step JSON ID \" + id) }\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass\n};\n\n// ::- The result of [applying](#transform.Step.apply) a step. Contains either a\n// new document or a failure value.\nvar StepResult = function StepResult(doc, failed) {\n // :: ?Node The transformed document.\n this.doc = doc;\n // :: ?string Text providing information about a failed step.\n this.failed = failed;\n};\n\n// :: (Node) → StepResult\n// Create a successful step result.\nStepResult.ok = function ok (doc) { return new StepResult(doc, null) };\n\n// :: (string) → StepResult\n// Create a failed step result.\nStepResult.fail = function fail (message) { return new StepResult(null, message) };\n\n// :: (Node, number, number, Slice) → StepResult\n// Call [`Node.replace`](#model.Node.replace) with the given\n// arguments. Create a successful result if it succeeds, and a\n// failed one if it throws a `ReplaceError`.\nStepResult.fromReplace = function fromReplace (doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice))\n } catch (e) {\n if (e instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceError\"]) { return StepResult.fail(e.message) }\n throw e\n }\n};\n\n// ::- Replace a part of the document with a slice of new content.\nvar ReplaceStep = /*@__PURE__*/(function (Step) {\n function ReplaceStep(from, to, slice, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = !!structure;\n }\n\n if ( Step ) ReplaceStep.__proto__ = Step;\n ReplaceStep.prototype = Object.create( Step && Step.prototype );\n ReplaceStep.prototype.constructor = ReplaceStep;\n\n ReplaceStep.prototype.apply = function apply (doc) {\n if (this.structure && contentBetween(doc, this.from, this.to))\n { return StepResult.fail(\"Structure replace would overwrite content\") }\n return StepResult.fromReplace(doc, this.from, this.to, this.slice)\n };\n\n ReplaceStep.prototype.getMap = function getMap () {\n return new StepMap([this.from, this.to - this.from, this.slice.size])\n };\n\n ReplaceStep.prototype.invert = function invert (doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to))\n };\n\n ReplaceStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted) { return null }\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice)\n };\n\n ReplaceStep.prototype.merge = function merge (other) {\n if (!(other instanceof ReplaceStep) || other.structure != this.structure) { return null }\n\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n var slice = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty\n : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure)\n } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n var slice$1 = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty\n : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice$1, this.structure)\n } else {\n return null\n }\n };\n\n ReplaceStep.prototype.toJSON = function toJSON () {\n var json = {stepType: \"replace\", from: this.from, to: this.to};\n if (this.slice.size) { json.slice = this.slice.toJSON(); }\n if (this.structure) { json.structure = true; }\n return json\n };\n\n ReplaceStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\") }\n return new ReplaceStep(json.from, json.to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), !!json.structure)\n };\n\n return ReplaceStep;\n}(Step));\n\nStep.jsonID(\"replace\", ReplaceStep);\n\n// ::- Replace a part of the document with a slice of content, but\n// preserve a range of the replaced content by moving it into the\n// slice.\nvar ReplaceAroundStep = /*@__PURE__*/(function (Step) {\n function ReplaceAroundStep(from, to, gapFrom, gapTo, slice, insert, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = !!structure;\n }\n\n if ( Step ) ReplaceAroundStep.__proto__ = Step;\n ReplaceAroundStep.prototype = Object.create( Step && Step.prototype );\n ReplaceAroundStep.prototype.constructor = ReplaceAroundStep;\n\n ReplaceAroundStep.prototype.apply = function apply (doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n contentBetween(doc, this.gapTo, this.to)))\n { return StepResult.fail(\"Structure gap-replace would overwrite content\") }\n\n var gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd)\n { return StepResult.fail(\"Gap is not a flat range\") }\n var inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted) { return StepResult.fail(\"Content does not fit in gap\") }\n return StepResult.fromReplace(doc, this.from, this.to, inserted)\n };\n\n ReplaceAroundStep.prototype.getMap = function getMap () {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n this.gapTo, this.to - this.gapTo, this.slice.size - this.insert])\n };\n\n ReplaceAroundStep.prototype.invert = function invert (doc) {\n var gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap,\n this.from + this.insert, this.from + this.insert + gap,\n doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from),\n this.gapFrom - this.from, this.structure)\n };\n\n ReplaceAroundStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n var gapFrom = mapping.map(this.gapFrom, -1), gapTo = mapping.map(this.gapTo, 1);\n if ((from.deleted && to.deleted) || gapFrom < from.pos || gapTo > to.pos) { return null }\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure)\n };\n\n ReplaceAroundStep.prototype.toJSON = function toJSON () {\n var json = {stepType: \"replaceAround\", from: this.from, to: this.to,\n gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert};\n if (this.slice.size) { json.slice = this.slice.toJSON(); }\n if (this.structure) { json.structure = true; }\n return json\n };\n\n ReplaceAroundStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n { throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\") }\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo,\n prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), json.insert, !!json.structure)\n };\n\n return ReplaceAroundStep;\n}(Step));\n\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\n\nfunction contentBetween(doc, from, to) {\n var $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n if (dist > 0) {\n var next = $from.node(depth).maybeChild($from.indexAfter(depth));\n while (dist > 0) {\n if (!next || next.isLeaf) { return true }\n next = next.firstChild;\n dist--;\n }\n }\n return false\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) &&\n (end == node.childCount || node.canReplace(0, end))\n}\n\n// :: (NodeRange) → ?number\n// Try to find a target depth to which the content in the given range\n// can be lifted. Will not go across\n// [isolating](#model.NodeSpec.isolating) parent nodes.\nfunction liftTarget(range) {\n var parent = range.parent;\n var content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n for (var depth = range.depth;; --depth) {\n var node = range.$from.node(depth);\n var index = range.$from.index(depth), endIndex = range.$to.indexAfter(depth);\n if (depth < range.depth && node.canReplace(index, endIndex, content))\n { return depth }\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) { break }\n }\n}\n\n// :: (NodeRange, number) → this\n// Split the content in the given range off from its parent, if there\n// is sibling content before or after it, and move it up the tree to\n// the depth specified by `target`. You'll probably want to use\n// [`liftTarget`](#transform.liftTarget) to compute `target`, to make\n// sure the lift is valid.\nTransform.prototype.lift = function(range, target) {\n var $from = range.$from;\n var $to = range.$to;\n var depth = range.depth;\n\n var gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n var start = gapStart, end = gapEnd;\n\n var before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, openStart = 0;\n for (var d = depth, splitting = false; d > target; d--)\n { if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(d).copy(before));\n openStart++;\n } else {\n start--;\n } }\n var after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, openEnd = 0;\n for (var d$1 = depth, splitting$1 = false; d$1 > target; d$1--)\n { if (splitting$1 || $to.after(d$1 + 1) < $to.end(d$1)) {\n splitting$1 = true;\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($to.node(d$1).copy(after));\n openEnd++;\n } else {\n end++;\n } }\n\n return this.step(new ReplaceAroundStep(start, end, gapStart, gapEnd,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), openStart, openEnd),\n before.size - openStart, true))\n};\n\n// :: (NodeRange, NodeType, ?Object, ?NodeRange) → ?[{type: NodeType, attrs: ?Object}]\n// Try to find a valid way to wrap the content in the given range in a\n// node of the given type. May introduce extra nodes around and inside\n// the wrapper node, if necessary. Returns null if no valid wrapping\n// could be found. When `innerRange` is given, that range's content is\n// used as the content to fit into the wrapping, instead of the\n// content of `range`.\nfunction findWrapping(range, nodeType, attrs, innerRange) {\n if ( innerRange === void 0 ) innerRange = range;\n\n var around = findWrappingOutside(range, nodeType);\n var inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner) { return null }\n return around.map(withAttrs).concat({type: nodeType, attrs: attrs}).concat(inner.map(withAttrs))\n}\n\nfunction withAttrs(type) { return {type: type, attrs: null} }\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around) { return null }\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null\n}\n\nfunction findWrappingInside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n if (!inside) { return null }\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n for (var i = startIndex; innerMatch && i < endIndex; i++)\n { innerMatch = innerMatch.matchType(parent.child(i).type); }\n if (!innerMatch || !innerMatch.validEnd) { return null }\n return inside\n}\n\n// :: (NodeRange, [{type: NodeType, attrs: ?Object}]) → this\n// Wrap the given [range](#model.NodeRange) in the given set of wrappers.\n// The wrappers are assumed to be valid in this position, and should\n// probably be computed with [`findWrapping`](#transform.findWrapping).\nTransform.prototype.wrap = function(range, wrappers) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n for (var i = wrappers.length - 1; i >= 0; i--)\n { content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content)); }\n\n var start = range.start, end = range.end;\n return this.step(new ReplaceAroundStep(start, end, start, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, 0, 0), wrappers.length, true))\n};\n\n// :: (number, ?number, NodeType, ?Object) → this\n// Set the type of all textblocks (partly) between `from` and `to` to\n// the given node type with the given attributes.\nTransform.prototype.setBlockType = function(from, to, type, attrs) {\n var this$1 = this;\n if ( to === void 0 ) to = from;\n\n if (!type.isTextblock) { throw new RangeError(\"Type given to setBlockType should be a textblock\") }\n var mapFrom = this.steps.length;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (node.isTextblock && !node.hasMarkup(type, attrs) && canChangeType(this$1.doc, this$1.mapping.slice(mapFrom).map(pos), type)) {\n // Ensure all markup that isn't allowed in the new node type is cleared\n this$1.clearIncompatible(this$1.mapping.slice(mapFrom).map(pos, 1), type);\n var mapping = this$1.mapping.slice(mapFrom);\n var startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n this$1.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(type.create(attrs, null, node.marks)), 0, 0), 1, true));\n return false\n }\n });\n return this\n};\n\nfunction canChangeType(doc, pos, type) {\n var $pos = doc.resolve(pos), index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type)\n}\n\n// :: (number, ?NodeType, ?Object, ?[Mark]) → this\n// Change the type, attributes, and/or marks of the node at `pos`.\n// When `type` isn't given, the existing node type is preserved,\nTransform.prototype.setNodeMarkup = function(pos, type, attrs, marks) {\n var node = this.doc.nodeAt(pos);\n if (!node) { throw new RangeError(\"No node at given position\") }\n if (!type) { type = node.type; }\n var newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf)\n { return this.replaceWith(pos, pos + node.nodeSize, newNode) }\n\n if (!type.validContent(node.content))\n { throw new RangeError(\"Invalid content for node type \" + type.name) }\n\n return this.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(newNode), 0, 0), 1, true))\n};\n\n// :: (Node, number, number, ?[?{type: NodeType, attrs: ?Object}]) → bool\n// Check whether splitting at the given position is allowed.\nfunction canSplit(doc, pos, depth, typesAfter) {\n if ( depth === void 0 ) depth = 1;\n\n var $pos = doc.resolve(pos), base = $pos.depth - depth;\n var innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating ||\n !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n { return false }\n for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n var node = $pos.node(d), index$1 = $pos.index(d);\n if (node.type.spec.isolating) { return false }\n var rest = node.content.cutByIndex(index$1, node.childCount);\n var after = (typesAfter && typesAfter[i]) || node;\n if (after != node) { rest = rest.replaceChild(0, after.type.create(after.attrs)); }\n if (!node.canReplace(index$1 + 1, node.childCount) || !after.type.validContent(rest))\n { return false }\n }\n var index = $pos.indexAfter(base);\n var baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type)\n}\n\n// :: (number, ?number, ?[?{type: NodeType, attrs: ?Object}]) → this\n// Split the node at the given position, and optionally, if `depth` is\n// greater than one, any number of nodes above that. By default, the\n// parts split off will inherit the node type of the original node.\n// This can be changed by passing an array of types and attributes to\n// use after the split.\nTransform.prototype.split = function(pos, depth, typesAfter) {\n if ( depth === void 0 ) depth = 1;\n\n var $pos = this.doc.resolve(pos), before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($pos.node(d).copy(before));\n var typeAfter = typesAfter && typesAfter[i];\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n return this.step(new ReplaceStep(pos, pos, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), depth, depth), true))\n};\n\n// :: (Node, number) → bool\n// Test whether the blocks before and after a given position can be\n// joined.\nfunction canJoin(doc, pos) {\n var $pos = doc.resolve(pos), index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n $pos.parent.canReplace(index, index + 1)\n}\n\nfunction joinable(a, b) {\n return a && b && !a.isLeaf && a.canAppend(b)\n}\n\n// :: (Node, number, ?number) → ?number\n// Find an ancestor of the given position that can be joined to the\n// block before (or after if `dir` is positive). Returns the joinable\n// point, if any.\nfunction joinPoint(doc, pos, dir) {\n if ( dir === void 0 ) dir = -1;\n\n var $pos = doc.resolve(pos);\n for (var d = $pos.depth;; d--) {\n var before = (void 0), after = (void 0), index = $pos.index(d);\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n } else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n } else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n if (before && !before.isTextblock && joinable(before, after) &&\n $pos.node(d).canReplace(index, index + 1)) { return pos }\n if (d == 0) { break }\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\n\n// :: (number, ?number) → this\n// Join the blocks around the given position. If depth is 2, their\n// last and first siblings are also joined, and so on.\nTransform.prototype.join = function(pos, depth) {\n if ( depth === void 0 ) depth = 1;\n\n var step = new ReplaceStep(pos - depth, pos + depth, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty, true);\n return this.step(step)\n};\n\n// :: (Node, number, NodeType) → ?number\n// Try to find a point where a node of the given type can be inserted\n// near `pos`, by searching up the node hierarchy when `pos` itself\n// isn't a valid place but is at the start or end of a node. Return\n// null if no position was found.\nfunction insertPoint(doc, pos, nodeType) {\n var $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) { return pos }\n\n if ($pos.parentOffset == 0)\n { for (var d = $pos.depth - 1; d >= 0; d--) {\n var index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType)) { return $pos.before(d + 1) }\n if (index > 0) { return null }\n } }\n if ($pos.parentOffset == $pos.parent.content.size)\n { for (var d$1 = $pos.depth - 1; d$1 >= 0; d$1--) {\n var index$1 = $pos.indexAfter(d$1);\n if ($pos.node(d$1).canReplaceWith(index$1, index$1, nodeType)) { return $pos.after(d$1 + 1) }\n if (index$1 < $pos.node(d$1).childCount) { return null }\n } }\n}\n\n// :: (Node, number, Slice) → ?number\n// Finds a position at or around the given position where the given\n// slice can be inserted. Will look at parent nodes' nearest boundary\n// and try there, even if the original position wasn't directly at the\n// start or end of that node. Returns null when no position was found.\nfunction dropPoint(doc, pos, slice) {\n var $pos = doc.resolve(pos);\n if (!slice.content.size) { return pos }\n var content = slice.content;\n for (var i = 0; i < slice.openStart; i++) { content = content.firstChild.content; }\n for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (var d = $pos.depth; d >= 0; d--) {\n var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n if (pass == 1\n ? $pos.node(d).canReplace(insertPos, insertPos, content)\n : $pos.node(d).contentMatchAt(insertPos).findWrapping(content.firstChild.type))\n { return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1) }\n }\n }\n return null\n}\n\nfunction mapFragment(fragment, f, parent) {\n var mapped = [];\n for (var i = 0; i < fragment.childCount; i++) {\n var child = fragment.child(i);\n if (child.content.size) { child = child.copy(mapFragment(child.content, f, child)); }\n if (child.isInline) { child = f(child, parent, i); }\n mapped.push(child);\n }\n return prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].fromArray(mapped)\n}\n\n// ::- Add a mark to all inline content between two positions.\nvar AddMarkStep = /*@__PURE__*/(function (Step) {\n function AddMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if ( Step ) AddMarkStep.__proto__ = Step;\n AddMarkStep.prototype = Object.create( Step && Step.prototype );\n AddMarkStep.prototype.constructor = AddMarkStep;\n\n AddMarkStep.prototype.apply = function apply (doc) {\n var this$1 = this;\n\n var oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n var parent = $from.node($from.sharedDepth(this.to));\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node, parent) {\n if (!parent.type.allowsMarkType(this$1.mark.type)) { return node }\n return node.mark(this$1.mark.addToSet(node.marks))\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice)\n };\n\n AddMarkStep.prototype.invert = function invert () {\n return new RemoveMarkStep(this.from, this.to, this.mark)\n };\n\n AddMarkStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) { return null }\n return new AddMarkStep(from.pos, to.pos, this.mark)\n };\n\n AddMarkStep.prototype.merge = function merge (other) {\n if (other instanceof AddMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n { return new AddMarkStep(Math.min(this.from, other.from),\n Math.max(this.to, other.to), this.mark) }\n };\n\n AddMarkStep.prototype.toJSON = function toJSON () {\n return {stepType: \"addMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to}\n };\n\n AddMarkStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\") }\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark))\n };\n\n return AddMarkStep;\n}(Step));\n\nStep.jsonID(\"addMark\", AddMarkStep);\n\n// ::- Remove a mark from all inline content between two positions.\nvar RemoveMarkStep = /*@__PURE__*/(function (Step) {\n function RemoveMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if ( Step ) RemoveMarkStep.__proto__ = Step;\n RemoveMarkStep.prototype = Object.create( Step && Step.prototype );\n RemoveMarkStep.prototype.constructor = RemoveMarkStep;\n\n RemoveMarkStep.prototype.apply = function apply (doc) {\n var this$1 = this;\n\n var oldSlice = doc.slice(this.from, this.to);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node) {\n return node.mark(this$1.mark.removeFromSet(node.marks))\n }), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice)\n };\n\n RemoveMarkStep.prototype.invert = function invert () {\n return new AddMarkStep(this.from, this.to, this.mark)\n };\n\n RemoveMarkStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) { return null }\n return new RemoveMarkStep(from.pos, to.pos, this.mark)\n };\n\n RemoveMarkStep.prototype.merge = function merge (other) {\n if (other instanceof RemoveMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n { return new RemoveMarkStep(Math.min(this.from, other.from),\n Math.max(this.to, other.to), this.mark) }\n };\n\n RemoveMarkStep.prototype.toJSON = function toJSON () {\n return {stepType: \"removeMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to}\n };\n\n RemoveMarkStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\") }\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark))\n };\n\n return RemoveMarkStep;\n}(Step));\n\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n\n// :: (number, number, Mark) → this\n// Add the given mark to the inline content between `from` and `to`.\nTransform.prototype.addMark = function(from, to, mark) {\n var this$1 = this;\n\n var removed = [], added = [], removing = null, adding = null;\n this.doc.nodesBetween(from, to, function (node, pos, parent) {\n if (!node.isInline) { return }\n var marks = node.marks;\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n var start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n var newSet = mark.addToSet(marks);\n\n for (var i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i]))\n { removing.to = end; }\n else\n { removed.push(removing = new RemoveMarkStep(start, end, marks[i])); }\n }\n }\n\n if (adding && adding.to == start)\n { adding.to = end; }\n else\n { added.push(adding = new AddMarkStep(start, end, mark)); }\n }\n });\n\n removed.forEach(function (s) { return this$1.step(s); });\n added.forEach(function (s) { return this$1.step(s); });\n return this\n};\n\n// :: (number, number, ?union) → this\n// Remove marks from inline nodes between `from` and `to`. When `mark`\n// is a single mark, remove precisely that mark. When it is a mark type,\n// remove all marks of that type. When it is null, remove all marks of\n// any type.\nTransform.prototype.removeMark = function(from, to, mark) {\n var this$1 = this;\n if ( mark === void 0 ) mark = null;\n\n var matched = [], step = 0;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (!node.isInline) { return }\n step++;\n var toRemove = null;\n if (mark instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"MarkType\"]) {\n var found = mark.isInSet(node.marks);\n if (found) { toRemove = [found]; }\n } else if (mark) {\n if (mark.isInSet(node.marks)) { toRemove = [mark]; }\n } else {\n toRemove = node.marks;\n }\n if (toRemove && toRemove.length) {\n var end = Math.min(pos + node.nodeSize, to);\n for (var i = 0; i < toRemove.length; i++) {\n var style = toRemove[i], found$1 = (void 0);\n for (var j = 0; j < matched.length; j++) {\n var m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style)) { found$1 = m; }\n }\n if (found$1) {\n found$1.to = end;\n found$1.step = step;\n } else {\n matched.push({style: style, from: Math.max(pos, from), to: end, step: step});\n }\n }\n }\n });\n matched.forEach(function (m) { return this$1.step(new RemoveMarkStep(m.from, m.to, m.style)); });\n return this\n};\n\n// :: (number, NodeType, ?ContentMatch) → this\n// Removes all marks and nodes from the content of the node at `pos`\n// that don't match the given new parent node type. Accepts an\n// optional starting [content match](#model.ContentMatch) as third\n// argument.\nTransform.prototype.clearIncompatible = function(pos, parentType, match) {\n if ( match === void 0 ) match = parentType.contentMatch;\n\n var node = this.doc.nodeAt(pos);\n var delSteps = [], cur = pos + 1;\n for (var i = 0; i < node.childCount; i++) {\n var child = node.child(i), end = cur + child.nodeSize;\n var allowed = match.matchType(child.type, child.attrs);\n if (!allowed) {\n delSteps.push(new ReplaceStep(cur, end, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty));\n } else {\n match = allowed;\n for (var j = 0; j < child.marks.length; j++) { if (!parentType.allowsMarkType(child.marks[j].type))\n { this.step(new RemoveMarkStep(cur, end, child.marks[j])); } }\n }\n cur = end;\n }\n if (!match.validEnd) {\n var fill = match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n this.replace(cur, cur, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fill, 0, 0));\n }\n for (var i$1 = delSteps.length - 1; i$1 >= 0; i$1--) { this.step(delSteps[i$1]); }\n return this\n};\n\n// :: (Node, number, ?number, ?Slice) → ?Step\n// ‘Fit’ a slice into a given position in the document, producing a\n// [step](#transform.Step) that inserts it. Will return null if\n// there's no meaningful way to insert the slice here, or inserting it\n// would be a no-op (an empty slice over an empty range).\nfunction replaceStep(doc, from, to, slice) {\n if ( to === void 0 ) to = from;\n if ( slice === void 0 ) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n if (from == to && !slice.size) { return null }\n\n var $from = doc.resolve(from), $to = doc.resolve(to);\n // Optimization -- avoid work if it's obvious that it's not needed.\n if (fitsTrivially($from, $to, slice)) { return new ReplaceStep(from, to, slice) }\n var placed = placeSlice($from, slice);\n\n var fittedLeft = fitLeft($from, placed);\n var fitted = fitRight($from, $to, fittedLeft);\n if (!fitted) { return null }\n if (fittedLeft.size != fitted.size && canMoveText($from, $to, fittedLeft)) {\n var d = $to.depth, after = $to.after(d);\n while (d > 1 && after == $to.end(--d)) { ++after; }\n var fittedAfter = fitRight($from, doc.resolve(after), fittedLeft);\n if (fittedAfter)\n { return new ReplaceAroundStep(from, after, to, $to.end(), fittedAfter, fittedLeft.size) }\n }\n return fitted.size || from != to ? new ReplaceStep(from, to, fitted) : null\n}\n\n// :: (number, ?number, ?Slice) → this\n// Replace the part of the document between `from` and `to` with the\n// given `slice`.\nTransform.prototype.replace = function(from, to, slice) {\n if ( to === void 0 ) to = from;\n if ( slice === void 0 ) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n var step = replaceStep(this.doc, from, to, slice);\n if (step) { this.step(step); }\n return this\n};\n\n// :: (number, number, union) → this\n// Replace the given range with the given content, which may be a\n// fragment, node, or array of nodes.\nTransform.prototype.replaceWith = function(from, to, content) {\n return this.replace(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(content), 0, 0))\n};\n\n// :: (number, number) → this\n// Delete the content between the given positions.\nTransform.prototype.delete = function(from, to) {\n return this.replace(from, to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty)\n};\n\n// :: (number, union) → this\n// Insert the given content at the given position.\nTransform.prototype.insert = function(pos, content) {\n return this.replaceWith(pos, pos, content)\n};\n\n\n\nfunction fitLeftInner($from, depth, placed, placedBelow) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, openEnd = 0, placedHere = placed[depth];\n if ($from.depth > depth) {\n var inner = fitLeftInner($from, depth + 1, placed, placedBelow || placedHere);\n openEnd = inner.openEnd + 1;\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(depth + 1).copy(inner.content));\n }\n\n if (placedHere) {\n content = content.append(placedHere.content);\n openEnd = placedHere.openEnd;\n }\n if (placedBelow) {\n content = content.append($from.node(depth).contentMatchAt($from.indexAfter(depth)).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n openEnd = 0;\n }\n\n return {content: content, openEnd: openEnd}\n}\n\nfunction fitLeft($from, placed) {\n var ref = fitLeftInner($from, 0, placed, false);\n var content = ref.content;\n var openEnd = ref.openEnd;\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, $from.depth, openEnd || 0)\n}\n\nfunction fitRightJoin(content, parent, $from, $to, depth, openStart, openEnd) {\n var match, count = content.childCount, matchCount = count - (openEnd > 0 ? 1 : 0);\n var parentNode = openStart < 0 ? parent : $from.node(depth);\n if (openStart < 0)\n { match = parentNode.contentMatchAt(matchCount); }\n else if (count == 1 && openEnd > 0)\n { match = parentNode.contentMatchAt(openStart ? $from.index(depth) : $from.indexAfter(depth)); }\n else\n { match = parentNode.contentMatchAt($from.indexAfter(depth))\n .matchFragment(content, count > 0 && openStart ? 1 : 0, matchCount); }\n\n var toNode = $to.node(depth);\n if (openEnd > 0 && depth < $to.depth) {\n var after = toNode.content.cutByIndex($to.indexAfter(depth)).addToStart(content.lastChild);\n var joinable$1 = match.fillBefore(after, true);\n // Can't insert content if there's a single node stretched across this gap\n if (joinable$1 && joinable$1.size && openStart > 0 && count == 1) { joinable$1 = null; }\n\n if (joinable$1) {\n var inner = fitRightJoin(content.lastChild.content, content.lastChild, $from, $to,\n depth + 1, count == 1 ? openStart - 1 : -1, openEnd - 1);\n if (inner) {\n var last = content.lastChild.copy(inner);\n if (joinable$1.size)\n { return content.cutByIndex(0, count - 1).append(joinable$1).addToEnd(last) }\n else\n { return content.replaceChild(count - 1, last) }\n }\n }\n }\n if (openEnd > 0)\n { match = match.matchType((count == 1 && openStart > 0 ? $from.node(depth + 1) : content.lastChild).type); }\n\n // If we're here, the next level can't be joined, so we see what\n // happens if we leave it open.\n var toIndex = $to.index(depth);\n if (toIndex == toNode.childCount && !toNode.type.compatibleContent(parent.type)) { return null }\n var joinable = match.fillBefore(toNode.content, true, toIndex);\n for (var i = toIndex; joinable && i < toNode.content.childCount; i++)\n { if (!parentNode.type.allowsMarks(toNode.content.child(i).marks)) { joinable = null; } }\n if (!joinable) { return null }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1,\n count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n content = content.append(joinable);\n if ($to.depth > depth)\n { content = content.addToEnd(fitRightSeparate($to, depth + 1)); }\n return content\n}\n\nfunction fitRightClosed(node, openEnd, $from, depth, openStart) {\n var match, content = node.content, count = content.childCount;\n if (openStart >= 0)\n { match = $from.node(depth).contentMatchAt($from.indexAfter(depth))\n .matchFragment(content, openStart > 0 ? 1 : 0, count); }\n else\n { match = node.contentMatchAt(count); }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1,\n count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n\n return node.copy(content.append(match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true)))\n}\n\nfunction fitRightSeparate($to, depth) {\n var node = $to.node(depth);\n var fill = node.contentMatchAt(0).fillBefore(node.content, true, $to.index(depth));\n if ($to.depth > depth) { fill = fill.addToEnd(fitRightSeparate($to, depth + 1)); }\n return node.copy(fill)\n}\n\nfunction normalizeSlice(content, openStart, openEnd) {\n while (openStart > 0 && openEnd > 0 && content.childCount == 1) {\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, openStart, openEnd)\n}\n\n// : (ResolvedPos, ResolvedPos, number, Slice) → Slice\nfunction fitRight($from, $to, slice) {\n var fitted = fitRightJoin(slice.content, $from.node(0), $from, $to, 0, slice.openStart, slice.openEnd);\n if (!fitted) { return null }\n return normalizeSlice(fitted, slice.openStart, $to.depth)\n}\n\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n $from.parent.canReplace($from.index(), $to.index(), slice.content)\n}\n\nfunction canMoveText($from, $to, slice) {\n if (!$to.parent.isTextblock) { return false }\n\n var parent = slice.openEnd ? nodeRight(slice.content, slice.openEnd)\n : $from.node($from.depth - (slice.openStart - slice.openEnd));\n if (!parent.isTextblock) { return false }\n for (var i = $to.index(); i < $to.parent.childCount; i++)\n { if (!parent.type.allowsMarks($to.parent.child(i).marks)) { return false } }\n var match;\n if (slice.openEnd) {\n match = parent.contentMatchAt(parent.childCount);\n } else {\n match = parent.contentMatchAt(parent.childCount);\n if (slice.size) { match = match.matchFragment(slice.content, slice.openStart ? 1 : 0); }\n }\n match = match.matchFragment($to.parent.content, $to.index());\n return match && match.validEnd\n}\n\nfunction nodeRight(content, depth) {\n for (var i = 1; i < depth; i++) { content = content.lastChild.content; }\n return content.lastChild\n}\n\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// So placeSlice splits up a slice into a number of sub-slices,\n// along with information on where they can be placed on the given\n// left-side edge. It works by walking the open side of the slice,\n// from the inside out, and trying to find a landing spot for each\n// element, by simultaneously scanning over the gap side. When no\n// place is found for an open node's content, it is left in that node.\n\n// : (ResolvedPos, Slice) → [{content: Fragment, openEnd: number, depth: number}]\nfunction placeSlice($from, slice) {\n var frontier = new Frontier($from);\n for (var pass = 1; slice.size && pass <= 3; pass++) {\n var value = frontier.placeSlice(slice.content, slice.openStart, slice.openEnd, pass);\n if (pass == 3 && value != slice && value.size) { pass = 0; } // Restart if the 3rd pass made progress but left content\n slice = value;\n }\n while (frontier.open.length) { frontier.closeNode(); }\n return frontier.placed\n}\n\n// Helper class that models the open side of the insert position,\n// keeping track of the content match and already inserted content\n// at each depth.\nvar Frontier = function Frontier($pos) {\n // : [{parent: Node, match: ContentMatch, content: Fragment, wrapper: bool, openEnd: number, depth: number}]\n this.open = [];\n for (var d = 0; d <= $pos.depth; d++) {\n var parent = $pos.node(d), match = parent.contentMatchAt($pos.indexAfter(d));\n this.open.push({parent: parent, match: match, content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, wrapper: false, openEnd: 0, depth: d});\n }\n this.placed = [];\n};\n\n// : (Fragment, number, number, number, ?Node) → Slice\n// Tries to place the content of the given slice, and returns a\n// slice containing unplaced content.\n//\n// pass 1: try to fit directly\n// pass 2: allow wrapper nodes to be introduced\n// pass 3: allow unwrapping of nodes that aren't open\nFrontier.prototype.placeSlice = function placeSlice (fragment, openStart, openEnd, pass, parent) {\n if (openStart > 0) {\n var first = fragment.firstChild;\n var inner = this.placeSlice(first.content, Math.max(0, openStart - 1),\n openEnd && fragment.childCount == 1 ? openEnd - 1 : 0,\n pass, first);\n if (inner.content != first.content) {\n if (inner.content.size) {\n fragment = fragment.replaceChild(0, first.copy(inner.content));\n openStart = inner.openStart + 1;\n } else {\n if (fragment.childCount == 1) { openEnd = 0; }\n fragment = fragment.cutByIndex(1);\n openStart = 0;\n }\n }\n }\n var result = this.placeContent(fragment, openStart, openEnd, pass, parent);\n if (pass > 2 && result.size && openStart == 0) {\n var child = result.content.firstChild, single = result.content.childCount == 1;\n this.placeContent(child.content, 0, openEnd && single ? openEnd - 1 : 0, pass, child);\n result = single ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](result.content.cutByIndex(1), 0, openEnd);\n }\n return result\n};\n\nFrontier.prototype.placeContent = function placeContent (fragment, openStart, openEnd, pass, parent) {\n var i = 0;\n // Go over the fragment's children\n for (; i < fragment.childCount; i++) {\n var child = fragment.child(i), placed = false, last = i == fragment.childCount - 1;\n // Try each open node in turn, starting from the innermost\n for (var d = this.open.length - 1; d >= 0; d--) {\n var open = this.open[d], wrap = (void 0);\n\n // If pass > 1, it is allowed to wrap the node to help find a\n // fit, so if findWrapping returns something, we add open\n // nodes to the frontier for that wrapping.\n if (pass > 1 && (wrap = open.match.findWrapping(child.type)) &&\n !(parent && wrap.length && wrap[wrap.length - 1] == parent.type)) {\n while (this.open.length - 1 > d) { this.closeNode(); }\n for (var w = 0; w < wrap.length; w++) {\n open.match = open.match.matchType(wrap[w]);\n d++;\n open = {parent: wrap[w].create(),\n match: wrap[w].contentMatch,\n content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, wrapper: true, openEnd: 0, depth: d + w};\n this.open.push(open);\n }\n }\n\n // See if the child fits here\n var match = open.match.matchType(child.type);\n if (!match) {\n var fill = open.match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(child));\n if (fill) {\n for (var j = 0; j < fill.childCount; j++) {\n var ch = fill.child(j);\n this.addNode(open, ch, 0);\n match = open.match.matchFragment(ch);\n }\n } else if (parent && open.match.matchType(parent.type)) {\n // Don't continue looking further up if the parent node\n // would fit here.\n break\n } else {\n continue\n }\n }\n\n // Close open nodes above this one, since we're starting to\n // add to this.\n while (this.open.length - 1 > d) { this.closeNode(); }\n // Strip marks from the child or close its start when necessary\n child = child.mark(open.parent.type.allowedMarks(child.marks));\n if (openStart) {\n child = closeNodeStart(child, openStart, last ? openEnd : 0);\n openStart = 0;\n }\n // Add the child to this open node and adjust its metadata\n this.addNode(open, child, last ? openEnd : 0);\n open.match = match;\n if (last) { openEnd = 0; }\n placed = true;\n break\n }\n // As soon as we've failed to place a node we stop looking at\n // later nodes\n if (!placed) { break }\n }\n // Close the current open node if it's not the the root and we\n // either placed up to the end of the node or the the current\n // slice depth's node type matches the open node's type\n if (this.open.length > 1 &&\n (i > 0 && i == fragment.childCount ||\n parent && this.open[this.open.length - 1].parent.type == parent.type))\n { this.closeNode(); }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fragment.cutByIndex(i), openStart, openEnd)\n};\n\nFrontier.prototype.addNode = function addNode (open, node, openEnd) {\n open.content = closeFragmentEnd(open.content, open.openEnd).addToEnd(node);\n open.openEnd = openEnd;\n};\n\nFrontier.prototype.closeNode = function closeNode () {\n var open = this.open.pop();\n if (open.content.size == 0) ; else if (open.wrapper) {\n this.addNode(this.open[this.open.length - 1], open.parent.copy(open.content), open.openEnd + 1);\n } else {\n this.placed[open.depth] = {depth: open.depth, content: open.content, openEnd: open.openEnd};\n }\n};\n\nfunction closeNodeStart(node, openStart, openEnd) {\n var content = node.content;\n if (openStart > 1) {\n var first = closeNodeStart(node.firstChild, openStart - 1, node.childCount == 1 ? openEnd - 1 : 0);\n content = node.content.replaceChild(0, first);\n }\n var fill = node.type.contentMatch.fillBefore(content, openEnd == 0);\n return node.copy(fill.append(content))\n}\n\nfunction closeNodeEnd(node, depth) {\n var content = node.content;\n if (depth > 1) {\n var last = closeNodeEnd(node.lastChild, depth - 1);\n content = node.content.replaceChild(node.childCount - 1, last);\n }\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n return node.copy(content.append(fill))\n}\n\nfunction closeFragmentEnd(fragment, depth) {\n return depth ? fragment.replaceChild(fragment.childCount - 1, closeNodeEnd(fragment.lastChild, depth)) : fragment\n}\n\n// :: (number, number, Slice) → this\n// Replace a range of the document with a given slice, using `from`,\n// `to`, and the slice's [`openStart`](#model.Slice.openStart) property\n// as hints, rather than fixed start and end points. This method may\n// grow the replaced area or close open nodes in the slice in order to\n// get a fit that is more in line with WYSIWYG expectations, by\n// dropping fully covered parent nodes of the replaced region when\n// they are marked [non-defining](#model.NodeSpec.defining), or\n// including an open parent node from the slice that _is_ marked as\n// [defining](#model.NodeSpec.defining).\n//\n// This is the method, for example, to handle paste. The similar\n// [`replace`](#transform.Transform.replace) method is a more\n// primitive tool which will _not_ move the start and end of its given\n// range, and is useful in situations where you need more precise\n// control over what happens.\nTransform.prototype.replaceRange = function(from, to, slice) {\n if (!slice.size) { return this.deleteRange(from, to) }\n\n var $from = this.doc.resolve(from), $to = this.doc.resolve(to);\n if (fitsTrivially($from, $to, slice))\n { return this.step(new ReplaceStep(from, to, slice)) }\n\n var targetDepths = coveredDepths($from, this.doc.resolve(to));\n // Can't replace the whole document, so remove 0 if it's present\n if (targetDepths[targetDepths.length - 1] == 0) { targetDepths.pop(); }\n // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n var preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget);\n // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n var spec = $from.node(d).type.spec;\n if (spec.defining || spec.isolating) { break }\n if (targetDepths.indexOf(d) > -1) { preferredTarget = d; }\n else if ($from.before(d) == pos) { targetDepths.splice(1, 0, -d); }\n }\n // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n var preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n\n var leftNodes = [], preferredDepth = slice.openStart;\n for (var content = slice.content, i = 0;; i++) {\n var node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart) { break }\n content = node.content;\n }\n // Back up if the node directly above openStart, or the node above\n // that separated only by a non-defining textblock node, is defining.\n if (preferredDepth > 0 && leftNodes[preferredDepth - 1].type.spec.defining &&\n $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 1].type)\n { preferredDepth -= 1; }\n else if (preferredDepth >= 2 && leftNodes[preferredDepth - 1].isTextblock && leftNodes[preferredDepth - 2].type.spec.defining &&\n $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 2].type)\n { preferredDepth -= 2; }\n\n for (var j = slice.openStart; j >= 0; j--) {\n var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n var insert = leftNodes[openDepth];\n if (!insert) { continue }\n for (var i$1 = 0; i$1 < targetDepths.length; i$1++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n var targetDepth = targetDepths[(i$1 + preferredTargetIndex) % targetDepths.length], expand = true;\n if (targetDepth < 0) { expand = false; targetDepth = -targetDepth; }\n var parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n { return this.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to,\n new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](closeFragment(slice.content, 0, slice.openStart, openDepth),\n openDepth, slice.openEnd)) }\n }\n }\n\n var startSteps = this.steps.length;\n for (var i$2 = targetDepths.length - 1; i$2 >= 0; i$2--) {\n this.replace(from, to, slice);\n if (this.steps.length > startSteps) { break }\n var depth = targetDepths[i$2];\n if (i$2 < 0) { continue }\n from = $from.before(depth); to = $to.after(depth);\n }\n return this\n};\n\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n var first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n if (depth > newOpen) {\n var match = parent.contentMatchAt(0);\n var start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n }\n return fragment\n}\n\n// :: (number, number, Node) → this\n// Replace the given range with a node, but use `from` and `to` as\n// hints, rather than precise positions. When from and to are the same\n// and are at the start or end of a parent node in which the given\n// node doesn't fit, this method may _move_ them out towards a parent\n// that does allow the given node to be placed. When the given range\n// completely covers a parent node, this method may completely replace\n// that parent node.\nTransform.prototype.replaceRangeWith = function(from, to, node) {\n if (!node.isInline && from == to && this.doc.resolve(from).parent.content.size) {\n var point = insertPoint(this.doc, from, node.type);\n if (point != null) { from = to = point; }\n }\n return this.replaceRange(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(node), 0, 0))\n};\n\n// :: (number, number) → this\n// Delete the given range, expanding it to cover fully covered\n// parent nodes until a valid replace is found.\nTransform.prototype.deleteRange = function(from, to) {\n var $from = this.doc.resolve(from), $to = this.doc.resolve(to);\n var covered = coveredDepths($from, $to);\n for (var i = 0; i < covered.length; i++) {\n var depth = covered[i], last = i == covered.length - 1;\n if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n { return this.delete($from.start(depth), $to.end(depth)) }\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n { return this.delete($from.before(depth), $to.after(depth)) }\n }\n for (var d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d)\n { return this.delete($from.before(d), to) }\n }\n return this.delete(from, to)\n};\n\n// : (ResolvedPos, ResolvedPos) → [number]\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n var result = [], minDepth = Math.min($from.depth, $to.depth);\n for (var d = minDepth; d >= 0; d--) {\n var start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) ||\n $to.end(d) > $to.pos + ($to.depth - d) ||\n $from.node(d).type.spec.isolating ||\n $to.node(d).type.spec.isolating) { break }\n if (start == $to.start(d)) { result.push(d); }\n }\n return result\n}\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-transform/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AddMarkStep\", function() { return AddMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MapResult\", function() { return MapResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mapping\", function() { return Mapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RemoveMarkStep\", function() { return RemoveMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceAroundStep\", function() { return ReplaceAroundStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceStep\", function() { return ReplaceStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Step\", function() { return Step; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepMap\", function() { return StepMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepResult\", function() { return StepResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TransformError\", function() { return TransformError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canJoin\", function() { return canJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canSplit\", function() { return canSplit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropPoint\", function() { return dropPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findWrapping\", function() { return findWrapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertPoint\", function() { return insertPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinPoint\", function() { return joinPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftTarget\", function() { return liftTarget; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"replaceStep\", function() { return replaceStep; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n // Mappable:: interface\n// There are several things that positions can be mapped through.\n// Such objects conform to this interface.\n//\n// map:: (pos: number, assoc: ?number) → number\n// Map a position through this object. When given, `assoc` (should\n// be -1 or 1, defaults to 1) determines with which side the\n// position is associated, which determines in which direction to\n// move when a chunk of content is inserted at the mapped position.\n//\n// mapResult:: (pos: number, assoc: ?number) → MapResult\n// Map a position, and return an object containing additional\n// information about the mapping. The result's `deleted` field tells\n// you whether the position was deleted (completely enclosed in a\n// replaced range) during the mapping. When content on only one side\n// is deleted, the position itself is only considered deleted when\n// `assoc` points in the direction of the deleted content.\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\n\nvar lower16 = 0xffff;\nvar factor16 = Math.pow(2, 16);\n\nfunction makeRecover(index, offset) {\n return index + offset * factor16;\n}\n\nfunction recoverIndex(value) {\n return value & lower16;\n}\n\nfunction recoverOffset(value) {\n return (value - (value & lower16)) / factor16;\n} // ::- An object representing a mapped position with extra\n// information.\n\n\nvar MapResult = function MapResult(pos, deleted, recover) {\n if (deleted === void 0) deleted = false;\n if (recover === void 0) recover = null; // :: number The mapped version of the position.\n\n this.pos = pos; // :: bool Tells you whether the position was deleted, that is,\n // whether the step removed its surroundings from the document.\n\n this.deleted = deleted;\n this.recover = recover;\n}; // :: class extends Mappable\n// A map describing the deletions and insertions made by a step, which\n// can be used to find the correspondence between positions in the\n// pre-step version of a document and the same position in the\n// post-step version.\n\n\nvar StepMap = function StepMap(ranges, inverted) {\n if (inverted === void 0) inverted = false;\n this.ranges = ranges;\n this.inverted = inverted;\n};\n\nStepMap.prototype.recover = function recover(value) {\n var diff = 0,\n index = recoverIndex(value);\n\n if (!this.inverted) {\n for (var i = 0; i < index; i++) {\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n }\n }\n\n return this.ranges[index * 3] + diff + recoverOffset(value);\n}; // : (number, ?number) → MapResult\n\n\nStepMap.prototype.mapResult = function mapResult(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, false);\n}; // : (number, ?number) → number\n\n\nStepMap.prototype.map = function map(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, true);\n};\n\nStepMap.prototype._map = function _map(pos, assoc, simple) {\n var diff = 0,\n oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n\n if (start > pos) {\n break;\n }\n\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex],\n end = start + oldSize;\n\n if (pos <= end) {\n var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n var result = start + diff + (side < 0 ? 0 : newSize);\n\n if (simple) {\n return result;\n }\n\n var recover = makeRecover(i / 3, pos - start);\n return new MapResult(result, assoc < 0 ? pos != start : pos != end, recover);\n }\n\n diff += newSize - oldSize;\n }\n\n return simple ? pos + diff : new MapResult(pos + diff);\n};\n\nStepMap.prototype.touches = function touches(pos, recover) {\n var diff = 0,\n index = recoverIndex(recover);\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n\n if (start > pos) {\n break;\n }\n\n var oldSize = this.ranges[i + oldIndex],\n end = start + oldSize;\n\n if (pos <= end && i == index * 3) {\n return true;\n }\n\n diff += this.ranges[i + newIndex] - oldSize;\n }\n\n return false;\n}; // :: ((oldStart: number, oldEnd: number, newStart: number, newEnd: number))\n// Calls the given function on each of the changed ranges included in\n// this map.\n\n\nStepMap.prototype.forEach = function forEach(f) {\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i],\n oldStart = start - (this.inverted ? diff : 0),\n newStart = start + (this.inverted ? 0 : diff);\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n}; // :: () → StepMap\n// Create an inverted version of this map. The result can be used to\n// map positions in the post-step document to the pre-step document.\n\n\nStepMap.prototype.invert = function invert() {\n return new StepMap(this.ranges, !this.inverted);\n};\n\nStepMap.prototype.toString = function toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n}; // :: (n: number) → StepMap\n// Create a map that moves all positions by offset `n` (which may be\n// negative). This can be useful when applying steps meant for a\n// sub-document to a larger document, or vice-versa.\n\n\nStepMap.offset = function offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n};\n\nStepMap.empty = new StepMap([]); // :: class extends Mappable\n// A mapping represents a pipeline of zero or more [step\n// maps](#transform.StepMap). It has special provisions for losslessly\n// handling mapping positions through a series of steps in which some\n// steps are inverted versions of earlier steps. (This comes up when\n// ‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\n// collaboration or history management.)\n\nvar Mapping = function Mapping(maps, mirror, from, to) {\n // :: [StepMap]\n // The step maps in this mapping.\n this.maps = maps || []; // :: number\n // The starting position in the `maps` array, used when `map` or\n // `mapResult` is called.\n\n this.from = from || 0; // :: number\n // The end position in the `maps` array.\n\n this.to = to == null ? this.maps.length : to;\n this.mirror = mirror;\n}; // :: (?number, ?number) → Mapping\n// Create a mapping that maps only through a part of this one.\n\n\nMapping.prototype.slice = function slice(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.maps.length;\n return new Mapping(this.maps, this.mirror, from, to);\n};\n\nMapping.prototype.copy = function copy() {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n}; // :: (StepMap, ?number)\n// Add a step map to the end of this mapping. If `mirrors` is\n// given, it should be the index of the step map that is the mirror\n// image of this one.\n\n\nMapping.prototype.appendMap = function appendMap(map, mirrors) {\n this.to = this.maps.push(map);\n\n if (mirrors != null) {\n this.setMirror(this.maps.length - 1, mirrors);\n }\n}; // :: (Mapping)\n// Add all the step maps in a given mapping to this one (preserving\n// mirroring information).\n\n\nMapping.prototype.appendMapping = function appendMapping(mapping) {\n for (var i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : null);\n }\n}; // :: (number) → ?number\n// Finds the offset of the step map that mirrors the map at the\n// given offset, in this mapping (as per the second argument to\n// `appendMap`).\n\n\nMapping.prototype.getMirror = function getMirror(n) {\n if (this.mirror) {\n for (var i = 0; i < this.mirror.length; i++) {\n if (this.mirror[i] == n) {\n return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n }\n }\n};\n\nMapping.prototype.setMirror = function setMirror(n, m) {\n if (!this.mirror) {\n this.mirror = [];\n }\n\n this.mirror.push(n, m);\n}; // :: (Mapping)\n// Append the inverse of the given mapping to this one.\n\n\nMapping.prototype.appendMappingInverted = function appendMappingInverted(mapping) {\n for (var i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : null);\n }\n}; // :: () → Mapping\n// Create an inverted version of this mapping.\n\n\nMapping.prototype.invert = function invert() {\n var inverse = new Mapping();\n inverse.appendMappingInverted(this);\n return inverse;\n}; // : (number, ?number) → number\n// Map a position through this mapping.\n\n\nMapping.prototype.map = function map(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n\n if (this.mirror) {\n return this._map(pos, assoc, true);\n }\n\n for (var i = this.from; i < this.to; i++) {\n pos = this.maps[i].map(pos, assoc);\n }\n\n return pos;\n}; // : (number, ?number) → MapResult\n// Map a position through this mapping, returning a mapping\n// result.\n\n\nMapping.prototype.mapResult = function mapResult(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, false);\n};\n\nMapping.prototype._map = function _map(pos, assoc, simple) {\n var deleted = false,\n recoverables = null;\n\n for (var i = this.from; i < this.to; i++) {\n var map = this.maps[i],\n rec = recoverables && recoverables[i];\n\n if (rec != null && map.touches(pos, rec)) {\n pos = map.recover(rec);\n continue;\n }\n\n var result = map.mapResult(pos, assoc);\n\n if (result.recover != null) {\n var corr = this.getMirror(i);\n\n if (corr != null && corr > i && corr < this.to) {\n if (result.deleted) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue;\n } else {\n (recoverables || (recoverables = Object.create(null)))[corr] = result.recover;\n }\n }\n }\n\n if (result.deleted) {\n deleted = true;\n }\n\n pos = result.pos;\n }\n\n return simple ? pos : new MapResult(pos, deleted);\n};\n\nfunction TransformError(message) {\n var err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n}\n\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\"; // ::- Abstraction to build up and track an array of\n// [steps](#transform.Step) representing a document transformation.\n//\n// Most transforming methods return the `Transform` object itself, so\n// that they can be chained.\n\nvar Transform = function Transform(doc) {\n // :: Node\n // The current document (the result of applying the steps in the\n // transform).\n this.doc = doc; // :: [Step]\n // The steps in this transform.\n\n this.steps = []; // :: [Node]\n // The documents before each of the steps.\n\n this.docs = []; // :: Mapping\n // A mapping with the maps for each of the steps in this transform.\n\n this.mapping = new Mapping();\n};\n\nvar prototypeAccessors = {\n before: {\n configurable: true\n },\n docChanged: {\n configurable: true\n }\n}; // :: Node The starting document.\n\nprototypeAccessors.before.get = function () {\n return this.docs.length ? this.docs[0] : this.doc;\n}; // :: (step: Step) → this\n// Apply a new step in this transform, saving the result. Throws an\n// error when the step fails.\n\n\nTransform.prototype.step = function step(object) {\n var result = this.maybeStep(object);\n\n if (result.failed) {\n throw new TransformError(result.failed);\n }\n\n return this;\n}; // :: (Step) → StepResult\n// Try to apply a step in this transformation, ignoring it if it\n// fails. Returns the step result.\n\n\nTransform.prototype.maybeStep = function maybeStep(step) {\n var result = step.apply(this.doc);\n\n if (!result.failed) {\n this.addStep(step, result.doc);\n }\n\n return result;\n}; // :: bool\n// True when the document has been changed (when there are any\n// steps).\n\n\nprototypeAccessors.docChanged.get = function () {\n return this.steps.length > 0;\n};\n\nTransform.prototype.addStep = function addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n};\n\nObject.defineProperties(Transform.prototype, prototypeAccessors);\n\nfunction mustOverride() {\n throw new Error(\"Override me\");\n}\n\nvar stepsByID = Object.create(null); // ::- A step object represents an atomic change. It generally applies\n// only to the document it was created for, since the positions\n// stored in it will only make sense for that document.\n//\n// New steps are defined by creating classes that extend `Step`,\n// overriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\n// methods, and registering your class with a unique\n// JSON-serialization identifier using\n// [`Step.jsonID`](#transform.Step^jsonID).\n\nvar Step = function Step() {};\n\nStep.prototype.apply = function apply(_doc) {\n return mustOverride();\n}; // :: () → StepMap\n// Get the step map that represents the changes made by this step,\n// and which can be used to transform between positions in the old\n// and the new document.\n\n\nStep.prototype.getMap = function getMap() {\n return StepMap.empty;\n}; // :: (doc: Node) → Step\n// Create an inverted version of this step. Needs the document as it\n// was before the step as argument.\n\n\nStep.prototype.invert = function invert(_doc) {\n return mustOverride();\n}; // :: (mapping: Mappable) → ?Step\n// Map this step through a mappable thing, returning either a\n// version of that step with its positions adjusted, or `null` if\n// the step was entirely deleted by the mapping.\n\n\nStep.prototype.map = function map(_mapping) {\n return mustOverride();\n}; // :: (other: Step) → ?Step\n// Try to merge this step with another one, to be applied directly\n// after it. Returns the merged step when possible, null if the\n// steps can't be merged.\n\n\nStep.prototype.merge = function merge(_other) {\n return null;\n}; // :: () → Object\n// Create a JSON-serializeable representation of this step. When\n// defining this for a custom subclass, make sure the result object\n// includes the step type's [JSON id](#transform.Step^jsonID) under\n// the `stepType` property.\n\n\nStep.prototype.toJSON = function toJSON() {\n return mustOverride();\n}; // :: (Schema, Object) → Step\n// Deserialize a step from its JSON representation. Will call\n// through to the step class' own implementation of this method.\n\n\nStep.fromJSON = function fromJSON(schema, json) {\n if (!json || !json.stepType) {\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n }\n\n var type = stepsByID[json.stepType];\n\n if (!type) {\n throw new RangeError(\"No step type \" + json.stepType + \" defined\");\n }\n\n return type.fromJSON(schema, json);\n}; // :: (string, constructor)\n// To be able to serialize steps to JSON, each step needs a string\n// ID to attach to its JSON representation. Use this method to\n// register an ID for your step classes. Try to pick something\n// that's unlikely to clash with steps from other modules.\n\n\nStep.jsonID = function jsonID(id, stepClass) {\n if (id in stepsByID) {\n throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n }\n\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n}; // ::- The result of [applying](#transform.Step.apply) a step. Contains either a\n// new document or a failure value.\n\n\nvar StepResult = function StepResult(doc, failed) {\n // :: ?Node The transformed document.\n this.doc = doc; // :: ?string Text providing information about a failed step.\n\n this.failed = failed;\n}; // :: (Node) → StepResult\n// Create a successful step result.\n\n\nStepResult.ok = function ok(doc) {\n return new StepResult(doc, null);\n}; // :: (string) → StepResult\n// Create a failed step result.\n\n\nStepResult.fail = function fail(message) {\n return new StepResult(null, message);\n}; // :: (Node, number, number, Slice) → StepResult\n// Call [`Node.replace`](#model.Node.replace) with the given\n// arguments. Create a successful result if it succeeds, and a\n// failed one if it throws a `ReplaceError`.\n\n\nStepResult.fromReplace = function fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n } catch (e) {\n if (e instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceError\"]) {\n return StepResult.fail(e.message);\n }\n\n throw e;\n }\n}; // ::- Replace a part of the document with a slice of new content.\n\n\nvar ReplaceStep = /*@__PURE__*/function (Step) {\n function ReplaceStep(from, to, slice, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = !!structure;\n }\n\n if (Step) ReplaceStep.__proto__ = Step;\n ReplaceStep.prototype = Object.create(Step && Step.prototype);\n ReplaceStep.prototype.constructor = ReplaceStep;\n\n ReplaceStep.prototype.apply = function apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to)) {\n return StepResult.fail(\"Structure replace would overwrite content\");\n }\n\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n };\n\n ReplaceStep.prototype.getMap = function getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n };\n\n ReplaceStep.prototype.invert = function invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n };\n\n ReplaceStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted) {\n return null;\n }\n\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);\n };\n\n ReplaceStep.prototype.merge = function merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure != this.structure) {\n return null;\n }\n\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n var slice = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n var slice$1 = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice$1, this.structure);\n } else {\n return null;\n }\n };\n\n ReplaceStep.prototype.toJSON = function toJSON() {\n var json = {\n stepType: \"replace\",\n from: this.from,\n to: this.to\n };\n\n if (this.slice.size) {\n json.slice = this.slice.toJSON();\n }\n\n if (this.structure) {\n json.structure = true;\n }\n\n return json;\n };\n\n ReplaceStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n }\n\n return new ReplaceStep(json.from, json.to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), !!json.structure);\n };\n\n return ReplaceStep;\n}(Step);\n\nStep.jsonID(\"replace\", ReplaceStep); // ::- Replace a part of the document with a slice of content, but\n// preserve a range of the replaced content by moving it into the\n// slice.\n\nvar ReplaceAroundStep = /*@__PURE__*/function (Step) {\n function ReplaceAroundStep(from, to, gapFrom, gapTo, slice, insert, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = !!structure;\n }\n\n if (Step) ReplaceAroundStep.__proto__ = Step;\n ReplaceAroundStep.prototype = Object.create(Step && Step.prototype);\n ReplaceAroundStep.prototype.constructor = ReplaceAroundStep;\n\n ReplaceAroundStep.prototype.apply = function apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) {\n return StepResult.fail(\"Structure gap-replace would overwrite content\");\n }\n\n var gap = doc.slice(this.gapFrom, this.gapTo);\n\n if (gap.openStart || gap.openEnd) {\n return StepResult.fail(\"Gap is not a flat range\");\n }\n\n var inserted = this.slice.insertAt(this.insert, gap.content);\n\n if (!inserted) {\n return StepResult.fail(\"Content does not fit in gap\");\n }\n\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n };\n\n ReplaceAroundStep.prototype.getMap = function getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert, this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n };\n\n ReplaceAroundStep.prototype.invert = function invert(doc) {\n var gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n };\n\n ReplaceAroundStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n var gapFrom = mapping.map(this.gapFrom, -1),\n gapTo = mapping.map(this.gapTo, 1);\n\n if (from.deleted && to.deleted || gapFrom < from.pos || gapTo > to.pos) {\n return null;\n }\n\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n };\n\n ReplaceAroundStep.prototype.toJSON = function toJSON() {\n var json = {\n stepType: \"replaceAround\",\n from: this.from,\n to: this.to,\n gapFrom: this.gapFrom,\n gapTo: this.gapTo,\n insert: this.insert\n };\n\n if (this.slice.size) {\n json.slice = this.slice.toJSON();\n }\n\n if (this.structure) {\n json.structure = true;\n }\n\n return json;\n };\n\n ReplaceAroundStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" || typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\") {\n throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n }\n\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), json.insert, !!json.structure);\n };\n\n return ReplaceAroundStep;\n}(Step);\n\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\n\nfunction contentBetween(doc, from, to) {\n var $from = doc.resolve(from),\n dist = to - from,\n depth = $from.depth;\n\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n\n if (dist > 0) {\n var next = $from.node(depth).maybeChild($from.indexAfter(depth));\n\n while (dist > 0) {\n if (!next || next.isLeaf) {\n return true;\n }\n\n next = next.firstChild;\n dist--;\n }\n }\n\n return false;\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) && (end == node.childCount || node.canReplace(0, end));\n} // :: (NodeRange) → ?number\n// Try to find a target depth to which the content in the given range\n// can be lifted. Will not go across\n// [isolating](#model.NodeSpec.isolating) parent nodes.\n\n\nfunction liftTarget(range) {\n var parent = range.parent;\n var content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n\n for (var depth = range.depth;; --depth) {\n var node = range.$from.node(depth);\n var index = range.$from.index(depth),\n endIndex = range.$to.indexAfter(depth);\n\n if (depth < range.depth && node.canReplace(index, endIndex, content)) {\n return depth;\n }\n\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) {\n break;\n }\n }\n} // :: (NodeRange, number) → this\n// Split the content in the given range off from its parent, if there\n// is sibling content before or after it, and move it up the tree to\n// the depth specified by `target`. You'll probably want to use\n// [`liftTarget`](#transform.liftTarget) to compute `target`, to make\n// sure the lift is valid.\n\n\nTransform.prototype.lift = function (range, target) {\n var $from = range.$from;\n var $to = range.$to;\n var depth = range.depth;\n var gapStart = $from.before(depth + 1),\n gapEnd = $to.after(depth + 1);\n var start = gapStart,\n end = gapEnd;\n var before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openStart = 0;\n\n for (var d = depth, splitting = false; d > target; d--) {\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(d).copy(before));\n openStart++;\n } else {\n start--;\n }\n }\n\n var after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openEnd = 0;\n\n for (var d$1 = depth, splitting$1 = false; d$1 > target; d$1--) {\n if (splitting$1 || $to.after(d$1 + 1) < $to.end(d$1)) {\n splitting$1 = true;\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($to.node(d$1).copy(after));\n openEnd++;\n } else {\n end++;\n }\n }\n\n return this.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), openStart, openEnd), before.size - openStart, true));\n}; // :: (NodeRange, NodeType, ?Object, ?NodeRange) → ?[{type: NodeType, attrs: ?Object}]\n// Try to find a valid way to wrap the content in the given range in a\n// node of the given type. May introduce extra nodes around and inside\n// the wrapper node, if necessary. Returns null if no valid wrapping\n// could be found. When `innerRange` is given, that range's content is\n// used as the content to fit into the wrapping, instead of the\n// content of `range`.\n\n\nfunction findWrapping(range, nodeType, attrs, innerRange) {\n if (innerRange === void 0) innerRange = range;\n var around = findWrappingOutside(range, nodeType);\n var inner = around && findWrappingInside(innerRange, nodeType);\n\n if (!inner) {\n return null;\n }\n\n return around.map(withAttrs).concat({\n type: nodeType,\n attrs: attrs\n }).concat(inner.map(withAttrs));\n}\n\nfunction withAttrs(type) {\n return {\n type: type,\n attrs: null\n };\n}\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n\n if (!around) {\n return null;\n }\n\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\n\nfunction findWrappingInside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n\n if (!inside) {\n return null;\n }\n\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n\n for (var i = startIndex; innerMatch && i < endIndex; i++) {\n innerMatch = innerMatch.matchType(parent.child(i).type);\n }\n\n if (!innerMatch || !innerMatch.validEnd) {\n return null;\n }\n\n return inside;\n} // :: (NodeRange, [{type: NodeType, attrs: ?Object}]) → this\n// Wrap the given [range](#model.NodeRange) in the given set of wrappers.\n// The wrappers are assumed to be valid in this position, and should\n// probably be computed with [`findWrapping`](#transform.findWrapping).\n\n\nTransform.prototype.wrap = function (range, wrappers) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n\n for (var i = wrappers.length - 1; i >= 0; i--) {\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n\n var start = range.start,\n end = range.end;\n return this.step(new ReplaceAroundStep(start, end, start, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, 0, 0), wrappers.length, true));\n}; // :: (number, ?number, NodeType, ?Object) → this\n// Set the type of all textblocks (partly) between `from` and `to` to\n// the given node type with the given attributes.\n\n\nTransform.prototype.setBlockType = function (from, to, type, attrs) {\n var this$1 = this;\n if (to === void 0) to = from;\n\n if (!type.isTextblock) {\n throw new RangeError(\"Type given to setBlockType should be a textblock\");\n }\n\n var mapFrom = this.steps.length;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (node.isTextblock && !node.hasMarkup(type, attrs) && canChangeType(this$1.doc, this$1.mapping.slice(mapFrom).map(pos), type)) {\n // Ensure all markup that isn't allowed in the new node type is cleared\n this$1.clearIncompatible(this$1.mapping.slice(mapFrom).map(pos, 1), type);\n var mapping = this$1.mapping.slice(mapFrom);\n var startM = mapping.map(pos, 1),\n endM = mapping.map(pos + node.nodeSize, 1);\n this$1.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(type.create(attrs, null, node.marks)), 0, 0), 1, true));\n return false;\n }\n });\n return this;\n};\n\nfunction canChangeType(doc, pos, type) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n} // :: (number, ?NodeType, ?Object, ?[Mark]) → this\n// Change the type, attributes, and/or marks of the node at `pos`.\n// When `type` isn't given, the existing node type is preserved,\n\n\nTransform.prototype.setNodeMarkup = function (pos, type, attrs, marks) {\n var node = this.doc.nodeAt(pos);\n\n if (!node) {\n throw new RangeError(\"No node at given position\");\n }\n\n if (!type) {\n type = node.type;\n }\n\n var newNode = type.create(attrs, null, marks || node.marks);\n\n if (node.isLeaf) {\n return this.replaceWith(pos, pos + node.nodeSize, newNode);\n }\n\n if (!type.validContent(node.content)) {\n throw new RangeError(\"Invalid content for node type \" + type.name);\n }\n\n return this.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(newNode), 0, 0), 1, true));\n}; // :: (Node, number, number, ?[?{type: NodeType, attrs: ?Object}]) → bool\n// Check whether splitting at the given position is allowed.\n\n\nfunction canSplit(doc, pos, depth, typesAfter) {\n if (depth === void 0) depth = 1;\n var $pos = doc.resolve(pos),\n base = $pos.depth - depth;\n var innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;\n\n if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) {\n return false;\n }\n\n for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n var node = $pos.node(d),\n index$1 = $pos.index(d);\n\n if (node.type.spec.isolating) {\n return false;\n }\n\n var rest = node.content.cutByIndex(index$1, node.childCount);\n var after = typesAfter && typesAfter[i] || node;\n\n if (after != node) {\n rest = rest.replaceChild(0, after.type.create(after.attrs));\n }\n\n if (!node.canReplace(index$1 + 1, node.childCount) || !after.type.validContent(rest)) {\n return false;\n }\n }\n\n var index = $pos.indexAfter(base);\n var baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n} // :: (number, ?number, ?[?{type: NodeType, attrs: ?Object}]) → this\n// Split the node at the given position, and optionally, if `depth` is\n// greater than one, any number of nodes above that. By default, the\n// parts split off will inherit the node type of the original node.\n// This can be changed by passing an array of types and attributes to\n// use after the split.\n\n\nTransform.prototype.split = function (pos, depth, typesAfter) {\n if (depth === void 0) depth = 1;\n var $pos = this.doc.resolve(pos),\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n\n for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($pos.node(d).copy(before));\n var typeAfter = typesAfter && typesAfter[i];\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n\n return this.step(new ReplaceStep(pos, pos, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), depth, depth), true));\n}; // :: (Node, number) → bool\n// Test whether the blocks before and after a given position can be\n// joined.\n\n\nfunction canJoin(doc, pos) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index, index + 1);\n}\n\nfunction joinable(a, b) {\n return a && b && !a.isLeaf && a.canAppend(b);\n} // :: (Node, number, ?number) → ?number\n// Find an ancestor of the given position that can be joined to the\n// block before (or after if `dir` is positive). Returns the joinable\n// point, if any.\n\n\nfunction joinPoint(doc, pos, dir) {\n if (dir === void 0) dir = -1;\n var $pos = doc.resolve(pos);\n\n for (var d = $pos.depth;; d--) {\n var before = void 0,\n after = void 0,\n index = $pos.index(d);\n\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n } else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n } else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n\n if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index, index + 1)) {\n return pos;\n }\n\n if (d == 0) {\n break;\n }\n\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n} // :: (number, ?number) → this\n// Join the blocks around the given position. If depth is 2, their\n// last and first siblings are also joined, and so on.\n\n\nTransform.prototype.join = function (pos, depth) {\n if (depth === void 0) depth = 1;\n var step = new ReplaceStep(pos - depth, pos + depth, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty, true);\n return this.step(step);\n}; // :: (Node, number, NodeType) → ?number\n// Try to find a point where a node of the given type can be inserted\n// near `pos`, by searching up the node hierarchy when `pos` itself\n// isn't a valid place but is at the start or end of a node. Return\n// null if no position was found.\n\n\nfunction insertPoint(doc, pos, nodeType) {\n var $pos = doc.resolve(pos);\n\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) {\n return pos;\n }\n\n if ($pos.parentOffset == 0) {\n for (var d = $pos.depth - 1; d >= 0; d--) {\n var index = $pos.index(d);\n\n if ($pos.node(d).canReplaceWith(index, index, nodeType)) {\n return $pos.before(d + 1);\n }\n\n if (index > 0) {\n return null;\n }\n }\n }\n\n if ($pos.parentOffset == $pos.parent.content.size) {\n for (var d$1 = $pos.depth - 1; d$1 >= 0; d$1--) {\n var index$1 = $pos.indexAfter(d$1);\n\n if ($pos.node(d$1).canReplaceWith(index$1, index$1, nodeType)) {\n return $pos.after(d$1 + 1);\n }\n\n if (index$1 < $pos.node(d$1).childCount) {\n return null;\n }\n }\n }\n} // :: (Node, number, Slice) → ?number\n// Finds a position at or around the given position where the given\n// slice can be inserted. Will look at parent nodes' nearest boundary\n// and try there, even if the original position wasn't directly at the\n// start or end of that node. Returns null when no position was found.\n\n\nfunction dropPoint(doc, pos, slice) {\n var $pos = doc.resolve(pos);\n\n if (!slice.content.size) {\n return pos;\n }\n\n var content = slice.content;\n\n for (var i = 0; i < slice.openStart; i++) {\n content = content.firstChild.content;\n }\n\n for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (var d = $pos.depth; d >= 0; d--) {\n var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n\n if (pass == 1 ? $pos.node(d).canReplace(insertPos, insertPos, content) : $pos.node(d).contentMatchAt(insertPos).findWrapping(content.firstChild.type)) {\n return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n }\n\n return null;\n}\n\nfunction mapFragment(fragment, f, parent) {\n var mapped = [];\n\n for (var i = 0; i < fragment.childCount; i++) {\n var child = fragment.child(i);\n\n if (child.content.size) {\n child = child.copy(mapFragment(child.content, f, child));\n }\n\n if (child.isInline) {\n child = f(child, parent, i);\n }\n\n mapped.push(child);\n }\n\n return prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].fromArray(mapped);\n} // ::- Add a mark to all inline content between two positions.\n\n\nvar AddMarkStep = /*@__PURE__*/function (Step) {\n function AddMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if (Step) AddMarkStep.__proto__ = Step;\n AddMarkStep.prototype = Object.create(Step && Step.prototype);\n AddMarkStep.prototype.constructor = AddMarkStep;\n\n AddMarkStep.prototype.apply = function apply(doc) {\n var this$1 = this;\n var oldSlice = doc.slice(this.from, this.to),\n $from = doc.resolve(this.from);\n var parent = $from.node($from.sharedDepth(this.to));\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node, parent) {\n if (!parent.type.allowsMarkType(this$1.mark.type)) {\n return node;\n }\n\n return node.mark(this$1.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n };\n\n AddMarkStep.prototype.invert = function invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n };\n\n AddMarkStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted || from.pos >= to.pos) {\n return null;\n }\n\n return new AddMarkStep(from.pos, to.pos, this.mark);\n };\n\n AddMarkStep.prototype.merge = function merge(other) {\n if (other instanceof AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) {\n return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n }\n };\n\n AddMarkStep.prototype.toJSON = function toJSON() {\n return {\n stepType: \"addMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n };\n\n AddMarkStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n }\n\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n };\n\n return AddMarkStep;\n}(Step);\n\nStep.jsonID(\"addMark\", AddMarkStep); // ::- Remove a mark from all inline content between two positions.\n\nvar RemoveMarkStep = /*@__PURE__*/function (Step) {\n function RemoveMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if (Step) RemoveMarkStep.__proto__ = Step;\n RemoveMarkStep.prototype = Object.create(Step && Step.prototype);\n RemoveMarkStep.prototype.constructor = RemoveMarkStep;\n\n RemoveMarkStep.prototype.apply = function apply(doc) {\n var this$1 = this;\n var oldSlice = doc.slice(this.from, this.to);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node) {\n return node.mark(this$1.mark.removeFromSet(node.marks));\n }), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n };\n\n RemoveMarkStep.prototype.invert = function invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n };\n\n RemoveMarkStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted || from.pos >= to.pos) {\n return null;\n }\n\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n };\n\n RemoveMarkStep.prototype.merge = function merge(other) {\n if (other instanceof RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) {\n return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n }\n };\n\n RemoveMarkStep.prototype.toJSON = function toJSON() {\n return {\n stepType: \"removeMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n };\n\n RemoveMarkStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n }\n\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n };\n\n return RemoveMarkStep;\n}(Step);\n\nStep.jsonID(\"removeMark\", RemoveMarkStep); // :: (number, number, Mark) → this\n// Add the given mark to the inline content between `from` and `to`.\n\nTransform.prototype.addMark = function (from, to, mark) {\n var this$1 = this;\n var removed = [],\n added = [],\n removing = null,\n adding = null;\n this.doc.nodesBetween(from, to, function (node, pos, parent) {\n if (!node.isInline) {\n return;\n }\n\n var marks = node.marks;\n\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n var start = Math.max(pos, from),\n end = Math.min(pos + node.nodeSize, to);\n var newSet = mark.addToSet(marks);\n\n for (var i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i])) {\n removing.to = end;\n } else {\n removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n }\n\n if (adding && adding.to == start) {\n adding.to = end;\n } else {\n added.push(adding = new AddMarkStep(start, end, mark));\n }\n }\n });\n removed.forEach(function (s) {\n return this$1.step(s);\n });\n added.forEach(function (s) {\n return this$1.step(s);\n });\n return this;\n}; // :: (number, number, ?union) → this\n// Remove marks from inline nodes between `from` and `to`. When `mark`\n// is a single mark, remove precisely that mark. When it is a mark type,\n// remove all marks of that type. When it is null, remove all marks of\n// any type.\n\n\nTransform.prototype.removeMark = function (from, to, mark) {\n var this$1 = this;\n if (mark === void 0) mark = null;\n var matched = [],\n step = 0;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (!node.isInline) {\n return;\n }\n\n step++;\n var toRemove = null;\n\n if (mark instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"MarkType\"]) {\n var found = mark.isInSet(node.marks);\n\n if (found) {\n toRemove = [found];\n }\n } else if (mark) {\n if (mark.isInSet(node.marks)) {\n toRemove = [mark];\n }\n } else {\n toRemove = node.marks;\n }\n\n if (toRemove && toRemove.length) {\n var end = Math.min(pos + node.nodeSize, to);\n\n for (var i = 0; i < toRemove.length; i++) {\n var style = toRemove[i],\n found$1 = void 0;\n\n for (var j = 0; j < matched.length; j++) {\n var m = matched[j];\n\n if (m.step == step - 1 && style.eq(matched[j].style)) {\n found$1 = m;\n }\n }\n\n if (found$1) {\n found$1.to = end;\n found$1.step = step;\n } else {\n matched.push({\n style: style,\n from: Math.max(pos, from),\n to: end,\n step: step\n });\n }\n }\n }\n });\n matched.forEach(function (m) {\n return this$1.step(new RemoveMarkStep(m.from, m.to, m.style));\n });\n return this;\n}; // :: (number, NodeType, ?ContentMatch) → this\n// Removes all marks and nodes from the content of the node at `pos`\n// that don't match the given new parent node type. Accepts an\n// optional starting [content match](#model.ContentMatch) as third\n// argument.\n\n\nTransform.prototype.clearIncompatible = function (pos, parentType, match) {\n if (match === void 0) match = parentType.contentMatch;\n var node = this.doc.nodeAt(pos);\n var delSteps = [],\n cur = pos + 1;\n\n for (var i = 0; i < node.childCount; i++) {\n var child = node.child(i),\n end = cur + child.nodeSize;\n var allowed = match.matchType(child.type, child.attrs);\n\n if (!allowed) {\n delSteps.push(new ReplaceStep(cur, end, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty));\n } else {\n match = allowed;\n\n for (var j = 0; j < child.marks.length; j++) {\n if (!parentType.allowsMarkType(child.marks[j].type)) {\n this.step(new RemoveMarkStep(cur, end, child.marks[j]));\n }\n }\n }\n\n cur = end;\n }\n\n if (!match.validEnd) {\n var fill = match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n this.replace(cur, cur, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fill, 0, 0));\n }\n\n for (var i$1 = delSteps.length - 1; i$1 >= 0; i$1--) {\n this.step(delSteps[i$1]);\n }\n\n return this;\n}; // :: (Node, number, ?number, ?Slice) → ?Step\n// ‘Fit’ a slice into a given position in the document, producing a\n// [step](#transform.Step) that inserts it. Will return null if\n// there's no meaningful way to insert the slice here, or inserting it\n// would be a no-op (an empty slice over an empty range).\n\n\nfunction replaceStep(doc, from, to, slice) {\n if (to === void 0) to = from;\n if (slice === void 0) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n if (from == to && !slice.size) {\n return null;\n }\n\n var $from = doc.resolve(from),\n $to = doc.resolve(to); // Optimization -- avoid work if it's obvious that it's not needed.\n\n if (fitsTrivially($from, $to, slice)) {\n return new ReplaceStep(from, to, slice);\n }\n\n var placed = placeSlice($from, slice);\n var fittedLeft = fitLeft($from, placed);\n var fitted = fitRight($from, $to, fittedLeft);\n\n if (!fitted) {\n return null;\n }\n\n if (fittedLeft.size != fitted.size && canMoveText($from, $to, fittedLeft)) {\n var d = $to.depth,\n after = $to.after(d);\n\n while (d > 1 && after == $to.end(--d)) {\n ++after;\n }\n\n var fittedAfter = fitRight($from, doc.resolve(after), fittedLeft);\n\n if (fittedAfter) {\n return new ReplaceAroundStep(from, after, to, $to.end(), fittedAfter, fittedLeft.size);\n }\n }\n\n return fitted.size || from != to ? new ReplaceStep(from, to, fitted) : null;\n} // :: (number, ?number, ?Slice) → this\n// Replace the part of the document between `from` and `to` with the\n// given `slice`.\n\n\nTransform.prototype.replace = function (from, to, slice) {\n if (to === void 0) to = from;\n if (slice === void 0) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n var step = replaceStep(this.doc, from, to, slice);\n\n if (step) {\n this.step(step);\n }\n\n return this;\n}; // :: (number, number, union) → this\n// Replace the given range with the given content, which may be a\n// fragment, node, or array of nodes.\n\n\nTransform.prototype.replaceWith = function (from, to, content) {\n return this.replace(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(content), 0, 0));\n}; // :: (number, number) → this\n// Delete the content between the given positions.\n\n\nTransform.prototype[\"delete\"] = function (from, to) {\n return this.replace(from, to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty);\n}; // :: (number, union) → this\n// Insert the given content at the given position.\n\n\nTransform.prototype.insert = function (pos, content) {\n return this.replaceWith(pos, pos, content);\n};\n\nfunction fitLeftInner($from, depth, placed, placedBelow) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openEnd = 0,\n placedHere = placed[depth];\n\n if ($from.depth > depth) {\n var inner = fitLeftInner($from, depth + 1, placed, placedBelow || placedHere);\n openEnd = inner.openEnd + 1;\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(depth + 1).copy(inner.content));\n }\n\n if (placedHere) {\n content = content.append(placedHere.content);\n openEnd = placedHere.openEnd;\n }\n\n if (placedBelow) {\n content = content.append($from.node(depth).contentMatchAt($from.indexAfter(depth)).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n openEnd = 0;\n }\n\n return {\n content: content,\n openEnd: openEnd\n };\n}\n\nfunction fitLeft($from, placed) {\n var ref = fitLeftInner($from, 0, placed, false);\n var content = ref.content;\n var openEnd = ref.openEnd;\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, $from.depth, openEnd || 0);\n}\n\nfunction fitRightJoin(content, parent, $from, $to, depth, openStart, openEnd) {\n var match,\n count = content.childCount,\n matchCount = count - (openEnd > 0 ? 1 : 0);\n var parentNode = openStart < 0 ? parent : $from.node(depth);\n\n if (openStart < 0) {\n match = parentNode.contentMatchAt(matchCount);\n } else if (count == 1 && openEnd > 0) {\n match = parentNode.contentMatchAt(openStart ? $from.index(depth) : $from.indexAfter(depth));\n } else {\n match = parentNode.contentMatchAt($from.indexAfter(depth)).matchFragment(content, count > 0 && openStart ? 1 : 0, matchCount);\n }\n\n var toNode = $to.node(depth);\n\n if (openEnd > 0 && depth < $to.depth) {\n var after = toNode.content.cutByIndex($to.indexAfter(depth)).addToStart(content.lastChild);\n var joinable$1 = match.fillBefore(after, true); // Can't insert content if there's a single node stretched across this gap\n\n if (joinable$1 && joinable$1.size && openStart > 0 && count == 1) {\n joinable$1 = null;\n }\n\n if (joinable$1) {\n var inner = fitRightJoin(content.lastChild.content, content.lastChild, $from, $to, depth + 1, count == 1 ? openStart - 1 : -1, openEnd - 1);\n\n if (inner) {\n var last = content.lastChild.copy(inner);\n\n if (joinable$1.size) {\n return content.cutByIndex(0, count - 1).append(joinable$1).addToEnd(last);\n } else {\n return content.replaceChild(count - 1, last);\n }\n }\n }\n }\n\n if (openEnd > 0) {\n match = match.matchType((count == 1 && openStart > 0 ? $from.node(depth + 1) : content.lastChild).type);\n } // If we're here, the next level can't be joined, so we see what\n // happens if we leave it open.\n\n\n var toIndex = $to.index(depth);\n\n if (toIndex == toNode.childCount && !toNode.type.compatibleContent(parent.type)) {\n return null;\n }\n\n var joinable = match.fillBefore(toNode.content, true, toIndex);\n\n for (var i = toIndex; joinable && i < toNode.content.childCount; i++) {\n if (!parentNode.type.allowsMarks(toNode.content.child(i).marks)) {\n joinable = null;\n }\n }\n\n if (!joinable) {\n return null;\n }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1, count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n\n content = content.append(joinable);\n\n if ($to.depth > depth) {\n content = content.addToEnd(fitRightSeparate($to, depth + 1));\n }\n\n return content;\n}\n\nfunction fitRightClosed(node, openEnd, $from, depth, openStart) {\n var match,\n content = node.content,\n count = content.childCount;\n\n if (openStart >= 0) {\n match = $from.node(depth).contentMatchAt($from.indexAfter(depth)).matchFragment(content, openStart > 0 ? 1 : 0, count);\n } else {\n match = node.contentMatchAt(count);\n }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1, count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n\n return node.copy(content.append(match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true)));\n}\n\nfunction fitRightSeparate($to, depth) {\n var node = $to.node(depth);\n var fill = node.contentMatchAt(0).fillBefore(node.content, true, $to.index(depth));\n\n if ($to.depth > depth) {\n fill = fill.addToEnd(fitRightSeparate($to, depth + 1));\n }\n\n return node.copy(fill);\n}\n\nfunction normalizeSlice(content, openStart, openEnd) {\n while (openStart > 0 && openEnd > 0 && content.childCount == 1) {\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, openStart, openEnd);\n} // : (ResolvedPos, ResolvedPos, number, Slice) → Slice\n\n\nfunction fitRight($from, $to, slice) {\n var fitted = fitRightJoin(slice.content, $from.node(0), $from, $to, 0, slice.openStart, slice.openEnd);\n\n if (!fitted) {\n return null;\n }\n\n return normalizeSlice(fitted, slice.openStart, $to.depth);\n}\n\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() && $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n\nfunction canMoveText($from, $to, slice) {\n if (!$to.parent.isTextblock) {\n return false;\n }\n\n var parent = slice.openEnd ? nodeRight(slice.content, slice.openEnd) : $from.node($from.depth - (slice.openStart - slice.openEnd));\n\n if (!parent.isTextblock) {\n return false;\n }\n\n for (var i = $to.index(); i < $to.parent.childCount; i++) {\n if (!parent.type.allowsMarks($to.parent.child(i).marks)) {\n return false;\n }\n }\n\n var match;\n\n if (slice.openEnd) {\n match = parent.contentMatchAt(parent.childCount);\n } else {\n match = parent.contentMatchAt(parent.childCount);\n\n if (slice.size) {\n match = match.matchFragment(slice.content, slice.openStart ? 1 : 0);\n }\n }\n\n match = match.matchFragment($to.parent.content, $to.index());\n return match && match.validEnd;\n}\n\nfunction nodeRight(content, depth) {\n for (var i = 1; i < depth; i++) {\n content = content.lastChild.content;\n }\n\n return content.lastChild;\n} // Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// So placeSlice splits up a slice into a number of sub-slices,\n// along with information on where they can be placed on the given\n// left-side edge. It works by walking the open side of the slice,\n// from the inside out, and trying to find a landing spot for each\n// element, by simultaneously scanning over the gap side. When no\n// place is found for an open node's content, it is left in that node.\n// : (ResolvedPos, Slice) → [{content: Fragment, openEnd: number, depth: number}]\n\n\nfunction placeSlice($from, slice) {\n var frontier = new Frontier($from);\n\n for (var pass = 1; slice.size && pass <= 3; pass++) {\n var value = frontier.placeSlice(slice.content, slice.openStart, slice.openEnd, pass);\n\n if (pass == 3 && value != slice && value.size) {\n pass = 0;\n } // Restart if the 3rd pass made progress but left content\n\n\n slice = value;\n }\n\n while (frontier.open.length) {\n frontier.closeNode();\n }\n\n return frontier.placed;\n} // Helper class that models the open side of the insert position,\n// keeping track of the content match and already inserted content\n// at each depth.\n\n\nvar Frontier = function Frontier($pos) {\n // : [{parent: Node, match: ContentMatch, content: Fragment, wrapper: bool, openEnd: number, depth: number}]\n this.open = [];\n\n for (var d = 0; d <= $pos.depth; d++) {\n var parent = $pos.node(d),\n match = parent.contentMatchAt($pos.indexAfter(d));\n this.open.push({\n parent: parent,\n match: match,\n content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n wrapper: false,\n openEnd: 0,\n depth: d\n });\n }\n\n this.placed = [];\n}; // : (Fragment, number, number, number, ?Node) → Slice\n// Tries to place the content of the given slice, and returns a\n// slice containing unplaced content.\n//\n// pass 1: try to fit directly\n// pass 2: allow wrapper nodes to be introduced\n// pass 3: allow unwrapping of nodes that aren't open\n\n\nFrontier.prototype.placeSlice = function placeSlice(fragment, openStart, openEnd, pass, parent) {\n if (openStart > 0) {\n var first = fragment.firstChild;\n var inner = this.placeSlice(first.content, Math.max(0, openStart - 1), openEnd && fragment.childCount == 1 ? openEnd - 1 : 0, pass, first);\n\n if (inner.content != first.content) {\n if (inner.content.size) {\n fragment = fragment.replaceChild(0, first.copy(inner.content));\n openStart = inner.openStart + 1;\n } else {\n if (fragment.childCount == 1) {\n openEnd = 0;\n }\n\n fragment = fragment.cutByIndex(1);\n openStart = 0;\n }\n }\n }\n\n var result = this.placeContent(fragment, openStart, openEnd, pass, parent);\n\n if (pass > 2 && result.size && openStart == 0) {\n var child = result.content.firstChild,\n single = result.content.childCount == 1;\n this.placeContent(child.content, 0, openEnd && single ? openEnd - 1 : 0, pass, child);\n result = single ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](result.content.cutByIndex(1), 0, openEnd);\n }\n\n return result;\n};\n\nFrontier.prototype.placeContent = function placeContent(fragment, openStart, openEnd, pass, parent) {\n var i = 0; // Go over the fragment's children\n\n for (; i < fragment.childCount; i++) {\n var child = fragment.child(i),\n placed = false,\n last = i == fragment.childCount - 1; // Try each open node in turn, starting from the innermost\n\n for (var d = this.open.length - 1; d >= 0; d--) {\n var open = this.open[d],\n wrap = void 0; // If pass > 1, it is allowed to wrap the node to help find a\n // fit, so if findWrapping returns something, we add open\n // nodes to the frontier for that wrapping.\n\n if (pass > 1 && (wrap = open.match.findWrapping(child.type)) && !(parent && wrap.length && wrap[wrap.length - 1] == parent.type)) {\n while (this.open.length - 1 > d) {\n this.closeNode();\n }\n\n for (var w = 0; w < wrap.length; w++) {\n open.match = open.match.matchType(wrap[w]);\n d++;\n open = {\n parent: wrap[w].create(),\n match: wrap[w].contentMatch,\n content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n wrapper: true,\n openEnd: 0,\n depth: d + w\n };\n this.open.push(open);\n }\n } // See if the child fits here\n\n\n var match = open.match.matchType(child.type);\n\n if (!match) {\n var fill = open.match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(child));\n\n if (fill) {\n for (var j = 0; j < fill.childCount; j++) {\n var ch = fill.child(j);\n this.addNode(open, ch, 0);\n match = open.match.matchFragment(ch);\n }\n } else if (parent && open.match.matchType(parent.type)) {\n // Don't continue looking further up if the parent node\n // would fit here.\n break;\n } else {\n continue;\n }\n } // Close open nodes above this one, since we're starting to\n // add to this.\n\n\n while (this.open.length - 1 > d) {\n this.closeNode();\n } // Strip marks from the child or close its start when necessary\n\n\n child = child.mark(open.parent.type.allowedMarks(child.marks));\n\n if (openStart) {\n child = closeNodeStart(child, openStart, last ? openEnd : 0);\n openStart = 0;\n } // Add the child to this open node and adjust its metadata\n\n\n this.addNode(open, child, last ? openEnd : 0);\n open.match = match;\n\n if (last) {\n openEnd = 0;\n }\n\n placed = true;\n break;\n } // As soon as we've failed to place a node we stop looking at\n // later nodes\n\n\n if (!placed) {\n break;\n }\n } // Close the current open node if it's not the the root and we\n // either placed up to the end of the node or the the current\n // slice depth's node type matches the open node's type\n\n\n if (this.open.length > 1 && (i > 0 && i == fragment.childCount || parent && this.open[this.open.length - 1].parent.type == parent.type)) {\n this.closeNode();\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fragment.cutByIndex(i), openStart, openEnd);\n};\n\nFrontier.prototype.addNode = function addNode(open, node, openEnd) {\n open.content = closeFragmentEnd(open.content, open.openEnd).addToEnd(node);\n open.openEnd = openEnd;\n};\n\nFrontier.prototype.closeNode = function closeNode() {\n var open = this.open.pop();\n if (open.content.size == 0) ;else if (open.wrapper) {\n this.addNode(this.open[this.open.length - 1], open.parent.copy(open.content), open.openEnd + 1);\n } else {\n this.placed[open.depth] = {\n depth: open.depth,\n content: open.content,\n openEnd: open.openEnd\n };\n }\n};\n\nfunction closeNodeStart(node, openStart, openEnd) {\n var content = node.content;\n\n if (openStart > 1) {\n var first = closeNodeStart(node.firstChild, openStart - 1, node.childCount == 1 ? openEnd - 1 : 0);\n content = node.content.replaceChild(0, first);\n }\n\n var fill = node.type.contentMatch.fillBefore(content, openEnd == 0);\n return node.copy(fill.append(content));\n}\n\nfunction closeNodeEnd(node, depth) {\n var content = node.content;\n\n if (depth > 1) {\n var last = closeNodeEnd(node.lastChild, depth - 1);\n content = node.content.replaceChild(node.childCount - 1, last);\n }\n\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n return node.copy(content.append(fill));\n}\n\nfunction closeFragmentEnd(fragment, depth) {\n return depth ? fragment.replaceChild(fragment.childCount - 1, closeNodeEnd(fragment.lastChild, depth)) : fragment;\n} // :: (number, number, Slice) → this\n// Replace a range of the document with a given slice, using `from`,\n// `to`, and the slice's [`openStart`](#model.Slice.openStart) property\n// as hints, rather than fixed start and end points. This method may\n// grow the replaced area or close open nodes in the slice in order to\n// get a fit that is more in line with WYSIWYG expectations, by\n// dropping fully covered parent nodes of the replaced region when\n// they are marked [non-defining](#model.NodeSpec.defining), or\n// including an open parent node from the slice that _is_ marked as\n// [defining](#model.NodeSpec.defining).\n//\n// This is the method, for example, to handle paste. The similar\n// [`replace`](#transform.Transform.replace) method is a more\n// primitive tool which will _not_ move the start and end of its given\n// range, and is useful in situations where you need more precise\n// control over what happens.\n\n\nTransform.prototype.replaceRange = function (from, to, slice) {\n if (!slice.size) {\n return this.deleteRange(from, to);\n }\n\n var $from = this.doc.resolve(from),\n $to = this.doc.resolve(to);\n\n if (fitsTrivially($from, $to, slice)) {\n return this.step(new ReplaceStep(from, to, slice));\n }\n\n var targetDepths = coveredDepths($from, this.doc.resolve(to)); // Can't replace the whole document, so remove 0 if it's present\n\n if (targetDepths[targetDepths.length - 1] == 0) {\n targetDepths.pop();\n } // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n\n\n var preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget); // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n\n for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n var spec = $from.node(d).type.spec;\n\n if (spec.defining || spec.isolating) {\n break;\n }\n\n if (targetDepths.indexOf(d) > -1) {\n preferredTarget = d;\n } else if ($from.before(d) == pos) {\n targetDepths.splice(1, 0, -d);\n }\n } // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n\n\n var preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n var leftNodes = [],\n preferredDepth = slice.openStart;\n\n for (var content = slice.content, i = 0;; i++) {\n var node = content.firstChild;\n leftNodes.push(node);\n\n if (i == slice.openStart) {\n break;\n }\n\n content = node.content;\n } // Back up if the node directly above openStart, or the node above\n // that separated only by a non-defining textblock node, is defining.\n\n\n if (preferredDepth > 0 && leftNodes[preferredDepth - 1].type.spec.defining && $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 1].type) {\n preferredDepth -= 1;\n } else if (preferredDepth >= 2 && leftNodes[preferredDepth - 1].isTextblock && leftNodes[preferredDepth - 2].type.spec.defining && $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 2].type) {\n preferredDepth -= 2;\n }\n\n for (var j = slice.openStart; j >= 0; j--) {\n var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n var insert = leftNodes[openDepth];\n\n if (!insert) {\n continue;\n }\n\n for (var i$1 = 0; i$1 < targetDepths.length; i$1++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n var targetDepth = targetDepths[(i$1 + preferredTargetIndex) % targetDepths.length],\n expand = true;\n\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n\n var parent = $from.node(targetDepth - 1),\n index = $from.index(targetDepth - 1);\n\n if (parent.canReplaceWith(index, index, insert.type, insert.marks)) {\n return this.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n }\n\n var startSteps = this.steps.length;\n\n for (var i$2 = targetDepths.length - 1; i$2 >= 0; i$2--) {\n this.replace(from, to, slice);\n\n if (this.steps.length > startSteps) {\n break;\n }\n\n var depth = targetDepths[i$2];\n\n if (i$2 < 0) {\n continue;\n }\n\n from = $from.before(depth);\n to = $to.after(depth);\n }\n\n return this;\n};\n\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n var first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n\n if (depth > newOpen) {\n var match = parent.contentMatchAt(0);\n var start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n }\n\n return fragment;\n} // :: (number, number, Node) → this\n// Replace the given range with a node, but use `from` and `to` as\n// hints, rather than precise positions. When from and to are the same\n// and are at the start or end of a parent node in which the given\n// node doesn't fit, this method may _move_ them out towards a parent\n// that does allow the given node to be placed. When the given range\n// completely covers a parent node, this method may completely replace\n// that parent node.\n\n\nTransform.prototype.replaceRangeWith = function (from, to, node) {\n if (!node.isInline && from == to && this.doc.resolve(from).parent.content.size) {\n var point = insertPoint(this.doc, from, node.type);\n\n if (point != null) {\n from = to = point;\n }\n }\n\n return this.replaceRange(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(node), 0, 0));\n}; // :: (number, number) → this\n// Delete the given range, expanding it to cover fully covered\n// parent nodes until a valid replace is found.\n\n\nTransform.prototype.deleteRange = function (from, to) {\n var $from = this.doc.resolve(from),\n $to = this.doc.resolve(to);\n var covered = coveredDepths($from, $to);\n\n for (var i = 0; i < covered.length; i++) {\n var depth = covered[i],\n last = i == covered.length - 1;\n\n if (last && depth == 0 || $from.node(depth).type.contentMatch.validEnd) {\n return this[\"delete\"]($from.start(depth), $to.end(depth));\n }\n\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1)))) {\n return this[\"delete\"]($from.before(depth), $to.after(depth));\n }\n }\n\n for (var d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d) {\n return this[\"delete\"]($from.before(d), to);\n }\n }\n\n return this[\"delete\"](from, to);\n}; // : (ResolvedPos, ResolvedPos) → [number]\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\n\n\nfunction coveredDepths($from, $to) {\n var result = [],\n minDepth = Math.min($from.depth, $to.depth);\n\n for (var d = minDepth; d >= 0; d--) {\n var start = $from.start(d);\n\n if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating) {\n break;\n }\n\n if (start == $to.start(d)) {\n result.push(d);\n }\n }\n\n return result;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-transform/dist/index.es.js?"); /***/ }), /***/ "./node_modules/prosemirror-view/dist/index.es.js": /*!********************************************************!*\ !*** ./node_modules/prosemirror-view/dist/index.es.js ***! \********************************************************/ /*! exports provided: Decoration, DecorationSet, EditorView, __endComposition, __parseFromClipboard, __serializeForClipboard */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Decoration\", function() { return Decoration; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DecorationSet\", function() { return DecorationSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorView\", function() { return EditorView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__endComposition\", function() { return endComposition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__parseFromClipboard\", function() { return parseFromClipboard; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__serializeForClipboard\", function() { return serializeForClipboard; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\n\nvar result = {};\n\nif (typeof navigator != \"undefined\" && typeof document != \"undefined\") {\n var ie_edge = /Edge\\/(\\d+)/.exec(navigator.userAgent);\n var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n\n result.mac = /Mac/.test(navigator.platform);\n var ie = result.ie = !!(ie_upto10 || ie_11up || ie_edge);\n result.ie_version = ie_upto10 ? document.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : null;\n result.gecko = !ie && /gecko\\/(\\d+)/i.test(navigator.userAgent);\n result.gecko_version = result.gecko && +(/Firefox\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n var chrome = !ie && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\n result.chrome = !!chrome;\n result.chrome_version = chrome && +chrome[1];\n result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n result.android = /Android \\d/.test(navigator.userAgent);\n result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style;\n result.safari = /Apple Computer/.test(navigator.vendor);\n result.webkit_version = result.webkit && +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n}\n\nvar domIndex = function(node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n if (!node) { return index }\n }\n};\n\nvar parentNode = function(node) {\n var parent = node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent\n};\n\nvar textRange = function(node, from, to) {\n var range = document.createRange();\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range\n};\n\n// Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\nvar isEquivalentPosition = function(node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) ||\n scanFor(node, off, targetNode, targetOff, 1))\n};\n\nvar atomElements = /^(img|br|input|textarea|hr)$/i;\n\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) { return true }\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n var parent = node.parentNode;\n if (parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\")\n { return false }\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n if (node.contentEditable == \"false\") { return false }\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false\n }\n }\n}\n\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length\n}\n\nfunction isOnEdge(node, offset, parent) {\n for (var atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) { return true }\n var index = domIndex(node);\n node = node.parentNode;\n if (!node) { return false }\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\n\nfunction hasBlockDesc(dom) {\n var desc;\n for (var cur = dom; cur; cur = cur.parentNode) { if (desc = cur.pmViewDesc) { break } }\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom)\n}\n\n// Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\nvar selectionCollapsed = function(domSel) {\n var collapsed = domSel.isCollapsed;\n if (collapsed && result.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed)\n { collapsed = false; }\n return collapsed\n};\n\nfunction keyEvent(keyCode, key) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event\n}\n\nfunction windowRect(win) {\n return {left: 0, right: win.innerWidth,\n top: 0, bottom: win.innerHeight}\n}\n\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side]\n}\n\nfunction scrollRectIntoView(view, rect, startDOM) {\n var scrollThreshold = view.someProp(\"scrollThreshold\") || 0, scrollMargin = view.someProp(\"scrollMargin\") || 5;\n var doc = view.dom.ownerDocument, win = doc.defaultView;\n for (var parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) { break }\n if (parent.nodeType != 1) { continue }\n var atTop = parent == doc.body || parent.nodeType != 1;\n var bounding = atTop ? windowRect(win) : parent.getBoundingClientRect();\n var moveX = 0, moveY = 0;\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\"))\n { moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\")); }\n else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\"))\n { moveY = rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\"); }\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\"))\n { moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\")); }\n else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\"))\n { moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\"); }\n if (moveX || moveY) {\n if (atTop) {\n win.scrollBy(moveX, moveY);\n } else {\n if (moveY) { parent.scrollTop += moveY; }\n if (moveX) { parent.scrollLeft += moveX; }\n rect = {left: rect.left - moveX, top: rect.top - moveY, right: rect.right - moveX, bottom: rect.bottom - moveY};\n }\n }\n if (atTop) { break }\n }\n}\n\n// Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\nfunction storeScrollPos(view) {\n var rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);\n var refDOM, refTop;\n for (var x = (rect.left + rect.right) / 2, y = startY + 1;\n y < Math.min(innerHeight, rect.bottom); y += 5) {\n var dom = view.root.elementFromPoint(x, y);\n if (dom == view.dom || !view.dom.contains(dom)) { continue }\n var localRect = dom.getBoundingClientRect();\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break\n }\n }\n return {refDOM: refDOM, refTop: refTop, stack: scrollStack(view.dom)}\n}\n\nfunction scrollStack(dom) {\n var stack = [], doc = dom.ownerDocument;\n for (; dom; dom = parentNode(dom)) {\n stack.push({dom: dom, top: dom.scrollTop, left: dom.scrollLeft});\n if (dom == doc) { break }\n }\n return stack\n}\n\n// Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\nfunction resetScrollPos(ref) {\n var refDOM = ref.refDOM;\n var refTop = ref.refTop;\n var stack = ref.stack;\n\n var newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\n\nfunction restoreScrollStack(stack, dTop) {\n for (var i = 0; i < stack.length; i++) {\n var ref = stack[i];\n var dom = ref.dom;\n var top = ref.top;\n var left = ref.left;\n if (dom.scrollTop != top + dTop) { dom.scrollTop = top + dTop; }\n if (dom.scrollLeft != left) { dom.scrollLeft = left; }\n }\n}\n\nvar preventScrollSupported = null;\n// Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\nfunction focusPreventScroll(dom) {\n if (dom.setActive) { return dom.setActive() } // in IE\n if (preventScrollSupported) { return dom.focus(preventScrollSupported) }\n\n var stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {preventScroll: true};\n return true\n }\n } : undefined);\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\n\nfunction findOffsetInNode(node, coords) {\n var closest, dxClosest = 2e8, coordsClosest, offset = 0;\n var rowBot = coords.top, rowTop = coords.top;\n for (var child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n var rects = (void 0);\n if (child.nodeType == 1) { rects = child.getClientRects(); }\n else if (child.nodeType == 3) { rects = textRange(child).getClientRects(); }\n else { continue }\n\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n var dx = rect.left > coords.left ? rect.left - coords.left\n : rect.right < coords.left ? coords.left - rect.right : 0;\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {left: rect.right < coords.left ? rect.right : rect.left, top: coords.top} : coords;\n if (child.nodeType == 1 && dx)\n { offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0); }\n continue\n }\n }\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top ||\n coords.left >= rect.left && coords.top >= rect.bottom))\n { offset = childIndex + 1; }\n }\n }\n if (closest && closest.nodeType == 3) { return findOffsetInText(closest, coordsClosest) }\n if (!closest || (dxClosest && closest.nodeType == 1)) { return {node: node, offset: offset} }\n return findOffsetInNode(closest, coordsClosest)\n}\n\nfunction findOffsetInText(node, coords) {\n var len = node.nodeValue.length;\n var range = document.createRange();\n for (var i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n var rect = singleRect(range, 1);\n if (rect.top == rect.bottom) { continue }\n if (inRect(coords, rect))\n { return {node: node, offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)} }\n }\n return {node: node, offset: 0}\n}\n\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1&&\n coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1\n}\n\nfunction targetKludge(dom, coords) {\n var parent = dom.parentNode;\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left)\n { return parent }\n return dom\n}\n\nfunction posFromElement(view, elt, coords) {\n var ref = findOffsetInNode(elt, coords);\n var node = ref.node;\n var offset = ref.offset;\n var bias = -1;\n if (node.nodeType == 1 && !node.firstChild) {\n var rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n return view.docView.posFromDOM(node, offset, bias)\n}\n\nfunction posFromCaret(view, node, offset, coords) {\n // Browser (in caretPosition/RangeFromPoint) will agressively\n // normalize towards nearby inline nodes. Since we are interested in\n // positions between block nodes too, we first walk up the hierarchy\n // of nodes to see if there are block nodes that the coordinates\n // fall outside of. If so, we take the position before/after that\n // block. If not, we call `posFromDOM` on the raw node/offset.\n var outside = -1;\n for (var cur = node;;) {\n if (cur == view.dom) { break }\n var desc = view.docView.nearestDesc(cur, true);\n if (!desc) { return null }\n if (desc.node.isBlock && desc.parent) {\n var rect = desc.dom.getBoundingClientRect();\n if (rect.left > coords.left || rect.top > coords.top) { outside = desc.posBefore; }\n else if (rect.right < coords.left || rect.bottom < coords.top) { outside = desc.posAfter; }\n else { break }\n }\n cur = desc.dom.parentNode;\n }\n return outside > -1 ? outside : view.docView.posFromDOM(node, offset)\n}\n\nfunction elementFromPoint(element, coords, box) {\n var len = element.childNodes.length;\n if (len && box.top < box.bottom) {\n for (var startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n var child = element.childNodes[i];\n if (child.nodeType == 1) {\n var rects = child.getClientRects();\n for (var j = 0; j < rects.length; j++) {\n var rect = rects[j];\n if (inRect(coords, rect)) { return elementFromPoint(child, coords, rect) }\n }\n }\n if ((i = (i + 1) % len) == startI) { break }\n }\n }\n return element\n}\n\n// Given an x,y position on the editor, get the position in the document.\nfunction posAtCoords(view, coords) {\n var assign, assign$1;\n\n var root = view.root, node, offset;\n if (root.caretPositionFromPoint) {\n try { // Firefox throws for this call in hard-to-predict circumstances (#994)\n var pos$1 = root.caretPositionFromPoint(coords.left, coords.top);\n if (pos$1) { ((assign = pos$1, node = assign.offsetNode, offset = assign.offset)); }\n } catch (_) {}\n }\n if (!node && root.caretRangeFromPoint) {\n var range = root.caretRangeFromPoint(coords.left, coords.top);\n if (range) { ((assign$1 = range, node = assign$1.startContainer, offset = assign$1.startOffset)); }\n }\n\n var elt = root.elementFromPoint(coords.left, coords.top + 1), pos;\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n var box = view.dom.getBoundingClientRect();\n if (!inRect(coords, box)) { return null }\n elt = elementFromPoint(view.dom, coords, box);\n if (!elt) { return null }\n }\n elt = targetKludge(elt, coords);\n if (node) {\n if (result.gecko && node.nodeType == 1) {\n // Firefox will sometimes return offsets into nodes, which\n // have no actual children, from caretPositionFromPoint (#953)\n offset = Math.min(offset, node.childNodes.length);\n // It'll also move the returned position before image nodes,\n // even if those are behind it.\n if (offset < node.childNodes.length) {\n var next = node.childNodes[offset], box$1;\n if (next.nodeName == \"IMG\" && (box$1 = next.getBoundingClientRect()).right <= coords.left &&\n box$1.bottom > coords.top)\n { offset++; }\n }\n }\n // Suspiciously specific kludge to work around caret*FromPoint\n // never returning a position at the end of the document\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 &&\n coords.top > node.lastChild.getBoundingClientRect().bottom)\n { pos = view.state.doc.content.size; }\n // Ignore positions directly after a BR, since caret*FromPoint\n // 'round up' positions that would be more accurately placed\n // before the BR node.\n else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\")\n { pos = posFromCaret(view, node, offset, coords); }\n }\n if (pos == null) { pos = posFromElement(view, elt, coords); }\n\n var desc = view.docView.nearestDesc(elt, true);\n return {pos: pos, inside: desc ? desc.posAtStart - desc.border : -1}\n}\n\nfunction singleRect(object, bias) {\n var rects = object.getClientRects();\n return !rects.length ? object.getBoundingClientRect() : rects[bias < 0 ? 0 : rects.length - 1]\n}\n\n// : (EditorView, number) → {left: number, top: number, right: number, bottom: number}\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\nfunction coordsAtPos(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n\n // These browsers support querying empty text ranges\n if (node.nodeType == 3 && (result.chrome || result.gecko)) {\n var rect = singleRect(textRange(node, offset, offset), 0);\n // Firefox returns bad results (the position before the space)\n // when querying a position directly after line-broken\n // whitespace. Detect this situation and and kludge around it\n if (result.gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n var rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n if (Math.abs(rectBefore.left - rect.left) < 1 && rectBefore.top == rect.top) {\n var rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n return flattenV(rectAfter, rectAfter.left < rectBefore.left)\n }\n }\n return rect\n }\n\n if (node.nodeType == 1 && !view.state.doc.resolve(pos).parent.inlineContent) {\n // Return a horizontal line in block context\n var top = true, rect$1;\n if (offset < node.childNodes.length) {\n var after = node.childNodes[offset];\n if (after.nodeType == 1) { rect$1 = after.getBoundingClientRect(); }\n }\n if (!rect$1 && offset) {\n var before = node.childNodes[offset - 1];\n if (before.nodeType == 1) { rect$1 = before.getBoundingClientRect(); top = false; }\n }\n return flattenH(rect$1 || node.getBoundingClientRect(), top)\n }\n\n // Not Firefox/Chrome, or not in a text node, so we have to use\n // actual element/character rectangles to get a solution (this part\n // is not very bidi-safe)\n //\n // Try the left side first, fall back to the right one if that\n // doesn't work.\n for (var dir = -1; dir < 2; dir += 2) {\n if (dir < 0 && offset) {\n var prev = (void 0), target = node.nodeType == 3 ? textRange(node, offset - 1, offset)\n : (prev = node.childNodes[offset - 1]).nodeType == 3 ? textRange(prev)\n : prev.nodeType == 1 && prev.nodeName != \"BR\" ? prev : null; // BR nodes tend to only return the rectangle before them\n if (target) {\n var rect$2 = singleRect(target, 1);\n if (rect$2.top < rect$2.bottom) { return flattenV(rect$2, false) }\n }\n } else if (dir > 0 && offset < nodeSize(node)) {\n var next = (void 0), target$1 = node.nodeType == 3 ? textRange(node, offset, offset + 1)\n : (next = node.childNodes[offset]).nodeType == 3 ? textRange(next)\n : next.nodeType == 1 ? next : null;\n if (target$1) {\n var rect$3 = singleRect(target$1, -1);\n if (rect$3.top < rect$3.bottom) { return flattenV(rect$3, true) }\n }\n }\n }\n // All else failed, just try to get a rectangle for the target node\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, 0), false)\n}\n\nfunction flattenV(rect, left) {\n if (rect.width == 0) { return rect }\n var x = left ? rect.left : rect.right;\n return {top: rect.top, bottom: rect.bottom, left: x, right: x}\n}\n\nfunction flattenH(rect, top) {\n if (rect.height == 0) { return rect }\n var y = top ? rect.top : rect.bottom;\n return {top: y, bottom: y, left: rect.left, right: rect.right}\n}\n\nfunction withFlushedState(view, state, f) {\n var viewState = view.state, active = view.root.activeElement;\n if (viewState != state) { view.updateState(state); }\n if (active != view.dom) { view.focus(); }\n try {\n return f()\n } finally {\n if (viewState != state) { view.updateState(viewState); }\n if (active != view.dom) { active.focus(); }\n }\n}\n\n// : (EditorView, number, number)\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\nfunction endOfTextblockVertical(view, state, dir) {\n var sel = state.selection;\n var $pos = dir == \"up\" ? sel.$anchor.min(sel.$head) : sel.$anchor.max(sel.$head);\n return withFlushedState(view, state, function () {\n var ref = view.docView.domFromPos($pos.pos);\n var dom = ref.node;\n for (;;) {\n var nearest = view.docView.nearestDesc(dom, true);\n if (!nearest) { break }\n if (nearest.node.isBlock) { dom = nearest.dom; break }\n dom = nearest.dom.parentNode;\n }\n var coords = coordsAtPos(view, $pos.pos);\n for (var child = dom.firstChild; child; child = child.nextSibling) {\n var boxes = (void 0);\n if (child.nodeType == 1) { boxes = child.getClientRects(); }\n else if (child.nodeType == 3) { boxes = textRange(child, 0, child.nodeValue.length).getClientRects(); }\n else { continue }\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n if (box.bottom > box.top && (dir == \"up\" ? box.bottom < coords.top + 1 : box.top > coords.bottom - 1))\n { return false }\n }\n }\n return true\n })\n}\n\nvar maybeRTL = /[\\u0590-\\u08ac]/;\n\nfunction endOfTextblockHorizontal(view, state, dir) {\n var ref = state.selection;\n var $head = ref.$head;\n if (!$head.parent.isTextblock) { return false }\n var offset = $head.parentOffset, atStart = !offset, atEnd = offset == $head.parent.content.size;\n var sel = getSelection();\n // If the textblock is all LTR, or the browser doesn't support\n // Selection.modify (Edge), fall back to a primitive approach\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify)\n { return dir == \"left\" || dir == \"backward\" ? atStart : atEnd }\n\n return withFlushedState(view, state, function () {\n // This is a huge hack, but appears to be the best we can\n // currently do: use `Selection.modify` to move the selection by\n // one character, and see if that moves the cursor out of the\n // textblock (or doesn't move it at all, when at the start/end of\n // the document).\n var oldRange = sel.getRangeAt(0), oldNode = sel.focusNode, oldOff = sel.focusOffset;\n var oldBidiLevel = sel.caretBidiLevel; // Only for Firefox\n sel.modify(\"move\", dir, \"character\");\n var parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n var result = !parentDOM.contains(sel.focusNode.nodeType == 1 ? sel.focusNode : sel.focusNode.parentNode) ||\n (oldNode == sel.focusNode && oldOff == sel.focusOffset);\n // Restore the previous selection\n sel.removeAllRanges();\n sel.addRange(oldRange);\n if (oldBidiLevel != null) { sel.caretBidiLevel = oldBidiLevel; }\n return result\n })\n}\n\nvar cachedState = null, cachedDir = null, cachedResult = false;\nfunction endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) { return cachedResult }\n cachedState = state; cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\"\n ? endOfTextblockVertical(view, state, dir)\n : endOfTextblockHorizontal(view, state, dir)\n}\n\n// NodeView:: interface\n//\n// By default, document nodes are rendered using the result of the\n// [`toDOM`](#model.NodeSpec.toDOM) method of their spec, and managed\n// entirely by the editor. For some use cases, such as embedded\n// node-specific editing interfaces, you want more control over\n// the behavior of a node's in-editor representation, and need to\n// [define](#view.EditorProps.nodeViews) a custom node view.\n//\n// Objects returned as node views must conform to this interface.\n//\n// dom:: ?dom.Node\n// The outer DOM node that represents the document node. When not\n// given, the default strategy is used to create a DOM node.\n//\n// contentDOM:: ?dom.Node\n// The DOM node that should hold the node's content. Only meaningful\n// if the node view also defines a `dom` property and if its node\n// type is not a leaf node type. When this is present, ProseMirror\n// will take care of rendering the node's children into it. When it\n// is not present, the node view itself is responsible for rendering\n// (or deciding not to render) its child nodes.\n//\n// update:: ?(node: Node, decorations: [Decoration]) → bool\n// When given, this will be called when the view is updating itself.\n// It will be given a node (possibly of a different type), and an\n// array of active decorations (which are automatically drawn, and\n// the node view may ignore if it isn't interested in them), and\n// should return true if it was able to update to that node, and\n// false otherwise. If the node view has a `contentDOM` property (or\n// no `dom` property), updating its child nodes will be handled by\n// ProseMirror.\n//\n// selectNode:: ?()\n// Can be used to override the way the node's selected status (as a\n// node selection) is displayed.\n//\n// deselectNode:: ?()\n// When defining a `selectNode` method, you should also provide a\n// `deselectNode` method to remove the effect again.\n//\n// setSelection:: ?(anchor: number, head: number, root: dom.Document)\n// This will be called to handle setting the selection inside the\n// node. The `anchor` and `head` positions are relative to the start\n// of the node. By default, a DOM selection will be created between\n// the DOM positions corresponding to those positions, but if you\n// override it you can do something else.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to prevent the editor view from trying to handle some\n// or all DOM events that bubble up from the node view. Events for\n// which this returns true are not handled by the editor.\n//\n// ignoreMutation:: ?(dom.MutationRecord) → bool\n// Called when a DOM\n// [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)\n// or a selection change happens within the view. When the change is\n// a selection change, the record will have a `type` property of\n// `\"selection\"` (which doesn't occur for native mutation records).\n// Return false if the editor should re-read the selection or\n// re-parse the range around the mutation, true if it can safely be\n// ignored.\n//\n// destroy:: ?()\n// Called when the node view is removed from the editor or the whole\n// editor is destroyed.\n\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n// corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n// given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\n\nvar NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;\n\n// Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\nvar ViewDesc = function ViewDesc(parent, children, dom, contentDOM) {\n this.parent = parent;\n this.children = children;\n this.dom = dom;\n // An expando property on the DOM node provides a link back to its\n // description.\n dom.pmViewDesc = this;\n // This is the node that holds the child views. It may be null for\n // descs that don't have children.\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n};\n\nvar prototypeAccessors = { beforePosition: { configurable: true },size: { configurable: true },border: { configurable: true },posBefore: { configurable: true },posAtStart: { configurable: true },posAfter: { configurable: true },posAtEnd: { configurable: true },contentLost: { configurable: true } };\n\n// Used to check whether a given description corresponds to a\n// widget/mark/node.\nViewDesc.prototype.matchesWidget = function matchesWidget () { return false };\nViewDesc.prototype.matchesMark = function matchesMark () { return false };\nViewDesc.prototype.matchesNode = function matchesNode () { return false };\nViewDesc.prototype.matchesHack = function matchesHack () { return false };\n\nprototypeAccessors.beforePosition.get = function () { return false };\n\n// : () → ?ParseRule\n// When parsing in-editor content (in domchange.js), we allow\n// descriptions to determine the parse rules that should be used to\n// parse them.\nViewDesc.prototype.parseRule = function parseRule () { return null };\n\n// : (dom.Event) → bool\n// Used by the editor's event handler to ignore events that come\n// from certain descs.\nViewDesc.prototype.stopEvent = function stopEvent () { return false };\n\n// The size of the content represented by this desc.\nprototypeAccessors.size.get = function () {\n var size = 0;\n for (var i = 0; i < this.children.length; i++) { size += this.children[i].size; }\n return size\n};\n\n// For block nodes, this represents the space taken up by their\n// start/end tokens.\nprototypeAccessors.border.get = function () { return 0 };\n\nViewDesc.prototype.destroy = function destroy () {\n this.parent = null;\n if (this.dom.pmViewDesc == this) { this.dom.pmViewDesc = null; }\n for (var i = 0; i < this.children.length; i++)\n { this.children[i].destroy(); }\n};\n\nViewDesc.prototype.posBeforeChild = function posBeforeChild (child) {\n for (var i = 0, pos = this.posAtStart; i < this.children.length; i++) {\n var cur = this.children[i];\n if (cur == child) { return pos }\n pos += cur.size;\n }\n};\n\nprototypeAccessors.posBefore.get = function () {\n return this.parent.posBeforeChild(this)\n};\n\nprototypeAccessors.posAtStart.get = function () {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0\n};\n\nprototypeAccessors.posAfter.get = function () {\n return this.posBefore + this.size\n};\n\nprototypeAccessors.posAtEnd.get = function () {\n return this.posAtStart + this.size - 2 * this.border\n};\n\n// : (dom.Node, number, ?number) → number\nViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset, bias) {\n // If the DOM position is in the content, use the child desc after\n // it to figure out a position.\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n var domBefore, desc;\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) { dom = dom.parentNode; }\n domBefore = dom.previousSibling;\n }\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) { domBefore = domBefore.previousSibling; }\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart\n } else {\n var domAfter, desc$1;\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) { dom = dom.parentNode; }\n domAfter = dom.nextSibling;\n }\n while (domAfter && !((desc$1 = domAfter.pmViewDesc) && desc$1.parent == this)) { domAfter = domAfter.nextSibling; }\n return domAfter ? this.posBeforeChild(desc$1) : this.posAtEnd\n }\n }\n // Otherwise, use various heuristics, falling back on the bias\n // parameter, to determine whether to return the position at the\n // start or at the end of this view desc.\n var atEnd;\n if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) { for (var search = dom;; search = search.parentNode) {\n if (search == this.dom) { atEnd = false; break }\n if (search.parentNode.firstChild != search) { break }\n } }\n if (atEnd == null && offset == dom.childNodes.length) { for (var search$1 = dom;; search$1 = search$1.parentNode) {\n if (search$1 == this.dom) { atEnd = true; break }\n if (search$1.parentNode.lastChild != search$1) { break }\n } }\n }\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart\n};\n\n// Scan up the dom finding the first desc that is a descendant of\n// this one.\nViewDesc.prototype.nearestDesc = function nearestDesc (dom, onlyNodes) {\n for (var first = true, cur = dom; cur; cur = cur.parentNode) {\n var desc = this.getDesc(cur);\n if (desc && (!onlyNodes || desc.node)) {\n // If dom is outside of this desc's nodeDOM, don't count it.\n if (first && desc.nodeDOM && !(desc.nodeDOM.nodeType == 1 ? desc.nodeDOM.contains(dom) : desc.nodeDOM == dom)) { first = false; }\n else { return desc }\n }\n }\n};\n\nViewDesc.prototype.getDesc = function getDesc (dom) {\n var desc = dom.pmViewDesc;\n for (var cur = desc; cur; cur = cur.parent) { if (cur == this) { return desc } }\n};\n\nViewDesc.prototype.posFromDOM = function posFromDOM (dom, offset, bias) {\n for (var scan = dom;; scan = scan.parentNode) {\n var desc = this.getDesc(scan);\n if (desc) { return desc.localPosFromDOM(dom, offset, bias) }\n }\n};\n\n// : (number) → ?NodeViewDesc\n// Find the desc for the node after the given pos, if any. (When a\n// parent node overrode rendering, there might not be one.)\nViewDesc.prototype.descAt = function descAt (pos) {\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) { child = child.children[0]; }\n return child\n }\n if (pos < end) { return child.descAt(pos - offset - child.border) }\n offset = end;\n }\n};\n\n// : (number) → {node: dom.Node, offset: number}\nViewDesc.prototype.domFromPos = function domFromPos (pos) {\n if (!this.contentDOM) { return {node: this.dom, offset: 0} }\n for (var offset = 0, i = 0;; i++) {\n if (offset == pos) {\n while (i < this.children.length && (this.children[i].beforePosition || this.children[i].dom.parentNode != this.contentDOM)) { i++; }\n return {node: this.contentDOM,\n offset: i == this.children.length ? this.contentDOM.childNodes.length : domIndex(this.children[i].dom)}\n }\n if (i == this.children.length) { throw new Error(\"Invalid position \" + pos) }\n var child = this.children[i], end = offset + child.size;\n if (pos < end) { return child.domFromPos(pos - offset - child.border) }\n offset = end;\n }\n};\n\n// Used to find a DOM range in a single parent for a given changed\n// range.\nViewDesc.prototype.parseRange = function parseRange (from, to, base) {\n if ( base === void 0 ) base = 0;\n\n if (this.children.length == 0)\n { return {node: this.contentDOM, from: from, to: to, fromOffset: 0, toOffset: this.contentDOM.childNodes.length} }\n\n var fromOffset = -1, toOffset = -1;\n for (var offset = base, i = 0;; i++) {\n var child = this.children[i], end = offset + child.size;\n if (fromOffset == -1 && from <= end) {\n var childBase = offset + child.border;\n // FIXME maybe descend mark views to parse a narrower range?\n if (from >= childBase && to <= end - child.border && child.node &&\n child.contentDOM && this.contentDOM.contains(child.contentDOM))\n { return child.parseRange(from, to, childBase) }\n\n from = offset;\n for (var j = i; j > 0; j--) {\n var prev = this.children[j - 1];\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break\n }\n from -= prev.size;\n }\n if (fromOffset == -1) { fromOffset = 0; }\n }\n if (fromOffset > -1 && to <= end) {\n to = end;\n for (var j$1 = i + 1; j$1 < this.children.length; j$1++) {\n var next = this.children[j$1];\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break\n }\n to += next.size;\n }\n if (toOffset == -1) { toOffset = this.contentDOM.childNodes.length; }\n break\n }\n offset = end;\n }\n return {node: this.contentDOM, from: from, to: to, fromOffset: fromOffset, toOffset: toOffset}\n};\n\nViewDesc.prototype.emptyChildAt = function emptyChildAt (side) {\n if (this.border || !this.contentDOM || !this.children.length) { return false }\n var child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side)\n};\n\n// : (number) → dom.Node\nViewDesc.prototype.domAfterPos = function domAfterPos (pos) {\n var ref = this.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n if (node.nodeType != 1 || offset == node.childNodes.length)\n { throw new RangeError(\"No node after pos \" + pos) }\n return node.childNodes[offset]\n};\n\n// : (number, number, dom.Document)\n// View descs are responsible for setting any selection that falls\n// entirely inside of them, so that custom implementations can do\n// custom things with the selection. Note that this falls apart when\n// a selection starts in such a node and ends in another, in which\n// case we just use whatever domFromPos produces as a best effort.\nViewDesc.prototype.setSelection = function setSelection (anchor, head, root, force) {\n // If the selection falls entirely in a child, give it to that child\n var from = Math.min(anchor, head), to = Math.max(anchor, head);\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (from > offset && to < end)\n { return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force) }\n offset = end;\n }\n\n var anchorDOM = this.domFromPos(anchor), headDOM = this.domFromPos(head);\n var domSel = root.getSelection(), range = document.createRange();\n if (!force &&\n isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) &&\n isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset))\n { return }\n\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n if (domSel.extend) {\n range.setEnd(anchorDOM.node, anchorDOM.offset);\n range.collapse(false);\n } else {\n if (anchor > head) { var tmp = anchorDOM; anchorDOM = headDOM; headDOM = tmp; }\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n }\n domSel.removeAllRanges();\n domSel.addRange(range);\n if (domSel.extend)\n { domSel.extend(headDOM.node, headDOM.offset); }\n};\n\n// : (dom.MutationRecord) → bool\nViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return !this.contentDOM && mutation.type != \"selection\"\n};\n\nprototypeAccessors.contentLost.get = function () {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM)\n};\n\n// Remove a subtree of the element tree that has been touched\n// by a DOM change, so that the next update will redraw it.\nViewDesc.prototype.markDirty = function markDirty (from, to) {\n for (var offset = 0, i = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n var startInside = offset + child.border, endInside = end - child.border;\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n if (from == startInside && to == endInside &&\n (child.contentLost || child.dom.parentNode != this.contentDOM)) { child.dirty = NODE_DIRTY; }\n else { child.markDirty(from - startInside, to - startInside); }\n return\n } else {\n child.dirty = NODE_DIRTY;\n }\n }\n offset = end;\n }\n this.dirty = CONTENT_DIRTY;\n};\n\nViewDesc.prototype.markParentsDirty = function markParentsDirty () {\n for (var node = this.parent; node; node = node.parent) {\n var dirty = CONTENT_DIRTY ;\n if (node.dirty < dirty) { node.dirty = dirty; }\n }\n};\n\nObject.defineProperties( ViewDesc.prototype, prototypeAccessors );\n\n// Reused array to avoid allocating fresh arrays for things that will\n// stay empty anyway.\nvar nothing = [];\n\n// A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\nvar WidgetViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function WidgetViewDesc(parent, widget, view, pos) {\n var self, dom = widget.type.toDOM;\n if (typeof dom == \"function\") { dom = dom(view, function () {\n if (!self) { return pos }\n if (self.parent) { return self.parent.posBeforeChild(self) }\n }); }\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n var wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n dom.contentEditable = false;\n dom.classList.add(\"ProseMirror-widget\");\n }\n ViewDesc.call(this, parent, nothing, dom, null);\n this.widget = widget;\n self = this;\n }\n\n if ( ViewDesc ) WidgetViewDesc.__proto__ = ViewDesc;\n WidgetViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n WidgetViewDesc.prototype.constructor = WidgetViewDesc;\n\n var prototypeAccessors$1 = { beforePosition: { configurable: true } };\n\n prototypeAccessors$1.beforePosition.get = function () {\n return this.widget.type.side < 0\n };\n\n WidgetViewDesc.prototype.matchesWidget = function matchesWidget (widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type)\n };\n\n WidgetViewDesc.prototype.parseRule = function parseRule () { return {ignore: true} };\n\n WidgetViewDesc.prototype.stopEvent = function stopEvent (event) {\n var stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false\n };\n\n WidgetViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection\n };\n\n Object.defineProperties( WidgetViewDesc.prototype, prototypeAccessors$1 );\n\n return WidgetViewDesc;\n}(ViewDesc));\n\nvar CompositionViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function CompositionViewDesc(parent, dom, textDOM, text) {\n ViewDesc.call(this, parent, nothing, dom, null);\n this.textDOM = textDOM;\n this.text = text;\n }\n\n if ( ViewDesc ) CompositionViewDesc.__proto__ = ViewDesc;\n CompositionViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n CompositionViewDesc.prototype.constructor = CompositionViewDesc;\n\n var prototypeAccessors$2 = { size: { configurable: true } };\n\n prototypeAccessors$2.size.get = function () { return this.text.length };\n\n CompositionViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset) {\n if (dom != this.textDOM) { return this.posAtStart + (offset ? this.size : 0) }\n return this.posAtStart + offset\n };\n\n CompositionViewDesc.prototype.domFromPos = function domFromPos (pos) {\n return {node: this.textDOM, offset: pos}\n };\n\n CompositionViewDesc.prototype.ignoreMutation = function ignoreMutation (mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue\n };\n\n Object.defineProperties( CompositionViewDesc.prototype, prototypeAccessors$2 );\n\n return CompositionViewDesc;\n}(ViewDesc));\n\n// A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\nvar MarkViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function MarkViewDesc(parent, mark, dom, contentDOM) {\n ViewDesc.call(this, parent, [], dom, contentDOM);\n this.mark = mark;\n }\n\n if ( ViewDesc ) MarkViewDesc.__proto__ = ViewDesc;\n MarkViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n MarkViewDesc.prototype.constructor = MarkViewDesc;\n\n MarkViewDesc.create = function create (parent, mark, inline, view) {\n var custom = view.nodeViews[mark.type.name];\n var spec = custom && custom(mark, view, inline);\n if (!spec || !spec.dom)\n { spec = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, mark.type.spec.toDOM(mark, inline)); }\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom)\n };\n\n MarkViewDesc.prototype.parseRule = function parseRule () { return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM} };\n\n MarkViewDesc.prototype.matchesMark = function matchesMark (mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark) };\n\n MarkViewDesc.prototype.markDirty = function markDirty (from, to) {\n ViewDesc.prototype.markDirty.call(this, from, to);\n // Move dirty info to nearest node view\n if (this.dirty != NOT_DIRTY) {\n var parent = this.parent;\n while (!parent.node) { parent = parent.parent; }\n if (parent.dirty < this.dirty) { parent.dirty = this.dirty; }\n this.dirty = NOT_DIRTY;\n }\n };\n\n MarkViewDesc.prototype.slice = function slice (from, to, view) {\n var copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n var nodes = this.children, size = this.size;\n if (to < size) { nodes = replaceNodes(nodes, to, size, view); }\n if (from > 0) { nodes = replaceNodes(nodes, 0, from, view); }\n for (var i = 0; i < nodes.length; i++) { nodes[i].parent = copy; }\n copy.children = nodes;\n return copy\n };\n\n return MarkViewDesc;\n}(ViewDesc));\n\n// Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\nvar NodeViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n ViewDesc.call(this, parent, node.isLeaf ? nothing : [], dom, contentDOM);\n this.nodeDOM = nodeDOM;\n this.node = node;\n this.outerDeco = outerDeco;\n this.innerDeco = innerDeco;\n if (contentDOM) { this.updateChildren(view, pos); }\n }\n\n if ( ViewDesc ) NodeViewDesc.__proto__ = ViewDesc;\n NodeViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n NodeViewDesc.prototype.constructor = NodeViewDesc;\n\n var prototypeAccessors$3 = { size: { configurable: true },border: { configurable: true } };\n\n // By default, a node is rendered using the `toDOM` method from the\n // node type spec. But client code can use the `nodeViews` spec to\n // supply a custom node view, which can influence various aspects of\n // the way the node works.\n //\n // (Using subclassing for this was intentionally decided against,\n // since it'd require exposing a whole slew of finnicky\n // implementation details to the user code that they probably will\n // never need.)\n NodeViewDesc.create = function create (parent, node, outerDeco, innerDeco, view, pos) {\n var assign;\n\n var custom = view.nodeViews[node.type.name], descObj;\n var spec = custom && custom(node, view, function () {\n // (This is a function that allows the custom view to find its\n // own position)\n if (!descObj) { return pos }\n if (descObj.parent) { return descObj.parent.posBeforeChild(descObj) }\n }, outerDeco);\n\n var dom = spec && spec.dom, contentDOM = spec && spec.contentDOM;\n if (node.isText) {\n if (!dom) { dom = document.createTextNode(node.text); }\n else if (dom.nodeType != 3) { throw new RangeError(\"Text must be rendered as a DOM text node\") }\n } else if (!dom) {\n((assign = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, node.type.spec.toDOM(node)), dom = assign.dom, contentDOM = assign.contentDOM));\n }\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") { // Chrome gets confused by
          \n if (!dom.hasAttribute(\"contenteditable\")) { dom.contentEditable = false; }\n if (node.type.spec.draggable) { dom.draggable = true; }\n }\n\n var nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n\n if (spec)\n { return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM,\n spec, view, pos + 1) }\n else if (node.isText)\n { return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) }\n else\n { return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos + 1) }\n };\n\n NodeViewDesc.prototype.parseRule = function parseRule () {\n var this$1 = this;\n\n // Experimental kludge to allow opt-in re-parsing of nodes\n if (this.node.type.spec.reparseInView) { return null }\n // FIXME the assumption that this can always return the current\n // attrs means that if the user somehow manages to change the\n // attrs in the dom, that won't be picked up. Not entirely sure\n // whether this is a problem\n var rule = {node: this.node.type.name, attrs: this.node.attrs};\n if (this.node.type.spec.code) { rule.preserveWhitespace = \"full\"; }\n if (this.contentDOM && !this.contentLost) { rule.contentElement = this.contentDOM; }\n else { rule.getContent = function () { return this$1.contentDOM ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : this$1.node.content; }; }\n return rule\n };\n\n NodeViewDesc.prototype.matchesNode = function matchesNode (node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) &&\n sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco)\n };\n\n prototypeAccessors$3.size.get = function () { return this.node.nodeSize };\n\n prototypeAccessors$3.border.get = function () { return this.node.isLeaf ? 0 : 1 };\n\n // Syncs `this.children` to match `this.node.content` and the local\n // decorations, possibly introducing nesting for marks. Then, in a\n // separate step, syncs the DOM inside `this.contentDOM` to\n // `this.children`.\n NodeViewDesc.prototype.updateChildren = function updateChildren (view, pos) {\n var this$1 = this;\n\n var inline = this.node.inlineContent, off = pos;\n var composition = inline && view.composing && this.localCompositionNode(view, pos);\n var updater = new ViewTreeUpdater(this, composition && composition.node);\n iterDeco(this.node, this.innerDeco, function (widget, i, insideNode) {\n if (widget.spec.marks)\n { updater.syncToMarks(widget.spec.marks, inline, view); }\n else if (widget.type.side >= 0 && !insideNode)\n { updater.syncToMarks(i == this$1.node.childCount ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Mark\"].none : this$1.node.child(i).marks, inline, view); }\n // If the next node is a desc matching this widget, reuse it,\n // otherwise insert the widget as a new view desc.\n updater.placeWidget(widget, view, off);\n }, function (child, outerDeco, innerDeco, i) {\n // Make sure the wrapping mark descs match the node's marks.\n updater.syncToMarks(child.marks, inline, view);\n // Either find an existing desc that exactly matches this node,\n // and drop the descs before it.\n updater.findNodeMatch(child, outerDeco, innerDeco, i) ||\n // Or try updating the next desc to reflect this node.\n updater.updateNextNode(child, outerDeco, innerDeco, view, i) ||\n // Or just add it as a new desc.\n updater.addNode(child, outerDeco, innerDeco, view, off);\n off += child.nodeSize;\n });\n // Drop all remaining descs after the current position.\n updater.syncToMarks(nothing, inline, view);\n if (this.node.isTextblock) { updater.addTextblockHacks(); }\n updater.destroyRest();\n\n // Sync the DOM if anything changed\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n // May have to protect focused DOM from being changed if a composition is active\n if (composition) { this.protectLocalComposition(view, composition); }\n this.renderChildren();\n }\n };\n\n NodeViewDesc.prototype.renderChildren = function renderChildren () {\n renderDescs(this.contentDOM, this.children);\n if (result.ios) { iosHacks(this.dom); }\n };\n\n NodeViewDesc.prototype.localCompositionNode = function localCompositionNode (view, pos) {\n // Only do something if both the selection and a focused text node\n // are inside of this node, and the node isn't already part of a\n // view that's a child of this view\n var ref = view.state.selection;\n var from = ref.from;\n var to = ref.to;\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || from < pos || to > pos + this.node.content.size) { return }\n var sel = view.root.getSelection();\n var textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);\n if (!textNode || !this.dom.contains(textNode.parentNode)) { return }\n\n // Find the text in the focused node in the node, stop if it's not\n // there (may have been modified through other means, in which\n // case it should overwritten)\n var text = textNode.nodeValue;\n var textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n\n return textPos < 0 ? null : {node: textNode, pos: textPos, text: text}\n };\n\n NodeViewDesc.prototype.protectLocalComposition = function protectLocalComposition (view, ref) {\n var node = ref.node;\n var pos = ref.pos;\n var text = ref.text;\n\n // The node is already part of a local view desc, leave it there\n if (this.getDesc(node)) { return }\n\n // Create a composition view for the orphaned nodes\n var topNode = node;\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) { break }\n while (topNode.previousSibling) { topNode.parentNode.removeChild(topNode.previousSibling); }\n while (topNode.nextSibling) { topNode.parentNode.removeChild(topNode.nextSibling); }\n if (topNode.pmViewDesc) { topNode.pmViewDesc = null; }\n }\n var desc = new CompositionViewDesc(this, topNode, node, text);\n view.compositionNodes.push(desc);\n\n // Patch up this.children to contain the composition view\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n };\n\n // : (Node, [Decoration], DecorationSet, EditorView) → bool\n // If this desc be updated to match the given node decoration,\n // do so and return true.\n NodeViewDesc.prototype.update = function update (node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY ||\n !node.sameMarkup(this.node)) { return false }\n this.updateInner(node, outerDeco, innerDeco, view);\n return true\n };\n\n NodeViewDesc.prototype.updateInner = function updateInner (node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n if (this.contentDOM) { this.updateChildren(view, this.posAtStart); }\n this.dirty = NOT_DIRTY;\n };\n\n NodeViewDesc.prototype.updateOuterDeco = function updateOuterDeco (outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) { return }\n var needsWrap = this.nodeDOM.nodeType != 1;\n var oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM,\n computeOuterDeco(this.outerDeco, this.node, needsWrap),\n computeOuterDeco(outerDeco, this.node, needsWrap));\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = null;\n this.dom.pmViewDesc = this;\n }\n this.outerDeco = outerDeco;\n };\n\n // Mark this node as being the selected node.\n NodeViewDesc.prototype.selectNode = function selectNode () {\n this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) { this.dom.draggable = true; }\n };\n\n // Remove selected node marking from this node.\n NodeViewDesc.prototype.deselectNode = function deselectNode () {\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) { this.dom.draggable = false; }\n };\n\n Object.defineProperties( NodeViewDesc.prototype, prototypeAccessors$3 );\n\n return NodeViewDesc;\n}(ViewDesc));\n\n// Create a view desc for the top-level document node, to be exported\n// and used by the view class.\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0)\n}\n\nvar TextViewDesc = /*@__PURE__*/(function (NodeViewDesc) {\n function TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view);\n }\n\n if ( NodeViewDesc ) TextViewDesc.__proto__ = NodeViewDesc;\n TextViewDesc.prototype = Object.create( NodeViewDesc && NodeViewDesc.prototype );\n TextViewDesc.prototype.constructor = TextViewDesc;\n\n TextViewDesc.prototype.parseRule = function parseRule () {\n return {skip: this.nodeDOM.parentNode || true}\n };\n\n TextViewDesc.prototype.update = function update (node, outerDeco) {\n if (this.dirty == NODE_DIRTY || (this.dirty != NOT_DIRTY && !this.inParent()) ||\n !node.sameMarkup(this.node)) { return false }\n this.updateOuterDeco(outerDeco);\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue)\n { this.nodeDOM.nodeValue = node.text; }\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true\n };\n\n TextViewDesc.prototype.inParent = function inParent () {\n var parentDOM = this.parent.contentDOM;\n for (var n = this.nodeDOM; n; n = n.parentNode) { if (n == parentDOM) { return true } }\n return false\n };\n\n TextViewDesc.prototype.domFromPos = function domFromPos (pos) {\n return {node: this.nodeDOM, offset: pos}\n };\n\n TextViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset, bias) {\n if (dom == this.nodeDOM) { return this.posAtStart + Math.min(offset, this.node.text.length) }\n return NodeViewDesc.prototype.localPosFromDOM.call(this, dom, offset, bias)\n };\n\n TextViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\"\n };\n\n TextViewDesc.prototype.slice = function slice (from, to, view) {\n var node = this.node.cut(from, to), dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view)\n };\n\n return TextViewDesc;\n}(NodeViewDesc));\n\n// A dummy desc used to tag trailing BR or span nodes created to work\n// around contentEditable terribleness.\nvar BRHackViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function BRHackViewDesc () {\n ViewDesc.apply(this, arguments);\n }\n\n if ( ViewDesc ) BRHackViewDesc.__proto__ = ViewDesc;\n BRHackViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n BRHackViewDesc.prototype.constructor = BRHackViewDesc;\n\n BRHackViewDesc.prototype.parseRule = function parseRule () { return {ignore: true} };\n BRHackViewDesc.prototype.matchesHack = function matchesHack () { return this.dirty == NOT_DIRTY };\n\n return BRHackViewDesc;\n}(ViewDesc));\n\n// A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\nvar CustomNodeViewDesc = /*@__PURE__*/(function (NodeViewDesc) {\n function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n this.spec = spec;\n }\n\n if ( NodeViewDesc ) CustomNodeViewDesc.__proto__ = NodeViewDesc;\n CustomNodeViewDesc.prototype = Object.create( NodeViewDesc && NodeViewDesc.prototype );\n CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc;\n\n // A custom `update` method gets to decide whether the update goes\n // through. If it does, and there's a `contentDOM` node, our logic\n // updates the children.\n CustomNodeViewDesc.prototype.update = function update (node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) { return false }\n if (this.spec.update) {\n var result = this.spec.update(node, outerDeco);\n if (result) { this.updateInner(node, outerDeco, innerDeco, view); }\n return result\n } else if (!this.contentDOM && !node.isLeaf) {\n return false\n } else {\n return NodeViewDesc.prototype.update.call(this, node, outerDeco, innerDeco, view)\n }\n };\n\n CustomNodeViewDesc.prototype.selectNode = function selectNode () {\n this.spec.selectNode ? this.spec.selectNode() : NodeViewDesc.prototype.selectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.deselectNode = function deselectNode () {\n this.spec.deselectNode ? this.spec.deselectNode() : NodeViewDesc.prototype.deselectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.setSelection = function setSelection (anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root)\n : NodeViewDesc.prototype.setSelection.call(this, anchor, head, root, force);\n };\n\n CustomNodeViewDesc.prototype.destroy = function destroy () {\n if (this.spec.destroy) { this.spec.destroy(); }\n NodeViewDesc.prototype.destroy.call(this);\n };\n\n CustomNodeViewDesc.prototype.stopEvent = function stopEvent (event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false\n };\n\n CustomNodeViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : NodeViewDesc.prototype.ignoreMutation.call(this, mutation)\n };\n\n return CustomNodeViewDesc;\n}(NodeViewDesc));\n\n// : (dom.Node, [ViewDesc])\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\nfunction renderDescs(parentDOM, descs) {\n var dom = parentDOM.firstChild;\n for (var i = 0; i < descs.length; i++) {\n var desc = descs[i], childDOM = desc.dom;\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) { dom = rm(dom); }\n dom = dom.nextSibling;\n } else {\n parentDOM.insertBefore(childDOM, dom);\n }\n if (desc instanceof MarkViewDesc) {\n var pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n while (dom) { dom = rm(dom); }\n}\n\nfunction OuterDecoLevel(nodeName) {\n if (nodeName) { this.nodeName = nodeName; }\n}\nOuterDecoLevel.prototype = Object.create(null);\n\nvar noDeco = [new OuterDecoLevel];\n\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) { return noDeco }\n\n var top = needsWrap ? noDeco[0] : new OuterDecoLevel, result = [top];\n\n for (var i = 0; i < outerDeco.length; i++) {\n var attrs = outerDeco[i].type.attrs, cur = top;\n if (!attrs) { continue }\n if (attrs.nodeName)\n { result.push(cur = new OuterDecoLevel(attrs.nodeName)); }\n\n for (var name in attrs) {\n var val = attrs[name];\n if (val == null) { continue }\n if (needsWrap && result.length == 1)\n { result.push(cur = top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\")); }\n if (name == \"class\") { cur.class = (cur.class ? cur.class + \" \" : \"\") + val; }\n else if (name == \"style\") { cur.style = (cur.style ? cur.style + \";\" : \"\") + val; }\n else if (name != \"nodeName\") { cur[name] = val; }\n }\n }\n\n return result\n}\n\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n // Shortcut for trivial case\n if (prevComputed == noDeco && curComputed == noDeco) { return nodeDOM }\n\n var curDOM = nodeDOM;\n for (var i = 0; i < curComputed.length; i++) {\n var deco = curComputed[i], prev = prevComputed[i];\n if (i) {\n var parent = (void 0);\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM &&\n (parent = curDOM.parentNode) && parent.tagName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n return curDOM\n}\n\nfunction patchAttributes(dom, prev, cur) {\n for (var name in prev)\n { if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur))\n { dom.removeAttribute(name); } }\n for (var name$1 in cur)\n { if (name$1 != \"class\" && name$1 != \"style\" && name$1 != \"nodeName\" && cur[name$1] != prev[name$1])\n { dom.setAttribute(name$1, cur[name$1]); } }\n if (prev.class != cur.class) {\n var prevList = prev.class ? prev.class.split(\" \") : nothing;\n var curList = cur.class ? cur.class.split(\" \") : nothing;\n for (var i = 0; i < prevList.length; i++) { if (curList.indexOf(prevList[i]) == -1)\n { dom.classList.remove(prevList[i]); } }\n for (var i$1 = 0; i$1 < curList.length; i$1++) { if (prevList.indexOf(curList[i$1]) == -1)\n { dom.classList.add(curList[i$1]); } }\n }\n if (prev.style != cur.style) {\n if (prev.style) {\n var prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g, m;\n while (m = prop.exec(prev.style))\n { dom.style.removeProperty(m[1]); }\n }\n if (cur.style)\n { dom.style.cssText += cur.style; }\n }\n}\n\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1))\n}\n\n// : ([Decoration], [Decoration]) → bool\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++) { if (!a[i].type.eq(b[i].type)) { return false } }\n return true\n}\n\n// Remove a DOM node and return its next sibling.\nfunction rm(dom) {\n var next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next\n}\n\n// Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\nvar ViewTreeUpdater = function ViewTreeUpdater(top, lockedNode) {\n this.top = top;\n this.lock = lockedNode;\n // Index into `this.top`'s child array, represents the current\n // update position.\n this.index = 0;\n // When entering a mark, the current top and index are pushed\n // onto this.\n this.stack = [];\n // Tracks whether anything was changed\n this.changed = false;\n\n var pre = preMatch(top.node.content, top.children);\n this.preMatched = pre.nodes;\n this.preMatchOffset = pre.offset;\n};\n\nViewTreeUpdater.prototype.getPreMatch = function getPreMatch (index) {\n return index >= this.preMatchOffset ? this.preMatched[index - this.preMatchOffset] : null\n};\n\n// Destroy and remove the children between the given indices in\n// `this.top`.\nViewTreeUpdater.prototype.destroyBetween = function destroyBetween (start, end) {\n if (start == end) { return }\n for (var i = start; i < end; i++) { this.top.children[i].destroy(); }\n this.top.children.splice(start, end - start);\n this.changed = true;\n};\n\n// Destroy all remaining children in `this.top`.\nViewTreeUpdater.prototype.destroyRest = function destroyRest () {\n this.destroyBetween(this.index, this.top.children.length);\n};\n\n// : ([Mark], EditorView)\n// Sync the current stack of mark descs with the given array of\n// marks, reusing existing mark descs when possible.\nViewTreeUpdater.prototype.syncToMarks = function syncToMarks (marks, inline, view) {\n var keep = 0, depth = this.stack.length >> 1;\n var maxKeep = Math.min(depth, marks.length);\n while (keep < maxKeep &&\n (keep == depth - 1 ? this.top : this.stack[(keep + 1) << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false)\n { keep++; }\n\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n var found = -1;\n for (var i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n if (this.top.children[i].matchesMark(marks[depth])) { found = i; break }\n }\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n this.top = this.top.children[this.index];\n } else {\n var markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n this.index = 0;\n depth++;\n }\n};\n\n// : (Node, [Decoration], DecorationSet) → bool\n// Try to find a node desc matching the given data. Skip over it and\n// return true when successful.\nViewTreeUpdater.prototype.findNodeMatch = function findNodeMatch (node, outerDeco, innerDeco, index) {\n var found = -1, preMatch = index < 0 ? undefined : this.getPreMatch(index), children = this.top.children;\n if (preMatch && preMatch.matchesNode(node, outerDeco, innerDeco)) {\n found = children.indexOf(preMatch);\n } else {\n for (var i = this.index, e = Math.min(children.length, i + 5); i < e; i++) {\n var child = children[i];\n if (child.matchesNode(node, outerDeco, innerDeco) && this.preMatched.indexOf(child) < 0) {\n found = i;\n break\n }\n }\n }\n if (found < 0) { return false }\n this.destroyBetween(this.index, found);\n this.index++;\n return true\n};\n\n// : (Node, [Decoration], DecorationSet, EditorView, Fragment, number) → bool\n// Try to update the next node, if any, to the given data. Checks\n// pre-matches to avoid overwriting nodes that could still be used.\nViewTreeUpdater.prototype.updateNextNode = function updateNextNode (node, outerDeco, innerDeco, view, index) {\n if (this.index == this.top.children.length) { return false }\n var next = this.top.children[this.index];\n if (next instanceof NodeViewDesc) {\n var preMatch = this.preMatched.indexOf(next);\n if (preMatch > -1 && preMatch + this.preMatchOffset != index) { return false }\n var nextDOM = next.dom;\n\n // Can't update if nextDOM is or contains this.lock, except if\n // it's a text node whose content already matches the new text\n // and whose decorations match the new ones.\n var locked = this.lock && (nextDOM == this.lock || nextDOM.nodeType == 1 && nextDOM.contains(this.lock.parentNode)) &&\n !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text &&\n next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n if (next.dom != nextDOM) { this.changed = true; }\n this.index++;\n return true\n }\n }\n return false\n};\n\n// : (Node, [Decoration], DecorationSet, EditorView)\n// Insert the node as a newly created node desc.\nViewTreeUpdater.prototype.addNode = function addNode (node, outerDeco, innerDeco, view, pos) {\n this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos));\n this.changed = true;\n};\n\nViewTreeUpdater.prototype.placeWidget = function placeWidget (widget, view, pos) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesWidget(widget)) {\n this.index++;\n } else {\n var desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n};\n\n// Make sure a textblock looks and behaves correctly in\n// contentEditable.\nViewTreeUpdater.prototype.addTextblockHacks = function addTextblockHacks () {\n var lastChild = this.top.children[this.index - 1];\n while (lastChild instanceof MarkViewDesc) { lastChild = lastChild.children[lastChild.children.length - 1]; }\n\n if (!lastChild || // Empty textblock\n !(lastChild instanceof TextViewDesc) ||\n /\\n$/.test(lastChild.node.text)) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesHack()) {\n this.index++;\n } else {\n var dom = document.createElement(\"br\");\n this.top.children.splice(this.index++, 0, new BRHackViewDesc(this.top, nothing, dom, null));\n this.changed = true;\n }\n }\n};\n\n// : (Fragment, [ViewDesc]) → [ViewDesc]\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing\n// those for other nodes. Returns an array whose positions correspond\n// to node positions in the fragment, and whose elements are either\n// descs matched to the child at that index, or empty.\nfunction preMatch(frag, descs) {\n var result = [], end = frag.childCount;\n for (var i = descs.length - 1; end > 0 && i >= 0; i--) {\n var desc = descs[i], node = desc.node;\n if (!node) { continue }\n if (node != frag.child(end - 1)) { break }\n result.push(desc);\n --end;\n }\n return {nodes: result.reverse(), offset: end}\n}\n\nfunction compareSide(a, b) { return a.type.side - b.type.side }\n\n// : (ViewDesc, DecorationSet, (Decoration, number), (Node, [Decoration], DecorationSet, number))\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\nfunction iterDeco(parent, deco, onWidget, onNode) {\n var locals = deco.locals(parent), offset = 0;\n // Simple, cheap variant for when there are no local decorations\n if (locals.length == 0) {\n for (var i = 0; i < parent.childCount; i++) {\n var child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n return\n }\n\n var decoIndex = 0, active = [], restNode = null;\n for (var parentIndex = 0;;) {\n if (decoIndex < locals.length && locals[decoIndex].to == offset) {\n var widget = locals[decoIndex++], widgets = (void 0);\n while (decoIndex < locals.length && locals[decoIndex].to == offset)\n { (widgets || (widgets = [widget])).push(locals[decoIndex++]); }\n if (widgets) {\n widgets.sort(compareSide);\n for (var i$1 = 0; i$1 < widgets.length; i$1++) { onWidget(widgets[i$1], parentIndex, !!restNode); }\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n\n var child$1 = (void 0), index = (void 0);\n if (restNode) {\n index = -1;\n child$1 = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n child$1 = parent.child(parentIndex++);\n } else {\n break\n }\n\n for (var i$2 = 0; i$2 < active.length; i$2++) { if (active[i$2].to <= offset) { active.splice(i$2--, 1); } }\n while (decoIndex < locals.length && locals[decoIndex].from == offset) { active.push(locals[decoIndex++]); }\n\n var end = offset + child$1.nodeSize;\n if (child$1.isText) {\n var cutAt = end;\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) { cutAt = locals[decoIndex].from; }\n for (var i$3 = 0; i$3 < active.length; i$3++) { if (active[i$3].to < cutAt) { cutAt = active[i$3].to; } }\n if (cutAt < end) {\n restNode = child$1.cut(cutAt - offset);\n child$1 = child$1.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n }\n\n onNode(child$1, active.length ? active.slice() : nothing, deco.forChild(offset, child$1), index);\n offset = end;\n }\n}\n\n// List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n var oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\n\nfunction nearbyTextNode(node, offset) {\n for (;;) {\n if (node.nodeType == 3) { return node }\n if (node.nodeType == 1 && offset > 0) {\n if (node.childNodes.length > offset && node.childNodes[offset].nodeType == 3)\n { return node.childNodes[offset] }\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.nodeType == 1 && offset < node.childNodes.length) {\n node = node.childNodes[offset];\n offset = 0;\n } else {\n return null\n }\n }\n}\n\n// Find a piece of text in an inline fragment, overlapping from-to\nfunction findTextInFragment(frag, text, from, to) {\n for (var i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n var child = frag.child(i++), childStart = pos;\n pos += child.nodeSize;\n if (!child.isText) { continue }\n var str = child.text;\n while (i < frag.childCount) {\n var next = frag.child(i++);\n pos += next.nodeSize;\n if (!next.isText) { break }\n str += next.text;\n }\n if (pos >= from) {\n var found = str.lastIndexOf(text, to - childStart);\n if (found >= 0 && found + text.length + childStart >= from)\n { return childStart + found }\n }\n }\n return -1\n}\n\n// Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\nfunction replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}\n\nfunction moveSelectionBlock(state, dir) {\n var ref = state.selection;\n var $anchor = ref.$anchor;\n var $head = ref.$head;\n var $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n var $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom($start, dir)\n}\n\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true\n}\n\nfunction selectHorizontally(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (!sel.empty || mods.indexOf(\"s\") > -1) {\n return false\n } else if (view.endOfTextblock(dir > 0 ? \"right\" : \"left\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && (next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"])) { return apply(view, next) }\n return false\n } else {\n var $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc;\n if (!node || node.isText) { return false }\n var nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) { return false }\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head))\n } else if (result.webkit) {\n // Chrome and Safari will introduce extra pointless cursor\n // positions around inline uneditable nodes, so we have to\n // take over and move the cursor past them (#937)\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)))\n } else {\n return false\n }\n }\n } else if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && sel.node.isInline) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](dir > 0 ? sel.$to : sel.$from))\n } else {\n var next$1 = moveSelectionBlock(view.state, dir);\n if (next$1) { return apply(view, next$1) }\n return false\n }\n}\n\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length\n}\n\nfunction isIgnorable(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != \"BR\")\n}\n\n// Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\nfunction skipIgnoredNodesLeft(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode, offset = sel.focusOffset;\n if (!node) { return }\n var moveNode, moveOffset, force = false;\n // Gecko will do odd things when the selection is directly in front\n // of a non-editable node, so in that case, move it into the next\n // node if possible. Issue prosemirror/prosemirror#832.\n if (result.gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) { force = true; }\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break\n } else {\n var before = node.childNodes[offset - 1];\n if (isIgnorable(before)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else { break }\n }\n } else if (isBlockNode(node)) {\n break\n } else {\n var prev = node.previousSibling;\n while (prev && isIgnorable(prev)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n if (!prev) {\n node = node.parentNode;\n if (node == view.dom) { break }\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n if (force) { setSelFocus(view, sel, node, offset); }\n else if (moveNode) { setSelFocus(view, sel, moveNode, moveOffset); }\n}\n\n// Make sure the cursor isn't directly before one or more ignored\n// nodes.\nfunction skipIgnoredNodesRight(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode, offset = sel.focusOffset;\n if (!node) { return }\n var len = nodeLen(node);\n var moveNode, moveOffset;\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) { break }\n var after = node.childNodes[offset];\n if (isIgnorable(after)) {\n moveNode = node;\n moveOffset = ++offset;\n }\n else { break }\n } else if (isBlockNode(node)) {\n break\n } else {\n var next = node.nextSibling;\n while (next && isIgnorable(next)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n if (!next) {\n node = node.parentNode;\n if (node == view.dom) { break }\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n if (moveNode) { setSelFocus(view, sel, moveNode, moveOffset); }\n}\n\nfunction isBlockNode(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock\n}\n\nfunction setSelFocus(view, sel, node, offset) {\n if (selectionCollapsed(sel)) {\n var range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n view.domObserver.setCurSelection();\n}\n\n// : (EditorState, number)\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\nfunction selectVertically(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty || mods.indexOf(\"s\") > -1) { return false }\n var $from = sel.$from;\n var $to = sel.$to;\n\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && (next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]))\n { return apply(view, next) }\n }\n if (!$from.parent.inlineContent) {\n var beyond = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(dir < 0 ? $from : $to, dir);\n return beyond ? apply(view, beyond) : true\n }\n return false\n}\n\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) { return true }\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var empty = ref.empty;\n if (!$head.sameParent($anchor)) { return true }\n if (!empty) { return false }\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) { return true }\n var nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n if (nextNode && !nextNode.isText) {\n var tr = view.state.tr;\n if (dir < 0) { tr.delete($head.pos - nextNode.nodeSize, $head.pos); }\n else { tr.delete($head.pos, $head.pos + nextNode.nodeSize); }\n view.dispatch(tr);\n return true\n }\n return false\n}\n\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n}\n\n// Issue #867 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Chrome does really wrong things when the down arrow is\n// pressed when the cursor is directly at the start of a textblock and\n// has an uneditable node after it\nfunction chromeDownArrowBug(view) {\n if (!result.chrome || view.state.selection.$head.parentOffset > 0) { return }\n var ref = view.root.getSelection();\n var focusNode = ref.focusNode;\n var focusOffset = ref.focusOffset;\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 &&\n focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n var child = focusNode.firstChild;\n switchEditable(view, child, true);\n setTimeout(function () { return switchEditable(view, child, false); }, 20);\n }\n}\n\n// A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\n\nfunction getMods(event) {\n var result = \"\";\n if (event.ctrlKey) { result += \"c\"; }\n if (event.metaKey) { result += \"m\"; }\n if (event.altKey) { result += \"a\"; }\n if (event.shiftKey) { result += \"s\"; }\n return result\n}\n\nfunction captureKeyDown(view, event) {\n var code = event.keyCode, mods = getMods(event);\n if (code == 8 || (result.mac && code == 72 && mods == \"c\")) { // Backspace, Ctrl-h on Mac\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodesLeft(view)\n } else if (code == 46 || (result.mac && code == 68 && mods == \"c\")) { // Delete, Ctrl-d on Mac\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodesRight(view)\n } else if ((code == 13 && !result.ios) || code == 27) { // Enter (let through on iOS, to avoid keyboard sync issues), Esc\n return true\n } else if (code == 37) { // Left arrow\n return selectHorizontally(view, -1, mods) || skipIgnoredNodesLeft(view)\n } else if (code == 39) { // Right arrow\n return selectHorizontally(view, 1, mods) || skipIgnoredNodesRight(view)\n } else if (code == 38) { // Up arrow\n return selectVertically(view, -1, mods) || skipIgnoredNodesLeft(view)\n } else if (code == 40) { // Down arrow\n return chromeDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodesRight(view)\n } else if (mods == (result.mac ? \"m\" : \"c\") &&\n (code == 66 || code == 73 || code == 89 || code == 90)) { // Mod-[biyz]\n return true\n }\n return false\n}\n\nfunction selectionFromDOM(view, origin) {\n var domSel = view.root.getSelection(), doc = view.state.doc;\n var nearestDesc = view.docView.nearestDesc(domSel.focusNode), inWidget = nearestDesc && nearestDesc.size == 0;\n var head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset);\n var $head = doc.resolve(head), $anchor, selection;\n if (selectionCollapsed(domSel)) {\n $anchor = $head;\n while (nearestDesc && !nearestDesc.node) { nearestDesc = nearestDesc.parent; }\n if (nearestDesc && nearestDesc.node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(nearestDesc.node) && nearestDesc.parent\n && !(nearestDesc.node.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n var pos = nearestDesc.posBefore;\n selection = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](head == pos ? $head : doc.resolve(pos));\n }\n } else {\n $anchor = doc.resolve(view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset));\n }\n\n if (!selection) {\n var bias = origin == \"pointer\" || (view.state.selection.head < $head.pos && !inWidget) ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n return selection\n}\n\nfunction selectionToDOM(view, force) {\n var sel = view.state.selection;\n syncNodeSelection(view, sel);\n\n if (view.editable ? !view.hasFocus() : !(hasSelection(view) && document.activeElement.contains(view.dom))) { return }\n\n view.domObserver.disconnectSelection();\n\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n var anchor = sel.anchor;\n var head = sel.head;\n var resetEditableFrom, resetEditableTo;\n if (brokenSelectBetweenUneditable && !(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) {\n if (!sel.$from.parent.inlineContent)\n { resetEditableFrom = temporarilyEditableNear(view, sel.from); }\n if (!sel.empty && !sel.$from.parent.inlineContent)\n { resetEditableTo = temporarilyEditableNear(view, sel.to); }\n }\n view.docView.setSelection(anchor, head, view.root, force);\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) { resetEditable(resetEditableFrom); }\n if (resetEditableTo) { resetEditable(resetEditableTo); }\n }\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else if (anchor != head) {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n if (\"onselectionchange\" in document) { removeClassOnSelectionChange(view); }\n }\n }\n\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n}\n\n// Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\n\nvar brokenSelectBetweenUneditable = result.safari || result.chrome && result.chrome_version < 63;\n\nfunction temporarilyEditableNear(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n var after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n var before = offset ? node.childNodes[offset - 1] : null;\n if (result.safari && after && after.contentEditable == \"false\") { return setEditable(after) }\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) { return setEditable(after) }\n else if (before) { return setEditable(before) }\n }\n}\n\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n if (result.safari && element.draggable) { element.draggable = false; element.wasDraggable = true; }\n return element\n}\n\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n if (element.wasDraggable) { element.draggable = true; element.wasDraggable = null; }\n}\n\nfunction removeClassOnSelectionChange(view) {\n var doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n var domSel = view.root.getSelection();\n var node = domSel.anchorNode, offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.hideSelectionGuard = function () {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n }\n });\n}\n\nfunction selectCursorWrapper(view) {\n var domSel = view.root.getSelection(), range = document.createRange();\n var node = view.cursorWrapper.dom, img = node.nodeName == \"IMG\";\n if (img) { range.setEnd(node.parentNode, domIndex(node) + 1); }\n else { range.setEnd(node, 0); }\n range.collapse(false);\n domSel.removeAllRanges();\n domSel.addRange(range);\n // Kludge to kill 'control selection' in IE11 when selecting an\n // invisible cursor wrapper, since that would result in those weird\n // resize handles and a selection that considers the absolutely\n // positioned wrapper, rather than the root editable node, the\n // focused element.\n if (!img && !view.state.selection.visible && result.ie && result.ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\n\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n var desc = view.docView.descAt(sel.from);\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n if (desc) { desc.selectNode(); }\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n}\n\n// Clear all DOM statefulness of the last node selection.\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent)\n { view.lastSelectedViewDesc.deselectNode(); }\n view.lastSelectedViewDesc = null;\n }\n}\n\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", function (f) { return f(view, $anchor, $head); })\n || prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].between($anchor, $head, bias)\n}\n\nfunction hasFocusAndSelection(view) {\n if (view.editable && view.root.activeElement != view.dom) { return false }\n return hasSelection(view)\n}\n\nfunction hasSelection(view) {\n var sel = view.root.getSelection();\n if (!sel.anchorNode) { return false }\n try {\n // Firefox will raise 'permission denied' errors when accessing\n // properties of `sel.anchorNode` when it's in a generated CSS\n // element.\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) &&\n (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode))\n } catch(_) {\n return false\n }\n}\n\nfunction anchorInRightPlace(view) {\n var anchorDOM = view.docView.domFromPos(view.state.selection.anchor);\n var domSel = view.root.getSelection();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset)\n}\n\n// Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\n\nfunction parseBetween(view, from_, to_) {\n var ref = view.docView.parseRange(from_, to_);\n var parent = ref.node;\n var fromOffset = ref.fromOffset;\n var toOffset = ref.toOffset;\n var from = ref.from;\n var to = ref.to;\n\n var domSel = view.root.getSelection(), find = null, anchor = domSel.anchorNode;\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{node: anchor, offset: domSel.anchorOffset}];\n if (!selectionCollapsed(domSel))\n { find.push({node: domSel.focusNode, offset: domSel.focusOffset}); }\n }\n // Work around issue in Chrome where backspacing sometimes replaces\n // the deleted content with a random BR node (issues #799, #831)\n if (result.chrome && view.lastKeyCode === 8) {\n for (var off = toOffset; off > fromOffset; off--) {\n var node = parent.childNodes[off - 1], desc = node.pmViewDesc;\n if (node.nodeType == \"BR\" && !desc) { toOffset = off; break }\n if (!desc || desc.size) { break }\n }\n }\n var startDoc = view.state.doc;\n var parser = view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n var $from = startDoc.resolve(from);\n\n var sel = null, doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.spec.code ? \"full\" : true,\n editableContent: true,\n findPositions: find,\n ruleFromNode: ruleFromNode,\n context: $from\n });\n if (find && find[0].pos != null) {\n var anchor$1 = find[0].pos, head = find[1] && find[1].pos;\n if (head == null) { head = anchor$1; }\n sel = {anchor: anchor$1 + from, head: head + from};\n }\n return {doc: doc, sel: sel, from: from, to: to}\n}\n\nfunction ruleFromNode(dom) {\n var desc = dom.pmViewDesc;\n if (desc) {\n return desc.parseRule()\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n // Safari replaces the list item or table cell with a BR\n // directly in the list node (?!) if you delete the last\n // character in a list item or table cell (#708, #862)\n if (result.safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n var skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {skip: skip}\n } else if (dom.parentNode.lastChild == dom || result.safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {ignore: true}\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {ignore: true}\n }\n}\n\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n if (from < 0) {\n var origin = view.lastSelectionTime > Date.now() - 50 ? view.lastSelectionOrigin : null;\n var newSel = selectionFromDOM(view, origin);\n if (!view.state.selection.eq(newSel)) {\n var tr$1 = view.state.tr.setSelection(newSel);\n if (origin == \"pointer\") { tr$1.setMeta(\"pointer\", true); }\n else if (origin == \"key\") { tr$1.scrollIntoView(); }\n view.dispatch(tr$1);\n }\n return\n }\n\n var $before = view.state.doc.resolve(from);\n var shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n\n var sel = view.state.selection;\n var parse = parseBetween(view, from, to);\n\n var doc = view.state.doc, compare = doc.slice(parse.from, parse.to);\n var preferredPos, preferredSide;\n // Prefer anchoring to end when Backspace is pressed\n if (view.lastKeyCode === 8 && Date.now() - 100 < view.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n view.lastKeyCode = null;\n\n var change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n if (!change) {\n if (typeOver && sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty && sel.$head.sameParent(sel.$anchor) &&\n !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {start: sel.from, endA: sel.to, endB: sel.to};\n } else {\n if (parse.sel) {\n var sel$1 = resolveSelection(view, view.state.doc, parse.sel);\n if (sel$1 && !sel$1.eq(view.state.selection)) { view.dispatch(view.state.tr.setSelection(sel$1)); }\n }\n return\n }\n }\n view.domChangeCount++;\n // Handle the case where overwriting a selection by typing matches\n // the start or end of the selected content, creating a change\n // that's smaller than what was actually overwritten.\n if (view.state.selection.from < view.state.selection.to &&\n change.start == change.endB &&\n view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2) {\n change.endB += (view.state.selection.to - change.endA);\n change.endA = view.state.selection.to;\n }\n }\n\n // IE11 will insert a non-breaking space _ahead_ of the space after\n // the cursor space when adding a space before another space. When\n // that happened, adjust the change to cover the space instead.\n if (result.ie && result.ie_version <= 11 && change.endB == change.start + 1 &&\n change.endA == change.start && change.start > parse.from &&\n parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\u00a0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n\n var $from = parse.doc.resolveNoCache(change.start - parse.from);\n var $to = parse.doc.resolveNoCache(change.endB - parse.from);\n var nextSel;\n // If this looks like the effect of pressing Enter (or was recorded\n // as being an iOS enter press), just dispatch an Enter key instead.\n if (((result.ios && view.lastIOSEnter > Date.now() - 100 &&\n (!$from.sameParent($to) || addedNodes.some(function (n) { return n.nodeName == \"DIV\"; }))) ||\n (!$from.sameParent($to) && $from.pos < parse.doc.content.size &&\n (nextSel = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(parse.doc.resolve($from.pos + 1), 1, true)) &&\n nextSel.head == $to.pos)) &&\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); })) {\n view.lastIOSEnter = 0;\n return\n }\n // Same for backspace\n if (view.state.selection.anchor > change.start &&\n looksLikeJoin(doc, change.start, change.endA, $from, $to) &&\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(8, \"Backspace\")); })) {\n if (result.android && result.chrome) { view.domObserver.suppressSelectionUpdates(); } // #820\n return\n }\n\n var chFrom = change.start, chTo = change.endA;\n\n var tr, storedMarks, markChange, $from1;\n if ($from.sameParent($to) && $from.parent.inlineContent) {\n if ($from.pos == $to.pos) { // Deletion\n // IE11 sometimes weirdly moves the DOM selection around after\n // backspacing out the first element in a textblock\n if (result.ie && result.ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(function () { return selectionToDOM(view); }, 20);\n }\n tr = view.state.tr.delete(chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if ( // Adding or removing a mark\n change.endA == change.endB && ($from1 = doc.resolve(change.start)) &&\n (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset),\n $from1.parent.content.cut($from1.parentOffset, change.endA - $from1.start())))\n ) {\n tr = view.state.tr;\n if (markChange.type == \"add\") { tr.addMark(chFrom, chTo, markChange.mark); }\n else { tr.removeMark(chFrom, chTo, markChange.mark); }\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n // Both positions in the same text node -- simply insert text\n var text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n if (view.someProp(\"handleTextInput\", function (f) { return f(view, chFrom, chTo, text); })) { return }\n tr = view.state.tr.insertText(text, chFrom, chTo);\n }\n }\n\n if (!tr)\n { tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from)); }\n if (parse.sel) {\n var sel$2 = resolveSelection(view, tr.doc, parse.sel);\n // Chrome Android will sometimes, during composition, report the\n // selection in the wrong place. If it looks like that is\n // happening, don't update the selection.\n // Edge just doesn't move the cursor forward when you start typing\n // in an empty block or between br nodes.\n if (sel$2 && !(result.chrome && result.android && view.composing && sel$2.empty && sel$2.head == chFrom ||\n result.ie && sel$2.empty && sel$2.head == chFrom))\n { tr.setSelection(sel$2); }\n }\n if (storedMarks) { tr.ensureMarks(storedMarks); }\n view.dispatch(tr.scrollIntoView());\n}\n\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) { return null }\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head))\n}\n\n// : (Fragment, Fragment) → ?{mark: Mark, type: string}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\nfunction isMarkChange(cur, prev) {\n var curMarks = cur.firstChild.marks, prevMarks = prev.firstChild.marks;\n var added = curMarks, removed = prevMarks, type, mark, update;\n for (var i = 0; i < prevMarks.length; i++) { added = prevMarks[i].removeFromSet(added); }\n for (var i$1 = 0; i$1 < curMarks.length; i$1++) { removed = curMarks[i$1].removeFromSet(removed); }\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n update = function (node) { return node.mark(mark.addToSet(node.marks)); };\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n update = function (node) { return node.mark(mark.removeFromSet(node.marks)); };\n } else {\n return null\n }\n var updated = [];\n for (var i$2 = 0; i$2 < prev.childCount; i$2++) { updated.push(update(prev.child(i$2))); }\n if (prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(updated).eq(cur)) { return {mark: mark, type: type} }\n}\n\nfunction looksLikeJoin(old, start, end, $newStart, $newEnd) {\n if (!$newStart.parent.isTextblock ||\n // The content must have shrunk\n end - start <= $newEnd.pos - $newStart.pos ||\n // newEnd must point directly at or after the end of the block that newStart points into\n skipClosingAndOpening($newStart, true, false) < $newEnd.pos)\n { return false }\n\n var $start = old.resolve(start);\n // Start must be at the end of a block\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock)\n { return false }\n var $next = old.resolve(skipClosingAndOpening($start, true, true));\n // The next textblock must start before end and end near it\n if (!$next.parent.isTextblock || $next.pos > end ||\n skipClosingAndOpening($next, true, false) < end)\n { return false }\n\n // The fragments after the join point must match\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content)\n}\n\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n var depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n if (mayOpen) {\n var next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n return end\n}\n\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n var start = a.findDiffStart(b, pos);\n if (start == null) { return null }\n var ref = a.findDiffEnd(b, pos + a.size, pos + b.size);\n var endA = ref.a;\n var endB = ref.b;\n if (preferredSide == \"end\") {\n var adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n if (endA < start && a.size < b.size) {\n var move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n var move$1 = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= move$1;\n endA = start + (endA - endB);\n endB = start;\n }\n return {start: start, endA: endA, endB: endB}\n}\n\nfunction serializeForClipboard(view, slice) {\n var context = [];\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n var node = content.firstChild;\n context.push(node.type.name, node.type.hasRequiredAttrs() ? node.attrs : null);\n content = node.content;\n }\n\n var serializer = view.someProp(\"clipboardSerializer\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].fromSchema(view.state.schema);\n var doc = detachedDoc(), wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {document: doc}));\n\n var firstChild = wrap.firstChild, needsWrap;\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (var i = needsWrap.length - 1; i >= 0; i--) {\n var wrapper = doc.createElement(needsWrap[i]);\n while (wrap.firstChild) { wrapper.appendChild(wrap.firstChild); }\n wrap.appendChild(wrapper);\n }\n firstChild = wrap.firstChild;\n }\n\n if (firstChild && firstChild.nodeType == 1)\n { firstChild.setAttribute(\"data-pm-slice\", (openStart + \" \" + openEnd + \" \" + (JSON.stringify(context)))); }\n\n var text = view.someProp(\"clipboardTextSerializer\", function (f) { return f(slice); }) ||\n slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n\n return {dom: wrap, text: text}\n}\n\n// : (EditorView, string, string, ?bool, ResolvedPos) → ?Slice\n// Read a slice of content from the clipboard (or drop data).\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n var dom, inCode = $context.parent.type.spec.code, slice;\n if (!html && !text) { return null }\n var asText = text && (plainText || inCode || !html);\n if (asText) {\n view.someProp(\"transformPastedText\", function (f) { text = f(text); });\n if (inCode) { return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(view.state.schema.text(text)), 0, 0) }\n var parsed = view.someProp(\"clipboardTextParser\", function (f) { return f(text, $context); });\n if (parsed) {\n slice = parsed;\n } else {\n dom = document.createElement(\"div\");\n text.trim().split(/(?:\\r\\n?|\\n)+/).forEach(function (block) {\n dom.appendChild(document.createElement(\"p\")).textContent = block;\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", function (f) { html = f(html); });\n dom = readHTML(html);\n }\n\n var contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n var sliceData = contextNode && /^(\\d+) (\\d+) (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\"));\n if (!slice) {\n var parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {preserveWhitespace: !!(asText || sliceData), context: $context});\n }\n if (sliceData)\n { slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[3]); }\n else // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n { slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].maxOpen(normalizeSiblings(slice.content, $context), false); }\n\n view.someProp(\"transformPasted\", function (f) { slice = f(slice); });\n return slice\n}\n\n// Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) { return fragment }\n var loop = function ( d ) {\n var parent = $context.node(d);\n var match = parent.contentMatchAt($context.index(d));\n var lastWrap = (void 0), result = [];\n fragment.forEach(function (node) {\n if (!result) { return }\n var wrap = match.findWrapping(node.type), inLast;\n if (!wrap) { return result = null }\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) { result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length); }\n var wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type, wrapped.attrs);\n lastWrap = wrap;\n }\n });\n if (result) { return { v: prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(result) } }\n };\n\n for (var d = $context.depth; d >= 0; d--) {\n var returned = loop( d );\n\n if ( returned ) return returned.v;\n }\n return fragment\n}\n\nfunction withWrappers(node, wrap, from) {\n if ( from === void 0 ) from = 0;\n\n for (var i = wrap.length - 1; i >= from; i--)\n { node = wrap[i].create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(node)); }\n return node\n}\n\n// Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n var inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n if (inner) { return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner)) }\n var match = sibling.contentMatchAt(sibling.childCount);\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1]))\n { return sibling.copy(sibling.content.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(withWrappers(node, wrap, depth + 1)))) }\n }\n}\n\nfunction closeRight(node, depth) {\n if (depth == 0) { return node }\n var fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true);\n return node.copy(fragment.append(fill))\n}\n\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n var node = side < 0 ? fragment.firstChild : fragment.lastChild, inner = node.content;\n if (depth < to - 1) { inner = closeRange(inner, side, from, to, depth + 1, openEnd); }\n if (depth >= from)\n { inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, fragment.childCount > 1 || openEnd <= depth).append(inner)\n : inner.append(node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true)); }\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner))\n}\n\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart)\n { slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd); }\n if (openEnd < slice.openEnd)\n { slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd); }\n return slice\n}\n\n// Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"..\"` the table cells are ignored.\nvar wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\n\nvar _detachedDoc = null;\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"))\n}\n\nfunction readHTML(html) {\n var metas = /(\\s*]*>)*/.exec(html);\n if (metas) { html = html.slice(metas[0].length); }\n var elt = detachedDoc().createElement(\"div\");\n var firstTag = /(?:]*>)*<([a-z][^>\\s]+)/i.exec(html), wrap, depth = 0;\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()]) {\n html = wrap.map(function (n) { return \"<\" + n + \">\"; }).join(\"\") + html + wrap.map(function (n) { return \"\"; }).reverse().join(\"\");\n depth = wrap.length;\n }\n elt.innerHTML = html;\n for (var i = 0; i < depth; i++) { elt = elt.firstChild; }\n return elt\n}\n\nfunction addContext(slice, context) {\n if (!slice.size) { return slice }\n var schema = slice.content.firstChild.type.schema, array;\n try { array = JSON.parse(context); }\n catch(e) { return slice }\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n for (var i = array.length - 2; i >= 0; i -= 2) {\n var type = schema.nodes[array[i]];\n if (!type || type.hasRequiredAttrs()) { break }\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(type.create(array[i + 1], content));\n openStart++; openEnd++;\n }\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, openStart, openEnd)\n}\n\nvar observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n};\n// IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\nvar useCharData = result.ie && result.ie_version <= 11;\n\nvar SelectionState = function SelectionState() {\n this.anchorNode = this.anchorOffset = this.focusNode = this.focusOffset = null;\n};\n\nSelectionState.prototype.set = function set (sel) {\n this.anchorNode = sel.anchorNode; this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode; this.focusOffset = sel.focusOffset;\n};\n\nSelectionState.prototype.eq = function eq (sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset &&\n sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset\n};\n\nvar DOMObserver = function DOMObserver(view, handleDOMChange) {\n var this$1 = this;\n\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = false;\n this.observer = window.MutationObserver &&\n new window.MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) { this$1.queue.push(mutations[i]); }\n // IE11 will sometimes (on backspacing out a single character\n // text node after a BR node) call the observer callback\n // before actually updating the DOM, which will cause\n // ProseMirror to miss the change (see #930)\n if (result.ie && result.ie_version <= 11 && mutations.some(\n function (m) { return m.type == \"childList\" && m.removedNodes.length ||\n m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length; }))\n { this$1.flushSoon(); }\n else\n { this$1.flush(); }\n });\n this.currentSelection = new SelectionState;\n if (useCharData) {\n this.onCharData = function (e) {\n this$1.queue.push({target: e.target, type: \"characterData\", oldValue: e.prevValue});\n this$1.flushSoon();\n };\n }\n this.onSelectionChange = this.onSelectionChange.bind(this);\n this.suppressingSelectionUpdates = false;\n};\n\nDOMObserver.prototype.flushSoon = function flushSoon () {\n var this$1 = this;\n\n if (!this.flushingSoon) {\n this.flushingSoon = true;\n window.setTimeout(function () { this$1.flushingSoon = false; this$1.flush(); }, 20);\n }\n};\n\nDOMObserver.prototype.start = function start () {\n if (this.observer)\n { this.observer.observe(this.view.dom, observeOptions); }\n if (useCharData)\n { this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData); }\n this.connectSelection();\n};\n\nDOMObserver.prototype.stop = function stop () {\n var this$1 = this;\n\n if (this.observer) {\n var take = this.observer.takeRecords();\n if (take.length) {\n for (var i = 0; i < take.length; i++) { this.queue.push(take[i]); }\n window.setTimeout(function () { return this$1.flush(); }, 20);\n }\n this.observer.disconnect();\n }\n if (useCharData) { this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData); }\n this.disconnectSelection();\n};\n\nDOMObserver.prototype.connectSelection = function connectSelection () {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.disconnectSelection = function disconnectSelection () {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.suppressSelectionUpdates = function suppressSelectionUpdates () {\n var this$1 = this;\n\n this.suppressingSelectionUpdates = true;\n setTimeout(function () { return this$1.suppressingSelectionUpdates = false; }, 50);\n};\n\nDOMObserver.prototype.onSelectionChange = function onSelectionChange () {\n if (!hasFocusAndSelection(this.view)) { return }\n if (this.suppressingSelectionUpdates) { return selectionToDOM(this.view) }\n // Deletions on IE11 fire their events in the wrong order, giving\n // us a selection change event before the DOM changes are\n // reported.\n if (result.ie && result.ie_version <= 11 && !this.view.state.selection.empty) {\n var sel = this.view.root.getSelection();\n // Selection.isCollapsed isn't reliable on IE\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset))\n { return this.flushSoon() }\n }\n this.flush();\n};\n\nDOMObserver.prototype.setCurSelection = function setCurSelection () {\n this.currentSelection.set(this.view.root.getSelection());\n};\n\nDOMObserver.prototype.ignoreSelectionChange = function ignoreSelectionChange (sel) {\n if (sel.rangeCount == 0) { return true }\n var container = sel.getRangeAt(0).commonAncestorContainer;\n var desc = this.view.docView.nearestDesc(container);\n if (desc && desc.ignoreMutation({type: \"selection\", target: container.nodeType == 3 ? container.parentNode : container})) {\n this.setCurSelection();\n return true\n }\n};\n\nDOMObserver.prototype.flush = function flush () {\n if (!this.view.docView || this.flushingSoon) { return }\n var mutations = this.observer ? this.observer.takeRecords() : [];\n if (this.queue.length) {\n mutations = this.queue.concat(mutations);\n this.queue.length = 0;\n }\n\n var sel = this.view.root.getSelection();\n var newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasSelection(this.view) && !this.ignoreSelectionChange(sel);\n\n var from = -1, to = -1, typeOver = false, added = [];\n if (this.view.editable) {\n for (var i = 0; i < mutations.length; i++) {\n var result$1 = this.registerMutation(mutations[i], added);\n if (result$1) {\n from = from < 0 ? result$1.from : Math.min(result$1.from, from);\n to = to < 0 ? result$1.to : Math.max(result$1.to, to);\n if (result$1.typeOver && !this.view.composing) { typeOver = true; }\n }\n }\n }\n\n if (result.gecko && added.length > 1) {\n var brs = added.filter(function (n) { return n.nodeName == \"BR\"; });\n if (brs.length == 2) {\n var a = brs[0];\n var b = brs[1];\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) { b.remove(); }\n else { a.remove(); }\n }\n }\n\n if (from > -1 || newSel) {\n if (from > -1) {\n this.view.docView.markDirty(from, to);\n checkCSS(this.view);\n }\n this.handleDOMChange(from, to, typeOver, added);\n if (this.view.docView.dirty) { this.view.updateState(this.view.state); }\n else if (!this.currentSelection.eq(sel)) { selectionToDOM(this.view); }\n }\n};\n\nDOMObserver.prototype.registerMutation = function registerMutation (mut, added) {\n // Ignore mutations inside nodes that were already noted as inserted\n if (added.indexOf(mut.target) > -1) { return null }\n var desc = this.view.docView.nearestDesc(mut.target);\n if (mut.type == \"attributes\" &&\n (desc == this.view.docView || mut.attributeName == \"contenteditable\" ||\n // Firefox sometimes fires spurious events for null/empty styles\n (mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))))\n { return null }\n if (!desc || desc.ignoreMutation(mut)) { return null }\n\n if (mut.type == \"childList\") {\n var prev = mut.previousSibling, next = mut.nextSibling;\n if (result.ie && result.ie_version <= 11 && mut.addedNodes.length) {\n // IE11 gives us incorrect next/prev siblings for some\n // insertions, so if there are added nodes, recompute those\n for (var i = 0; i < mut.addedNodes.length; i++) {\n var ref = mut.addedNodes[i];\n var previousSibling = ref.previousSibling;\n var nextSibling = ref.nextSibling;\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) { prev = previousSibling; }\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) { next = nextSibling; }\n }\n }\n var fromOffset = prev && prev.parentNode == mut.target\n ? domIndex(prev) + 1 : 0;\n var from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n var toOffset = next && next.parentNode == mut.target\n ? domIndex(next) : mut.target.childNodes.length;\n for (var i$1 = 0; i$1 < mut.addedNodes.length; i$1++) { added.push(mut.addedNodes[i$1]); }\n var to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {from: from, to: to}\n } else if (mut.type == \"attributes\") {\n return {from: desc.posAtStart - desc.border, to: desc.posAtEnd + desc.border}\n } else { // \"characterData\"\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n // An event was generated for a text change that didn't change\n // any text. Mark the dom change to fall back to assuming the\n // selection was typed over with an identical value if it can't\n // find another change.\n typeOver: mut.target.nodeValue == mut.oldValue\n }\n }\n};\n\nvar cssChecked = false;\n\nfunction checkCSS(view) {\n if (cssChecked) { return }\n cssChecked = true;\n if (getComputedStyle(view.dom).whiteSpace == \"normal\")\n { console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\"); }\n}\n\n// A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\nvar handlers = {}, editHandlers = {};\n\nfunction initInput(view) {\n view.shiftKey = false;\n view.mouseDown = null;\n view.lastKeyCode = null;\n view.lastKeyCodeTime = 0;\n view.lastClick = {time: 0, x: 0, y: 0, type: \"\"};\n view.lastSelectionOrigin = null;\n view.lastSelectionTime = 0;\n\n view.lastIOSEnter = 0;\n\n view.composing = false;\n view.composingTimeout = null;\n view.compositionNodes = [];\n view.compositionEndedAt = -2e8;\n\n view.domObserver = new DOMObserver(view, function (from, to, typeOver, added) { return readDOMChange(view, from, to, typeOver, added); });\n view.domObserver.start();\n // Used by hacks like the beforeinput handler to check whether anything happened in the DOM\n view.domChangeCount = 0;\n\n view.eventHandlers = Object.create(null);\n var loop = function ( event ) {\n var handler = handlers[event];\n view.dom.addEventListener(event, view.eventHandlers[event] = function (event) {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) &&\n (view.editable || !(event.type in editHandlers)))\n { handler(view, event); }\n });\n };\n\n for (var event in handlers) loop( event );\n // On Safari, for reasons beyond my understanding, adding an input\n // event handler makes an issue where the composition vanishes when\n // you press enter go away.\n if (result.safari) { view.dom.addEventListener(\"input\", function () { return null; }); }\n\n ensureListeners(view);\n}\n\nfunction setSelectionOrigin(view, origin) {\n view.lastSelectionOrigin = origin;\n view.lastSelectionTime = Date.now();\n}\n\nfunction destroyInput(view) {\n view.domObserver.stop();\n for (var type in view.eventHandlers)\n { view.dom.removeEventListener(type, view.eventHandlers[type]); }\n clearTimeout(view.composingTimeout);\n}\n\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", function (currentHandlers) {\n for (var type in currentHandlers) { if (!view.eventHandlers[type])\n { view.dom.addEventListener(type, view.eventHandlers[type] = function (event) { return runCustomHandler(view, event); }); } }\n });\n}\n\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", function (handlers) {\n var handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false\n })\n}\n\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) { return true }\n if (event.defaultPrevented) { return false }\n for (var node = event.target; node != view.dom; node = node.parentNode)\n { if (!node || node.nodeType == 11 ||\n (node.pmViewDesc && node.pmViewDesc.stopEvent(event)))\n { return false } }\n return true\n}\n\nfunction dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] &&\n (view.editable || !(event.type in editHandlers)))\n { handlers[event.type](view, event); }\n}\n\neditHandlers.keydown = function (view, event) {\n view.shiftKey = event.keyCode == 16 || event.shiftKey;\n if (inOrNearComposition(view, event)) { return }\n view.lastKeyCode = event.keyCode;\n view.lastKeyCodeTime = Date.now();\n // On iOS, if we preventDefault enter key presses, the virtual\n // keyboard gets confused. So the hack here is to set a flag that\n // makes the DOM change code recognize that what just happens should\n // be replaced by whatever the Enter key handlers do.\n if (result.ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey)\n { view.lastIOSEnter = Date.now(); }\n else if (view.someProp(\"handleKeyDown\", function (f) { return f(view, event); }) || captureKeyDown(view, event))\n { event.preventDefault(); }\n else\n { setSelectionOrigin(view, \"key\"); }\n};\n\neditHandlers.keyup = function (view, e) {\n if (e.keyCode == 16) { view.shiftKey = false; }\n};\n\neditHandlers.keypress = function (view, event) {\n if (inOrNearComposition(view, event) || !event.charCode ||\n event.ctrlKey && !event.altKey || result.mac && event.metaKey) { return }\n\n if (view.someProp(\"handleKeyPress\", function (f) { return f(view, event); })) {\n event.preventDefault();\n return\n }\n\n var sel = view.state.selection;\n if (!(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || !sel.$from.sameParent(sel.$to)) {\n var text = String.fromCharCode(event.charCode);\n if (!view.someProp(\"handleTextInput\", function (f) { return f(view, sel.$from.pos, sel.$to.pos, text); }))\n { view.dispatch(view.state.tr.insertText(text).scrollIntoView()); }\n event.preventDefault();\n }\n};\n\nfunction eventCoords(event) { return {left: event.clientX, top: event.clientY} }\n\nfunction isNear(event, click) {\n var dx = click.x - event.clientX, dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100\n}\n\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) { return false }\n var $pos = view.state.doc.resolve(inside);\n var loop = function ( i ) {\n if (view.someProp(propName, function (f) { return i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true)\n : f(view, pos, $pos.node(i), $pos.before(i), event, false); }))\n { return { v: true } }\n };\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var returned = loop( i );\n\n if ( returned ) return returned.v;\n }\n return false\n}\n\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) { view.focus(); }\n var tr = view.state.tr.setSelection(selection);\n if (origin == \"pointer\") { tr.setMeta(\"pointer\", true); }\n view.dispatch(tr);\n}\n\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) { return false }\n var $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;\n if (node && node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n updateSelection(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos), \"pointer\");\n return true\n }\n return false\n}\n\nfunction selectClickedNode(view, inside) {\n if (inside == -1) { return false }\n var sel = view.state.selection, selectedNode, selectAt;\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) { selectedNode = sel.node; }\n\n var $pos = view.state.doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 &&\n i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos)\n { selectAt = $pos.before(sel.$from.depth); }\n else\n { selectAt = $pos.before(i); }\n break\n }\n }\n\n if (selectAt != null) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, selectAt), \"pointer\");\n return true\n } else {\n return false\n }\n}\n\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) ||\n view.someProp(\"handleClick\", function (f) { return f(view, pos, event); }) ||\n (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside))\n}\n\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) ||\n view.someProp(\"handleDoubleClick\", function (f) { return f(view, pos, event); })\n}\n\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) ||\n view.someProp(\"handleTripleClick\", function (f) { return f(view, pos, event); }) ||\n defaultTripleClick(view, inside)\n}\n\nfunction defaultTripleClick(view, inside) {\n var doc = view.state.doc;\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, 0, doc.content.size), \"pointer\");\n return true\n }\n return false\n }\n\n var $pos = doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n var nodePos = $pos.before(i);\n if (node.inlineContent)\n { updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\"); }\n else if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node))\n { updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(doc, nodePos), \"pointer\"); }\n else\n { continue }\n return true\n }\n}\n\nfunction forceDOMFlush(view) {\n return endComposition(view)\n}\n\nvar selectNodeModifier = result.mac ? \"metaKey\" : \"ctrlKey\";\n\nhandlers.mousedown = function (view, event) {\n view.shiftKey = event.shiftKey;\n var flushed = forceDOMFlush(view);\n var now = Date.now(), type = \"singleClick\";\n if (now - view.lastClick.time < 500 && isNear(event, view.lastClick) && !event[selectNodeModifier]) {\n if (view.lastClick.type == \"singleClick\") { type = \"doubleClick\"; }\n else if (view.lastClick.type == \"doubleClick\") { type = \"tripleClick\"; }\n }\n view.lastClick = {time: now, x: event.clientX, y: event.clientY, type: type};\n\n var pos = view.posAtCoords(eventCoords(event));\n if (!pos) { return }\n\n if (type == \"singleClick\")\n { view.mouseDown = new MouseDown(view, pos, event, flushed); }\n else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event))\n { event.preventDefault(); }\n else\n { setSelectionOrigin(view, \"pointer\"); }\n};\n\nvar MouseDown = function MouseDown(view, pos, event, flushed) {\n var this$1 = this;\n\n this.view = view;\n this.startDoc = view.state.doc;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.selectNode = event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n\n var targetNode, targetPos;\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n var $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n\n this.mightDrag = null;\n\n var target = flushed ? null : event.target;\n var targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc ? targetDesc.dom : null;\n\n if (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false ||\n view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && targetPos == view.state.selection.from)\n { this.mightDrag = {node: targetNode,\n pos: targetPos,\n addAttr: this.target && !this.target.draggable,\n setUneditable: this.target && result.gecko && !this.target.hasAttribute(\"contentEditable\")}; }\n\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) { this.target.draggable = true; }\n if (this.mightDrag.setUneditable)\n { setTimeout(function () { return this$1.target.setAttribute(\"contentEditable\", \"false\"); }, 20); }\n this.view.domObserver.start();\n }\n\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n};\n\nMouseDown.prototype.done = function done () {\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) { this.target.draggable = false; }\n if (this.mightDrag.setUneditable) { this.target.removeAttribute(\"contentEditable\"); }\n this.view.domObserver.start();\n }\n this.view.mouseDown = null;\n};\n\nMouseDown.prototype.up = function up (event) {\n this.done();\n\n if (!this.view.dom.contains(event.target.nodeType == 3 ? event.target.parentNode : event.target))\n { return }\n\n var pos = this.pos;\n if (this.view.state.doc != this.startDoc) { pos = this.view.posAtCoords(eventCoords(event)); }\n\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (this.flushed ||\n // Chrome will sometimes treat a node selection as a\n // cursor, but still report that the node is selected\n // when asked through getSelection. You'll then get a\n // situation where clicking at the point where that\n // (hidden) cursor is doesn't change the selection, and\n // thus doesn't get a reaction from ProseMirror. This\n // works around that.\n (result.chrome && !(this.view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) &&\n (pos.pos == this.view.state.selection.from || pos.pos == this.view.state.selection.to))) {\n updateSelection(this.view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n};\n\nMouseDown.prototype.move = function move (event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 ||\n Math.abs(this.event.y - event.clientY) > 4))\n { this.allowDefault = true; }\n setSelectionOrigin(this.view, \"pointer\");\n};\n\nhandlers.touchdown = function (view) {\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\n\nhandlers.contextmenu = function (view) { return forceDOMFlush(view); };\n\nfunction inOrNearComposition(view, event) {\n if (view.composing) { return true }\n // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n // emitted. The keydown event triggers newline insertion, which we don't want.\n // This method returns true if the keydown event should be ignored.\n // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n // This guards against the case where compositionend is triggered without the keyboard\n // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n // afterwards- we wouldn't want to ignore the keydown event in this case.\n if (result.safari && Math.abs(event.timeStamp - view.compositionEndedAt) < 500) {\n view.compositionEndedAt = -2e8;\n return true\n }\n return false\n}\n\n// Drop active composition after 5 seconds of inactivity on Android\nvar timeoutComposition = result.android ? 5000 : -1;\n\neditHandlers.compositionstart = editHandlers.compositionupdate = function (view) {\n if (!view.composing) {\n view.domObserver.flush();\n var state = view.state;\n var $pos = state.selection.$from;\n if (state.selection.empty &&\n (state.storedMarks || (!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(function (m) { return m.type.spec.inclusive === false; })))) {\n // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view);\n // In firefox, if the cursor is after but outside a marked node,\n // the inserted text won't inherit the marks. So this moves it\n // inside if necessary.\n if (result.gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n var sel = view.root.getSelection();\n for (var node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n var before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n if (!before) { break }\n if (before.nodeType == 3) {\n sel.collapse(before, before.nodeValue.length);\n break\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n view.composing = true;\n }\n scheduleComposeEnd(view, timeoutComposition);\n};\n\neditHandlers.compositionend = function (view, event) {\n if (view.composing) {\n view.composing = false;\n view.compositionEndedAt = event.timeStamp;\n scheduleComposeEnd(view, 20);\n }\n};\n\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.composingTimeout);\n if (delay > -1) { view.composingTimeout = setTimeout(function () { return endComposition(view); }, delay); }\n}\n\nfunction endComposition(view, forceUpdate) {\n view.composing = false;\n while (view.compositionNodes.length > 0) { view.compositionNodes.pop().markParentsDirty(); }\n if (forceUpdate || view.docView.dirty) {\n view.updateState(view.state);\n return true\n }\n return false\n}\n\nfunction captureCopy(view, dom) {\n // The extra wrapper is somehow necessary on IE/Edge to prevent the\n // content from being mangled when it is put onto the clipboard\n var doc = view.dom.ownerDocument;\n var wrap = doc.body.appendChild(doc.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n var sel = getSelection(), range = doc.createRange();\n range.selectNodeContents(dom);\n // Done because IE will fire a selectionchange moving the selection\n // to its start when removeAllRanges is called and the editor still\n // has focus (which will mess up the editor's selection state).\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(function () {\n doc.body.removeChild(wrap);\n view.focus();\n }, 50);\n}\n\n// This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\nvar brokenClipboardAPI = (result.ie && result.ie_version < 15) ||\n (result.ios && result.webkit_version < 604);\n\nhandlers.copy = editHandlers.cut = function (view, e) {\n var sel = view.state.selection, cut = e.type == \"cut\";\n if (sel.empty) { return }\n\n // IE and Edge's clipboard interface is completely broken\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var slice = sel.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n if (data) {\n e.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n if (cut) { view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\")); }\n};\n\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null\n}\n\nfunction capturePaste(view, e) {\n var doc = view.dom.ownerDocument;\n var plainText = view.shiftKey || view.state.selection.$from.parent.type.spec.code;\n var target = doc.body.appendChild(doc.createElement(plainText ? \"textarea\" : \"div\"));\n if (!plainText) { target.contentEditable = \"true\"; }\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n setTimeout(function () {\n view.focus();\n doc.body.removeChild(target);\n if (plainText) { doPaste(view, target.value, null, e); }\n else { doPaste(view, target.textContent, target.innerHTML, e); }\n }, 50);\n}\n\nfunction doPaste(view, text, html, e) {\n var slice = parseFromClipboard(view, text, html, view.shiftKey, view.state.selection.$from);\n if (view.someProp(\"handlePaste\", function (f) { return f(view, e, slice || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].empty); }) || !slice) { return }\n\n var singleNode = sliceSingleNode(slice);\n var tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.shiftKey) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n}\n\neditHandlers.paste = function (view, e) {\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var html = data && data.getData(\"text/html\"), text = data && data.getData(\"text/plain\");\n if (data && (html || text || data.files.length)) {\n doPaste(view, text, html, e);\n e.preventDefault();\n } else {\n capturePaste(view, e);\n }\n};\n\nvar Dragging = function Dragging(slice, move) {\n this.slice = slice;\n this.move = move;\n};\n\nvar dragCopyModifier = result.mac ? \"altKey\" : \"ctrlKey\";\n\nhandlers.dragstart = function (view, e) {\n var mouseDown = view.mouseDown;\n if (mouseDown) { mouseDown.done(); }\n if (!e.dataTransfer) { return }\n\n var sel = view.state.selection;\n var pos = sel.empty ? null : view.posAtCoords(eventCoords(e));\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] ? sel.to - 1: sel.to)) ; else if (mouseDown && mouseDown.mightDrag) {\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, mouseDown.mightDrag.pos)));\n } else if (e.target && e.target.nodeType == 1) {\n var desc = view.docView.nearestDesc(e.target, true);\n if (!desc || !desc.node.type.spec.draggable || desc == view.docView) { return }\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, desc.posBefore)));\n }\n var slice = view.state.selection.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n e.dataTransfer.clearData();\n e.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n if (!brokenClipboardAPI) { e.dataTransfer.setData(\"text/plain\", text); }\n view.dragging = new Dragging(slice, !e[dragCopyModifier]);\n};\n\nhandlers.dragend = function (view) {\n window.setTimeout(function () { return view.dragging = null; }, 50);\n};\n\neditHandlers.dragover = editHandlers.dragenter = function (_, e) { return e.preventDefault(); };\n\neditHandlers.drop = function (view, e) {\n var dragging = view.dragging;\n view.dragging = null;\n\n if (!e.dataTransfer) { return }\n\n var eventPos = view.posAtCoords(eventCoords(e));\n if (!eventPos) { return }\n var $mouse = view.state.doc.resolve(eventPos.pos);\n if (!$mouse) { return }\n var slice = dragging && dragging.slice ||\n parseFromClipboard(view, e.dataTransfer.getData(brokenClipboardAPI ? \"Text\" : \"text/plain\"),\n brokenClipboardAPI ? null : e.dataTransfer.getData(\"text/html\"), false, $mouse);\n if (!slice) { return }\n\n e.preventDefault();\n if (view.someProp(\"handleDrop\", function (f) { return f(view, e, slice, dragging && dragging.move); })) { return }\n var insertPos = slice ? Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__[\"dropPoint\"])(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n if (insertPos == null) { insertPos = $mouse.pos; }\n\n var tr = view.state.tr;\n if (dragging && dragging.move) { tr.deleteSelection(); }\n\n var pos = tr.mapping.map(insertPos);\n var isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n var beforeInsert = tr.doc;\n if (isNode)\n { tr.replaceRangeWith(pos, pos, slice.content.firstChild); }\n else\n { tr.replaceRange(pos, pos, slice); }\n if (tr.doc.eq(beforeInsert)) { return }\n\n var $pos = tr.doc.resolve(pos);\n if (isNode && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(slice.content.firstChild) &&\n $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild))\n { tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos)); }\n else\n { tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(tr.mapping.map(insertPos)))); }\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\n\nhandlers.focus = function (view) {\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(function () {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.root.getSelection()))\n { selectionToDOM(view); }\n }, 20);\n }\n};\n\nhandlers.blur = function (view) {\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n view.domObserver.currentSelection.set({});\n view.focused = false;\n }\n};\n\nhandlers.beforeinput = function (view, event) {\n // We should probably do more with beforeinput events, but support\n // is so spotty that I'm still waiting to see where they are going.\n\n // Very specific hack to deal with backspace sometimes failing on\n // Chrome Android when after an uneditable node.\n if (result.chrome && result.android && event.inputType == \"deleteContentBackward\") {\n var domChangeCount = view.domChangeCount;\n setTimeout(function () {\n if (view.domChangeCount != domChangeCount) { return } // Event already had some effect\n // This bug tends to close the virtual keyboard, so we refocus\n view.dom.blur();\n view.focus();\n if (view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(8, \"Backspace\")); })) { return }\n var ref = view.state.selection;\n var $cursor = ref.$cursor;\n // Crude approximation of backspace behavior when no command handled it\n if ($cursor && $cursor.pos > 0) { view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView()); }\n }, 50);\n }\n};\n\n// Make sure all handlers get registered\nfor (var prop in editHandlers) { handlers[prop] = editHandlers[prop]; }\n\nfunction compareObjs(a, b) {\n if (a == b) { return true }\n for (var p in a) { if (a[p] !== b[p]) { return false } }\n for (var p$1 in b) { if (!(p$1 in a)) { return false } }\n return true\n}\n\nvar WidgetType = function WidgetType(toDOM, spec) {\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n this.toDOM = toDOM;\n};\n\nWidgetType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var ref = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n var pos = ref.pos;\n var deleted = ref.deleted;\n return deleted ? null : new Decoration(pos - offset, pos - offset, this)\n};\n\nWidgetType.prototype.valid = function valid () { return true };\n\nWidgetType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof WidgetType &&\n (this.spec.key && this.spec.key == other.spec.key ||\n this.toDOM == other.toDOM && compareObjs(this.spec, other.spec)))\n};\n\nvar InlineType = function InlineType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nInlineType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n var to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this)\n};\n\nInlineType.prototype.valid = function valid (_, span) { return span.from < span.to };\n\nInlineType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof InlineType && compareObjs(this.attrs, other.attrs) &&\n compareObjs(this.spec, other.spec))\n};\n\nInlineType.is = function is (span) { return span.type instanceof InlineType };\n\nvar NodeType = function NodeType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nNodeType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var from = mapping.mapResult(span.from + oldOffset, 1);\n if (from.deleted) { return null }\n var to = mapping.mapResult(span.to + oldOffset, -1);\n if (to.deleted || to.pos <= from.pos) { return null }\n return new Decoration(from.pos - offset, to.pos - offset, this)\n};\n\nNodeType.prototype.valid = function valid (node, span) {\n var ref = node.content.findIndex(span.from);\n var index = ref.index;\n var offset = ref.offset;\n return offset == span.from && offset + node.child(index).nodeSize == span.to\n};\n\nNodeType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof NodeType && compareObjs(this.attrs, other.attrs) &&\n compareObjs(this.spec, other.spec))\n};\n\n// ::- Decoration objects can be provided to the view through the\n// [`decorations` prop](#view.EditorProps.decorations). They come in\n// several variants—see the static members of this class for details.\nvar Decoration = function Decoration(from, to, type) {\n // :: number\n // The start position of the decoration.\n this.from = from;\n // :: number\n // The end position. Will be the same as `from` for [widget\n // decorations](#view.Decoration^widget).\n this.to = to;\n this.type = type;\n};\n\nvar prototypeAccessors$1 = { spec: { configurable: true } };\n\nDecoration.prototype.copy = function copy (from, to) {\n return new Decoration(from, to, this.type)\n};\n\nDecoration.prototype.eq = function eq (other) {\n return this.type.eq(other.type) && this.from == other.from && this.to == other.to\n};\n\nDecoration.prototype.map = function map (mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset)\n};\n\n// :: (number, union<(view: EditorView, getPos: () → number) → dom.Node, dom.Node>, ?Object) → Decoration\n// Creates a widget decoration, which is a DOM node that's shown in\n// the document at the given position. It is recommended that you\n// delay rendering the widget by passing a function that will be\n// called when the widget is actually drawn in a view, but you can\n// also directly pass a DOM node. `getPos` can be used to find the\n// widget's current document position.\n//\n// spec::- These options are supported:\n//\n// side:: ?number\n// Controls which side of the document position this widget is\n// associated with. When negative, it is drawn before a cursor\n// at its position, and content inserted at that position ends\n// up after the widget. When zero (the default) or positive, the\n// widget is drawn after the cursor and content inserted there\n// ends up before the widget.\n//\n// When there are multiple widgets at a given position, their\n// `side` values determine the order in which they appear. Those\n// with lower values appear first. The ordering of widgets with\n// the same `side` value is unspecified.\n//\n// When `marks` is null, `side` also determines the marks that\n// the widget is wrapped in—those of the node before when\n// negative, those of the node after when positive.\n//\n// marks:: ?[Mark]\n// The precise set of marks to draw around the widget.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to control which DOM events, when they bubble out\n// of this widget, the editor view should ignore.\n//\n// ignoreSelection:: ?bool\n// When set (defaults to false), selection changes inside the\n// widget are ignored, and don't cause ProseMirror to try and\n// re-sync the selection with its selection state.\n//\n// key:: ?string\n// When comparing decorations of this type (in order to decide\n// whether it needs to be redrawn), ProseMirror will by default\n// compare the widget DOM node by identity. If you pass a key,\n// that key will be compared instead, which can be useful when\n// you generate decorations on the fly and don't want to store\n// and reuse DOM nodes. Make sure that any widgets with the same\n// key are interchangeable—if widgets differ in, for example,\n// the behavior of some event handler, they should get\n// different keys.\nDecoration.widget = function widget (pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec))\n};\n\n// :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates an inline decoration, which adds the given attributes to\n// each inline node between `from` and `to`.\n//\n// spec::- These options are recognized:\n//\n// inclusiveStart:: ?bool\n// Determines how the left side of the decoration is\n// [mapped](#transform.Position_Mapping) when content is\n// inserted directly at that position. By default, the decoration\n// won't include the new content, but you can set this to `true`\n// to make it inclusive.\n//\n// inclusiveEnd:: ?bool\n// Determines how the right side of the decoration is mapped.\n// See\n// [`inclusiveStart`](#view.Decoration^inline^spec.inclusiveStart).\nDecoration.inline = function inline (from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec))\n};\n\n// :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates a node decoration. `from` and `to` should point precisely\n// before and after a node in the document. That node, and only that\n// node, will receive the given attributes.\n//\n// spec::-\n//\n// Optional information to store with the decoration. It\n// is also used when comparing decorators for equality.\nDecoration.node = function node (from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec))\n};\n\n// :: Object\n// The spec provided when creating this decoration. Can be useful\n// if you've stored extra information in that object.\nprototypeAccessors$1.spec.get = function () { return this.type.spec };\n\nObject.defineProperties( Decoration.prototype, prototypeAccessors$1 );\n\n// DecorationAttrs:: interface\n// A set of attributes to add to a decorated node. Most properties\n// simply directly correspond to DOM attributes of the same name,\n// which will be set to the property's value. These are exceptions:\n//\n// class:: ?string\n// A CSS class name or a space-separated set of class names to be\n// _added_ to the classes that the node already had.\n//\n// style:: ?string\n// A string of CSS to be _added_ to the node's existing `style` property.\n//\n// nodeName:: ?string\n// When non-null, the target node is wrapped in a DOM element of\n// this type (and the other attributes are applied to this element).\n\nvar none = [], noSpec = {};\n\n// ::- A collection of [decorations](#view.Decoration), organized in\n// such a way that the drawing algorithm can efficiently use and\n// compare them. This is a persistent data structure—it is not\n// modified, updates create a new value.\nvar DecorationSet = function DecorationSet(local, children) {\n this.local = local && local.length ? local : none;\n this.children = children && children.length ? children : none;\n};\n\n// :: (Node, [Decoration]) → DecorationSet\n// Create a set of decorations, using the structure of the given\n// document.\nDecorationSet.create = function create (doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty\n};\n\n// :: (?number, ?number, ?(spec: Object) → bool) → [Decoration]\n// Find all decorations in this set which touch the given range\n// (including decorations that start or end directly at the\n// boundaries) and match the given predicate on their spec. When\n// `start` and `end` are omitted, all decorations in the set are\n// considered. When `predicate` isn't given, all decorations are\n// assumed to match.\nDecorationSet.prototype.find = function find (start, end, predicate) {\n var result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result\n};\n\nDecorationSet.prototype.findInner = function findInner (start, end, result, offset, predicate) {\n for (var i = 0; i < this.local.length; i++) {\n var span = this.local[i];\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec)))\n { result.push(span.copy(span.from + offset, span.to + offset)); }\n }\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] < end && this.children[i$1 + 1] > start) {\n var childOff = this.children[i$1] + 1;\n this.children[i$1 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n};\n\n// :: (Mapping, Node, ?Object) → DecorationSet\n// Map the set of decorations in response to a change in the\n// document.\n//\n// options::- An optional set of options.\n//\n// onRemove:: ?(decorationSpec: Object)\n// When given, this function will be called for each decoration\n// that gets dropped as a result of the mapping, passing the\n// spec of that decoration.\nDecorationSet.prototype.map = function map (mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) { return this }\n return this.mapInner(mapping, doc, 0, 0, options || noSpec)\n};\n\nDecorationSet.prototype.mapInner = function mapInner (mapping, node, offset, oldOffset, options) {\n var newLocal;\n for (var i = 0; i < this.local.length; i++) {\n var mapped = this.local[i].map(mapping, offset, oldOffset);\n if (mapped && mapped.type.valid(node, mapped)) { (newLocal || (newLocal = [])).push(mapped); }\n else if (options.onRemove) { options.onRemove(this.local[i].spec); }\n }\n\n if (this.children.length)\n { return mapChildren(this.children, newLocal, mapping, node, offset, oldOffset, options) }\n else\n { return newLocal ? new DecorationSet(newLocal.sort(byPos)) : empty }\n};\n\n// :: (Node, [Decoration]) → DecorationSet\n// Add the given array of decorations to the ones in the set,\n// producing a new set. Needs access to the current document to\n// create the appropriate tree structure.\nDecorationSet.prototype.add = function add (doc, decorations) {\n if (!decorations.length) { return this }\n if (this == empty) { return DecorationSet.create(doc, decorations) }\n return this.addInner(doc, decorations, 0)\n};\n\nDecorationSet.prototype.addInner = function addInner (doc, decorations, offset) {\n var this$1 = this;\n\n var children, childIndex = 0;\n doc.forEach(function (childNode, childOffset) {\n var baseOffset = childOffset + offset, found;\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) { return }\n\n if (!children) { children = this$1.children.slice(); }\n while (childIndex < children.length && children[childIndex] < childOffset) { childIndex += 3; }\n if (children[childIndex] == childOffset)\n { children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1); }\n else\n { children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec)); }\n childIndex += 3;\n });\n\n var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local,\n children || this.children)\n};\n\n// :: ([Decoration]) → DecorationSet\n// Create a new set that contains the decorations in this set, minus\n// the ones in the given array.\nDecorationSet.prototype.remove = function remove (decorations) {\n if (decorations.length == 0 || this == empty) { return this }\n return this.removeInner(decorations, 0)\n};\n\nDecorationSet.prototype.removeInner = function removeInner (decorations, offset) {\n var children = this.children, local = this.local;\n for (var i = 0; i < children.length; i += 3) {\n var found = (void 0), from = children[i] + offset, to = children[i + 1] + offset;\n for (var j = 0, span = (void 0); j < decorations.length; j++) { if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null\n ;(found || (found = [])).push(span);\n }\n } }\n if (!found) { continue }\n if (children == this.children) { children = this.children.slice(); }\n var removed = children[i + 2].removeInner(found, from + 1);\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n if (local.length) { for (var i$1 = 0, span$1 = (void 0); i$1 < decorations.length; i$1++) { if (span$1 = decorations[i$1]) {\n for (var j$1 = 0; j$1 < local.length; j$1++) { if (local[j$1].type.eq(span$1.type)) {\n if (local == this.local) { local = this.local.slice(); }\n local.splice(j$1--, 1);\n } }\n } } }\n if (children == this.children && local == this.local) { return this }\n return local.length || children.length ? new DecorationSet(local, children) : empty\n};\n\nDecorationSet.prototype.forChild = function forChild (offset, node) {\n if (this == empty) { return this }\n if (node.isLeaf) { return DecorationSet.empty }\n\n var child, local;\n for (var i = 0; i < this.children.length; i += 3) { if (this.children[i] >= offset) {\n if (this.children[i] == offset) { child = this.children[i + 2]; }\n break\n } }\n var start = offset + 1, end = start + node.content.size;\n for (var i$1 = 0; i$1 < this.local.length; i$1++) {\n var dec = this.local[i$1];\n if (dec.from < end && dec.to > start && (dec.type instanceof InlineType)) {\n var from = Math.max(start, dec.from) - start, to = Math.min(end, dec.to) - start;\n if (from < to) { (local || (local = [])).push(dec.copy(from, to)); }\n }\n }\n if (local) {\n var localSet = new DecorationSet(local.sort(byPos));\n return child ? new DecorationGroup([localSet, child]) : localSet\n }\n return child || empty\n};\n\nDecorationSet.prototype.eq = function eq (other) {\n if (this == other) { return true }\n if (!(other instanceof DecorationSet) ||\n this.local.length != other.local.length ||\n this.children.length != other.children.length) { return false }\n for (var i = 0; i < this.local.length; i++)\n { if (!this.local[i].eq(other.local[i])) { return false } }\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3)\n { if (this.children[i$1] != other.children[i$1] ||\n this.children[i$1 + 1] != other.children[i$1 + 1] ||\n !this.children[i$1 + 2].eq(other.children[i$1 + 2])) { return false } }\n return true\n};\n\nDecorationSet.prototype.locals = function locals (node) {\n return removeOverlap(this.localsInner(node))\n};\n\nDecorationSet.prototype.localsInner = function localsInner (node) {\n if (this == empty) { return none }\n if (node.inlineContent || !this.local.some(InlineType.is)) { return this.local }\n var result = [];\n for (var i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType))\n { result.push(this.local[i]); }\n }\n return result\n};\n\nvar empty = new DecorationSet();\n\n// :: DecorationSet\n// The empty set of decorations.\nDecorationSet.empty = empty;\n\nDecorationSet.removeOverlap = removeOverlap;\n\n// :- An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\nvar DecorationGroup = function DecorationGroup(members) {\n this.members = members;\n};\n\nDecorationGroup.prototype.forChild = function forChild (offset, child) {\n if (child.isLeaf) { return DecorationSet.empty }\n var found = [];\n for (var i = 0; i < this.members.length; i++) {\n var result = this.members[i].forChild(offset, child);\n if (result == empty) { continue }\n if (result instanceof DecorationGroup) { found = found.concat(result.members); }\n else { found.push(result); }\n }\n return DecorationGroup.from(found)\n};\n\nDecorationGroup.prototype.eq = function eq (other) {\n if (!(other instanceof DecorationGroup) ||\n other.members.length != this.members.length) { return false }\n for (var i = 0; i < this.members.length; i++)\n { if (!this.members[i].eq(other.members[i])) { return false } }\n return true\n};\n\nDecorationGroup.prototype.locals = function locals (node) {\n var result, sorted = true;\n for (var i = 0; i < this.members.length; i++) {\n var locals = this.members[i].localsInner(node);\n if (!locals.length) { continue }\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n for (var j = 0; j < locals.length; j++) { result.push(locals[j]); }\n }\n }\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none\n};\n\n// : ([DecorationSet]) → union\n// Create a group for the given array of decoration sets, or return\n// a single set when possible.\nDecorationGroup.from = function from (members) {\n switch (members.length) {\n case 0: return empty\n case 1: return members[0]\n default: return new DecorationGroup(members)\n }\n};\n\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n var children = oldChildren.slice();\n\n // Mark the children that are directly touched by changes, and\n // move those that are after the changes.\n var shift = function (oldStart, oldEnd, newStart, newEnd) {\n for (var i = 0; i < children.length; i += 3) {\n var end = children[i + 1], dSize = (void 0);\n if (end == -1 || oldStart > end + oldOffset) { continue }\n if (oldEnd >= children[i] + oldOffset) {\n children[i + 1] = -1;\n } else if (dSize = (newEnd - newStart) - (oldEnd - oldStart) + (oldOffset - offset)) {\n children[i] += dSize;\n children[i + 1] += dSize;\n }\n }\n };\n for (var i = 0; i < mapping.maps.length; i++) { mapping.maps[i].forEach(shift); }\n\n // Find the child nodes that still correspond to a single node,\n // recursively call mapInner on them and update their positions.\n var mustRebuild = false;\n for (var i$1 = 0; i$1 < children.length; i$1 += 3) { if (children[i$1 + 1] == -1) { // Touched nodes\n var from = mapping.map(children[i$1] + oldOffset), fromLocal = from - offset;\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue\n }\n // Must read oldChildren because children was tagged with -1\n var to = mapping.map(oldChildren[i$1 + 1] + oldOffset, -1), toLocal = to - offset;\n var ref = node.content.findIndex(fromLocal);\n var index = ref.index;\n var childOffset = ref.offset;\n var childNode = node.maybeChild(index);\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n var mapped = children[i$1 + 2].mapInner(mapping, childNode, from + 1, children[i$1] + oldOffset + 1, options);\n if (mapped != empty) {\n children[i$1] = fromLocal;\n children[i$1 + 1] = toLocal;\n children[i$1 + 2] = mapped;\n } else {\n children[i$1 + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n } }\n\n // Remaining children must be collected and rebuilt into the appropriate structure\n if (mustRebuild) {\n var decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal || [], mapping,\n offset, oldOffset, options);\n var built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n for (var i$2 = 0; i$2 < children.length; i$2 += 3) { if (children[i$2 + 1] < 0) {\n children.splice(i$2, 3);\n i$2 -= 3;\n } }\n for (var i$3 = 0, j = 0; i$3 < built.children.length; i$3 += 3) {\n var from$1 = built.children[i$3];\n while (j < children.length && children[j] < from$1) { j += 3; }\n children.splice(j, 0, built.children[i$3], built.children[i$3 + 1], built.children[i$3 + 2]);\n }\n }\n\n return new DecorationSet(newLocal && newLocal.sort(byPos), children)\n}\n\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) { return spans }\n var result = [];\n for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n return result\n}\n\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n // Gather all decorations from the remaining marked children\n function gather(set, oldOffset) {\n for (var i = 0; i < set.local.length; i++) {\n var mapped = set.local[i].map(mapping, offset, oldOffset);\n if (mapped) { decorations.push(mapped); }\n else if (options.onRemove) { options.onRemove(set.local[i].spec); }\n }\n for (var i$1 = 0; i$1 < set.children.length; i$1 += 3)\n { gather(set.children[i$1 + 2], set.children[i$1] + oldOffset + 1); }\n }\n for (var i = 0; i < children.length; i += 3) { if (children[i + 1] == -1)\n { gather(children[i + 2], oldChildren[i] + oldOffset + 1); } }\n\n return decorations\n}\n\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) { return null }\n var end = offset + node.nodeSize, found = null;\n for (var i = 0, span = (void 0); i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n(found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n return found\n}\n\nfunction withoutNulls(array) {\n var result = [];\n for (var i = 0; i < array.length; i++)\n { if (array[i] != null) { result.push(array[i]); } }\n return result\n}\n\n// : ([Decoration], Node, number) → DecorationSet\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtractet from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\nfunction buildTree(spans, node, offset, options) {\n var children = [], hasNulls = false;\n node.forEach(function (childNode, localStart) {\n var found = takeSpansForNode(spans, childNode, localStart + offset);\n if (found) {\n hasNulls = true;\n var subtree = buildTree(found, childNode, offset + localStart + 1, options);\n if (subtree != empty)\n { children.push(localStart, localStart + childNode.nodeSize, subtree); }\n }\n });\n var locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n for (var i = 0; i < locals.length; i++) { if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) { options.onRemove(locals[i].spec); }\n locals.splice(i--, 1);\n } }\n return locals.length || children.length ? new DecorationSet(locals, children) : empty\n}\n\n// : (Decoration, Decoration) → number\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to\n}\n\n// : ([Decoration]) → [Decoration]\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\nfunction removeOverlap(spans) {\n var working = spans;\n for (var i = 0; i < working.length - 1; i++) {\n var span = working[i];\n if (span.from != span.to) { for (var j = i + 1; j < working.length; j++) {\n var next = working[j];\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) { working = spans.slice(); }\n // Followed by a partially overlapping larger span. Split that\n // span.\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n continue\n } else {\n if (next.from < span.to) {\n if (working == spans) { working = spans.slice(); }\n // The end of this one overlaps with a subsequent span. Split\n // this one.\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n break\n }\n } }\n }\n return working\n}\n\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) { i++; }\n array.splice(i, 0, deco);\n}\n\n// : (EditorView) → union\n// Get the decorations associated with the current props of a view.\nfunction viewDecorations(view) {\n var found = [];\n view.someProp(\"decorations\", function (f) {\n var result = f(view.state);\n if (result && result != empty) { found.push(result); }\n });\n if (view.cursorWrapper)\n { found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco])); }\n return DecorationGroup.from(found)\n}\n\n// ::- An editor view manages the DOM structure that represents an\n// editable document. Its state and behavior are determined by its\n// [props](#view.DirectEditorProps).\nvar EditorView = function EditorView(place, props) {\n this._props = props;\n // :: EditorState\n // The view's current [state](#state.EditorState).\n this.state = props.state;\n\n this.dispatch = this.dispatch.bind(this);\n\n this._root = null;\n this.focused = false;\n\n // :: dom.Element\n // An editable DOM node containing the document. (You probably\n // should not directly interfere with its content.)\n this.dom = (place && place.mount) || document.createElement(\"div\");\n if (place) {\n if (place.appendChild) { place.appendChild(this.dom); }\n else if (place.apply) { place(this.dom); }\n else if (place.mount) { this.mounted = true; }\n }\n\n // :: bool\n // Indicates whether the editor is currently [editable](#view.EditorProps.editable).\n this.editable = getEditable(this);\n this.markCursor = null;\n this.cursorWrapper = null;\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n\n this.lastSelectedViewDesc = null;\n // :: ?{slice: Slice, move: bool}\n // When editor content is being dragged, this object contains\n // information about the dragged slice and whether it is being\n // copied or moved. At any other time, it is null.\n this.dragging = null;\n\n initInput(this);\n\n this.pluginViews = [];\n this.updatePluginViews();\n};\n\nvar prototypeAccessors$2 = { props: { configurable: true },root: { configurable: true } };\n\n// composing:: boolean\n// Holds `true` when a\n// [composition](https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide)\n// is active.\n\n// :: DirectEditorProps\n// The view's current [props](#view.EditorProps).\nprototypeAccessors$2.props.get = function () {\n if (this._props.state != this.state) {\n var prev = this._props;\n this._props = {};\n for (var name in prev) { this._props[name] = prev[name]; }\n this._props.state = this.state;\n }\n return this._props\n};\n\n// :: (DirectEditorProps)\n// Update the view's props. Will immediately cause an update to\n// the DOM.\nEditorView.prototype.update = function update (props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) { ensureListeners(this); }\n this._props = props;\n this.updateStateInner(props.state, true);\n};\n\n// :: (DirectEditorProps)\n// Update the view by updating existing props object with the object\n// given as argument. Equivalent to `view.update(Object.assign({},\n// view.props, props))`.\nEditorView.prototype.setProps = function setProps (props) {\n var updated = {};\n for (var name in this._props) { updated[name] = this._props[name]; }\n updated.state = this.state;\n for (var name$1 in props) { updated[name$1] = props[name$1]; }\n this.update(updated);\n};\n\n// :: (EditorState)\n// Update the editor's `state` prop, without touching any of the\n// other props.\nEditorView.prototype.updateState = function updateState (state) {\n this.updateStateInner(state, this.state.plugins != state.plugins);\n};\n\nEditorView.prototype.updateStateInner = function updateStateInner (state, reconfigured) {\n var this$1 = this;\n\n var prev = this.state, redraw = false;\n this.state = state;\n if (reconfigured) {\n var nodeViews = buildNodeViews(this);\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n ensureListeners(this);\n }\n\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n var innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);\n\n var scroll = reconfigured ? \"reset\"\n : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n var updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n var updateSel = updateDoc || !state.selection.eq(prev.selection);\n var oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n\n if (updateSel) {\n this.domObserver.stop();\n // Work around an issue in Chrome, IE, and Edge where changing\n // the DOM around an active selection puts it into a broken\n // state where the thing the user sees differs from the\n // selection reported by the Selection object (#710, #973,\n // #1011, #1013).\n var forceSelUpdate = updateDoc && (result.ie || result.chrome) &&\n !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n if (updateDoc) {\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n }\n // Work around for an issue where an update arriving right between\n // a DOM selection change and the \"selectionchange\" event for it\n // can cause a spurious DOM selection update, disrupting mouse\n // drag selection.\n if (forceSelUpdate ||\n !(this.mouseDown && this.domObserver.currentSelection.eq(this.root.getSelection()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n this.domObserver.start();\n }\n\n this.updatePluginViews(prev);\n\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n var startDOM = this.root.getSelection().focusNode;\n if (this.someProp(\"handleScrollToSelection\", function (f) { return f(this$1); }))\n ; // Handled\n else if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"])\n { scrollRectIntoView(this, this.docView.domAfterPos(state.selection.from).getBoundingClientRect(), startDOM); }\n else\n { scrollRectIntoView(this, this.coordsAtPos(state.selection.head), startDOM); }\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n};\n\nEditorView.prototype.destroyPluginViews = function destroyPluginViews () {\n var view;\n while (view = this.pluginViews.pop()) { if (view.destroy) { view.destroy(); } }\n};\n\nEditorView.prototype.updatePluginViews = function updatePluginViews (prevState) {\n if (!prevState || prevState.plugins != this.state.plugins) {\n this.destroyPluginViews();\n for (var i = 0; i < this.state.plugins.length; i++) {\n var plugin = this.state.plugins[i];\n if (plugin.spec.view) { this.pluginViews.push(plugin.spec.view(this)); }\n }\n } else {\n for (var i$1 = 0; i$1 < this.pluginViews.length; i$1++) {\n var pluginView = this.pluginViews[i$1];\n if (pluginView.update) { pluginView.update(this, prevState); }\n }\n }\n};\n\n// :: (string, ?(prop: *) → *) → *\n// Goes over the values of a prop, first those provided directly,\n// then those from plugins (in order), and calls `f` every time a\n// non-undefined value is found. When `f` returns a truthy value,\n// that is immediately returned. When `f` isn't provided, it is\n// treated as the identity function (the prop value is returned\n// directly).\nEditorView.prototype.someProp = function someProp (propName, f) {\n var prop = this._props && this._props[propName], value;\n if (prop != null && (value = f ? f(prop) : prop)) { return value }\n var plugins = this.state.plugins;\n if (plugins) { for (var i = 0; i < plugins.length; i++) {\n var prop$1 = plugins[i].props[propName];\n if (prop$1 != null && (value = f ? f(prop$1) : prop$1)) { return value }\n } }\n};\n\n// :: () → bool\n// Query whether the view has focus.\nEditorView.prototype.hasFocus = function hasFocus () {\n return this.root.activeElement == this.dom\n};\n\n// :: ()\n// Focus the editor.\nEditorView.prototype.focus = function focus () {\n this.domObserver.stop();\n if (this.editable) { focusPreventScroll(this.dom); }\n selectionToDOM(this);\n this.domObserver.start();\n};\n\n// :: union\n// Get the document root in which the editor exists. This will\n// usually be the top-level `document`, but might be a [shadow\n// DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n// root if the editor is inside one.\nprototypeAccessors$2.root.get = function () {\n var cached = this._root;\n if (cached == null) { for (var search = this.dom.parentNode; search; search = search.parentNode) {\n if (search.nodeType == 9 || (search.nodeType == 11 && search.host)) {\n if (!search.getSelection) { Object.getPrototypeOf(search).getSelection = function () { return document.getSelection(); }; }\n return this._root = search\n }\n } }\n return cached || document\n};\n\n// :: ({left: number, top: number}) → ?{pos: number, inside: number}\n// Given a pair of viewport coordinates, return the document\n// position that corresponds to them. May return null if the given\n// coordinates aren't inside of the editor. When an object is\n// returned, its `pos` property is the position nearest to the\n// coordinates, and its `inside` property holds the position of the\n// inner node that the position falls inside of, or -1 if it is at\n// the top level, not in any node.\nEditorView.prototype.posAtCoords = function posAtCoords$1 (coords) {\n return posAtCoords(this, coords)\n};\n\n// :: (number) → {left: number, right: number, top: number, bottom: number}\n// Returns the viewport rectangle at a given document position. `left`\n// and `right` will be the same number, as this returns a flat\n// cursor-ish rectangle.\nEditorView.prototype.coordsAtPos = function coordsAtPos$1 (pos) {\n return coordsAtPos(this, pos)\n};\n\n// :: (number) → {node: dom.Node, offset: number}\n// Find the DOM position that corresponds to the given document\n// position. Note that you should **not** mutate the editor's\n// internal DOM, only inspect it (and even that is usually not\n// necessary).\nEditorView.prototype.domAtPos = function domAtPos (pos) {\n return this.docView.domFromPos(pos)\n};\n\n// :: (number) → ?dom.Node\n// Find the DOM node that represents the document node after the\n// given position. May return `null` when the position doesn't point\n// in front of a node or if the node is inside an opaque node view.\n//\n// This is intended to be able to call things like\n// `getBoundingClientRect` on that DOM node. Do **not** mutate the\n// editor DOM directly, or add styling this way, since that will be\n// immediately overriden by the editor as it redraws the node.\nEditorView.prototype.nodeDOM = function nodeDOM (pos) {\n var desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null\n};\n\n// :: (dom.Node, number, ?number) → number\n// Find the document position that corresponds to a given DOM\n// position. (Whenever possible, it is preferable to inspect the\n// document structure directly, rather than poking around in the\n// DOM, but sometimes—for example when interpreting an event\n// target—you don't have a choice.)\n//\n// The `bias` parameter can be used to influence which side of a DOM\n// node to use when the position is inside a leaf node.\nEditorView.prototype.posAtDOM = function posAtDOM (node, offset, bias) {\n if ( bias === void 0 ) bias = -1;\n\n var pos = this.docView.posFromDOM(node, offset, bias);\n if (pos == null) { throw new RangeError(\"DOM position not inside the editor\") }\n return pos\n};\n\n// :: (union<\"up\", \"down\", \"left\", \"right\", \"forward\", \"backward\">, ?EditorState) → bool\n// Find out whether the selection is at the end of a textblock when\n// moving in a given direction. When, for example, given `\"left\"`,\n// it will return true if moving left from the current cursor\n// position would leave that position's parent textblock. Will apply\n// to the view's current state by default, but it is possible to\n// pass a different state.\nEditorView.prototype.endOfTextblock = function endOfTextblock$1 (dir, state) {\n return endOfTextblock(this, state || this.state, dir)\n};\n\n// :: ()\n// Removes the editor from the DOM and destroys all [node\n// views](#view.NodeView).\nEditorView.prototype.destroy = function destroy () {\n if (!this.docView) { return }\n destroyInput(this);\n this.destroyPluginViews();\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n this.docView.destroy();\n this.docView = null;\n};\n\n// Used for testing.\nEditorView.prototype.dispatchEvent = function dispatchEvent$1 (event) {\n return dispatchEvent(this, event)\n};\n\n// :: (Transaction)\n// Dispatch a transaction. Will call\n// [`dispatchTransaction`](#view.DirectEditorProps.dispatchTransaction)\n// when given, and otherwise defaults to applying the transaction to\n// the current state and calling\n// [`updateState`](#view.EditorView.updateState) with the result.\n// This method is bound to the view instance, so that it can be\n// easily passed around.\nEditorView.prototype.dispatch = function dispatch (tr) {\n var dispatchTransaction = this._props.dispatchTransaction;\n if (dispatchTransaction) { dispatchTransaction.call(this, tr); }\n else { this.updateState(this.state.apply(tr)); }\n};\n\nObject.defineProperties( EditorView.prototype, prototypeAccessors$2 );\n\nfunction computeDocDeco(view) {\n var attrs = Object.create(null);\n attrs.class = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n\n view.someProp(\"attributes\", function (value) {\n if (typeof value == \"function\") { value = value(view.state); }\n if (value) { for (var attr in value) {\n if (attr == \"class\")\n { attrs.class += \" \" + value[attr]; }\n else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\")\n { attrs[attr] = String(value[attr]); }\n } }\n });\n\n return [Decoration.node(0, view.state.doc.content.size, attrs)]\n}\n\nfunction updateCursorWrapper(view) {\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var visible = ref.visible;\n if (view.markCursor) {\n var dom = document.createElement(\"img\");\n dom.setAttribute(\"mark-placeholder\", \"true\");\n view.cursorWrapper = {dom: dom, deco: Decoration.widget($head.pos, dom, {raw: true, marks: view.markCursor})};\n } else if (visible || $head.pos != $anchor.pos) {\n view.cursorWrapper = null;\n } else {\n var dom$1;\n if (!view.cursorWrapper || view.cursorWrapper.dom.childNodes.length) {\n dom$1 = document.createElement(\"div\");\n dom$1.style.position = \"absolute\";\n dom$1.style.left = \"-100000px\";\n } else if (view.cursorWrapper.deco.pos != $head.pos) {\n dom$1 = view.cursorWrapper.dom;\n }\n if (dom$1)\n { view.cursorWrapper = {dom: dom$1, deco: Decoration.widget($head.pos, dom$1, {raw: true})}; }\n }\n}\n\nfunction getEditable(view) {\n return !view.someProp(\"editable\", function (value) { return value(view.state) === false; })\n}\n\nfunction selectionContextChanged(sel1, sel2) {\n var depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.node(depth) != sel2.$anchor.node(depth)\n}\n\nfunction buildNodeViews(view) {\n var result = {};\n view.someProp(\"nodeViews\", function (obj) {\n for (var prop in obj) { if (!Object.prototype.hasOwnProperty.call(result, prop))\n { result[prop] = obj[prop]; } }\n });\n return result\n}\n\nfunction changedNodeViews(a, b) {\n var nA = 0, nB = 0;\n for (var prop in a) {\n if (a[prop] != b[prop]) { return true }\n nA++;\n }\n for (var _ in b) { nB++; }\n return nA != nB\n}\n\n// EditorProps:: interface\n//\n// Props are configuration values that can be passed to an editor view\n// or included in a plugin. This interface lists the supported props.\n//\n// The various event-handling functions may all return `true` to\n// indicate that they handled the given event. The view will then take\n// care to call `preventDefault` on the event, except with\n// `handleDOMEvents`, where the handler itself is responsible for that.\n//\n// How a prop is resolved depends on the prop. Handler functions are\n// called one at a time, starting with the base props and then\n// searching through the plugins (in order of appearance) until one of\n// them returns true. For some props, the first plugin that yields a\n// value gets precedence.\n//\n// handleDOMEvents:: ?Object<(view: EditorView, event: dom.Event) → bool>\n// Can be an object mapping DOM event type names to functions that\n// handle them. Such functions will be called before any handling\n// ProseMirror does of events fired on the editable DOM element.\n// Contrary to the other event handling props, when returning true\n// from such a function, you are responsible for calling\n// `preventDefault` yourself (or not, if you want to allow the\n// default behavior).\n//\n// handleKeyDown:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Called when the editor receives a `keydown` event.\n//\n// handleKeyPress:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Handler for `keypress` events.\n//\n// handleTextInput:: ?(view: EditorView, from: number, to: number, text: string) → bool\n// Whenever the user directly input text, this handler is called\n// before the input is applied. If it returns `true`, the default\n// behavior of actually inserting the text is suppressed.\n//\n// handleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a click, from the inside out. The\n// `direct` flag will be true for the inner node.\n//\n// handleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is clicked, after `handleClickOn` handlers\n// have been called.\n//\n// handleDoubleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a double click.\n//\n// handleDoubleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is double-clicked, after `handleDoubleClickOn`.\n//\n// handleTripleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a triple click.\n//\n// handleTripleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is triple-clicked, after `handleTripleClickOn`.\n//\n// handlePaste:: ?(view: EditorView, event: dom.Event, slice: Slice) → bool\n// Can be used to override the behavior of pasting. `slice` is the\n// pasted content parsed by the editor, but you can directly access\n// the event to get at the raw content.\n//\n// handleDrop:: ?(view: EditorView, event: dom.Event, slice: Slice, moved: bool) → bool\n// Called when something is dropped on the editor. `moved` will be\n// true if this drop moves from the current selection (which should\n// thus be deleted).\n//\n// handleScrollToSelection:: ?(view: EditorView) → bool\n// Called when the view, after updating its state, tries to scroll\n// the selection into view. A handler function may return false to\n// indicate that it did not handle the scrolling and further\n// handlers or the default behavior should be tried.\n//\n// createSelectionBetween:: ?(view: EditorView, anchor: ResolvedPos, head: ResolvedPos) → ?Selection\n// Can be used to override the way a selection is created when\n// reading a DOM selection between the given anchor and head.\n//\n// domParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading editor changes\n// from the DOM. Defaults to calling\n// [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) on the\n// editor's schema.\n//\n// transformPastedHTML:: ?(html: string) → string\n// Can be used to transform pasted HTML text, _before_ it is parsed,\n// for example to clean it up.\n//\n// clipboardParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading content from\n// the clipboard. When not given, the value of the\n// [`domParser`](#view.EditorProps.domParser) prop is used.\n//\n// transformPastedText:: ?(text: string) → string\n// Transform pasted plain text.\n//\n// clipboardTextParser:: ?(text: string, $context: ResolvedPos) → Slice\n// A function to parse text from the clipboard into a document\n// slice. Called after\n// [`transformPastedText`](#view.EditorProps.transformPastedText).\n// The default behavior is to split the text into lines, wrap them\n// in `

          ` tags, and call\n// [`clipboardParser`](#view.EditorProps.clipboardParser) on it.\n//\n// transformPasted:: ?(Slice) → Slice\n// Can be used to transform pasted content before it is applied to\n// the document.\n//\n// nodeViews:: ?Object<(node: Node, view: EditorView, getPos: () → number, decorations: [Decoration]) → NodeView>\n// Allows you to pass custom rendering and behavior logic for nodes\n// and marks. Should map node and mark names to constructor\n// functions that produce a [`NodeView`](#view.NodeView) object\n// implementing the node's display behavior. For nodes, the third\n// argument `getPos` is a function that can be called to get the\n// node's current position, which can be useful when creating\n// transactions to update it. For marks, the third argument is a\n// boolean that indicates whether the mark's content is inline.\n//\n// `decorations` is an array of node or inline decorations that are\n// active around the node. They are automatically drawn in the\n// normal way, and you will usually just want to ignore this, but\n// they can also be used as a way to provide context information to\n// the node view without adding it to the document itself.\n//\n// clipboardSerializer:: ?DOMSerializer\n// The DOM serializer to use when putting content onto the\n// clipboard. If not given, the result of\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)\n// will be used.\n//\n// clipboardTextSerializer:: ?(Slice) → string\n// A function that will be called to get the text for the current\n// selection when copying text to the clipboard. By default, the\n// editor will use [`textBetween`](#model.Node.textBetween) on the\n// selected range.\n//\n// decorations:: ?(state: EditorState) → ?DecorationSet\n// A set of [document decorations](#view.Decoration) to show in the\n// view.\n//\n// editable:: ?(state: EditorState) → bool\n// When this returns false, the content of the view is not directly\n// editable.\n//\n// attributes:: ?union, (EditorState) → ?Object>\n// Control the DOM attributes of the editable element. May be either\n// an object or a function going from an editor state to an object.\n// By default, the element will get a class `\"ProseMirror\"`, and\n// will have its `contentEditable` attribute determined by the\n// [`editable` prop](#view.EditorProps.editable). Additional classes\n// provided here will be added to the class. For other attributes,\n// the value provided first (as in\n// [`someProp`](#view.EditorView.someProp)) will be used.\n//\n// scrollThreshold:: ?union\n// Determines the distance (in pixels) between the cursor and the\n// end of the visible viewport at which point, when scrolling the\n// cursor into view, scrolling takes place. Defaults to 0.\n//\n// scrollMargin:: ?union\n// Determines the extra space (in pixels) that is left above or\n// below the cursor when it is scrolled into view. Defaults to 5.\n\n// DirectEditorProps:: interface extends EditorProps\n//\n// The props object given directly to the editor view supports two\n// fields that can't be used in plugins:\n//\n// state:: EditorState\n// The current state of the editor.\n//\n// dispatchTransaction:: ?(tr: Transaction)\n// The callback over which to send transactions (state updates)\n// produced by the view. If you specify this, you probably want to\n// make sure this ends up calling the view's\n// [`updateState`](#view.EditorView.updateState) method with a new\n// state that has the transaction\n// [applied](#state.EditorState.apply). The callback will be bound to have\n// the view instance as its `this` binding.\n\n\n//# sourceMappingURL=index.es.js.map\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-view/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Decoration\", function() { return Decoration; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DecorationSet\", function() { return DecorationSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorView\", function() { return EditorView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__endComposition\", function() { return endComposition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__parseFromClipboard\", function() { return parseFromClipboard; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__serializeForClipboard\", function() { return serializeForClipboard; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\nvar result = {};\n\nif (typeof navigator != \"undefined\" && typeof document != \"undefined\") {\n var ie_edge = /Edge\\/(\\d+)/.exec(navigator.userAgent);\n var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n result.mac = /Mac/.test(navigator.platform);\n var ie = result.ie = !!(ie_upto10 || ie_11up || ie_edge);\n result.ie_version = ie_upto10 ? document.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : null;\n result.gecko = !ie && /gecko\\/(\\d+)/i.test(navigator.userAgent);\n result.gecko_version = result.gecko && +(/Firefox\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n var chrome = !ie && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\n result.chrome = !!chrome;\n result.chrome_version = chrome && +chrome[1];\n result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n result.android = /Android \\d/.test(navigator.userAgent);\n result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style;\n result.safari = /Apple Computer/.test(navigator.vendor);\n result.webkit_version = result.webkit && +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n}\n\nvar domIndex = function domIndex(node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n\n if (!node) {\n return index;\n }\n }\n};\n\nvar parentNode = function parentNode(node) {\n var parent = node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent;\n};\n\nvar textRange = function textRange(node, from, to) {\n var range = document.createRange();\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range;\n}; // Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\n\n\nvar isEquivalentPosition = function isEquivalentPosition(node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1));\n};\n\nvar atomElements = /^(img|br|input|textarea|hr)$/i;\n\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) {\n return true;\n }\n\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n var parent = node.parentNode;\n\n if (parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\") {\n return false;\n }\n\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n\n if (node.contentEditable == \"false\") {\n return false;\n }\n\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false;\n }\n }\n}\n\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\n\nfunction isOnEdge(node, offset, parent) {\n for (var atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) {\n return true;\n }\n\n var index = domIndex(node);\n node = node.parentNode;\n\n if (!node) {\n return false;\n }\n\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\n\nfunction hasBlockDesc(dom) {\n var desc;\n\n for (var cur = dom; cur; cur = cur.parentNode) {\n if (desc = cur.pmViewDesc) {\n break;\n }\n }\n\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n} // Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\n\n\nvar selectionCollapsed = function selectionCollapsed(domSel) {\n var collapsed = domSel.isCollapsed;\n\n if (collapsed && result.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed) {\n collapsed = false;\n }\n\n return collapsed;\n};\n\nfunction keyEvent(keyCode, key) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event;\n}\n\nfunction windowRect(win) {\n return {\n left: 0,\n right: win.innerWidth,\n top: 0,\n bottom: win.innerHeight\n };\n}\n\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side];\n}\n\nfunction scrollRectIntoView(view, rect, startDOM) {\n var scrollThreshold = view.someProp(\"scrollThreshold\") || 0,\n scrollMargin = view.someProp(\"scrollMargin\") || 5;\n var doc = view.dom.ownerDocument,\n win = doc.defaultView;\n\n for (var parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) {\n break;\n }\n\n if (parent.nodeType != 1) {\n continue;\n }\n\n var atTop = parent == doc.body || parent.nodeType != 1;\n var bounding = atTop ? windowRect(win) : parent.getBoundingClientRect();\n var moveX = 0,\n moveY = 0;\n\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\")) {\n moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\"));\n } else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\")) {\n moveY = rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\");\n }\n\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\")) {\n moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\"));\n } else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\")) {\n moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\");\n }\n\n if (moveX || moveY) {\n if (atTop) {\n win.scrollBy(moveX, moveY);\n } else {\n if (moveY) {\n parent.scrollTop += moveY;\n }\n\n if (moveX) {\n parent.scrollLeft += moveX;\n }\n\n rect = {\n left: rect.left - moveX,\n top: rect.top - moveY,\n right: rect.right - moveX,\n bottom: rect.bottom - moveY\n };\n }\n }\n\n if (atTop) {\n break;\n }\n }\n} // Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\n\n\nfunction storeScrollPos(view) {\n var rect = view.dom.getBoundingClientRect(),\n startY = Math.max(0, rect.top);\n var refDOM, refTop;\n\n for (var x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {\n var dom = view.root.elementFromPoint(x, y);\n\n if (dom == view.dom || !view.dom.contains(dom)) {\n continue;\n }\n\n var localRect = dom.getBoundingClientRect();\n\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break;\n }\n }\n\n return {\n refDOM: refDOM,\n refTop: refTop,\n stack: scrollStack(view.dom)\n };\n}\n\nfunction scrollStack(dom) {\n var stack = [],\n doc = dom.ownerDocument;\n\n for (; dom; dom = parentNode(dom)) {\n stack.push({\n dom: dom,\n top: dom.scrollTop,\n left: dom.scrollLeft\n });\n\n if (dom == doc) {\n break;\n }\n }\n\n return stack;\n} // Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\n\n\nfunction resetScrollPos(ref) {\n var refDOM = ref.refDOM;\n var refTop = ref.refTop;\n var stack = ref.stack;\n var newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\n\nfunction restoreScrollStack(stack, dTop) {\n for (var i = 0; i < stack.length; i++) {\n var ref = stack[i];\n var dom = ref.dom;\n var top = ref.top;\n var left = ref.left;\n\n if (dom.scrollTop != top + dTop) {\n dom.scrollTop = top + dTop;\n }\n\n if (dom.scrollLeft != left) {\n dom.scrollLeft = left;\n }\n }\n}\n\nvar preventScrollSupported = null; // Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\n\nfunction focusPreventScroll(dom) {\n if (dom.setActive) {\n return dom.setActive();\n } // in IE\n\n\n if (preventScrollSupported) {\n return dom.focus(preventScrollSupported);\n }\n\n var stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {\n preventScroll: true\n };\n return true;\n }\n\n } : undefined);\n\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\n\nfunction findOffsetInNode(node, coords) {\n var closest,\n dxClosest = 2e8,\n coordsClosest,\n offset = 0;\n var rowBot = coords.top,\n rowTop = coords.top;\n\n for (var child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n var rects = void 0;\n\n if (child.nodeType == 1) {\n rects = child.getClientRects();\n } else if (child.nodeType == 3) {\n rects = textRange(child).getClientRects();\n } else {\n continue;\n }\n\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n var dx = rect.left > coords.left ? rect.left - coords.left : rect.right < coords.left ? coords.left - rect.right : 0;\n\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {\n left: rect.right < coords.left ? rect.right : rect.left,\n top: coords.top\n } : coords;\n\n if (child.nodeType == 1 && dx) {\n offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n }\n\n continue;\n }\n }\n\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top || coords.left >= rect.left && coords.top >= rect.bottom)) {\n offset = childIndex + 1;\n }\n }\n }\n\n if (closest && closest.nodeType == 3) {\n return findOffsetInText(closest, coordsClosest);\n }\n\n if (!closest || dxClosest && closest.nodeType == 1) {\n return {\n node: node,\n offset: offset\n };\n }\n\n return findOffsetInNode(closest, coordsClosest);\n}\n\nfunction findOffsetInText(node, coords) {\n var len = node.nodeValue.length;\n var range = document.createRange();\n\n for (var i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n var rect = singleRect(range, 1);\n\n if (rect.top == rect.bottom) {\n continue;\n }\n\n if (inRect(coords, rect)) {\n return {\n node: node,\n offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)\n };\n }\n }\n\n return {\n node: node,\n offset: 0\n };\n}\n\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 && coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\n\nfunction targetKludge(dom, coords) {\n var parent = dom.parentNode;\n\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left) {\n return parent;\n }\n\n return dom;\n}\n\nfunction posFromElement(view, elt, coords) {\n var ref = findOffsetInNode(elt, coords);\n var node = ref.node;\n var offset = ref.offset;\n var bias = -1;\n\n if (node.nodeType == 1 && !node.firstChild) {\n var rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n\n return view.docView.posFromDOM(node, offset, bias);\n}\n\nfunction posFromCaret(view, node, offset, coords) {\n // Browser (in caretPosition/RangeFromPoint) will agressively\n // normalize towards nearby inline nodes. Since we are interested in\n // positions between block nodes too, we first walk up the hierarchy\n // of nodes to see if there are block nodes that the coordinates\n // fall outside of. If so, we take the position before/after that\n // block. If not, we call `posFromDOM` on the raw node/offset.\n var outside = -1;\n\n for (var cur = node;;) {\n if (cur == view.dom) {\n break;\n }\n\n var desc = view.docView.nearestDesc(cur, true);\n\n if (!desc) {\n return null;\n }\n\n if (desc.node.isBlock && desc.parent) {\n var rect = desc.dom.getBoundingClientRect();\n\n if (rect.left > coords.left || rect.top > coords.top) {\n outside = desc.posBefore;\n } else if (rect.right < coords.left || rect.bottom < coords.top) {\n outside = desc.posAfter;\n } else {\n break;\n }\n }\n\n cur = desc.dom.parentNode;\n }\n\n return outside > -1 ? outside : view.docView.posFromDOM(node, offset);\n}\n\nfunction elementFromPoint(element, coords, box) {\n var len = element.childNodes.length;\n\n if (len && box.top < box.bottom) {\n for (var startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n var child = element.childNodes[i];\n\n if (child.nodeType == 1) {\n var rects = child.getClientRects();\n\n for (var j = 0; j < rects.length; j++) {\n var rect = rects[j];\n\n if (inRect(coords, rect)) {\n return elementFromPoint(child, coords, rect);\n }\n }\n }\n\n if ((i = (i + 1) % len) == startI) {\n break;\n }\n }\n }\n\n return element;\n} // Given an x,y position on the editor, get the position in the document.\n\n\nfunction posAtCoords(view, coords) {\n var assign, assign$1;\n var root = view.root,\n node,\n offset;\n\n if (root.caretPositionFromPoint) {\n try {\n // Firefox throws for this call in hard-to-predict circumstances (#994)\n var pos$1 = root.caretPositionFromPoint(coords.left, coords.top);\n\n if (pos$1) {\n assign = pos$1, node = assign.offsetNode, offset = assign.offset;\n }\n } catch (_) {}\n }\n\n if (!node && root.caretRangeFromPoint) {\n var range = root.caretRangeFromPoint(coords.left, coords.top);\n\n if (range) {\n assign$1 = range, node = assign$1.startContainer, offset = assign$1.startOffset;\n }\n }\n\n var elt = root.elementFromPoint(coords.left, coords.top + 1),\n pos;\n\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n var box = view.dom.getBoundingClientRect();\n\n if (!inRect(coords, box)) {\n return null;\n }\n\n elt = elementFromPoint(view.dom, coords, box);\n\n if (!elt) {\n return null;\n }\n }\n\n elt = targetKludge(elt, coords);\n\n if (node) {\n if (result.gecko && node.nodeType == 1) {\n // Firefox will sometimes return offsets into nodes, which\n // have no actual children, from caretPositionFromPoint (#953)\n offset = Math.min(offset, node.childNodes.length); // It'll also move the returned position before image nodes,\n // even if those are behind it.\n\n if (offset < node.childNodes.length) {\n var next = node.childNodes[offset],\n box$1;\n\n if (next.nodeName == \"IMG\" && (box$1 = next.getBoundingClientRect()).right <= coords.left && box$1.bottom > coords.top) {\n offset++;\n }\n }\n } // Suspiciously specific kludge to work around caret*FromPoint\n // never returning a position at the end of the document\n\n\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 && coords.top > node.lastChild.getBoundingClientRect().bottom) {\n pos = view.state.doc.content.size;\n } // Ignore positions directly after a BR, since caret*FromPoint\n // 'round up' positions that would be more accurately placed\n // before the BR node.\n else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\") {\n pos = posFromCaret(view, node, offset, coords);\n }\n }\n\n if (pos == null) {\n pos = posFromElement(view, elt, coords);\n }\n\n var desc = view.docView.nearestDesc(elt, true);\n return {\n pos: pos,\n inside: desc ? desc.posAtStart - desc.border : -1\n };\n}\n\nfunction singleRect(object, bias) {\n var rects = object.getClientRects();\n return !rects.length ? object.getBoundingClientRect() : rects[bias < 0 ? 0 : rects.length - 1];\n} // : (EditorView, number) → {left: number, top: number, right: number, bottom: number}\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\n\n\nfunction coordsAtPos(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset; // These browsers support querying empty text ranges\n\n if (node.nodeType == 3 && (result.chrome || result.gecko)) {\n var rect = singleRect(textRange(node, offset, offset), 0); // Firefox returns bad results (the position before the space)\n // when querying a position directly after line-broken\n // whitespace. Detect this situation and and kludge around it\n\n if (result.gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n var rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n\n if (Math.abs(rectBefore.left - rect.left) < 1 && rectBefore.top == rect.top) {\n var rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n return flattenV(rectAfter, rectAfter.left < rectBefore.left);\n }\n }\n\n return rect;\n }\n\n if (node.nodeType == 1 && !view.state.doc.resolve(pos).parent.inlineContent) {\n // Return a horizontal line in block context\n var top = true,\n rect$1;\n\n if (offset < node.childNodes.length) {\n var after = node.childNodes[offset];\n\n if (after.nodeType == 1) {\n rect$1 = after.getBoundingClientRect();\n }\n }\n\n if (!rect$1 && offset) {\n var before = node.childNodes[offset - 1];\n\n if (before.nodeType == 1) {\n rect$1 = before.getBoundingClientRect();\n top = false;\n }\n }\n\n return flattenH(rect$1 || node.getBoundingClientRect(), top);\n } // Not Firefox/Chrome, or not in a text node, so we have to use\n // actual element/character rectangles to get a solution (this part\n // is not very bidi-safe)\n //\n // Try the left side first, fall back to the right one if that\n // doesn't work.\n\n\n for (var dir = -1; dir < 2; dir += 2) {\n if (dir < 0 && offset) {\n var prev = void 0,\n target = node.nodeType == 3 ? textRange(node, offset - 1, offset) : (prev = node.childNodes[offset - 1]).nodeType == 3 ? textRange(prev) : prev.nodeType == 1 && prev.nodeName != \"BR\" ? prev : null; // BR nodes tend to only return the rectangle before them\n\n if (target) {\n var rect$2 = singleRect(target, 1);\n\n if (rect$2.top < rect$2.bottom) {\n return flattenV(rect$2, false);\n }\n }\n } else if (dir > 0 && offset < nodeSize(node)) {\n var next = void 0,\n target$1 = node.nodeType == 3 ? textRange(node, offset, offset + 1) : (next = node.childNodes[offset]).nodeType == 3 ? textRange(next) : next.nodeType == 1 ? next : null;\n\n if (target$1) {\n var rect$3 = singleRect(target$1, -1);\n\n if (rect$3.top < rect$3.bottom) {\n return flattenV(rect$3, true);\n }\n }\n }\n } // All else failed, just try to get a rectangle for the target node\n\n\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, 0), false);\n}\n\nfunction flattenV(rect, left) {\n if (rect.width == 0) {\n return rect;\n }\n\n var x = left ? rect.left : rect.right;\n return {\n top: rect.top,\n bottom: rect.bottom,\n left: x,\n right: x\n };\n}\n\nfunction flattenH(rect, top) {\n if (rect.height == 0) {\n return rect;\n }\n\n var y = top ? rect.top : rect.bottom;\n return {\n top: y,\n bottom: y,\n left: rect.left,\n right: rect.right\n };\n}\n\nfunction withFlushedState(view, state, f) {\n var viewState = view.state,\n active = view.root.activeElement;\n\n if (viewState != state) {\n view.updateState(state);\n }\n\n if (active != view.dom) {\n view.focus();\n }\n\n try {\n return f();\n } finally {\n if (viewState != state) {\n view.updateState(viewState);\n }\n\n if (active != view.dom) {\n active.focus();\n }\n }\n} // : (EditorView, number, number)\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\n\n\nfunction endOfTextblockVertical(view, state, dir) {\n var sel = state.selection;\n var $pos = dir == \"up\" ? sel.$anchor.min(sel.$head) : sel.$anchor.max(sel.$head);\n return withFlushedState(view, state, function () {\n var ref = view.docView.domFromPos($pos.pos);\n var dom = ref.node;\n\n for (;;) {\n var nearest = view.docView.nearestDesc(dom, true);\n\n if (!nearest) {\n break;\n }\n\n if (nearest.node.isBlock) {\n dom = nearest.dom;\n break;\n }\n\n dom = nearest.dom.parentNode;\n }\n\n var coords = coordsAtPos(view, $pos.pos);\n\n for (var child = dom.firstChild; child; child = child.nextSibling) {\n var boxes = void 0;\n\n if (child.nodeType == 1) {\n boxes = child.getClientRects();\n } else if (child.nodeType == 3) {\n boxes = textRange(child, 0, child.nodeValue.length).getClientRects();\n } else {\n continue;\n }\n\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n\n if (box.bottom > box.top && (dir == \"up\" ? box.bottom < coords.top + 1 : box.top > coords.bottom - 1)) {\n return false;\n }\n }\n }\n\n return true;\n });\n}\n\nvar maybeRTL = /[\\u0590-\\u08ac]/;\n\nfunction endOfTextblockHorizontal(view, state, dir) {\n var ref = state.selection;\n var $head = ref.$head;\n\n if (!$head.parent.isTextblock) {\n return false;\n }\n\n var offset = $head.parentOffset,\n atStart = !offset,\n atEnd = offset == $head.parent.content.size;\n var sel = getSelection(); // If the textblock is all LTR, or the browser doesn't support\n // Selection.modify (Edge), fall back to a primitive approach\n\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify) {\n return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n }\n\n return withFlushedState(view, state, function () {\n // This is a huge hack, but appears to be the best we can\n // currently do: use `Selection.modify` to move the selection by\n // one character, and see if that moves the cursor out of the\n // textblock (or doesn't move it at all, when at the start/end of\n // the document).\n var oldRange = sel.getRangeAt(0),\n oldNode = sel.focusNode,\n oldOff = sel.focusOffset;\n var oldBidiLevel = sel.caretBidiLevel; // Only for Firefox\n\n sel.modify(\"move\", dir, \"character\");\n var parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n var result = !parentDOM.contains(sel.focusNode.nodeType == 1 ? sel.focusNode : sel.focusNode.parentNode) || oldNode == sel.focusNode && oldOff == sel.focusOffset; // Restore the previous selection\n\n sel.removeAllRanges();\n sel.addRange(oldRange);\n\n if (oldBidiLevel != null) {\n sel.caretBidiLevel = oldBidiLevel;\n }\n\n return result;\n });\n}\n\nvar cachedState = null,\n cachedDir = null,\n cachedResult = false;\n\nfunction endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) {\n return cachedResult;\n }\n\n cachedState = state;\n cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);\n} // NodeView:: interface\n//\n// By default, document nodes are rendered using the result of the\n// [`toDOM`](#model.NodeSpec.toDOM) method of their spec, and managed\n// entirely by the editor. For some use cases, such as embedded\n// node-specific editing interfaces, you want more control over\n// the behavior of a node's in-editor representation, and need to\n// [define](#view.EditorProps.nodeViews) a custom node view.\n//\n// Objects returned as node views must conform to this interface.\n//\n// dom:: ?dom.Node\n// The outer DOM node that represents the document node. When not\n// given, the default strategy is used to create a DOM node.\n//\n// contentDOM:: ?dom.Node\n// The DOM node that should hold the node's content. Only meaningful\n// if the node view also defines a `dom` property and if its node\n// type is not a leaf node type. When this is present, ProseMirror\n// will take care of rendering the node's children into it. When it\n// is not present, the node view itself is responsible for rendering\n// (or deciding not to render) its child nodes.\n//\n// update:: ?(node: Node, decorations: [Decoration]) → bool\n// When given, this will be called when the view is updating itself.\n// It will be given a node (possibly of a different type), and an\n// array of active decorations (which are automatically drawn, and\n// the node view may ignore if it isn't interested in them), and\n// should return true if it was able to update to that node, and\n// false otherwise. If the node view has a `contentDOM` property (or\n// no `dom` property), updating its child nodes will be handled by\n// ProseMirror.\n//\n// selectNode:: ?()\n// Can be used to override the way the node's selected status (as a\n// node selection) is displayed.\n//\n// deselectNode:: ?()\n// When defining a `selectNode` method, you should also provide a\n// `deselectNode` method to remove the effect again.\n//\n// setSelection:: ?(anchor: number, head: number, root: dom.Document)\n// This will be called to handle setting the selection inside the\n// node. The `anchor` and `head` positions are relative to the start\n// of the node. By default, a DOM selection will be created between\n// the DOM positions corresponding to those positions, but if you\n// override it you can do something else.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to prevent the editor view from trying to handle some\n// or all DOM events that bubble up from the node view. Events for\n// which this returns true are not handled by the editor.\n//\n// ignoreMutation:: ?(dom.MutationRecord) → bool\n// Called when a DOM\n// [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)\n// or a selection change happens within the view. When the change is\n// a selection change, the record will have a `type` property of\n// `\"selection\"` (which doesn't occur for native mutation records).\n// Return false if the editor should re-read the selection or\n// re-parse the range around the mutation, true if it can safely be\n// ignored.\n//\n// destroy:: ?()\n// Called when the node view is removed from the editor or the whole\n// editor is destroyed.\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n// corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n// given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\n\n\nvar NOT_DIRTY = 0,\n CHILD_DIRTY = 1,\n CONTENT_DIRTY = 2,\n NODE_DIRTY = 3; // Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\n\nvar ViewDesc = function ViewDesc(parent, children, dom, contentDOM) {\n this.parent = parent;\n this.children = children;\n this.dom = dom; // An expando property on the DOM node provides a link back to its\n // description.\n\n dom.pmViewDesc = this; // This is the node that holds the child views. It may be null for\n // descs that don't have children.\n\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n};\n\nvar prototypeAccessors = {\n beforePosition: {\n configurable: true\n },\n size: {\n configurable: true\n },\n border: {\n configurable: true\n },\n posBefore: {\n configurable: true\n },\n posAtStart: {\n configurable: true\n },\n posAfter: {\n configurable: true\n },\n posAtEnd: {\n configurable: true\n },\n contentLost: {\n configurable: true\n }\n}; // Used to check whether a given description corresponds to a\n// widget/mark/node.\n\nViewDesc.prototype.matchesWidget = function matchesWidget() {\n return false;\n};\n\nViewDesc.prototype.matchesMark = function matchesMark() {\n return false;\n};\n\nViewDesc.prototype.matchesNode = function matchesNode() {\n return false;\n};\n\nViewDesc.prototype.matchesHack = function matchesHack() {\n return false;\n};\n\nprototypeAccessors.beforePosition.get = function () {\n return false;\n}; // : () → ?ParseRule\n// When parsing in-editor content (in domchange.js), we allow\n// descriptions to determine the parse rules that should be used to\n// parse them.\n\n\nViewDesc.prototype.parseRule = function parseRule() {\n return null;\n}; // : (dom.Event) → bool\n// Used by the editor's event handler to ignore events that come\n// from certain descs.\n\n\nViewDesc.prototype.stopEvent = function stopEvent() {\n return false;\n}; // The size of the content represented by this desc.\n\n\nprototypeAccessors.size.get = function () {\n var size = 0;\n\n for (var i = 0; i < this.children.length; i++) {\n size += this.children[i].size;\n }\n\n return size;\n}; // For block nodes, this represents the space taken up by their\n// start/end tokens.\n\n\nprototypeAccessors.border.get = function () {\n return 0;\n};\n\nViewDesc.prototype.destroy = function destroy() {\n this.parent = null;\n\n if (this.dom.pmViewDesc == this) {\n this.dom.pmViewDesc = null;\n }\n\n for (var i = 0; i < this.children.length; i++) {\n this.children[i].destroy();\n }\n};\n\nViewDesc.prototype.posBeforeChild = function posBeforeChild(child) {\n for (var i = 0, pos = this.posAtStart; i < this.children.length; i++) {\n var cur = this.children[i];\n\n if (cur == child) {\n return pos;\n }\n\n pos += cur.size;\n }\n};\n\nprototypeAccessors.posBefore.get = function () {\n return this.parent.posBeforeChild(this);\n};\n\nprototypeAccessors.posAtStart.get = function () {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n};\n\nprototypeAccessors.posAfter.get = function () {\n return this.posBefore + this.size;\n};\n\nprototypeAccessors.posAtEnd.get = function () {\n return this.posAtStart + this.size - 2 * this.border;\n}; // : (dom.Node, number, ?number) → number\n\n\nViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) {\n // If the DOM position is in the content, use the child desc after\n // it to figure out a position.\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n var domBefore, desc;\n\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) {\n dom = dom.parentNode;\n }\n\n domBefore = dom.previousSibling;\n }\n\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) {\n domBefore = domBefore.previousSibling;\n }\n\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n } else {\n var domAfter, desc$1;\n\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) {\n dom = dom.parentNode;\n }\n\n domAfter = dom.nextSibling;\n }\n\n while (domAfter && !((desc$1 = domAfter.pmViewDesc) && desc$1.parent == this)) {\n domAfter = domAfter.nextSibling;\n }\n\n return domAfter ? this.posBeforeChild(desc$1) : this.posAtEnd;\n }\n } // Otherwise, use various heuristics, falling back on the bias\n // parameter, to determine whether to return the position at the\n // start or at the end of this view desc.\n\n\n var atEnd;\n\n if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) {\n for (var search = dom;; search = search.parentNode) {\n if (search == this.dom) {\n atEnd = false;\n break;\n }\n\n if (search.parentNode.firstChild != search) {\n break;\n }\n }\n }\n\n if (atEnd == null && offset == dom.childNodes.length) {\n for (var search$1 = dom;; search$1 = search$1.parentNode) {\n if (search$1 == this.dom) {\n atEnd = true;\n break;\n }\n\n if (search$1.parentNode.lastChild != search$1) {\n break;\n }\n }\n }\n }\n\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n}; // Scan up the dom finding the first desc that is a descendant of\n// this one.\n\n\nViewDesc.prototype.nearestDesc = function nearestDesc(dom, onlyNodes) {\n for (var first = true, cur = dom; cur; cur = cur.parentNode) {\n var desc = this.getDesc(cur);\n\n if (desc && (!onlyNodes || desc.node)) {\n // If dom is outside of this desc's nodeDOM, don't count it.\n if (first && desc.nodeDOM && !(desc.nodeDOM.nodeType == 1 ? desc.nodeDOM.contains(dom) : desc.nodeDOM == dom)) {\n first = false;\n } else {\n return desc;\n }\n }\n }\n};\n\nViewDesc.prototype.getDesc = function getDesc(dom) {\n var desc = dom.pmViewDesc;\n\n for (var cur = desc; cur; cur = cur.parent) {\n if (cur == this) {\n return desc;\n }\n }\n};\n\nViewDesc.prototype.posFromDOM = function posFromDOM(dom, offset, bias) {\n for (var scan = dom;; scan = scan.parentNode) {\n var desc = this.getDesc(scan);\n\n if (desc) {\n return desc.localPosFromDOM(dom, offset, bias);\n }\n }\n}; // : (number) → ?NodeViewDesc\n// Find the desc for the node after the given pos, if any. (When a\n// parent node overrode rendering, there might not be one.)\n\n\nViewDesc.prototype.descAt = function descAt(pos) {\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) {\n child = child.children[0];\n }\n\n return child;\n }\n\n if (pos < end) {\n return child.descAt(pos - offset - child.border);\n }\n\n offset = end;\n }\n}; // : (number) → {node: dom.Node, offset: number}\n\n\nViewDesc.prototype.domFromPos = function domFromPos(pos) {\n if (!this.contentDOM) {\n return {\n node: this.dom,\n offset: 0\n };\n }\n\n for (var offset = 0, i = 0;; i++) {\n if (offset == pos) {\n while (i < this.children.length && (this.children[i].beforePosition || this.children[i].dom.parentNode != this.contentDOM)) {\n i++;\n }\n\n return {\n node: this.contentDOM,\n offset: i == this.children.length ? this.contentDOM.childNodes.length : domIndex(this.children[i].dom)\n };\n }\n\n if (i == this.children.length) {\n throw new Error(\"Invalid position \" + pos);\n }\n\n var child = this.children[i],\n end = offset + child.size;\n\n if (pos < end) {\n return child.domFromPos(pos - offset - child.border);\n }\n\n offset = end;\n }\n}; // Used to find a DOM range in a single parent for a given changed\n// range.\n\n\nViewDesc.prototype.parseRange = function parseRange(from, to, base) {\n if (base === void 0) base = 0;\n\n if (this.children.length == 0) {\n return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: 0,\n toOffset: this.contentDOM.childNodes.length\n };\n }\n\n var fromOffset = -1,\n toOffset = -1;\n\n for (var offset = base, i = 0;; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (fromOffset == -1 && from <= end) {\n var childBase = offset + child.border; // FIXME maybe descend mark views to parse a narrower range?\n\n if (from >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM)) {\n return child.parseRange(from, to, childBase);\n }\n\n from = offset;\n\n for (var j = i; j > 0; j--) {\n var prev = this.children[j - 1];\n\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break;\n }\n\n from -= prev.size;\n }\n\n if (fromOffset == -1) {\n fromOffset = 0;\n }\n }\n\n if (fromOffset > -1 && to <= end) {\n to = end;\n\n for (var j$1 = i + 1; j$1 < this.children.length; j$1++) {\n var next = this.children[j$1];\n\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break;\n }\n\n to += next.size;\n }\n\n if (toOffset == -1) {\n toOffset = this.contentDOM.childNodes.length;\n }\n\n break;\n }\n\n offset = end;\n }\n\n return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: fromOffset,\n toOffset: toOffset\n };\n};\n\nViewDesc.prototype.emptyChildAt = function emptyChildAt(side) {\n if (this.border || !this.contentDOM || !this.children.length) {\n return false;\n }\n\n var child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side);\n}; // : (number) → dom.Node\n\n\nViewDesc.prototype.domAfterPos = function domAfterPos(pos) {\n var ref = this.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n\n if (node.nodeType != 1 || offset == node.childNodes.length) {\n throw new RangeError(\"No node after pos \" + pos);\n }\n\n return node.childNodes[offset];\n}; // : (number, number, dom.Document)\n// View descs are responsible for setting any selection that falls\n// entirely inside of them, so that custom implementations can do\n// custom things with the selection. Note that this falls apart when\n// a selection starts in such a node and ends in another, in which\n// case we just use whatever domFromPos produces as a best effort.\n\n\nViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) {\n // If the selection falls entirely in a child, give it to that child\n var from = Math.min(anchor, head),\n to = Math.max(anchor, head);\n\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (from > offset && to < end) {\n return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force);\n }\n\n offset = end;\n }\n\n var anchorDOM = this.domFromPos(anchor),\n headDOM = this.domFromPos(head);\n var domSel = root.getSelection(),\n range = document.createRange();\n\n if (!force && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset)) {\n return;\n } // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n\n\n if (domSel.extend) {\n range.setEnd(anchorDOM.node, anchorDOM.offset);\n range.collapse(false);\n } else {\n if (anchor > head) {\n var tmp = anchorDOM;\n anchorDOM = headDOM;\n headDOM = tmp;\n }\n\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n }\n\n domSel.removeAllRanges();\n domSel.addRange(range);\n\n if (domSel.extend) {\n domSel.extend(headDOM.node, headDOM.offset);\n }\n}; // : (dom.MutationRecord) → bool\n\n\nViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return !this.contentDOM && mutation.type != \"selection\";\n};\n\nprototypeAccessors.contentLost.get = function () {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n}; // Remove a subtree of the element tree that has been touched\n// by a DOM change, so that the next update will redraw it.\n\n\nViewDesc.prototype.markDirty = function markDirty(from, to) {\n for (var offset = 0, i = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n var startInside = offset + child.border,\n endInside = end - child.border;\n\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n\n if (from == startInside && to == endInside && (child.contentLost || child.dom.parentNode != this.contentDOM)) {\n child.dirty = NODE_DIRTY;\n } else {\n child.markDirty(from - startInside, to - startInside);\n }\n\n return;\n } else {\n child.dirty = NODE_DIRTY;\n }\n }\n\n offset = end;\n }\n\n this.dirty = CONTENT_DIRTY;\n};\n\nViewDesc.prototype.markParentsDirty = function markParentsDirty() {\n for (var node = this.parent; node; node = node.parent) {\n var dirty = CONTENT_DIRTY;\n\n if (node.dirty < dirty) {\n node.dirty = dirty;\n }\n }\n};\n\nObject.defineProperties(ViewDesc.prototype, prototypeAccessors); // Reused array to avoid allocating fresh arrays for things that will\n// stay empty anyway.\n\nvar nothing = []; // A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\n\nvar WidgetViewDesc = /*@__PURE__*/function (ViewDesc) {\n function WidgetViewDesc(parent, widget, view, pos) {\n var self,\n dom = widget.type.toDOM;\n\n if (typeof dom == \"function\") {\n dom = dom(view, function () {\n if (!self) {\n return pos;\n }\n\n if (self.parent) {\n return self.parent.posBeforeChild(self);\n }\n });\n }\n\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n var wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n\n dom.contentEditable = false;\n dom.classList.add(\"ProseMirror-widget\");\n }\n\n ViewDesc.call(this, parent, nothing, dom, null);\n this.widget = widget;\n self = this;\n }\n\n if (ViewDesc) WidgetViewDesc.__proto__ = ViewDesc;\n WidgetViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n WidgetViewDesc.prototype.constructor = WidgetViewDesc;\n var prototypeAccessors$1 = {\n beforePosition: {\n configurable: true\n }\n };\n\n prototypeAccessors$1.beforePosition.get = function () {\n return this.widget.type.side < 0;\n };\n\n WidgetViewDesc.prototype.matchesWidget = function matchesWidget(widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type);\n };\n\n WidgetViewDesc.prototype.parseRule = function parseRule() {\n return {\n ignore: true\n };\n };\n\n WidgetViewDesc.prototype.stopEvent = function stopEvent(event) {\n var stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false;\n };\n\n WidgetViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n };\n\n Object.defineProperties(WidgetViewDesc.prototype, prototypeAccessors$1);\n return WidgetViewDesc;\n}(ViewDesc);\n\nvar CompositionViewDesc = /*@__PURE__*/function (ViewDesc) {\n function CompositionViewDesc(parent, dom, textDOM, text) {\n ViewDesc.call(this, parent, nothing, dom, null);\n this.textDOM = textDOM;\n this.text = text;\n }\n\n if (ViewDesc) CompositionViewDesc.__proto__ = ViewDesc;\n CompositionViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n CompositionViewDesc.prototype.constructor = CompositionViewDesc;\n var prototypeAccessors$2 = {\n size: {\n configurable: true\n }\n };\n\n prototypeAccessors$2.size.get = function () {\n return this.text.length;\n };\n\n CompositionViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset) {\n if (dom != this.textDOM) {\n return this.posAtStart + (offset ? this.size : 0);\n }\n\n return this.posAtStart + offset;\n };\n\n CompositionViewDesc.prototype.domFromPos = function domFromPos(pos) {\n return {\n node: this.textDOM,\n offset: pos\n };\n };\n\n CompositionViewDesc.prototype.ignoreMutation = function ignoreMutation(mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n };\n\n Object.defineProperties(CompositionViewDesc.prototype, prototypeAccessors$2);\n return CompositionViewDesc;\n}(ViewDesc); // A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\n\n\nvar MarkViewDesc = /*@__PURE__*/function (ViewDesc) {\n function MarkViewDesc(parent, mark, dom, contentDOM) {\n ViewDesc.call(this, parent, [], dom, contentDOM);\n this.mark = mark;\n }\n\n if (ViewDesc) MarkViewDesc.__proto__ = ViewDesc;\n MarkViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n MarkViewDesc.prototype.constructor = MarkViewDesc;\n\n MarkViewDesc.create = function create(parent, mark, inline, view) {\n var custom = view.nodeViews[mark.type.name];\n var spec = custom && custom(mark, view, inline);\n\n if (!spec || !spec.dom) {\n spec = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, mark.type.spec.toDOM(mark, inline));\n }\n\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);\n };\n\n MarkViewDesc.prototype.parseRule = function parseRule() {\n return {\n mark: this.mark.type.name,\n attrs: this.mark.attrs,\n contentElement: this.contentDOM\n };\n };\n\n MarkViewDesc.prototype.matchesMark = function matchesMark(mark) {\n return this.dirty != NODE_DIRTY && this.mark.eq(mark);\n };\n\n MarkViewDesc.prototype.markDirty = function markDirty(from, to) {\n ViewDesc.prototype.markDirty.call(this, from, to); // Move dirty info to nearest node view\n\n if (this.dirty != NOT_DIRTY) {\n var parent = this.parent;\n\n while (!parent.node) {\n parent = parent.parent;\n }\n\n if (parent.dirty < this.dirty) {\n parent.dirty = this.dirty;\n }\n\n this.dirty = NOT_DIRTY;\n }\n };\n\n MarkViewDesc.prototype.slice = function slice(from, to, view) {\n var copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n var nodes = this.children,\n size = this.size;\n\n if (to < size) {\n nodes = replaceNodes(nodes, to, size, view);\n }\n\n if (from > 0) {\n nodes = replaceNodes(nodes, 0, from, view);\n }\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].parent = copy;\n }\n\n copy.children = nodes;\n return copy;\n };\n\n return MarkViewDesc;\n}(ViewDesc); // Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\n\n\nvar NodeViewDesc = /*@__PURE__*/function (ViewDesc) {\n function NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n ViewDesc.call(this, parent, node.isLeaf ? nothing : [], dom, contentDOM);\n this.nodeDOM = nodeDOM;\n this.node = node;\n this.outerDeco = outerDeco;\n this.innerDeco = innerDeco;\n\n if (contentDOM) {\n this.updateChildren(view, pos);\n }\n }\n\n if (ViewDesc) NodeViewDesc.__proto__ = ViewDesc;\n NodeViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n NodeViewDesc.prototype.constructor = NodeViewDesc;\n var prototypeAccessors$3 = {\n size: {\n configurable: true\n },\n border: {\n configurable: true\n }\n }; // By default, a node is rendered using the `toDOM` method from the\n // node type spec. But client code can use the `nodeViews` spec to\n // supply a custom node view, which can influence various aspects of\n // the way the node works.\n //\n // (Using subclassing for this was intentionally decided against,\n // since it'd require exposing a whole slew of finnicky\n // implementation details to the user code that they probably will\n // never need.)\n\n NodeViewDesc.create = function create(parent, node, outerDeco, innerDeco, view, pos) {\n var assign;\n var custom = view.nodeViews[node.type.name],\n descObj;\n var spec = custom && custom(node, view, function () {\n // (This is a function that allows the custom view to find its\n // own position)\n if (!descObj) {\n return pos;\n }\n\n if (descObj.parent) {\n return descObj.parent.posBeforeChild(descObj);\n }\n }, outerDeco);\n var dom = spec && spec.dom,\n contentDOM = spec && spec.contentDOM;\n\n if (node.isText) {\n if (!dom) {\n dom = document.createTextNode(node.text);\n } else if (dom.nodeType != 3) {\n throw new RangeError(\"Text must be rendered as a DOM text node\");\n }\n } else if (!dom) {\n assign = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, node.type.spec.toDOM(node)), dom = assign.dom, contentDOM = assign.contentDOM;\n }\n\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") {\n // Chrome gets confused by
          \n if (!dom.hasAttribute(\"contenteditable\")) {\n dom.contentEditable = false;\n }\n\n if (node.type.spec.draggable) {\n dom.draggable = true;\n }\n }\n\n var nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n\n if (spec) {\n return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos + 1);\n } else if (node.isText) {\n return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view);\n } else {\n return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos + 1);\n }\n };\n\n NodeViewDesc.prototype.parseRule = function parseRule() {\n var this$1 = this; // Experimental kludge to allow opt-in re-parsing of nodes\n\n if (this.node.type.spec.reparseInView) {\n return null;\n } // FIXME the assumption that this can always return the current\n // attrs means that if the user somehow manages to change the\n // attrs in the dom, that won't be picked up. Not entirely sure\n // whether this is a problem\n\n\n var rule = {\n node: this.node.type.name,\n attrs: this.node.attrs\n };\n\n if (this.node.type.spec.code) {\n rule.preserveWhitespace = \"full\";\n }\n\n if (this.contentDOM && !this.contentLost) {\n rule.contentElement = this.contentDOM;\n } else {\n rule.getContent = function () {\n return this$1.contentDOM ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : this$1.node.content;\n };\n }\n\n return rule;\n };\n\n NodeViewDesc.prototype.matchesNode = function matchesNode(node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) && sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n };\n\n prototypeAccessors$3.size.get = function () {\n return this.node.nodeSize;\n };\n\n prototypeAccessors$3.border.get = function () {\n return this.node.isLeaf ? 0 : 1;\n }; // Syncs `this.children` to match `this.node.content` and the local\n // decorations, possibly introducing nesting for marks. Then, in a\n // separate step, syncs the DOM inside `this.contentDOM` to\n // `this.children`.\n\n\n NodeViewDesc.prototype.updateChildren = function updateChildren(view, pos) {\n var this$1 = this;\n var inline = this.node.inlineContent,\n off = pos;\n var composition = inline && view.composing && this.localCompositionNode(view, pos);\n var updater = new ViewTreeUpdater(this, composition && composition.node);\n iterDeco(this.node, this.innerDeco, function (widget, i, insideNode) {\n if (widget.spec.marks) {\n updater.syncToMarks(widget.spec.marks, inline, view);\n } else if (widget.type.side >= 0 && !insideNode) {\n updater.syncToMarks(i == this$1.node.childCount ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Mark\"].none : this$1.node.child(i).marks, inline, view);\n } // If the next node is a desc matching this widget, reuse it,\n // otherwise insert the widget as a new view desc.\n\n\n updater.placeWidget(widget, view, off);\n }, function (child, outerDeco, innerDeco, i) {\n // Make sure the wrapping mark descs match the node's marks.\n updater.syncToMarks(child.marks, inline, view); // Either find an existing desc that exactly matches this node,\n // and drop the descs before it.\n\n updater.findNodeMatch(child, outerDeco, innerDeco, i) || // Or try updating the next desc to reflect this node.\n updater.updateNextNode(child, outerDeco, innerDeco, view, i) || // Or just add it as a new desc.\n updater.addNode(child, outerDeco, innerDeco, view, off);\n off += child.nodeSize;\n }); // Drop all remaining descs after the current position.\n\n updater.syncToMarks(nothing, inline, view);\n\n if (this.node.isTextblock) {\n updater.addTextblockHacks();\n }\n\n updater.destroyRest(); // Sync the DOM if anything changed\n\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n // May have to protect focused DOM from being changed if a composition is active\n if (composition) {\n this.protectLocalComposition(view, composition);\n }\n\n this.renderChildren();\n }\n };\n\n NodeViewDesc.prototype.renderChildren = function renderChildren() {\n renderDescs(this.contentDOM, this.children);\n\n if (result.ios) {\n iosHacks(this.dom);\n }\n };\n\n NodeViewDesc.prototype.localCompositionNode = function localCompositionNode(view, pos) {\n // Only do something if both the selection and a focused text node\n // are inside of this node, and the node isn't already part of a\n // view that's a child of this view\n var ref = view.state.selection;\n var from = ref.from;\n var to = ref.to;\n\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || from < pos || to > pos + this.node.content.size) {\n return;\n }\n\n var sel = view.root.getSelection();\n var textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);\n\n if (!textNode || !this.dom.contains(textNode.parentNode)) {\n return;\n } // Find the text in the focused node in the node, stop if it's not\n // there (may have been modified through other means, in which\n // case it should overwritten)\n\n\n var text = textNode.nodeValue;\n var textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n return textPos < 0 ? null : {\n node: textNode,\n pos: textPos,\n text: text\n };\n };\n\n NodeViewDesc.prototype.protectLocalComposition = function protectLocalComposition(view, ref) {\n var node = ref.node;\n var pos = ref.pos;\n var text = ref.text; // The node is already part of a local view desc, leave it there\n\n if (this.getDesc(node)) {\n return;\n } // Create a composition view for the orphaned nodes\n\n\n var topNode = node;\n\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) {\n break;\n }\n\n while (topNode.previousSibling) {\n topNode.parentNode.removeChild(topNode.previousSibling);\n }\n\n while (topNode.nextSibling) {\n topNode.parentNode.removeChild(topNode.nextSibling);\n }\n\n if (topNode.pmViewDesc) {\n topNode.pmViewDesc = null;\n }\n }\n\n var desc = new CompositionViewDesc(this, topNode, node, text);\n view.compositionNodes.push(desc); // Patch up this.children to contain the composition view\n\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n }; // : (Node, [Decoration], DecorationSet, EditorView) → bool\n // If this desc be updated to match the given node decoration,\n // do so and return true.\n\n\n NodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || !node.sameMarkup(this.node)) {\n return false;\n }\n\n this.updateInner(node, outerDeco, innerDeco, view);\n return true;\n };\n\n NodeViewDesc.prototype.updateInner = function updateInner(node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n\n if (this.contentDOM) {\n this.updateChildren(view, this.posAtStart);\n }\n\n this.dirty = NOT_DIRTY;\n };\n\n NodeViewDesc.prototype.updateOuterDeco = function updateOuterDeco(outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) {\n return;\n }\n\n var needsWrap = this.nodeDOM.nodeType != 1;\n var oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap));\n\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = null;\n this.dom.pmViewDesc = this;\n }\n\n this.outerDeco = outerDeco;\n }; // Mark this node as being the selected node.\n\n\n NodeViewDesc.prototype.selectNode = function selectNode() {\n this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n\n if (this.contentDOM || !this.node.type.spec.draggable) {\n this.dom.draggable = true;\n }\n }; // Remove selected node marking from this node.\n\n\n NodeViewDesc.prototype.deselectNode = function deselectNode() {\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n\n if (this.contentDOM || !this.node.type.spec.draggable) {\n this.dom.draggable = false;\n }\n };\n\n Object.defineProperties(NodeViewDesc.prototype, prototypeAccessors$3);\n return NodeViewDesc;\n}(ViewDesc); // Create a view desc for the top-level document node, to be exported\n// and used by the view class.\n\n\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0);\n}\n\nvar TextViewDesc = /*@__PURE__*/function (NodeViewDesc) {\n function TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view);\n }\n\n if (NodeViewDesc) TextViewDesc.__proto__ = NodeViewDesc;\n TextViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype);\n TextViewDesc.prototype.constructor = TextViewDesc;\n\n TextViewDesc.prototype.parseRule = function parseRule() {\n return {\n skip: this.nodeDOM.parentNode || true\n };\n };\n\n TextViewDesc.prototype.update = function update(node, outerDeco) {\n if (this.dirty == NODE_DIRTY || this.dirty != NOT_DIRTY && !this.inParent() || !node.sameMarkup(this.node)) {\n return false;\n }\n\n this.updateOuterDeco(outerDeco);\n\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n this.nodeDOM.nodeValue = node.text;\n }\n\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true;\n };\n\n TextViewDesc.prototype.inParent = function inParent() {\n var parentDOM = this.parent.contentDOM;\n\n for (var n = this.nodeDOM; n; n = n.parentNode) {\n if (n == parentDOM) {\n return true;\n }\n }\n\n return false;\n };\n\n TextViewDesc.prototype.domFromPos = function domFromPos(pos) {\n return {\n node: this.nodeDOM,\n offset: pos\n };\n };\n\n TextViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) {\n if (dom == this.nodeDOM) {\n return this.posAtStart + Math.min(offset, this.node.text.length);\n }\n\n return NodeViewDesc.prototype.localPosFromDOM.call(this, dom, offset, bias);\n };\n\n TextViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\";\n };\n\n TextViewDesc.prototype.slice = function slice(from, to, view) {\n var node = this.node.cut(from, to),\n dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view);\n };\n\n return TextViewDesc;\n}(NodeViewDesc); // A dummy desc used to tag trailing BR or span nodes created to work\n// around contentEditable terribleness.\n\n\nvar BRHackViewDesc = /*@__PURE__*/function (ViewDesc) {\n function BRHackViewDesc() {\n ViewDesc.apply(this, arguments);\n }\n\n if (ViewDesc) BRHackViewDesc.__proto__ = ViewDesc;\n BRHackViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n BRHackViewDesc.prototype.constructor = BRHackViewDesc;\n\n BRHackViewDesc.prototype.parseRule = function parseRule() {\n return {\n ignore: true\n };\n };\n\n BRHackViewDesc.prototype.matchesHack = function matchesHack() {\n return this.dirty == NOT_DIRTY;\n };\n\n return BRHackViewDesc;\n}(ViewDesc); // A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\n\n\nvar CustomNodeViewDesc = /*@__PURE__*/function (NodeViewDesc) {\n function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n this.spec = spec;\n }\n\n if (NodeViewDesc) CustomNodeViewDesc.__proto__ = NodeViewDesc;\n CustomNodeViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype);\n CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc; // A custom `update` method gets to decide whether the update goes\n // through. If it does, and there's a `contentDOM` node, our logic\n // updates the children.\n\n CustomNodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) {\n return false;\n }\n\n if (this.spec.update) {\n var result = this.spec.update(node, outerDeco);\n\n if (result) {\n this.updateInner(node, outerDeco, innerDeco, view);\n }\n\n return result;\n } else if (!this.contentDOM && !node.isLeaf) {\n return false;\n } else {\n return NodeViewDesc.prototype.update.call(this, node, outerDeco, innerDeco, view);\n }\n };\n\n CustomNodeViewDesc.prototype.selectNode = function selectNode() {\n this.spec.selectNode ? this.spec.selectNode() : NodeViewDesc.prototype.selectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.deselectNode = function deselectNode() {\n this.spec.deselectNode ? this.spec.deselectNode() : NodeViewDesc.prototype.deselectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : NodeViewDesc.prototype.setSelection.call(this, anchor, head, root, force);\n };\n\n CustomNodeViewDesc.prototype.destroy = function destroy() {\n if (this.spec.destroy) {\n this.spec.destroy();\n }\n\n NodeViewDesc.prototype.destroy.call(this);\n };\n\n CustomNodeViewDesc.prototype.stopEvent = function stopEvent(event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n };\n\n CustomNodeViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : NodeViewDesc.prototype.ignoreMutation.call(this, mutation);\n };\n\n return CustomNodeViewDesc;\n}(NodeViewDesc); // : (dom.Node, [ViewDesc])\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\n\n\nfunction renderDescs(parentDOM, descs) {\n var dom = parentDOM.firstChild;\n\n for (var i = 0; i < descs.length; i++) {\n var desc = descs[i],\n childDOM = desc.dom;\n\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) {\n dom = rm(dom);\n }\n\n dom = dom.nextSibling;\n } else {\n parentDOM.insertBefore(childDOM, dom);\n }\n\n if (desc instanceof MarkViewDesc) {\n var pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n\n while (dom) {\n dom = rm(dom);\n }\n}\n\nfunction OuterDecoLevel(nodeName) {\n if (nodeName) {\n this.nodeName = nodeName;\n }\n}\n\nOuterDecoLevel.prototype = Object.create(null);\nvar noDeco = [new OuterDecoLevel()];\n\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) {\n return noDeco;\n }\n\n var top = needsWrap ? noDeco[0] : new OuterDecoLevel(),\n result = [top];\n\n for (var i = 0; i < outerDeco.length; i++) {\n var attrs = outerDeco[i].type.attrs,\n cur = top;\n\n if (!attrs) {\n continue;\n }\n\n if (attrs.nodeName) {\n result.push(cur = new OuterDecoLevel(attrs.nodeName));\n }\n\n for (var name in attrs) {\n var val = attrs[name];\n\n if (val == null) {\n continue;\n }\n\n if (needsWrap && result.length == 1) {\n result.push(cur = top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n }\n\n if (name == \"class\") {\n cur[\"class\"] = (cur[\"class\"] ? cur[\"class\"] + \" \" : \"\") + val;\n } else if (name == \"style\") {\n cur.style = (cur.style ? cur.style + \";\" : \"\") + val;\n } else if (name != \"nodeName\") {\n cur[name] = val;\n }\n }\n }\n\n return result;\n}\n\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n // Shortcut for trivial case\n if (prevComputed == noDeco && curComputed == noDeco) {\n return nodeDOM;\n }\n\n var curDOM = nodeDOM;\n\n for (var i = 0; i < curComputed.length; i++) {\n var deco = curComputed[i],\n prev = prevComputed[i];\n\n if (i) {\n var parent = void 0;\n\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM && (parent = curDOM.parentNode) && parent.tagName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n\n return curDOM;\n}\n\nfunction patchAttributes(dom, prev, cur) {\n for (var name in prev) {\n if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur)) {\n dom.removeAttribute(name);\n }\n }\n\n for (var name$1 in cur) {\n if (name$1 != \"class\" && name$1 != \"style\" && name$1 != \"nodeName\" && cur[name$1] != prev[name$1]) {\n dom.setAttribute(name$1, cur[name$1]);\n }\n }\n\n if (prev[\"class\"] != cur[\"class\"]) {\n var prevList = prev[\"class\"] ? prev[\"class\"].split(\" \") : nothing;\n var curList = cur[\"class\"] ? cur[\"class\"].split(\" \") : nothing;\n\n for (var i = 0; i < prevList.length; i++) {\n if (curList.indexOf(prevList[i]) == -1) {\n dom.classList.remove(prevList[i]);\n }\n }\n\n for (var i$1 = 0; i$1 < curList.length; i$1++) {\n if (prevList.indexOf(curList[i$1]) == -1) {\n dom.classList.add(curList[i$1]);\n }\n }\n }\n\n if (prev.style != cur.style) {\n if (prev.style) {\n var prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g,\n m;\n\n while (m = prop.exec(prev.style)) {\n dom.style.removeProperty(m[1]);\n }\n }\n\n if (cur.style) {\n dom.style.cssText += cur.style;\n }\n }\n}\n\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1));\n} // : ([Decoration], [Decoration]) → bool\n\n\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!a[i].type.eq(b[i].type)) {\n return false;\n }\n }\n\n return true;\n} // Remove a DOM node and return its next sibling.\n\n\nfunction rm(dom) {\n var next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next;\n} // Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\n\n\nvar ViewTreeUpdater = function ViewTreeUpdater(top, lockedNode) {\n this.top = top;\n this.lock = lockedNode; // Index into `this.top`'s child array, represents the current\n // update position.\n\n this.index = 0; // When entering a mark, the current top and index are pushed\n // onto this.\n\n this.stack = []; // Tracks whether anything was changed\n\n this.changed = false;\n var pre = preMatch(top.node.content, top.children);\n this.preMatched = pre.nodes;\n this.preMatchOffset = pre.offset;\n};\n\nViewTreeUpdater.prototype.getPreMatch = function getPreMatch(index) {\n return index >= this.preMatchOffset ? this.preMatched[index - this.preMatchOffset] : null;\n}; // Destroy and remove the children between the given indices in\n// `this.top`.\n\n\nViewTreeUpdater.prototype.destroyBetween = function destroyBetween(start, end) {\n if (start == end) {\n return;\n }\n\n for (var i = start; i < end; i++) {\n this.top.children[i].destroy();\n }\n\n this.top.children.splice(start, end - start);\n this.changed = true;\n}; // Destroy all remaining children in `this.top`.\n\n\nViewTreeUpdater.prototype.destroyRest = function destroyRest() {\n this.destroyBetween(this.index, this.top.children.length);\n}; // : ([Mark], EditorView)\n// Sync the current stack of mark descs with the given array of\n// marks, reusing existing mark descs when possible.\n\n\nViewTreeUpdater.prototype.syncToMarks = function syncToMarks(marks, inline, view) {\n var keep = 0,\n depth = this.stack.length >> 1;\n var maxKeep = Math.min(depth, marks.length);\n\n while (keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false) {\n keep++;\n }\n\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n var found = -1;\n\n for (var i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n if (this.top.children[i].matchesMark(marks[depth])) {\n found = i;\n break;\n }\n }\n\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n\n this.top = this.top.children[this.index];\n } else {\n var markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n\n this.index = 0;\n depth++;\n }\n}; // : (Node, [Decoration], DecorationSet) → bool\n// Try to find a node desc matching the given data. Skip over it and\n// return true when successful.\n\n\nViewTreeUpdater.prototype.findNodeMatch = function findNodeMatch(node, outerDeco, innerDeco, index) {\n var found = -1,\n preMatch = index < 0 ? undefined : this.getPreMatch(index),\n children = this.top.children;\n\n if (preMatch && preMatch.matchesNode(node, outerDeco, innerDeco)) {\n found = children.indexOf(preMatch);\n } else {\n for (var i = this.index, e = Math.min(children.length, i + 5); i < e; i++) {\n var child = children[i];\n\n if (child.matchesNode(node, outerDeco, innerDeco) && this.preMatched.indexOf(child) < 0) {\n found = i;\n break;\n }\n }\n }\n\n if (found < 0) {\n return false;\n }\n\n this.destroyBetween(this.index, found);\n this.index++;\n return true;\n}; // : (Node, [Decoration], DecorationSet, EditorView, Fragment, number) → bool\n// Try to update the next node, if any, to the given data. Checks\n// pre-matches to avoid overwriting nodes that could still be used.\n\n\nViewTreeUpdater.prototype.updateNextNode = function updateNextNode(node, outerDeco, innerDeco, view, index) {\n if (this.index == this.top.children.length) {\n return false;\n }\n\n var next = this.top.children[this.index];\n\n if (next instanceof NodeViewDesc) {\n var preMatch = this.preMatched.indexOf(next);\n\n if (preMatch > -1 && preMatch + this.preMatchOffset != index) {\n return false;\n }\n\n var nextDOM = next.dom; // Can't update if nextDOM is or contains this.lock, except if\n // it's a text node whose content already matches the new text\n // and whose decorations match the new ones.\n\n var locked = this.lock && (nextDOM == this.lock || nextDOM.nodeType == 1 && nextDOM.contains(this.lock.parentNode)) && !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text && next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n if (next.dom != nextDOM) {\n this.changed = true;\n }\n\n this.index++;\n return true;\n }\n }\n\n return false;\n}; // : (Node, [Decoration], DecorationSet, EditorView)\n// Insert the node as a newly created node desc.\n\n\nViewTreeUpdater.prototype.addNode = function addNode(node, outerDeco, innerDeco, view, pos) {\n this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos));\n this.changed = true;\n};\n\nViewTreeUpdater.prototype.placeWidget = function placeWidget(widget, view, pos) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesWidget(widget)) {\n this.index++;\n } else {\n var desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n}; // Make sure a textblock looks and behaves correctly in\n// contentEditable.\n\n\nViewTreeUpdater.prototype.addTextblockHacks = function addTextblockHacks() {\n var lastChild = this.top.children[this.index - 1];\n\n while (lastChild instanceof MarkViewDesc) {\n lastChild = lastChild.children[lastChild.children.length - 1];\n }\n\n if (!lastChild || // Empty textblock\n !(lastChild instanceof TextViewDesc) || /\\n$/.test(lastChild.node.text)) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesHack()) {\n this.index++;\n } else {\n var dom = document.createElement(\"br\");\n this.top.children.splice(this.index++, 0, new BRHackViewDesc(this.top, nothing, dom, null));\n this.changed = true;\n }\n }\n}; // : (Fragment, [ViewDesc]) → [ViewDesc]\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing\n// those for other nodes. Returns an array whose positions correspond\n// to node positions in the fragment, and whose elements are either\n// descs matched to the child at that index, or empty.\n\n\nfunction preMatch(frag, descs) {\n var result = [],\n end = frag.childCount;\n\n for (var i = descs.length - 1; end > 0 && i >= 0; i--) {\n var desc = descs[i],\n node = desc.node;\n\n if (!node) {\n continue;\n }\n\n if (node != frag.child(end - 1)) {\n break;\n }\n\n result.push(desc);\n --end;\n }\n\n return {\n nodes: result.reverse(),\n offset: end\n };\n}\n\nfunction compareSide(a, b) {\n return a.type.side - b.type.side;\n} // : (ViewDesc, DecorationSet, (Decoration, number), (Node, [Decoration], DecorationSet, number))\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\n\n\nfunction iterDeco(parent, deco, onWidget, onNode) {\n var locals = deco.locals(parent),\n offset = 0; // Simple, cheap variant for when there are no local decorations\n\n if (locals.length == 0) {\n for (var i = 0; i < parent.childCount; i++) {\n var child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n\n return;\n }\n\n var decoIndex = 0,\n active = [],\n restNode = null;\n\n for (var parentIndex = 0;;) {\n if (decoIndex < locals.length && locals[decoIndex].to == offset) {\n var widget = locals[decoIndex++],\n widgets = void 0;\n\n while (decoIndex < locals.length && locals[decoIndex].to == offset) {\n (widgets || (widgets = [widget])).push(locals[decoIndex++]);\n }\n\n if (widgets) {\n widgets.sort(compareSide);\n\n for (var i$1 = 0; i$1 < widgets.length; i$1++) {\n onWidget(widgets[i$1], parentIndex, !!restNode);\n }\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n\n var child$1 = void 0,\n index = void 0;\n\n if (restNode) {\n index = -1;\n child$1 = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n child$1 = parent.child(parentIndex++);\n } else {\n break;\n }\n\n for (var i$2 = 0; i$2 < active.length; i$2++) {\n if (active[i$2].to <= offset) {\n active.splice(i$2--, 1);\n }\n }\n\n while (decoIndex < locals.length && locals[decoIndex].from == offset) {\n active.push(locals[decoIndex++]);\n }\n\n var end = offset + child$1.nodeSize;\n\n if (child$1.isText) {\n var cutAt = end;\n\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) {\n cutAt = locals[decoIndex].from;\n }\n\n for (var i$3 = 0; i$3 < active.length; i$3++) {\n if (active[i$3].to < cutAt) {\n cutAt = active[i$3].to;\n }\n }\n\n if (cutAt < end) {\n restNode = child$1.cut(cutAt - offset);\n child$1 = child$1.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n }\n\n onNode(child$1, active.length ? active.slice() : nothing, deco.forChild(offset, child$1), index);\n offset = end;\n }\n} // List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\n\n\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n var oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\n\nfunction nearbyTextNode(node, offset) {\n for (;;) {\n if (node.nodeType == 3) {\n return node;\n }\n\n if (node.nodeType == 1 && offset > 0) {\n if (node.childNodes.length > offset && node.childNodes[offset].nodeType == 3) {\n return node.childNodes[offset];\n }\n\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.nodeType == 1 && offset < node.childNodes.length) {\n node = node.childNodes[offset];\n offset = 0;\n } else {\n return null;\n }\n }\n} // Find a piece of text in an inline fragment, overlapping from-to\n\n\nfunction findTextInFragment(frag, text, from, to) {\n for (var i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n var child = frag.child(i++),\n childStart = pos;\n pos += child.nodeSize;\n\n if (!child.isText) {\n continue;\n }\n\n var str = child.text;\n\n while (i < frag.childCount) {\n var next = frag.child(i++);\n pos += next.nodeSize;\n\n if (!next.isText) {\n break;\n }\n\n str += next.text;\n }\n\n if (pos >= from) {\n var found = str.lastIndexOf(text, to - childStart);\n\n if (found >= 0 && found + text.length + childStart >= from) {\n return childStart + found;\n }\n }\n }\n\n return -1;\n} // Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\n\n\nfunction replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i],\n start = off,\n end = off += child.size;\n\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) {\n result.push(child.slice(0, from - start, view));\n }\n\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n\n if (end > to) {\n result.push(child.slice(to - start, child.size, view));\n }\n }\n }\n\n return result;\n}\n\nfunction moveSelectionBlock(state, dir) {\n var ref = state.selection;\n var $anchor = ref.$anchor;\n var $head = ref.$head;\n var $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n var $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom($start, dir);\n}\n\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true;\n}\n\nfunction selectHorizontally(view, dir, mods) {\n var sel = view.state.selection;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (!sel.empty || mods.indexOf(\"s\") > -1) {\n return false;\n } else if (view.endOfTextblock(dir > 0 ? \"right\" : \"left\")) {\n var next = moveSelectionBlock(view.state, dir);\n\n if (next && next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n return apply(view, next);\n }\n\n return false;\n } else {\n var $head = sel.$head,\n node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter,\n desc;\n\n if (!node || node.isText) {\n return false;\n }\n\n var nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n\n if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) {\n return false;\n }\n\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head));\n } else if (result.webkit) {\n // Chrome and Safari will introduce extra pointless cursor\n // positions around inline uneditable nodes, so we have to\n // take over and move the cursor past them (#937)\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)));\n } else {\n return false;\n }\n }\n } else if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && sel.node.isInline) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](dir > 0 ? sel.$to : sel.$from));\n } else {\n var next$1 = moveSelectionBlock(view.state, dir);\n\n if (next$1) {\n return apply(view, next$1);\n }\n\n return false;\n }\n}\n\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\n\nfunction isIgnorable(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != \"BR\");\n} // Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\n\n\nfunction skipIgnoredNodesLeft(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n\n if (!node) {\n return;\n }\n\n var moveNode,\n moveOffset,\n force = false; // Gecko will do odd things when the selection is directly in front\n // of a non-editable node, so in that case, move it into the next\n // node if possible. Issue prosemirror/prosemirror#832.\n\n if (result.gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) {\n force = true;\n }\n\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break;\n } else {\n var before = node.childNodes[offset - 1];\n\n if (isIgnorable(before)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else {\n break;\n }\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n var prev = node.previousSibling;\n\n while (prev && isIgnorable(prev)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n\n if (!prev) {\n node = node.parentNode;\n\n if (node == view.dom) {\n break;\n }\n\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n\n if (force) {\n setSelFocus(view, sel, node, offset);\n } else if (moveNode) {\n setSelFocus(view, sel, moveNode, moveOffset);\n }\n} // Make sure the cursor isn't directly before one or more ignored\n// nodes.\n\n\nfunction skipIgnoredNodesRight(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n\n if (!node) {\n return;\n }\n\n var len = nodeLen(node);\n var moveNode, moveOffset;\n\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) {\n break;\n }\n\n var after = node.childNodes[offset];\n\n if (isIgnorable(after)) {\n moveNode = node;\n moveOffset = ++offset;\n } else {\n break;\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n var next = node.nextSibling;\n\n while (next && isIgnorable(next)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n\n if (!next) {\n node = node.parentNode;\n\n if (node == view.dom) {\n break;\n }\n\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n\n if (moveNode) {\n setSelFocus(view, sel, moveNode, moveOffset);\n }\n}\n\nfunction isBlockNode(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock;\n}\n\nfunction setSelFocus(view, sel, node, offset) {\n if (selectionCollapsed(sel)) {\n var range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n\n view.domObserver.setCurSelection();\n} // : (EditorState, number)\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\n\n\nfunction selectVertically(view, dir, mods) {\n var sel = view.state.selection;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty || mods.indexOf(\"s\") > -1) {\n return false;\n }\n\n var $from = sel.$from;\n var $to = sel.$to;\n\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n var next = moveSelectionBlock(view.state, dir);\n\n if (next && next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n return apply(view, next);\n }\n }\n\n if (!$from.parent.inlineContent) {\n var beyond = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(dir < 0 ? $from : $to, dir);\n return beyond ? apply(view, beyond) : true;\n }\n\n return false;\n}\n\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) {\n return true;\n }\n\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var empty = ref.empty;\n\n if (!$head.sameParent($anchor)) {\n return true;\n }\n\n if (!empty) {\n return false;\n }\n\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) {\n return true;\n }\n\n var nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n\n if (nextNode && !nextNode.isText) {\n var tr = view.state.tr;\n\n if (dir < 0) {\n tr[\"delete\"]($head.pos - nextNode.nodeSize, $head.pos);\n } else {\n tr[\"delete\"]($head.pos, $head.pos + nextNode.nodeSize);\n }\n\n view.dispatch(tr);\n return true;\n }\n\n return false;\n}\n\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n} // Issue #867 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Chrome does really wrong things when the down arrow is\n// pressed when the cursor is directly at the start of a textblock and\n// has an uneditable node after it\n\n\nfunction chromeDownArrowBug(view) {\n if (!result.chrome || view.state.selection.$head.parentOffset > 0) {\n return;\n }\n\n var ref = view.root.getSelection();\n var focusNode = ref.focusNode;\n var focusOffset = ref.focusOffset;\n\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 && focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n var child = focusNode.firstChild;\n switchEditable(view, child, true);\n setTimeout(function () {\n return switchEditable(view, child, false);\n }, 20);\n }\n} // A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\n\n\nfunction getMods(event) {\n var result = \"\";\n\n if (event.ctrlKey) {\n result += \"c\";\n }\n\n if (event.metaKey) {\n result += \"m\";\n }\n\n if (event.altKey) {\n result += \"a\";\n }\n\n if (event.shiftKey) {\n result += \"s\";\n }\n\n return result;\n}\n\nfunction captureKeyDown(view, event) {\n var code = event.keyCode,\n mods = getMods(event);\n\n if (code == 8 || result.mac && code == 72 && mods == \"c\") {\n // Backspace, Ctrl-h on Mac\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodesLeft(view);\n } else if (code == 46 || result.mac && code == 68 && mods == \"c\") {\n // Delete, Ctrl-d on Mac\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodesRight(view);\n } else if (code == 13 && !result.ios || code == 27) {\n // Enter (let through on iOS, to avoid keyboard sync issues), Esc\n return true;\n } else if (code == 37) {\n // Left arrow\n return selectHorizontally(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 39) {\n // Right arrow\n return selectHorizontally(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (code == 38) {\n // Up arrow\n return selectVertically(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 40) {\n // Down arrow\n return chromeDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (mods == (result.mac ? \"m\" : \"c\") && (code == 66 || code == 73 || code == 89 || code == 90)) {\n // Mod-[biyz]\n return true;\n }\n\n return false;\n}\n\nfunction selectionFromDOM(view, origin) {\n var domSel = view.root.getSelection(),\n doc = view.state.doc;\n var nearestDesc = view.docView.nearestDesc(domSel.focusNode),\n inWidget = nearestDesc && nearestDesc.size == 0;\n var head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset);\n var $head = doc.resolve(head),\n $anchor,\n selection;\n\n if (selectionCollapsed(domSel)) {\n $anchor = $head;\n\n while (nearestDesc && !nearestDesc.node) {\n nearestDesc = nearestDesc.parent;\n }\n\n if (nearestDesc && nearestDesc.node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(nearestDesc.node) && nearestDesc.parent && !(nearestDesc.node.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n var pos = nearestDesc.posBefore;\n selection = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](head == pos ? $head : doc.resolve(pos));\n }\n } else {\n $anchor = doc.resolve(view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset));\n }\n\n if (!selection) {\n var bias = origin == \"pointer\" || view.state.selection.head < $head.pos && !inWidget ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n\n return selection;\n}\n\nfunction selectionToDOM(view, force) {\n var sel = view.state.selection;\n syncNodeSelection(view, sel);\n\n if (view.editable ? !view.hasFocus() : !(hasSelection(view) && document.activeElement.contains(view.dom))) {\n return;\n }\n\n view.domObserver.disconnectSelection();\n\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n var anchor = sel.anchor;\n var head = sel.head;\n var resetEditableFrom, resetEditableTo;\n\n if (brokenSelectBetweenUneditable && !(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) {\n if (!sel.$from.parent.inlineContent) {\n resetEditableFrom = temporarilyEditableNear(view, sel.from);\n }\n\n if (!sel.empty && !sel.$from.parent.inlineContent) {\n resetEditableTo = temporarilyEditableNear(view, sel.to);\n }\n }\n\n view.docView.setSelection(anchor, head, view.root, force);\n\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) {\n resetEditable(resetEditableFrom);\n }\n\n if (resetEditableTo) {\n resetEditable(resetEditableTo);\n }\n }\n\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else if (anchor != head) {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n\n if (\"onselectionchange\" in document) {\n removeClassOnSelectionChange(view);\n }\n }\n }\n\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n} // Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\n\n\nvar brokenSelectBetweenUneditable = result.safari || result.chrome && result.chrome_version < 63;\n\nfunction temporarilyEditableNear(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n var after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n var before = offset ? node.childNodes[offset - 1] : null;\n\n if (result.safari && after && after.contentEditable == \"false\") {\n return setEditable(after);\n }\n\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) {\n return setEditable(after);\n } else if (before) {\n return setEditable(before);\n }\n }\n}\n\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n\n if (result.safari && element.draggable) {\n element.draggable = false;\n element.wasDraggable = true;\n }\n\n return element;\n}\n\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n\n if (element.wasDraggable) {\n element.draggable = true;\n element.wasDraggable = null;\n }\n}\n\nfunction removeClassOnSelectionChange(view) {\n var doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n var domSel = view.root.getSelection();\n var node = domSel.anchorNode,\n offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.hideSelectionGuard = function () {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n }\n });\n}\n\nfunction selectCursorWrapper(view) {\n var domSel = view.root.getSelection(),\n range = document.createRange();\n var node = view.cursorWrapper.dom,\n img = node.nodeName == \"IMG\";\n\n if (img) {\n range.setEnd(node.parentNode, domIndex(node) + 1);\n } else {\n range.setEnd(node, 0);\n }\n\n range.collapse(false);\n domSel.removeAllRanges();\n domSel.addRange(range); // Kludge to kill 'control selection' in IE11 when selecting an\n // invisible cursor wrapper, since that would result in those weird\n // resize handles and a selection that considers the absolutely\n // positioned wrapper, rather than the root editable node, the\n // focused element.\n\n if (!img && !view.state.selection.visible && result.ie && result.ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\n\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n var desc = view.docView.descAt(sel.from);\n\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n\n if (desc) {\n desc.selectNode();\n }\n\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n} // Clear all DOM statefulness of the last node selection.\n\n\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent) {\n view.lastSelectedViewDesc.deselectNode();\n }\n\n view.lastSelectedViewDesc = null;\n }\n}\n\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", function (f) {\n return f(view, $anchor, $head);\n }) || prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].between($anchor, $head, bias);\n}\n\nfunction hasFocusAndSelection(view) {\n if (view.editable && view.root.activeElement != view.dom) {\n return false;\n }\n\n return hasSelection(view);\n}\n\nfunction hasSelection(view) {\n var sel = view.root.getSelection();\n\n if (!sel.anchorNode) {\n return false;\n }\n\n try {\n // Firefox will raise 'permission denied' errors when accessing\n // properties of `sel.anchorNode` when it's in a generated CSS\n // element.\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));\n } catch (_) {\n return false;\n }\n}\n\nfunction anchorInRightPlace(view) {\n var anchorDOM = view.docView.domFromPos(view.state.selection.anchor);\n var domSel = view.root.getSelection();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n} // Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\n\n\nfunction parseBetween(view, from_, to_) {\n var ref = view.docView.parseRange(from_, to_);\n var parent = ref.node;\n var fromOffset = ref.fromOffset;\n var toOffset = ref.toOffset;\n var from = ref.from;\n var to = ref.to;\n var domSel = view.root.getSelection(),\n find = null,\n anchor = domSel.anchorNode;\n\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{\n node: anchor,\n offset: domSel.anchorOffset\n }];\n\n if (!selectionCollapsed(domSel)) {\n find.push({\n node: domSel.focusNode,\n offset: domSel.focusOffset\n });\n }\n } // Work around issue in Chrome where backspacing sometimes replaces\n // the deleted content with a random BR node (issues #799, #831)\n\n\n if (result.chrome && view.lastKeyCode === 8) {\n for (var off = toOffset; off > fromOffset; off--) {\n var node = parent.childNodes[off - 1],\n desc = node.pmViewDesc;\n\n if (node.nodeType == \"BR\" && !desc) {\n toOffset = off;\n break;\n }\n\n if (!desc || desc.size) {\n break;\n }\n }\n }\n\n var startDoc = view.state.doc;\n var parser = view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n var $from = startDoc.resolve(from);\n var sel = null,\n doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.spec.code ? \"full\" : true,\n editableContent: true,\n findPositions: find,\n ruleFromNode: ruleFromNode,\n context: $from\n });\n\n if (find && find[0].pos != null) {\n var anchor$1 = find[0].pos,\n head = find[1] && find[1].pos;\n\n if (head == null) {\n head = anchor$1;\n }\n\n sel = {\n anchor: anchor$1 + from,\n head: head + from\n };\n }\n\n return {\n doc: doc,\n sel: sel,\n from: from,\n to: to\n };\n}\n\nfunction ruleFromNode(dom) {\n var desc = dom.pmViewDesc;\n\n if (desc) {\n return desc.parseRule();\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n // Safari replaces the list item or table cell with a BR\n // directly in the list node (?!) if you delete the last\n // character in a list item or table cell (#708, #862)\n if (result.safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n var skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {\n skip: skip\n };\n } else if (dom.parentNode.lastChild == dom || result.safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {\n ignore: true\n };\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {\n ignore: true\n };\n }\n}\n\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n if (from < 0) {\n var origin = view.lastSelectionTime > Date.now() - 50 ? view.lastSelectionOrigin : null;\n var newSel = selectionFromDOM(view, origin);\n\n if (!view.state.selection.eq(newSel)) {\n var tr$1 = view.state.tr.setSelection(newSel);\n\n if (origin == \"pointer\") {\n tr$1.setMeta(\"pointer\", true);\n } else if (origin == \"key\") {\n tr$1.scrollIntoView();\n }\n\n view.dispatch(tr$1);\n }\n\n return;\n }\n\n var $before = view.state.doc.resolve(from);\n var shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n var sel = view.state.selection;\n var parse = parseBetween(view, from, to);\n var doc = view.state.doc,\n compare = doc.slice(parse.from, parse.to);\n var preferredPos, preferredSide; // Prefer anchoring to end when Backspace is pressed\n\n if (view.lastKeyCode === 8 && Date.now() - 100 < view.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n\n view.lastKeyCode = null;\n var change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n\n if (!change) {\n if (typeOver && sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {\n start: sel.from,\n endA: sel.to,\n endB: sel.to\n };\n } else {\n if (parse.sel) {\n var sel$1 = resolveSelection(view, view.state.doc, parse.sel);\n\n if (sel$1 && !sel$1.eq(view.state.selection)) {\n view.dispatch(view.state.tr.setSelection(sel$1));\n }\n }\n\n return;\n }\n }\n\n view.domChangeCount++; // Handle the case where overwriting a selection by typing matches\n // the start or end of the selected content, creating a change\n // that's smaller than what was actually overwritten.\n\n if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2) {\n change.endB += view.state.selection.to - change.endA;\n change.endA = view.state.selection.to;\n }\n } // IE11 will insert a non-breaking space _ahead_ of the space after\n // the cursor space when adding a space before another space. When\n // that happened, adjust the change to cover the space instead.\n\n\n if (result.ie && result.ie_version <= 11 && change.endB == change.start + 1 && change.endA == change.start && change.start > parse.from && parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\xA0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n\n var $from = parse.doc.resolveNoCache(change.start - parse.from);\n var $to = parse.doc.resolveNoCache(change.endB - parse.from);\n var nextSel; // If this looks like the effect of pressing Enter (or was recorded\n // as being an iOS enter press), just dispatch an Enter key instead.\n\n if ((result.ios && view.lastIOSEnter > Date.now() - 100 && (!$from.sameParent($to) || addedNodes.some(function (n) {\n return n.nodeName == \"DIV\";\n })) || !$from.sameParent($to) && $from.pos < parse.doc.content.size && (nextSel = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head == $to.pos) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n })) {\n view.lastIOSEnter = 0;\n return;\n } // Same for backspace\n\n\n if (view.state.selection.anchor > change.start && looksLikeJoin(doc, change.start, change.endA, $from, $to) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) {\n if (result.android && result.chrome) {\n view.domObserver.suppressSelectionUpdates();\n } // #820\n\n\n return;\n }\n\n var chFrom = change.start,\n chTo = change.endA;\n var tr, storedMarks, markChange, $from1;\n\n if ($from.sameParent($to) && $from.parent.inlineContent) {\n if ($from.pos == $to.pos) {\n // Deletion\n // IE11 sometimes weirdly moves the DOM selection around after\n // backspacing out the first element in a textblock\n if (result.ie && result.ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(function () {\n return selectionToDOM(view);\n }, 20);\n }\n\n tr = view.state.tr[\"delete\"](chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if ( // Adding or removing a mark\n change.endA == change.endB && ($from1 = doc.resolve(change.start)) && (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $from1.parent.content.cut($from1.parentOffset, change.endA - $from1.start())))) {\n tr = view.state.tr;\n\n if (markChange.type == \"add\") {\n tr.addMark(chFrom, chTo, markChange.mark);\n } else {\n tr.removeMark(chFrom, chTo, markChange.mark);\n }\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n // Both positions in the same text node -- simply insert text\n var text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n\n if (view.someProp(\"handleTextInput\", function (f) {\n return f(view, chFrom, chTo, text);\n })) {\n return;\n }\n\n tr = view.state.tr.insertText(text, chFrom, chTo);\n }\n }\n\n if (!tr) {\n tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n }\n\n if (parse.sel) {\n var sel$2 = resolveSelection(view, tr.doc, parse.sel); // Chrome Android will sometimes, during composition, report the\n // selection in the wrong place. If it looks like that is\n // happening, don't update the selection.\n // Edge just doesn't move the cursor forward when you start typing\n // in an empty block or between br nodes.\n\n if (sel$2 && !(result.chrome && result.android && view.composing && sel$2.empty && sel$2.head == chFrom || result.ie && sel$2.empty && sel$2.head == chFrom)) {\n tr.setSelection(sel$2);\n }\n }\n\n if (storedMarks) {\n tr.ensureMarks(storedMarks);\n }\n\n view.dispatch(tr.scrollIntoView());\n}\n\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) {\n return null;\n }\n\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n} // : (Fragment, Fragment) → ?{mark: Mark, type: string}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\n\n\nfunction isMarkChange(cur, prev) {\n var curMarks = cur.firstChild.marks,\n prevMarks = prev.firstChild.marks;\n var added = curMarks,\n removed = prevMarks,\n type,\n mark,\n update;\n\n for (var i = 0; i < prevMarks.length; i++) {\n added = prevMarks[i].removeFromSet(added);\n }\n\n for (var i$1 = 0; i$1 < curMarks.length; i$1++) {\n removed = curMarks[i$1].removeFromSet(removed);\n }\n\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n\n update = function update(node) {\n return node.mark(mark.addToSet(node.marks));\n };\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n\n update = function update(node) {\n return node.mark(mark.removeFromSet(node.marks));\n };\n } else {\n return null;\n }\n\n var updated = [];\n\n for (var i$2 = 0; i$2 < prev.childCount; i$2++) {\n updated.push(update(prev.child(i$2)));\n }\n\n if (prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(updated).eq(cur)) {\n return {\n mark: mark,\n type: type\n };\n }\n}\n\nfunction looksLikeJoin(old, start, end, $newStart, $newEnd) {\n if (!$newStart.parent.isTextblock || // The content must have shrunk\n end - start <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into\n skipClosingAndOpening($newStart, true, false) < $newEnd.pos) {\n return false;\n }\n\n var $start = old.resolve(start); // Start must be at the end of a block\n\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock) {\n return false;\n }\n\n var $next = old.resolve(skipClosingAndOpening($start, true, true)); // The next textblock must start before end and end near it\n\n if (!$next.parent.isTextblock || $next.pos > end || skipClosingAndOpening($next, true, false) < end) {\n return false;\n } // The fragments after the join point must match\n\n\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\n\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n var depth = $pos.depth,\n end = fromEnd ? $pos.end() : $pos.pos;\n\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n\n if (mayOpen) {\n var next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n\n return end;\n}\n\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n var start = a.findDiffStart(b, pos);\n\n if (start == null) {\n return null;\n }\n\n var ref = a.findDiffEnd(b, pos + a.size, pos + b.size);\n var endA = ref.a;\n var endB = ref.b;\n\n if (preferredSide == \"end\") {\n var adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n\n if (endA < start && a.size < b.size) {\n var move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n var move$1 = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= move$1;\n endA = start + (endA - endB);\n endB = start;\n }\n\n return {\n start: start,\n endA: endA,\n endB: endB\n };\n}\n\nfunction serializeForClipboard(view, slice) {\n var context = [];\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n var node = content.firstChild;\n context.push(node.type.name, node.type.hasRequiredAttrs() ? node.attrs : null);\n content = node.content;\n }\n\n var serializer = view.someProp(\"clipboardSerializer\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].fromSchema(view.state.schema);\n var doc = detachedDoc(),\n wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {\n document: doc\n }));\n var firstChild = wrap.firstChild,\n needsWrap;\n\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (var i = needsWrap.length - 1; i >= 0; i--) {\n var wrapper = doc.createElement(needsWrap[i]);\n\n while (wrap.firstChild) {\n wrapper.appendChild(wrap.firstChild);\n }\n\n wrap.appendChild(wrapper);\n }\n\n firstChild = wrap.firstChild;\n }\n\n if (firstChild && firstChild.nodeType == 1) {\n firstChild.setAttribute(\"data-pm-slice\", openStart + \" \" + openEnd + \" \" + JSON.stringify(context));\n }\n\n var text = view.someProp(\"clipboardTextSerializer\", function (f) {\n return f(slice);\n }) || slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n return {\n dom: wrap,\n text: text\n };\n} // : (EditorView, string, string, ?bool, ResolvedPos) → ?Slice\n// Read a slice of content from the clipboard (or drop data).\n\n\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n var dom,\n inCode = $context.parent.type.spec.code,\n slice;\n\n if (!html && !text) {\n return null;\n }\n\n var asText = text && (plainText || inCode || !html);\n\n if (asText) {\n view.someProp(\"transformPastedText\", function (f) {\n text = f(text);\n });\n\n if (inCode) {\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(view.state.schema.text(text)), 0, 0);\n }\n\n var parsed = view.someProp(\"clipboardTextParser\", function (f) {\n return f(text, $context);\n });\n\n if (parsed) {\n slice = parsed;\n } else {\n dom = document.createElement(\"div\");\n text.trim().split(/(?:\\r\\n?|\\n)+/).forEach(function (block) {\n dom.appendChild(document.createElement(\"p\")).textContent = block;\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", function (f) {\n html = f(html);\n });\n dom = readHTML(html);\n }\n\n var contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n var sliceData = contextNode && /^(\\d+) (\\d+) (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\"));\n\n if (!slice) {\n var parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {\n preserveWhitespace: !!(asText || sliceData),\n context: $context\n });\n }\n\n if (sliceData) {\n slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[3]);\n } else // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n {\n slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].maxOpen(normalizeSiblings(slice.content, $context), false);\n }\n\n view.someProp(\"transformPasted\", function (f) {\n slice = f(slice);\n });\n return slice;\n} // Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\n\n\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) {\n return fragment;\n }\n\n var loop = function loop(d) {\n var parent = $context.node(d);\n var match = parent.contentMatchAt($context.index(d));\n var lastWrap = void 0,\n result = [];\n fragment.forEach(function (node) {\n if (!result) {\n return;\n }\n\n var wrap = match.findWrapping(node.type),\n inLast;\n\n if (!wrap) {\n return result = null;\n }\n\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) {\n result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length);\n }\n\n var wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type, wrapped.attrs);\n lastWrap = wrap;\n }\n });\n\n if (result) {\n return {\n v: prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(result)\n };\n }\n };\n\n for (var d = $context.depth; d >= 0; d--) {\n var returned = loop(d);\n if (returned) return returned.v;\n }\n\n return fragment;\n}\n\nfunction withWrappers(node, wrap, from) {\n if (from === void 0) from = 0;\n\n for (var i = wrap.length - 1; i >= from; i--) {\n node = wrap[i].create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(node));\n }\n\n return node;\n} // Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\n\n\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n var inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n\n if (inner) {\n return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n }\n\n var match = sibling.contentMatchAt(sibling.childCount);\n\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1])) {\n return sibling.copy(sibling.content.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(withWrappers(node, wrap, depth + 1))));\n }\n }\n}\n\nfunction closeRight(node, depth) {\n if (depth == 0) {\n return node;\n }\n\n var fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true);\n return node.copy(fragment.append(fill));\n}\n\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n var node = side < 0 ? fragment.firstChild : fragment.lastChild,\n inner = node.content;\n\n if (depth < to - 1) {\n inner = closeRange(inner, side, from, to, depth + 1, openEnd);\n }\n\n if (depth >= from) {\n inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, fragment.childCount > 1 || openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true));\n }\n\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\n\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart) {\n slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n }\n\n if (openEnd < slice.openEnd) {\n slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n }\n\n return slice;\n} // Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"..\"` the table cells are ignored.\n\n\nvar wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\nvar _detachedDoc = null;\n\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"));\n}\n\nfunction readHTML(html) {\n var metas = /(\\s*]*>)*/.exec(html);\n\n if (metas) {\n html = html.slice(metas[0].length);\n }\n\n var elt = detachedDoc().createElement(\"div\");\n var firstTag = /(?:]*>)*<([a-z][^>\\s]+)/i.exec(html),\n wrap,\n depth = 0;\n\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()]) {\n html = wrap.map(function (n) {\n return \"<\" + n + \">\";\n }).join(\"\") + html + wrap.map(function (n) {\n return \"\";\n }).reverse().join(\"\");\n depth = wrap.length;\n }\n\n elt.innerHTML = html;\n\n for (var i = 0; i < depth; i++) {\n elt = elt.firstChild;\n }\n\n return elt;\n}\n\nfunction addContext(slice, context) {\n if (!slice.size) {\n return slice;\n }\n\n var schema = slice.content.firstChild.type.schema,\n array;\n\n try {\n array = JSON.parse(context);\n } catch (e) {\n return slice;\n }\n\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n\n for (var i = array.length - 2; i >= 0; i -= 2) {\n var type = schema.nodes[array[i]];\n\n if (!type || type.hasRequiredAttrs()) {\n break;\n }\n\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(type.create(array[i + 1], content));\n openStart++;\n openEnd++;\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, openStart, openEnd);\n}\n\nvar observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n}; // IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\n\nvar useCharData = result.ie && result.ie_version <= 11;\n\nvar SelectionState = function SelectionState() {\n this.anchorNode = this.anchorOffset = this.focusNode = this.focusOffset = null;\n};\n\nSelectionState.prototype.set = function set(sel) {\n this.anchorNode = sel.anchorNode;\n this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode;\n this.focusOffset = sel.focusOffset;\n};\n\nSelectionState.prototype.eq = function eq(sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n};\n\nvar DOMObserver = function DOMObserver(view, handleDOMChange) {\n var this$1 = this;\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = false;\n this.observer = window.MutationObserver && new window.MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) {\n this$1.queue.push(mutations[i]);\n } // IE11 will sometimes (on backspacing out a single character\n // text node after a BR node) call the observer callback\n // before actually updating the DOM, which will cause\n // ProseMirror to miss the change (see #930)\n\n\n if (result.ie && result.ie_version <= 11 && mutations.some(function (m) {\n return m.type == \"childList\" && m.removedNodes.length || m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length;\n })) {\n this$1.flushSoon();\n } else {\n this$1.flush();\n }\n });\n this.currentSelection = new SelectionState();\n\n if (useCharData) {\n this.onCharData = function (e) {\n this$1.queue.push({\n target: e.target,\n type: \"characterData\",\n oldValue: e.prevValue\n });\n this$1.flushSoon();\n };\n }\n\n this.onSelectionChange = this.onSelectionChange.bind(this);\n this.suppressingSelectionUpdates = false;\n};\n\nDOMObserver.prototype.flushSoon = function flushSoon() {\n var this$1 = this;\n\n if (!this.flushingSoon) {\n this.flushingSoon = true;\n window.setTimeout(function () {\n this$1.flushingSoon = false;\n this$1.flush();\n }, 20);\n }\n};\n\nDOMObserver.prototype.start = function start() {\n if (this.observer) {\n this.observer.observe(this.view.dom, observeOptions);\n }\n\n if (useCharData) {\n this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n }\n\n this.connectSelection();\n};\n\nDOMObserver.prototype.stop = function stop() {\n var this$1 = this;\n\n if (this.observer) {\n var take = this.observer.takeRecords();\n\n if (take.length) {\n for (var i = 0; i < take.length; i++) {\n this.queue.push(take[i]);\n }\n\n window.setTimeout(function () {\n return this$1.flush();\n }, 20);\n }\n\n this.observer.disconnect();\n }\n\n if (useCharData) {\n this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n }\n\n this.disconnectSelection();\n};\n\nDOMObserver.prototype.connectSelection = function connectSelection() {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.disconnectSelection = function disconnectSelection() {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.suppressSelectionUpdates = function suppressSelectionUpdates() {\n var this$1 = this;\n this.suppressingSelectionUpdates = true;\n setTimeout(function () {\n return this$1.suppressingSelectionUpdates = false;\n }, 50);\n};\n\nDOMObserver.prototype.onSelectionChange = function onSelectionChange() {\n if (!hasFocusAndSelection(this.view)) {\n return;\n }\n\n if (this.suppressingSelectionUpdates) {\n return selectionToDOM(this.view);\n } // Deletions on IE11 fire their events in the wrong order, giving\n // us a selection change event before the DOM changes are\n // reported.\n\n\n if (result.ie && result.ie_version <= 11 && !this.view.state.selection.empty) {\n var sel = this.view.root.getSelection(); // Selection.isCollapsed isn't reliable on IE\n\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset)) {\n return this.flushSoon();\n }\n }\n\n this.flush();\n};\n\nDOMObserver.prototype.setCurSelection = function setCurSelection() {\n this.currentSelection.set(this.view.root.getSelection());\n};\n\nDOMObserver.prototype.ignoreSelectionChange = function ignoreSelectionChange(sel) {\n if (sel.rangeCount == 0) {\n return true;\n }\n\n var container = sel.getRangeAt(0).commonAncestorContainer;\n var desc = this.view.docView.nearestDesc(container);\n\n if (desc && desc.ignoreMutation({\n type: \"selection\",\n target: container.nodeType == 3 ? container.parentNode : container\n })) {\n this.setCurSelection();\n return true;\n }\n};\n\nDOMObserver.prototype.flush = function flush() {\n if (!this.view.docView || this.flushingSoon) {\n return;\n }\n\n var mutations = this.observer ? this.observer.takeRecords() : [];\n\n if (this.queue.length) {\n mutations = this.queue.concat(mutations);\n this.queue.length = 0;\n }\n\n var sel = this.view.root.getSelection();\n var newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasSelection(this.view) && !this.ignoreSelectionChange(sel);\n var from = -1,\n to = -1,\n typeOver = false,\n added = [];\n\n if (this.view.editable) {\n for (var i = 0; i < mutations.length; i++) {\n var result$1 = this.registerMutation(mutations[i], added);\n\n if (result$1) {\n from = from < 0 ? result$1.from : Math.min(result$1.from, from);\n to = to < 0 ? result$1.to : Math.max(result$1.to, to);\n\n if (result$1.typeOver && !this.view.composing) {\n typeOver = true;\n }\n }\n }\n }\n\n if (result.gecko && added.length > 1) {\n var brs = added.filter(function (n) {\n return n.nodeName == \"BR\";\n });\n\n if (brs.length == 2) {\n var a = brs[0];\n var b = brs[1];\n\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) {\n b.remove();\n } else {\n a.remove();\n }\n }\n }\n\n if (from > -1 || newSel) {\n if (from > -1) {\n this.view.docView.markDirty(from, to);\n checkCSS(this.view);\n }\n\n this.handleDOMChange(from, to, typeOver, added);\n\n if (this.view.docView.dirty) {\n this.view.updateState(this.view.state);\n } else if (!this.currentSelection.eq(sel)) {\n selectionToDOM(this.view);\n }\n }\n};\n\nDOMObserver.prototype.registerMutation = function registerMutation(mut, added) {\n // Ignore mutations inside nodes that were already noted as inserted\n if (added.indexOf(mut.target) > -1) {\n return null;\n }\n\n var desc = this.view.docView.nearestDesc(mut.target);\n\n if (mut.type == \"attributes\" && (desc == this.view.docView || mut.attributeName == \"contenteditable\" || // Firefox sometimes fires spurious events for null/empty styles\n mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))) {\n return null;\n }\n\n if (!desc || desc.ignoreMutation(mut)) {\n return null;\n }\n\n if (mut.type == \"childList\") {\n var prev = mut.previousSibling,\n next = mut.nextSibling;\n\n if (result.ie && result.ie_version <= 11 && mut.addedNodes.length) {\n // IE11 gives us incorrect next/prev siblings for some\n // insertions, so if there are added nodes, recompute those\n for (var i = 0; i < mut.addedNodes.length; i++) {\n var ref = mut.addedNodes[i];\n var previousSibling = ref.previousSibling;\n var nextSibling = ref.nextSibling;\n\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) {\n prev = previousSibling;\n }\n\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) {\n next = nextSibling;\n }\n }\n }\n\n var fromOffset = prev && prev.parentNode == mut.target ? domIndex(prev) + 1 : 0;\n var from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n var toOffset = next && next.parentNode == mut.target ? domIndex(next) : mut.target.childNodes.length;\n\n for (var i$1 = 0; i$1 < mut.addedNodes.length; i$1++) {\n added.push(mut.addedNodes[i$1]);\n }\n\n var to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {\n from: from,\n to: to\n };\n } else if (mut.type == \"attributes\") {\n return {\n from: desc.posAtStart - desc.border,\n to: desc.posAtEnd + desc.border\n };\n } else {\n // \"characterData\"\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n // An event was generated for a text change that didn't change\n // any text. Mark the dom change to fall back to assuming the\n // selection was typed over with an identical value if it can't\n // find another change.\n typeOver: mut.target.nodeValue == mut.oldValue\n };\n }\n};\n\nvar cssChecked = false;\n\nfunction checkCSS(view) {\n if (cssChecked) {\n return;\n }\n\n cssChecked = true;\n\n if (getComputedStyle(view.dom).whiteSpace == \"normal\") {\n console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n }\n} // A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\n\n\nvar handlers = {},\n editHandlers = {};\n\nfunction initInput(view) {\n view.shiftKey = false;\n view.mouseDown = null;\n view.lastKeyCode = null;\n view.lastKeyCodeTime = 0;\n view.lastClick = {\n time: 0,\n x: 0,\n y: 0,\n type: \"\"\n };\n view.lastSelectionOrigin = null;\n view.lastSelectionTime = 0;\n view.lastIOSEnter = 0;\n view.composing = false;\n view.composingTimeout = null;\n view.compositionNodes = [];\n view.compositionEndedAt = -2e8;\n view.domObserver = new DOMObserver(view, function (from, to, typeOver, added) {\n return readDOMChange(view, from, to, typeOver, added);\n });\n view.domObserver.start(); // Used by hacks like the beforeinput handler to check whether anything happened in the DOM\n\n view.domChangeCount = 0;\n view.eventHandlers = Object.create(null);\n\n var loop = function loop(event) {\n var handler = handlers[event];\n view.dom.addEventListener(event, view.eventHandlers[event] = function (event) {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) && (view.editable || !(event.type in editHandlers))) {\n handler(view, event);\n }\n });\n };\n\n for (var event in handlers) {\n loop(event);\n } // On Safari, for reasons beyond my understanding, adding an input\n // event handler makes an issue where the composition vanishes when\n // you press enter go away.\n\n\n if (result.safari) {\n view.dom.addEventListener(\"input\", function () {\n return null;\n });\n }\n\n ensureListeners(view);\n}\n\nfunction setSelectionOrigin(view, origin) {\n view.lastSelectionOrigin = origin;\n view.lastSelectionTime = Date.now();\n}\n\nfunction destroyInput(view) {\n view.domObserver.stop();\n\n for (var type in view.eventHandlers) {\n view.dom.removeEventListener(type, view.eventHandlers[type]);\n }\n\n clearTimeout(view.composingTimeout);\n}\n\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", function (currentHandlers) {\n for (var type in currentHandlers) {\n if (!view.eventHandlers[type]) {\n view.dom.addEventListener(type, view.eventHandlers[type] = function (event) {\n return runCustomHandler(view, event);\n });\n }\n }\n });\n}\n\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", function (handlers) {\n var handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false;\n });\n}\n\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) {\n return true;\n }\n\n if (event.defaultPrevented) {\n return false;\n }\n\n for (var node = event.target; node != view.dom; node = node.parentNode) {\n if (!node || node.nodeType == 11 || node.pmViewDesc && node.pmViewDesc.stopEvent(event)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] && (view.editable || !(event.type in editHandlers))) {\n handlers[event.type](view, event);\n }\n}\n\neditHandlers.keydown = function (view, event) {\n view.shiftKey = event.keyCode == 16 || event.shiftKey;\n\n if (inOrNearComposition(view, event)) {\n return;\n }\n\n view.lastKeyCode = event.keyCode;\n view.lastKeyCodeTime = Date.now(); // On iOS, if we preventDefault enter key presses, the virtual\n // keyboard gets confused. So the hack here is to set a flag that\n // makes the DOM change code recognize that what just happens should\n // be replaced by whatever the Enter key handlers do.\n\n if (result.ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n view.lastIOSEnter = Date.now();\n } else if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, event);\n }) || captureKeyDown(view, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"key\");\n }\n};\n\neditHandlers.keyup = function (view, e) {\n if (e.keyCode == 16) {\n view.shiftKey = false;\n }\n};\n\neditHandlers.keypress = function (view, event) {\n if (inOrNearComposition(view, event) || !event.charCode || event.ctrlKey && !event.altKey || result.mac && event.metaKey) {\n return;\n }\n\n if (view.someProp(\"handleKeyPress\", function (f) {\n return f(view, event);\n })) {\n event.preventDefault();\n return;\n }\n\n var sel = view.state.selection;\n\n if (!(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || !sel.$from.sameParent(sel.$to)) {\n var text = String.fromCharCode(event.charCode);\n\n if (!view.someProp(\"handleTextInput\", function (f) {\n return f(view, sel.$from.pos, sel.$to.pos, text);\n })) {\n view.dispatch(view.state.tr.insertText(text).scrollIntoView());\n }\n\n event.preventDefault();\n }\n};\n\nfunction eventCoords(event) {\n return {\n left: event.clientX,\n top: event.clientY\n };\n}\n\nfunction isNear(event, click) {\n var dx = click.x - event.clientX,\n dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100;\n}\n\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(inside);\n\n var loop = function loop(i) {\n if (view.someProp(propName, function (f) {\n return i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true) : f(view, pos, $pos.node(i), $pos.before(i), event, false);\n })) {\n return {\n v: true\n };\n }\n };\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var returned = loop(i);\n if (returned) return returned.v;\n }\n\n return false;\n}\n\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) {\n view.focus();\n }\n\n var tr = view.state.tr.setSelection(selection);\n\n if (origin == \"pointer\") {\n tr.setMeta(\"pointer\", true);\n }\n\n view.dispatch(tr);\n}\n\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(inside),\n node = $pos.nodeAfter;\n\n if (node && node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n updateSelection(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos), \"pointer\");\n return true;\n }\n\n return false;\n}\n\nfunction selectClickedNode(view, inside) {\n if (inside == -1) {\n return false;\n }\n\n var sel = view.state.selection,\n selectedNode,\n selectAt;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n selectedNode = sel.node;\n }\n\n var $pos = view.state.doc.resolve(inside);\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 && i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos) {\n selectAt = $pos.before(sel.$from.depth);\n } else {\n selectAt = $pos.before(i);\n }\n\n break;\n }\n }\n\n if (selectAt != null) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, selectAt), \"pointer\");\n return true;\n } else {\n return false;\n }\n}\n\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) || view.someProp(\"handleClick\", function (f) {\n return f(view, pos, event);\n }) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside));\n}\n\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) || view.someProp(\"handleDoubleClick\", function (f) {\n return f(view, pos, event);\n });\n}\n\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) || view.someProp(\"handleTripleClick\", function (f) {\n return f(view, pos, event);\n }) || defaultTripleClick(view, inside);\n}\n\nfunction defaultTripleClick(view, inside) {\n var doc = view.state.doc;\n\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, 0, doc.content.size), \"pointer\");\n return true;\n }\n\n return false;\n }\n\n var $pos = doc.resolve(inside);\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n var nodePos = $pos.before(i);\n\n if (node.inlineContent) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\");\n } else if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(doc, nodePos), \"pointer\");\n } else {\n continue;\n }\n\n return true;\n }\n}\n\nfunction forceDOMFlush(view) {\n return endComposition(view);\n}\n\nvar selectNodeModifier = result.mac ? \"metaKey\" : \"ctrlKey\";\n\nhandlers.mousedown = function (view, event) {\n view.shiftKey = event.shiftKey;\n var flushed = forceDOMFlush(view);\n var now = Date.now(),\n type = \"singleClick\";\n\n if (now - view.lastClick.time < 500 && isNear(event, view.lastClick) && !event[selectNodeModifier]) {\n if (view.lastClick.type == \"singleClick\") {\n type = \"doubleClick\";\n } else if (view.lastClick.type == \"doubleClick\") {\n type = \"tripleClick\";\n }\n }\n\n view.lastClick = {\n time: now,\n x: event.clientX,\n y: event.clientY,\n type: type\n };\n var pos = view.posAtCoords(eventCoords(event));\n\n if (!pos) {\n return;\n }\n\n if (type == \"singleClick\") {\n view.mouseDown = new MouseDown(view, pos, event, flushed);\n } else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"pointer\");\n }\n};\n\nvar MouseDown = function MouseDown(view, pos, event, flushed) {\n var this$1 = this;\n this.view = view;\n this.startDoc = view.state.doc;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.selectNode = event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n var targetNode, targetPos;\n\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n var $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n\n this.mightDrag = null;\n var target = flushed ? null : event.target;\n var targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc ? targetDesc.dom : null;\n\n if (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && targetPos == view.state.selection.from) {\n this.mightDrag = {\n node: targetNode,\n pos: targetPos,\n addAttr: this.target && !this.target.draggable,\n setUneditable: this.target && result.gecko && !this.target.hasAttribute(\"contentEditable\")\n };\n }\n\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n\n if (this.mightDrag.addAttr) {\n this.target.draggable = true;\n }\n\n if (this.mightDrag.setUneditable) {\n setTimeout(function () {\n return this$1.target.setAttribute(\"contentEditable\", \"false\");\n }, 20);\n }\n\n this.view.domObserver.start();\n }\n\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n};\n\nMouseDown.prototype.done = function done() {\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n\n if (this.mightDrag.addAttr) {\n this.target.draggable = false;\n }\n\n if (this.mightDrag.setUneditable) {\n this.target.removeAttribute(\"contentEditable\");\n }\n\n this.view.domObserver.start();\n }\n\n this.view.mouseDown = null;\n};\n\nMouseDown.prototype.up = function up(event) {\n this.done();\n\n if (!this.view.dom.contains(event.target.nodeType == 3 ? event.target.parentNode : event.target)) {\n return;\n }\n\n var pos = this.pos;\n\n if (this.view.state.doc != this.startDoc) {\n pos = this.view.posAtCoords(eventCoords(event));\n }\n\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (this.flushed || // Chrome will sometimes treat a node selection as a\n // cursor, but still report that the node is selected\n // when asked through getSelection. You'll then get a\n // situation where clicking at the point where that\n // (hidden) cursor is doesn't change the selection, and\n // thus doesn't get a reaction from ProseMirror. This\n // works around that.\n result.chrome && !(this.view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) && (pos.pos == this.view.state.selection.from || pos.pos == this.view.state.selection.to)) {\n updateSelection(this.view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n};\n\nMouseDown.prototype.move = function move(event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4)) {\n this.allowDefault = true;\n }\n\n setSelectionOrigin(this.view, \"pointer\");\n};\n\nhandlers.touchdown = function (view) {\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\n\nhandlers.contextmenu = function (view) {\n return forceDOMFlush(view);\n};\n\nfunction inOrNearComposition(view, event) {\n if (view.composing) {\n return true;\n } // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n // emitted. The keydown event triggers newline insertion, which we don't want.\n // This method returns true if the keydown event should be ignored.\n // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n // This guards against the case where compositionend is triggered without the keyboard\n // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n // afterwards- we wouldn't want to ignore the keydown event in this case.\n\n\n if (result.safari && Math.abs(event.timeStamp - view.compositionEndedAt) < 500) {\n view.compositionEndedAt = -2e8;\n return true;\n }\n\n return false;\n} // Drop active composition after 5 seconds of inactivity on Android\n\n\nvar timeoutComposition = result.android ? 5000 : -1;\n\neditHandlers.compositionstart = editHandlers.compositionupdate = function (view) {\n if (!view.composing) {\n view.domObserver.flush();\n var state = view.state;\n var $pos = state.selection.$from;\n\n if (state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(function (m) {\n return m.type.spec.inclusive === false;\n }))) {\n // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view); // In firefox, if the cursor is after but outside a marked node,\n // the inserted text won't inherit the marks. So this moves it\n // inside if necessary.\n\n if (result.gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n var sel = view.root.getSelection();\n\n for (var node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n var before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n\n if (!before) {\n break;\n }\n\n if (before.nodeType == 3) {\n sel.collapse(before, before.nodeValue.length);\n break;\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n\n view.composing = true;\n }\n\n scheduleComposeEnd(view, timeoutComposition);\n};\n\neditHandlers.compositionend = function (view, event) {\n if (view.composing) {\n view.composing = false;\n view.compositionEndedAt = event.timeStamp;\n scheduleComposeEnd(view, 20);\n }\n};\n\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.composingTimeout);\n\n if (delay > -1) {\n view.composingTimeout = setTimeout(function () {\n return endComposition(view);\n }, delay);\n }\n}\n\nfunction endComposition(view, forceUpdate) {\n view.composing = false;\n\n while (view.compositionNodes.length > 0) {\n view.compositionNodes.pop().markParentsDirty();\n }\n\n if (forceUpdate || view.docView.dirty) {\n view.updateState(view.state);\n return true;\n }\n\n return false;\n}\n\nfunction captureCopy(view, dom) {\n // The extra wrapper is somehow necessary on IE/Edge to prevent the\n // content from being mangled when it is put onto the clipboard\n var doc = view.dom.ownerDocument;\n var wrap = doc.body.appendChild(doc.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n var sel = getSelection(),\n range = doc.createRange();\n range.selectNodeContents(dom); // Done because IE will fire a selectionchange moving the selection\n // to its start when removeAllRanges is called and the editor still\n // has focus (which will mess up the editor's selection state).\n\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(function () {\n doc.body.removeChild(wrap);\n view.focus();\n }, 50);\n} // This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\n\n\nvar brokenClipboardAPI = result.ie && result.ie_version < 15 || result.ios && result.webkit_version < 604;\n\nhandlers.copy = editHandlers.cut = function (view, e) {\n var sel = view.state.selection,\n cut = e.type == \"cut\";\n\n if (sel.empty) {\n return;\n } // IE and Edge's clipboard interface is completely broken\n\n\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var slice = sel.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n\n if (data) {\n e.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n\n if (cut) {\n view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n }\n};\n\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\n\nfunction capturePaste(view, e) {\n var doc = view.dom.ownerDocument;\n var plainText = view.shiftKey || view.state.selection.$from.parent.type.spec.code;\n var target = doc.body.appendChild(doc.createElement(plainText ? \"textarea\" : \"div\"));\n\n if (!plainText) {\n target.contentEditable = \"true\";\n }\n\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n setTimeout(function () {\n view.focus();\n doc.body.removeChild(target);\n\n if (plainText) {\n doPaste(view, target.value, null, e);\n } else {\n doPaste(view, target.textContent, target.innerHTML, e);\n }\n }, 50);\n}\n\nfunction doPaste(view, text, html, e) {\n var slice = parseFromClipboard(view, text, html, view.shiftKey, view.state.selection.$from);\n\n if (view.someProp(\"handlePaste\", function (f) {\n return f(view, e, slice || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].empty);\n }) || !slice) {\n return;\n }\n\n var singleNode = sliceSingleNode(slice);\n var tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.shiftKey) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n}\n\neditHandlers.paste = function (view, e) {\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var html = data && data.getData(\"text/html\"),\n text = data && data.getData(\"text/plain\");\n\n if (data && (html || text || data.files.length)) {\n doPaste(view, text, html, e);\n e.preventDefault();\n } else {\n capturePaste(view, e);\n }\n};\n\nvar Dragging = function Dragging(slice, move) {\n this.slice = slice;\n this.move = move;\n};\n\nvar dragCopyModifier = result.mac ? \"altKey\" : \"ctrlKey\";\n\nhandlers.dragstart = function (view, e) {\n var mouseDown = view.mouseDown;\n\n if (mouseDown) {\n mouseDown.done();\n }\n\n if (!e.dataTransfer) {\n return;\n }\n\n var sel = view.state.selection;\n var pos = sel.empty ? null : view.posAtCoords(eventCoords(e));\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] ? sel.to - 1 : sel.to)) ;else if (mouseDown && mouseDown.mightDrag) {\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, mouseDown.mightDrag.pos)));\n } else if (e.target && e.target.nodeType == 1) {\n var desc = view.docView.nearestDesc(e.target, true);\n\n if (!desc || !desc.node.type.spec.draggable || desc == view.docView) {\n return;\n }\n\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, desc.posBefore)));\n }\n var slice = view.state.selection.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n e.dataTransfer.clearData();\n e.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n\n if (!brokenClipboardAPI) {\n e.dataTransfer.setData(\"text/plain\", text);\n }\n\n view.dragging = new Dragging(slice, !e[dragCopyModifier]);\n};\n\nhandlers.dragend = function (view) {\n window.setTimeout(function () {\n return view.dragging = null;\n }, 50);\n};\n\neditHandlers.dragover = editHandlers.dragenter = function (_, e) {\n return e.preventDefault();\n};\n\neditHandlers.drop = function (view, e) {\n var dragging = view.dragging;\n view.dragging = null;\n\n if (!e.dataTransfer) {\n return;\n }\n\n var eventPos = view.posAtCoords(eventCoords(e));\n\n if (!eventPos) {\n return;\n }\n\n var $mouse = view.state.doc.resolve(eventPos.pos);\n\n if (!$mouse) {\n return;\n }\n\n var slice = dragging && dragging.slice || parseFromClipboard(view, e.dataTransfer.getData(brokenClipboardAPI ? \"Text\" : \"text/plain\"), brokenClipboardAPI ? null : e.dataTransfer.getData(\"text/html\"), false, $mouse);\n\n if (!slice) {\n return;\n }\n\n e.preventDefault();\n\n if (view.someProp(\"handleDrop\", function (f) {\n return f(view, e, slice, dragging && dragging.move);\n })) {\n return;\n }\n\n var insertPos = slice ? Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__[\"dropPoint\"])(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n\n if (insertPos == null) {\n insertPos = $mouse.pos;\n }\n\n var tr = view.state.tr;\n\n if (dragging && dragging.move) {\n tr.deleteSelection();\n }\n\n var pos = tr.mapping.map(insertPos);\n var isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n var beforeInsert = tr.doc;\n\n if (isNode) {\n tr.replaceRangeWith(pos, pos, slice.content.firstChild);\n } else {\n tr.replaceRange(pos, pos, slice);\n }\n\n if (tr.doc.eq(beforeInsert)) {\n return;\n }\n\n var $pos = tr.doc.resolve(pos);\n\n if (isNode && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(slice.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos));\n } else {\n tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(tr.mapping.map(insertPos))));\n }\n\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\n\nhandlers.focus = function (view) {\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(function () {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.root.getSelection())) {\n selectionToDOM(view);\n }\n }, 20);\n }\n};\n\nhandlers.blur = function (view) {\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n view.domObserver.currentSelection.set({});\n view.focused = false;\n }\n};\n\nhandlers.beforeinput = function (view, event) {\n // We should probably do more with beforeinput events, but support\n // is so spotty that I'm still waiting to see where they are going.\n // Very specific hack to deal with backspace sometimes failing on\n // Chrome Android when after an uneditable node.\n if (result.chrome && result.android && event.inputType == \"deleteContentBackward\") {\n var domChangeCount = view.domChangeCount;\n setTimeout(function () {\n if (view.domChangeCount != domChangeCount) {\n return;\n } // Event already had some effect\n // This bug tends to close the virtual keyboard, so we refocus\n\n\n view.dom.blur();\n view.focus();\n\n if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) {\n return;\n }\n\n var ref = view.state.selection;\n var $cursor = ref.$cursor; // Crude approximation of backspace behavior when no command handled it\n\n if ($cursor && $cursor.pos > 0) {\n view.dispatch(view.state.tr[\"delete\"]($cursor.pos - 1, $cursor.pos).scrollIntoView());\n }\n }, 50);\n }\n}; // Make sure all handlers get registered\n\n\nfor (var prop in editHandlers) {\n handlers[prop] = editHandlers[prop];\n}\n\nfunction compareObjs(a, b) {\n if (a == b) {\n return true;\n }\n\n for (var p in a) {\n if (a[p] !== b[p]) {\n return false;\n }\n }\n\n for (var p$1 in b) {\n if (!(p$1 in a)) {\n return false;\n }\n }\n\n return true;\n}\n\nvar WidgetType = function WidgetType(toDOM, spec) {\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n this.toDOM = toDOM;\n};\n\nWidgetType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var ref = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n var pos = ref.pos;\n var deleted = ref.deleted;\n return deleted ? null : new Decoration(pos - offset, pos - offset, this);\n};\n\nWidgetType.prototype.valid = function valid() {\n return true;\n};\n\nWidgetType.prototype.eq = function eq(other) {\n return this == other || other instanceof WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && compareObjs(this.spec, other.spec));\n};\n\nvar InlineType = function InlineType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nInlineType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n var to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this);\n};\n\nInlineType.prototype.valid = function valid(_, span) {\n return span.from < span.to;\n};\n\nInlineType.prototype.eq = function eq(other) {\n return this == other || other instanceof InlineType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n};\n\nInlineType.is = function is(span) {\n return span.type instanceof InlineType;\n};\n\nvar NodeType = function NodeType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nNodeType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var from = mapping.mapResult(span.from + oldOffset, 1);\n\n if (from.deleted) {\n return null;\n }\n\n var to = mapping.mapResult(span.to + oldOffset, -1);\n\n if (to.deleted || to.pos <= from.pos) {\n return null;\n }\n\n return new Decoration(from.pos - offset, to.pos - offset, this);\n};\n\nNodeType.prototype.valid = function valid(node, span) {\n var ref = node.content.findIndex(span.from);\n var index = ref.index;\n var offset = ref.offset;\n return offset == span.from && offset + node.child(index).nodeSize == span.to;\n};\n\nNodeType.prototype.eq = function eq(other) {\n return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n}; // ::- Decoration objects can be provided to the view through the\n// [`decorations` prop](#view.EditorProps.decorations). They come in\n// several variants—see the static members of this class for details.\n\n\nvar Decoration = function Decoration(from, to, type) {\n // :: number\n // The start position of the decoration.\n this.from = from; // :: number\n // The end position. Will be the same as `from` for [widget\n // decorations](#view.Decoration^widget).\n\n this.to = to;\n this.type = type;\n};\n\nvar prototypeAccessors$1 = {\n spec: {\n configurable: true\n }\n};\n\nDecoration.prototype.copy = function copy(from, to) {\n return new Decoration(from, to, this.type);\n};\n\nDecoration.prototype.eq = function eq(other) {\n return this.type.eq(other.type) && this.from == other.from && this.to == other.to;\n};\n\nDecoration.prototype.map = function map(mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset);\n}; // :: (number, union<(view: EditorView, getPos: () → number) → dom.Node, dom.Node>, ?Object) → Decoration\n// Creates a widget decoration, which is a DOM node that's shown in\n// the document at the given position. It is recommended that you\n// delay rendering the widget by passing a function that will be\n// called when the widget is actually drawn in a view, but you can\n// also directly pass a DOM node. `getPos` can be used to find the\n// widget's current document position.\n//\n// spec::- These options are supported:\n//\n// side:: ?number\n// Controls which side of the document position this widget is\n// associated with. When negative, it is drawn before a cursor\n// at its position, and content inserted at that position ends\n// up after the widget. When zero (the default) or positive, the\n// widget is drawn after the cursor and content inserted there\n// ends up before the widget.\n//\n// When there are multiple widgets at a given position, their\n// `side` values determine the order in which they appear. Those\n// with lower values appear first. The ordering of widgets with\n// the same `side` value is unspecified.\n//\n// When `marks` is null, `side` also determines the marks that\n// the widget is wrapped in—those of the node before when\n// negative, those of the node after when positive.\n//\n// marks:: ?[Mark]\n// The precise set of marks to draw around the widget.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to control which DOM events, when they bubble out\n// of this widget, the editor view should ignore.\n//\n// ignoreSelection:: ?bool\n// When set (defaults to false), selection changes inside the\n// widget are ignored, and don't cause ProseMirror to try and\n// re-sync the selection with its selection state.\n//\n// key:: ?string\n// When comparing decorations of this type (in order to decide\n// whether it needs to be redrawn), ProseMirror will by default\n// compare the widget DOM node by identity. If you pass a key,\n// that key will be compared instead, which can be useful when\n// you generate decorations on the fly and don't want to store\n// and reuse DOM nodes. Make sure that any widgets with the same\n// key are interchangeable—if widgets differ in, for example,\n// the behavior of some event handler, they should get\n// different keys.\n\n\nDecoration.widget = function widget(pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec));\n}; // :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates an inline decoration, which adds the given attributes to\n// each inline node between `from` and `to`.\n//\n// spec::- These options are recognized:\n//\n// inclusiveStart:: ?bool\n// Determines how the left side of the decoration is\n// [mapped](#transform.Position_Mapping) when content is\n// inserted directly at that position. By default, the decoration\n// won't include the new content, but you can set this to `true`\n// to make it inclusive.\n//\n// inclusiveEnd:: ?bool\n// Determines how the right side of the decoration is mapped.\n// See\n// [`inclusiveStart`](#view.Decoration^inline^spec.inclusiveStart).\n\n\nDecoration.inline = function inline(from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec));\n}; // :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates a node decoration. `from` and `to` should point precisely\n// before and after a node in the document. That node, and only that\n// node, will receive the given attributes.\n//\n// spec::-\n//\n// Optional information to store with the decoration. It\n// is also used when comparing decorators for equality.\n\n\nDecoration.node = function node(from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec));\n}; // :: Object\n// The spec provided when creating this decoration. Can be useful\n// if you've stored extra information in that object.\n\n\nprototypeAccessors$1.spec.get = function () {\n return this.type.spec;\n};\n\nObject.defineProperties(Decoration.prototype, prototypeAccessors$1); // DecorationAttrs:: interface\n// A set of attributes to add to a decorated node. Most properties\n// simply directly correspond to DOM attributes of the same name,\n// which will be set to the property's value. These are exceptions:\n//\n// class:: ?string\n// A CSS class name or a space-separated set of class names to be\n// _added_ to the classes that the node already had.\n//\n// style:: ?string\n// A string of CSS to be _added_ to the node's existing `style` property.\n//\n// nodeName:: ?string\n// When non-null, the target node is wrapped in a DOM element of\n// this type (and the other attributes are applied to this element).\n\nvar none = [],\n noSpec = {}; // ::- A collection of [decorations](#view.Decoration), organized in\n// such a way that the drawing algorithm can efficiently use and\n// compare them. This is a persistent data structure—it is not\n// modified, updates create a new value.\n\nvar DecorationSet = function DecorationSet(local, children) {\n this.local = local && local.length ? local : none;\n this.children = children && children.length ? children : none;\n}; // :: (Node, [Decoration]) → DecorationSet\n// Create a set of decorations, using the structure of the given\n// document.\n\n\nDecorationSet.create = function create(doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty;\n}; // :: (?number, ?number, ?(spec: Object) → bool) → [Decoration]\n// Find all decorations in this set which touch the given range\n// (including decorations that start or end directly at the\n// boundaries) and match the given predicate on their spec. When\n// `start` and `end` are omitted, all decorations in the set are\n// considered. When `predicate` isn't given, all decorations are\n// assumed to match.\n\n\nDecorationSet.prototype.find = function find(start, end, predicate) {\n var result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result;\n};\n\nDecorationSet.prototype.findInner = function findInner(start, end, result, offset, predicate) {\n for (var i = 0; i < this.local.length; i++) {\n var span = this.local[i];\n\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec))) {\n result.push(span.copy(span.from + offset, span.to + offset));\n }\n }\n\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] < end && this.children[i$1 + 1] > start) {\n var childOff = this.children[i$1] + 1;\n this.children[i$1 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n}; // :: (Mapping, Node, ?Object) → DecorationSet\n// Map the set of decorations in response to a change in the\n// document.\n//\n// options::- An optional set of options.\n//\n// onRemove:: ?(decorationSpec: Object)\n// When given, this function will be called for each decoration\n// that gets dropped as a result of the mapping, passing the\n// spec of that decoration.\n\n\nDecorationSet.prototype.map = function map(mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) {\n return this;\n }\n\n return this.mapInner(mapping, doc, 0, 0, options || noSpec);\n};\n\nDecorationSet.prototype.mapInner = function mapInner(mapping, node, offset, oldOffset, options) {\n var newLocal;\n\n for (var i = 0; i < this.local.length; i++) {\n var mapped = this.local[i].map(mapping, offset, oldOffset);\n\n if (mapped && mapped.type.valid(node, mapped)) {\n (newLocal || (newLocal = [])).push(mapped);\n } else if (options.onRemove) {\n options.onRemove(this.local[i].spec);\n }\n }\n\n if (this.children.length) {\n return mapChildren(this.children, newLocal, mapping, node, offset, oldOffset, options);\n } else {\n return newLocal ? new DecorationSet(newLocal.sort(byPos)) : empty;\n }\n}; // :: (Node, [Decoration]) → DecorationSet\n// Add the given array of decorations to the ones in the set,\n// producing a new set. Needs access to the current document to\n// create the appropriate tree structure.\n\n\nDecorationSet.prototype.add = function add(doc, decorations) {\n if (!decorations.length) {\n return this;\n }\n\n if (this == empty) {\n return DecorationSet.create(doc, decorations);\n }\n\n return this.addInner(doc, decorations, 0);\n};\n\nDecorationSet.prototype.addInner = function addInner(doc, decorations, offset) {\n var this$1 = this;\n var children,\n childIndex = 0;\n doc.forEach(function (childNode, childOffset) {\n var baseOffset = childOffset + offset,\n found;\n\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) {\n return;\n }\n\n if (!children) {\n children = this$1.children.slice();\n }\n\n while (childIndex < children.length && children[childIndex] < childOffset) {\n childIndex += 3;\n }\n\n if (children[childIndex] == childOffset) {\n children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);\n } else {\n children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec));\n }\n\n childIndex += 3;\n });\n var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);\n}; // :: ([Decoration]) → DecorationSet\n// Create a new set that contains the decorations in this set, minus\n// the ones in the given array.\n\n\nDecorationSet.prototype.remove = function remove(decorations) {\n if (decorations.length == 0 || this == empty) {\n return this;\n }\n\n return this.removeInner(decorations, 0);\n};\n\nDecorationSet.prototype.removeInner = function removeInner(decorations, offset) {\n var children = this.children,\n local = this.local;\n\n for (var i = 0; i < children.length; i += 3) {\n var found = void 0,\n from = children[i] + offset,\n to = children[i + 1] + offset;\n\n for (var j = 0, span = void 0; j < decorations.length; j++) {\n if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null;\n (found || (found = [])).push(span);\n }\n }\n }\n\n if (!found) {\n continue;\n }\n\n if (children == this.children) {\n children = this.children.slice();\n }\n\n var removed = children[i + 2].removeInner(found, from + 1);\n\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n\n if (local.length) {\n for (var i$1 = 0, span$1 = void 0; i$1 < decorations.length; i$1++) {\n if (span$1 = decorations[i$1]) {\n for (var j$1 = 0; j$1 < local.length; j$1++) {\n if (local[j$1].type.eq(span$1.type)) {\n if (local == this.local) {\n local = this.local.slice();\n }\n\n local.splice(j$1--, 1);\n }\n }\n }\n }\n }\n\n if (children == this.children && local == this.local) {\n return this;\n }\n\n return local.length || children.length ? new DecorationSet(local, children) : empty;\n};\n\nDecorationSet.prototype.forChild = function forChild(offset, node) {\n if (this == empty) {\n return this;\n }\n\n if (node.isLeaf) {\n return DecorationSet.empty;\n }\n\n var child, local;\n\n for (var i = 0; i < this.children.length; i += 3) {\n if (this.children[i] >= offset) {\n if (this.children[i] == offset) {\n child = this.children[i + 2];\n }\n\n break;\n }\n }\n\n var start = offset + 1,\n end = start + node.content.size;\n\n for (var i$1 = 0; i$1 < this.local.length; i$1++) {\n var dec = this.local[i$1];\n\n if (dec.from < end && dec.to > start && dec.type instanceof InlineType) {\n var from = Math.max(start, dec.from) - start,\n to = Math.min(end, dec.to) - start;\n\n if (from < to) {\n (local || (local = [])).push(dec.copy(from, to));\n }\n }\n }\n\n if (local) {\n var localSet = new DecorationSet(local.sort(byPos));\n return child ? new DecorationGroup([localSet, child]) : localSet;\n }\n\n return child || empty;\n};\n\nDecorationSet.prototype.eq = function eq(other) {\n if (this == other) {\n return true;\n }\n\n if (!(other instanceof DecorationSet) || this.local.length != other.local.length || this.children.length != other.children.length) {\n return false;\n }\n\n for (var i = 0; i < this.local.length; i++) {\n if (!this.local[i].eq(other.local[i])) {\n return false;\n }\n }\n\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] != other.children[i$1] || this.children[i$1 + 1] != other.children[i$1 + 1] || !this.children[i$1 + 2].eq(other.children[i$1 + 2])) {\n return false;\n }\n }\n\n return true;\n};\n\nDecorationSet.prototype.locals = function locals(node) {\n return removeOverlap(this.localsInner(node));\n};\n\nDecorationSet.prototype.localsInner = function localsInner(node) {\n if (this == empty) {\n return none;\n }\n\n if (node.inlineContent || !this.local.some(InlineType.is)) {\n return this.local;\n }\n\n var result = [];\n\n for (var i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType)) {\n result.push(this.local[i]);\n }\n }\n\n return result;\n};\n\nvar empty = new DecorationSet(); // :: DecorationSet\n// The empty set of decorations.\n\nDecorationSet.empty = empty;\nDecorationSet.removeOverlap = removeOverlap; // :- An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\n\nvar DecorationGroup = function DecorationGroup(members) {\n this.members = members;\n};\n\nDecorationGroup.prototype.forChild = function forChild(offset, child) {\n if (child.isLeaf) {\n return DecorationSet.empty;\n }\n\n var found = [];\n\n for (var i = 0; i < this.members.length; i++) {\n var result = this.members[i].forChild(offset, child);\n\n if (result == empty) {\n continue;\n }\n\n if (result instanceof DecorationGroup) {\n found = found.concat(result.members);\n } else {\n found.push(result);\n }\n }\n\n return DecorationGroup.from(found);\n};\n\nDecorationGroup.prototype.eq = function eq(other) {\n if (!(other instanceof DecorationGroup) || other.members.length != this.members.length) {\n return false;\n }\n\n for (var i = 0; i < this.members.length; i++) {\n if (!this.members[i].eq(other.members[i])) {\n return false;\n }\n }\n\n return true;\n};\n\nDecorationGroup.prototype.locals = function locals(node) {\n var result,\n sorted = true;\n\n for (var i = 0; i < this.members.length; i++) {\n var locals = this.members[i].localsInner(node);\n\n if (!locals.length) {\n continue;\n }\n\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n\n for (var j = 0; j < locals.length; j++) {\n result.push(locals[j]);\n }\n }\n }\n\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none;\n}; // : ([DecorationSet]) → union\n// Create a group for the given array of decoration sets, or return\n// a single set when possible.\n\n\nDecorationGroup.from = function from(members) {\n switch (members.length) {\n case 0:\n return empty;\n\n case 1:\n return members[0];\n\n default:\n return new DecorationGroup(members);\n }\n};\n\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n var children = oldChildren.slice(); // Mark the children that are directly touched by changes, and\n // move those that are after the changes.\n\n var shift = function shift(oldStart, oldEnd, newStart, newEnd) {\n for (var i = 0; i < children.length; i += 3) {\n var end = children[i + 1],\n dSize = void 0;\n\n if (end == -1 || oldStart > end + oldOffset) {\n continue;\n }\n\n if (oldEnd >= children[i] + oldOffset) {\n children[i + 1] = -1;\n } else if (dSize = newEnd - newStart - (oldEnd - oldStart) + (oldOffset - offset)) {\n children[i] += dSize;\n children[i + 1] += dSize;\n }\n }\n };\n\n for (var i = 0; i < mapping.maps.length; i++) {\n mapping.maps[i].forEach(shift);\n } // Find the child nodes that still correspond to a single node,\n // recursively call mapInner on them and update their positions.\n\n\n var mustRebuild = false;\n\n for (var i$1 = 0; i$1 < children.length; i$1 += 3) {\n if (children[i$1 + 1] == -1) {\n // Touched nodes\n var from = mapping.map(children[i$1] + oldOffset),\n fromLocal = from - offset;\n\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue;\n } // Must read oldChildren because children was tagged with -1\n\n\n var to = mapping.map(oldChildren[i$1 + 1] + oldOffset, -1),\n toLocal = to - offset;\n var ref = node.content.findIndex(fromLocal);\n var index = ref.index;\n var childOffset = ref.offset;\n var childNode = node.maybeChild(index);\n\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n var mapped = children[i$1 + 2].mapInner(mapping, childNode, from + 1, children[i$1] + oldOffset + 1, options);\n\n if (mapped != empty) {\n children[i$1] = fromLocal;\n children[i$1 + 1] = toLocal;\n children[i$1 + 2] = mapped;\n } else {\n children[i$1 + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n }\n } // Remaining children must be collected and rebuilt into the appropriate structure\n\n\n if (mustRebuild) {\n var decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal || [], mapping, offset, oldOffset, options);\n var built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n\n for (var i$2 = 0; i$2 < children.length; i$2 += 3) {\n if (children[i$2 + 1] < 0) {\n children.splice(i$2, 3);\n i$2 -= 3;\n }\n }\n\n for (var i$3 = 0, j = 0; i$3 < built.children.length; i$3 += 3) {\n var from$1 = built.children[i$3];\n\n while (j < children.length && children[j] < from$1) {\n j += 3;\n }\n\n children.splice(j, 0, built.children[i$3], built.children[i$3 + 1], built.children[i$3 + 2]);\n }\n }\n\n return new DecorationSet(newLocal && newLocal.sort(byPos), children);\n}\n\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) {\n return spans;\n }\n\n var result = [];\n\n for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n\n return result;\n}\n\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n // Gather all decorations from the remaining marked children\n function gather(set, oldOffset) {\n for (var i = 0; i < set.local.length; i++) {\n var mapped = set.local[i].map(mapping, offset, oldOffset);\n\n if (mapped) {\n decorations.push(mapped);\n } else if (options.onRemove) {\n options.onRemove(set.local[i].spec);\n }\n }\n\n for (var i$1 = 0; i$1 < set.children.length; i$1 += 3) {\n gather(set.children[i$1 + 2], set.children[i$1] + oldOffset + 1);\n }\n }\n\n for (var i = 0; i < children.length; i += 3) {\n if (children[i + 1] == -1) {\n gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n }\n }\n\n return decorations;\n}\n\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) {\n return null;\n }\n\n var end = offset + node.nodeSize,\n found = null;\n\n for (var i = 0, span = void 0; i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n (found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n\n return found;\n}\n\nfunction withoutNulls(array) {\n var result = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i] != null) {\n result.push(array[i]);\n }\n }\n\n return result;\n} // : ([Decoration], Node, number) → DecorationSet\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtractet from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\n\n\nfunction buildTree(spans, node, offset, options) {\n var children = [],\n hasNulls = false;\n node.forEach(function (childNode, localStart) {\n var found = takeSpansForNode(spans, childNode, localStart + offset);\n\n if (found) {\n hasNulls = true;\n var subtree = buildTree(found, childNode, offset + localStart + 1, options);\n\n if (subtree != empty) {\n children.push(localStart, localStart + childNode.nodeSize, subtree);\n }\n }\n });\n var locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n\n for (var i = 0; i < locals.length; i++) {\n if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) {\n options.onRemove(locals[i].spec);\n }\n\n locals.splice(i--, 1);\n }\n }\n\n return locals.length || children.length ? new DecorationSet(locals, children) : empty;\n} // : (Decoration, Decoration) → number\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\n\n\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to;\n} // : ([Decoration]) → [Decoration]\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\n\n\nfunction removeOverlap(spans) {\n var working = spans;\n\n for (var i = 0; i < working.length - 1; i++) {\n var span = working[i];\n\n if (span.from != span.to) {\n for (var j = i + 1; j < working.length; j++) {\n var next = working[j];\n\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) {\n working = spans.slice();\n } // Followed by a partially overlapping larger span. Split that\n // span.\n\n\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n\n continue;\n } else {\n if (next.from < span.to) {\n if (working == spans) {\n working = spans.slice();\n } // The end of this one overlaps with a subsequent span. Split\n // this one.\n\n\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n\n break;\n }\n }\n }\n }\n\n return working;\n}\n\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) {\n i++;\n }\n\n array.splice(i, 0, deco);\n} // : (EditorView) → union\n// Get the decorations associated with the current props of a view.\n\n\nfunction viewDecorations(view) {\n var found = [];\n view.someProp(\"decorations\", function (f) {\n var result = f(view.state);\n\n if (result && result != empty) {\n found.push(result);\n }\n });\n\n if (view.cursorWrapper) {\n found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco]));\n }\n\n return DecorationGroup.from(found);\n} // ::- An editor view manages the DOM structure that represents an\n// editable document. Its state and behavior are determined by its\n// [props](#view.DirectEditorProps).\n\n\nvar EditorView = function EditorView(place, props) {\n this._props = props; // :: EditorState\n // The view's current [state](#state.EditorState).\n\n this.state = props.state;\n this.dispatch = this.dispatch.bind(this);\n this._root = null;\n this.focused = false; // :: dom.Element\n // An editable DOM node containing the document. (You probably\n // should not directly interfere with its content.)\n\n this.dom = place && place.mount || document.createElement(\"div\");\n\n if (place) {\n if (place.appendChild) {\n place.appendChild(this.dom);\n } else if (place.apply) {\n place(this.dom);\n } else if (place.mount) {\n this.mounted = true;\n }\n } // :: bool\n // Indicates whether the editor is currently [editable](#view.EditorProps.editable).\n\n\n this.editable = getEditable(this);\n this.markCursor = null;\n this.cursorWrapper = null;\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n this.lastSelectedViewDesc = null; // :: ?{slice: Slice, move: bool}\n // When editor content is being dragged, this object contains\n // information about the dragged slice and whether it is being\n // copied or moved. At any other time, it is null.\n\n this.dragging = null;\n initInput(this);\n this.pluginViews = [];\n this.updatePluginViews();\n};\n\nvar prototypeAccessors$2 = {\n props: {\n configurable: true\n },\n root: {\n configurable: true\n }\n}; // composing:: boolean\n// Holds `true` when a\n// [composition](https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide)\n// is active.\n// :: DirectEditorProps\n// The view's current [props](#view.EditorProps).\n\nprototypeAccessors$2.props.get = function () {\n if (this._props.state != this.state) {\n var prev = this._props;\n this._props = {};\n\n for (var name in prev) {\n this._props[name] = prev[name];\n }\n\n this._props.state = this.state;\n }\n\n return this._props;\n}; // :: (DirectEditorProps)\n// Update the view's props. Will immediately cause an update to\n// the DOM.\n\n\nEditorView.prototype.update = function update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) {\n ensureListeners(this);\n }\n\n this._props = props;\n this.updateStateInner(props.state, true);\n}; // :: (DirectEditorProps)\n// Update the view by updating existing props object with the object\n// given as argument. Equivalent to `view.update(Object.assign({},\n// view.props, props))`.\n\n\nEditorView.prototype.setProps = function setProps(props) {\n var updated = {};\n\n for (var name in this._props) {\n updated[name] = this._props[name];\n }\n\n updated.state = this.state;\n\n for (var name$1 in props) {\n updated[name$1] = props[name$1];\n }\n\n this.update(updated);\n}; // :: (EditorState)\n// Update the editor's `state` prop, without touching any of the\n// other props.\n\n\nEditorView.prototype.updateState = function updateState(state) {\n this.updateStateInner(state, this.state.plugins != state.plugins);\n};\n\nEditorView.prototype.updateStateInner = function updateStateInner(state, reconfigured) {\n var this$1 = this;\n var prev = this.state,\n redraw = false;\n this.state = state;\n\n if (reconfigured) {\n var nodeViews = buildNodeViews(this);\n\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n\n ensureListeners(this);\n }\n\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n var innerDeco = viewDecorations(this),\n outerDeco = computeDocDeco(this);\n var scroll = reconfigured ? \"reset\" : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n var updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n var updateSel = updateDoc || !state.selection.eq(prev.selection);\n var oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n\n if (updateSel) {\n this.domObserver.stop(); // Work around an issue in Chrome, IE, and Edge where changing\n // the DOM around an active selection puts it into a broken\n // state where the thing the user sees differs from the\n // selection reported by the Selection object (#710, #973,\n // #1011, #1013).\n\n var forceSelUpdate = updateDoc && (result.ie || result.chrome) && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n\n if (updateDoc) {\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n } // Work around for an issue where an update arriving right between\n // a DOM selection change and the \"selectionchange\" event for it\n // can cause a spurious DOM selection update, disrupting mouse\n // drag selection.\n\n\n if (forceSelUpdate || !(this.mouseDown && this.domObserver.currentSelection.eq(this.root.getSelection()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n\n this.domObserver.start();\n }\n\n this.updatePluginViews(prev);\n\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n var startDOM = this.root.getSelection().focusNode;\n if (this.someProp(\"handleScrollToSelection\", function (f) {\n return f(this$1);\n })) ; // Handled\n else if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n scrollRectIntoView(this, this.docView.domAfterPos(state.selection.from).getBoundingClientRect(), startDOM);\n } else {\n scrollRectIntoView(this, this.coordsAtPos(state.selection.head), startDOM);\n }\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n};\n\nEditorView.prototype.destroyPluginViews = function destroyPluginViews() {\n var view;\n\n while (view = this.pluginViews.pop()) {\n if (view.destroy) {\n view.destroy();\n }\n }\n};\n\nEditorView.prototype.updatePluginViews = function updatePluginViews(prevState) {\n if (!prevState || prevState.plugins != this.state.plugins) {\n this.destroyPluginViews();\n\n for (var i = 0; i < this.state.plugins.length; i++) {\n var plugin = this.state.plugins[i];\n\n if (plugin.spec.view) {\n this.pluginViews.push(plugin.spec.view(this));\n }\n }\n } else {\n for (var i$1 = 0; i$1 < this.pluginViews.length; i$1++) {\n var pluginView = this.pluginViews[i$1];\n\n if (pluginView.update) {\n pluginView.update(this, prevState);\n }\n }\n }\n}; // :: (string, ?(prop: *) → *) → *\n// Goes over the values of a prop, first those provided directly,\n// then those from plugins (in order), and calls `f` every time a\n// non-undefined value is found. When `f` returns a truthy value,\n// that is immediately returned. When `f` isn't provided, it is\n// treated as the identity function (the prop value is returned\n// directly).\n\n\nEditorView.prototype.someProp = function someProp(propName, f) {\n var prop = this._props && this._props[propName],\n value;\n\n if (prop != null && (value = f ? f(prop) : prop)) {\n return value;\n }\n\n var plugins = this.state.plugins;\n\n if (plugins) {\n for (var i = 0; i < plugins.length; i++) {\n var prop$1 = plugins[i].props[propName];\n\n if (prop$1 != null && (value = f ? f(prop$1) : prop$1)) {\n return value;\n }\n }\n }\n}; // :: () → bool\n// Query whether the view has focus.\n\n\nEditorView.prototype.hasFocus = function hasFocus() {\n return this.root.activeElement == this.dom;\n}; // :: ()\n// Focus the editor.\n\n\nEditorView.prototype.focus = function focus() {\n this.domObserver.stop();\n\n if (this.editable) {\n focusPreventScroll(this.dom);\n }\n\n selectionToDOM(this);\n this.domObserver.start();\n}; // :: union\n// Get the document root in which the editor exists. This will\n// usually be the top-level `document`, but might be a [shadow\n// DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n// root if the editor is inside one.\n\n\nprototypeAccessors$2.root.get = function () {\n var cached = this._root;\n\n if (cached == null) {\n for (var search = this.dom.parentNode; search; search = search.parentNode) {\n if (search.nodeType == 9 || search.nodeType == 11 && search.host) {\n if (!search.getSelection) {\n Object.getPrototypeOf(search).getSelection = function () {\n return document.getSelection();\n };\n }\n\n return this._root = search;\n }\n }\n }\n\n return cached || document;\n}; // :: ({left: number, top: number}) → ?{pos: number, inside: number}\n// Given a pair of viewport coordinates, return the document\n// position that corresponds to them. May return null if the given\n// coordinates aren't inside of the editor. When an object is\n// returned, its `pos` property is the position nearest to the\n// coordinates, and its `inside` property holds the position of the\n// inner node that the position falls inside of, or -1 if it is at\n// the top level, not in any node.\n\n\nEditorView.prototype.posAtCoords = function posAtCoords$1(coords) {\n return posAtCoords(this, coords);\n}; // :: (number) → {left: number, right: number, top: number, bottom: number}\n// Returns the viewport rectangle at a given document position. `left`\n// and `right` will be the same number, as this returns a flat\n// cursor-ish rectangle.\n\n\nEditorView.prototype.coordsAtPos = function coordsAtPos$1(pos) {\n return coordsAtPos(this, pos);\n}; // :: (number) → {node: dom.Node, offset: number}\n// Find the DOM position that corresponds to the given document\n// position. Note that you should **not** mutate the editor's\n// internal DOM, only inspect it (and even that is usually not\n// necessary).\n\n\nEditorView.prototype.domAtPos = function domAtPos(pos) {\n return this.docView.domFromPos(pos);\n}; // :: (number) → ?dom.Node\n// Find the DOM node that represents the document node after the\n// given position. May return `null` when the position doesn't point\n// in front of a node or if the node is inside an opaque node view.\n//\n// This is intended to be able to call things like\n// `getBoundingClientRect` on that DOM node. Do **not** mutate the\n// editor DOM directly, or add styling this way, since that will be\n// immediately overriden by the editor as it redraws the node.\n\n\nEditorView.prototype.nodeDOM = function nodeDOM(pos) {\n var desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null;\n}; // :: (dom.Node, number, ?number) → number\n// Find the document position that corresponds to a given DOM\n// position. (Whenever possible, it is preferable to inspect the\n// document structure directly, rather than poking around in the\n// DOM, but sometimes—for example when interpreting an event\n// target—you don't have a choice.)\n//\n// The `bias` parameter can be used to influence which side of a DOM\n// node to use when the position is inside a leaf node.\n\n\nEditorView.prototype.posAtDOM = function posAtDOM(node, offset, bias) {\n if (bias === void 0) bias = -1;\n var pos = this.docView.posFromDOM(node, offset, bias);\n\n if (pos == null) {\n throw new RangeError(\"DOM position not inside the editor\");\n }\n\n return pos;\n}; // :: (union<\"up\", \"down\", \"left\", \"right\", \"forward\", \"backward\">, ?EditorState) → bool\n// Find out whether the selection is at the end of a textblock when\n// moving in a given direction. When, for example, given `\"left\"`,\n// it will return true if moving left from the current cursor\n// position would leave that position's parent textblock. Will apply\n// to the view's current state by default, but it is possible to\n// pass a different state.\n\n\nEditorView.prototype.endOfTextblock = function endOfTextblock$1(dir, state) {\n return endOfTextblock(this, state || this.state, dir);\n}; // :: ()\n// Removes the editor from the DOM and destroys all [node\n// views](#view.NodeView).\n\n\nEditorView.prototype.destroy = function destroy() {\n if (!this.docView) {\n return;\n }\n\n destroyInput(this);\n this.destroyPluginViews();\n\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n\n this.docView.destroy();\n this.docView = null;\n}; // Used for testing.\n\n\nEditorView.prototype.dispatchEvent = function dispatchEvent$1(event) {\n return dispatchEvent(this, event);\n}; // :: (Transaction)\n// Dispatch a transaction. Will call\n// [`dispatchTransaction`](#view.DirectEditorProps.dispatchTransaction)\n// when given, and otherwise defaults to applying the transaction to\n// the current state and calling\n// [`updateState`](#view.EditorView.updateState) with the result.\n// This method is bound to the view instance, so that it can be\n// easily passed around.\n\n\nEditorView.prototype.dispatch = function dispatch(tr) {\n var dispatchTransaction = this._props.dispatchTransaction;\n\n if (dispatchTransaction) {\n dispatchTransaction.call(this, tr);\n } else {\n this.updateState(this.state.apply(tr));\n }\n};\n\nObject.defineProperties(EditorView.prototype, prototypeAccessors$2);\n\nfunction computeDocDeco(view) {\n var attrs = Object.create(null);\n attrs[\"class\"] = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n view.someProp(\"attributes\", function (value) {\n if (typeof value == \"function\") {\n value = value(view.state);\n }\n\n if (value) {\n for (var attr in value) {\n if (attr == \"class\") {\n attrs[\"class\"] += \" \" + value[attr];\n } else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\") {\n attrs[attr] = String(value[attr]);\n }\n }\n }\n });\n return [Decoration.node(0, view.state.doc.content.size, attrs)];\n}\n\nfunction updateCursorWrapper(view) {\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var visible = ref.visible;\n\n if (view.markCursor) {\n var dom = document.createElement(\"img\");\n dom.setAttribute(\"mark-placeholder\", \"true\");\n view.cursorWrapper = {\n dom: dom,\n deco: Decoration.widget($head.pos, dom, {\n raw: true,\n marks: view.markCursor\n })\n };\n } else if (visible || $head.pos != $anchor.pos) {\n view.cursorWrapper = null;\n } else {\n var dom$1;\n\n if (!view.cursorWrapper || view.cursorWrapper.dom.childNodes.length) {\n dom$1 = document.createElement(\"div\");\n dom$1.style.position = \"absolute\";\n dom$1.style.left = \"-100000px\";\n } else if (view.cursorWrapper.deco.pos != $head.pos) {\n dom$1 = view.cursorWrapper.dom;\n }\n\n if (dom$1) {\n view.cursorWrapper = {\n dom: dom$1,\n deco: Decoration.widget($head.pos, dom$1, {\n raw: true\n })\n };\n }\n }\n}\n\nfunction getEditable(view) {\n return !view.someProp(\"editable\", function (value) {\n return value(view.state) === false;\n });\n}\n\nfunction selectionContextChanged(sel1, sel2) {\n var depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.node(depth) != sel2.$anchor.node(depth);\n}\n\nfunction buildNodeViews(view) {\n var result = {};\n view.someProp(\"nodeViews\", function (obj) {\n for (var prop in obj) {\n if (!Object.prototype.hasOwnProperty.call(result, prop)) {\n result[prop] = obj[prop];\n }\n }\n });\n return result;\n}\n\nfunction changedNodeViews(a, b) {\n var nA = 0,\n nB = 0;\n\n for (var prop in a) {\n if (a[prop] != b[prop]) {\n return true;\n }\n\n nA++;\n }\n\n for (var _ in b) {\n nB++;\n }\n\n return nA != nB;\n} // EditorProps:: interface\n//\n// Props are configuration values that can be passed to an editor view\n// or included in a plugin. This interface lists the supported props.\n//\n// The various event-handling functions may all return `true` to\n// indicate that they handled the given event. The view will then take\n// care to call `preventDefault` on the event, except with\n// `handleDOMEvents`, where the handler itself is responsible for that.\n//\n// How a prop is resolved depends on the prop. Handler functions are\n// called one at a time, starting with the base props and then\n// searching through the plugins (in order of appearance) until one of\n// them returns true. For some props, the first plugin that yields a\n// value gets precedence.\n//\n// handleDOMEvents:: ?Object<(view: EditorView, event: dom.Event) → bool>\n// Can be an object mapping DOM event type names to functions that\n// handle them. Such functions will be called before any handling\n// ProseMirror does of events fired on the editable DOM element.\n// Contrary to the other event handling props, when returning true\n// from such a function, you are responsible for calling\n// `preventDefault` yourself (or not, if you want to allow the\n// default behavior).\n//\n// handleKeyDown:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Called when the editor receives a `keydown` event.\n//\n// handleKeyPress:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Handler for `keypress` events.\n//\n// handleTextInput:: ?(view: EditorView, from: number, to: number, text: string) → bool\n// Whenever the user directly input text, this handler is called\n// before the input is applied. If it returns `true`, the default\n// behavior of actually inserting the text is suppressed.\n//\n// handleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a click, from the inside out. The\n// `direct` flag will be true for the inner node.\n//\n// handleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is clicked, after `handleClickOn` handlers\n// have been called.\n//\n// handleDoubleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a double click.\n//\n// handleDoubleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is double-clicked, after `handleDoubleClickOn`.\n//\n// handleTripleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a triple click.\n//\n// handleTripleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is triple-clicked, after `handleTripleClickOn`.\n//\n// handlePaste:: ?(view: EditorView, event: dom.Event, slice: Slice) → bool\n// Can be used to override the behavior of pasting. `slice` is the\n// pasted content parsed by the editor, but you can directly access\n// the event to get at the raw content.\n//\n// handleDrop:: ?(view: EditorView, event: dom.Event, slice: Slice, moved: bool) → bool\n// Called when something is dropped on the editor. `moved` will be\n// true if this drop moves from the current selection (which should\n// thus be deleted).\n//\n// handleScrollToSelection:: ?(view: EditorView) → bool\n// Called when the view, after updating its state, tries to scroll\n// the selection into view. A handler function may return false to\n// indicate that it did not handle the scrolling and further\n// handlers or the default behavior should be tried.\n//\n// createSelectionBetween:: ?(view: EditorView, anchor: ResolvedPos, head: ResolvedPos) → ?Selection\n// Can be used to override the way a selection is created when\n// reading a DOM selection between the given anchor and head.\n//\n// domParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading editor changes\n// from the DOM. Defaults to calling\n// [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) on the\n// editor's schema.\n//\n// transformPastedHTML:: ?(html: string) → string\n// Can be used to transform pasted HTML text, _before_ it is parsed,\n// for example to clean it up.\n//\n// clipboardParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading content from\n// the clipboard. When not given, the value of the\n// [`domParser`](#view.EditorProps.domParser) prop is used.\n//\n// transformPastedText:: ?(text: string) → string\n// Transform pasted plain text.\n//\n// clipboardTextParser:: ?(text: string, $context: ResolvedPos) → Slice\n// A function to parse text from the clipboard into a document\n// slice. Called after\n// [`transformPastedText`](#view.EditorProps.transformPastedText).\n// The default behavior is to split the text into lines, wrap them\n// in `

          ` tags, and call\n// [`clipboardParser`](#view.EditorProps.clipboardParser) on it.\n//\n// transformPasted:: ?(Slice) → Slice\n// Can be used to transform pasted content before it is applied to\n// the document.\n//\n// nodeViews:: ?Object<(node: Node, view: EditorView, getPos: () → number, decorations: [Decoration]) → NodeView>\n// Allows you to pass custom rendering and behavior logic for nodes\n// and marks. Should map node and mark names to constructor\n// functions that produce a [`NodeView`](#view.NodeView) object\n// implementing the node's display behavior. For nodes, the third\n// argument `getPos` is a function that can be called to get the\n// node's current position, which can be useful when creating\n// transactions to update it. For marks, the third argument is a\n// boolean that indicates whether the mark's content is inline.\n//\n// `decorations` is an array of node or inline decorations that are\n// active around the node. They are automatically drawn in the\n// normal way, and you will usually just want to ignore this, but\n// they can also be used as a way to provide context information to\n// the node view without adding it to the document itself.\n//\n// clipboardSerializer:: ?DOMSerializer\n// The DOM serializer to use when putting content onto the\n// clipboard. If not given, the result of\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)\n// will be used.\n//\n// clipboardTextSerializer:: ?(Slice) → string\n// A function that will be called to get the text for the current\n// selection when copying text to the clipboard. By default, the\n// editor will use [`textBetween`](#model.Node.textBetween) on the\n// selected range.\n//\n// decorations:: ?(state: EditorState) → ?DecorationSet\n// A set of [document decorations](#view.Decoration) to show in the\n// view.\n//\n// editable:: ?(state: EditorState) → bool\n// When this returns false, the content of the view is not directly\n// editable.\n//\n// attributes:: ?union, (EditorState) → ?Object>\n// Control the DOM attributes of the editable element. May be either\n// an object or a function going from an editor state to an object.\n// By default, the element will get a class `\"ProseMirror\"`, and\n// will have its `contentEditable` attribute determined by the\n// [`editable` prop](#view.EditorProps.editable). Additional classes\n// provided here will be added to the class. For other attributes,\n// the value provided first (as in\n// [`someProp`](#view.EditorView.someProp)) will be used.\n//\n// scrollThreshold:: ?union\n// Determines the distance (in pixels) between the cursor and the\n// end of the visible viewport at which point, when scrolling the\n// cursor into view, scrolling takes place. Defaults to 0.\n//\n// scrollMargin:: ?union\n// Determines the extra space (in pixels) that is left above or\n// below the cursor when it is scrolled into view. Defaults to 5.\n// DirectEditorProps:: interface extends EditorProps\n//\n// The props object given directly to the editor view supports two\n// fields that can't be used in plugins:\n//\n// state:: EditorState\n// The current state of the editor.\n//\n// dispatchTransaction:: ?(tr: Transaction)\n// The callback over which to send transactions (state updates)\n// produced by the view. If you specify this, you probably want to\n// make sure this ends up calling the view's\n// [`updateState`](#view.EditorView.updateState) method with a new\n// state that has the transaction\n// [applied](#state.EditorState.apply). The callback will be bound to have\n// the view instance as its `this` binding.\n\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-view/dist/index.es.js?"); /***/ }), /***/ "./node_modules/rope-sequence/dist/index.es.js": /*!*****************************************************!*\ !*** ./node_modules/rope-sequence/dist/index.es.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nvar GOOD_LEAF_SIZE = 200;\n\n// :: class A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\nvar RopeSequence = function RopeSequence () {};\n\nRopeSequence.prototype.append = function append (other) {\n if (!other.length) { return this }\n other = RopeSequence.from(other);\n\n return (!this.length && other) ||\n (other.length < GOOD_LEAF_SIZE && this.leafAppend(other)) ||\n (this.length < GOOD_LEAF_SIZE && other.leafPrepend(this)) ||\n this.appendInner(other)\n};\n\n// :: (union<[T], RopeSequence>) → RopeSequence\n// Prepend an array or other rope to this one, returning a new rope.\nRopeSequence.prototype.prepend = function prepend (other) {\n if (!other.length) { return this }\n return RopeSequence.from(other).append(this)\n};\n\nRopeSequence.prototype.appendInner = function appendInner (other) {\n return new Append(this, other)\n};\n\n// :: (?number, ?number) → RopeSequence\n// Create a rope repesenting a sub-sequence of this rope.\nRopeSequence.prototype.slice = function slice (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from >= to) { return RopeSequence.empty }\n return this.sliceInner(Math.max(0, from), Math.min(this.length, to))\n};\n\n// :: (number) → T\n// Retrieve the element at the given position from this rope.\nRopeSequence.prototype.get = function get (i) {\n if (i < 0 || i >= this.length) { return undefined }\n return this.getInner(i)\n};\n\n// :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\nRopeSequence.prototype.forEach = function forEach (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from <= to)\n { this.forEachInner(f, from, to, 0); }\n else\n { this.forEachInvertedInner(f, from, to, 0); }\n};\n\n// :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\nRopeSequence.prototype.map = function map (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n var result = [];\n this.forEach(function (elt, i) { return result.push(f(elt, i)); }, from, to);\n return result\n};\n\n// :: (?union<[T], RopeSequence>) → RopeSequence\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\nRopeSequence.from = function from (values) {\n if (values instanceof RopeSequence) { return values }\n return values && values.length ? new Leaf(values) : RopeSequence.empty\n};\n\nvar Leaf = /*@__PURE__*/(function (RopeSequence) {\n function Leaf(values) {\n RopeSequence.call(this);\n this.values = values;\n }\n\n if ( RopeSequence ) Leaf.__proto__ = RopeSequence;\n Leaf.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Leaf.prototype.constructor = Leaf;\n\n var prototypeAccessors = { length: { configurable: true },depth: { configurable: true } };\n\n Leaf.prototype.flatten = function flatten () {\n return this.values\n };\n\n Leaf.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n return new Leaf(this.values.slice(from, to))\n };\n\n Leaf.prototype.getInner = function getInner (i) {\n return this.values[i]\n };\n\n Leaf.prototype.forEachInner = function forEachInner (f, from, to, start) {\n for (var i = from; i < to; i++)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n for (var i = from - 1; i >= to; i--)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.leafAppend = function leafAppend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(this.values.concat(other.flatten())) }\n };\n\n Leaf.prototype.leafPrepend = function leafPrepend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(other.flatten().concat(this.values)) }\n };\n\n prototypeAccessors.length.get = function () { return this.values.length };\n\n prototypeAccessors.depth.get = function () { return 0 };\n\n Object.defineProperties( Leaf.prototype, prototypeAccessors );\n\n return Leaf;\n}(RopeSequence));\n\n// :: RopeSequence\n// The empty rope sequence.\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/(function (RopeSequence) {\n function Append(left, right) {\n RopeSequence.call(this);\n this.left = left;\n this.right = right;\n this.length = left.length + right.length;\n this.depth = Math.max(left.depth, right.depth) + 1;\n }\n\n if ( RopeSequence ) Append.__proto__ = RopeSequence;\n Append.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Append.prototype.constructor = Append;\n\n Append.prototype.flatten = function flatten () {\n return this.left.flatten().concat(this.right.flatten())\n };\n\n Append.prototype.getInner = function getInner (i) {\n return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length)\n };\n\n Append.prototype.forEachInner = function forEachInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from < leftLen &&\n this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false)\n { return false }\n if (to > leftLen &&\n this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false)\n { return false }\n };\n\n Append.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from > leftLen &&\n this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false)\n { return false }\n if (to < leftLen &&\n this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false)\n { return false }\n };\n\n Append.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n var leftLen = this.left.length;\n if (to <= leftLen) { return this.left.slice(from, to) }\n if (from >= leftLen) { return this.right.slice(from - leftLen, to - leftLen) }\n return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen))\n };\n\n Append.prototype.leafAppend = function leafAppend (other) {\n var inner = this.right.leafAppend(other);\n if (inner) { return new Append(this.left, inner) }\n };\n\n Append.prototype.leafPrepend = function leafPrepend (other) {\n var inner = this.left.leafPrepend(other);\n if (inner) { return new Append(inner, this.right) }\n };\n\n Append.prototype.appendInner = function appendInner (other) {\n if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1)\n { return new Append(this.left, new Append(this.right, other)) }\n return new Append(this, other)\n };\n\n return Append;\n}(RopeSequence));\n\nvar ropeSequence = RopeSequence;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ropeSequence);\n\n\n//# sourceURL=webpack:///./node_modules/rope-sequence/dist/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nvar GOOD_LEAF_SIZE = 200; // :: class A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\n\nvar RopeSequence = function RopeSequence() {};\n\nRopeSequence.prototype.append = function append(other) {\n if (!other.length) {\n return this;\n }\n\n other = RopeSequence.from(other);\n return !this.length && other || other.length < GOOD_LEAF_SIZE && this.leafAppend(other) || this.length < GOOD_LEAF_SIZE && other.leafPrepend(this) || this.appendInner(other);\n}; // :: (union<[T], RopeSequence>) → RopeSequence\n// Prepend an array or other rope to this one, returning a new rope.\n\n\nRopeSequence.prototype.prepend = function prepend(other) {\n if (!other.length) {\n return this;\n }\n\n return RopeSequence.from(other).append(this);\n};\n\nRopeSequence.prototype.appendInner = function appendInner(other) {\n return new Append(this, other);\n}; // :: (?number, ?number) → RopeSequence\n// Create a rope repesenting a sub-sequence of this rope.\n\n\nRopeSequence.prototype.slice = function slice(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n\n if (from >= to) {\n return RopeSequence.empty;\n }\n\n return this.sliceInner(Math.max(0, from), Math.min(this.length, to));\n}; // :: (number) → T\n// Retrieve the element at the given position from this rope.\n\n\nRopeSequence.prototype.get = function get(i) {\n if (i < 0 || i >= this.length) {\n return undefined;\n }\n\n return this.getInner(i);\n}; // :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\n\n\nRopeSequence.prototype.forEach = function forEach(f, from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n\n if (from <= to) {\n this.forEachInner(f, from, to, 0);\n } else {\n this.forEachInvertedInner(f, from, to, 0);\n }\n}; // :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\n\n\nRopeSequence.prototype.map = function map(f, from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n var result = [];\n this.forEach(function (elt, i) {\n return result.push(f(elt, i));\n }, from, to);\n return result;\n}; // :: (?union<[T], RopeSequence>) → RopeSequence\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\n\n\nRopeSequence.from = function from(values) {\n if (values instanceof RopeSequence) {\n return values;\n }\n\n return values && values.length ? new Leaf(values) : RopeSequence.empty;\n};\n\nvar Leaf = /*@__PURE__*/function (RopeSequence) {\n function Leaf(values) {\n RopeSequence.call(this);\n this.values = values;\n }\n\n if (RopeSequence) Leaf.__proto__ = RopeSequence;\n Leaf.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n Leaf.prototype.constructor = Leaf;\n var prototypeAccessors = {\n length: {\n configurable: true\n },\n depth: {\n configurable: true\n }\n };\n\n Leaf.prototype.flatten = function flatten() {\n return this.values;\n };\n\n Leaf.prototype.sliceInner = function sliceInner(from, to) {\n if (from == 0 && to == this.length) {\n return this;\n }\n\n return new Leaf(this.values.slice(from, to));\n };\n\n Leaf.prototype.getInner = function getInner(i) {\n return this.values[i];\n };\n\n Leaf.prototype.forEachInner = function forEachInner(f, from, to, start) {\n for (var i = from; i < to; i++) {\n if (f(this.values[i], start + i) === false) {\n return false;\n }\n }\n };\n\n Leaf.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n for (var i = from - 1; i >= to; i--) {\n if (f(this.values[i], start + i) === false) {\n return false;\n }\n }\n };\n\n Leaf.prototype.leafAppend = function leafAppend(other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE) {\n return new Leaf(this.values.concat(other.flatten()));\n }\n };\n\n Leaf.prototype.leafPrepend = function leafPrepend(other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE) {\n return new Leaf(other.flatten().concat(this.values));\n }\n };\n\n prototypeAccessors.length.get = function () {\n return this.values.length;\n };\n\n prototypeAccessors.depth.get = function () {\n return 0;\n };\n\n Object.defineProperties(Leaf.prototype, prototypeAccessors);\n return Leaf;\n}(RopeSequence); // :: RopeSequence\n// The empty rope sequence.\n\n\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/function (RopeSequence) {\n function Append(left, right) {\n RopeSequence.call(this);\n this.left = left;\n this.right = right;\n this.length = left.length + right.length;\n this.depth = Math.max(left.depth, right.depth) + 1;\n }\n\n if (RopeSequence) Append.__proto__ = RopeSequence;\n Append.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n Append.prototype.constructor = Append;\n\n Append.prototype.flatten = function flatten() {\n return this.left.flatten().concat(this.right.flatten());\n };\n\n Append.prototype.getInner = function getInner(i) {\n return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);\n };\n\n Append.prototype.forEachInner = function forEachInner(f, from, to, start) {\n var leftLen = this.left.length;\n\n if (from < leftLen && this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false) {\n return false;\n }\n\n if (to > leftLen && this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false) {\n return false;\n }\n };\n\n Append.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n var leftLen = this.left.length;\n\n if (from > leftLen && this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false) {\n return false;\n }\n\n if (to < leftLen && this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false) {\n return false;\n }\n };\n\n Append.prototype.sliceInner = function sliceInner(from, to) {\n if (from == 0 && to == this.length) {\n return this;\n }\n\n var leftLen = this.left.length;\n\n if (to <= leftLen) {\n return this.left.slice(from, to);\n }\n\n if (from >= leftLen) {\n return this.right.slice(from - leftLen, to - leftLen);\n }\n\n return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen));\n };\n\n Append.prototype.leafAppend = function leafAppend(other) {\n var inner = this.right.leafAppend(other);\n\n if (inner) {\n return new Append(this.left, inner);\n }\n };\n\n Append.prototype.leafPrepend = function leafPrepend(other) {\n var inner = this.left.leafPrepend(other);\n\n if (inner) {\n return new Append(inner, this.right);\n }\n };\n\n Append.prototype.appendInner = function appendInner(other) {\n if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1) {\n return new Append(this.left, new Append(this.right, other));\n }\n\n return new Append(this, other);\n };\n\n return Append;\n}(RopeSequence);\n\nvar ropeSequence = RopeSequence;\n/* harmony default export */ __webpack_exports__[\"default\"] = (ropeSequence);\n\n//# sourceURL=webpack:///./node_modules/rope-sequence/dist/index.es.js?"); /***/ }), /***/ "./node_modules/uc.micro/categories/Cc/regex.js": /*!******************************************************!*\ !*** ./node_modules/uc.micro/categories/Cc/regex.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports=/[\\0-\\x1F\\x7F-\\x9F]/\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cc/regex.js?"); +eval("module.exports = /[\\0-\\x1F\\x7F-\\x9F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cc/regex.js?"); /***/ }), /***/ "./node_modules/uc.micro/categories/Cf/regex.js": /*!******************************************************!*\ !*** ./node_modules/uc.micro/categories/Cf/regex.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports=/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cf/regex.js?"); +eval("module.exports = /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cf/regex.js?"); /***/ }), /***/ "./node_modules/uc.micro/categories/P/regex.js": /*!*****************************************************!*\ !*** ./node_modules/uc.micro/categories/P/regex.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports=/[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/P/regex.js?"); +eval("module.exports = /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/P/regex.js?"); /***/ }), /***/ "./node_modules/uc.micro/categories/Z/regex.js": /*!*****************************************************!*\ !*** ./node_modules/uc.micro/categories/Z/regex.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Z/regex.js?"); +eval("module.exports = /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Z/regex.js?"); /***/ }), /***/ "./node_modules/uc.micro/index.js": /*!****************************************!*\ !*** ./node_modules/uc.micro/index.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nexports.Any = __webpack_require__(/*! ./properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\");\nexports.Cc = __webpack_require__(/*! ./categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\");\nexports.Cf = __webpack_require__(/*! ./categories/Cf/regex */ \"./node_modules/uc.micro/categories/Cf/regex.js\");\nexports.P = __webpack_require__(/*! ./categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\");\nexports.Z = __webpack_require__(/*! ./categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\");\n\n\n//# sourceURL=webpack:///./node_modules/uc.micro/index.js?"); +eval("\n\nexports.Any = __webpack_require__(/*! ./properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\");\nexports.Cc = __webpack_require__(/*! ./categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\");\nexports.Cf = __webpack_require__(/*! ./categories/Cf/regex */ \"./node_modules/uc.micro/categories/Cf/regex.js\");\nexports.P = __webpack_require__(/*! ./categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\");\nexports.Z = __webpack_require__(/*! ./categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\");\n\n//# sourceURL=webpack:///./node_modules/uc.micro/index.js?"); /***/ }), /***/ "./node_modules/uc.micro/properties/Any/regex.js": /*!*******************************************************!*\ !*** ./node_modules/uc.micro/properties/Any/regex.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/\n\n//# sourceURL=webpack:///./node_modules/uc.micro/properties/Any/regex.js?"); +eval("module.exports = /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/properties/Any/regex.js?"); /***/ }), /***/ "./node_modules/w3c-keyname/index.es.js": /*!**********************************************!*\ !*** ./node_modules/w3c-keyname/index.es.js ***! \**********************************************/ -/*! exports provided: default, base, keyName, shift */ +/*! exports provided: base, shift, keyName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"base\", function() { return base_1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyName\", function() { return keyName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shift\", function() { return shift_1; });\nvar base = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 10: \"Enter\",\n 12: \"NumLock\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 44: \"PrintScreen\",\n 45: \"Insert\",\n 46: \"Delete\",\n 59: \";\",\n 61: \"=\",\n 91: \"Meta\",\n 92: \"Meta\",\n 106: \"*\",\n 107: \"+\",\n 108: \",\",\n 109: \"-\",\n 110: \".\",\n 111: \"/\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 160: \"Shift\",\n 161: \"Shift\",\n 162: \"Control\",\n 163: \"Control\",\n 164: \"Alt\",\n 165: \"Alt\",\n 173: \"-\",\n 186: \";\",\n 187: \"=\",\n 188: \",\",\n 189: \"-\",\n 190: \".\",\n 191: \"/\",\n 192: \"`\",\n 219: \"[\",\n 220: \"\\\\\",\n 221: \"]\",\n 222: \"'\",\n 229: \"q\"\n};\nvar base_1 = base;\n\nvar shift = {\n 48: \")\",\n 49: \"!\",\n 50: \"@\",\n 51: \"#\",\n 52: \"$\",\n 53: \"%\",\n 54: \"^\",\n 55: \"&\",\n 56: \"*\",\n 57: \"(\",\n 59: \";\",\n 61: \"+\",\n 173: \"_\",\n 186: \":\",\n 187: \"+\",\n 188: \"<\",\n 189: \"_\",\n 190: \">\",\n 191: \"?\",\n 192: \"~\",\n 219: \"{\",\n 220: \"|\",\n 221: \"}\",\n 222: \"\\\"\",\n 229: \"Q\"\n};\nvar shift_1 = shift;\n\nvar chrome = typeof navigator != \"undefined\" && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\nvar safari = typeof navigator != \"undefined\" && /Apple Computer/.test(navigator.vendor);\nvar gecko = typeof navigator != \"undefined\" && /Gecko\\/\\d+/.test(navigator.userAgent);\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform);\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\nvar brokenModifierNames = chrome && (mac || +chrome[1] < 57) || gecko && mac;\n\n// Fill in the digit keys\nfor (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);\n\n// The function keys\nfor (var i = 1; i <= 24; i++) base[i + 111] = \"F\" + i;\n\n// And the alphabetic keys\nfor (var i = 65; i <= 90; i++) {\n base[i] = String.fromCharCode(i + 32);\n shift[i] = String.fromCharCode(i);\n}\n\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];\n\nvar keyName = function(event) {\n // Don't trust event.key in Chrome when there are modifiers until\n // they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838\n var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) ||\n (safari || ie) && event.shiftKey && event.key && event.key.length == 1;\n var name = (!ignoreKey && event.key) ||\n (event.shiftKey ? shift : base)[event.keyCode] ||\n event.key || \"Unidentified\";\n // Edge sometimes produces wrong names (Issue #3)\n if (name == \"Esc\") name = \"Escape\";\n if (name == \"Del\") name = \"Delete\";\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n if (name == \"Left\") name = \"ArrowLeft\";\n if (name == \"Up\") name = \"ArrowUp\";\n if (name == \"Right\") name = \"ArrowRight\";\n if (name == \"Down\") name = \"ArrowDown\";\n return name\n};\n\nvar w3cKeyname = {\n\tbase: base_1,\n\tshift: shift_1,\n\tkeyName: keyName\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (w3cKeyname);\n\n\n\n//# sourceURL=webpack:///./node_modules/w3c-keyname/index.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"base\", function() { return base; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shift\", function() { return shift; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyName\", function() { return keyName; });\nvar base = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 10: \"Enter\",\n 12: \"NumLock\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 44: \"PrintScreen\",\n 45: \"Insert\",\n 46: \"Delete\",\n 59: \";\",\n 61: \"=\",\n 91: \"Meta\",\n 92: \"Meta\",\n 106: \"*\",\n 107: \"+\",\n 108: \",\",\n 109: \"-\",\n 110: \".\",\n 111: \"/\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 160: \"Shift\",\n 161: \"Shift\",\n 162: \"Control\",\n 163: \"Control\",\n 164: \"Alt\",\n 165: \"Alt\",\n 173: \"-\",\n 186: \";\",\n 187: \"=\",\n 188: \",\",\n 189: \"-\",\n 190: \".\",\n 191: \"/\",\n 192: \"`\",\n 219: \"[\",\n 220: \"\\\\\",\n 221: \"]\",\n 222: \"'\",\n 229: \"q\"\n};\nvar shift = {\n 48: \")\",\n 49: \"!\",\n 50: \"@\",\n 51: \"#\",\n 52: \"$\",\n 53: \"%\",\n 54: \"^\",\n 55: \"&\",\n 56: \"*\",\n 57: \"(\",\n 59: \":\",\n 61: \"+\",\n 173: \"_\",\n 186: \":\",\n 187: \"+\",\n 188: \"<\",\n 189: \"_\",\n 190: \">\",\n 191: \"?\",\n 192: \"~\",\n 219: \"{\",\n 220: \"|\",\n 221: \"}\",\n 222: \"\\\"\",\n 229: \"Q\"\n};\nvar chrome = typeof navigator != \"undefined\" && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\nvar safari = typeof navigator != \"undefined\" && /Apple Computer/.test(navigator.vendor);\nvar gecko = typeof navigator != \"undefined\" && /Gecko\\/\\d+/.test(navigator.userAgent);\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform);\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\nvar brokenModifierNames = chrome && (mac || +chrome[1] < 57) || gecko && mac; // Fill in the digit keys\n\nfor (var i = 0; i < 10; i++) {\n base[48 + i] = base[96 + i] = String(i);\n} // The function keys\n\n\nfor (var i = 1; i <= 24; i++) {\n base[i + 111] = \"F\" + i;\n} // And the alphabetic keys\n\n\nfor (var i = 65; i <= 90; i++) {\n base[i] = String.fromCharCode(i + 32);\n shift[i] = String.fromCharCode(i);\n} // For each code that doesn't have a shift-equivalent, copy the base name\n\n\nfor (var code in base) {\n if (!shift.hasOwnProperty(code)) shift[code] = base[code];\n}\n\nfunction keyName(event) {\n // Don't trust event.key in Chrome when there are modifiers until\n // they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838\n var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || (safari || ie) && event.shiftKey && event.key && event.key.length == 1;\n var name = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || \"Unidentified\"; // Edge sometimes produces wrong names (Issue #3)\n\n if (name == \"Esc\") name = \"Escape\";\n if (name == \"Del\") name = \"Delete\"; // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n\n if (name == \"Left\") name = \"ArrowLeft\";\n if (name == \"Up\") name = \"ArrowUp\";\n if (name == \"Right\") name = \"ArrowRight\";\n if (name == \"Down\") name = \"ArrowDown\";\n return name;\n}\n\n//# sourceURL=webpack:///./node_modules/w3c-keyname/index.es.js?"); + +/***/ }), + +/***/ "./node_modules/webpack/buildin/amd-options.js": +/*!****************************************!*\ + !*** (webpack)/buildin/amd-options.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(this, {}))\n\n//# sourceURL=webpack:///(webpack)/buildin/amd-options.js?"); /***/ }), /***/ "./node_modules/webpack/buildin/global.js": /*!***********************************!*\ !*** (webpack)/buildin/global.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?"); +eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?"); /***/ }), /***/ "./node_modules/webpack/buildin/module.js": /*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack:///(webpack)/buildin/module.js?"); +eval("module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};\n\n//# sourceURL=webpack:///(webpack)/buildin/module.js?"); /***/ }), /***/ "./prose.js": /*!******************!*\ !*** ./prose.js ***! \******************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prosemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-view */ \"./node_modules/prosemirror-view/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_markdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-markdown */ \"./node_modules/prosemirror-markdown/dist/index.es.js\");\n/* harmony import */ var prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-example-setup */ \"./node_modules/prosemirror-example-setup/dist/index.es.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// class MarkdownView {\n// constructor(target, content) {\n// this.textarea = target.appendChild(document.createElement(\"textarea\"))\n// this.textarea.value = content\n// }\n// get content() { return this.textarea.value }\n// focus() { this.textarea.focus() }\n// destroy() { this.textarea.remove() }\n// }\n\n\n\n\nvar $title = document.querySelector('#title');\nvar $content = document.querySelector('#content');\n\nvar ProseMirrorView = /*#__PURE__*/function () {\n function ProseMirrorView(target, content) {\n _classCallCheck(this, ProseMirrorView);\n\n this.view = new prosemirror_view__WEBPACK_IMPORTED_MODULE_0__[\"EditorView\"](target, {\n state: prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"EditorState\"].create({\n doc: function (content) {\n // console.log('loading '+window.draftKey)\n var localDraft = localStorage.getItem(window.draftKey);\n\n if (localDraft != null) {\n content = localDraft;\n }\n\n if (content.indexOf(\"# \") === 0) {\n var eol = content.indexOf(\"\\n\");\n var title = content.substring(\"# \".length, eol);\n content = content.substring(eol + \"\\n\\n\".length);\n $title.value = title;\n }\n\n return prosemirror_markdown__WEBPACK_IMPORTED_MODULE_2__[\"defaultMarkdownParser\"].parse(content);\n }(content),\n plugins: Object(prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_3__[\"exampleSetup\"])({\n schema: prosemirror_markdown__WEBPACK_IMPORTED_MODULE_2__[\"schema\"]\n })\n }),\n dispatchTransaction: function dispatchTransaction(transaction) {\n // console.log('saving to '+window.draftKey)\n $content.value = prosemirror_markdown__WEBPACK_IMPORTED_MODULE_2__[\"defaultMarkdownSerializer\"].serialize(transaction.doc);\n localStorage.setItem(window.draftKey, function () {\n var draft = \"\";\n\n if ($title.value != null && $title.value !== \"\") {\n draft = \"# \" + $title.value + \"\\n\\n\";\n }\n\n draft += $content.value;\n return draft;\n }());\n var newState = this.state.apply(transaction);\n this.updateState(newState);\n }\n });\n }\n\n _createClass(ProseMirrorView, [{\n key: \"focus\",\n value: function focus() {\n this.view.focus();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.view.destroy();\n }\n }, {\n key: \"content\",\n get: function get() {\n return prosemirror_markdown__WEBPACK_IMPORTED_MODULE_2__[\"defaultMarkdownSerializer\"].serialize(this.view.state.doc);\n }\n }]);\n\n return ProseMirrorView;\n}();\n\nvar place = document.querySelector(\"#editor\");\nvar view = new ProseMirrorView(place, $content.value); // document.querySelectorAll(\"input[type=radio]\").forEach(button => {\n// button.addEventListener(\"change\", () => {\n// if (!button.checked) return\n// let View = button.value == \"markdown\" ? MarkdownView : ProseMirrorView\n// if (view instanceof View) return\n// let content = view.content\n// view.destroy()\n// view = new View(place, content)\n// view.focus()\n// })\n// })\n\n//# sourceURL=webpack:///./prose.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prosemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-view */ \"./node_modules/prosemirror-view/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-example-setup */ \"./node_modules/prosemirror-example-setup/dist/index.es.js\");\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var _markdownParser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./markdownParser */ \"./markdownParser.js\");\n/* harmony import */ var _markdownSerializer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./markdownSerializer */ \"./markdownSerializer.js\");\n/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./schema */ \"./schema.js\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./menu */ \"./menu.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// class MarkdownView {\n// constructor(target, content) {\n// this.textarea = target.appendChild(document.createElement(\"textarea\"))\n// this.textarea.value = content\n// }\n// get content() { return this.textarea.value }\n// focus() { this.textarea.focus() }\n// destroy() { this.textarea.remove() }\n// }\n\n\n\n\n\n\n\n\nvar $title = document.querySelector('#title');\nvar $content = document.querySelector('#content');\n\nvar ProseMirrorView = /*#__PURE__*/function () {\n function ProseMirrorView(target, content) {\n _classCallCheck(this, ProseMirrorView);\n\n this.view = new prosemirror_view__WEBPACK_IMPORTED_MODULE_0__[\"EditorView\"](target, {\n state: prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"EditorState\"].create({\n doc: function (content) {\n // console.log('loading '+window.draftKey)\n var localDraft = localStorage.getItem(window.draftKey);\n\n if (localDraft != null) {\n content = localDraft;\n }\n\n if (content.indexOf(\"# \") === 0) {\n var eol = content.indexOf(\"\\n\");\n var title = content.substring(\"# \".length, eol);\n content = content.substring(eol + \"\\n\\n\".length);\n $title.value = title;\n }\n\n return _markdownParser__WEBPACK_IMPORTED_MODULE_4__[\"writeAsMarkdownParser\"].parse(content);\n }(content),\n plugins: [Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_3__[\"keymap\"])({\n \"Mod-Enter\": function ModEnter() {\n document.getElementById(\"publish\").click();\n return true;\n },\n \"Mod-k\": function ModK() {\n console.log(\"TODO-link\");\n return true;\n }\n })].concat(_toConsumableArray(Object(prosemirror_example_setup__WEBPACK_IMPORTED_MODULE_2__[\"exampleSetup\"])({\n schema: _schema__WEBPACK_IMPORTED_MODULE_6__[\"writeFreelySchema\"],\n menuContent: Object(_menu__WEBPACK_IMPORTED_MODULE_7__[\"getMenu\"])()\n })))\n }),\n dispatchTransaction: function dispatchTransaction(transaction) {\n // console.log('saving to '+window.draftKey)\n var newContent = _markdownSerializer__WEBPACK_IMPORTED_MODULE_5__[\"writeAsMarkdownSerializer\"].serialize(transaction.doc);\n $content.value = newContent;\n console.log({\n newContent: newContent\n });\n localStorage.setItem(window.draftKey, function () {\n var draft = \"\";\n\n if ($title.value != null && $title.value !== \"\") {\n draft = \"# \" + $title.value + \"\\n\\n\";\n }\n\n draft += $content.value;\n return draft;\n }());\n var newState = this.state.apply(transaction);\n this.updateState(newState);\n }\n });\n }\n\n _createClass(ProseMirrorView, [{\n key: \"focus\",\n value: function focus() {\n this.view.focus();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.view.destroy();\n }\n }, {\n key: \"content\",\n get: function get() {\n return defaultMarkdownSerializer.serialize(this.view.state.doc);\n }\n }]);\n\n return ProseMirrorView;\n}();\n\nvar place = document.querySelector(\"#editor\");\nvar view = new ProseMirrorView(place, $content.value); // document.querySelectorAll(\"input[type=radio]\").forEach(button => {\n// button.addEventListener(\"change\", () => {\n// if (!button.checked) return\n// let View = button.value == \"markdown\" ? MarkdownView : ProseMirrorView\n// if (view instanceof View) return\n// let content = view.content\n// view.destroy()\n// view = new View(place, content)\n// view.focus()\n// })\n// })\n\n//# sourceURL=webpack:///./prose.js?"); + +/***/ }), + +/***/ "./schema.js": +/*!*******************!*\ + !*** ./schema.js ***! + \*******************/ +/*! exports provided: writeFreelySchema */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"writeFreelySchema\", function() { return writeFreelySchema; });\n/* harmony import */ var prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-markdown */ \"./node_modules/prosemirror-markdown/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\nvar writeFreelySchema = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Schema\"]({\n nodes: prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__[\"schema\"].spec.nodes.remove(\"blockquote\").remove(\"horizontal_rule\").remove(\"hard_break\").addToEnd(\"readmore\", {\n inline: false,\n content: \"\",\n group: \"block\",\n draggable: true,\n toDOM: function toDOM(node) {\n return [\"div\", {\n \"class\": \"editorreadmore\",\n style: \"width: 100%;text-align:center\"\n }, \"Read more...\"];\n },\n parseDOM: [{\n tag: \"div.editorreadmore\"\n }]\n }),\n marks: prosemirror_markdown__WEBPACK_IMPORTED_MODULE_0__[\"schema\"].spec.marks\n});\nconsole.log({\n writeFreelySchema: writeFreelySchema\n});\n\n//# sourceURL=webpack:///./schema.js?"); /***/ }) /******/ }); \ No newline at end of file