@episodeyang/react-prosemirror
Version:
a template for react es6 components. Contains webpack configuration and document generator.
2 lines • 807 kB
JavaScript
webpackJsonp([1],[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=n(13),a=r(i),o=n(42),s=n(221),l=n(131),c=r(l),u=document.body.querySelector("#readme-container");(0,o.render)(a["default"].createElement(s.AppContainer,null,a["default"].createElement(c["default"],null)),u),function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(u,"readmeContainer","/Users/ge/projects/prosemirror-demo/src/example/index.js")}()},,,,function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===r(e)}function a(e,t){return E.call(e,t)}function o(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function s(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function l(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function u(e,t){var n=0;return a(w,t)?w[t]:35===t.charCodeAt(0)&&T.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),l(n))?c(n):e}function d(e){return e.indexOf("\\")<0?e:e.replace(S,"$1")}function p(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(x,function(e,t,n){return t?t:u(e,n)})}function m(e){return M[e]}function f(e){return N.test(e)?e.replace(D,m):e}function g(e){return e.replace(O,"\\$&")}function h(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function b(e){return k.test(e)}function v(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function y(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var E=Object.prototype.hasOwnProperty,S=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,x=new RegExp(S.source+"|"+C.source,"gi"),T=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,w=n(78),N=/[&<>"]/,D=/[&<>"]/g,M={"&":"&","<":"<",">":">",'"':"""},O=/[.?*+^$[\]\\(){}|-]/g,k=n(71);t.lib={},t.lib.mdurl=n(82),t.lib.ucmicro=n(293),t.assign=o,t.isString=i,t.has=a,t.unescapeMd=d,t.unescapeAll=p,t.isValidEntityCode=l,t.fromCodePoint=c,t.escapeHtml=f,t.arrayReplaceAt=s,t.isSpace=h,t.isWhiteSpace=_,t.isMdAsciiPunct=v,t.isPunctChar=b,t.escapeRE=g,t.normalizeReference=y},,,,,function(e,t,n){"use strict";t.Node=n(88).Node;var r=n(90);t.ResolvedPos=r.ResolvedPos,t.NodeRange=r.NodeRange,t.Fragment=n(20).Fragment;var i=n(89);t.Slice=i.Slice,t.ReplaceError=i.ReplaceError,t.Mark=n(26).Mark;var a=n(208);t.SchemaSpec=a.SchemaSpec,t.Schema=a.Schema,t.NodeType=a.NodeType,t.Block=a.Block,t.Inline=a.Inline,t.Text=a.Text,t.MarkType=a.MarkType,t.Attribute=a.Attribute,t.NodeKind=a.NodeKind;var o=n(86);t.ContentMatch=o.ContentMatch,t.parseDOMInContext=n(87).parseDOMInContext},,,,,,,,,function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=window.getSelection(),r=v(n.anchorNode,n.anchorOffset),i=n.isCollapsed?r:v(n.focusNode,n.focusOffset),a=u(e.resolve(i),null!=t&&t<i?1:-1);if(a instanceof T){var o=u(e.resolve(r),r>a.to?-1:1,!0);a=new T(o.$anchor,a.$head)}else if(r<a.from||r>a.to){var s=r>a.to;a=new T(u(e.resolve(r),s?-1:1,!0).$anchor,u(s?a.$from:a.$to,s?1:-1,!0).$head)}return{range:a,adjusted:i!=a.head||r!=a.anchor}}function s(e){if(document.activeElement!=e.content)return!1;var t=window.getSelection();return t.rangeCount&&h(e.content,t.anchorNode)}function l(e,t,n,r,i,a){if(t.isTextblock)return new T(e.resolve(n));for(var o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){var s=t.child(o);if(s.type.isLeaf){if(!a&&s.type.selectable)return new w(e.resolve(n-(i<0?s.nodeSize:0)))}else{var c=l(e,s,n+i,i<0?s.childCount:0,i,a);if(c)return c}n+=s.nodeSize*i}}function c(e,t,n){var r=e.parent.isTextblock?new T(e):l(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var i=e.depth-1;i>=0;i--){var a=t<0?l(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):l(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(a)return a}}function u(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],n=arguments[2],r=c(e,t,n)||c(e,-t,n);if(!r)throw new RangeError("Searching for selection in invalid document "+e.node(0));return r}function d(e,t){return l(e,e,0,0,1,t)}function p(e,t){return l(e,e,e.content.size,e.childCount,-1,t)}function m(e,t,n){for(var r=t.depth?y(e,t.before()):e.content,i=S(e,t.pos),a=r.firstChild;a;a=a.nextSibling)if(1==a.nodeType)for(var o=a.getClientRects(),s=0;s<o.length;s++){var l=o[s];if(n<0?l.bottom<i.top:l.top>i.bottom)return!1}return!0}var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=n(22),h=g.contains,_=n(21),b=n(38),v=b.posFromDOM,y=b.DOMAfterPos,E=b.DOMFromPos,S=b.coordsAtPos,C=function(){function e(t,n){var r=this;a(this,e),this.pm=t,this.range=n,this.polling=null,this.lastAnchorNode=this.lastHeadNode=this.lastAnchorOffset=this.lastHeadOffset=null,this.lastNode=null,t.content.addEventListener("focus",function(){return r.receivedFocus()}),this.poller=this.poller.bind(this)}return f(e,[{key:"setAndSignal",value:function(e,t){this.set(e,t),this.pm.on.selectionChange.dispatch()}},{key:"set",value:function(e,t){this.pm.ensureOperation({readSelection:!1,selection:e}),this.range=e,t!==!1&&(this.lastAnchorNode=null)}},{key:"poller",value:function(){s(this.pm)?(this.pm.operation||this.readFromDOM(),this.polling=setTimeout(this.poller,100)):this.polling=null}},{key:"startPolling",value:function(){clearTimeout(this.polling),this.polling=setTimeout(this.poller,50)}},{key:"fastPoll",value:function(){this.startPolling()}},{key:"stopPolling",value:function(){clearTimeout(this.polling),this.polling=null}},{key:"domChanged",value:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastHeadNode||e.focusOffset!=this.lastHeadOffset}},{key:"storeDOMState",value:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastHeadNode=e.focusNode,this.lastHeadOffset=e.focusOffset}},{key:"readFromDOM",value:function(){if(!s(this.pm)||!this.domChanged())return!1;var e=o(this.pm.doc,this.range.head),t=e.range,n=e.adjusted;return this.setAndSignal(t),t instanceof w||n?this.toDOM():(this.clearNode(),this.storeDOMState()),!0}},{key:"toDOM",value:function(e){if(!s(this.pm)){if(!e)return;_.gecko&&this.pm.content.focus()}this.range instanceof w?this.nodeToDOM():this.rangeToDOM()}},{key:"nodeToDOM",value:function(){var e=y(this.pm,this.range.from);e!=this.lastNode&&(this.clearNode(),e.classList.add("ProseMirror-selectednode"),this.pm.content.classList.add("ProseMirror-nodeselection"),this.lastNode=e);var t=document.createRange(),n=window.getSelection();t.selectNode(e),n.removeAllRanges(),n.addRange(t),this.storeDOMState()}},{key:"rangeToDOM",value:function(){this.clearNode();var e=E(this.pm,this.range.anchor),t=E(this.pm,this.range.head),n=window.getSelection(),r=document.createRange();if(n.extend)r.setEnd(e.node,e.offset),r.collapse(!1);else{if(this.range.anchor>this.range.head){var i=e;e=t,t=i}r.setEnd(t.node,t.offset),r.setStart(e.node,e.offset)}n.removeAllRanges(),n.addRange(r),n.extend&&n.extend(t.node,t.offset),this.storeDOMState()}},{key:"clearNode",value:function(){if(this.lastNode)return this.lastNode.classList.remove("ProseMirror-selectednode"),this.pm.content.classList.remove("ProseMirror-nodeselection"),this.lastNode=null,!0}},{key:"receivedFocus",value:function(){null==this.polling&&this.startPolling()}}]),e}();t.SelectionState=C;var x=function(){function e(t,n){a(this,e),this.$from=t,this.$to=n}return f(e,[{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}}]),f(e,[{key:"empty",get:function(){return this.from==this.to}}]),e}();t.Selection=x;var T=function(e){function t(e){var n=arguments.length<=1||void 0===arguments[1]?e:arguments[1];a(this,t);var i=e.pos>n.pos,o=r(this,Object.getPrototypeOf(t).call(this,i?n:e,i?e:n));return o.$anchor=e,o.$head=n,o}return i(t,e),f(t,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}}]),f(t,[{key:"eq",value:function(e){return e instanceof t&&e.head==this.head&&e.anchor==this.anchor}},{key:"map",value:function(e,n){var r=e.resolve(n.map(this.head));if(!r.parent.isTextblock)return u(r);var i=e.resolve(n.map(this.anchor));return new t(i.parent.isTextblock?i:r,r)}},{key:"inverted",get:function(){return this.anchor>this.head}},{key:"token",get:function(){return new N(t,this.anchor,this.head)}}],[{key:"mapToken",value:function(e,n){return new N(t,n.map(e.a),n.map(e.b))}},{key:"fromToken",value:function(e,n){var r=n.resolve(e.b);if(!r.parent.isTextblock)return u(r);var i=n.resolve(e.a);return new t(i.parent.isTextblock?i:r,r)}}]),t}(x);t.TextSelection=T;var w=function(e){function t(e){a(this,t);var n=e.plusOne(),i=r(this,Object.getPrototypeOf(t).call(this,e,n));return i.node=e.nodeAfter,i}return i(t,e),f(t,[{key:"eq",value:function(e){return e instanceof t&&this.from==e.from}},{key:"map",value:function(e,n){var r=e.resolve(n.map(this.from,1)),i=n.map(this.to,-1),a=r.nodeAfter;return a&&i==r.pos+a.nodeSize&&a.type.selectable?new t(r):u(r)}},{key:"token",get:function(){return new N(t,this.from,this.to)}}],[{key:"mapToken",value:function(e,n){return new N(t,n.map(e.a,1),n.map(e.b,-1))}},{key:"fromToken",value:function(e,n){var r=n.resolve(e.a),i=r.nodeAfter;return i&&e.b==e.a+i.nodeSize&&i.type.selectable?new t(r):u(r)}}]),t}(x);t.NodeSelection=w;var N=function D(e,t,n){a(this,D),this.type=e,this.a=t,this.b=n};t.hasFocus=s,t.findSelectionFrom=c,t.findSelectionNear=u,t.findSelectionAtStart=d,t.findSelectionAtEnd=p,t.verticalMotionLeavesTextblock=m},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return p.index=e,p.offset=t,p}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(91),s=o.fragmentToDOM,l=n(207),c=l.findDiffStart,u=l.findDiffEnd,d=function(){function e(t,n){if(r(this,e),this.content=t,this.size=n||0,null==n)for(var i=0;i<t.length;i++)this.size+=t[i].nodeSize}return a(e,[{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"nodesBetween",value:function(e,t,n,r,i){for(var a=0,o=0;o<t;a++){var s=this.content[a],l=o+s.nodeSize;if(l>e&&n(s,r+o,i,a)!==!1&&s.content.size){var c=o+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}o=l}}},{key:"textBetween",value:function(e,t,n){var r="",i=!0;return this.nodesBetween(e,t,function(a,o){a.isText?(r+=a.text.slice(Math.max(e,o)-o,t-o),i=!n):!i&&a.isBlock&&(r+=n,i=!0)},0),r}},{key:"cut",value:function(t,n){if(null==n&&(n=this.size),0==t&&n==this.size)return this;var r=[],i=0;if(n>t)for(var a=0,o=0;o<n;a++){var s=this.content[a],l=o+s.nodeSize;l>t&&((o<t||l>n)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,n-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,n-o-1))),r.push(s),i+=s.nodeSize),o=l}return new e(r,i)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.copy(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"toJSON",value:function(){return this.content.length?this.content.map(function(e){return e.toJSON()}):null}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return c(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.size:arguments[1],n=arguments.length<=2||void 0===arguments[2]?e.size:arguments[2];return u(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?-1:arguments[1];if(0==e)return i(0,e);if(e==this.size)return i(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var a=this.child(n),o=r+a.nodeSize;if(o>=e)return o==e||t>0?i(n+1,o):i(n,r);r=o}}},{key:"toDOM",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return s(this,e)}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}}],[{key:"fromJSON",value:function(t,n){return n?new e(n.map(t.nodeFromJSON)):e.empty}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n=void 0,r=0,i=0;i<t.length;i++){var a=t[i];r+=a.nodeSize,i&&a.isText&&t[i-1].sameMarkup(a)?(n||(n=t.slice(0,i)),n[n.length-1]=a.copy(n[n.length-1].text+a.text)):n&&n.push(a)}return new e(n||t,r)}},{key:"from",value:function(t){return t?t instanceof e?t:Array.isArray(t)?this.fromArray(t):new e([t],t.nodeSize):e.empty}}]),e}();t.Fragment=d;var p={index:0,offset:0};d.empty=new d([],0)},function(e,t){"use strict";var n=/MSIE \d/.test(navigator.userAgent),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);e.exports={mac:/Mac/.test(navigator.platform),ie:n||!!r,ie_version:n?document.documentMode||6:r&&+r[1],gecko:/gecko\/\d/i.test(navigator.userAgent),ios:/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)}},function(e,t){"use strict";function n(e,t){var n=document.createElement(e);if(t)for(var i in t)"style"==i?n.style.cssText=t[i]:null!=t[i]&&n.setAttribute(i,t[i]);for(var a=arguments.length,o=Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];for(var l=0;l<o.length;l++)r(o[l],n);return n}function r(e,t){if("string"==typeof e&&(e=document.createTextNode(e)),Array.isArray(e))for(var n=0;n<e.length;n++)r(e[n],t);else t.appendChild(e)}function i(e){return c?c(e):setTimeout(e,10)}function a(e){return c?u(e):void clearTimeout(e)}function o(e,t){return 1!=t.nodeType&&(t=t.parentNode),t&&e.contains(t)}function s(e){p?p.textContent+=e:d+=e}function l(){p||(p=document.createElement("style"),p.textContent="/* ProseMirror CSS */\n"+d,document.head.insertBefore(p,document.head.firstChild))}t.elt=n;var c=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,u=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;t.requestAnimationFrame=i,t.cancelAnimationFrame=a,t.contains=o;var d="",p=null;t.insertCSS=s,t.ensureCSSAdded=l},,,,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(93),o=a.compareDeep,s=function(){function e(t,n){r(this,e),this.type=t,this.attrs=n}return i(e,[{key:"toJSON",value:function(){var e={_:this.type.name};for(var t in this.attrs)e[t]=this.attrs[t];return e}},{key:"addToSet",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.type==this.type){if(this.eq(n))return e;var r=e.slice();return r[t]=this,r}if(n.type.rank>this.type.rank)return e.slice(0,t).concat(this).concat(e.slice(t))}return e.concat(this)}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&!!o(e.attrs,this.attrs)}}],[{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort(function(e,t){return e.type.rank-t.type.rank}),n}}]),e}();t.Mark=s,s.none=[]},function(e,t,n){"use strict";var r=n(41);t.Transform=r.Transform,t.TransformError=r.TransformError;var i=n(51);t.Step=i.Step,t.StepResult=i.StepResult;var a=n(212);t.joinPoint=a.joinPoint,t.joinable=a.joinable,t.canSplit=a.canSplit,t.insertPoint=a.insertPoint,t.liftTarget=a.liftTarget,t.findWrapping=a.findWrapping;var o=n(39);t.PosMap=o.PosMap,t.MapResult=o.MapResult,t.Remapping=o.Remapping,t.mapThrough=o.mapThrough,t.mapThroughResult=o.mapThroughResult;var s=n(92);t.AddMarkStep=s.AddMarkStep,t.RemoveMarkStep=s.RemoveMarkStep;var l=n(40);t.ReplaceStep=l.ReplaceStep,t.ReplaceAroundStep=l.ReplaceAroundStep,n(210),n(211)},,,,,,function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(e){if("keypress"==e.type)return"'"+String.fromCharCode(e.charCode)+"'";var t=a[e.keyCode],n=t;return null==n||e.altGraphKey?null:(e.altKey&&"Alt"!=t&&(n="Alt-"+n),e.ctrlKey&&"Ctrl"!=t&&(n="Ctrl-"+n),e.metaKey&&"Cmd"!=t&&(n="Cmd-"+n),e.shiftKey&&"Shift"!=t&&(n="Shift-"+n),n)}function t(e){return e=/[^-]*$/.exec(e)[0],"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function n(e){for(var t,n,r,a,o=e.split(/-(?!'?$)/),s=o[o.length-1],l=0;l<o.length-1;l++){var c=o[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))t=!0;else if(/^(c|ctrl|control)$/i.test(c))n=!0;else if(/^s(hift)?$/i.test(c))r=!0;else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c);i?a=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),a&&(s="Cmd-"+s),r&&(s="Shift-"+s),s}function r(e,t){this.options=t||{},this.bindings=Object.create(null),e&&this.addBindings(e)}for(var i="undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform(),a={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},o=0;o<10;o++)a[o+48]=a[o+96]=String(o);for(var o=65;o<=90;o++)a[o]=String.fromCharCode(o);for(var o=1;o<=12;o++)a[o+111]=a[o+63235]="F"+o;return r.prototype={normalize:function(e){return this.options.multi!==!1?e.split(/ +(?!\'$)/).map(n):[n(e)]},addBinding:function(e,t){for(var n=this.normalize(e),r=0;r<n.length;r++){var i=n.slice(0,r+1).join(" "),a=r==n.length-1?t:"...",o=this.bindings[i];if(o){if(o!=a)throw new Error("Inconsistent bindings for "+i)}else this.bindings[i]=a}},addBindings:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.addBinding(t,e[t])},removeBinding:function(e){for(var t=this.normalize(e),n=t.length-1;n>=0;n--){var r=t.slice(0,n).join(" "),i=this.bindings[r];if("..."==i&&!this.unusedMulti(r))break;i&&delete this.bindings[r]}},unusedMulti:function(e){for(var t in this.bindings)if(t.length>e&&0==t.indexOf(e)&&" "==t.charAt(e.length))return!1;return!0},lookup:function(e,t){return this.options.call?this.options.call(e,t):this.bindings[e]},reverseLookup:function(e){for(var t in this.bindings)if(this.bindings[t]==e)return t},constructor:r},r.keyName=e,r.isModifierKey=t,r.normalizeKeyName=n,r})},,,function(e,t,n){"use strict";var r=n(4).isSpace,i=n(4).unescapeAll;e.exports=function(e,t,n){var a,o,s=0,l=t,c={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(a=e.charCodeAt(t),10===a||r(a))return c;if(62===a)return c.pos=t+1,c.str=i(e.slice(l+1,t)),c.ok=!0,c;92===a&&t+1<n?t+=2:t++}return c}for(o=0;t<n&&(a=e.charCodeAt(t),32!==a)&&!(a<32||127===a);)if(92===a&&t+1<n)t+=2;else{if(40===a&&(o++,o>1))break;if(41===a&&(o--,o<0))break;t++}return l===t?c:(c.str=i(e.slice(l,t)),c.lines=s,c.pos=t,c.ok=!0,c)}},function(e,t,n){"use strict";var r=n(4).unescapeAll;e.exports=function(e,t,n){var i,a,o=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(a=e.charCodeAt(t),34!==a&&39!==a&&40!==a)return l;for(t++,40===a&&(a=41);t<n;){if(i=e.charCodeAt(t),i===a)return l.pos=t+1,l.lines=o,l.str=r(e.slice(s+1,t)),l.ok=!0,l;10===i?o++:92===i&&t+1<n&&(t++,10===e.charCodeAt(t)&&o++),t++}return l}},function(e,t,n){"use strict";function r(e){return e.classList.contains("ProseMirror-content")}function i(e){for(var t=0,n=0,i=e;!r(i);i=i.parentNode){var a=i.getAttribute("pm-offset");a&&(t+=+a+n,n=1)}return t}function a(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];null==t&&(t=Array.prototype.indexOf.call(e.parentNode.childNodes,e),e=e.parentNode);for(var a=0,s=void 0;;){var l=0;if(3==e.nodeType)a+=t;else{if(s=e.getAttribute("pm-offset")&&!o(e)){var c=+e.getAttribute("pm-size");return a=1!=e.nodeType||e.firstChild?t==e.childNodes.length?c:Math.min(a,c):n>0?c:0,S=i(e),S+a}if(e.hasAttribute("pm-container"))break;(s=e.getAttribute("pm-inner-offset"))?(a+=+s,l=-1):t==e.childNodes.length&&(l=t?1:n>0?1:0)}var u=e.parentNode;t=l<0?0:Array.prototype.indexOf.call(u.childNodes,e)+l,e=u,n=0}for(var d=r(e)?0:i(e)+1,p=0,m=e.childNodes[t-1];m;m=m.previousSibling)if(1==m.nodeType&&(s=m.getAttribute("pm-offset"))){p+=+s+ +m.getAttribute("pm-size");break}return S=null,d+p+a}function o(e){return e.hasAttribute("pm-container")?e:e.querySelector("[pm-container]")}function s(e,t,n){if(!n&&e.operation&&e.doc!=e.operation.doc)throw new RangeError("Resolving a position in an outdated DOM structure");for(var r=e.content,i=t;;)for(var a=r.firstChild,s=0;;a=a.nextSibling,s++){if(!a){if(i&&!n)throw new RangeError("Failed to find node at "+t);return{node:r,offset:s}}var l=1==a.nodeType&&a.getAttribute("pm-size");if(l){if(!i)return{node:r,offset:s};if(l=+l,i<l){if(r=o(a)){i--;break}return u(a,i)}i-=l}}}function l(e,t){for(var n=e.content,r=(e.operation?e.operation.doc:e.doc).content.size-t;;)for(var i=n.lastChild,a=n.childNodes.length;;i=i.previousSibling,a--){if(!i)return{node:n,offset:a};var s=1==i.nodeType&&i.getAttribute("pm-size");if(s){if(!r)return{node:n,offset:a};if(s=+s,r<s){if(n=o(i)){r--;break}return u(i,s-r)}r-=s}}}function c(e,t){var n=s(e,t),r=n.node,i=n.offset;if(1!=r.nodeType||i==r.childNodes.length)throw new RangeError("No node after pos "+t);return r.childNodes[i]}function u(e,t){for(;;){var n=e.firstChild;if(!n)return{node:e,offset:t};if(1!=n.nodeType)return{node:n,offset:t};if(n.hasAttribute("pm-inner-offset")){for(var r=0;;){var i=n.nextSibling,a=void 0;if(!i||(a=+i.getAttribute("pm-inner-offset"))>=t)break;n=i,r=a}t-=r}e=n}}function d(){return{left:0,right:window.innerWidth,top:0,bottom:window.innerHeight}}function p(e,t){t||(t=e.sel.range.head||e.sel.range.from);for(var n=v(e,t),r=e.content;;r=r.parentNode){var i=e.options,a=i.scrollThreshold,o=i.scrollMargin,s=r==document.body,l=s?d():r.getBoundingClientRect(),c=0,u=0;if(n.top<l.top+a?u=-(l.top-n.top+o):n.bottom>l.bottom-a&&(u=n.bottom-l.bottom+o),n.left<l.left+a?c=-(l.left-n.left+o):n.right>l.right-a&&(c=n.right-l.right+o),(c||u)&&(s?window.scrollBy(c,u):(u&&(r.scrollTop+=u),c&&(r.scrollLeft+=c))),s)break}}function m(e,t){for(var n=void 0,r=2e8,i=void 0,a=0,o=e.firstChild;o;o=o.nextSibling){var s=void 0;if(1==o.nodeType)s=o.getClientRects();else{if(3!=o.nodeType)continue;s=_(o).getClientRects()}for(var l=0;l<s.length;l++){var c=s[l];if(c.top<=t.top&&c.bottom>=t.top){var u=c.left>t.left?c.left-t.left:c.right<t.left?t.left-c.right:0;if(u<r){n=o,r=u,i=u&&3==n.nodeType?{left:c.right<t.left?c.right:c.left,top:t.top}:t,1!=o.nodeType||o.firstChild||(a=l+(t.left>=(c.left+c.right)/2?1:0));continue}}!n&&(t.left>=c.right||t.left>=c.left&&t.top>=c.bottom)&&(a=l+1)}}return n?3==n.nodeType?f(n,i):m(n,i):{node:e,offset:a}}function f(e,t){for(var n=e.nodeValue.length,r=document.createRange(),i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);var a=b(r,1);if(a.top!=a.bottom&&a.left-1<=t.left&&a.right+1>=t.left&&a.top-1<=t.top&&a.bottom+1>=t.top)return{node:e,offset:i+(t.left>=(a.left+a.right)/2?1:0)}}return{node:e,offset:0}}function g(e,t){if(/^[uo]l$/i.test(e.nodeName))for(var n=e.firstChild;n;n=n.nextSibling)if(1==n.nodeType&&n.hasAttribute("pm-offset")&&/^li$/i.test(n.nodeName)){var r=n.getBoundingClientRect();if(t.left>r.left-2)break;if(r.top<=t.top&&r.bottom>=t.top)return n}return e}function h(e,t){var n=g(document.elementFromPoint(t.left,t.top+1),t);if(!E(e.content,n))return null;var r=m(n,t),i=r.node,o=r.offset,s=-1;if(1==i.nodeType&&!i.firstChild){var l=i.getBoundingClientRect();s=l.left!=l.right&&t.left>(l.left+l.right)/2?1:-1}var c=a(i,o,s);return{pos:c,inside:S}}function _(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r}function b(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function v(e,t){var n=s(e,t),r=n.node,i=n.offset,a=void 0,o=void 0;if(3==r.nodeType)i<r.nodeValue.length&&(o=b(_(r,i,i+1),-1),a="left"),o&&o.left!=o.right||!i||(o=b(_(r,i-1,i),1),a="right");else if(r.firstChild){if(i<r.childNodes.length){var l=r.childNodes[i];o=b(3==l.nodeType?_(l):l,-1),a="left"}if((!o||o.top==o.bottom)&&i){var l=r.childNodes[i-1];o=b(3==l.nodeType?_(l):l,1),a="right"}}else o=r.getBoundingClientRect(),a="left";var c=o[a];return{top:o.top,bottom:o.bottom,left:c,right:c}}var y=n(22),E=y.contains,S=null;t.posFromDOM=a,t.childContainer=o,t.DOMFromPos=s,t.DOMFromPosFromEnd=l,t.DOMAfterPos=c,t.scrollIntoView=p,t.posAtCoords=h,t.coordsAtPos=v},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return e+t*u}function i(e){return e&c}function a(e){return(e-(e&c))/u}function o(e,t,n,r){for(var i=r||0;i<e.length;i++)t=e[i].map(t,n);return t}function s(e,t,n,r){for(var i=!1,a=r||0;a<e.length;a++){var o=e[a].mapResult(t,n);t=o.pos,o.deleted&&(i=!0)}return new d(t,i)}var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=65535,u=Math.pow(2,16),d=function f(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=arguments.length<=2||void 0===arguments[2]?null:arguments[2];n(this,f),this.pos=e,this.deleted=t,this.recover=r};t.MapResult=d;var p=function(){function e(t){var r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];n(this,e),this.ranges=t,this.inverted=r}return l(e,[{key:"recover",value:function(e){var t=0,n=i(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+a(e)}},{key:"mapResult",value:function(e,t){return this._map(e,t,!1)}},{key:"map",value:function(e,t){return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var i=0,a=this.inverted?2:1,o=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;var c=this.ranges[s+a],u=this.ranges[s+o],p=l+c;if(e<=p){var m=c?e==l?-1:e==p?1:t:t,f=l+i+(m<0?0:u);if(n)return f;var g=r(s/3,e-l);return new d(f,e!=l&&e!=p,g)}i+=u-c}return n?e+i:new d(e+i)}},{key:"touches",value:function(e,t){for(var n=0,r=i(t),a=this.inverted?2:1,o=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;var c=this.ranges[s+a],u=l+c;if(e<=u&&s==3*r)return!0;n+=this.ranges[s+o]-c}return!1}},{key:"invert",value:function(){return new e(this.ranges,(!this.inverted))}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}]),e}();t.PosMap=p,p.empty=new p([]);var m=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],r=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];n(this,e),this.head=t,this.tail=r,this.mirror=Object.create(null)}return l(e,[{key:"addToFront",value:function(e,t){this.head.push(e);var n=-this.head.length;return null!=t&&(this.mirror[n]=t),n}},{key:"addToBack",value:function(e,t){this.tail.push(e);var n=this.tail.length-1;return null!=t&&(this.mirror[t]=n),n}},{key:"get",value:function(e){return e<0?this.head[-e-1]:this.tail[e]}},{key:"mapResult",value:function(e,t){return this._map(e,t,!1)}},{key:"map",value:function(e,t){return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=!1,i=null,a=-this.head.length;a<this.tail.length;a++){var o=this.get(a),s=void 0;if(null!=(s=i&&i[a])&&o.touches(e,s))e=o.recover(s);else{var l=o.mapResult(e,t);if(null!=l.recover){var c=this.mirror[a];if(null!=c){if(l.deleted){a=c,e=this.get(c).recover(l.recover);continue}(i||(i=Object.create(null)))[c]=l.recover}}l.deleted&&(r=!0),e=l.pos}}return n?e:new d(e,r)}},{key:"toString",value:function(){for(var e=[],t=-this.head.length;t<this.tail.length;t++)e.push(t+":"+this.get(t)+(null!=this.mirror[t]?"->"+this.mirror[t]:""));return e.join("\n")}}]),e}();t.Remapping=m,t.mapThrough=o,t.mapThroughResult=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t,n){for(var r=e.resolve(t),i=n-t,a=r.depth;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0)for(var o=r.node(a).maybeChild(r.indexAfter(a));i>0;){if(!o||o.type.isLeaf)return!0;o=o.firstChild,i--}return!1}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(9),c=l.Slice,u=n(51),d=u.Step,p=u.StepResult,m=n(39),f=m.PosMap,g=function(e){function t(e,n,a,o){r(this,t);var s=i(this,Object.getPrototypeOf(t).call(this));return s.from=e,s.to=n,s.slice=a,s.structure=!!o,s}return a(t,e),s(t,[{key:"apply",value:function(e){return this.structure&&o(e,this.from,this.to)?p.fail("Structure replace would overwrite content"):p.fromReplace(e,this.from,this.to,this.slice)}},{key:"posMap",value:function(){return new f([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)}}],[{key:"fromJSON",value:function(e,n){return new t(n.from,n.to,c.fromJSON(e,n.slice))}}]),t}(d);t.ReplaceStep=g,d.jsonID("replace",g);var h=function(e){function t(e,n,a,o,s,l,c){r(this,t);var u=i(this,Object.getPrototypeOf(t).call(this));return u.from=e,u.to=n,u.gapFrom=a,u.gapTo=o,u.slice=s,u.insert=l,u.structure=!!c,u}return a(t,e),s(t,[{key:"apply",value:function(e){if(this.structure&&(o(e,this.from,this.gapFrom)||o(e,this.gapTo,this.to)))return p.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openLeft||t.openRight)return p.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?p.fromReplace(e,this.from,this.to,n):p.fail("Content does not fit in gap")}},{key:"posMap",value:function(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),a=e.map(this.gapTo,1);return n.deleted&&r.deleted||i<n.pos||a>r.pos?null:new t(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}}],[{key:"fromJSON",value:function(e,n){return new t(n.from,n.to,n.gapFrom,n.gapTo,c.fromJSON(e,n.slice),n.insert,n.structure)}}]),t}(d);t.ReplaceAroundStep=h,d.jsonID("replaceAround",h)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(94),l=s.ProseMirrorError,c=n(39),u=c.mapThrough,d=c.mapThroughResult,p=function(e){function t(){return r(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),t}(l);t.TransformError=p;var m=function(){function e(t){r(this,e),this.doc=t,this.steps=[],this.docs=[],this.maps=[]}return o(e,[{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new p(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||(this.docs.push(this.doc),this.steps.push(e),this.maps.push(e.posMap()),this.doc=t.doc),t}},{key:"mapResult",value:function(e,t,n){return d(this.maps,e,t,n)}},{key:"map",value:function(e,t,n){return u(this.maps,e,t,n)}},{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}}]),e}();t.Transform=m},,,,,,,function(e,t){"use strict";e.exports=function(e,t,n){var r,i,a,o,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(a=e.src.charCodeAt(e.pos),93===a&&(r--,0===r)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===a)if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}return i&&(s=e.pos),e.pos=c,s}},function(e,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},n.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},n.prototype.at=function(e,t,n){var r=this.__find__(e),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},n.prototype.before=function(e,t,n,r){var i=this.__find__(e),a=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},n.prototype.after=function(e,t,n,r){var i=this.__find__(e),a=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},n.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},n.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},n.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},n.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=n},function(e,t){"use strict";function n(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(t=this.attrs,n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},n.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},n.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){throw new Error("Override me")}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(9),s=o.ReplaceError,l=n(39),c=l.PosMap,u=Object.create(null),d=function(){function e(){r(this,e)}return a(e,[{key:"apply",value:function(e){return i()}},{key:"posMap",value:function(){return c.empty}},{key:"invert",value:function(e){return i()}},{key:"map",value:function(e){return i()}},{key:"toJSON",value:function(){var e={stepType:this.jsonID};for(var t in this)if(this.hasOwnProperty(t)){var n=this[t];e[t]=n&&n.toJSON?n.toJSON():n}return e}}],[{key:"fromJSON",value:function(e,t){return u[t.stepType].fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in u)throw new RangeError("Duplicate use of step JSON ID "+e);return u[e]=t,t.prototype.jsonID=e,t}}]),e}();t.Step=d;var p=function(){function e(t,n){r(this,e),this.doc=t,this.failed=n}return a(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(a){if(a instanceof s)return e.fail(a.message);throw a}}}]),e}();t.StepResult=p},,,,,,,,,,,,,,,,,,,,function(e,t){e.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\u0AF0\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-\u2E42\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]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=n(2);Object.keys(i).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var a=r(i);t["default"]=a["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(3),c=r(l),u=n(4),d=n(5),p=r(d),m=l.PropTypes.node,f=l.PropTypes.string,g=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"componentDidMount",value:function(){p["default"].highlightBlock((0,u.findDOMNode)(this.refs.code))}},{key:"componentDidUpdate",value:function(){p["default"].initHighlighting.called=!1,p["default"].highlightBlock((0,u.findDOMNode)(this.refs.code))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.language;return c["default"].createElement("pre",this.props,c["default"].createElement("code",{className:n,ref:"code"},t))}}]),t}(l.Component);g.propTypes={children:m,language:f},t["default"]=g},function(e,t){e.exports=n(13)},function(e,t){e.exports=n(42)},function(e,t,n){var r=n(6);r.registerLanguage("1c",n(7)),r.registerLanguage("accesslog",n(8)),r.registerLanguage("actionscript",n(9)),r.registerLanguage("ada",n(10)),r.registerLanguage("apache",n(11)),r.registerLanguage("applescript",n(12)),r.registerLanguage("cpp",n(13)),r.registerLanguage("arduino",n(14)),r.registerLanguage("armasm",n(15)),r.registerLanguage("xml",n(16)),r.registerLanguage("asciidoc",n(17)),r.registerLanguage("aspectj",n(18)),r.registerLanguage("autohotkey",n(19)),r.registerLanguage("autoit",n(20)),r.registerLanguage("avrasm",n(21)),r.registerLanguage("axapta",n(22)),r.registerLanguage("bash",n(23)),r.registerLanguage("basic",n(24)),r.registerLanguage("bnf",n(25)),r.registerLanguage("brainfuck",n(26)),r.registerLanguage("cal",n(27)),r.registerLanguage("capnproto",n(28)),r.registerLanguage("ceylon",n(29)),r.registerLanguage("clojure",n(30)),r.registerLanguage("clojure-repl",n(31)),r.registerLanguage("cmake",n(32)),r.registerLanguage("coffeescript",n(33)),r.registerLanguage("coq",n(34)),r.registerLanguage("cos",n(35)),r.registerLanguage("crmsh",n(36)),r.registerLanguage("crystal",n(37)),r.registerLanguage("cs",n(38)),r.registerLanguage("csp",n(39)),r.registerLanguage("css",n(40)),r.registerLanguage("d",n(41)),r.registerLanguage("markdown",n(42)),r.registerLanguage("dart",n(43)),r.registerLanguage("delphi",n(44)),r.registerLanguage("diff",n(45)),r.registerLanguage("django",n(46)),r.registerLanguage("dns",n(47)),r.registerLanguage("dockerfile",n(48)),r.registerLanguage("dos",n(49)),r.registerLanguage("dsconfig",n(50)),r.registerLanguage("dts",n(51)),r.registerLanguage("dust",n(52)),r.registerLanguage("elixir",n(53)),r.registerLanguage("elm",n(54)),r.registerLanguage("ruby",n(55)),r.registerLanguage("erb",n(56)),r.registerLanguage("erlang-repl",n(57)),r.registerLanguage("erlang",n(58)),r.registerLanguage("excel",n(59)),r.registerLanguage("fix",n(60)),r.registerLanguage("fortran",n(61)),r.registerLanguage("fsharp",n(62)),r.registerLanguage("gams",n(63)),r.registerLanguage("gauss",n(64)),r.registerLanguage("gcode",n(65)),r.registerLanguage("gherkin",n(66)),r.registerLanguage("glsl",n(67)),r.registerLanguage("go",n(68)),r.registerLanguage("golo",n(69)),r.registerLanguage("gradle",n(70)),r.registerLanguage("groovy",n(71)),r.registerLanguage("haml",n(72)),r.registerLanguage("handlebars",n(73)),r.registerLanguage("haskell",n(74)),r.registerLanguage("haxe",n(75)),r.registerLanguage("hsp",n(76)),r.registerLanguage("htmlbars",n(77)),r.registerLanguage("http",n(78)),r.registerLanguage("inform7",n(79)),r.registerLanguage("ini",n(80)),r.registerLanguage("irpf90",n(81)),r.registerLanguage("java",n(82)),r.registerLanguage("javascript",n(83)),r.registerLanguage("json",n(84)),r.registerLanguage("julia",n(85)),r.registerLanguage("kotlin",n(86)),r.registerLanguage("lasso",n(87)),r.registerLanguage("ldif",n(88)),r.registerLanguage("less",n(89)),r.registerLanguage("lisp",n(90)),r.registerLanguage("livecodeserver",n(91)),r.registerLanguage("livescript",n(92)),r.registerLanguage("lsl",n(93)),r.registerLanguage("lua",n(94)),r.registerLanguage("makefile",n(95)),r.registerLanguage("mathematica",n(96)),r.registerLanguage("matlab",n(97)),r.registerLanguage("maxima",n(98)),r.registerLanguage("mel",n(99)),r.registerLanguage("mercury",n(100)),r.registerLanguage("mipsasm",n(101)),r.registerLanguage("mizar",n(102)),r.registerLanguage("perl",n(103)),r.registerLanguage("mojolicious",n(104)),r.registerLanguage("monkey",n(105)),r.registerLanguage("moonscript",n(106)),r.registerLanguage("nginx",n(107)),r.registerLanguage("nimrod",n(108)),r.registerLanguage("nix",n(109)),r.registerLanguage("nsis",n(110)),r.registerLanguage("objectivec",n(111)),r.registerLanguage("ocaml",n(112)),r.registerLanguage("openscad",n(113)),r.registerLanguage("oxygene",n(114)),r.registerLanguage("parser3",n(115)),r.registerLanguage("pf",n(116)),r.registerLanguage("php",n(117)),r.registerLanguage("pony",n(118)),r.registerLanguage("powershell",n(119)),r.registerLanguage("processing",n(120)),r.registerLanguage("profile",n(121)),r.registerLanguage("prolog",n(122)),r.registerLanguage("protobuf",n(123)),r.registerLanguage("puppet",n(124)),r.registerLanguage("purebasic",n(125)),r.registerLanguage("python",n(126)),r.registerLanguage("q",n(127)),r.registerLanguage("qml",n(128)),r.registerLanguage("r",n(129)),r.registerLanguage("rib",n(130)),r.registerLanguage("roboconf",n(131)),r.registerLanguage("rsl",n(132)),r.registerLanguage("ruleslanguage",n(133)),r.registerLanguage("rust",n(134)),r.registerLanguage("scala",n(135)),r.registerLanguage("scheme",n(136)),r.registerLanguage("scilab",n(137)),r.registerLangu