| !function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){function r(e,t,n){var r=document.createElement("div");r.className="ProseMirror-icon";var o=document.createElement("i");o.setAttribute("class","fa fa-fw "+n);var i=e.active(t);return(i||e.spec.invert)&&r.classList.add("ProseMirror-menu-active"),r.appendChild(o),r}function o(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function i(e){return o()?(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),!0):(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),!1)}attachDocumentEditor=function(t,n){var a=e("./prosemirror/dist/edit");e("./prosemirror/dist/inputrules/autoinput"),e("./prosemirror/dist/menu/menubar"),e("./prosemirror/dist/markdown");var s=e("./prosemirror/dist/menu/menu"),u=document.querySelector("#editor");u.style.display="none";var l=new s.MenuCommandGroup("gitblitCommands"),c=new s.MenuCommandGroup("viewCommands"),p=new s.MenuCommandGroup("textCommands"),f=new s.MenuCommandGroup("insertCommands"),h=[l,c,p,s.inlineGroup,s.blockGroup,s.historyGroup,f];const d=Object.create(null);d.GitblitCommit={label:"GitblitCommit",run:function(){n.modal({show:!0}),t.value=m.getContent("markdown")},menu:{group:"gitblitCommands",rank:10,display:{render:function(e,t){return r(e,t,"fa-save")}}}},d.FullScreen={label:"Toggle Fullscreen",derive:"toggle",run:function(e){var t=window.scrollY,n=[document.querySelector("div.repositorynavbar"),document.querySelector("div.navbar"),document.querySelector("div.docnav")],r=n.reduce(function(e,t){return e+t.offsetHeight},0);n.forEach(function(e){e.classList.toggle("forceHide")}),i(document.documentElement)?r-=60:r=60,e.signal("commandsChanged"),setTimeout(function(){window.scrollTo(0,Math.max(0,t-r))},100)},menu:{group:"viewCommands",rank:11,display:{render:function(e,t){return r(e,t,"fa-arrows-alt")}}},active:function(e){return o()?!0:!1}},d.heading1={derive:"toggle",run:function(e){var t=e.selection,n=t.from,r=t.to,o={name:"make",level:"1"},i=e.doc.resolve(n).parent;return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(n,r,e.schema.defaultTextblockType(),{}).apply(e.apply.scroll):e.tr.setBlockType(n,r,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.resolve(e.selection.from).parent;return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:"1"})?!0:!1},menu:{group:"textCommands",rank:1,display:{render:function(e,t){return r(e,t,"fa-header fa-header-x fa-header-1")}}},select:function(){return!0}},d.heading2={derive:"toggle",run:function(e){var t=e.selection,n=t.from,r=t.to,o={name:"make",level:"2"},i=e.doc.resolve(n).parent;return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(n,r,e.schema.defaultTextblockType(),{}).apply(e.apply.scroll):e.tr.setBlockType(n,r,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.resolve(e.selection.from).parent;return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:"2"})?!0:!1},menu:{group:"textCommands",rank:2,display:{render:function(e,t){return r(e,t,"fa-header fa-header-x fa-header-2")}}},select:function(){return!0}},d.heading3={derive:"toggle",run:function(e){var t=e.selection,n=t.from,r=t.to,o={name:"make",level:"3"},i=e.doc.resolve(n).parent;return i&&i.hasMarkup(e.schema.nodes.heading,o)?e.tr.setBlockType(n,r,e.schema.defaultTextblockType(),{}).apply(e.apply.scroll):e.tr.setBlockType(n,r,e.schema.nodes.heading,o).apply(e.apply.scroll)},active:function(e){var t=e.doc.resolve(e.selection.from).parent;return t&&t.hasMarkup(e.schema.nodes.heading,{name:"make",level:"3"})?!0:!1},menu:{group:"textCommands",rank:3,display:{render:function(e,t){return r(e,t,"fa-header fa-header-x fa-header-3")}}},select:function(){return!0}},d["strong:toggle"]={menu:{group:"textCommands",rank:4,display:{render:function(e,t){return r(e,t,"fa-bold")}}},select:function(){return!0}},d["em:toggle"]={menu:{group:"textCommands",rank:5,display:{render:function(e,t){return r(e,t,"fa-italic")}}},select:function(){return!0}},d["code:toggle"]={menu:{group:"textCommands",rank:6,display:{render:function(e,t){return r(e,t,"fa-code")}}},select:function(){return!0}},d["image:insert"]={menu:{group:"insertCommands",rank:1,display:{render:function(e,t){return r(e,t,"fa-picture-o")}}}},d.selectParentNode={menu:{group:"insertCommands",rank:10,display:{render:function(e,t){return r(e,t,"fa-arrow-circle-o-left")}}}};var m=window.pm=new a.ProseMirror({place:document.querySelector("#visualEditor"),autoInput:!0,doc:u.value,menuBar:{"float":!0,content:h},commands:a.CommandSet["default"].update(d),docFormat:"markdown"}),v=document.querySelector(".ProseMirror").offsetTop,g=!1;window.addEventListener("scroll",function(){var e=window.scrollY;g||window.requestAnimationFrame(function(){!o()&&e>v?document.querySelector(".ProseMirror-menubar").classList.add("scrolling"):document.querySelector(".ProseMirror-menubar").classList.remove("scrolling"),g=!1}),g=!0})},commitChanges=function(){document.querySelector("form#documentEditor").submit()}},{"./prosemirror/dist/edit":13,"./prosemirror/dist/inputrules/autoinput":27,"./prosemirror/dist/markdown":30,"./prosemirror/dist/menu/menu":33,"./prosemirror/dist/menu/menubar":34}],2:[function(e,t,n){(function(e){!function(r){function o(e){throw new RangeError(j[e])}function i(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function a(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(P,".");var o=e.split("."),a=i(o,t).join(".");return r+a}function s(e){for(var t,n,r=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):r.push(t);return r}function u(e){return i(e,function(e){var t="";return e>65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function l(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:_}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?z(e/M):e>>1,e+=z(e/t);e>q*C>>1;r+=_)e=z(e/q);return z(r+(q+1)*e/(e+S))}function f(e){var t,n,r,i,a,s,c,f,h,d,m=[],v=e.length,g=0,y=A,k=O;for(n=e.lastIndexOf(T),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;v>i;){for(a=g,s=1,c=_;i>=v&&o("invalid-input"),f=l(e.charCodeAt(i++)),(f>=_||f>z((w-g)/s))&&o("overflow"),g+=f*s,h=k>=c?x:c>=k+C?C:c-k,!(h>f);c+=_)d=_-h,s>z(w/d)&&o("overflow"),s*=d;t=m.length+1,k=p(g-a,t,0==a),z(g/t)>w-y&&o("overflow"),y+=z(g/t),g%=t,m.splice(g++,0,y)}return u(m)}function h(e){var t,n,r,i,a,u,l,f,h,d,m,v,g,y,k,b=[];for(e=s(e),v=e.length,t=A,n=0,a=O,u=0;v>u;++u)m=e[u],128>m&&b.push(R(m));for(r=i=b.length,i&&b.push(T);v>r;){for(l=w,u=0;v>u;++u)m=e[u],m>=t&&l>m&&(l=m);for(g=r+1,l-t>z((w-n)/g)&&o("overflow"),n+=(l-t)*g,t=l,u=0;v>u;++u)if(m=e[u],t>m&&++n>w&&o("overflow"),m==t){for(f=n,h=_;d=a>=h?x:h>=a+C?C:h-a,!(d>f);h+=_)k=f-d,y=_-d,b.push(R(c(d+k%y,0))),f=z(k/y);b.push(R(c(f,0))),a=p(n,g,r==i),n=0,++r}++n,++t}return b.join("")}function d(e){return a(e,function(e){return E.test(e)?f(e.slice(4).toLowerCase()):e})}function m(e){return a(e,function(e){return D.test(e)?"xn--"+h(e):e})}var v="object"==typeof n&&n&&!n.nodeType&&n,g="object"==typeof t&&t&&!t.nodeType&&t,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(r=y);var k,b,w=2147483647,_=36,x=1,C=26,S=38,M=700,O=72,A=128,T="-",E=/^xn--/,D=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=_-x,z=Math.floor,R=String.fromCharCode;if(k={version:"1.3.2",ucs2:{decode:s,encode:u},decode:f,encode:h,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return k});else if(v&&g)if(t.exports==v)g.exports=k;else for(b in k)k.hasOwnProperty(b)&&(v[b]=k[b]);else r.punycode=k}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,n){"use strict";function r(e,t){var n=document.createElement(e);if(t)for(var r in t)"style"==r?n.style.cssText=t[r]:null!=t[r]&&n.setAttribute(r,t[r]);for(var i=arguments.length,a=Array(i>2?i-2:0),s=2;i>s;s++)a[s-2]=arguments[s];for(var u=0;u<a.length;u++)o(a[u],n);return n}function o(e,t){if("string"==typeof e&&(e=document.createTextNode(e)),Array.isArray(e))for(var n=0;n<e.length;n++)o(e[n],t);else t.appendChild(e)}function i(e){return c?c(e):setTimeout(e,10)}function a(e){return c?p(e):void clearTimeout(e)}function s(e,t){return 1!=t.nodeType&&(t=t.parentNode),t&&e.contains(t)}function u(e){m?m.textContent+=e:d+=e}function l(){m||(m=document.createElement("style"),m.textContent="/* ProseMirror CSS */\n"+d,document.head.insertBefore(m,document.head.firstChild))}Object.defineProperty(n,"__esModule",{value:!0}),n.elt=r,n.requestAnimationFrame=i,n.cancelAnimationFrame=a,n.contains=s,n.insertCSS=u,n.ensureCSSAdded=l;var c=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,p=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame,f=/MSIE \d/.test(navigator.userAgent),h=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),d=(n.browser={mac:/Mac/.test(navigator.platform),ie_upto10:f,ie_11up:h,ie:f||h,gecko:/gecko\/\d/i.test(navigator.userAgent),ios:/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)},""),m=null},{}],4:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n=e.doc.resolve(t),o=n.nodeBefore,i=n.nodeAfter;if(o.type.canContainContent(i.type)){var a=e.tr.join(t);if(a.steps.length&&0==o.content.size&&!o.sameMarkup(i)&&a.setNodeType(t-o.nodeSize,i.type,i.attrs),a.apply(e.apply.scroll)!==!1)return}var s=void 0;if(i.isTextblock&&(s=o.type.findConnection(i.type))){var a=e.tr,u=t+i.nodeSize;if(a.step("ancestor",t,u,{types:[o.type].concat(r(s)),attrs:[o.attrs].concat(r(s.map(function(){return null})))}),a.join(u+2*s.length+2,1,!0),a.join(t),a.apply(e.apply.scroll)!==!1)return}var l=(0,f.findSelectionFrom)(e.doc,t,1);return e.tr.lift(l.from,l.to,!0).apply(e.apply.scroll)}function i(e,t,n){if("char"!=n&&"word"!=n)throw new RangeError("Unknown motion unit: "+n);for(var r=e.resolve(t),o=r.parent,i=r.parentOffset,a=null,s=0;;){if(0==i)return t;var u=o.childBefore(i),l=u.offset,c=u.node;if(!c)return t;if(!c.isText)return a?t:t-1;if("char"==n)for(var f=i-l;f>0;f--){if(!(0,p.isExtendingChar)(c.text.charAt(f-1)))return t-1;i--,t--}else if("word"==n)for(var f=i-l;f>0;f--){var h=(0,p.charCategory)(c.text.charAt(f-1));if(null==a||1==s&&"space"==a)a=h;else if(a!=h)return t;i--,t--,s++}}}function a(e,t,n){if("char"!=n&&"word"!=n)throw new RangeError("Unknown motion unit: "+n);for(var r=e.resolve(t),o=r.parent,i=r.parentOffset,a=null,s=0;;){if(i==o.content.size)return t;var u=o.childAfter(i),l=u.offset,c=u.node;if(!c)return t;if(!c.isText)return a?t:t+1;if("char"==n)for(var f=i-l;f<c.text.length;f++){if(!(0,p.isExtendingChar)(c.text.charAt(f+1)))return t+1;i++,t++}else if("word"==n)for(var f=i-l;f<c.text.length;f++){var h=(0,p.charCategory)(c.text.charAt(f));if(null==a||1==s&&"space"==a)a=h;else if(a!=h)return t;i++,t++,s++}}}function s(e){var t=e.selection,n=t.node,r=t.from;return n?(0,c.joinable)(e.doc,r)?r:null:(0,c.joinPoint)(e.doc,r,-1)}function u(e){var t=e.selection,n=t.node,r=t.to;return n?(0,c.joinable)(e.doc,r)?r:null:(0,c.joinPoint)(e.doc,r,1)}function l(e){var t=e.selection;if(t.node){var n=e.doc.resolve(t.from);return!!n.depth&&n.before(n.depth)}var r=e.doc.resolve(t.head),o=r.sameDepth(e.doc.resolve(t.anchor));return 0==o?!1:r.before(o)}Object.defineProperty(n,"__esModule",{value:!0}),n.baseCommands=void 0;var c=e("../transform"),p=e("./char"),f=e("./selection"),h=n.baseCommands=Object.create(null);h.deleteSelection={label:"Delete the selection",run:function(e){return e.tr.replaceSelection().apply(e.apply.scroll)},keys:{all:["Backspace(10)","Delete(10)","Mod-Backspace(10)","Mod-Delete(10)"],mac:["Ctrl-H(10)","Alt-Backspace(10)","Ctrl-D(10)","Ctrl-Alt-Backspace(10)","Alt-Delete(10)","Alt-D(10)"]}},h.joinBackward={label:"Join with the block above",run:function(e){var t=e.selection,n=t.head,r=t.empty;if(!r)return!1;var i=e.doc.resolve(n);if(i.parentOffset>0)return!1;for(var a=void 0,s=void 0,u=i.depth-1;!a&&u>=0;u--)i.index(u)>0&&(s=i.before(u+1),a=i.node(u).child(i.index(u)-1));if(!a)return e.tr.lift(n,n,!0).apply(e.apply.scroll);if(null==a.type.contains&&a.type.selectable&&0==i.parent.content.size){var l=e.tr["delete"](s,s+i.parent.nodeSize).apply(e.apply.scroll);return e.setNodeSelection(s-a.nodeSize),l}return null==a.type.contains?e.tr["delete"](s-a.nodeSize,s).apply(e.apply.scroll):o(e,s)},keys:["Backspace(30)","Mod-Backspace(30)"]},h.deleteCharBefore={label:"Delete a character before the cursor",run:function(e){var t=e.selection,n=t.head,r=t.empty;if(!r||0==e.doc.resolve(n).parentOffset)return!1;var o=i(e.doc,n,"char");return e.tr["delete"](o,n).apply(e.apply.scroll)},keys:{all:["Backspace(60)"],mac:["Ctrl-H(40)"]}},h.deleteWordBefore={label:"Delete the word before the cursor",run:function(e){var t=e.selection,n=t.head,r=t.empty;if(!r||0==e.doc.resolve(n).parentOffset)return!1;var o=i(e.doc,n,"word");return e.tr["delete"](o,n).apply(e.apply.scroll)},keys:{all:["Mod-Backspace(40)"],mac:["Alt-Backspace(40)"]}},h.joinForward={label:"Join with the block below",run:function(e){var t=e.selection,n=t.head,r=t.empty,i=void 0;if(!r||(i=e.doc.resolve(n)).parentOffset<i.parent.content.size)return!1;for(var a=void 0,s=void 0,u=i.depth-1;!a&&u>=0;u--){var l=i.node(u);i.index(u)+1<l.childCount&&(a=l.child(i.index(u)+1),s=i.after(u+1))}return a?null==a.type.contains?e.tr["delete"](s,s+a.nodeSize).apply(e.apply.scroll):o(e,s):!1},keys:["Delete(30)","Mod-Delete(30)"]},h.deleteCharAfter={label:"Delete a character after the cursor",run:function(e){var t=e.selection,n=t.head,r=t.empty,o=void 0;if(!r||(o=e.doc.resolve(n)).parentOffset==o.parent.content.size)return!1;var i=a(e.doc,n,"char");return e.tr["delete"](n,i).apply(e.apply.scroll)},keys:{all:["Delete(60)"],mac:["Ctrl-D(60)"]}},h.deleteWordAfter={label:"Delete a word after the cursor",run:function(e){var t=e.selection,n=t.head,r=t.empty,o=void 0;if(!r||(o=e.doc.resolve(n)).parentOffset==o.parent.content.size)return!1;var i=a(e.doc,n,"word");return e.tr["delete"](n,i).apply(e.apply.scroll)},keys:{all:["Mod-Delete(40)"],mac:["Ctrl-Alt-Backspace(40)","Alt-Delete(40)","Alt-D(40)"]}},h.joinUp={label:"Join with above block",run:function(e){var t=s(e),n=void 0;return t?(e.selection.node&&(n=t-e.doc.resolve(t).nodeBefore.nodeSize),e.tr.join(t).apply(),void(null!=n&&e.setNodeSelection(n))):!1},select:function(e){return s(e)},menu:{group:"block",rank:80,display:{type:"icon",width:800,height:900,path:"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z"}},keys:["Alt-Up"]},h.joinDown={label:"Join with below block",run:function(e){var t=e.selection.node,n=e.selection.from,r=u(e);return r?(e.tr.join(r).apply(),void(t&&e.setNodeSelection(n))):!1},select:function(e){return u(e)},keys:["Alt-Down"]},h.lift={label:"Lift out of enclosing block",run:function(e){var t=e.selection,n=t.from,r=t.to;return e.tr.lift(n,r,!0).apply(e.apply.scroll)},select:function(e){var t=e.selection,n=t.from,r=t.to;return(0,c.canLift)(e.doc,n,r)},menu:{group:"block",rank:75,display:{type:"icon",width:1024,height:1024,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"}},keys:["Mod-["]},h.newlineInCode={label:"Insert newline",run:function(e){var t=e.selection,n=t.from,r=t.to,o=t.node;if(o)return!1;var i=e.doc.resolve(n);return!i.parent.type.isCode||r>=i.end(i.depth)?!1:e.tr.typeText("\n").apply(e.apply.scroll)},keys:["Enter(10)"]},h.createParagraphNear={label:"Create a paragraph near the selected block",run:function(e){var t=e.selection,n=t.from,r=t.to,o=t.node;if(!o||!o.isBlock)return!1;var i=e.doc.resolve(n).parentOffset?r:n;e.tr.insert(i,e.schema.defaultTextblockType().create()).apply(e.apply.scroll),e.setTextSelection(i+1)},keys:["Enter(20)"]},h.liftEmptyBlock={label:"Move current block up",run:function(e){var t=e.selection,n=t.head,r=t.empty,o=void 0;return!r||(o=e.doc.resolve(n)).parentOffset>0||o.parent.content.size?!1:o.depth>1&&o.index(o.depth-1)>0&&o.index(o.depth-1)<o.node(o.depth-1).childCount-1&&e.tr.split(o.before(o.depth)).apply()!==!1?void 0:e.tr.lift(n,n,!0).apply(e.apply.scroll)},keys:["Enter(30)"]},h.splitBlock={label:"Split the current block",run:function(e){var t=e.selection,n=t.from,r=t.to,o=t.node,i=e.doc.resolve(n);if(o&&o.isBlock)return i.parentOffset?e.tr.split(n).apply(e.apply.scroll):!1;var a=e.doc.resolve(r),s=a.parentOffset==a.parent.content.size,u=e.schema.defaultTextblockType(),l=s?u:null,c=e.tr["delete"](n,r).split(n,1,l);return s||i.parentOffset||i.parent.type==u||c.setNodeType(i.before(i.depth),u),c.apply(e.apply.scroll)},keys:["Enter(60)"]},h.selectParentNode={label:"Select parent node",run:function(e){var t=l(e);return t===!1?!1:void e.setNodeSelection(t)},select:function(e){return l(e)},menu:{group:"block",rank:90,display:{type:"icon",text:"⬚",style:"font-weight: bold"}},keys:["Esc"]},h.undo={label:"Undo last change",run:function(e){return e.scrollIntoView(),e.history.undo()},select:function(e){return e.history.undoDepth>0},menu:{group:"history",rank:10,display:{type:"icon",width:1024,height:1024,path:"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z"}},keys:["Mod-Z"]},h.redo={label:"Redo last undone change",run:function(e){return e.scrollIntoView(),e.history.redo()},select:function(e){return e.history.redoDepth>0},menu:{group:"history",rank:20,display:{type:"icon",width:1024,height:1024,path:"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z"}},keys:["Mod-Y","Shift-Mod-Z"]}},{"../transform":45,"./char":6,"./selection":19}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){}function i(e,t){var n=e.selection,r=n.from,o=n.to,i=n.node,a=e.doc.resolve(t>0?o:r);return(0,f.findSelectionFrom)(e.doc,i&&i.isBlock?a.pos:t>0?a.after(a.depth):a.before(a.depth),t)}function a(e,t){var n=e.selection,r=n.empty,o=n.node,a=n.from,s=n.to;if(!r&&!o)return!1;if(o&&o.isInline)return e.setTextSelection(t>0?s:a),!0;if(!o){var u=e.doc.resolve(a),l=t>0?u.parent.childAfter(u.parentOffset):u.parent.childBefore(u.parentOffset),c=l.node,p=l.offset;if(c)return c.type.selectable&&p==u.parentOffset-(t>0?0:c.nodeSize)?(e.setNodeSelection(0>t?a-c.nodeSize:a),!0):!1}var h=i(e,t);return h&&(h instanceof f.NodeSelection||o)?(e.setSelection(h),!0):!1}function s(e){return function(t){var n=a(t,e);return n&&t.scrollIntoView(),n}}function u(e,t){var n=e.selection,r=n.empty,o=n.node,a=n.from,s=n.to;if(!r&&!o)return!1;var u=!0;if((!o||o.isInline)&&(e.flush(),u=(0,f.verticalMotionLeavesTextblock)(e,t>0?s:a,t)),u){var l=i(e,t);if(l&&l instanceof f.NodeSelection)return e.setSelection(l),!0}if(!o||o.isInline)return!1;var c=(0,f.findSelectionFrom)(e.doc,0>t?a:s,t);return c&&e.setSelection(c),!0}function l(e){return function(t){var n=u(t,e);return n!==!1&&t.scrollIntoView(),n}}Object.defineProperty(n,"__esModule",{value:!0}),n.captureKeys=void 0;var c=e("browserkeymap"),p=r(c),f=e("./selection"),h=e("../dom"),d={Esc:o,Enter:o,"Ctrl-Enter":o,"Mod-Enter":o,"Shift-Enter":o,Backspace:o,Delete:o,"Mod-B":o,"Mod-I":o,"Mod-Backspace":o,"Mod-Delete":o,"Shift-Backspace":o,"Shift-Delete":o,"Shift-Mod-Backspace":o,"Shift-Mod-Delete":o,"Mod-Z":o,"Mod-Y":o,"Shift-Mod-Z":o,"Ctrl-D":o,"Ctrl-H":o,"Ctrl-Alt-Backspace":o,"Alt-D":o,"Alt-Delete":o,"Alt-Backspace":o,Left:s(-1),"Mod-Left":s(-1),Right:s(1),"Mod-Right":s(1),Up:l(-1),Down:l(1)};h.browser.mac&&(d["Alt-Left"]=s(-1),d["Alt-Right"]=s(1),d["Ctrl-Backspace"]=d["Ctrl-Delete"]=o);n.captureKeys=new p["default"](d)},{"../dom":3,"./selection":19,browserkeymap:60}],6:[function(e,t,n){"use strict";function r(e){return/\w/.test(e)||i(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||a.test(e))}function o(e){return/\s/.test(e)?"space":r(e)?"word":"other"}function i(e){return e.charCodeAt(0)>=768&&s.test(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.isWordChar=r,n.charCategory=o,n.isExtendingChar=i;var a=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,s=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/},{}],7:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){if(!t.derive)return t;var r="object"==b(t.derive)?t.derive:{},o=r.name||n,i=e.constructor.derivableCommands[o];if(!i)throw new RangeError("Don't know how to derive command "+o);var a=i.call(e,r);for(var s in t)"derive"!=s&&(a[s]=t[s]);return a}function s(e){function t(e,t){for(var r=0;r<t.length;r++){var o=/^(.+?)(?:\((\d+)\))?$/.exec(t[r]),i=k(o,3),a=(i[0],i[1]),s=i[2],u=void 0===s?50:s;(0,A["default"])(n[a]||(n[a]=[]),{command:e,rank:u},function(e,t){return e.rank-t.rank})}}var n={},r=M.browser.mac?"mac":"pc";for(var o in e.commands){var i=e.commands[o],a=i.spec.keys;a&&(Array.isArray(a)?t(i,a):(a.all&&t(i,a.all),a[r]&&t(i,a[r])))}for(var s in n)n[s]=n[s].map(function(e){return e.command.name});return new x["default"](n)}function u(e,t){e.signal("commandsChanging"),e.commands=t.derive(e.schema),e.input.baseKeymap=s(e),e.commandKeys=Object.create(null),e.signal("commandsChanged")}function l(e,t){var n=e.selection;return n.empty?t.isInSet(e.activeMarks()):e.doc.rangeHasMark(n.from,n.to,t)}function c(e,t){var n=e.selection,r=n.from,o=n.to,i=n.empty;if(i)return!t.isInSet(e.activeMarks())&&e.doc.resolve(r).parent.type.canContainMark(t);var a=!1;return e.doc.nodesBetween(r,o,function(e){return a||e.isTextblock&&!e.type.canContainMark(t)?!1:void(e.isInline&&!t.isInSet(e.marks)&&(a=!0))}),a}function p(e,t){var n=e.selection,r=n.from,o=n.to,i=!1;return e.doc.nodesBetween(r,o,function(e){return e.isTextblock?(e.type.canContainMark(t)&&(i=!0),!1):void 0}),i}function f(e,t,n){var r=e.selection,o=r.from,i=r.to,a=r.empty,s=void 0,u=void 0;if(a)s=u=t.isInSet(e.activeMarks());else{var l=e.doc.resolve(o).nodeAfter;s=l?t.isInSet(l.marks):null,u=t.isInSet(e.doc.marksAt(i))}return s&&u&&s.attrs[n]==u.attrs[n]?s.attrs[n]:void 0}function h(e,t,n){var r=e.selection.node;return r&&r.type==t?r.attrs[n]:void 0}function d(e,t){return t&&t.map(function(t){var n=e.attrs[t.attr],r={type:"text","default":n["default"],prefill:e instanceof C.NodeType?function(e){return h(e,this,t.attr)}:function(e){return f(e,this,t.attr)}};for(var o in t)r[o]=t[o];return r})}function m(e,t){var n=e.attrs;return e.params&&!function(){var r=Object.create(null);if(n)for(var o in n)r[o]=n[o];e.params.forEach(function(e,n){return r[e.attr]=t[n]}),n=r}(),n}function v(e,t,n,r){var o=e.resolve(t);return o.sameParent(e.resolve(n))&&o.depth>=2&&0==o.index(o.depth-1)&&r.canContain(o.node(o.depth-1))}function g(e,t,n,r,o){var i=!1;return o||(o={}),e.nodesBetween(t,n||t,function(e){return e.isTextblock?(e.hasMarkup(r,o)&&(i=!0),!1):void 0}),i}function y(e,t,n){var r=e.selection,o=r.from,i=r.to,a=r.node;if(!a||a.isInline){var s=e.doc.resolve(o);if(!s.sameParent(e.doc.resolve(i)))return!1;a=s.parent}else if(!a.isTextblock)return!1;return a.hasMarkup(t,n)}var k=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},w=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.CommandSet=n.Command=void 0,n.updateCommands=u,n.selectedNodeAttr=h;var _=e("browserkeymap"),x=r(_),C=e("../model"),S=e("../transform"),M=e("../dom"),O=e("../util/sortedinsert"),A=r(O),T=e("../util/obj"),E=e("./base_commands"),D=n.Command=function(){function e(t,n,r){if(i(this,e),this.name=r,!this.name)throw new RangeError("Trying to define a command without a name");this.spec=t,this.self=n}return w(e,[{key:"exec",value:function(e,t){var n=this.spec.run;if(t){if(this.params.length!=(t?t.length:0))throw new RangeError("Invalid amount of parameters for command "+this.name);return n.call.apply(n,[this.self,e].concat(o(t)))}return this.params.length?new e.options.commandParamPrompt(e,this).open():n.call(this.self,e)}},{key:"select",value:function(e){var t=this.spec.select;return t?t.call(this.self,e):!0}},{key:"active",value:function(e){var t=this.spec.active;return t?t.call(this.self,e):!1}},{key:"params",get:function(){return this.spec.params||P}},{key:"label",get:function(){return this.spec.label||this.name}}]),e}(),P=[],j=function(){function e(t,n){i(this,e),this.base=t,this.op=n}return w(e,[{key:"add",value:function(t,n){return new e(this,function(e,r){function o(t,r,o){if(!n||n(t,r)){if(e[t])throw new RangeError("Duplicate definition of command "+t);e[t]=new D(r,o,t)}}if("schema"===t)r.registry("command",function(e,t,n,r){o(r+":"+e,a(n,t,e),n)});else for(var i in t)o(i,t[i])})}},{key:"update",value:function(t){return new e(this,function(e){for(var n in t){var r=t[n];if(r)if(r.run)e[n]=new D(r,null,n);else{var o=e[n];o&&(e[n]=new D((0,T.copyObj)(r,(0,T.copyObj)(o.spec)),o.self,n))}else delete e[n]}})}},{key:"derive",value:function(e){var t=this.base?this.base.derive(e):Object.create(null);return this.op(t,e),t}}]),e}();n.CommandSet=j,j.empty=new j(null,function(){return null}),j["default"]=j.empty.add("schema").add(E.baseCommands),C.NodeType.derivableCommands=Object.create(null),C.MarkType.derivableCommands=Object.create(null),C.MarkType.derivableCommands.set=function(e){return{run:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];t.setMark(this,!0,m(e,r))},select:function(t){return e.inverseSelect?p(t,this)&&!l(t,this):c(t,this)},params:d(this,e.params)}},C.MarkType.derivableCommands.unset=function(){return{run:function(e){e.setMark(this,!1)},select:function(e){return l(e,this)}}},C.MarkType.derivableCommands.toggle=function(){return{run:function(e){e.setMark(this,null)},active:function(e){return l(e,this)},select:function(e){return p(e,this)}}},C.NodeType.derivableCommands.wrap=function(e){return{run:function(t){var n=t.selection,r=n.from,o=n.to,i=n.head,a=!1,s=t.doc.resolve(r);if(e.list&&i&&v(t.doc,r,o,this)){if(0==s.index(s.depth-2))return!1;a=!0}for(var u=arguments.length,l=Array(u>1?u-1:0),c=1;u>c;c++)l[c-1]=arguments[c];var p=t.tr.wrap(r,o,this,m(e,l));return a&&p.join(s.before(s.depth-1)),p.apply(t.apply.scroll)},select:function(t){var n=t.selection,r=n.from,o=n.to,i=n.head,a=void 0;return e.list&&i&&v(t.doc,r,o,this)&&0==(a=t.doc.resolve(r)).index(a.depth-2)?!1:(0,S.canWrap)(t.doc,r,o,this,e.attrs)},params:d(this,e.params)}},C.NodeType.derivableCommands.make=function(e){return{run:function(t){var n=t.selection,r=n.from,o=n.to;return t.tr.setBlockType(r,o,this,e.attrs).apply(t.apply.scroll)},select:function(t){var n=t.selection,r=n.from,o=n.to,i=n.node;return i?i.isTextblock&&!i.hasMarkup(this,e.attrs):!g(t.doc,r,o,this,e.attrs)},active:function(t){return y(t,this,e.attrs)}}},C.NodeType.derivableCommands.insert=function(e){return{run:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return t.tr.replaceSelection(this.create(m(e,r))).apply(t.apply.scroll)},select:this.isInline?function(e){return e.doc.resolve(e.selection.from).parent.type.canContainType(this)}:null,params:d(this,e.params)}}},{"../dom":3,"../model":38,"../transform":45,"../util/obj":58,"../util/sortedinsert":59,"./base_commands":4,browserkeymap:60}],8:[function(e,t,n){"use strict";var r=e("../dom");(0,r.insertCSS)('\n\n.ProseMirror {\n border: 1px solid silver;\n position: relative;\n}\n\n.ProseMirror-content {\n padding: 4px 8px 4px 14px;\n white-space: pre-wrap;\n line-height: 1.2;\n}\n\n.ProseMirror-drop-target {\n position: absolute;\n width: 1px;\n background: #666;\n}\n\n.ProseMirror-content ul.tight p, .ProseMirror-content ol.tight p {\n margin: 0;\n}\n\n.ProseMirror-content ul, .ProseMirror-content ol {\n padding-left: 30px;\n cursor: default;\n}\n\n.ProseMirror-content blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0; margin-right: 0;\n}\n\n.ProseMirror-content pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-nodeselection *::selection { background: transparent; }\n.ProseMirror-nodeselection *::-moz-selection { background: transparent; }\n\n.ProseMirror-content p:first-child,\n.ProseMirror-content h1:first-child,\n.ProseMirror-content h2:first-child,\n.ProseMirror-content h3:first-child,\n.ProseMirror-content h4:first-child,\n.ProseMirror-content h5:first-child,\n.ProseMirror-content h6:first-child {\n margin-top: .3em;\n}\n\n/* Add space around the hr to make clicking it easier */\n\n.ProseMirror-content hr {\n position: relative;\n height: 6px;\n border: none;\n}\n\n.ProseMirror-content hr:after {\n content: "";\n position: absolute;\n left: 10px;\n right: 10px;\n top: 2px;\n border-top: 2px solid silver;\n}\n\n.ProseMirror-content img {\n cursor: default;\n}\n\n/* Make sure li selections wrap around markers */\n\n.ProseMirror-content li {\n position: relative;\n pointer-events: none; /* Don\'t do weird stuff with marker clicks */\n}\n.ProseMirror-content li > * {\n pointer-events: auto;\n}\n\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: "";\n position: absolute;\n left: -32px;\n right: -2px; top: -2px; bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n'); |
| },{"../dom":3}],9:[function(e,t,n){"use strict";function r(e){return e.ensureOperation({readSelection:!1}),c(e,u(e))}function o(e,t){return c(e,l(e,t))}function i(e,t,n){for(var r=(0,y.DOMFromPos)(e,t,!0),o=r.node,i=r.offset,a=(0,y.DOMFromPos)(e,n,!0).offset;i;){var s=o.childNodes[i-1];if(1==s.nodeType&&s.hasAttribute("pm-offset"))break;--i}for(;a<o.childNodes.length;){var u=o.childNodes[a];if(1==u.nodeType&&u.hasAttribute("pm-offset"))break;++a}return(0,m.fromDOM)(e.schema,o,{topNode:e.doc.resolve(t).parent.copy(),from:i,to:a,preserveWhitespace:!0,editableContent:!0})}function a(e,t){for(var n=t||0;n<e.depth;n++)if(e.index(n)+1<e.node(n).childCount)return!1;return e.parentOffset==e.parent.content.size}function s(e,t){for(var n=t||0;n<e.depth;n++)if(e.index(0)>0)return!1;return 0==e.parentOffset}function u(e){var t=e.operation,n=t.sel,r=t.doc,o=r.resolve(n.from),i=r.resolve(n.to);if(o.sameParent(i)&&o.parent.isTextblock&&o.parentOffset&&i.parentOffset<i.parent.content.size)return l(e,0);for(var u=0;;u++){var c=s(o,u+1),p=a(i,u+1);if(c||p||o.index(u)!=i.index(u)||i.node(u).isTextblock){var f=o.before(u+1),h=i.after(u+1);return c&&o.index(u)>0&&(f-=o.node(u).child(o.index(u)-1).nodeSize),p&&i.index(u)+1<i.node(u).childCount&&(h+=i.node(u).child(i.index(u)+1).nodeSize),{from:f,to:h}}}}function l(e,t){var n=e.operation,r=n.sel,o=n.doc,i=o.resolve(r.from),a=o.resolve(r.to);if(!i.sameParent(a))return u(e);var s=Math.max(0,i.parentOffset-t),l=i.parent.content.size,c=Math.min(l,a.parentOffset+t);if(s>0&&(s=i.parent.childBefore(s).offset),l>c){var p=i.parent.childAfter(c);c=p.offset+p.node.nodeSize}var f=i.start(i.depth);return{from:f+s,to:f+c}}function c(e,t){var n=e.operation;if(n.docSet)return void e.markAllDirty();var r=i(e,t.from,t.to),o=n.doc.slice(t.from,t.to),a=f(o.content,r.content,t.from,n.sel.from);if(a){var s=(0,v.mapThroughResult)(n.mappings,a.start),u=(0,v.mapThroughResult)(n.mappings,a.endA);if(!s.deleted||!u.deleted){h(e,n.doc,a.start,a.endA);var l=r.resolveNoCache(a.start-t.from),c=r.resolveNoCache(a.endB-t.from),d=void 0,m=void 0;if(!l.sameParent(c)&&l.pos<r.content.size&&(d=(0,g.findSelectionFrom)(r,l.pos+1,1,!0))&&d.head==c.pos)e.input.dispatchKey("Enter");else if(l.sameParent(c)&&l.parent.isTextblock&&null!=(m=p(r,l.pos,c.pos)))e.input.insertText(s.pos,u.pos,m);else{var y=r.slice(a.start-t.from,a.endB-t.from);e.tr.replace(s.pos,u.pos,y).apply(e.apply.scroll)}}}}function p(e,t,n){var r="",o=!0,i=null;return e.nodesBetween(t,n,function(e,a){if(e.isInline||!(t>a)){if(!e.isText)return o=!1;i?d.Mark.sameSet(i,e.marks)||(o=!1):i=e.marks,r+=e.text.slice(Math.max(0,t-a),n-a)}}),o?r:null}function f(e,t,n,r){var o=(0,d.findDiffStart)(e,t,n);if(!o)return null;var i=(0,d.findDiffEnd)(e,t,n+e.size,n+t.size),a=i.a,s=i.b;if(o>a){var u=o>=r&&r>=a?o-r:0;o-=u,s=o+(s-a),a=o}else if(o>s){var u=o>=r&&r>=s?o-r:0;o-=u,a=o+(a-s),s=o}return{start:o,endA:a,endB:s}}function h(e,t,n,r){var o=t.resolve(n),i=t.resolve(r),a=o.sameDepth(i);0==a?e.markAllDirty():e.markRangeDirty(o.before(a),o.after(a),t)}Object.defineProperty(n,"__esModule",{value:!0}),n.readInputChange=r,n.readCompositionChange=o;var d=e("../model"),m=e("../format"),v=e("../transform/map"),g=e("./selection"),y=e("./dompos")},{"../format":23,"../model":38,"../transform/map":47,"./dompos":10,"./selection":19}],10:[function(e,t,n){"use strict";function r(e,t){for(var n=0,r=0,o=t;o!=e.content;o=o.parentNode){var i=o.getAttribute("pm-offset");i&&(n+=+i+r,r=1)}return n}function o(e,t,n){if(e.operation&&e.doc!=e.operation.doc)throw new RangeError("Fetching a position from an outdated DOM structure");null==n&&(n=Array.prototype.indexOf.call(t.parentNode.childNodes,t),t=t.parentNode);for(var o=0,a=void 0;;){var s=0;if(3==t.nodeType)o+=n;else{if(a=t.getAttribute("pm-offset")&&!i(t)){var u=+t.getAttribute("pm-size");return r(e,t)+(n==t.childNodes.length?u:Math.min(o,u))}if(t.hasAttribute("pm-container"))break;(a=t.getAttribute("pm-inner-offset"))?(o+=+a,s=-1):n&&n==t.childNodes.length&&(s=1)}var l=t.parentNode;n=0>s?0:Array.prototype.indexOf.call(l.childNodes,t)+s,t=l}for(var c=t==e.content?0:r(e,t)+1,p=0,f=t.childNodes[n-1];f;f=f.previousSibling)if(1==f.nodeType&&(a=f.getAttribute("pm-offset"))){p+=+a+ +f.getAttribute("pm-size");break}return c+p+o}function i(e){return e.hasAttribute("pm-container")?e:e.querySelector("[pm-container]")}function a(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,o=t;;)for(var a=r.firstChild,s=0;;a=a.nextSibling,s++){if(!a){if(o&&!n)throw new RangeError("Failed to find node at "+t+" rem = "+o);return{node:r,offset:s}}var l=1==a.nodeType&&a.getAttribute("pm-size");if(l){if(!o)return{node:r,offset:s};if(l=+l,l>o){if(r=i(a)){o--;break}return u(a,o)}o-=l}}}function s(e,t){var n=a(e,t),r=n.node,o=n.offset;if(1!=r.nodeType||o==r.childNodes.length)throw new RangeError("No node after pos "+t);return r.childNodes[o]}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 o=n.nextSibling,i=void 0;if(!o||(i=+o.getAttribute("pm-inner-offset"))>=t)break;n=o,r=i}t-=r}e=n}}function l(){return{left:0,right:window.innerWidth,top:0,bottom:window.innerHeight}}function c(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 o=r==document.body,i=o?l():r.getBoundingClientRect(),a=0,s=0;if(n.top<i.top?s=-(i.top-n.top+b):n.bottom>i.bottom&&(s=n.bottom-i.bottom+b),n.left<i.left?a=-(i.left-n.left+b):n.right>i.right&&(a=n.right-i.right+b),(a||s)&&(o?window.scrollBy(a,s):(s&&(r.scrollTop+=s),a&&(r.scrollLeft+=a))),o)break}}function p(e,t){for(var n=void 0,r=1e8,o=void 0,i=0,a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=m(a)}for(var u=0;u<s.length;u++){var l=s[u];if(l.left<=t.left&&l.right>=t.left){var c=l.top>t.top?l.top-t.top:l.bottom<t.top?t.top-l.bottom:0;if(r>c){n=a,r=c,o=c?{left:t.left,top:l.top}:t,1!=a.nodeType||a.firstChild||(i=u+(t.left>=(l.left+l.right)/2?1:0));continue}}!n&&(t.top>=l.bottom||t.top>=l.top&&t.left>=l.right)&&(i=u+1)}}return n?3==n.nodeType?f(n,o):n.firstChild?p(n,o):{node:e,offset:i}:{node:e,offset:i}}function f(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;n>o;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=r.getBoundingClientRect();if(i.top!=i.bottom&&i.left-1<=t.left&&i.right+1>=t.left&&i.top-1<=t.top&&i.bottom+1>=t.top)return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function h(e,t){var n=document.elementFromPoint(t.left,t.top+1);if(!(0,k.contains)(e.content,n))return null;n.firstChild||(n=n.parentNode);var r=p(n,t),i=r.node,a=r.offset;return o(e,i,a)}function d(e,t,n){var r=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r.getBoundingClientRect()}function m(e){var t=document.createRange();return t.setEnd(e,e.nodeValue.length),t.setStart(e,0),t.getClientRects()}function v(e,t){var n=a(e,t),r=n.node,o=n.offset,i=void 0,s=void 0;if(3==r.nodeType)o<r.nodeValue.length&&(s=d(r,o,o+1),i="left"),s&&s.left!=s.right||!o||(s=d(r,o-1,o),i="right");else if(r.firstChild){if(o<r.childNodes.length){var u=r.childNodes[o];s=3==u.nodeType?d(u,0,u.nodeValue.length):u.getBoundingClientRect(),i="left"}if((!s||s.left==s.right)&&o){var u=r.childNodes[o-1];s=3==u.nodeType?d(u,0,u.nodeValue.length):u.getBoundingClientRect(),i="right"}}else s=r.getBoundingClientRect(),i="left";var l=s[i];return{top:s.top,bottom:s.bottom,left:l,right:l}}function g(e,t,n,o){for(;t&&t!=e.content;t=t.parentNode)if(t.hasAttribute("pm-offset")){var i=r(e,t),a=e.doc.nodeAt(i);if(a.type.countCoordsAsChild){var s=a.type.countCoordsAsChild(a,i,t,n);if(null!=s)return s}if((o||null==a.type.contains)&&a.type.selectable)return i;if(!o)return null}}function y(e,t,n,o,i){for(var a=o;a&&a!=e.content;a=a.parentNode)if(a.hasAttribute("pm-offset")){var s=r(e,a),u=e.doc.nodeAt(s),l=u.type[t]&&u.type[t](e,n,s,u)!==!1;if(i||l)return l}}Object.defineProperty(n,"__esModule",{value:!0}),n.posBeforeFromDOM=r,n.posFromDOM=o,n.childContainer=i,n.DOMFromPos=a,n.DOMAfterPos=s,n.scrollIntoView=c,n.posAtCoords=h,n.coordsAtPos=v,n.selectableNodeAbove=g,n.handleNodeClick=y;var k=e("../dom"),b=5},{"../dom":3}],11:[function(e,t,n){"use strict";function r(e){return{pos:0,preRenderContent:function(){this.pos++},postRenderContent:function(){this.pos++},onRender:function(e,t,n){return e.isBlock&&(null!=n&&t.setAttribute("pm-offset",n),t.setAttribute("pm-size",e.nodeSize),e.isTextblock&&a(t,e),"false"==t.contentEditable&&(t=(0,p.elt)("div",null,t)),e.type.contains||this.pos++),t},onContainer:function(e){e.setAttribute("pm-container",!0)},renderInlineFlat:function(t,n,r){e.advanceTo(this.pos);for(var i=this.pos,a=i+t.nodeSize,s=e.nextChangeBefore(a),u=n,l=void 0,c=0;c<t.marks.length;c++)u=u.firstChild;1!=n.nodeType&&(n=(0,p.elt)("span",null,n),-1==s&&(l=n)),!l&&(s>-1||e.current.length)&&(l=u==n?n=(0,p.elt)("span",null,u):u.parentNode.appendChild((0,p.elt)("span",null,u))),n.setAttribute("pm-offset",r),n.setAttribute("pm-size",t.nodeSize);for(var f=0;s>-1;){var h=s-i,d=o(l,h);e.current.length&&(d.className=e.current.join(" ")),d.setAttribute("pm-inner-offset",f),f+=h,e.advanceTo(s),s=e.nextChangeBefore(a),-1==s&&l.setAttribute("pm-inner-offset",f),i+=h}return e.current.length&&(l.className=e.current.join(" ")),this.pos+=t.nodeSize,n},document:document}}function o(e,t){var n=e.firstChild,r=n.nodeValue,o=e.parentNode.insertBefore((0,p.elt)("span",null,r.slice(0,t)),e);return n.nodeValue=r.slice(t),o}function i(e,t){e.content.textContent="",e.content.appendChild((0,c.toDOM)(t,r(e.ranges.activeRangeTracker())))}function a(e,t){var n=0==t.content.size||t.lastChild.type.isBR||t.type.isCode&&t.lastChild.isText&&/\n$/.test(t.lastChild.text)?"br":t.lastChild.isText||null!=t.lastChild.type.contains?null:"text",r=e.lastChild,o=r&&1==r.nodeType&&r.hasAttribute("pm-ignore")?"BR"==r.nodeName?"br":"text":null;n!=o&&(o&&e.removeChild(r),n&&e.appendChild("br"==n?(0,p.elt)("br",{"pm-ignore":"trailing-break"}):(0,p.elt)("span",{"pm-ignore":"cursor-text"},"")))}function s(e,t,n){for(;t<e.childCount;t++){var r=e.child(t);if(r==n)return t}return-1}function u(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}function l(e,t,n,o){function l(e,n,r,o){for(var i=0,d=r.firstChild,m=e.firstChild,v=0,g=0;v<n.childCount;v++){var y=n.child(v),k=void 0,b=void 0,w=d==y?i:s(r,i+1,y);if(w>-1)for(k=y;i!=w;)i++,m=u(m);if(k&&!t.get(k))b=!0;else if(d&&!y.isText&&y.sameMarkup(d)&&t.get(d)!=f.DIRTY_REDRAW)b=!0,d.type.contains&&l((0,h.childContainer)(m),y,d,o+g+1);else{p.pos=o+g;var _=(0,c.nodeToDOM)(y,p,g);e.insertBefore(_,m),b=!1}b&&(m.setAttribute("pm-offset",g),m.setAttribute("pm-size",y.nodeSize),m=m.nextSibling,d=r.maybeChild(++i)),g+=y.nodeSize}for(;d;)m=u(m),d=r.maybeChild(++i);n.isTextblock&&a(e,n)}if(t.get(o)==f.DIRTY_REDRAW)return i(e,n);var p=r(e.ranges.activeRangeTracker());l(e.content,n,o,0)}Object.defineProperty(n,"__esModule",{value:!0}),n.draw=i,n.redraw=l;var c=e("../format"),p=e("../dom"),f=e("./main"),h=e("./dompos")},{"../dom":3,"../format":23,"./dompos":10,"./main":15}],12:[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 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)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.History=void 0;var s=e("../transform"),u=500,l=function(){function e(t){i(this,e),this.events=0,this.maxEvents=t,this.items=[new p]}return a(e,[{key:"popEvent",value:function(e,t,n){for(var r=t,o=new s.Transform(e),i=new d,a=void 0,u=[],l=this.items.length;;){var c=this.items[--l];if(n&&c==n)break;if(!c.map)return null;if(c.step){if(r){var p=c.step.map(i.remap),f=void 0;this.items[l]=new h(c.map),p&&o.maybeStep(p).doc&&(f=o.maps[o.maps.length-1],this.items.push(new h(f,this.items[l].id))),i.movePastStep(c,f)}else this.items.pop(),o.maybeStep(c.step);if(u.push(c.id),c.selection&&(this.events--,!n)){a=c.selection.type.mapToken(c.selection,i.remap);break}}else i.add(c),r=!0}return{transform:o,selection:a,ids:u}}},{key:"clear",value:function(){this.items.length=1,this.events=0}},{key:"addTransform",value:function(e,t,n){for(var r=0;r<e.steps.length;r++){var o=e.steps[r].invert(e.docs[r]);this.items.push(new f(e.maps[r],n&&n[r],o,t)),t&&(this.events++,t=null)}this.events>this.maxEvents&&this.clip()}},{key:"clip",value:function(){for(var e=0,t=this.events-this.maxEvents,n=0;;n++){var r=this.items[n];if(r.selection){if(!(t>e))return this.items.splice(0,n,new p(null,this.events[t-1])),void(this.events=this.maxEvents);++e}}}},{key:"addMaps",value:function(e){if(0!=this.events)for(var t=0;t<e.length;t++)this.items.push(new h(e[t]))}},{key:"findChangeID",value:function(e){if(e==this.items[0].id)return this.items[0];for(var t=this.items.length-1;t>=0;t--){var n=this.items[t];if(n.step){if(n.id==e)return n;if(n.id<e)return null}}}},{key:"rebased",value:function(e,t,n){if(0!=this.events){var r=[],o=this.items.length-n.length,i=0;if(1>o&&(i=1-o,o=1,this.items[0]=new p),n.length){for(var a=new s.Remapping([],e.slice()),l=o,c=i;l<this.items.length;l++){var d=this.items[l],m=n[c++],v=void 0;if(-1!=m){var g=t.maps[m];if(d.step){var y=t.steps[m].invert(t.docs[m]),k=d.selection&&d.selection.type.mapToken(d.selection,a);r.push(new f(g,d.id,y,k))}else r.push(new h(g));v=a.addToBack(g)}a.addToFront(d.map.invert(),v)}this.items.length=o}for(var b=0;b<e.length;b++)this.items.push(new h(e[b]));for(var b=0;b<r.length;b++)this.items.push(r[b]);!this.compressing&&this.emptyItems(o)+e.length>u&&this.compress(o+e.length)}}},{key:"emptyItems",value:function(e){for(var t=0,n=1;e>n;n++)this.items[n].step||t++;return t}},{key:"compress",value:function(e){for(var t=new d,n=[],r=0,o=this.items.length-1;o>=0;o--){var i=this.items[o];if(o>=e)n.push(i);else if(i.step){var a=i.step.map(t.remap),s=a&&a.posMap();if(t.movePastStep(i,s),a){var u=i.selection&&i.selection.type.mapToken(i.selection,t.remap);n.push(new f(s.invert(),i.id,a,u)),u&&r++}}else i.map?t.add(i):n.push(i)}this.items=n.reverse(),this.events=r}},{key:"toString",value:function(){return this.items.join("\n")}},{key:"changeID",get:function(){for(var e=this.items.length-1;e>0;e--)if(this.items[e].step)return this.items[e].id;return this.items[0].id}}]),e}(),c=1,p=function(){function e(t,n){i(this,e),this.map=t,this.id=n||c++}return a(e,[{key:"toString",value:function(){return this.id+":"+(this.map||"")+(this.step?":"+this.step:"")+(null!=this.mirror?"->"+this.mirror:"")}}]),e}(),f=function(e){function t(e,n,o,a){i(this,t);var s=r(this,Object.getPrototypeOf(t).call(this,e,n));return s.step=o,s.selection=a,s}return o(t,e),t}(p),h=function(e){function t(e,n){i(this,t);var o=r(this,Object.getPrototypeOf(t).call(this,e));return o.mirror=n,o}return o(t,e),t}(p),d=function(){function e(){i(this,e),this.remap=new s.Remapping,this.mirrorBuffer=Object.create(null)}return a(e,[{key:"add",value:function(e){var t=this.remap.addToFront(e.map,this.mirrorBuffer[e.id]);return null!=e.mirror&&(this.mirrorBuffer[e.mirror]=t),t}},{key:"movePastStep",value:function(e,t){var n=this.add(e);t&&this.remap.addToBack(t,n)}}]),e}();n.History=function(){function e(t){i(this,e),this.pm=t,this.done=new l(t.options.historyDepth),this.undone=new l(t.options.historyDepth),this.lastAddedAt=0,this.ignoreTransform=!1,this.preserveItems=0,t.on("transform",this.recordTransform.bind(this))}return a(e,[{key:"recordTransform",value:function(e,t,n){if(!this.ignoreTransform)if(0==n.addToHistory)this.done.addMaps(e.maps),this.undone.addMaps(e.maps);else{var r=Date.now(),o=r>this.lastAddedAt+this.pm.options.historyEventDelay;this.done.addTransform(e,o?t.token:null),this.undone.clear(),this.lastAddedAt=r}}},{key:"undo",value:function(){return this.shift(this.done,this.undone)}},{key:"redo",value:function(){return this.shift(this.undone,this.done)}},{key:"shift",value:function(e,t){var n=e.popEvent(this.pm.doc,this.preserveItems>0);if(!n)return!1;var r=this.pm.selection;if(!n.transform.steps.length)return this.shift(e,t);var o=n.selection.type.fromToken(n.selection,n.transform.doc);return this.applyIgnoring(n.transform,o),t.addTransform(n.transform,r.token,n.ids),this.lastAddedAt=0,!0}},{key:"applyIgnoring",value:function(e,t){this.ignoreTransform=!0,this.pm.apply(e,{selection:t,filter:!1}),this.ignoreTransform=!1}},{key:"getVersion",value:function(){return this.done.changeID}},{key:"isAtVersion",value:function(e){return this.done.changeID==e}},{key:"backToVersion",value:function(e){var t=this.done.findChangeID(e);if(!t)return!1;var n=this.done.popEvent(this.pm.doc,this.preserveItems>0,t),r=n.transform;return this.applyIgnoring(r),this.undone.clear(),!0}},{key:"rebased",value:function(e,t,n){this.done.rebased(e,t,n),this.undone.rebased(e,t,n)}},{key:"undoDepth",get:function(){return this.done.events}},{key:"redoDepth",get:function(){return this.undone.events}}]),e}()},{"../transform":45}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Keymap=n.baseCommands=n.Command=n.CommandSet=n.MarkedRange=n.NodeSelection=n.TextSelection=n.Selection=n.defineOption=n.ProseMirror=void 0;var o=e("./main");Object.defineProperty(n,"ProseMirror",{enumerable:!0,get:function(){return o.ProseMirror}});var i=e("./options");Object.defineProperty(n,"defineOption",{enumerable:!0,get:function(){return i.defineOption}});var a=e("./selection");Object.defineProperty(n,"Selection",{enumerable:!0,get:function(){return a.Selection}}),Object.defineProperty(n,"TextSelection",{enumerable:!0,get:function(){return a.TextSelection}}),Object.defineProperty(n,"NodeSelection",{enumerable:!0,get:function(){return a.NodeSelection}});var s=e("./range");Object.defineProperty(n,"MarkedRange",{enumerable:!0,get:function(){return s.MarkedRange}});var u=e("./command");Object.defineProperty(n,"CommandSet",{enumerable:!0,get:function(){return u.CommandSet}}),Object.defineProperty(n,"Command",{enumerable:!0,get:function(){return u.Command}});var l=e("./base_commands");Object.defineProperty(n,"baseCommands",{enumerable:!0,get:function(){return l.baseCommands}}),e("./schema_commands");var c=e("browserkeymap"),p=r(c);n.Keymap=p["default"]},{"./base_commands":4,"./command":7,"./main":15,"./options":16,"./range":17,"./schema_commands":18,"./selection":19,browserkeymap:60}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return e.operation&&e.flush()?document.elementFromPoint(t.clientX,t.clientY):t.target}function a(e,t,n){var r=(0,C.selectableNodeAbove)(e,n,{left:t.clientX,top:t.clientY},!0);if(null==r)return e.sel.fastPoll();var o=e.selection,i=o.node,a=o.from;if(i){var s=e.doc.resolve(r),u=e.doc.resolve(a);if(s.depth>=u.depth&&s.before(u.depth)==a){if(0==u.depth)return e.sel.fastPoll();r=s.before(s.depth)}}e.setNodeSelection(r),e.focus(),t.preventDefault()}function s(e,t,n){t.preventDefault();var r=(0,C.selectableNodeAbove)(e,n,{left:t.clientX,top:t.clientY},!0);if(null!=r){var o=e.doc.resolve(r),i=o.nodeAfter;i.isBlock&&!i.isTextblock?e.setNodeSelection(r):i.isInline?e.setTextSelection(o.start(o.depth),o.end(o.depth)):e.setTextSelection(r+1,r+1+i.content.size),e.focus()}}function u(e,t,n,r){var o=e.slice(t,n),i=e.resolve(t),a=i.node(i.depth-o.openLeft),s=a.type.name+" "+o.openLeft+" "+o.openRight,u='<div pm-context="'+s+'">'+(0,k.toHTML)(o.content)+"</div>";return r.clearData(),r.setData("text/html",u),r.setData("text/plain",(0,k.toText)(o.content)),o}function l(e){return null!=E?E:(e.setData("text/html","<hr>"),E="<hr>"==e.getData("text/html"))}function c(e,t,n){var r=t.getData("text/plain"),o=t.getData("text/html");if(!o&&!r)return null;var i=void 0,a=void 0;if(!n&&o||!r){var s=document.createElement("div");s.innerHTML=e.signalPipelined("transformPastedHTML",o);var u=s.querySelector("[pm-context]"),l=void 0,c=void 0,f=void 0;u&&(l=/^(\w+) (\d+) (\d+)$/.exec(u.getAttribute("pm-context")))&&(c=e.schema.nodes[l[1]])&&c.defaultAttrs&&(f=p(u,c,+l[2],+l[3]))?a=f:i=(0,k.fromDOM)(e.schema,s)}else i=(0,k.parseFrom)(e.schema,e.signalPipelined("transformPastedText",r),"text");return a||(a=i.slice((0,x.findSelectionAtStart)(i).from,(0,x.findSelectionAtEnd)(i).to)),e.signalPipelined("transformPasted",a)}function p(e,t,n,r){var o=t.schema,i=t.create(),a=(0,k.fromDOM)(o,e,{topNode:i,preserveWhitespace:!0});return new v.Slice(a.content,f(a.content,n,!0),f(a.content,r,!1),i)}function f(e,t,n){for(var r=0;t>r;r++){var o=n?e.firstChild:e.lastChild;if(!o||null==o.type.contains)return r;e=o.content}return t}function h(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(null==r||!n||!n.content.size)return r;for(var o=e.doc.resolve(r),i=n.content.leastSuperKind(),a=o.depth;a>=0;a--)if(i.isSubKind(o.node(a).type.contains))return a==o.depth?r:r<=(o.start(a+1)+o.end(a+1))/2?o.before(a+1):o.after(a+1);return r}function d(e){e.input.dropTarget&&(e.wrapper.removeChild(e.input.dropTarget),e.input.dropTarget=null)}var m=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Input=void 0;var v=e("../model"),g=e("browserkeymap"),y=r(g),k=e("../format"),b=e("./capturekeys"),w=e("../dom"),_=e("./domchange"),x=e("./selection"),C=e("./dompos"),S=null,M={};n.Input=function(){function e(t){var n=this;o(this,e),this.pm=t,this.baseKeymap=null,this.keySeq=null,this.mouseDown=null,this.dragging=null,this.dropTarget=null,this.shiftKey=!1,this.finishComposing=null,this.keymaps=[],this.defaultKeymap=null,this.storedMarks=null;var r=function(e){var n=M[e];t.content.addEventListener(e,function(e){return n(t,e)})};for(var i in M)r(i);t.on("selectionChange",function(){return n.storedMarks=null})}return m(e,[{key:"dispatchKey",value:function(e,t){var n=this.pm,r=n.input.keySeq;if(r){if(y["default"].isModifierKey(e))return!0;clearTimeout(S),S=setTimeout(function(){n.input.keySeq==r&&(n.input.keySeq=null)},50),e=r+" "+e}for(var o=function s(e){if(e===!1)return"nothing";if("..."==e)return"multi";if(null==e)return!1;var t=!1;if(Array.isArray(e))for(var r=0;t===!1&&r<e.length;r++)t=s(e[r]);else t="string"==typeof e?n.execCommand(e):e(n);return 0==t?!1:"handled"},i=void 0,a=0;!i&&a<n.input.keymaps.length;a++)i=o(n.input.keymaps[a].map.lookup(e,n));return i||(i=o(n.input.baseKeymap.lookup(e,n))||o(b.captureKeys.lookup(e))),"multi"==i&&(n.input.keySeq=e),"handled"!=i&&"multi"!=i||!t||t.preventDefault(),r&&!i&&/\'$/.test(e)?(t&&t.preventDefault(),!0):!!i}},{key:"insertText",value:function(e,t,n){if(e!=t||n){var r=this.pm,o=r.input.storedMarks||r.doc.marksAt(e),i=r.tr.replaceWith(e,t,n?r.schema.text(n,o):null);i.apply({scrollIntoView:!0,selection:(0,x.findSelectionNear)(i.doc,i.map(t),-1,!0)}),n&&r.signal("textInput",n)}}},{key:"startComposition",value:function(e,t){this.pm.ensureOperation({noFlush:!0,readSelection:t}).composing={ended:!1,applied:!1,margin:e},this.pm.unscheduleFlush()}},{key:"applyComposition",value:function(e){var t=this.composing;t.applied||((0,_.readCompositionChange)(this.pm,t.margin),t.applied=!0,e&&this.pm.flush())}},{key:"composing",get:function(){return this.pm.operation&&this.pm.operation.composing}}]),e}();M.keydown=function(e,t){if((0,x.hasFocus)(e)&&(e.signal("interaction"),16==t.keyCode&&(e.input.shiftKey=!0),!e.input.composing)){var n=y["default"].keyName(t);n&&e.input.dispatchKey(n,t)||e.sel.fastPoll()}},M.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},M.keypress=function(e,t){if(!(!(0,x.hasFocus)(e)||e.input.composing||!t.charCode||t.ctrlKey&&!t.altKey||w.browser.mac&&t.metaKey||e.input.dispatchKey(y["default"].keyName(t),t))){var n=e.selection;w.browser.ios||(e.input.insertText(n.from,n.to,String.fromCharCode(t.charCode)),t.preventDefault())}};var O=0,A=0;M.mousedown=function(e,t){e.signal("interaction");var n=Date.now(),r=500>n-O,o=600>n-A;A=O,O=n;var a=i(e,t);o?s(e,t,a):r&&(0,C.handleNodeClick)(e,"handleDoubleClick",t,a,!0)||(e.input.mouseDown=new T(e,t,a,r))};var T=function(){function e(t,n,r,i){o(this,e),this.pm=t,this.event=n,this.target=r,this.leaveToBrowser=t.input.shiftKey||i;var a=(0,C.posBeforeFromDOM)(t,this.target),s=t.doc.nodeAt(a);this.mightDrag=s.type.draggable||s==t.sel.range.node?a:null,null!=this.mightDrag&&(this.target.draggable=!0,w.browser.gecko&&(this.setContentEditable=!this.target.hasAttribute("contentEditable"))&&this.target.setAttribute("contentEditable","false")),this.x=n.clientX,this.y=n.clientY,window.addEventListener("mouseup",this.up=this.up.bind(this)),window.addEventListener("mousemove",this.move=this.move.bind(this)),t.sel.fastPoll()}return m(e,[{key:"done",value:function(){window.removeEventListener("mouseup",this.up),window.removeEventListener("mousemove",this.move),null!=this.mightDrag&&(this.target.draggable=!1,w.browser.gecko&&this.setContentEditable&&this.target.removeAttribute("contentEditable"))}},{key:"up",value:function(e){this.done();var t=i(this.pm,e);if(this.leaveToBrowser||!(0,w.contains)(this.pm.content,t))this.pm.sel.fastPoll();else if(this.event.ctrlKey)a(this.pm,e,t);else if(!(0,C.handleNodeClick)(this.pm,"handleClick",e,t,!0)){var n=(0,C.selectableNodeAbove)(this.pm,t,{left:this.x,top:this.y});n?(this.pm.setNodeSelection(n),this.pm.focus()):this.pm.sel.fastPoll()}}},{key:"move",value:function(e){!this.leaveToBrowser&&(Math.abs(this.x-e.clientX)>4||Math.abs(this.y-e.clientY)>4)&&(this.leaveToBrowser=!0),this.pm.sel.fastPoll()}}]),e}();M.touchdown=function(e){e.sel.fastPoll()},M.contextmenu=function(e,t){(0,C.handleNodeClick)(e,"handleContextMenu",t,i(e,t),!1)},M.compositionstart=function(e,t){!e.input.composing&&(0,x.hasFocus)(e)&&e.input.startComposition(t.data?t.data.length:0,!0)},M.compositionupdate=function(e){!e.input.composing&&(0,x.hasFocus)(e)&&e.input.startComposition(0,!1)},M.compositionend=function(e,t){if((0,x.hasFocus)(e)){var n=e.input.composing;if(n){if(n.applied)return}else{if(!t.data)return;e.input.startComposition(t.data.length,!1)}clearTimeout(e.input.finishComposing),e.operation.composing.ended=!0,e.input.finishComposing=window.setTimeout(function(){var t=e.input.composing;t&&t.ended&&e.input.applyComposition(!0)},20)}},M.input=function(e){if((0,x.hasFocus)(e)){var t=e.input.composing;if(t)return void(t.ended&&e.input.applyComposition(!0));(0,_.readInputChange)(e),e.flush()}};var E=null;M.copy=M.cut=function(e,t){var n=e.selection,r=n.from,o=n.to,i=n.empty;!i&&t.clipboardData&&l(t.clipboardData)&&(u(e.doc,r,o,t.clipboardData),t.preventDefault(),"cut"!=t.type||i||e.tr["delete"](r,o).apply())},M.paste=function(e,t){if((0,x.hasFocus)(e)&&t.clipboardData){var n=e.selection,r=c(e,t.clipboardData,e.input.shiftKey);r&&(t.preventDefault(),e.tr.replace(n.from,n.to,r).apply(e.apply.scroll))}};var D=function P(e,t,n){o(this,P),this.slice=e,this.from=t,this.to=n};M.dragstart=function(e,t){var n=e.input.mouseDown;if(n&&n.done(),t.dataTransfer){var r=e.selection,o=r.from,i=r.to,a=r.empty,s=void 0,l=!a&&e.posAtCoords({left:t.clientX,top:t.clientY});if(null!=l&&l>=o&&i>=l)s={from:o,to:i};else if(n&&null!=n.mightDrag){var c=n.mightDrag;s={from:c,to:c+e.doc.nodeAt(c).nodeSize}}if(s){var p=u(e.doc,s.from,s.to,t.dataTransfer);e.input.dragging=new D(p,s.from,s.to)}}},M.dragend=function(e){return window.setTimeout(function(){return e.input.dragging=null},50)},M.dragover=M.dragenter=function(e,t){t.preventDefault();var n=e.input.dropTarget;n||(n=e.input.dropTarget=e.wrapper.appendChild((0,w.elt)("div",{"class":"ProseMirror-drop-target"})));var r=h(e,t,e.input.dragging&&e.input.dragging.slice);if(null!=r){var o=e.coordsAtPos(r),i=e.wrapper.getBoundingClientRect();o.top-=i.top,o.right-=i.left,o.bottom-=i.top,o.left-=i.left,n.style.left=o.left-1+"px",n.style.top=o.top+"px",n.style.height=o.bottom-o.top+"px"}},M.dragleave=function(e,t){t.target==e.content&&d(e)},M.drop=function(e,t){var n=e.input.dragging;if(e.input.dragging=null,d(e),t.dataTransfer&&!e.signalDOM(t)){var r=n&&n.slice||c(e,t.dataTransfer);if(r){t.preventDefault();var o=h(e,t,r),i=o;if(null==o)return;var a=e.tr;n&&!t.ctrlKey&&null!=n.from&&(a["delete"](n.from,n.to),o=a.map(o)),a.replace(o,o,r).apply();var s=void 0;if(1==r.content.childCount&&0==r.openLeft&&0==r.openRight&&r.content.child(0).type.selectable&&(s=e.doc.nodeAt(o))&&s.sameMarkup(r.content.child(0)))e.setNodeSelection(o);else{var u=(0,x.findSelectionNear)(e.doc,o,1,!0).from,l=(0,x.findSelectionNear)(e.doc,a.map(i),-1,!0).to;e.setTextSelection(u,l)}e.focus()}}},M.focus=function(e){e.wrapper.classList.add("ProseMirror-focused"),e.signal("focus")},M.blur=function(e){e.wrapper.classList.remove("ProseMirror-focused"),e.signal("blur")}},{"../dom":3,"../format":23,"../model":38,"./capturekeys":5,"./domchange":9,"./dompos":10,"./selection":19,browserkeymap:60}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.DIRTY_REDRAW=n.DIRTY_RESCAN=n.ProseMirror=void 0,e("./css");var a=e("browserkeymap"),s=r(a),u=e("../util/sortedinsert"),l=r(u),c=e("../util/map"),p=e("../util/event"),f=e("../dom"),h=e("../format"),d=e("./options"),m=e("./selection"),v=e("./dompos"),g=e("./draw"),y=e("./input"),k=e("./history"),b=e("./range"),w=e("./transform"),_=n.ProseMirror=function(){function e(t){o(this,e),(0,f.ensureCSSAdded)(),t=this.options=(0,d.parseOptions)(t),this.schema=t.schema,null==t.doc&&(t.doc=this.schema.node("doc",null,[this.schema.node("paragraph")])),this.content=(0,f.elt)("div",{"class":"ProseMirror-content","pm-container":!0}),this.wrapper=(0,f.elt)("div",{"class":"ProseMirror"},this.content),this.wrapper.ProseMirror=this,t.place&&t.place.appendChild?t.place.appendChild(this.wrapper):t.place&&t.place(this.wrapper),this.setDocInner(t.docFormat?(0,h.parseFrom)(this.schema,t.doc,t.docFormat):t.doc),(0,g.draw)(this,this.doc),this.content.contentEditable=!0,t.label&&this.content.setAttribute("aria-label",t.label),this.mod=Object.create(null),this.cached=Object.create(null),this.operation=null,this.dirtyNodes=new c.Map,this.flushScheduled=null,this.sel=new m.SelectionState(this,(0,m.findSelectionAtStart)(this.doc)),this.accurateSelection=!1,this.input=new y.Input(this),this.commands=null,this.commandKeys=null,(0,d.initOptions)(this)}return i(e,[{key:"setOption",value:function(e,t){(0,d.setOption)(this,e,t),this.signal("optionChanged",e,t)}},{key:"getOption",value:function(e){return this.options[e]}},{key:"setTextSelection",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1];this.checkPos(t,!0),e!=t&&this.checkPos(e,!0),this.setSelection(new m.TextSelection(e,t))}},{key:"setNodeSelection",value:function(e){ |
| this.checkPos(e,!1);var t=this.doc.nodeAt(e);if(!t)throw new RangeError("Trying to set a node selection that doesn't point at a node");if(!t.type.selectable)throw new RangeError("Trying to select a non-selectable node");this.setSelection(new m.NodeSelection(e,e+t.nodeSize,t))}},{key:"setSelection",value:function(e){this.ensureOperation(),e.eq(this.sel.range)||this.sel.setAndSignal(e)}},{key:"setContent",value:function(e,t){t&&(e=(0,h.parseFrom)(this.schema,e,t)),this.setDoc(e)}},{key:"getContent",value:function(e){return e?(0,h.serializeTo)(this.doc,e):this.doc}},{key:"setDocInner",value:function(e){if(e.type!=this.schema.nodes.doc)throw new RangeError("Trying to set a document with a different schema");this.doc=e,this.ranges=new b.RangeStore(this),this.history=new k.History(this)}},{key:"setDoc",value:function(e,t){t||(t=(0,m.findSelectionAtStart)(e)),this.signal("beforeSetDoc",e,t),this.ensureOperation(),this.setDocInner(e),this.operation.docSet=!0,this.sel.set(t,!0),this.signal("setDoc",e,t)}},{key:"updateDoc",value:function(e,t,n){this.ensureOperation(),this.ranges.transform(t),this.operation.mappings.push(t),this.doc=e,this.sel.setAndSignal(n||this.sel.range.map(e,t)),this.signal("change")}},{key:"apply",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?S:arguments[1];if(!e.steps.length)return!1;if(!e.docs[0].eq(this.doc))throw new RangeError("Applying a transform that does not start with the current document");if(t.filter!==!1&&this.signalHandleable("filterTransform",e))return!1;var n=this.selection;return this.signal("beforeTransform",e,t),this.updateDoc(e.doc,e,t.selection),this.signal("transform",e,n,t),t.scrollIntoView&&this.scrollIntoView(),e}},{key:"checkPos",value:function(e,t){var n=e>=0&&e<=this.doc.content.size;if(n&&t&&(n=this.doc.resolve(e).parent.isTextblock),!n)throw new RangeError("Position "+e+" is not valid in current document")}},{key:"ensureOperation",value:function(e){return this.operation||this.startOperation(e)}},{key:"startOperation",value:function(e){var t=this;return this.operation=new M(this),e&&e.readSelection===!1||!this.sel.readFromDOM()||(this.operation.sel=this.sel.range),null==this.flushScheduled&&(this.flushScheduled=(0,f.requestAnimationFrame)(function(){return t.flush()})),this.operation}},{key:"unscheduleFlush",value:function(){null!=this.flushScheduled&&((0,f.cancelAnimationFrame)(this.flushScheduled),this.flushScheduled=null)}},{key:"flush",value:function(){if(this.unscheduleFlush(),!document.body.contains(this.wrapper)||!this.operation)return!1;this.signal("flushing");var e=this.operation,t=!1;return e?(e.composing&&this.input.applyComposition(),this.operation=null,this.accurateSelection=!0,(e.doc!=this.doc||this.dirtyNodes.size)&&((0,g.redraw)(this,this.dirtyNodes,this.doc,e.doc),this.dirtyNodes.clear(),t=!0),(t||!e.sel.eq(this.sel.range)||e.focus)&&this.sel.toDOM(e.focus),e.scrollIntoView!==!1&&(0,v.scrollIntoView)(this,e.scrollIntoView),t&&this.signal("draw"),this.signal("flush"),this.accurateSelection=!1,t):!1}},{key:"addKeymap",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?50:arguments[1];(0,l["default"])(this.input.keymaps,{map:e,rank:t},function(e,t){return e.rank-t.rank})}},{key:"removeKeymap",value:function(e){for(var t=this.input.keymaps,n=0;n<t.length;++n)if(t[n].map==e||t[n].map.options.name==e)return t.splice(n,1),!0}},{key:"markRange",value:function(e,t,n){this.checkPos(e),this.checkPos(t);var r=new b.MarkedRange(e,t,n);return this.ranges.addRange(r),r}},{key:"removeRange",value:function(e){this.ranges.removeRange(e)}},{key:"setMark",value:function(e,t,n){var r=this.selection;if(r.empty){var o=this.activeMarks();if(null==t&&(t=!e.isInSet(o)),t&&!this.doc.resolve(r.head).parent.type.canContainMark(e))return;this.input.storedMarks=t?e.create(n).addToSet(o):e.removeFromSet(o),this.signal("activeMarkChange")}else(null!=t?t:!this.doc.rangeHasMark(r.from,r.to,e))?this.apply(this.tr.addMark(r.from,r.to,e.create(n))):this.apply(this.tr.removeMark(r.from,r.to,e))}},{key:"activeMarks",value:function(){var e;return this.input.storedMarks||(null!=(e=this.selection.head)?this.doc.marksAt(e):[])}},{key:"focus",value:function(){this.operation?this.operation.focus=!0:this.sel.toDOM(!0)}},{key:"hasFocus",value:function(){return this.sel.range instanceof m.NodeSelection?document.activeElement==this.content:(0,m.hasFocus)(this)}},{key:"posAtCoords",value:function(e){return this.flush(),(0,v.posAtCoords)(this,e)}},{key:"coordsAtPos",value:function(e){return this.checkPos(e),this.flush(),(0,v.coordsAtPos)(this,e)}},{key:"scrollIntoView",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];e&&this.checkPos(e),this.ensureOperation(),this.operation.scrollIntoView=e}},{key:"execCommand",value:function(e,t){var n=this.commands[e];return!(!n||n.exec(this,t)===!1)}},{key:"keyForCommand",value:function(e){var t=this.commandKeys[e];if(void 0!==t)return t;var n=this.commands[e],r=this.input.baseKeymap;if(!n)return this.commandKeys[e]=null;var o=n.spec.key||(f.browser.mac?n.spec.macKey:n.spec.pcKey);if(o){o=s["default"].normalizeKeyName(Array.isArray(o)?o[0]:o);var i=r.bindings[o];if(Array.isArray(i)?i.indexOf(e)>-1:i==e)return this.commandKeys[e]=o}for(var a in r.bindings){var u=r.bindings[a];if(Array.isArray(u)?u.indexOf(e)>-1:u==e)return this.commandKeys[e]=a}return this.commandKeys[e]=null}},{key:"markRangeDirty",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?this.doc:arguments[2];this.ensureOperation();for(var r=this.dirtyNodes,o=n.resolve(e),i=n.resolve(t),a=o.sameDepth(i),s=0;a>=s;s++){var u=o.node(s);r.has(u)||r.set(u,x)}for(var l=o.index(a),c=Math.max(l+1,i.index(a)+(a==i.depth?0:1)),p=o.node(a),f=l;c>f;f++)r.set(p.child(f),C)}},{key:"markAllDirty",value:function(){this.dirtyNodes.set(this.doc,C)}},{key:"translate",value:function(e){var t=this.options.translate;return t?t(e):e}},{key:"selection",get:function(){return this.accurateSelection||this.ensureOperation(),this.sel.range}},{key:"tr",get:function(){return new w.EditorTransform(this)}}]),e}();_.prototype.apply.scroll={scrollIntoView:!0};var x=n.DIRTY_RESCAN=1,C=n.DIRTY_REDRAW=2,S={};(0,p.eventMixin)(_);var M=function O(e){o(this,O),this.doc=e.doc,this.docSet=!1,this.sel=e.sel.range,this.scrollIntoView=!1,this.focus=!1,this.mappings=[],this.composing=null}},{"../dom":3,"../format":23,"../util/event":56,"../util/map":57,"../util/sortedinsert":59,"./css":8,"./dompos":10,"./draw":11,"./history":12,"./input":14,"./options":16,"./range":17,"./selection":19,"./transform":20,browserkeymap:60}],16:[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 o(e,t,n,r){f[e]=new p(t,n,r)}function i(e){var t=Object.create(null),n=e?[e].concat(e.use||[]):[];e:for(var r in f){for(var o=0;o<n.length;o++)if(r in n[o]){t[r]=n[o][r];continue e}t[r]=f[r].defaultValue}return t}function a(e){for(var t in f){var n=f[t];n.update&&n.updateOnInit&&n.update(e,e.options[t],null,!0)}}function s(e,t,n){var r=f[t];if(void 0===r)throw new RangeError("Option '"+t+"' is not defined");if(r.update===!1)throw new RangeError("Option '"+t+"' can not be changed");var o=e.options[t];e.options[t]=n,r.update&&r.update(e,n,o,!1)}Object.defineProperty(n,"__esModule",{value:!0}),n.defineOption=o,n.parseOptions=i,n.initOptions=a,n.setOption=s;var u=e("../model"),l=e("../ui/prompt"),c=e("./command"),p=function h(e,t,n){r(this,h),this.defaultValue=e,this.update=t,this.updateOnInit=n!==!1},f=Object.create(null);o("schema",u.defaultSchema,!1),o("doc",null,function(e,t){return e.setDoc(t)},!1),o("docFormat",null),o("place",null),o("historyDepth",100),o("historyEventDelay",500),o("commands",c.CommandSet["default"],c.updateCommands),o("commandParamPrompt",l.ParamPrompt),o("label",null),o("translate",null)},{"../model":38,"../ui/prompt":53,"./command":7}],17:[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 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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.RangeStore=n.MarkedRange=void 0;var i=e("../util/event"),a=n.MarkedRange=function(){function e(t,n,o){r(this,e),this.options=o||{},this.from=t,this.to=n}return o(e,[{key:"remove",value:function(){this.signal("removed",this.from,Math.max(this.to,this.from)),this.from=this.to=null}}]),e}();(0,i.eventMixin)(a);var s=function(){function e(){r(this,e),this.sorted=[]}return o(e,[{key:"find",value:function(e){for(var t=0,n=this.sorted.length;;){if(t+10>n){for(var r=t;n>r;r++)if(this.sorted[r].at>=e)return r;return n}var o=t+n>>1;this.sorted[o].at>e?n=o:t=o}}},{key:"insert",value:function(e){this.sorted.splice(this.find(e.at),0,e)}},{key:"remove",value:function(e,t){for(var n=this.find(e),r=0;;r++){var o=n-r-1,i=n+r;if(o>=0&&this.sorted[o].range==t)return void this.sorted.splice(o,1);if(i<this.sorted.length&&this.sorted[i].range==t)return void this.sorted.splice(i,1)}}},{key:"resort",value:function(){for(var e=0;e<this.sorted.length;e++)for(var t=this.sorted[e],n=t.at="open"==t.type?t.range.from:t.range.to,r=e;r>0&&this.sorted[r-1].at>n;)this.sorted[r]=this.sorted[r-1],this.sorted[--r]=t}}]),e}(),u=(n.RangeStore=function(){function e(t){r(this,e),this.pm=t,this.ranges=[],this.sorted=new s}return o(e,[{key:"addRange",value:function(e){this.ranges.push(e),this.sorted.insert({type:"open",at:e.from,range:e}),this.sorted.insert({type:"close",at:e.to,range:e}),e.options.className&&this.pm.markRangeDirty(e.from,e.to)}},{key:"removeRange",value:function(e){var t=this.ranges.indexOf(e);t>-1&&(this.ranges.splice(t,1),this.sorted.remove(e.from,e),this.sorted.remove(e.to,e),e.options.className&&this.pm.markRangeDirty(e.from,e.to),e.remove())}},{key:"transform",value:function(e){for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t];n.from=e.map(n.from,n.options.inclusiveLeft?-1:1),n.to=e.map(n.to,n.options.inclusiveRight?1:-1),n.options.removeWhenEmpty!==!1&&n.from>=n.to?(this.removeRange(n),t--):n.from>n.to&&(n.to=n.from)}this.sorted.resort()}},{key:"activeRangeTracker",value:function(){return new u(this.sorted.sorted)}}]),e}(),function(){function e(t){r(this,e),this.sorted=t,this.pos=0,this.current=[]}return o(e,[{key:"advanceTo",value:function(e){for(var t=void 0;this.pos<this.sorted.length&&(t=this.sorted[this.pos]).at<=e;){var n=t.range.options.className;n&&("open"==t.type?this.current.push(n):this.current.splice(this.current.indexOf(n),1)),this.pos++}}},{key:"nextChangeBefore",value:function(e){for(;;){if(this.pos==this.sorted.length)return-1;var t=this.sorted[this.pos];if(t.range.options.className)return t.at>=e?-1:t.at;this.pos++}}}]),e}())},{"../util/event":56}],18:[function(e,t,n){"use strict";function r(e,t){var n=e.selection,r=n.node,o=n.from,i=n.to,a=e.doc.resolve(o);if(r&&r.type==t)return{from:o,to:i,depth:a.depth+1};var s=a.parent.type==t?a.depth:a.depth>0&&a.node(a.depth-1).type==t?a.depth-1:null;if(null!=s){var u=e.doc.resolve(i);return a.sameDepth(u)<s-1?null:{from:a.before(s),to:u.after(s),depth:s}}}var o=e("../model"),i=e("./command"),a=e("../format");o.StrongMark.register("command","set",{derive:!0,label:"Set strong"}),o.StrongMark.register("command","unset",{derive:!0,label:"Unset strong"}),o.StrongMark.register("command","toggle",{derive:!0,label:"Toggle strong",menu:{group:"inline",rank:20,display:{type:"icon",width:805,height:1024,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"}},keys:["Mod-B"]}),o.EmMark.register("command","set",{derive:!0,label:"Add emphasis"}),o.EmMark.register("command","unset",{derive:!0,label:"Remove emphasis"}),o.EmMark.register("command","toggle",{derive:!0,label:"Toggle emphasis",menu:{group:"inline",rank:21,display:{type:"icon",width:585,height:1024,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"}},keys:["Mod-I"]}),o.CodeMark.register("command","set",{derive:!0,label:"Set code style"}),o.CodeMark.register("command","unset",{derive:!0,label:"Remove code style"}),o.CodeMark.register("command","toggle",{derive:!0,label:"Toggle code style",menu:{group:"inline",rank:22,display:{type:"icon",width:896,height:1024,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"}},keys:["Mod-`"]});var s={type:"icon",width:951,height:1024,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"};o.LinkMark.register("command","unset",{derive:!0,label:"Unlink",menu:{group:"inline",rank:30,display:s},active:function(){return!0}}),o.LinkMark.register("command","set",{derive:{inverseSelect:!0,params:[{label:"Target",attr:"href"},{label:"Title",attr:"title"}]},label:"Add link",menu:{group:"inline",rank:30,display:s}}),o.Image.register("command","insert",{derive:{params:[{label:"Image URL",attr:"src"},{label:"Description / alternative text",attr:"alt",prefill:function(e){return(0,i.selectedNodeAttr)(e,this,"alt")||(0,a.toText)(e.doc.cut(e.selection.from,e.selection.to))}},{label:"Title",attr:"title"}]},label:"Insert image",menu:{group:"insert",rank:20,display:{type:"label",label:"Image"}}}),o.BulletList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in a bullet list",menu:{group:"block",rank:40,display:{type:"icon",width:768,height:896,path:"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z"}},keys:["Shift-Ctrl-8"]}),o.OrderedList.register("command","wrap",{derive:{list:!0},label:"Wrap the selection in an ordered list",menu:{group:"block",rank:41,display:{type:"icon",width:768,height:896,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"}},keys:["Shift-Ctrl-9"]}),o.BlockQuote.register("command","wrap",{derive:!0,label:"Wrap the selection in a block quote",menu:{group:"block",rank:45,display:{type:"icon",width:640,height:896,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"}},keys:["Shift-Ctrl-."]}),o.HardBreak.register("command","insert",{label:"Insert hard break",run:function(e){var t=e.selection,n=t.node,r=t.from;return n&&n.isBlock?!1:e.doc.resolve(r).parent.type.isCode?e.tr.typeText("\n").apply(e.apply.scroll):e.tr.replaceSelection(this.create()).apply(e.apply.scroll)},keys:{all:["Mod-Enter","Shift-Enter"],mac:["Ctrl-Enter"]}}),o.ListItem.register("command","split",{label:"Split the current list item",run:function(e){var t=e.selection,n=t.from,r=t.to,o=t.node,i=e.doc.resolve(n);if(o&&o.isBlock||i.depth<2||!i.sameParent(e.doc.resolve(r)))return!1;var a=i.node(i.depth-1);if(a.type!=this)return!1;var s=r==i.end(i.depth)?e.schema.defaultTextblockType():null;return e.tr["delete"](n,r).split(n,2,s).apply(e.apply.scroll)},keys:["Enter(50)"]}),o.ListItem.register("command","lift",{label:"Lift the selected list items to an outer list",run:function(e){var t=r(e,this);if(!t||t.depth<3)return!1;var n=e.doc.resolve(e.selection.to);if(n.node(t.depth-2).type!=this)return!1;var o=t.to<n.end(t.depth-1),i=e.tr.splitIfNeeded(t.to,2).splitIfNeeded(t.from,2),a=i.map(t.to,-1);return i.step("ancestor",i.map(t.from),a,{depth:2}),o&&i.join(a-2),i.apply(e.apply.scroll)},keys:["Mod-[(20)"]}),o.ListItem.register("command","sink",{label:"Sink the selected list items into an inner list",run:function(e){var t=r(e,this);if(!t)return!1;var n=e.doc.resolve(e.selection.from),o=n.index(t.depth-1);if(0==o)return!1;var i=n.node(t.depth-1),a=i.child(o-1),s=e.tr.wrap(t.from,t.to,i.type,i.attrs);return a.type==this&&s.join(t.from,a.lastChild&&a.lastChild.type==i.type?2:1),s.apply(e.apply.scroll)},keys:["Mod-](20)"]});for(var u=function(e){o.Heading.registerComputed("command","make"+e,function(t){var n={level:String(e)};return e<=t.maxLevel?{derive:{name:"make",attrs:n},label:"Change to heading "+e,keys:6>=e&&["Shift-Ctrl-"+e],menu:{group:"textblockHeading",rank:30+e,display:{type:"label",label:"Level "+e},activeDisplay:"Head "+e}}:void 0})},l=1;10>=l;l++)u(l);o.Paragraph.register("command","make",{derive:!0,label:"Change to paragraph",keys:["Shift-Ctrl-0"],menu:{group:"textblock",rank:10,display:{type:"label",label:"Plain"},activeDisplay:"Plain"}}),o.CodeBlock.register("command","make",{derive:!0,label:"Change to code block",keys:["Shift-Ctrl-\\"],menu:{group:"textblock",rank:20,display:{type:"label",label:"Code"},activeDisplay:"Code"}}),o.HorizontalRule.register("command","insert",{derive:!0,label:"Insert horizontal rule",keys:["Mod-Shift--"],menu:{group:"insert",rank:70,display:{type:"label",label:"Horizontal rule"}}})},{"../format":23,"../model":38,"./command":7}],19:[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 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)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){if(document.activeElement!=e.content)return!1;var t=window.getSelection();return t.rangeCount&&(0,d.contains)(e.content,t.anchorNode)}function s(e,t,n,r,o){for(var i=n-(r>0?0:1);r>0?i<e.childCount:i>=0;i+=r){var a=e.child(i);if(a.isTextblock)return new g(t+r);if(a.type.contains){var u=s(a,t+r,0>r?a.childCount:0,r,o);if(u)return u}else if(!o&&a.type.selectable)return new y(t-(0>r?a.nodeSize:0),t+(r>0?a.nodeSize:0),a);t+=a.nodeSize*r}}function u(e,t,n,r){var o=e.resolve(t),i=o.parent.isTextblock?new g(t):s(o.parent,t,o.index(o.depth),n,r);if(i)return i;for(var a=o.depth-1;a>=0;a--){var u=0>n?s(o.node(a),o.before(a+1),o.index(a),n,r):s(o.node(a),o.after(a+1),o.index(a)+1,n,r);if(u)return u}}function l(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2],r=arguments[3],o=u(e,t,n,r)||u(e,t,-n,r);if(!o)throw new RangeError("Searching for selection in invalid document "+e);return o}function c(e,t){return s(e,0,0,1,t)}function p(e,t){return s(e,e.content.size,e.childCount,-1,t)}function f(e,t,n){for(var r=e.doc.resolve(t),o=(0,m.DOMAfterPos)(e,r.before(r.depth)),i=(0,m.coordsAtPos)(e,t),a=o.firstChild;a;a=a.nextSibling)if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var l=s[u];if(0>n?l.bottom<i.top:l.top>i.bottom)return!1}return!0}var h=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.NodeSelection=n.TextSelection=n.Selection=n.SelectionState=void 0,n.hasFocus=a,n.findSelectionFrom=u,n.findSelectionNear=l,n.findSelectionAtStart=c,n.findSelectionAtEnd=p,n.verticalMotionLeavesTextblock=f;var d=e("../dom"),m=e("./dompos"),v=(n.SelectionState=function(){function e(t,n){var r=this;i(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 h(e,[{key:"setAndSignal",value:function(e,t){this.set(e,t),this.pm.signal("selectionChange")}},{key:"set",value:function(e,t){this.pm.ensureOperation({readSelection:!1}),this.range=e,t!==!1&&(this.lastAnchorNode=null)}},{key:"poller",value:function(){a(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(!a(this.pm)||!this.domChanged())return!1;var e=window.getSelection(),t=this.pm.doc,n=(0,m.posFromDOM)(this.pm,e.anchorNode,e.anchorOffset),r=e.isCollapsed?n:(0,m.posFromDOM)(this.pm,e.focusNode,e.focusOffset),o=l(t,r,null!=this.range.head&&this.range.head<r?1:-1);if(o instanceof g){var i=l(t,n,n>o.to?-1:1,!0);o=new g(i.anchor,o.head)}else if(n<o.from||n>o.to){var s=n>o.to;o=new g(l(t,n,s?-1:1,!0).anchor,l(t,s?o.from:o.to,s?1:-1,!0).head)}return this.setAndSignal(o),o instanceof y||o.head!=r||o.anchor!=n?this.toDOM():(this.clearNode(),this.storeDOMState()),!0}},{key:"toDOM",value:function(e){if(!a(this.pm)){if(!e)return;d.browser.gecko&&this.pm.content.focus()}this.range instanceof y?this.nodeToDOM():this.rangeToDOM()}},{key:"nodeToDOM",value:function(){var e=(0,m.DOMAfterPos)(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=(0,m.DOMFromPos)(this.pm,this.range.anchor),t=(0,m.DOMFromPos)(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 o=e;e=t,t=o}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(){return this.lastNode?(this.lastNode.classList.remove("ProseMirror-selectednode"),this.pm.content.classList.remove("ProseMirror-nodeselection"),this.lastNode=null,!0):void 0}},{key:"receivedFocus",value:function(){null==this.polling&&this.startPolling()}}]),e}(),n.Selection=function b(){i(this,b)}),g=n.TextSelection=function(e){function t(e,n){i(this,t);var o=r(this,Object.getPrototypeOf(t).call(this));return o.anchor=e,o.head=null==n?e:n,o}return o(t,e),h(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=n.map(this.head);if(!e.resolve(r).parent.isTextblock)return l(e,r);var o=n.map(this.anchor);return new t(e.resolve(o).parent.isTextblock?o:r,r)}},{key:"inverted",get:function(){return this.anchor>this.head}},{key:"from",get:function(){return Math.min(this.head,this.anchor)}},{key:"to",get:function(){return Math.max(this.head,this.anchor)}},{key:"empty",get:function(){return this.anchor==this.head}},{key:"token",get:function(){return new k(t,this.anchor,this.head)}}],[{key:"mapToken",value:function(e,n){return new k(t,n.map(e.a),n.map(e.b))}},{key:"fromToken",value:function(e,n){return n.resolve(e.b).parent.isTextblock?new t(n.resolve(e.a).parent.isTextblock?e.a:e.b,e.b):l(n,e.b)}}]),t}(v),y=n.NodeSelection=function(e){function t(e,n,o){i(this,t);var a=r(this,Object.getPrototypeOf(t).call(this));return a.from=e,a.to=n,a.node=o,a}return o(t,e),h(t,[{key:"eq",value:function(e){return e instanceof t&&this.from==e.from}},{key:"map",value:function(e,n){var r=n.map(this.from,1),o=n.map(this.to,-1),i=e.nodeAt(r);return i&&o==r+i.nodeSize&&i.type.selectable?new t(r,o,i):l(e,r)}},{key:"empty",get:function(){return!1}},{key:"token",get:function(){return new k(t,this.from,this.to)}}],[{key:"mapToken",value:function(e,t){return new k(g,t.map(e.a,1),t.map(e.b,-1))}},{key:"fromToken",value:function(e,n){var r=n.nodeAt(e.a);return r&&e.b==e.a+r.nodeSize&&r.type.selectable?new t(e.a,e.b,r):l(n,e.a)}}]),t}(v),k=function w(e,t,n){i(this,w),this.type=e,this.a=t,this.b=n}},{"../dom":3,"./dompos":10}],20:[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 o(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)}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.EditorTransform=void 0;var s=e("../transform");n.EditorTransform=function(e){function t(e){r(this,t);var n=o(this,Object.getPrototypeOf(t).call(this,e.doc));return n.pm=e,n}return i(t,e),a(t,[{key:"apply",value:function(e){return this.pm.apply(this,e)}},{key:"replaceSelection",value:function(e,t){var n=this.selection,r=n.empty,o=n.from,i=n.to,a=n.node;if(e&&e.isInline&&t!==!1&&(e=e.mark(r?this.pm.input.storedMarks:this.doc.marksAt(o))),a&&a.isTextblock&&e&&e.isInline)o++,i--;else if(a){for(var s=this.doc.resolve(o),u=s.depth;u&&1==s.node(u).childCount&&!(e?s.node(u).type.canContain(e):s.node(u).type.canBeEmpty);)u--;u<s.depth&&(o=s.before(u+1),i=s.after(u+1))}else if(e&&e.isBlock){var s=this.doc.resolve(o);if(s.depth&&s.node(s.depth-1).type.canContain(e))return this["delete"](o,i),s.parentOffset&&s.parentOffset<s.parent.content.size&&this.split(o),this.insert(o+(s.parentOffset?1:-1),e)}return this.replaceWith(o,i,e)}},{key:"deleteSelection",value:function(){return this.replaceSelection()}},{key:"typeText",value:function(e){return this.replaceSelection(this.pm.schema.text(e),!0)}},{key:"selection",get:function(){return this.steps.length?this.pm.selection.map(this):this.pm.selection}}]),t}(s.Transform)},{"../transform":45}],21:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){n||(n={});var r=new b(e,n.topNode||e.node("doc"),n),o=n.from?t.childNodes[n.from]:t.firstChild,i=null!=n.to&&t.childNodes[n.to]||null;r.addAll(o,i,!0);var a=void 0;do a=r.leave();while(r.stack.length);return a}function a(e,t,n){var r=(n&&n.document||window.document).createElement("div");return r.innerHTML=t,i(e,r,n)}function s(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function u(e){for(var t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n=void 0,r=[];n=t.exec(e);)r.push(n[1],n[2].trim());return r}function l(e){return e.cached.parseDOMInfo||(e.cached.parseDOMInfo=c(e))}function c(e){var t=Object.create(null),n=Object.create(null);return t._=[],e.registry("parseDOM",function(e,n,r){var o=n.parse;"block"==o?o=function(e,t){t.wrapIn(e,this)}:"mark"==o&&(o=function(e,t){t.wrapMark(e,this)}),(0,d["default"])(t[e]||(t[e]=[]),{type:r,parse:o,selector:n.selector,rank:null==n.rank?50:n.rank},function(e,t){return e.rank-t.rank})}),e.registry("parseDOMStyle",function(e,t,r){(0,d["default"])(n[e]||(n[e]=[]),{type:r,parse:t.parse,rank:null==t.rank?50:t.rank},function(e,t){return e.rank-t.rank})}),{tags:t,styles:n}}var p=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.fromDOM=i,n.fromHTML=a;var f=e("../model"),h=e("../util/sortedinsert"),d=r(h),m=e("./register");(0,m.defineSource)("dom",i),(0,m.defineSource)("html",a);var v={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},g={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},y={ol:!0,ul:!0},k=[],b=function(){function e(t,n,r){o(this,e),this.options=r||{},this.schema=t,this.stack=[],this.marks=k,this.closing=!1,this.enter(n.type,n.attrs);var i=l(t);this.tagInfo=i.tags,this.styleInfo=i.styles}return p(e,[{key:"addDOM",value:function(e){if(3==e.nodeType){var t=e.nodeValue,n=this.top,r=void 0;(/\S/.test(t)||n.type.isTextblock)&&(this.options.preserveWhitespace||(t=t.replace(/\s+/g," "),/^\s/.test(t)&&(!(r=n.content[n.content.length-1])||"text"==r.type.name&&/\s$/.test(r.text))&&(t=t.slice(1))),t&&this.insertNode(this.schema.text(t,this.marks)))}else if(1==e.nodeType&&!e.hasAttribute("pm-ignore")){var o=e.getAttribute("style");o?this.addElementWithStyles(u(o),e):this.addElement(e)}}},{key:"addElement",value:function(e){var t=e.nodeName.toLowerCase();y.hasOwnProperty(t)&&this.normalizeList(e),(!this.options.editableContent||"br"!=t||e.nextSibling)&&(this.parseNodeType(t,e)||g.hasOwnProperty(t)||(this.addAll(e.firstChild,null),v.hasOwnProperty(t)&&this.top.type==this.schema.defaultTextblockType()&&(this.closing=!0)))}},{key:"addElementWithStyles",value:function(e,t){for(var n=this,r=[],o=0;o<e.length;o+=2){var i=this.styleInfo[e[o]],a=e[o+1];if(i)for(var s=0;s<i.length;s++)r.push(i[s],a)}var u=function l(e){if(e==r.length)n.addElement(t);else{var o=r[e];o.parse.call(o.type,r[e+1],n,l.bind(null,e+2))}};u(0)}},{key:"tryParsers",value:function(e,t){if(e)for(var n=0;n<e.length;n++){var r=e[n];if((!r.selector||s(t,r.selector))&&r.parse.call(r.type,t,this)!==!1)return!0}}},{key:"parseNodeType",value:function(e,t){return this.tryParsers(this.tagInfo[e],t)||this.tryParsers(this.tagInfo._,t)}},{key:"addAll",value:function(e,t,n){for(var r=n&&this.stack.slice(),o=e;o!=t;o=o.nextSibling)this.addDOM(o), |
| n&&v.hasOwnProperty(o.nodeName.toLowerCase())&&this.sync(r)}},{key:"doClose",value:function(){if(this.closing&&!(this.stack.length<2)){var e=this.leave();this.enter(e.type,e.attrs),this.closing=!1}}},{key:"insertNode",value:function(e){if(this.top.type.canContain(e))this.doClose();else{for(var t=void 0,n=this.stack.length-1;n>=0;n--){var r=this.stack[n].type.findConnection(e.type);if(r){if(n==this.stack.length-1)this.doClose();else for(;this.stack.length>n+1;)this.leave();t=r;break}}if(!t)return;for(var o=0;o<t.length;o++)this.enter(t[o]);this.marks.length&&(this.marks=k)}return this.top.content.push(e),e}},{key:"close",value:function(e,t,n){return n=f.Fragment.from(n),e.checkContent(n,t)||(n=e.fixContent(n,t))?e.create(t,n,this.marks):null}},{key:"insert",value:function(e,t,n){var r=this.close(e,t,n);return r?this.insertNode(r):void 0}},{key:"enter",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"leave",value:function(){this.marks.length&&(this.marks=k);var e=this.stack.pop(),t=e.content[e.content.length-1];!this.options.preserveWhitespace&&t&&t.isText&&/\s$/.test(t.text)&&(1==t.text.length?e.content.pop():e.content[e.content.length-1]=t.copy(t.text.slice(0,t.text.length-1)));var n=this.close(e.type,e.attrs,e.content);return n&&this.stack.length&&this.insertNode(n),n}},{key:"sync",value:function(e){for(;this.stack.length>e.length;)this.leave();for(;;){var t=this.stack.length-1,n=this.stack[t],r=e[t];if(n.type==r.type&&f.Node.sameAttrs(n.attrs,r.attrs))break;this.leave()}for(;e.length>this.stack.length;){var o=e[this.stack.length];this.enter(o.type,o.attrs)}this.marks.length&&(this.marks=k),this.closing=!1}},{key:"wrapIn",value:function(e,t,n){this.enter(t,n),this.addAll(e.firstChild,null,!0),this.leave()}},{key:"wrapMark",value:function(e,t){var n=this.marks;this.marks=(t.instance||t).addToSet(n),e.call?e():this.addAll(e.firstChild,null),this.marks=n}},{key:"normalizeList",value:function(e){for(var t,n=e.firstChild;n;n=n.nextSibling)1==n.nodeType&&y.hasOwnProperty(n.nodeName.toLowerCase())&&(t=n.previousSibling)&&(t.appendChild(n),n=t)}},{key:"top",get:function(){return this.stack[this.stack.length-1]}}]),e}();f.Paragraph.register("parseDOM","p",{parse:"block"}),f.BlockQuote.register("parseDOM","blockquote",{parse:"block"});for(var w=function(e){f.Heading.registerComputed("parseDOM","h"+e,function(t){return e<=t.maxLevel?{parse:function(t,n){n.wrapIn(t,this,{level:String(e)})}}:void 0})},_=1;6>=_;_++)w(_);f.HorizontalRule.register("parseDOM","hr",{parse:"block"}),f.CodeBlock.register("parseDOM","pre",{parse:function(e,t){var n=e.firstChild&&/^code$/i.test(e.firstChild.nodeName)&&e.firstChild.getAttribute("class");if(n&&/fence/.test(n)){for(var r=[],o=/(?:^|\s)lang-(\S+)/g,i=void 0;i=o.exec(n);)r.push(i[1]);n=r.join(" ")}else n=null;var a=e.textContent;t.insert(this,{params:n},a?[t.schema.text(a)]:[])}}),f.BulletList.register("parseDOM","ul",{parse:"block"}),f.OrderedList.register("parseDOM","ol",{parse:function(e,t){var n={order:e.getAttribute("start")||"1"};t.wrapIn(e,this,n)}}),f.ListItem.register("parseDOM","li",{parse:"block"}),f.HardBreak.register("parseDOM","br",{parse:function(e,t){t.insert(this)}}),f.Image.register("parseDOM","img",{parse:function(e,t){t.insert(this,{src:e.getAttribute("src"),title:e.getAttribute("title")||null,alt:e.getAttribute("alt")||null})}}),f.LinkMark.register("parseDOM","a",{parse:function(e,t){t.wrapMark(e,this.create({href:e.getAttribute("href"),title:e.getAttribute("title")}))},selector:"[href]"}),f.EmMark.register("parseDOM","i",{parse:"mark"}),f.EmMark.register("parseDOM","em",{parse:"mark"}),f.EmMark.register("parseDOMStyle","font-style",{parse:function(e,t,n){"italic"==e?t.wrapMark(n,this):n()}}),f.StrongMark.register("parseDOM","b",{parse:"mark"}),f.StrongMark.register("parseDOM","strong",{parse:"mark"}),f.StrongMark.register("parseDOMStyle","font-weight",{parse:function(e,t,n){"bold"==e||"bolder"==e||!/\D/.test(e)&&+e>=500?t.wrapMark(n,this):n()}}),f.CodeMark.register("parseDOM","code",{parse:"mark"})},{"../model":38,"../util/sortedinsert":59,"./register":24}],22:[function(e,t,n){"use strict";function r(e,t){for(var n=t.trim().split(/\n{2,}/),r=[],o=0;o<n.length;o++){for(var i=[],a=n[o].split("\n"),s=0;s<a.length;s++)s&&i.push(e.node("hard_break")),a[s]&&i.push(e.text(a[s]));r.push(e.node("paragraph",null,i))}return r.length||r.push(e.node("paragraph")),e.node("doc",null,r)}Object.defineProperty(n,"__esModule",{value:!0}),n.fromText=r;var o=e("./register");(0,o.defineSource)("text",r)},{"./register":24}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./register");Object.defineProperty(n,"serializeTo",{enumerable:!0,get:function(){return r.serializeTo}}),Object.defineProperty(n,"knownTarget",{enumerable:!0,get:function(){return r.knownTarget}}),Object.defineProperty(n,"defineTarget",{enumerable:!0,get:function(){return r.defineTarget}}),Object.defineProperty(n,"parseFrom",{enumerable:!0,get:function(){return r.parseFrom}}),Object.defineProperty(n,"knownSource",{enumerable:!0,get:function(){return r.knownSource}}),Object.defineProperty(n,"defineSource",{enumerable:!0,get:function(){return r.defineSource}});var o=e("./from_dom");Object.defineProperty(n,"fromDOM",{enumerable:!0,get:function(){return o.fromDOM}}),Object.defineProperty(n,"fromHTML",{enumerable:!0,get:function(){return o.fromHTML}});var i=e("./to_dom");Object.defineProperty(n,"toDOM",{enumerable:!0,get:function(){return i.toDOM}}),Object.defineProperty(n,"toHTML",{enumerable:!0,get:function(){return i.toHTML}}),Object.defineProperty(n,"nodeToDOM",{enumerable:!0,get:function(){return i.nodeToDOM}});var a=e("./from_text");Object.defineProperty(n,"fromText",{enumerable:!0,get:function(){return a.fromText}});var s=e("./to_text");Object.defineProperty(n,"toText",{enumerable:!0,get:function(){return s.toText}})},{"./from_dom":21,"./from_text":22,"./register":24,"./to_dom":25,"./to_text":26}],24:[function(e,t,n){"use strict";function r(e,t,n){var r=l[t];if(!r)throw new RangeError("Target format "+t+" not defined");return r(e,n)}function o(e){return!!l[e]}function i(e,t){l[e]=t}function a(e,t,n,r){var o=c[n];if(!o)throw new RangeError("Source format "+n+" not defined");return o(e,t,r)}function s(e){return!!c[e]}function u(e,t){c[e]=t}Object.defineProperty(n,"__esModule",{value:!0}),n.serializeTo=r,n.knownTarget=o,n.defineTarget=i,n.parseFrom=a,n.knownSource=s,n.defineSource=u;var l=Object.create(null);i("json",function(e){return e.toJSON()});var c=Object.create(null);u("json",function(e,t){return e.nodeFromJSON(t)})},{}],25:[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 o(e,t){return new p(t).renderFragment(e instanceof l.Node?e.content:e)}function i(e,t,n){var r=new p(t),o=r.renderNode(e,n);return e.isInline&&(o=r.wrapInlineFlat(o,e.marks),r.options.renderInlineFlat&&(o=t.renderInlineFlat(e,o,n)||o)),o}function a(e,t){var n=new p(t),r=n.elt("div");return r.appendChild(n.renderFragment(e instanceof l.Node?e.content:e)),r.innerHTML}function s(e,t){e.prototype.serializeDOM=t}var u=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.toDOM=o,n.nodeToDOM=i,n.toHTML=a;var l=e("../model"),c=e("./register"),p=function(){function e(t){r(this,e),this.options=t||{},this.doc=this.options.document||window.document}return u(e,[{key:"elt",value:function(e,t){var n=this.doc.createElement(e);if(t)for(var r in t)"style"==r?n.style.cssText=t[r]:t[r]&&n.setAttribute(r,t[r]);for(var o=arguments.length,i=Array(o>2?o-2:0),a=2;o>a;a++)i[a-2]=arguments[a];for(var s=0;s<i.length;s++)n.appendChild("string"==typeof i[s]?this.doc.createTextNode(i[s]):i[s]);return n}},{key:"renderNode",value:function(e,t){var n=e.type.serializeDOM(e,this);return this.options.onRender&&(n=this.options.onRender(e,n,t)||n),n}},{key:"renderFragment",value:function(e,t){return t||(t=this.doc.createDocumentFragment()),0==e.size?t:(e.firstChild.isInline?this.options.renderInlineFlat?this.renderInlineFlatInto(e,t):this.renderInlineInto(e,t):this.renderBlocksInto(e,t),t)}},{key:"renderBlocksInto",value:function(e,t){var n=this;e.forEach(function(e,r){return t.appendChild(n.renderNode(e,r))})}},{key:"renderInlineInto",value:function(e,t){var n=this,r=t,o=[];e.forEach(function(e,t){for(var i=0;i<Math.min(o.length,e.marks.length)&&e.marks[i].eq(o[i]);++i);for(;i<o.length;)o.pop(),r=r.parentNode;for(;o.length<e.marks.length;){var a=e.marks[o.length];o.push(a),r=r.appendChild(n.renderMark(a))}r.appendChild(n.renderNode(e,t))})}},{key:"renderInlineFlatInto",value:function(e,t){var n=this;e.forEach(function(e,r){var o=n.renderNode(e,r);o=n.wrapInlineFlat(o,e.marks),o=n.options.renderInlineFlat(e,o,r)||o,t.appendChild(o)})}},{key:"renderMark",value:function(e){return e.type.serializeDOM(e,this)}},{key:"wrapInlineFlat",value:function(e,t){for(var n=t.length-1;n>=0;n--){var r=this.renderMark(t[n]);r.appendChild(e),e=r}return e}},{key:"renderAs",value:function(e,t,n){this.options.preRenderContent&&this.options.preRenderContent(e);var r=this.renderFragment(e.content,this.elt(t,n));return this.options.onContainer&&this.options.onContainer(r),this.options.postRenderContent&&this.options.postRenderContent(e),r}}]),e}();(0,c.defineTarget)("dom",o),(0,c.defineTarget)("html",a),s(l.BlockQuote,function(e,t){return t.renderAs(e,"blockquote")}),l.BlockQuote.prototype.countCoordsAsChild=function(e,t,n,r){var o=n.firstChild.getBoundingClientRect();return r.left<o.left-2?t:void 0},s(l.BulletList,function(e,t){return t.renderAs(e,"ul")}),s(l.OrderedList,function(e,t){return t.renderAs(e,"ol",{start:"1"!=e.attrs.order&&e.attrs.order})}),l.OrderedList.prototype.countCoordsAsChild=l.BulletList.prototype.countCoordsAsChild=function(e,t,n,r){for(var o=n.firstChild;o;o=o.nextSibling){var i=o.getAttribute("pm-offset");if(i){var a=o.getBoundingClientRect();if(r.left>a.left-2)return null;if(a.top<=r.top&&a.bottom>=r.top)return t+1+ +i}}},s(l.ListItem,function(e,t){return t.renderAs(e,"li")}),s(l.HorizontalRule,function(e,t){return t.elt("div",null,t.elt("hr"))}),s(l.Paragraph,function(e,t){return t.renderAs(e,"p")}),s(l.Heading,function(e,t){return t.renderAs(e,"h"+e.attrs.level)}),s(l.CodeBlock,function(e,t){var n=t.renderAs(e,"code");return null!=e.attrs.params&&(n.className="fence "+e.attrs.params.replace(/(^|\s+)/g,"$&lang-")),t.elt("pre",null,n)}),s(l.Text,function(e,t){return t.doc.createTextNode(e.text)}),s(l.Image,function(e,t){return t.elt("img",{src:e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})}),s(l.HardBreak,function(e,t){return t.elt("br")}),s(l.EmMark,function(e,t){return t.elt("em")}),s(l.StrongMark,function(e,t){return t.elt("strong")}),s(l.CodeMark,function(e,t){return t.elt("code")}),s(l.LinkMark,function(e,t){return t.elt("a",{href:e.attrs.href,title:e.attrs.title})})},{"../model":38,"./register":24}],26:[function(e,t,n){"use strict";function r(e){var t="";return e.forEach(function(e){return t+=e.type.serializeText(e)}),t}function o(e){return r(e).trim()}Object.defineProperty(n,"__esModule",{value:!0}),n.toText=o;var i=e("../model"),a=e("./register");i.Block.prototype.serializeText=function(e){return r(e.content)},i.Textblock.prototype.serializeText=function(e){var t=i.Block.prototype.serializeText(e);return t&&t+"\n\n"},i.Inline.prototype.serializeText=function(){return""},i.HardBreak.prototype.serializeText=function(){return"\n"},i.Text.prototype.serializeText=function(e){return e.text},(0,a.defineTarget)("text",o)},{"../model":38,"./register":24}],27:[function(e,t,n){"use strict";function r(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?null:arguments[3],o=arguments.length<=4||void 0===arguments[4]?null:arguments[4],i=e.doc.resolve(t),a=i.depth-1,s=i.index(a)>0&&i.node(a).child(i.index(a)-1),u=s&&s.type==n&&(!o||o(s)),l=t-i.parentOffset,c=e.tr["delete"](l,t).wrap(l,l,n,r);u&&c.join(i.before(i.depth)),c.apply()}function o(e,t,n,r){var o=e.doc.resolve(t),i=t-o.parentOffset;e.tr["delete"](i,t).setBlockType(i,i,n,r).apply()}Object.defineProperty(n,"__esModule",{value:!0}),n.autoInputRules=void 0;var i=e("../model"),a=e("../edit"),s=e("./inputrules"),u=n.autoInputRules=Object.create(null);(0,a.defineOption)("autoInput",!1,function(e,t){e.mod.autoInput&&(e.mod.autoInput.forEach(function(t){return(0,s.removeInputRule)(e,t)}),e.mod.autoInput=null),t&&!function(){t===!0&&(t=["schema",u]);var n=Object.create(null),r=e.mod.autoInput=[];t.forEach(function(t){if("schema"===t)e.schema.registry("autoInput",function(e,t,r,o){var i=o+":"+e,a=t.handler;a.bind&&(a=a.bind(r)),n[i]=new s.InputRule(t.match,t.filter,a)});else for(var r in t){var o=t[r];null==o?delete n[r]:n[r]=o}});for(var o in n)(0,s.addInputRule)(e,n[o]),r.push(n[o])}()}),u.emDash=new s.InputRule(/--$/,"-","—"),u.openDoubleQuote=new s.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,'"',"“"),u.closeDoubleQuote=new s.InputRule(/"$/,'"',"”"),u.openSingleQuote=new s.InputRule(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"'","‘"),u.closeSingleQuote=new s.InputRule(/'$/,"'","’"),i.BlockQuote.register("autoInput","startBlockQuote",new s.InputRule(/^\s*> $/," ",function(e,t,n){r(e,n,this)})),i.OrderedList.register("autoInput","startOrderedList",new s.InputRule(/^(\d+)\. $/," ",function(e,t,n){var o=+t[1];r(e,n,this,{order:o||null},function(e){return e.childCount+ +e.attrs.order==o})})),i.BulletList.register("autoInput","startBulletList",new s.InputRule(/^\s*([-+*]) $/," ",function(e,t,n){var o=t[1];r(e,n,this,null,function(e){return e.attrs.bullet==o})})),i.CodeBlock.register("autoInput","startCodeBlock",new s.InputRule(/^```$/,"`",function(e,t,n){o(e,n,this,{params:""})})),i.Heading.registerComputed("autoInput","startHeading",function(e){var t=new RegExp("^(#{1,"+e.maxLevel+"}) $");return new s.InputRule(t," ",function(e,t,n){o(e,n,this,{level:t[1].length})})})},{"../edit":13,"../model":38,"./inputrules":28}],28:[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 o(e,t){e.mod.interpretInput||(e.mod.interpretInput=new l(e)),e.mod.interpretInput.addRule(t)}function i(e,t){var n=e.mod.interpretInput;n&&(n.removeRule(t),0==n.rules.length&&(n.unregister(),e.mod.interpretInput=null))}function a(e){for(var t=e.parent,n=t.type.isCode,r="",o=0,i=e.parentOffset;i>0;o++){var a=t.child(o);r+=a.isText?a.text.slice(0,i):"",i-=a.nodeSize,0>=i&&a.marks.some(function(e){return e.type.isCode})&&(n=!0)}return{textBefore:r,isCode:n}}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.InputRule=void 0,n.addInputRule=o,n.removeInputRule=i;var u=e("../edit"),l=(n.InputRule=function c(e,t,n){r(this,c),this.filter=t,this.match=e,this.handler=n},function(){function e(t){var n=this;r(this,e),this.pm=t,this.rules=[],this.cancelVersion=null,t.on("selectionChange",this.onSelChange=function(){return n.cancelVersion=null}),t.on("textInput",this.onTextInput=this.onTextInput.bind(this)),t.addKeymap(new u.Keymap({Backspace:function(e){return n.backspace(e)}},{name:"inputRules"}),20)}return s(e,[{key:"unregister",value:function(){this.pm.off("selectionChange",this.onSelChange),this.pm.off("textInput",this.onTextInput),this.pm.removeKeymap("inputRules")}},{key:"addRule",value:function(e){this.rules.push(e)}},{key:"removeRule",value:function(e){var t=this.rules.indexOf(e);return t>-1?(this.rules.splice(t,1),!0):void 0}},{key:"onTextInput",value:function(e){var t=this.pm.selection.head;if(t)for(var n=void 0,r=void 0,o=void 0,i=e[e.length-1],s=0;s<this.rules.length;s++){var u=this.rules[s],l=void 0;if(!u.filter||u.filter==i){if(!o){o=this.pm.doc.resolve(t);var c=a(o);if(n=c.textBefore,r=c.isCode)return}if(l=u.match.exec(n)){var p=this.pm.history.getVersion();if("string"==typeof u.handler){var f=t-(l[1]||l[0]).length,h=this.pm.doc.marksAt(t);this.pm.tr["delete"](f,t).insert(f,this.pm.schema.text(u.handler,h)).apply()}else u.handler(this.pm,l,t);return void(this.cancelVersion=p)}}}}},{key:"backspace",value:function(){return this.cancelVersion?(this.pm.history.backToVersion(this.cancelVersion),void(this.cancelVersion=null)):!1}}]),e}())},{"../edit":13}],29:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=p(e).parse(t,{}),o=new _(e,r,n),i=void 0;o.parseTokens(r);do i=o.closeNode();while(o.stack.length);return i}function a(e,t){return e.isText&&t.isText&&g.Mark.sameSet(e.marks,t.marks)?e.copy(e.text+t.text):void 0}function s(e){return e.cached.markdownTokens||(e.cached.markdownTokens=l(e))}function u(e,t,n,r){if("block"==r.parse)e[t+"_open"]=function(e,t){var o="function"==typeof r.attrs?r.attrs.call(n,e,t):r.attrs;e.openNode(n,o)},e[t+"_close"]=function(e){return e.closeNode()};else if("mark"==r.parse)e[t+"_open"]=function(e,t){var o=r.attrs instanceof Function?r.attrs.call(n,e,t):r.attrs;e.openMark(n.create(o))},e[t+"_close"]=function(e){return e.closeMark(n)};else{if(!r.parse)throw new RangeError("Unrecognized markdown parsing spec: "+r);e[t]=r.parse.bind(n)}}function l(e){var t=Object.create(null);return t.text=function(e,t){return e.addText(t.content)},t.inline=function(e,t){return e.parseTokens(t.children)},t.softbreak=function(e){return e.addText("\n")},e.registry("parseMarkdown",function(e,n,r){u(t,e,r,n)}),t}function c(e){var t=e.cached.markdownConfig;return t||!function(){var n=null,r=[];e.registry("configureMarkdown",function(e,t){if("init"==e){if(n)throw new RangeError("Two markdown parser initializers defined in schema");n=t}else{var o=(/_(\d+)$/.exec(e)||[0,50])[1];(0,b["default"])(r,{f:t,rank:o},function(e,t){return e.rank-t.rank})}}),t={init:n||function(){return(0,v["default"])("commonmark",{html:!1})},modifiers:r.map(function(e){return e.f})}}(),t}function p(e){var t=c(e),n=t.init();return t.modifiers.forEach(function(e){return n=e(n)}),n}function f(e){return"\n"==e.charAt(e.length-1)?e.slice(0,e.length-1):e}function h(e,t){e.openNode(this),e.addText(f(t.content)),e.closeNode()}var d=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.fromMarkdown=i;var m=e("markdown-it"),v=r(m),g=e("../model"),y=e("../format"),k=e("../util/sortedinsert"),b=r(k);(0,y.defineSource)("markdown",i);var w=[],_=function(){function e(t,n,r){o(this,e),this.schema=t,this.stack=[{type:t.nodes.doc,content:[]}],this.tokens=n,this.marks=w,this.tokenTypes=s(t),this.options=r}return d(e,[{key:"top",value:function(){return this.stack[this.stack.length-1]}},{key:"push",value:function(e){this.stack.length&&this.top().content.push(e)}},{key:"addText",value:function(e){var t=this.top().content,n=t[t.length-1],r=this.schema.text(e,this.marks),o=void 0;n&&(o=a(n,r))?t[t.length-1]=o:t.push(r)}},{key:"openMark",value:function(e){this.marks=e.addToSet(this.marks)}},{key:"closeMark",value:function(e){this.marks=e.removeFromSet(this.marks)}},{key:"parseTokens",value:function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.tokenTypes[n.type];if(!r)throw new Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n)}}},{key:"addNode",value:function(e,t,n){if(n=g.Fragment.from(n),!e.checkContent(n,t)&&(n=e.fixContent(n,t),!n))return null;var r=e.create(t,n,this.marks);return this.push(r),r}},{key:"openNode",value:function(e,t){this.stack.push({type:e,attrs:t,content:[]})}},{key:"closeNode",value:function(){this.marks.length&&(this.marks=w);var e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}},{key:"getAttr",value:function(e,t){if(e.attrs)for(var n=0;n<e.attrs.length;n++)if(e.attrs[n][0]==t)return e.attrs[n][1]}}]),e}();g.BlockQuote.register("parseMarkdown","blockquote",{parse:"block"}),g.Paragraph.register("parseMarkdown","paragraph",{parse:"block"}),g.ListItem.register("parseMarkdown","list_item",{parse:"block"}),g.BulletList.register("parseMarkdown","bullet_list",{parse:"block"}),g.OrderedList.register("parseMarkdown","ordered_list",{parse:"block",attrs:function(e,t){return{order:e.getAttr(t,"order")||"1"}}}),g.Heading.register("parseMarkdown","heading",{parse:"block",attrs:function(e,t){return{level:""+Math.min(this.maxLevel,+t.tag.slice(1))}}}),g.CodeBlock.register("parseMarkdown","code_block",{parse:h}),g.CodeBlock.register("parseMarkdown","fence",{parse:h}),g.HorizontalRule.register("parseMarkdown","hr",{parse:function(e,t){e.addNode(this,{markup:t.markup})}}),g.Image.register("parseMarkdown","image",{parse:function(e,t){e.addNode(this,{src:e.getAttr(t,"src"),title:e.getAttr(t,"title")||null,alt:t.children[0]&&t.children[0].content||null})}}),g.HardBreak.register("parseMarkdown","hardbreak",{parse:function(e){e.addNode(this)}}),g.EmMark.register("parseMarkdown","em",{parse:"mark"}),g.StrongMark.register("parseMarkdown","strong",{parse:"mark"}),g.LinkMark.register("parseMarkdown","link",{parse:"mark",attrs:function(e,t){return{href:e.getAttr(t,"href"),title:e.getAttr(t,"title")||null}}}),g.CodeMark.register("parseMarkdown","code_inline",{parse:function(e,t){e.openMark(this.create()),e.addText(t.content),e.closeMark(this)}})},{"../format":23,"../model":38,"../util/sortedinsert":59,"markdown-it":64}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./from_markdown");Object.defineProperty(n,"fromMarkdown",{enumerable:!0,get:function(){return r.fromMarkdown}});var o=e("./to_markdown");Object.defineProperty(n,"toMarkdown",{enumerable:!0,get:function(){return o.toMarkdown}})},{"./from_markdown":29,"./to_markdown":31}],31:[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 o(e,t){var n=new l(t);return n.renderContent(e),n.out}function i(e,t){e.prototype.serializeMarkdown=t}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.toMarkdown=o;var s=e("../model"),u=e("../format");(0,u.defineTarget)("markdown",o);var l=function(){function e(t){r(this,e),this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=t}return a(e,[{key:"flushClose",value:function(e){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==e&&(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var r=1;e>r;r++)this.out+=t+"\n"}this.closed=!1}}},{key:"wrapBlock",value:function(e,t,n,r){var o=this.delim;this.write(t||e),this.delim+=e,r(),this.delim=o,this.closeBlock(n)}},{key:"atBlank",value:function(){return/(^|\n)$/.test(this.out)}},{key:"ensureNewLine",value:function(){this.atBlank()||(this.out+="\n")}},{key:"write",value:function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}},{key:"closeBlock",value:function(e){this.closed=e}},{key:"text",value:function(e,t){for(var n=e.split("\n"),r=0;r<n.length;r++){var o=this.atBlank()||this.closed;this.write(),this.out+=t!==!1?this.esc(n[r],o):n[r],r!=n.length-1&&(this.out+="\n")}}},{key:"render",value:function(e){e.type.serializeMarkdown(this,e)}},{key:"renderContent",value:function(e){var t=this;e.forEach(function(e){return t.render(e)})}},{key:"renderInline",value:function(e){var t=this,n=[],r=function(e){var r=e?e.marks:[],o=r.length&&r[r.length-1].type.isCode&&r[r.length-1],i=r.length-(o?1:0);e:for(var a=0;i>a;a++){var s=r[a];if(!s.type.markdownMixable)break;for(var u=0;u<n.length;u++){var l=n[u];if(!l.type.markdownMixable)break;if(s.eq(l)){a>u?r=r.slice(0,u).concat(s).concat(r.slice(u,a)).concat(r.slice(a+1),i):u>a&&(r=r.slice(0,a).concat(r.slice(a+1,u)).concat(s).concat(r.slice(u,i)));continue e}}}for(var c=0;c<Math.min(n.length,i)&&r[c].eq(n[c]);)++c;for(;c<n.length;)t.text(t.markString(n.pop(),!1),!1);for(;n.length<i;){var p=r[n.length];n.push(p),t.text(t.markString(p,!0),!1)}e&&(o&&e.isText?t.text(t.markString(o,!1)+e.text+t.markString(o,!0),!1):t.render(e))};e.forEach(r),r(null)}},{key:"renderList",value:function(e,t,n){var r=this;this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=this.inTightList;this.inTightList=e.attrs.tight;for(var i=function(o){o&&e.attrs.tight&&r.flushClose(1),r.wrapBlock(t,n(o),e,function(){return r.render(e.child(o))})},a=0;a<e.childCount;a++)i(a);this.inTightList=o}},{key:"esc",value:function(e,t){return e=e.replace(/[`*\\~+\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#-]/,"\\$&")),e}},{key:"quote",value:function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]}},{key:"repeat",value:function(e,t){for(var n="",r=0;t>r;r++)n+=e;return n}},{key:"markString",value:function(e,t){var n=t?e.type.openMarkdown:e.type.closeMarkdown;return"string"==typeof n?n:n(this,e)}}]),e}();i(s.BlockQuote,function(e,t){e.wrapBlock("> ",null,t,function(){return e.renderContent(t)})}),i(s.CodeBlock,function(e,t){null==t.attrs.params?e.wrapBlock(" ",null,t,function(){return e.text(t.textContent,!1)}):(e.write("```"+t.attrs.params+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t))}),i(s.Heading,function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}),i(s.HorizontalRule,function(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)}),i(s.BulletList,function(e,t){e.renderList(t," ",function(){return(t.attrs.bullet||"*")+" "})}),i(s.OrderedList,function(e,t){var n=Number(t.attrs.order||1),r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,function(t){var o=String(n+t);return e.repeat(" ",r-o.length)+o+". "})}),i(s.ListItem,function(e,t){return e.renderContent(t)}),i(s.Paragraph,function(e,t){e.renderInline(t),e.closeBlock(t)}),i(s.Image,function(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+e.esc(t.attrs.src)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")")}),i(s.HardBreak,function(e){return e.write("\\\n")}),i(s.Text,function(e,t){return e.text(t.text)}),s.EmMark.prototype.openMarkdown=s.EmMark.prototype.closeMarkdown="*",s.EmMark.prototype.markdownMixable=!0,s.StrongMark.prototype.openMarkdown=s.StrongMark.prototype.closeMarkdown="**",s.StrongMark.prototype.markdownMixable=!0,s.LinkMark.prototype.openMarkdown="[",s.LinkMark.prototype.closeMarkdown=function(e,t){return"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"},s.CodeMark.prototype.openMarkdown=s.CodeMark.prototype.closeMarkdown="`"},{"../format":23,"../model":38}],32:[function(e,t,n){"use strict";function r(e,t){var n=document.createElement("div");if(n.className=c,t.path){s[e]||o(e,t);var r=n.appendChild(document.createElementNS(u,"svg"));r.style.width=t.width/t.height+"em";var i=r.appendChild(document.createElementNS(u,"use"));i.setAttributeNS(l,"href",/([^#]*)/.exec(document.location)[1]+"#pm-icon-"+e)}else t.dom?n.appendChild(t.dom.cloneNode(!0)):(n.appendChild(document.createElement("span")).textContent=t.text||"",t.style&&(n.firstChild.style.cssText=t.style));return n}function o(e,t){a||(a=document.createElementNS(u,"svg"),a.style.display="none",document.body.insertBefore(a,document.body.firstChild));var n=document.createElementNS(u,"symbol");n.id="pm-icon-"+e,n.setAttribute("viewBox","0 0 "+t.width+" "+t.height);var r=n.appendChild(document.createElementNS(u,"path"));r.setAttribute("d",t.path),a.appendChild(n),s[e]=!0}Object.defineProperty(n,"__esModule",{value:!0}),n.getIcon=r;var i=e("../dom"),a=null,s=Object.create(null),u="http://www.w3.org/2000/svg",l="http://www.w3.org/1999/xlink",c="ProseMirror-icon";(0,i.insertCSS)("\n."+c+" {\n display: inline-block;\n line-height: .8;\n vertical-align: -2px; /* Compensate for padding */\n padding: 2px 8px;\n cursor: pointer;\n}\n\n."+c+" svg {\n fill: currentColor;\n height: 1em;\n}\n\n."+c+" span {\n vertical-align: text-top;\n}")},{"../dom":3}],33:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!t.label)return null;var n=e.translate(t.label),r=t.name&&e.keyForCommand(t.name);return r?n+" ("+r+")":n}function a(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r].render(t);o&&n.push((0,p.elt)("div",{"class":v+"-dropdown-item"},o))}return n}function s(e,t){for(var n=void 0,r=Array.isArray(t),o=0;o<(r?t.length:1);o++){var i=r?t[o]:t;if(i instanceof y){var a=i.get(e);if(!r||1==t.length)return a;n=(n||t.slice(0,o)).concat(a)}else n&&n.push(i)}return n||(r?t:[t])}function u(e,t){for(var n=document.createDocumentFragment(),r=!1,o=0;o<t.length;o++){for(var i=s(e,t[o]),a=!1,u=0;u<i.length;u++){var c=i[u].render(e);c&&(!a&&r&&n.appendChild(l()),n.appendChild((0,p.elt)("span",{"class":v+"item"},c)),a=!0)}a&&(r=!0)}return n}function l(){return(0,p.elt)("span",{"class":v+"separator"})}var c=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.historyGroup=n.blockGroup=n.textblockMenu=n.insertMenu=n.inlineGroup=n.DropdownSubmenu=n.Dropdown=n.MenuCommandGroup=n.MenuCommand=void 0,n.resolveGroup=s,n.renderGrouped=u;var p=e("../dom"),f=e("../util/sortedinsert"),h=r(f),d=e("../util/obj"),m=e("./icons"),v="ProseMirror-menu",g=n.MenuCommand=function(){function e(t,n){o(this,e),this.command_=t,this.options=n}return c(e,[{key:"command",value:function(e){return"string"==typeof this.command_?e.commands[this.command_]:this.command_}},{key:"render",value:function(e){var t=this.command(e),n=!1;if(t){if("ignore"!=this.options.select&&!t.select(e)){if(null==this.options.select||"hide"==this.options.select)return null;"disable"==this.options.select&&(n=!0)}var r=this.options.display;if(!r)throw new RangeError("No display style defined for menu command "+t.name);var o=void 0;if(r.render)o=r.render(t,e);else if("icon"==r.type)o=(0,m.getIcon)(t.name,r),!n&&t.active(e)&&o.classList.add(v+"-active");else{if("label"!=r.type)throw new RangeError("Unsupported command display style: "+r.type);var a=e.translate(r.label||t.spec.label);o=(0,p.elt)("div",null,a)}return o.setAttribute("title",i(e,t)),this.options["class"]&&o.classList.add(this.options["class"]),n&&o.classList.add(v+"-disabled"),this.options.css&&(o.style.cssText+=this.options.css),o.addEventListener("mousedown",function(n){n.preventDefault(),n.stopPropagation(),e.signal("interaction"),t.exec(e,null,o)}),o.setAttribute("data-command",this.commandName),o}}},{key:"commandName",get:function(){return"string"==typeof this.command_?this.command_.command:this.command_.name}}]),e}(),y=n.MenuCommandGroup=function(){function e(t,n){o(this,e),this.name=t,this.options=n}return c(e,[{key:"collect",value:function(e){var t=this,n=[];for(var r in e.commands){var o=e.commands[r],i=o.spec.menu;i&&i.group==this.name&&(0,h["default"])(n,{cmd:o,rank:null==i.rank?50:i.rank},function(e,t){return e.rank-t.rank})}return n.map(function(e){var n=e.cmd.spec.menu;return t.options&&(n=(0,d.copyObj)(t.options,(0,d.copyObj)(n))),new g(e.cmd,n)})}},{key:"get",value:function(e){var t=e.mod.menuGroups||this.startGroups(e); |
| return t[this.name]||(t[this.name]=this.collect(e))}},{key:"startGroups",value:function(e){var t=function n(){e.mod.menuGroups=null,e.off("commandsChanging",n)};return e.on("commandsChanging",t),e.mod.menuGroups=Object.create(null)}}]),e}(),k=n.Dropdown=function(){function e(t,n){o(this,e),this.options=t||{},this.content=n}return c(e,[{key:"render",value:function(e){var t=this,n=a(s(e,this.content),e);if(n.length){var r=this.options.activeLabel&&this.findActiveIn(this,e)||this.options.label;r=e.translate(r);var o=(0,p.elt)("div",{"class":v+"-dropdown "+(this.options["class"]||""),style:this.options.css,title:this.options.title},r),i=null;return o.addEventListener("mousedown",function(r){r.preventDefault(),r.stopPropagation(),i=i&&i()?null:t.expand(e,o,n)}),o}}},{key:"select",value:function(e){return s(e,this.content).some(function(t){return t.select(e)})}},{key:"expand",value:function(e,t,n){function r(){return s?void 0:(s=!0,e.off("interaction",r),e.wrapper.removeChild(a),!0)}var o=t.getBoundingClientRect(),i=e.wrapper.getBoundingClientRect(),a=(0,p.elt)("div",{"class":v+"-dropdown-menu "+(this.options["class"]||""),style:"left: "+(o.left-i.left)+"px; top: "+(o.bottom-i.top)+"px"},n),s=!1;return e.signal("interaction"),e.wrapper.appendChild(a),e.on("interaction",r),r}},{key:"findActiveIn",value:function(e,t){for(var n=s(t,e.content),r=0;r<n.length;r++){var o=n[r];if(o instanceof g){var i=o.command(t).active(t);if(i)return o.options.activeLabel}else if(o instanceof b){var a=this.findActiveIn(o,t);if(a)return a}}}}]),e}(),b=n.DropdownSubmenu=function(){function e(t,n){o(this,e),this.options=t||{},this.content=n}return c(e,[{key:"render",value:function(e){var t=a(s(e,this.content),e);if(t.length){var n=(0,p.elt)("div",{"class":v+"-submenu-label"},e.translate(this.options.label)),r=(0,p.elt)("div",{"class":v+"-submenu-wrap"},n,(0,p.elt)("div",{"class":v+"-submenu"},t));return n.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation(),r.classList.toggle(v+"-submenu-wrap-active")}),r}}}]),e}();n.inlineGroup=new y("inline"),n.insertMenu=new k({label:"Insert"},new y("insert")),n.textblockMenu=new k({label:"Type..",displayActive:!0,"class":"ProseMirror-textblock-dropdown"},[new y("textblock"),new b({label:"Heading"},new y("textblockHeading"))]),n.blockGroup=new y("block"),n.historyGroup=new y("history");(0,p.insertCSS)("\n\n.ProseMirror-textblock-dropdown {\n min-width: 3em;\n}\n\n."+v+" {\n margin: 0 -4px;\n line-height: 1;\n}\n\n.ProseMirror-tooltip ."+v+" {\n width: -webkit-fit-content;\n width: fit-content;\n white-space: pre;\n}\n\n."+v+"item {\n margin-right: 3px;\n display: inline-block;\n}\n\n."+v+"separator {\n border-right: 1px solid #ddd;\n margin-right: 3px;\n}\n\n."+v+"-dropdown, ."+v+"-dropdown-menu {\n font-size: 90%;\n white-space: nowrap;\n}\n\n."+v+"-dropdown {\n padding: 1px 14px 1px 4px;\n display: inline-block;\n vertical-align: 1px;\n position: relative;\n cursor: pointer;\n}\n\n."+v+'-dropdown:after {\n content: "";\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid currentColor;\n opacity: .6;\n position: absolute;\n right: 2px;\n top: calc(50% - 2px);\n}\n\n.'+v+"-dropdown-menu, ."+v+"-submenu {\n position: absolute;\n background: white;\n color: #666;\n border: 1px solid #aaa;\n padding: 2px;\n}\n\n."+v+"-dropdown-menu {\n z-index: 15;\n min-width: 6em;\n}\n\n."+v+"-dropdown-item {\n cursor: pointer;\n padding: 2px 8px 2px 4px;\n}\n\n."+v+"-dropdown-item:hover {\n background: #f2f2f2;\n}\n\n."+v+"-submenu-wrap {\n position: relative;\n margin-right: -4px;\n}\n\n."+v+'-submenu-label:after {\n content: "";\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n border-left: 4px solid currentColor;\n opacity: .6;\n position: absolute;\n right: 4px;\n top: calc(50% - 4px);\n}\n\n.'+v+"-submenu {\n display: none;\n min-width: 4em;\n left: 100%;\n top: -3px;\n}\n\n."+v+"-active {\n background: #eee;\n border-radius: 4px;\n}\n\n."+v+"-active {\n background: #eee;\n border-radius: 4px;\n}\n\n."+v+"-disabled {\n opacity: .3;\n}\n\n."+v+"-submenu-wrap:hover ."+v+"-submenu, ."+v+"-submenu-wrap-active ."+v+"-submenu {\n display: block;\n}\n")},{"../dom":3,"../util/obj":58,"../util/sortedinsert":59,"./icons":32}],34:[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 o(e){for(var t=e.parentNode;t;t=t.parentNode)if(t.scrollHeight>t.clientHeight)return t}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},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}}(),s=e("../edit"),u=e("../dom"),l=e("../ui/update"),c=e("./menu"),p="ProseMirror-menubar";(0,s.defineOption)("menuBar",!1,function(e,t){e.mod.menuBar&&e.mod.menuBar.detach(),e.mod.menuBar=t?new h(e,t):null});var f=[c.inlineGroup,c.insertMenu,[c.textblockMenu,c.blockGroup],c.historyGroup],h=function(){function e(t,n){var o=this;r(this,e),this.pm=t,this.config=n||{},this.wrapper=t.wrapper.insertBefore((0,u.elt)("div",{"class":p}),t.wrapper.firstChild),this.spacer=null,this.maxHeight=0,this.widthForMaxHeight=0,this.updater=new l.UpdateScheduler(t,"selectionChange change activeMarkChange commandsChanged",function(){return o.update()}),this.content=n.content||f,this.updater.force(),this.floating=!1,this.config["float"]&&(this.updateFloat(),this.scrollFunc=function(){document.body.contains(o.pm.wrapper)?o.updateFloat():window.removeEventListener("scroll",o.scrollFunc)},window.addEventListener("scroll",this.scrollFunc))}return a(e,[{key:"detach",value:function(){this.updater.detach(),this.wrapper.parentNode.removeChild(this.wrapper),this.scrollFunc&&window.removeEventListener("scroll",this.scrollFunc)}},{key:"update",value:function(){var e=this;return this.wrapper.textContent="",this.wrapper.appendChild((0,c.renderGrouped)(this.pm,this.content)),this.floating?this.updateScrollCursor():function(){return e.wrapper.offsetWidth!=e.widthForMaxHeight&&(e.widthForMaxHeight=e.wrapper.offsetWidth,e.maxHeight=0),e.wrapper.offsetHeight>e.maxHeight?(e.maxHeight=e.wrapper.offsetHeight,function(){e.wrapper.style.minHeight=e.maxHeight+"px"}):void 0}}},{key:"updateFloat",value:function(){var e=this.pm.wrapper.getBoundingClientRect();if(this.floating)if(e.top>=0||e.bottom<this.wrapper.offsetHeight+10)this.floating=!1,this.wrapper.style.position=this.wrapper.style.left=this.wrapper.style.width="",this.wrapper.style.display="",this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{var t=(this.pm.wrapper.offsetWidth-this.pm.wrapper.clientWidth)/2;this.wrapper.style.left=e.left+t+"px",this.wrapper.style.display=e.top>window.innerHeight?"none":""}else if(e.top<0&&e.bottom>=this.wrapper.offsetHeight+10){this.floating=!0;var n=this.wrapper.getBoundingClientRect();this.wrapper.style.left=n.left+"px",this.wrapper.style.width=n.width+"px",this.wrapper.style.position="fixed",this.spacer=(0,u.elt)("div",{"class":p+"-spacer",style:"height: "+n.height+"px"}),this.pm.wrapper.insertBefore(this.spacer,this.wrapper)}}},{key:"updateScrollCursor",value:function(){var e=this;if(!this.floating)return null;var t=this.pm.selection.head;return t?function(){var n=e.pm.coordsAtPos(t),r=e.wrapper.getBoundingClientRect();if(n.top<r.bottom&&n.bottom>r.top){var a=function(){var t=o(e.pm.wrapper);return t?{v:function(){t.scrollTop-=r.bottom-n.top}}:void 0}();if("object"===("undefined"==typeof a?"undefined":i(a)))return a.v}}:null}}]),e}();(0,u.insertCSS)("\n."+p+" {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n position: relative;\n min-height: 1em;\n color: #666;\n padding: 1px 6px;\n top: 0; left: 0; right: 0;\n border-bottom: 1px solid silver;\n background: white;\n z-index: 10;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: visible;\n}\n")},{"../dom":3,"../edit":13,"../ui/update":54,"./menu":33}],35:[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 o(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)}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.defaultSchema=n.CodeMark=n.LinkMark=n.StrongMark=n.EmMark=n.HardBreak=n.Image=n.Paragraph=n.CodeBlock=n.Heading=n.HorizontalRule=n.ListItem=n.BulletList=n.OrderedList=n.BlockQuote=n.Doc=void 0;var s=e("./schema"),u=n.Doc=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"kind",get:function(){return null}}]),t}(s.Block),l=n.BlockQuote=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(s.Block);s.NodeKind.list_item=new s.NodeKind("list_item");var c=n.OrderedList=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"contains",get:function(){return s.NodeKind.list_item}},{key:"attrs",get:function(){return{order:new s.Attribute({"default":"1"})}}}]),t}(s.Block),p=n.BulletList=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"contains",get:function(){return s.NodeKind.list_item}}]),t}(s.Block),f=n.ListItem=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"kind",get:function(){return s.NodeKind.list_item}}]),t}(s.Block),h=n.HorizontalRule=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"contains",get:function(){return null}}]),t}(s.Block),d=n.Heading=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"attrs",get:function(){return{level:new s.Attribute({"default":"1"})}}},{key:"maxLevel",get:function(){return 6}}]),t}(s.Textblock),m=n.CodeBlock=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"contains",get:function(){return s.NodeKind.text}},{key:"containsMarks",get:function(){return!1}},{key:"isCode",get:function(){return!0}}]),t}(s.Textblock),v=n.Paragraph=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"defaultTextblock",get:function(){return!0}}]),t}(s.Textblock),g=n.Image=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"attrs",get:function(){return{src:new s.Attribute,alt:new s.Attribute({"default":""}),title:new s.Attribute({"default":""})}}},{key:"draggable",get:function(){return!0}}]),t}(s.Inline),y=n.HardBreak=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"selectable",get:function(){return!1}},{key:"isBR",get:function(){return!0}}]),t}(s.Inline),k=n.EmMark=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,null,[{key:"rank",get:function(){return 31}}]),t}(s.MarkType),b=n.StrongMark=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,null,[{key:"rank",get:function(){return 32}}]),t}(s.MarkType),w=n.LinkMark=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"attrs",get:function(){return{href:new s.Attribute,title:new s.Attribute({"default":""})}}}],[{key:"rank",get:function(){return 60}}]),t}(s.MarkType),_=n.CodeMark=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),a(t,[{key:"isCode",get:function(){return!0}}],[{key:"rank",get:function(){return 101}}]),t}(s.MarkType),x=new s.SchemaSpec({doc:u,blockquote:l,ordered_list:c,bullet_list:p,list_item:f,horizontal_rule:h,paragraph:v,heading:d,code_block:m,text:s.Text,image:g,hard_break:y},{em:k,strong:b,link:w,code:_});n.defaultSchema=new s.Schema(x)},{"./schema":43}],36:[function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=0;;o++){if(o==e.childCount||o==t.childCount)return e.childCount==t.childCount?null:n;var i=e.child(o),a=t.child(o);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){var u=r(i.content,a.content,n+1);if(null!=u)return u}n+=i.nodeSize}else n+=i.nodeSize}}function o(e,t){for(var n=arguments.length<=2||void 0===arguments[2]?e.size:arguments[2],r=arguments.length<=3||void 0===arguments[3]?t.size:arguments[3],i=e.childCount,a=t.childCount;;){if(0==i||0==a)return i==a?null:{a:n,b:r};var s=e.child(--i),u=t.child(--a),l=s.nodeSize;if(s!=u){if(!s.sameMarkup(u))return{a:n,b:r};if(s.isText&&s.text!=u.text){for(var c=0,p=Math.min(s.text.length,u.text.length);p>c&&s.text[s.text.length-c-1]==u.text[u.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||u.content.size){var f=o(s.content,u.content,n-1,r-1);if(f)return f}n-=l,r-=l}else n-=l,r-=l}}Object.defineProperty(n,"__esModule",{value:!0}),n.findDiffStart=r,n.findDiffEnd=o},{}],37:[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 o(e,t){return s.index=e,s.offset=t,s}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}}();Object.defineProperty(n,"__esModule",{value:!0});var a=n.Fragment=function(){function e(t,n){if(r(this,e),this.content=t,this.size=n||0,null==n)for(var o=0;o<t.length;o++)this.size+=t[o].nodeSize}return i(e,[{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"nodesBetween",value:function(e,t,n,r,o){for(var i=0,a=0;t>a;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&n(s,r+a,o)!==!1&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,e-l),Math.min(s.content.size,t-l),n,r+l)}a=u}}},{key:"cut",value:function(t,n){if(null==n&&(n=this.size),0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;n>a;i++){var s=this.content[i],u=a+s.nodeSize;u>t&&((t>a||u>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=u}return new e(r,o)}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.copy(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"replaceChild",value:function(t,n){var r=this.content.slice(),o=this.size+n.nodeSize-r[t].nodeSize;return r[t]=n,new e(r,o)}},{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),n+=r.nodeSize}}},{key:"leastSuperKind",value:function(){for(var e=void 0,t=this.childCount-1;t>=0;t--){var n=this.child(t).type.kind;e=e?e.sharedSuperKind(n):n}return e}},{key:"findIndex",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?-1:arguments[1];if(0==e)return o(0,e);if(e==this.size)return o(this.content.length,e);if(e>this.size||0>e)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var i=this.child(n),a=r+i.nodeSize;if(a>=e)return a==e||t>0?o(n+1,a):o(n,r);r=a}}},{key:"textContent",get:function(){var e="";return this.content.forEach(function(t){return e+=t.textContent}),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,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.copy(n[n.length-1].text+i.text)):n&&n.push(i)}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}(),s={index:0,offset:0};a.empty=new a([],0)},{}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./node");Object.defineProperty(n,"Node",{enumerable:!0,get:function(){return r.Node}});var o=e("./resolvedpos");Object.defineProperty(n,"ResolvedPos",{enumerable:!0,get:function(){return o.ResolvedPos}});var i=e("./fragment");Object.defineProperty(n,"Fragment",{enumerable:!0,get:function(){return i.Fragment}});var a=e("./replace");Object.defineProperty(n,"Slice",{enumerable:!0,get:function(){return a.Slice}}),Object.defineProperty(n,"ReplaceError",{enumerable:!0,get:function(){return a.ReplaceError}});var s=e("./mark");Object.defineProperty(n,"Mark",{enumerable:!0,get:function(){return s.Mark}});var u=e("./schema");Object.defineProperty(n,"SchemaSpec",{enumerable:!0,get:function(){return u.SchemaSpec}}),Object.defineProperty(n,"Schema",{enumerable:!0,get:function(){return u.Schema}}),Object.defineProperty(n,"NodeType",{enumerable:!0,get:function(){return u.NodeType}}),Object.defineProperty(n,"Block",{enumerable:!0,get:function(){return u.Block}}),Object.defineProperty(n,"Textblock",{enumerable:!0,get:function(){return u.Textblock}}),Object.defineProperty(n,"Inline",{enumerable:!0,get:function(){return u.Inline}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return u.Text}}),Object.defineProperty(n,"MarkType",{enumerable:!0,get:function(){return u.MarkType}}),Object.defineProperty(n,"Attribute",{enumerable:!0,get:function(){return u.Attribute}}),Object.defineProperty(n,"NodeKind",{enumerable:!0,get:function(){return u.NodeKind}});var l=e("./defaultschema");Object.defineProperty(n,"defaultSchema",{enumerable:!0,get:function(){return l.defaultSchema}}),Object.defineProperty(n,"Doc",{enumerable:!0,get:function(){return l.Doc}}),Object.defineProperty(n,"BlockQuote",{enumerable:!0,get:function(){return l.BlockQuote}}),Object.defineProperty(n,"OrderedList",{enumerable:!0,get:function(){return l.OrderedList}}),Object.defineProperty(n,"BulletList",{enumerable:!0,get:function(){return l.BulletList}}),Object.defineProperty(n,"ListItem",{enumerable:!0,get:function(){return l.ListItem}}),Object.defineProperty(n,"HorizontalRule",{enumerable:!0,get:function(){return l.HorizontalRule}}),Object.defineProperty(n,"Paragraph",{enumerable:!0,get:function(){return l.Paragraph}}),Object.defineProperty(n,"Heading",{enumerable:!0,get:function(){return l.Heading}}),Object.defineProperty(n,"CodeBlock",{enumerable:!0,get:function(){return l.CodeBlock}}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return l.Image}}),Object.defineProperty(n,"HardBreak",{enumerable:!0,get:function(){return l.HardBreak}}),Object.defineProperty(n,"CodeMark",{enumerable:!0,get:function(){return l.CodeMark}}),Object.defineProperty(n,"EmMark",{enumerable:!0,get:function(){return l.EmMark}}),Object.defineProperty(n,"StrongMark",{enumerable:!0,get:function(){return l.StrongMark}}),Object.defineProperty(n,"LinkMark",{enumerable:!0,get:function(){return l.LinkMark}});var c=e("./diff");Object.defineProperty(n,"findDiffStart",{enumerable:!0,get:function(){return c.findDiffStart}}),Object.defineProperty(n,"findDiffEnd",{enumerable:!0,get:function(){return c.findDiffEnd}})},{"./defaultschema":35,"./diff":36,"./fragment":37,"./mark":39,"./node":40,"./replace":41,"./resolvedpos":42,"./schema":43}],39:[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 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}}();Object.defineProperty(n,"__esModule",{value:!0});var i=(n.Mark=function(){function e(t,n){r(this,e),this.type=t,this.attrs=n}return o(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){if(this==e)return!0;if(this.type!=e.type)return!1;for(var t in this.attrs)if(e.attrs[t]!=this.attrs[t])return!1;return!0}}],[{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 i;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}(),[])},{}],40:[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 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)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var s=function v(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:v(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},u=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.TextNode=n.Node=void 0;var l=e("./fragment"),c=e("./mark"),p=e("./replace"),f=e("./resolvedpos"),h=[],d=Object.create(null),m=n.Node=function(){function e(t,n,r,o){i(this,e),this.type=t,this.attrs=n,this.content=r||l.Fragment.empty,this.marks=o||h}return u(e,[{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(t,n,r){return this.type==t&&e.sameAttrs(this.attrs,n||d)&&c.Mark.sameSet(this.marks,r||h)}},{key:"copy",value:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];return e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)}},{key:"mark",value:function(e){return new this.constructor(this.type,this.attrs,this.content,e)}},{key:"cut",value:function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.content.size:arguments[1];if(e==t)return p.Slice.empty;var n=this.resolve(e),r=this.resolve(t),o=n.sameDepth(r),i=n.start(o),a=n.node(o),s=a.content.cut(n.pos-i,r.pos-i);return new p.Slice(s,n.depth-o,r.depth-o,a)}},{key:"replace",value:function(e,t,n){return(0,p.replace)(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(e>r)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"resolve",value:function(e){return f.ResolvedPos.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return f.ResolvedPos.resolve(this,e)}},{key:"marksAt",value:function(e){var t=this.resolve(e),n=t.parent,r=t.index(t.depth);if(0==n.content.size)return h;if(0==r||!t.atNodeBoundary)return n.child(r).marks;for(var o=n.child(r-1).marks,i=0;i<o.length;i++)o[i].type.inclusiveRight||(o=o[i--].removeFromSet(o));return o}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return this.nodesBetween(e,t,function(e){return n.isInSet(e.marks)&&(r=!0),!r}),r}},{key:"toString",value:function(){var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),a(this.marks,e)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(function(e){return e.toJSON()})),e}},{key:"nodeSize",get:function(){return this.type.contains?2+this.content.size:1}},{key:"childCount",get:function(){return this.content.childCount}},{key:"textContent",get:function(){return this.content.textContent}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"value",get:function(){return this}}],[{key:"sameAttrs",value:function(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0}},{key:"fromJSON",value:function(e,t){var n=e.nodeType(t.type),r=null!=t.text?t.text:l.Fragment.fromJSON(e,t.content);return n.create(t.attrs,r,t.marks&&t.marks.map(e.markFromJSON))}}]),e}();n.TextNode=function(e){function t(e,n,o,a){i(this,t);var s=r(this,Object.getPrototypeOf(t).call(this,e,n,null,a));if(!o)throw new RangeError("Empty text nodes are not allowed");return s.text=o,s}return o(t,e),u(t,[{key:"toString",value:function(){return a(this.marks,JSON.stringify(this.text))}},{key:"mark",value:function(e){return new t(this.type,this.attrs,this.text,e)}},{key:"cut",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.text.length:arguments[1];return 0==e&&t==this.text.length?this:this.copy(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=s(Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.text=this.text,e}},{key:"textContent",get:function(){return this.text}},{key:"nodeSize",get:function(){return this.text.length}}]),t}(m)},{"./fragment":37,"./mark":39,"./replace":41,"./resolvedpos":42}],41:[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 o(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,n){if(n.openLeft>e.depth)throw new k("Inserted content deeper than insertion position");if(e.depth-n.openLeft!=t.depth-n.openRight)throw new k("Inconsistent open depths");return s(e,t,n,0)}function s(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openLeft){var a=s(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){var u=m(n,e),l=u.start,c=u.end;return f(i,h(e,l,c,t,r))}return f(i,d(e,t,r))}function u(e,t){if(!e.type.canContainContent(t.type))throw new k("Cannot join "+t.type.name+" onto "+e.type.name)}function l(e,t,n){var r=e.node(n);return u(r,t.node(n)),r}function c(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.copy(t[n].text+e.text):t.push(e)}function p(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.atNodeBoundary||(c(e.nodeAfter,r),i++));for(var s=i;a>s;s++)c(o.child(s),r);t&&t.depth==n&&!t.atNodeBoundary&&c(t.nodeBefore,r)}function f(e,t){if(!e.type.checkContent(t,e.attrs))throw new k("Invalid content for node "+e.type.name);return e.copy(t)}function h(e,t,n,r,o){var i=e.depth>o&&l(e,t,o+1),a=r.depth>o&&l(n,r,o+1),s=[];return p(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(u(i,a),c(f(i,h(e,t,n,r,o+1)),s)):(i&&c(f(i,d(e,t,o+1)),s),p(t,n,o,s),a&&c(f(a,d(n,r,o+1)),s)),p(r,null,o,s),new y.Fragment(s)}function d(e,t,n){var r=[];if(p(null,e,n,r),e.depth>n){var o=l(e,t,n+1);c(f(o,d(e,t,n+1)),r)}return p(t,null,n,r),new y.Fragment(r)}function m(e,t){var n=t.depth-e.openLeft,r=t.node(n);if(!r.type.canContainFragment(e.content))throw new k("Content "+e.content+" cannot be placed in "+r.type.name);for(var o=r.copy(e.content),i=n-1;i>=0;i--)o=t.node(i).copy(y.Fragment.from(o));return{start:o.resolveNoCache(e.openLeft+n),end:o.resolveNoCache(o.content.size-e.openRight-n) |
| }}var v=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Slice=n.ReplaceError=void 0,n.replace=a;var g=e("../util/error"),y=e("./fragment"),k=n.ReplaceError=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(g.ProseMirrorError),b=n.Slice=function(){function e(t,n,o,i){r(this,e),this.content=t,this.openLeft=n,this.openRight=o,this.possibleParent=i}return v(e,[{key:"toJSON",value:function(){return this.content.size?{content:this.content.toJSON(),openLeft:this.openLeft,openRight:this.openRight}:null}},{key:"size",get:function(){return this.content.size-this.openLeft-this.openRight}}],[{key:"fromJSON",value:function(t,n){return n?new e(y.Fragment.fromJSON(t,n.content),n.openLeft,n.openRight):e.empty}}]),e}();b.empty=new b(y.Fragment.empty,0,0)},{"../util/error":55,"./fragment":37}],42:[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 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}}();Object.defineProperty(n,"__esModule",{value:!0});var i=(n.ResolvedPos=function(){function e(t,n,o){r(this,e),this.pos=t,this.path=n,this.depth=n.length/3-1,this.parentOffset=o}return o(e,[{key:"node",value:function(e){return this.path[3*e]}},{key:"index",value:function(e){return this.path[3*e+1]}},{key:"start",value:function(e){return 0==e?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"sameDepth",value:function(e){for(var t=0,n=Math.min(this.depth,e.depth);n>t&&this.index(t)==e.index(t);)++t;return t}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"atNodeBoundary",get:function(){return this.path[this.path.length-1]==this.pos}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),u=s.index,l=s.offset,c=i-l;if(r.push(a,u,o+l),!c)break;if(a=a.child(u),a.isText)break;i=c-1,o+=l+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<i.length;r++){var o=i[r];if(o.pos==n&&o.node(0)==t)return o}var u=i[a]=e.resolve(t,n);return a=(a+1)%s,u}}]),e}(),[]),a=0,s=6},{}],43:[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 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)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){var n=(0,f.copyObj)(e);for(var r in t){var o=t[r];null==o?delete n[r]:n[r]=o}return n}var s=function b(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:b(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},u=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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Schema=n.SchemaSpec=n.MarkType=n.Attribute=n.Text=n.Inline=n.Textblock=n.Block=n.NodeKind=n.NodeType=void 0;var l=e("./node"),c=e("./fragment"),p=e("./mark"),f=e("../util/obj"),h=function(){function e(){i(this,e)}return u(e,[{key:"getDefaultAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs){var n=this.attrs[t];if(null==n["default"])return null;e[t]=n["default"]}return e}},{key:"computeAttrs",value:function(e,t){var n=Object.create(null);for(var r in this.attrs){var o=e&&e[r];if(null==o){var i=this.attrs[r];if(null!=i["default"])o=i["default"];else{if(!i.compute)throw new RangeError("No value supplied for attribute "+r);o=i.compute(this,t)}}n[r]=o}return n}},{key:"freezeAttrs",value:function(){var e=Object.create(null);for(var t in this.attrs)e[t]=this.attrs[t];Object.defineProperty(this,"attrs",{value:e})}},{key:"attrs",get:function(){return{}}}],[{key:"updateAttrs",value:function(e){Object.defineProperty(this.prototype,"attrs",{value:a(this.prototype.attrs,e)})}},{key:"getRegistry",value:function(){return this==e?null:(this.prototype.hasOwnProperty("registry")||(this.prototype.registry=Object.create(Object.getPrototypeOf(this).getRegistry())),this.prototype.registry)}},{key:"getNamespace",value:function(t){if(this==e)return null;var n=this.getRegistry();return Object.prototype.hasOwnProperty.call(n,t)||(n[t]=Object.create(Object.getPrototypeOf(this).getNamespace(t))),n[t]}},{key:"register",value:function(e,t,n){this.getNamespace(e)[t]=function(){return n}}},{key:"registerComputed",value:function(e,t,n){this.getNamespace(e)[t]=n}},{key:"cleanNamespace",value:function(e){this.getNamespace(e).__proto__=null}}]),e}(),d=n.NodeType=function(e){function t(e,n){i(this,t);var o=r(this,Object.getPrototypeOf(t).call(this));return o.name=e,o.freezeAttrs(),o.defaultAttrs=o.getDefaultAttrs(),o.schema=n,o}return o(t,e),u(t,[{key:"canContainFragment",value:function(e){for(var t=0;t<e.childCount;t++)if(!this.canContain(e.child(t)))return!1;return!0}},{key:"canContain",value:function(e){if(!this.canContainType(e.type))return!1;for(var t=0;t<e.marks.length;t++)if(!this.canContainMark(e.marks[t]))return!1;return!0}},{key:"canContainMark",value:function(e){var t=this.containsMarks;if(t===!0)return!0;if(t)for(var n=0;n<t.length;n++)if(t[n]==e.name)return!0;return!1}},{key:"canContainType",value:function(e){return e.kind&&e.kind.isSubKind(this.contains)}},{key:"canContainContent",value:function(e){return e.contains&&e.contains.isSubKind(this.contains)}},{key:"findConnection",value:function(e){return e.kind&&this.findConnectionToKind(e.kind)}},{key:"findConnectionToKind",value:function(e){var t=this.schema.cached.connections,n=this.name+"-"+e.id;return n in t?t[n]:t[n]=this.findConnectionToKindInner(e)}},{key:"findConnectionToKindInner",value:function(e){if(e.isSubKind(this.contains))return[];for(var t=Object.create(null),n=[{from:this,via:[]}];n.length;){var r=n.shift();for(var o in this.schema.nodes){var i=this.schema.nodes[o];if(i.contains&&i.defaultAttrs&&!(i.contains.id in t)&&r.from.canContainType(i)){var a=r.via.concat(i);if(e.isSubKind(i.contains))return a;n.push({from:i,via:a}),t[i.contains.id]=!0}}}}},{key:"computeAttrs",value:function(e,n){return!e&&this.defaultAttrs?this.defaultAttrs:s(Object.getPrototypeOf(t.prototype),"computeAttrs",this).call(this,e,n)}},{key:"create",value:function(e,t,n){return new l.Node(this,this.computeAttrs(e,t),c.Fragment.from(t),p.Mark.setFrom(n))}},{key:"checkContent",value:function(e,t){if(0==e.size)return this.canBeEmpty;for(var n=0;n<e.childCount;n++)if(!this.canContain(e.child(n)))return!1;return!0}},{key:"fixContent",value:function(e,t){return this.defaultContent()}},{key:"isBlock",get:function(){return!1}},{key:"isTextblock",get:function(){return!1}},{key:"isInline",get:function(){return!1}},{key:"isText",get:function(){return!1}},{key:"selectable",get:function(){return!0}},{key:"draggable",get:function(){return!1}},{key:"locked",get:function(){return!1}},{key:"contains",get:function(){return null}},{key:"kind",get:function(){return null}},{key:"canBeEmpty",get:function(){return!0}},{key:"containsMarks",get:function(){return!1}}],[{key:"compile",value:function(e,t){var n=Object.create(null);for(var r in e)n[r]=new e[r](r,t);if(!n.doc)throw new RangeError("Every schema needs a 'doc' type");if(!n.text)throw new RangeError("Every schema needs a 'text' type");return n}}]),t}(h),m=n.NodeKind=function(){function e(t,n,r){var o=this;i(this,e),this.name=t,this.id=++e.nextID,this.supers=Object.create(null),this.supers[this.id]=this,this.subs=r||[],n&&n.forEach(function(e){return o.addSuper(e)}),r&&r.forEach(function(e){return o.addSub(e)})}return u(e,[{key:"sharedSuperKind",value:function(e){if(this.isSubKind(e))return e;if(e.isSubKind(this))return this;var t=void 0;for(var n in this.supers){var r=e.supers[n];!r||t&&!r.isSupKind(t)||(t=r)}return t}},{key:"addSuper",value:function(e){for(var t in e.supers)this.supers[t]=e.supers[t],e.subs.push(this)}},{key:"addSub",value:function(e){var t=this;if(this.supers[e.id])throw new RangeError("Circular subkind relation");e.supers[this.id]=!0,e.subs.forEach(function(e){return t.addSub(e)})}},{key:"isSubKind",value:function(e){return e&&e.id in this.supers||!1}}]),e}();m.nextID=0,m.block=new m("block"),m.inline=new m("inline"),m.text=new m("text",[m.inline]);var v=n.Block=function(e){function t(){return i(this,t),r(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),u(t,[{key:"defaultContent",value:function(){var e=this.schema.defaultTextblockType().create(),t=this.findConnection(e.type);if(!t)throw new RangeError("Can't create default content for "+this.name);for(var n=t.length-1;n>=0;n--)e=t[n].create(null,e);return c.Fragment.from(e)}},{key:"contains",get:function(){return m.block}},{key:"kind",get:function(){return m.block}},{key:"isBlock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return null==this.contains}}]),t}(d),g=(n.Textblock=function(e){function t(){return i(this,t),r(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),u(t,[{key:"contains",get:function(){return m.inline}},{key:"containsMarks",get:function(){return!0}},{key:"isTextblock",get:function(){return!0}},{key:"canBeEmpty",get:function(){return!0}}]),t}(v),n.Inline=function(e){function t(){return i(this,t),r(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),u(t,[{key:"kind",get:function(){return m.inline}},{key:"isInline",get:function(){return!0}}]),t}(d)),y=(n.Text=function(e){function t(){return i(this,t),r(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),u(t,[{key:"create",value:function(e,t,n){return new l.TextNode(this,this.computeAttrs(e,t),t,n)}},{key:"selectable",get:function(){return!1}},{key:"isText",get:function(){return!0}},{key:"kind",get:function(){return m.text}}]),t}(g),n.Attribute=function w(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,w),this["default"]=e["default"],this.compute=e.compute,this.label=e.label},n.MarkType=function(e){function t(e,n,o){i(this,t);var a=r(this,Object.getPrototypeOf(t).call(this));a.name=e,a.freezeAttrs(),a.rank=n,a.schema=o;var s=a.getDefaultAttrs();return a.instance=s&&new p.Mark(a,s),a}return o(t,e),u(t,[{key:"create",value:function(e){return!e&&this.instance?this.instance:new p.Mark(this,this.computeAttrs(e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)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(e[t].type==this)return e[t]}},{key:"inclusiveRight",get:function(){return!0}}],[{key:"getOrder",value:function(e){var t=[];for(var n in e)t.push({name:n,rank:e[n].rank});t.sort(function(e,t){return e.rank-t.rank});for(var r=Object.create(null),o=0;o<t.length;o++)r[t[o].name]=o;return r}},{key:"compile",value:function(e,t){var n=this.getOrder(e),r=Object.create(null);for(var o in e)r[o]=new e[o](o,n[o],t);return r}},{key:"rank",get:function(){return 50}}]),t}(h)),k=(n.SchemaSpec=function(){function e(t,n){i(this,e),this.nodes=t||{},this.marks=n||{}}return u(e,[{key:"update",value:function(t,n){return new e(t?a(this.nodes,t):this.nodes,n?a(this.marks,n):this.marks)}}]),e}(),function(){function e(t){i(this,e),this.spec=t,this.nodes=d.compile(t.nodes,this),this.marks=y.compile(t.marks,this);for(var n in this.nodes)if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");this.cached=Object.create(null),this.cached.connections=Object.create(null),this.node=this.node.bind(this),this.text=this.text.bind(this),this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this)}return u(e,[{key:"node",value:function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof d))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.create(t,n,r)}},{key:"text",value:function(e,t){return this.nodes.text.create(null,e,p.Mark.setFrom(t))}},{key:"defaultTextblockType",value:function(){var e=this.cached.defaultTextblockType;if(void 0!==e)return e;for(var t in this.nodes)if(this.nodes[t].defaultTextblock)return this.cached.defaultTextblockType=this.nodes[t];return this.cached.defaultTextblockType=null}},{key:"mark",value:function(e,t){var n=this.marks[e];if(!n)throw new RangeError("No mark named "+e);return n.create(t)}},{key:"nodeFromJSON",value:function(e){return l.Node.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){var t=this.marks[e._],n=null;for(var r in e)"_"!=r&&(n||(n=Object.create(null)),n[r]=e[r]);return n?t.create(n):t.instance}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}},{key:"registry",value:function t(e,n){for(var r=0;2>r;r++){var o=r?this.marks:this.nodes;for(var i in o){var a=o[i],t=a.registry,s=t&&t[e];if(s)for(var u in s){var l=s[u](a);null!=l&&n(u,l,a,i)}}}}}]),e}());n.Schema=k},{"../util/obj":58,"./fragment":37,"./mark":39,"./node":40}],44:[function(e,t,n){"use strict";function r(e,t){if(e.depth!=t.depth)return!1;for(var n=0;n<e.depth;n++)if(e.index(n)!=t.index(n))return!1;return e.parentOffset<=t.parentOffset}function o(e,t,n){return!!a(e.resolve(t),e.resolve(null==n?t:n))}function i(e,t){var n=e.sameDepth(t);return e.node(n).isTextblock&&--n,n&&e.before(n)>=t.after(n)?null:n}function a(e,t){var n=i(e,t);if(null==n)return null;for(var r=e.node(n),o=n-1;o>=0;--o)if(e.node(o).type.canContainContent(r.type))return{depth:o,shared:n,unwrap:!1};if(r.isBlock)for(var o=n-1;o>=0;--o){for(var a=e.node(o),s=e.index(n),u=Math.min(t.index(n)+1,r.childCount);u>s;s++)a.type.canContainContent(r.child(s).type);return{depth:o,shared:n,unwrap:!0}}}function s(e,t,n,r){return!!u(e.resolve(t),e.resolve(null==n?t:n),r)}function u(e,t,n){var r=i(e,t);if(null==r)return null;var o=e.node(r),a=o.type.findConnection(n),s=n.findConnection(o.child(e.index(r)).type);return a&&s?{shared:r,around:a,inside:s}:void 0}Object.defineProperty(n,"__esModule",{value:!0}),n.canLift=o,n.canWrap=s;var l=e("../model"),c=e("./transform"),p=e("./step"),f=e("./map");p.Step.define("ancestor",{apply:function(e,t){var n=e.resolve(t.from),o=e.resolve(t.to);if(!r(n,o))return p.StepResult.fail("Not a flat range");var i=t.param,a=i.depth,s=void 0===a?0:a,u=i.types,c=void 0===u?[]:u,f=i.attrs,h=void 0===f?[]:f;if(0==s&&0==c.length)return p.StepResult.ok(e);for(var d=0,m=n.depth;s>d;d++,m--)if(n.start(m)!=n.pos-d||o.end(m)!=o.pos+d)return p.StepResult.fail("Parent at depth "+m+" not fully covered");var v=n.parent,g=void 0;if(c.length){var y=c[c.length-1];if(!y.contains)throw new RangeError("Can not wrap content in node type "+y.name);var k=v.content.cut(n.parentOffset,o.parentOffset);if(!y.checkContent(k,h[c.length-1]))return p.StepResult.fail("Content can not be wrapped in ancestor "+y.name);for(var d=c.length-1;d>=0;d--)k=l.Fragment.from(c[d].create(h[d],k));g=new l.Slice(k,0,0)}else g=new l.Slice(v.content,0,0);return p.StepResult.fromReplace(e,n.pos-s,o.pos+s,g)},posMap:function(e){var t=e.param.depth||0,n=e.param.types?e.param.types.length:0;return t==n&&2>t?f.PosMap.empty:new f.PosMap([e.from-t,t,n,e.to,t,n])},invert:function(e,t){for(var n=[],r=[],o=t.resolve(e.from),i=e.param.depth||0,a=e.param.types?e.param.types.length:0,s=0;i>s;s++){var u=o.node(o.depth-s);n.unshift(u.type),r.unshift(u.attrs)}var l=a-i;return new p.Step("ancestor",e.from+l,e.to+l,{depth:a,types:n,attrs:r})},paramToJSON:function(e){return{depth:e.depth,types:e.types&&e.types.map(function(e){return e.name}),attrs:e.attrs}},paramFromJSON:function(e,t){return{depth:t.depth,types:t.types&&t.types.map(function(t){return e.nodeType(t)}),attrs:t.attrs}}}),c.Transform.prototype.lift=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],r=this.doc.resolve(e),o=this.doc.resolve(t),i=a(r,o);if(!i){if(!n)throw new RangeError("No valid lift target");return this}for(var s=i.depth,u=i.shared,l=i.unwrap,c=r.before(u+1),p=o.after(u+1),f=u;f>s;f--)if(o.index(f)+1<o.node(f).childCount){this.split(o.after(f+1),f-s);break}for(var f=u;f>s;f--)if(r.index(f)>0){var h=f-s;this.split(r.before(f+1),h),c+=2*h,p+=2*h;break}if(l){for(var d=c,m=r.node(u),v=r.index(u),g=o.index(u)+1,y=!0;g>v;v++,y=!1)y||(this.join(d),p-=2),d+=m.child(v).nodeSize-(y?0:2);u++,c++,p--}return this.step("ancestor",c,p,{depth:u-s})},c.Transform.prototype.wrap=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],n=arguments[2],r=arguments[3],o=this.doc.resolve(e),i=this.doc.resolve(t),a=u(o,i,n);if(!a)throw new RangeError("Wrap not possible");var s=a.shared,l=a.around,c=a.inside,p=l.concat(n).concat(c),f=l.map(function(){return null}).concat(r).concat(c.map(function(){return null})),h=o.before(s+1);if(this.step("ancestor",h,i.after(s+1),{types:p,attrs:f}),c.length)for(var d=h+p.length,m=o.node(s),v=o.index(s),g=i.index(s)+1,y=!0;g>v;v++,y=!1)y||this.split(d,c.length),d+=m.child(v).nodeSize+(y?0:2*c.length);return this},c.Transform.prototype.setBlockType=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],n=this,r=arguments[2],o=arguments[3];if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");return this.doc.nodesBetween(e,t,function(e,t){if(e.isTextblock&&!e.hasMarkup(r,o)){var i=t+1,a=i+e.content.size;return n.clearMarkup(i,a,r),n.step("ancestor",i,a,{depth:1,types:[r],attrs:[o]}),!1}}),this},c.Transform.prototype.setNodeType=function(e,t,n){var r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at given position");return t||(t=r.type),r.type.contains?this.step("ancestor",e+1,e+1+r.content.size,{depth:1,types:[t],attrs:[n]}):this.replaceWith(e,e+r.nodeSize,t.create(n,null,r.marks))}},{"../model":38,"./map":47,"./step":51,"./transform":52}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Remapping=n.MapResult=n.PosMap=n.joinable=n.joinPoint=n.canWrap=n.canLift=n.StepResult=n.Step=n.TransformError=n.Transform=void 0;var r=e("./transform");Object.defineProperty(n,"Transform",{enumerable:!0,get:function(){return r.Transform}}),Object.defineProperty(n,"TransformError",{enumerable:!0,get:function(){return r.TransformError}});var o=e("./step");Object.defineProperty(n,"Step",{enumerable:!0,get:function(){return o.Step}}),Object.defineProperty(n,"StepResult",{enumerable:!0,get:function(){return o.StepResult}});var i=e("./ancestor");Object.defineProperty(n,"canLift",{enumerable:!0,get:function(){return i.canLift}}),Object.defineProperty(n,"canWrap",{enumerable:!0,get:function(){return i.canWrap}});var a=e("./join");Object.defineProperty(n,"joinPoint",{enumerable:!0,get:function(){return a.joinPoint}}),Object.defineProperty(n,"joinable",{enumerable:!0,get:function(){return a.joinable}});var s=e("./map");Object.defineProperty(n,"PosMap",{enumerable:!0,get:function(){return s.PosMap}}),Object.defineProperty(n,"MapResult",{enumerable:!0,get:function(){return s.MapResult}}),Object.defineProperty(n,"Remapping",{enumerable:!0,get:function(){return s.Remapping}}),e("./mark"),e("./split"),e("./replace")},{"./ancestor":44,"./join":46,"./map":47,"./mark":48,"./replace":49,"./split":50,"./step":51,"./transform":52}],46:[function(e,t,n){"use strict";function r(e,t){var n=e.resolve(t);return o(n.nodeBefore,n.nodeAfter)}function o(e,t){return e&&t&&!e.isText&&e.type.contains&&e.type.canContainContent(t.type)}function i(e,t){for(var n=arguments.length<=2||void 0===arguments[2]?-1:arguments[2],r=e.resolve(t),i=r.depth;;i--){var a=void 0,s=void 0;if(i==r.depth?(a=r.nodeBefore,s=r.nodeAfter):n>0?(a=r.node(i+1),s=r.node(i).maybeChild(r.index(i)+1)):(a=r.node(i).maybeChild(r.index(i)-1),s=r.node(i+1)),a&&!a.isTextblock&&o(a,s))return t;if(0==i)break;t=0>n?r.before(i):r.after(i)}}Object.defineProperty(n,"__esModule",{value:!0}),n.joinable=r,n.joinPoint=i;var a=e("../model"),s=e("./transform"),u=e("./step"),l=e("./map");u.Step.define("join",{apply:function(e,t){var n=e.resolve(t.from),r=e.resolve(t.to);return n.parentOffset<n.parent.content.size||r.parentOffset>0||r.pos-n.pos!=2?u.StepResult.fail("Join positions not around a split"):u.StepResult.fromReplace(e,n.pos,r.pos,a.Slice.empty)},posMap:function(e){return new l.PosMap([e.from,2,0])},invert:function(e,t){var n=t.resolve(e.from),r=n.depth-1,o=n.node(r).child(n.index(r)+1),i=null;return n.parent.sameMarkup(o)||(i={type:o.type,attrs:o.attrs}),new u.Step("split",e.from,e.from,i)}}),s.Transform.prototype.join=function(e){for(var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],r=0;t>r;r++){var o=this.doc.resolve(e);if(0==o.parentOffset||o.parentOffset==o.parent.content.size||!o.nodeBefore.type.canContainContent(o.nodeAfter.type)){if(!n)throw new RangeError("Nothing to join at "+e);break}this.step("join",e-1,e+1),e--}return this}},{"../model":38,"./map":47,"./step":51,"./transform":52}],47:[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 o(e,t){return e+t*p}function i(e){return e&c}function a(e){return(e-(e&c))/p}function s(e,t,n){for(var r=0;r<e.length;r++)t=e[r].map(t,n);return t}function u(e,t,n){for(var r=!1,o=0;o<e.length;o++){var i=e[o].mapResult(t,n);t=i.pos,i.deleted&&(r=!0)}return new f(t,r)}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.mapThrough=s,n.mapThroughResult=u;var c=65535,p=Math.pow(2,16),f=n.MapResult=function d(e){var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],n=arguments.length<=2||void 0===arguments[2]?null:arguments[2];r(this,d),this.pos=e,this.deleted=t,this.recover=n},h=n.PosMap=function(){function e(t,n){r(this,e),this.ranges=t,this.inverted=n||!1}return l(e,[{key:"recover",value:function(e){var t=0,n=i(e);if(!this.inverted)for(var r=0;n>r;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 r=0,i=this.inverted?2:1,a=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var u=this.ranges[s]-(this.inverted?r:0);if(u>e)break;var l=this.ranges[s+i],c=this.ranges[s+a],p=u+l;if(p>=e){var h=l?e==u?-1:e==p?1:t:t,d=u+r+(0>h?0:c);if(n)return d;var m=o(s/3,e-u);return new f(d,e!=u&&e!=p,m)}r+=c-l}return n?e+r:new f(e+r)}},{key:"touches",value:function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var u=this.ranges[s]-(this.inverted?n:0);if(u>e)break;var l=this.ranges[s+o],c=u+l;if(c>=e&&s==3*r)return!0;n+=this.ranges[s+a]-l}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}();h.empty=new h([]);n.Remapping=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],n=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];r(this,e),this.head=t,this.tail=n,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 0>e?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,o=null,i=-this.head.length;i<this.tail.length;i++){var a=this.get(i),s=void 0;if(null!=(s=o&&o[i])&&a.touches(e,s))e=a.recover(s);else{var u=a.mapResult(e,t);if(null!=u.recover){var l=this.mirror[i];if(null!=l){if(u.deleted){i=l,e=this.get(l).recover(u.recover);continue}(o||(o=Object.create(null)))[l]=u.recover}}u.deleted&&(r=!0),e=u.pos}}return n?e:new f(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}()},{}],48:[function(e,t,n){"use strict";function r(e,t,n){return e.content.size&&(e=e.copy(o(e.content,t,e))),e.isInline&&(e=t(e,n)),e}function o(e,t,n){for(var o=[],a=0;a<e.childCount;a++)o.push(r(e.child(a),t,n));return i.Fragment.fromArray(o)}var i=e("../model"),a=e("./transform"),s=e("./step");s.Step.define("addMark",{apply:function(e,t){var n=e.slice(t.from,t.to),r=e.resolve(t.from);return n.content=o(n.content,function(e,n){return n.type.canContainMark(t.param.type)?e.mark(t.param.addToSet(e.marks)):e},r.node(r.depth-n.openLeft)),s.StepResult.fromReplace(e,t.from,t.to,n)},invert:function(e){return new s.Step("removeMark",e.from,e.to,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),a.Transform.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,u=null;return this.doc.nodesBetween(e,t,function(r,l,c){if(r.isInline){var p=r.marks;if(n.isInSet(p)||!c.type.canContainMark(n.type))u=a=null;else{var f=Math.max(l,e),h=Math.min(l+r.nodeSize,t),d=n.type.isInSet(p);d?a&&a.param.eq(d)?a.to=h:o.push(a=new s.Step("removeMark",f,h,d)):a=null,u?u.to=h:i.push(u=new s.Step("addMark",f,h,n))}}}),o.forEach(function(e){return r.step(e)}),i.forEach(function(e){return r.step(e)}),this},s.Step.define("removeMark",{apply:function(e,t){var n=e.slice(t.from,t.to);return n.content=o(n.content,function(e){return e.mark(t.param.removeFromSet(e.marks))}),s.StepResult.fromReplace(e,t.from,t.to,n)},invert:function(e){return new s.Step("addMark",e.from,e.to,e.param)},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return e.markFromJSON(t)}}),a.Transform.prototype.removeMark=function(e,t){var n=this,r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=[],a=0;return this.doc.nodesBetween(e,t,function(n,s){if(n.isInline){a++;var u=null;if(r instanceof i.MarkType){var l=r.isInSet(n.marks);l&&(u=[l])}else r?r.isInSet(n.marks)&&(u=[r]):u=n.marks;if(u&&u.length)for(var c=Math.min(s+n.nodeSize,t),p=0;p<u.length;p++){for(var f=u[p],l=void 0,h=0;h<o.length;h++){var d=o[h];d.step==a-1&&f.eq(o[h].style)&&(l=d)}l?(l.to=c,l.step=a):o.push({style:f,from:Math.max(s,e),to:c,step:a})}}}),o.forEach(function(e){return n.step("removeMark",e.from,e.to,e.style)}),this},a.Transform.prototype.clearMarkup=function(e,t,n){var r=this,o=[];this.doc.nodesBetween(e,t,function(i,a){if(i.isInline){if(n?!n.canContainType(i.type):!i.type.isText)return void o.push(new s.Step("replace",a,a+i.nodeSize));for(var u=0;u<i.marks.length;u++){var l=i.marks[u];n&&n.canContainMark(l.type)||r.step("removeMark",Math.max(a,e),Math.min(a+i.nodeSize,t),l)}}});for(var i=o.length-1;i>=0;i--)this.step(o[i]);return this}},{"../model":38,"./step":51,"./transform":52}],49:[function(e,t,n){"use strict";function r(e,t,n){var r=e.sameDepth(t),a=d(e,n),s=o(a);s&&(r=Math.min(s.depth,r)),w=-1e10;var u=p(e.node(r).type,i(e,t,r,a),e,t,r);return{fitted:new g.Slice(u,e.depth-r,t.depth-r),distAfter:w-(t.depth-r)}}function o(e){for(var t=0;t<e.length;t++)if(e[t])return e[t]}function i(e,t,n,r){var o=e.depth>n&&e.node(n+1),u=t.depth>n&&t.node(n+1),p=r[n];if(o&&u&&o.type.canContainContent(u.type)&&!p)return g.Fragment.from(f(o,i(e,t,n+1,r),e,t,n+1));var h=g.Fragment.empty;return p&&(h=c(p.content,p.openLeft),p.isEnd&&(w=p.openRight)),w--,o&&(h=h.addToStart(f(o,a(e,n+1,r),e,null,n+1))),u?h=s(h,t,n+1,p?p.openRight:0):p&&(h=l(h,p.openRight)),w++,h}function a(e,t,n){var r=n[t],o=g.Fragment.empty;return r&&(o=l(r.content,r.openRight),r.isEnd&&(w=r.openRight)),w--,e.depth>t&&(o=o.addToStart(f(e.node(t+1),a(e,t+1,n),e,null,t+1))),w++,o}function s(e,t,n,r){var o=t.node(n);if(0==r||!o.type.canContainContent(e.lastChild.type)){var i=f(o,u(t,n),null,t,n);return w+=i.nodeSize,l(e,r).addToEnd(i)}var a=e.lastChild.content;return n<t.depth&&(a=s(a,t,n+1,r-1)),e.replaceChild(e.childCount-1,o.copy(a))}function u(e,t){return e.depth==t?g.Fragment.empty:g.Fragment.from(f(e.node(t+1),u(e,t+1),null,e,t+1))}function l(e,t){if(0==t)return e;var n=e.lastChild,r=f(n,l(n.content,t-1));return r==n?e:e.replaceChild(e.childCount-1,r)}function c(e,t){if(0==t)return e;var n=e.firstChild,r=f(n,n.content);return r==n?e:e.replaceChild(0,r)}function p(e,t,n,r,o){if(e.canBeEmpty)return t;var i=t.size||n&&(n.depth>o||n.index(o))||r&&(r.depth>o||r.index(o)<r.node(o).childCount);return i?t:e.defaultContent()}function f(e,t,n,r,o){return e.copy(p(e.type,t,n,r,o))}function h(e,t){for(var n=e.content,r=1;t>r;r++)n=n.firstChild.content;return n.firstChild}function d(e,t){for(var n=e.depth,r=null,o=0,i=[],a=null,s=t.openLeft;;--s){var u=void 0,l=void 0,c=void 0;if(s>=0){if(s>0){var p=h(t,s);u=p.type,l=p.attrs,c=p.content}else 0==s&&(c=t.content);s<t.openLeft&&(c=c.cut(c.firstChild.nodeSize))}else c=g.Fragment.empty,u=a[a.length+s-1];if(r&&(c=c.addToStart(r)),0==c.size&&0>=s)break;var f=m(u,c,e,n);if(f>-1){if(c.size>0&&(i[f]={content:c,openLeft:o,openRight:s>0?0:t.openRight-s,isEnd:0>=s,depth:f}),0>=s)break;r=null,o=0,n=Math.max(0,f-1)}else{if(0==s){if(a=e.node(0).type.findConnectionToKind(c.leastSuperKind()),!a)break;a.unshift(e.node(0).type),u=a[a.length-1]}r=u.create(l,c),o++}}return i}function m(e,t,n,r){for(var o=r;o>=0;o--){var i=n.node(o).type;if(e?i.canContainContent(e):i.canContainFragment(t))return o}return-1}function v(e,t,n){for(var r=t.sameDepth(n),o=n.end(n.depth),i=o+1,a=n.depth-1;a>r&&n.index(a)+1==n.node(a).childCount;)--a,++i;a>r&&e.split(i,a-r);for(var s=[],u=[],l=r+1;l<=t.depth;l++){var c=t.node(l);s.push(c.type),u.push(c.attrs)}e.step("ancestor",n.pos,o,{depth:n.depth-r,types:s,attrs:u}),e.join(n.pos-(n.depth-r),t.depth-r)}var g=e("../model"),y=e("./transform"),k=e("./step"),b=e("./map"); |
| k.Step.define("replace",{apply:function(e,t){return k.StepResult.fromReplace(e,t.from,t.to,t.param)},posMap:function(e){return new b.PosMap([e.from,e.to-e.from,e.param.size])},invert:function(e,t){return new k.Step("replace",e.from,e.from+e.param.size,t.slice(e.from,e.to))},paramToJSON:function(e){return e.toJSON()},paramFromJSON:function(e,t){return g.Slice.fromJSON(e,t)}}),y.Transform.prototype["delete"]=function(e,t){return e!=t&&this.replace(e,t,g.Slice.empty),this},y.Transform.prototype.replace=function(e){var t=arguments.length<=1||void 0===arguments[1]?e:arguments[1],n=arguments.length<=2||void 0===arguments[2]?g.Slice.empty:arguments[2],o=this.doc.resolve(e),i=this.doc.resolve(t),a=r(o,i,n),s=a.fitted,u=a.distAfter,l=s.size;if(e==t&&!l)return this;if(this.step("replace",e,t,s),!l||!i.parent.isTextblock)return this;var c=e+l,p=n.size?0>u?-1:c-u:e,f=void 0;return-1!=p&&p!=c&&(f=this.doc.resolve(p)).parent.isTextblock&&f.parent.type.canContainFragment(i.parent.content)?(v(this,f,this.doc.resolve(c)),this):this},y.Transform.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new g.Slice(g.Fragment.from(n),0,0))},y.Transform.prototype.insert=function(e,t){return this.replaceWith(e,e,t)},y.Transform.prototype.insertText=function(e,t){return this.insert(e,this.doc.type.schema.text(t,this.doc.marksAt(e)))},y.Transform.prototype.insertInline=function(e,t){return this.insert(e,t.mark(this.doc.marksAt(e)))};var w=0},{"../model":38,"./map":47,"./step":51,"./transform":52}],50:[function(e,t,n){"use strict";var r=e("../model"),o=e("./transform"),i=e("./step"),a=e("./map");i.Step.define("split",{apply:function(e,t){var n=e.resolve(t.from),o=n.parent,a=[o.copy(),t.param?t.param.type.create(t.attrs):o.copy()];return i.StepResult.fromReplace(e,n.pos,n.pos,new r.Slice(r.Fragment.fromArray(a),1,1))},posMap:function(e){return new a.PosMap([e.from,0,2])},invert:function(e){return new i.Step("join",e.from,e.from+2)},paramToJSON:function(e){return e&&{type:e.type.name,attrs:e.attrs}},paramFromJSON:function(e,t){return t&&{type:e.nodeType(t.type),attrs:t.attrs}}}),o.Transform.prototype.split=function(e){for(var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],n=arguments[2],r=arguments[3],o=0;t>o;o++)this.step("split",e+o,e+o,0==o&&n?{type:n,attrs:r}:null);return this},o.Transform.prototype.splitIfNeeded=function(e){for(var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],n=this.doc.resolve(e),r=!0,o=0;t>o;o++){var i=n.depth-o,a=0==o?n.pos:r?n.before(i+1):n.after(i+1);if(a==n.start(i))r=!0;else{if(a!=n.end(i))return this.split(a,t-o);r=!1}}return this}},{"../model":38,"./map":47,"./step":51,"./transform":52}],51:[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 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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.StepResult=n.Step=void 0;var i=e("../model"),a=e("./map"),s=(n.Step=function(){function e(t,n,o){var i=arguments.length<=3||void 0===arguments[3]?null:arguments[3];if(r(this,e),!(t in s))throw new RangeError("Unknown step type: "+t);this.type=t,this.from=n,this.to=o,this.param=i}return o(e,[{key:"apply",value:function(e){return s[this.type].apply(e,this)}},{key:"posMap",value:function(){var e=s[this.type];return e.posMap?e.posMap(this):a.PosMap.empty}},{key:"invert",value:function(e){return s[this.type].invert(this,e)}},{key:"map",value:function(t){var n=t.mapResult(this.from,1),r=this.to==this.from?n:t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(this.type,n.pos,Math.max(n.pos,r.pos),this.param)}},{key:"toJSON",value:function(){var e=s[this.type];return{type:this.type,from:this.from,to:this.to,param:e.paramToJSON?e.paramToJSON(this.param):this.param}}},{key:"toString",value:function(){return this.type+"@"+this.from+"-"+this.to}}],[{key:"fromJSON",value:function(t,n){var r=s[n.type];return new e(n.type,n.from,n.to,r.paramFromJSON?r.paramFromJSON(t,n.param):n.param)}},{key:"define",value:function(e,t){s[e]=t}}]),e}(),Object.create(null));n.StepResult=function(){function e(t,n){r(this,e),this.doc=t,this.failed=n}return o(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,o){try{return e.ok(t.replace(n,r,o))}catch(a){if(a instanceof i.ReplaceError)return e.fail(a.message);throw a}}}]),e}()},{"../model":38,"./map":47}],52:[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 o(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)}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Transform=n.TransformError=void 0;var s=e("../util/error"),u=e("./step"),l=e("./map"),c=n.TransformError=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(s.ProseMirrorError),p=function(){function e(t){r(this,e),this.doc=t,this.docs=[],this.steps=[],this.maps=[]}return a(e,[{key:"step",value:function(e,t,n,r){"string"==typeof e&&(e=new u.Step(e,t,n,r));var o=this.maybeStep(e);if(o.failed)throw new c(o.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){return(0,l.mapThroughResult)(this.maps,e,t)}},{key:"map",value:function(e,t){return(0,l.mapThrough)(this.maps,e,t)}},{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}}]),e}();n.Transform=p},{"../util/error":55,"./map":47,"./step":51}],53:[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 o(e,t,n){var r=(0,a.elt)("button",{"class":"ProseMirror-prompt-close"}),o=(0,a.elt)("div",{"class":"ProseMirror-prompt"},t,r),i=e.wrapper.getBoundingClientRect();if(e.wrapper.appendChild(o),n&&n.pos)o.style.left=n.pos.left-i.left+"px",o.style.top=n.pos.top-i.top+"px";else{var s=o.getBoundingClientRect(),u=Math.max(0,i.left)+Math.min(window.innerWidth,i.right)-s.width,l=Math.max(0,i.top)+Math.min(window.innerHeight,i.bottom)-s.height;o.style.left=u/2-i.left+"px",o.style.top=l/2-i.top+"px"}var c=function p(){e.off("interaction",p),o.parentNode&&(o.parentNode.removeChild(o),n&&n.onClose&&n.onClose())};return r.addEventListener("click",c),e.on("interaction",c),{close:c}}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.ParamPrompt=void 0,n.openPrompt=o;var a=e("../dom"),s=n.ParamPrompt=function(){function e(t,n){var o=this;r(this,e),this.pm=t,this.command=n,this.doClose=null,this.fields=n.params.map(function(e){if(!(e.type in o.paramTypes))throw new RangeError("Unsupported parameter type: "+e.type);return o.paramTypes[e.type].render.call(o.pm,e,o.defaultValue(e))});var i=(0,a.elt)("h5",{},n.spec&&n.spec.label?t.translate(n.spec.label):""),s=(0,a.elt)("button",{type:"submit","class":"ProseMirror-prompt-submit"},"Ok"),u=(0,a.elt)("button",{type:"button","class":"ProseMirror-prompt-cancel"},"Cancel");u.addEventListener("click",function(){return o.close()}),this.form=(0,a.elt)("form",null,i,this.fields.map(function(e){return(0,a.elt)("div",null,e)}),(0,a.elt)("div",{"class":"ProseMirror-prompt-buttons"},s," ",u))}return i(e,[{key:"close",value:function(){this.doClose&&(this.doClose(),this.doClose=null)}},{key:"open",value:function(){var e=this;this.close();var t=this.prompt(),n=this.pm.hasFocus();this.doClose=function(){t.close(),n&&setTimeout(function(){return e.pm.focus()},50)};var r=function(){var t=e.values();t&&(e.close(),e.command.exec(e.pm,t))};this.form.addEventListener("submit",function(e){e.preventDefault(),r()}),this.form.addEventListener("keydown",function(e){27==e.keyCode?(e.preventDefault(),t.close()):13!=e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||(e.preventDefault(),r())});var o=this.form.querySelector("input, textarea");o&&o.focus()}},{key:"values",value:function(){for(var e=[],t=0;t<this.command.params.length;t++){var n=this.command.params[t],r=this.fields[t],o=this.paramTypes[n.type],i=void 0,a=void 0;if(o.validate&&(a=o.validate(r)),a||(i=o.read.call(this.pm,r),n.validate?a=n.validate(i):i||null!=n["default"]||(a="No default value available")),a)return o.reportInvalid?o.reportInvalid.call(this.pm,r,a):this.reportInvalid(r,a),null;e.push(i)}return e}},{key:"defaultValue",value:function(e){if(e.prefill){var t=e.prefill.call(this.command.self,this.pm);if(null!=t)return t}return e["default"]}},{key:"prompt",value:function(){var e=this;return o(this.pm,this.form,{onClose:function(){return e.close()}})}},{key:"reportInvalid",value:function(e,t){var n=e.parentNode,r="left: "+(e.offsetLeft+e.offsetWidth+2)+"px; top: "+(e.offsetTop-5)+"px",o=n.appendChild((0,a.elt)("div",{"class":"ProseMirror-invalid",style:r},t));setTimeout(function(){return n.removeChild(o)},1500)}}]),e}();s.prototype.paramTypes=Object.create(null),s.prototype.paramTypes.text={render:function(e,t){return(0,a.elt)("input",{type:"text",placeholder:this.translate(e.label),value:t,autocomplete:"off"})},read:function(e){return e.value}},s.prototype.paramTypes.select={render:function(e,t){var n=this,r=e.options.call?e.options(this):e.options;return(0,a.elt)("select",null,r.map(function(e){return(0,a.elt)("option",{value:e.value,selected:e.value==t?"true":null},n.translate(e.label))}))},read:function(e){return e.value}},(0,a.insertCSS)('\n.ProseMirror-prompt {\n background: white;\n padding: 2px 6px 2px 15px;\n border: 1px solid silver;\n position: absolute;\n border-radius: 3px;\n z-index: 11;\n}\n\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type="text"],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n\n.ProseMirror-prompt input[type="text"] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px; top: 1px;\n color: #666;\n border: none; background: transparent; padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n content: "✕";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n')},{"../dom":3}],54:[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 o(e,t){l.get(e).set(t)}function i(e,t){l.get(e).unset(t)}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}}();Object.defineProperty(n,"__esModule",{value:!0}),n.scheduleDOMUpdate=o,n.unscheduleDOMUpdate=i;var s=50,u=100,l=function(){function e(t){var n=this;r(this,e),this.waiting=[],this.timeout=null,this.lastForce=0,this.pm=t,this.timedOut=function(){n.pm.operation?n.timeout=setTimeout(n.timedOut,s):n.force()},t.on("flush",this.onFlush.bind(this))}return a(e,[{key:"set",value:function(e){0==this.waiting.length&&(this.timeout=setTimeout(this.timedOut,s)),-1==this.waiting.indexOf(e)&&this.waiting.push(e)}},{key:"unset",value:function(e){var t=this.waiting.indexOf(e);t>-1&&this.waiting.splice(t,1)}},{key:"force",value:function(){for(clearTimeout(this.timeout),this.lastForce=Date.now();this.waiting.length;)for(var e=0;e<this.waiting.length;e++){var t=this.waiting[e]();t?this.waiting[e]=t:this.waiting.splice(e--,1)}}},{key:"onFlush",value:function(){this.waiting.length&&Date.now()-this.lastForce>u&&this.force()}}],[{key:"get",value:function(e){return e.mod.centralScheduler||(e.mod.centralScheduler=new this(e))}}]),e}();n.UpdateScheduler=function(){function e(t,n,o){var i=this;r(this,e),this.pm=t,this.start=o,this.events=n.split(" "),this.onEvent=this.onEvent.bind(this),this.events.forEach(function(e){return t.on(e,i.onEvent)})}return a(e,[{key:"detach",value:function(){var e=this;i(this.pm,this.start),this.events.forEach(function(t){return e.pm.off(t,e.onEvent)})}},{key:"onEvent",value:function(){o(this.pm,this.start)}},{key:"force",value:function(){if(this.pm.operation)this.onEvent();else{i(this.pm,this.start);for(var e=this.start;e;e=e());}}}]),e}()},{}],55:[function(e,t,n){"use strict";function r(e){Error.call(this,e),this.message!=e&&(this.message=e,Error.captureStackTrace?Error.captureStackTrace(this,this.name):this.stack=new Error(e).stack)}function o(e){var t=/^function (\w+)/.exec(e.toString());return t&&t[1]}Object.defineProperty(n,"__esModule",{value:!0}),n.ProseMirrorError=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,Object.defineProperty(r.prototype,"name",{get:function(){return this.constructor.name||o(this.constructor)||"ProseMirrorError"}})},{}],56:[function(e,t,n){"use strict";function r(e,t){return e._handlers&&e._handlers[t]||i}function o(e){var t=e.prototype;for(var n in a)a.hasOwnProperty(n)&&(t[n]=a[n])}Object.defineProperty(n,"__esModule",{value:!0}),n.eventMixin=o;var i=[],a={on:function(e,t){var n=this._handlers||(this._handlers=Object.create(null));n[e]=e in n?n[e].concat(t):[t]},off:function(e,t){var n=this._handlers,r=n&&n[e];if(r)for(var o=0;o<r.length;++o)if(r[o]==t){n[e]=r.slice(0,o).concat(r.slice(o+1));break}},signal:function(e){for(var t=r(this,e),n=arguments.length,o=Array(n>1?n-1:0),i=1;n>i;i++)o[i-1]=arguments[i];for(var a=0;a<t.length;++a)t[a].apply(t,o)},signalHandleable:function(e){for(var t=r(this,e),n=arguments.length,o=Array(n>1?n-1:0),i=1;n>i;i++)o[i-1]=arguments[i];for(var a=0;a<t.length;++a){var s=t[a].apply(t,o);if(null!=s)return s}},signalPipelined:function(e,t){for(var n=r(this,e),o=0;o<n.length;++o)t=n[o](t);return t},signalDOM:function(e,t){for(var n=r(this,t||e.type),o=0;o<n.length;++o)if(n[o](e)||e.defaultPrevented)return!0;return!1},hasHandler:function(e){return r(this,e).length>0}}},{}],57:[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 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}}();Object.defineProperty(n,"__esModule",{value:!0});n.Map=window.Map||function(){function e(){r(this,e),this.content=[]}return o(e,[{key:"set",value:function(e,t){var n=this.find(e);n>-1?this.content[n+1]=t:this.content.push(e,t)}},{key:"get",value:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]}},{key:"has",value:function(e){return this.find(e)>-1}},{key:"find",value:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t}},{key:"clear",value:function(){this.content.length=0}},{key:"size",get:function(){return this.content.length/2}}]),e}()},{}],58:[function(e,t,n){"use strict";function r(e,t){var n=t||Object.create(null);for(var r in e)n[r]=e[r];return n}Object.defineProperty(n,"__esModule",{value:!0}),n.copyObj=r},{}],59:[function(e,t,n){"use strict";function r(e,t,n){for(var r=0;r<e.length&&!(n(e[r],t)>0);r++);e.splice(r,0,t)}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=r},{}],60:[function(e,t,n){!function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).browserKeymap=e()}}(function(){"use strict";function e(e){if("keypress"==e.type)return"'"+String.fromCharCode(e.charCode)+"'";var t=i[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,i,a=e.split(/-(?!'?$)/),s=a[a.length-1],u=0;u<a.length-1;u++){var l=a[u];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);o?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Cmd-"+s),r&&(s="Shift-"+s),s}function r(e,t){if(this.options=t||{},this.bindings=Object.create(null),e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.addBinding(n,e[n])}for(var o="undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os?"darwin"==os.platform():!1,i={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"},a=0;10>a;a++)i[a+48]=i[a+96]=String(a);for(var a=65;90>=a;a++)i[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)i[a+111]=i[a+63235]="F"+a;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 o=n.slice(0,r+1).join(" "),i=r==n.length-1?t:"...",a=this.bindings[o];if(a){if(a!=i)throw new Error("Inconsistent bindings for "+o)}else this.bindings[o]=i}},removeBinding:function(e){for(var t=this.normalize(e),n=t.length-1;n>=0;n--){var r=t.slice(0,n).join(" "),o=this.bindings[r];if("..."==o&&!this.unusedMulti(r))break;o&&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]},constructor:r},r.keyName=e,r.isModifierKey=t,r.normalizeKeyName=n,r})},{}],61:[function(e,t,n){t.exports={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:" ",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:""}},{}],62:[function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===o(e)}function a(e){return"[object Object]"===o(e)}function s(e){return"[object RegExp]"===o(e)}function u(e){return"[object Function]"===o(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(e){return Object.keys(e||{}).reduce(function(e,t){return e||y.hasOwnProperty(t)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function f(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function h(){return function(e,t){t.normalize(e)}}function d(t){function n(e){return e.replace("%TLDS%",c.src_tlds)}function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var c=t.re=r({},e("./lib/re")),d=t.__tlds__.slice();t.__tlds_replaced__||d.push(b),d.push(c.src_xn),c.src_tlds=d.join("|"),c.email_fuzzy=RegExp(n(c.tpl_email_fuzzy),"i"),c.link_fuzzy=RegExp(n(c.tpl_link_fuzzy),"i"),c.link_no_ip_fuzzy=RegExp(n(c.tpl_link_no_ip_fuzzy),"i"),c.host_fuzzy_test=RegExp(n(c.tpl_host_fuzzy_test),"i");var m=[];t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};return t.__compiled__[e]=r,a(n)?(s(n.validate)?r.validate=f(n.validate):u(n.validate)?r.validate=n.validate:o(e,n),void(u(n.normalize)?r.normalize=n.normalize:n.normalize?o(e,n):r.normalize=h())):i(n)?void m.push(e):void o(e,n)}}),m.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:h()};var v=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(l).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+v+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+v+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),p(t)}function m(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function v(e,t){var n=new m(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function g(e,t){return this instanceof g?(t||c(e)&&(t=e,e={}),this.__opts__=r({},y,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},k,e),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},void d(this)):new g(e,t)}var y={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},b="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]",w="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");g.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},g.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},g.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,u,l;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a))),this.__index__>=0},g.prototype.pretest=function(e){return this.re.pretest.test(e)},g.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},g.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(v(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(v(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},g.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},g.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},t.exports=g},{"./lib/re":63}],63:[function(e,t,n){"use strict";var r=n.src_Any=e("uc.micro/properties/Any/regex").source,o=n.src_Cc=e("uc.micro/categories/Cc/regex").source,i=n.src_Z=e("uc.micro/categories/Z/regex").source,a=n.src_P=e("uc.micro/categories/P/regex").source,s=n.src_ZPCc=[i,a,o].join("|"),u=n.src_ZCc=[i,o].join("|"),l="(?:(?!"+s+")"+r+")",c="(?:(?![0-9]|"+s+")"+r+")",p=n.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]?)";n.src_auth="(?:(?:(?!"+u+").)+@)?";var f=n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",h=n.src_host_terminator="(?=$|"+s+")(?!-|_|:\\d|\\.-|\\.(?!$|"+s+"))",d=n.src_path="(?:[/?#](?:(?!"+u+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+u+"|\\]).)*\\]|\\((?:(?!"+u+"|[)]).)*\\)|\\{(?:(?!"+u+'|[}]).)*\\}|\\"(?:(?!'+u+'|["]).)+\\"|\\\'(?:(?!'+u+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+u+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+u+").|\\!(?!"+u+"|[!]).|\\?(?!"+u+"|[?]).)+|\\/)?",m=n.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',v=n.src_xn="xn--[a-z0-9\\-]{1,59}",g=n.src_domain_root="(?:"+v+"|"+c+"{1,63})",y=n.src_domain="(?:"+v+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",k=n.src_host="(?:"+p+"|(?:(?:(?:"+y+")\\.)*"+g+"))",b=n.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+y+")\\.)+(?:%TLDS%)))",w=n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+y+")\\.)+(?:%TLDS%))";n.src_host_strict=k+h;var _=n.tpl_host_fuzzy_strict=b+h;n.src_host_port_strict=k+f+h;var x=n.tpl_host_port_fuzzy_strict=b+f+h,C=n.tpl_host_port_no_ip_fuzzy_strict=w+f+h;n.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+s+"|$))",n.tpl_email_fuzzy="(^|>|"+u+")("+m+"@"+_+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+s+"))((?![$+<=>^`|])"+x+d+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+s+"))((?![$+<=>^`|])"+C+d+")"},{"uc.micro/categories/Cc/regex":120,"uc.micro/categories/P/regex":122,"uc.micro/categories/Z/regex":123,"uc.micro/properties/Any/regex":125}],64:[function(e,t,n){"use strict";t.exports=e("./lib/")},{"./lib/":74}],65:[function(e,t,n){"use strict";t.exports=e("entities/maps/entities.json")},{"entities/maps/entities.json":61}],66:[function(e,t,n){"use strict";t.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","head","header","hr","html","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],67:[function(e,t,n){"use strict";var r="[a-zA-Z_:][a-zA-Z0-9:._-]*",o="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",a='"[^"]*"',s="(?:"+o+"|"+i+"|"+a+")",u="(?:\\s+"+r+"(?:\\s*=\\s*"+s+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+u+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",f="<[?].*?[?]>",h="<![A-Z]+\\s+[^>]*>",d="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",m=new RegExp("^(?:"+l+"|"+c+"|"+p+"|"+f+"|"+h+"|"+d+")"),v=new RegExp("^(?:"+l+"|"+c+")");t.exports.HTML_TAG_RE=m,t.exports.HTML_OPEN_CLOSE_TAG_RE=v},{}],68:[function(e,t,n){"use strict";t.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},{}],69:[function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===r(e)}function i(e,t){return b.call(e,t)}function a(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 u(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(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 c(e,t){var n=0;return i(S,t)?S[t]:35===t.charCodeAt(0)&&C.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?l(n):e}function p(e){return e.indexOf("\\")<0?e:e.replace(w,"$1")}function f(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(x,function(e,t,n){return t?t:c(e,n)})}function h(e){return A[e]}function d(e){return M.test(e)?e.replace(O,h):e}function m(e){return e.replace(T,"\\$&")}function v(e){if(e>=8192&&8202>=e)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 g(e){return E.test(e)}function y(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 k(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var b=Object.prototype.hasOwnProperty,w=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,_=/&([a-z#][a-z0-9]{1,31});/gi,x=new RegExp(w.source+"|"+_.source,"gi"),C=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,S=e("./entities"),M=/[&<>"]/,O=/[&<>"]/g,A={"&":"&","<":"<",">":">",'"':"""},T=/[.?*+^$[\]\\(){}|-]/g,E=e("uc.micro/categories/P/regex");n.lib={},n.lib.mdurl=e("mdurl"),n.lib.ucmicro=e("uc.micro"),n.assign=a,n.isString=o,n.has=i,n.unescapeMd=p,n.unescapeAll=f,n.isValidEntityCode=u,n.fromCodePoint=l,n.escapeHtml=d,n.arrayReplaceAt=s,n.isWhiteSpace=v,n.isMdAsciiPunct=y,n.isPunctChar=g,n.escapeRE=m,n.normalizeReference=k},{"./entities":65,mdurl:118,"uc.micro":124,"uc.micro/categories/P/regex":122}],70:[function(e,t,n){"use strict";n.parseLinkLabel=e("./parse_link_label"),n.parseLinkDestination=e("./parse_link_destination"),n.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":71,"./parse_link_label":72,"./parse_link_title":73}],71:[function(e,t,n){"use strict";var r=e("../common/utils").unescapeAll;t.exports=function(e,t,n){var o,i,a=0,s=t,u={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;n>t;){if(o=e.charCodeAt(t),10===o)return u;if(62===o)return u.pos=t+1,u.str=r(e.slice(s+1,t)),u.ok=!0,u;92===o&&n>t+1?t+=2:t++}return u}for(i=0;n>t&&(o=e.charCodeAt(t),32!==o)&&!(32>o||127===o);)if(92===o&&n>t+1)t+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;t++}return s===t?u:(u.str=r(e.slice(s,t)),u.lines=a,u.pos=t,u.ok=!0,u)}},{"../common/utils":69}],72:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r,o,i,a,s=-1,u=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<u;){if(i=e.src.charCodeAt(e.pos),93===i&&(r--,0===r)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===i)if(a===e.pos-1)r++;else if(n)return e.pos=l,-1}return o&&(s=e.pos),e.pos=l,s}},{}],73:[function(e,t,n){"use strict";var r=e("../common/utils").unescapeAll;t.exports=function(e,t,n){var o,i,a=0,s=t,u={ok:!1,pos:0,lines:0,str:""};if(t>=n)return u;if(i=e.charCodeAt(t),34!==i&&39!==i&&40!==i)return u;for(t++,40===i&&(i=41);n>t;){if(o=e.charCodeAt(t),o===i)return u.pos=t+1,u.lines=a,u.str=r(e.slice(s+1,t)),u.ok=!0,u;10===o?a++:92===o&&n>t+1&&(t++,10===e.charCodeAt(t)&&a++),t++}return u}},{"../common/utils":69}],74:[function(e,t,n){"use strict";function r(e){var t=e.trim().toLowerCase();return g.test(t)?y.test(t)?!0:!1:!0}function o(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toASCII(t.hostname)}catch(n){}return d.encode(d.format(t))}function i(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||k.indexOf(t.protocol)>=0))try{t.hostname=m.toUnicode(t.hostname)}catch(n){}return d.decode(d.format(t))}function a(e,t){return this instanceof a?(t||s.isString(e)||(t=e||{},e="default"),this.inline=new f,this.block=new p,this.core=new c,this.renderer=new l,this.linkify=new h,this.validateLink=r,this.normalizeLink=o,this.normalizeLinkText=i,this.utils=s,this.helpers=u,this.options={},this.configure(e),void(t&&this.set(t))):new a(e,t)}var s=e("./common/utils"),u=e("./helpers"),l=e("./renderer"),c=e("./parser_core"),p=e("./parser_block"),f=e("./parser_inline"),h=e("linkify-it"),d=e("mdurl"),m=e("punycode"),v={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},g=/^(vbscript|javascript|file|data):/,y=/^data:image\/(gif|png|jpeg|webp);/,k=["http:","https:","mailto:"];a.prototype.set=function(e){return s.assign(this.options,e),this},a.prototype.configure=function(e){var t,n=this;if(s.isString(e)&&(t=e,e=v[t],!e))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach(function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules)}),this},a.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this);var r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},a.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this);var r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},a.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},a.prototype.parse=function(e,t){var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},a.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},a.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},a.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},t.exports=a},{"./common/utils":69,"./helpers":70,"./parser_block":75,"./parser_core":76,"./parser_inline":77,"./presets/commonmark":78,"./presets/default":79,"./presets/zero":80,"./renderer":81,"linkify-it":62,mdurl:118,punycode:2}],75:[function(e,t,n){"use strict";function r(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}var o=e("./ruler"),i=[["code",e("./rules_block/code")],["fence",e("./rules_block/fence"),["paragraph","reference","blockquote","list"]],["blockquote",e("./rules_block/blockquote"),["paragraph","reference","list"]],["hr",e("./rules_block/hr"),["paragraph","reference","blockquote","list"]],["list",e("./rules_block/list"),["paragraph","reference","blockquote"]],["reference",e("./rules_block/reference")],["heading",e("./rules_block/heading"),["paragraph","reference","blockquote"]],["lheading",e("./rules_block/lheading")],["html_block",e("./rules_block/html_block"),["paragraph","reference","blockquote"]],["table",e("./rules_block/table"),["paragraph","reference"]],["paragraph",e("./rules_block/paragraph")]];r.prototype.tokenize=function(e,t,n){for(var r,o,i=this.ruler.getRules(""),a=i.length,s=t,u=!1,l=e.md.options.maxNesting;n>s&&(e.line=s=e.skipEmptyLines(s),!(s>=n))&&!(e.tShift[s]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(o=0;a>o&&!(r=i[o](e,s,n,!1));o++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),s=e.line,n>s&&e.isEmpty(s)){if(u=!0,s++,n>s&&"list"===e.parentType&&e.isEmpty(s))break;e.line=s}}},r.prototype.parse=function(e,t,n,r){var o;return e?(o=new this.State(e,t,n,r),void this.tokenize(o,o.line,o.lineMax)):[]},r.prototype.State=e("./rules_block/state_block"),t.exports=r},{"./ruler":82,"./rules_block/blockquote":83,"./rules_block/code":84,"./rules_block/fence":85,"./rules_block/heading":86,"./rules_block/hr":87,"./rules_block/html_block":88,"./rules_block/lheading":89,"./rules_block/list":90,"./rules_block/paragraph":91,"./rules_block/reference":92,"./rules_block/state_block":93,"./rules_block/table":94}],76:[function(e,t,n){"use strict";function r(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["normalize",e("./rules_core/normalize")],["block",e("./rules_core/block")],["inline",e("./rules_core/inline")],["linkify",e("./rules_core/linkify")],["replacements",e("./rules_core/replacements")],["smartquotes",e("./rules_core/smartquotes")]]; |
| r.prototype.process=function(e){var t,n,r;for(r=this.ruler.getRules(""),t=0,n=r.length;n>t;t++)r[t](e)},r.prototype.State=e("./rules_core/state_core"),t.exports=r},{"./ruler":82,"./rules_core/block":95,"./rules_core/inline":96,"./rules_core/linkify":97,"./rules_core/normalize":98,"./rules_core/replacements":99,"./rules_core/smartquotes":100,"./rules_core/state_core":101}],77:[function(e,t,n){"use strict";function r(){this.ruler=new o;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}var o=e("./ruler"),i=[["text",e("./rules_inline/text")],["newline",e("./rules_inline/newline")],["escape",e("./rules_inline/escape")],["backticks",e("./rules_inline/backticks")],["strikethrough",e("./rules_inline/strikethrough")],["emphasis",e("./rules_inline/emphasis")],["link",e("./rules_inline/link")],["image",e("./rules_inline/image")],["autolink",e("./rules_inline/autolink")],["html_inline",e("./rules_inline/html_inline")],["entity",e("./rules_inline/entity")]];r.prototype.skipToken=function(e){var t,n=e.pos,r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting,a=e.cache;if("undefined"!=typeof a[n])return void(e.pos=a[n]);if(e.level<i)for(t=0;o>t;t++)if(r[t](e,!0))return void(a[n]=e.pos);e.pos++,a[n]=e.pos},r.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,i=e.posMax,a=e.md.options.maxNesting;e.pos<i;){if(e.level<a)for(n=0;o>n&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},r.prototype.parse=function(e,t,n,r){var o=new this.State(e,t,n,r);this.tokenize(o)},r.prototype.State=e("./rules_inline/state_inline"),t.exports=r},{"./ruler":82,"./rules_inline/autolink":102,"./rules_inline/backticks":103,"./rules_inline/emphasis":104,"./rules_inline/entity":105,"./rules_inline/escape":106,"./rules_inline/html_inline":107,"./rules_inline/image":108,"./rules_inline/link":109,"./rules_inline/newline":110,"./rules_inline/state_inline":111,"./rules_inline/strikethrough":112,"./rules_inline/text":113}],78:[function(e,t,n){"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]}}}},{}],79:[function(e,t,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}}},{}],80:[function(e,t,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"]}}}},{}],81:[function(e,t,n){"use strict";function r(){this.rules=o({},s)}var o=e("./common/utils").assign,i=e("./common/utils").unescapeAll,a=e("./common/utils").escapeHtml,s={};s.code_inline=function(e,t){return"<code>"+a(e[t].content)+"</code>"},s.code_block=function(e,t){return"<pre><code>"+a(e[t].content)+"</code></pre>\n"},s.fence=function(e,t,n,r,o){var s,u=e[t],l=u.info?i(u.info).trim():"",c="";return l&&(c=l.split(/\s+/g)[0],u.attrPush(["class",n.langPrefix+c])),s=n.highlight?n.highlight(u.content,c)||a(u.content):a(u.content),"<pre><code"+o.renderAttrs(u)+">"+s+"</code></pre>\n"},s.image=function(e,t,n,r,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)},s.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(e,t){return a(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},r.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;n>t;t++)r+=" "+a(e.attrs[t][0])+'="'+a(e.attrs[t][1])+'"';return r},r.prototype.renderToken=function(e,t,n){var r,o="",i=!1,a=e[t];return a.hidden?"":(a.block&&-1!==a.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===a.nesting?"</":"<")+a.tag,o+=this.renderAttrs(a),0===a.nesting&&n.xhtmlOut&&(o+=" /"),a.block&&(i=!0,1===a.nesting&&t+1<e.length&&(r=e[t+1],"inline"===r.type||r.hidden?i=!1:-1===r.nesting&&r.tag===a.tag&&(i=!1))),o+=i?">\n":">")},r.prototype.renderInline=function(e,t,n){for(var r,o="",i=this.rules,a=0,s=e.length;s>a;a++)r=e[a].type,o+="undefined"!=typeof i[r]?i[r](e,a,t,n,this):this.renderToken(e,a,t);return o},r.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=this.rules,i=0,a=e.length;a>i;i++)"text"===e[i].type?r+=o.text(e,i,t,n,this):"image"===e[i].type&&(r+=this.renderInlineAsText(e[i].children,t,n));return r},r.prototype.render=function(e,t,n){var r,o,i,a="",s=this.rules;for(r=0,o=e.length;o>r;r++)i=e[r].type,a+="inline"===i?this.renderInline(e[r].children,t,n):"undefined"!=typeof s[i]?s[e[r].type](e,r,t,n,this):this.renderToken(e,r,t,n);return a},t.exports=r},{"./common/utils":69}],82:[function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},r.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))})})},r.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var r=this.__find__(e);if(0>r){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},r.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},r.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var r=this.__find__(e);if(0>r){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},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},t.exports=r},{}],83:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o,i,a,s,u,l,c,p,f,h,d,m,v=e.bMarks[t]+e.tShift[t],g=e.eMarks[t];if(62!==e.src.charCodeAt(v++))return!1;if(r)return!0;for(32===e.src.charCodeAt(v)&&v++,u=e.blkIndent,e.blkIndent=0,s=[e.bMarks[t]],e.bMarks[t]=v,v=g>v?e.skipSpaces(v):v,i=v>=g,a=[e.tShift[t]],e.tShift[t]=v-e.bMarks[t],p=e.md.block.ruler.getRules("blockquote"),o=t+1;n>o&&!(e.tShift[o]<u)&&(v=e.bMarks[o]+e.tShift[o],g=e.eMarks[o],!(v>=g));o++)if(62!==e.src.charCodeAt(v++)){if(i)break;for(m=!1,h=0,d=p.length;d>h;h++)if(p[h](e,o,n,!0)){m=!0;break}if(m)break;s.push(e.bMarks[o]),a.push(e.tShift[o]),e.tShift[o]=-1}else 32===e.src.charCodeAt(v)&&v++,s.push(e.bMarks[o]),e.bMarks[o]=v,v=g>v?e.skipSpaces(v):v,i=v>=g,a.push(e.tShift[o]),e.tShift[o]=v-e.bMarks[o];for(l=e.parentType,e.parentType="blockquote",f=e.push("blockquote_open","blockquote",1),f.markup=">",f.map=c=[t,0],e.md.block.tokenize(e,t,o),f=e.push("blockquote_close","blockquote",-1),f.markup=">",e.parentType=l,c[1]=e.line,h=0;h<a.length;h++)e.bMarks[h+t]=s[h],e.tShift[h+t]=a[h];return e.blkIndent=u,!0}},{}],84:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r,o,i;if(e.tShift[t]-e.blkIndent<4)return!1;for(o=r=t+1;n>r;)if(e.isEmpty(r))r++;else{if(!(e.tShift[r]-e.blkIndent>=4))break;r++,o=r}return e.line=r,i=e.push("code_block","code",0),i.content=e.getLines(t,o,4+e.blkIndent,!0),i.map=[t,e.line],!0}},{}],85:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o,i,a,s,u,l,c,p=!1,f=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];if(f+3>h)return!1;if(o=e.src.charCodeAt(f),126!==o&&96!==o)return!1;if(u=f,f=e.skipChars(f,o),i=f-u,3>i)return!1;if(c=e.src.slice(u,f),a=e.src.slice(f,h),a.indexOf("`")>=0)return!1;if(r)return!0;for(s=t;(s++,!(s>=n))&&(f=u=e.bMarks[s]+e.tShift[s],h=e.eMarks[s],!(h>f&&e.tShift[s]<e.blkIndent));)if(e.src.charCodeAt(f)===o&&!(e.tShift[s]-e.blkIndent>=4||(f=e.skipChars(f,o),i>f-u||(f=e.skipSpaces(f),h>f)))){p=!0;break}return i=e.tShift[t],e.line=s+(p?1:0),l=e.push("fence","code",0),l.info=a,l.content=e.getLines(t+1,s,i,!0),l.markup=c,l.map=[t,e.line],!0}},{}],86:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o,i,a,s,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u),35!==o||u>=l)return!1;for(i=1,o=e.src.charCodeAt(++u);35===o&&l>u&&6>=i;)i++,o=e.src.charCodeAt(++u);return i>6||l>u&&32!==o?!1:r?!0:(l=e.skipCharsBack(l,32,u),a=e.skipCharsBack(l,35,u),a>u&&32===e.src.charCodeAt(a-1)&&(l=a),e.line=t+1,s=e.push("heading_open","h"+String(i),1),s.markup="########".slice(0,i),s.map=[t,e.line],s=e.push("inline","",0),s.content=e.src.slice(u,l).trim(),s.map=[t,e.line],s.children=[],s=e.push("heading_close","h"+String(i),-1),s.markup="########".slice(0,i),!0)}},{}],87:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o,i,a,s,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(o=e.src.charCodeAt(u++),42!==o&&45!==o&&95!==o)return!1;for(i=1;l>u;){if(a=e.src.charCodeAt(u++),a!==o&&32!==a)return!1;a===o&&i++}return 3>i?!1:r?!0:(e.line=t+1,s=e.push("hr","hr",0),s.map=[t,e.line],s.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{}],88:[function(e,t,n){"use strict";var r=e("../common/html_blocks"),o=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,i=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(e,t,n,r){var o,a,s,u,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(u=e.src.slice(l,c),o=0;o<i.length&&!i[o][0].test(u);o++);if(o===i.length)return!1;if(r)return i[o][2];if(a=t+1,!i[o][1].test(u))for(;n>a&&!(e.tShift[a]<e.blkIndent);a++)if(l=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],u=e.src.slice(l,c),i[o][1].test(u)){0!==u.length&&a++;break}return e.line=a,s=e.push("html_block","",0),s.map=[t,a],s.content=e.getLines(t,a,e.blkIndent,!0),!0}},{"../common/html_blocks":66,"../common/html_re":67}],89:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r,o,i,a,s,u=t+1;return u>=n?!1:e.tShift[u]<e.blkIndent?!1:e.tShift[u]-e.blkIndent>3?!1:(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],o>=i?!1:(r=e.src.charCodeAt(o),45!==r&&61!==r?!1:(o=e.skipChars(o,r),o=e.skipSpaces(o),i>o?!1:(o=e.bMarks[t]+e.tShift[t],e.line=u+1,s=61===r?1:2,a=e.push("heading_open","h"+String(s),1),a.markup=String.fromCharCode(r),a.map=[t,e.line],a=e.push("inline","",0),a.content=e.src.slice(o,e.eMarks[t]).trim(),a.map=[t,e.line-1],a.children=[],a=e.push("heading_close","h"+String(s),-1),a.markup=String.fromCharCode(r),!0))))}},{}],90:[function(e,t,n){"use strict";function r(e,t){var n,r,o;return r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],n=e.src.charCodeAt(r++),42!==n&&45!==n&&43!==n?-1:o>r&&32!==e.src.charCodeAt(r)?-1:r}function o(e,t){var n,r=e.bMarks[t]+e.tShift[t],o=r,i=e.eMarks[t];if(o+1>=i)return-1;if(n=e.src.charCodeAt(o++),48>n||n>57)return-1;for(;;){if(o>=i)return-1;n=e.src.charCodeAt(o++);{if(!(n>=48&&57>=n)){if(41===n||46===n)break;return-1}if(o-r>=10)return-1}}return i>o&&32!==e.src.charCodeAt(o)?-1:o}function i(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;r>n;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}t.exports=function(e,t,n,a){var s,u,l,c,p,f,h,d,m,v,g,y,k,b,w,_,x,C,S,M,O,A,T,E=!0;if((d=o(e,t))>=0)k=!0;else{if(!((d=r(e,t))>=0))return!1;k=!1}if(y=e.src.charCodeAt(d-1),a)return!0;for(w=e.tokens.length,k?(h=e.bMarks[t]+e.tShift[t],g=Number(e.src.substr(h,d-h-1)),M=e.push("ordered_list_open","ol",1),1!==g&&(M.attrs=[["start",g]])):M=e.push("bullet_list_open","ul",1),M.map=x=[t,0],M.markup=String.fromCharCode(y),s=t,_=!1,S=e.md.block.ruler.getRules("list");!(!(n>s)||(b=e.skipSpaces(d),m=e.eMarks[s],v=b>=m?1:b-d,v>4&&(v=1),u=d-e.bMarks[s]+v,M=e.push("list_item_open","li",1),M.markup=String.fromCharCode(y),M.map=C=[t,0],c=e.blkIndent,p=e.tight,l=e.tShift[t],f=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.md.block.tokenize(e,t,n,!0),(!e.tight||_)&&(E=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[t]=l,e.tight=p,e.parentType=f,M=e.push("list_item_close","li",-1),M.markup=String.fromCharCode(y),s=t=e.line,C[1]=s,b=e.bMarks[t],s>=n)||e.isEmpty(s)||e.tShift[s]<e.blkIndent);){for(T=!1,O=0,A=S.length;A>O;O++)if(S[O](e,s,n,!0)){T=!0;break}if(T)break;if(k){if(d=o(e,s),0>d)break}else if(d=r(e,s),0>d)break;if(y!==e.src.charCodeAt(d-1))break}return M=k?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),M.markup=String.fromCharCode(y),x[1]=s,e.line=s,E&&i(e,w),!0}},{}],91:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n,r,o,i,a,s=t+1,u=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>s&&!e.isEmpty(s);s++)if(!(e.tShift[s]-e.blkIndent>3||e.tShift[s]<0)){for(r=!1,o=0,i=u.length;i>o;o++)if(u[o](e,s,l,!0)){r=!0;break}if(r)break}return n=e.getLines(t,s,e.blkIndent,!1).trim(),e.line=s,a=e.push("paragraph_open","p",1),a.map=[t,e.line],a=e.push("inline","",0),a.content=n,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),!0}},{}],92:[function(e,t,n){"use strict";var r=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference;t.exports=function(e,t,n,a){var s,u,l,c,p,f,h,d,m,v,g,y,k,b,w,_=0,x=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(91!==e.src.charCodeAt(x))return!1;for(;++x<C;)if(93===e.src.charCodeAt(x)&&92!==e.src.charCodeAt(x-1)){if(x+1===C)return!1;if(58!==e.src.charCodeAt(x+1))return!1;break}for(c=e.lineMax,b=e.md.block.ruler.getRules("reference");c>S&&!e.isEmpty(S);S++)if(!(e.tShift[S]-e.blkIndent>3||e.tShift[S]<0)){for(k=!1,f=0,h=b.length;h>f;f++)if(b[f](e,S,c,!0)){k=!0;break}if(k)break}for(y=e.getLines(t,S,e.blkIndent,!1).trim(),C=y.length,x=1;C>x;x++){if(s=y.charCodeAt(x),91===s)return!1;if(93===s){m=x;break}10===s?_++:92===s&&(x++,C>x&&10===y.charCodeAt(x)&&_++)}if(0>m||58!==y.charCodeAt(m+1))return!1;for(x=m+2;C>x;x++)if(s=y.charCodeAt(x),10===s)_++;else if(32!==s)break;if(v=r(y,x,C),!v.ok)return!1;if(p=e.md.normalizeLink(v.str),!e.md.validateLink(p))return!1;for(x=v.pos,_+=v.lines,u=x,l=_,g=x;C>x;x++)if(s=y.charCodeAt(x),10===s)_++;else if(32!==s)break;for(v=o(y,x,C),C>x&&g!==x&&v.ok?(w=v.str,x=v.pos,_+=v.lines):(w="",x=u,_=l);C>x&&32===y.charCodeAt(x);)x++;if(C>x&&10!==y.charCodeAt(x)&&w)for(w="",x=u,_=l;C>x&&32===y.charCodeAt(x);)x++;return C>x&&10!==y.charCodeAt(x)?!1:(d=i(y.slice(1,m)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[d]&&(e.env.references[d]={title:w,href:p}),e.line=t+_+1,!0):!1}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_title":73}],93:[function(e,t,n){"use strict";function r(e,t,n,r){var o,i,a,s,u,l,c;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,l=0,c=!1,a=s=l=0,u=i.length;u>s;s++){if(o=i.charCodeAt(s),!c){if(32===o){l++;continue}c=!0}(10===o||s===u-1)&&(10!==o&&s++,this.bMarks.push(a),this.eMarks.push(s),this.tShift.push(l),c=!1,l=0,a=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}var o=e("../token");r.prototype.push=function(e,t,n){var r=new o(e,t,n);return r.block=!0,0>n&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},r.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},r.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;t>e&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},r.prototype.skipSpaces=function(e){for(var t=this.src.length;t>e&&32===this.src.charCodeAt(e);e++);return e},r.prototype.skipChars=function(e,t){for(var n=this.src.length;n>e&&this.src.charCodeAt(e)===t;e++);return e},r.prototype.skipCharsBack=function(e,t,n){if(n>=e)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},r.prototype.getLines=function(e,t,n,r){var o,i,a,s,u,l=e;if(e>=t)return"";if(l+1===t)return i=this.bMarks[l]+Math.min(this.tShift[l],n),a=this.eMarks[t-1]+(r?1:0),this.src.slice(i,a);for(s=new Array(t-e),o=0;t>l;l++,o++)u=this.tShift[l],u>n&&(u=n),0>u&&(u=0),i=this.bMarks[l]+u,a=t>l+1||r?this.eMarks[l]+1:this.eMarks[l],s[o]=this.src.slice(i,a);return s.join("")},r.prototype.Token=o,t.exports=r},{"../token":114}],94:[function(e,t,n){"use strict";function r(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,o=e.length,i=0,a=0,s=!1,u=0;for(t=e.charCodeAt(r);o>r;)96===t&&i%2===0?(s=!s,u=r):124!==t||i%2!==0||s?92===t?i++:i=0:(n.push(e.substring(a,r)),a=r+1),r++,r===o&&s&&(s=!1,r=u+1),t=e.charCodeAt(r);return n.push(e.substring(a)),n}t.exports=function(e,t,n,i){var a,s,u,l,c,p,f,h,d,m,v;if(t+2>n)return!1;if(c=t+1,e.tShift[c]<e.blkIndent)return!1;if(u=e.bMarks[c]+e.tShift[c],u>=e.eMarks[c])return!1;if(a=e.src.charCodeAt(u),124!==a&&45!==a&&58!==a)return!1;if(s=r(e,t+1),!/^[-:| ]+$/.test(s))return!1;if(p=s.split("|"),p.length<2)return!1;for(h=[],l=0;l<p.length;l++){if(d=p[l].trim(),!d){if(0===l||l===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;58===d.charCodeAt(d.length-1)?h.push(58===d.charCodeAt(0)?"center":"right"):58===d.charCodeAt(0)?h.push("left"):h.push("")}if(s=r(e,t).trim(),-1===s.indexOf("|"))return!1;if(p=o(s.replace(/^\||\|$/g,"")),h.length!==p.length)return!1;if(i)return!0;for(f=e.push("table_open","table",1),f.map=m=[t,0],f=e.push("thead_open","thead",1),f.map=[t,t+1],f=e.push("tr_open","tr",1),f.map=[t,t+1],l=0;l<p.length;l++)f=e.push("th_open","th",1),f.map=[t,t+1],h[l]&&(f.attrs=[["style","text-align:"+h[l]]]),f=e.push("inline","",0),f.content=p[l].trim(),f.map=[t,t+1],f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),f=e.push("tbody_open","tbody",1),f.map=v=[t+2,0],c=t+2;n>c&&!(e.tShift[c]<e.blkIndent)&&(s=r(e,c).trim(),-1!==s.indexOf("|"));c++){for(p=o(s.replace(/^\||\|$/g,"")),p.length=h.length,f=e.push("tr_open","tr",1),l=0;l<p.length;l++)f=e.push("td_open","td",1),h[l]&&(f.attrs=[["style","text-align:"+h[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),m[1]=v[1]=c,e.line=c,!0}},{}],95:[function(e,t,n){"use strict";t.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],96:[function(e,t,n){"use strict";t.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;r>n;n++)t=o[n],"inline"===t.type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},{}],97:[function(e,t,n){"use strict";function r(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}var i=e("../common/utils").arrayReplaceAt;t.exports=function(e){var t,n,a,s,u,l,c,p,f,h,d,m,v,g,y,k,b,w=e.tokens;if(e.md.options.linkify)for(n=0,a=w.length;a>n;n++)if("inline"===w[n].type&&e.md.linkify.pretest(w[n].content))for(s=w[n].children,v=0,t=s.length-1;t>=0;t--)if(l=s[t],"link_close"!==l.type){if("html_inline"===l.type&&(r(l.content)&&v>0&&v--,o(l.content)&&v++),!(v>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(f=l.content,b=e.md.linkify.match(f),c=[],m=l.level,d=0,p=0;p<b.length;p++)g=b[p].url,y=e.md.normalizeLink(g),e.md.validateLink(y)&&(k=b[p].text,k=b[p].schema?"mailto:"!==b[p].schema||/^mailto:/i.test(k)?e.md.normalizeLinkText(k):e.md.normalizeLinkText("mailto:"+k).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+k).replace(/^http:\/\//,""),h=b[p].index,h>d&&(u=new e.Token("text","",0),u.content=f.slice(d,h),u.level=m,c.push(u)),u=new e.Token("link_open","a",1),u.attrs=[["href",y]],u.level=m++,u.markup="linkify",u.info="auto",c.push(u),u=new e.Token("text","",0),u.content=k,u.level=m,c.push(u),u=new e.Token("link_close","a",-1),u.level=--m,u.markup="linkify",u.info="auto",c.push(u),d=b[p].lastIndex);d<f.length&&(u=new e.Token("text","",0),u.content=f.slice(d),u.level=m,c.push(u)),w[n].children=s=i(s,t,c)}}else for(t--;s[t].level!==l.level&&"link_open"!==s[t].type;)t--}},{"../common/utils":69}],98:[function(e,t,n){"use strict";var r=/[\n\t]/g,o=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,i=/\u0000/g;t.exports=function(e){var t,n,a;t=e.src.replace(o,"\n"),t=t.replace(i,"�"),t.indexOf(" ")>=0&&(n=0,a=0,t=t.replace(r,function(e,r){var o;return 10===t.charCodeAt(r)?(n=r+1,a=0,e):(o=" ".slice((r-n-a)%4),a=r-n+1,o)})),e.src=t}},{}],99:[function(e,t,n){"use strict";function r(e,t){return l[t.toLowerCase()]}function o(e){var t,n;for(t=e.length-1;t>=0;t--)n=e[t],"text"===n.type&&(n.content=n.content.replace(u,r))}function i(e){var t,n;for(t=e.length-1;t>=0;t--)n=e[t],"text"===n.type&&a.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var a=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,s=/\((c|tm|r|p)\)/i,u=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(s.test(e.tokens[t].content)&&o(e.tokens[t].children),a.test(e.tokens[t].content)&&i(e.tokens[t].children))}},{}],100:[function(e,t,n){"use strict";function r(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function o(e,t){var n,o,u,p,f,h,d,m,v,g,y,k,b,w,_,x,C,S,M,O,A;for(M=[],n=0;n<e.length;n++){for(o=e[n],d=e[n].level,C=M.length-1;C>=0&&!(M[C].level<=d);C--);if(M.length=C+1,"text"===o.type){u=o.content,f=0,h=u.length;e:for(;h>f&&(l.lastIndex=f,p=l.exec(u));)if(_=x=!0,f=p.index+1,S="'"===p[0],v=p.index-1>=0?u.charCodeAt(p.index-1):32,g=h>f?u.charCodeAt(f):32,y=s(v)||a(String.fromCharCode(v)),k=s(g)||a(String.fromCharCode(g)),b=i(v),w=i(g),w?_=!1:k&&(b||y||(_=!1)),b?x=!1:y&&(w||k||(x=!1)),34===g&&'"'===p[0]&&v>=48&&57>=v&&(x=_=!1),_&&x&&(_=!1,x=k),_||x){if(x)for(C=M.length-1;C>=0&&(m=M[C],!(M[C].level<d));C--)if(m.single===S&&M[C].level===d){m=M[C],S?(O=t.md.options.quotes[2],A=t.md.options.quotes[3]):(O=t.md.options.quotes[0],A=t.md.options.quotes[1]),o.content=r(o.content,p.index,A),e[m.token].content=r(e[m.token].content,m.pos,O),f+=A.length-1,m.token===n&&(f+=O.length-1),u=o.content,h=u.length,M.length=C;continue e}_?M.push({token:n,pos:p.index,single:S,level:d}):x&&S&&(o.content=r(o.content,p.index,c))}else S&&(o.content=r(o.content,p.index,c))}}}var i=e("../common/utils").isWhiteSpace,a=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct,u=/['"]/,l=/['"]/g,c="’";t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&u.test(e.tokens[t].content)&&o(e.tokens[t].children,e)}},{"../common/utils":69}],101:[function(e,t,n){"use strict";function r(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}var o=e("../token");r.prototype.Token=o,t.exports=r},{"../token":114}],102:[function(e,t,n){"use strict";var r=e("../common/url_schemas"),o=/^<([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])?)*)>/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;t.exports=function(e,t){var n,a,s,u,l,c,p=e.pos;return 60!==e.src.charCodeAt(p)?!1:(n=e.src.slice(p),n.indexOf(">")<0?!1:i.test(n)?(a=n.match(i),r.indexOf(a[1].toLowerCase())<0?!1:(u=a[0].slice(1,-1),l=e.md.normalizeLink(u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1)),e.pos+=a[0].length,!0):!1)):o.test(n)?(s=n.match(o),u=s[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+u),e.md.validateLink(l)?(t||(c=e.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=e.push("text","",0),c.content=e.md.normalizeLinkText(u),c=e.push("link_close","a",-1),c.markup="autolink",c.info="auto"),e.pos+=s[0].length,!0):!1):!1)}},{"../common/url_schemas":68}],103:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,o,i,a,s,u=e.pos,l=e.src.charCodeAt(u);if(96!==l)return!1;for(n=u,u++,r=e.posMax;r>u&&96===e.src.charCodeAt(u);)u++;for(o=e.src.slice(n,u),i=a=u;-1!==(i=e.src.indexOf("`",a));){for(a=i+1;r>a&&96===e.src.charCodeAt(a);)a++;if(a-i===o.length)return t||(s=e.push("code_inline","code",0),s.markup=o,s.content=e.src.slice(u,i).replace(/[ \n]+/g," ").trim()),e.pos=a,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},{}],104:[function(e,t,n){"use strict";function r(e,t){var n,r,s,u,l,c,p,f,h,d=t,m=!0,v=!0,g=e.posMax,y=e.src.charCodeAt(t);for(n=t>0?e.src.charCodeAt(t-1):32;g>d&&e.src.charCodeAt(d)===y;)d++;return s=d-t,r=g>d?e.src.charCodeAt(d):32,p=a(n)||i(String.fromCharCode(n)),h=a(r)||i(String.fromCharCode(r)),c=o(n),f=o(r),f?m=!1:h&&(c||p||(m=!1)),c?v=!1:p&&(f||h||(v=!1)),95===y?(u=m&&(!v||p),l=v&&(!m||h)):(u=m,l=v),{can_open:u,can_close:l,delims:s}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var n,o,i,a,s,u,l,c,p=e.posMax,f=e.pos,h=e.src.charCodeAt(f);if(95!==h&&42!==h)return!1;if(t)return!1;if(l=r(e,f),n=l.delims,!l.can_open)return e.pos+=n,e.pending+=e.src.slice(f,e.pos),!0;for(e.pos=f+n,u=[n];e.pos<p;)if(e.src.charCodeAt(e.pos)!==h)e.md.inline.skipToken(e);else{if(l=r(e,e.pos),o=l.delims,l.can_close){for(a=u.pop(),s=o;a!==s;){if(a>s){u.push(a-s);break}if(s-=a,0===u.length)break;e.pos+=a,a=u.pop()}if(0===u.length){n=a,i=!0;break}e.pos+=o;continue}l.can_open&&u.push(o),e.pos+=o}if(!i)return e.pos=f,!1;for(e.posMax=e.pos,e.pos=f+n,o=n;o>1;o-=2)c=e.push("strong_open","strong",1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);for(o%2&&(c=e.push("em_open","em",1),c.markup=String.fromCharCode(h)),e.md.inline.tokenize(e),o%2&&(c=e.push("em_close","em",-1),c.markup=String.fromCharCode(h)),o=n;o>1;o-=2)c=e.push("strong_close","strong",-1),c.markup=String.fromCharCode(h)+String.fromCharCode(h);return e.pos=e.posMax+n,e.posMax=p,!0}},{"../common/utils":69}],105:[function(e,t,n){"use strict";var r=e("../common/entities"),o=e("../common/utils").has,i=e("../common/utils").isValidEntityCode,a=e("../common/utils").fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(e,t){var n,l,c,p=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(f>p+1)if(n=e.src.charCodeAt(p+1),35===n){if(c=e.src.slice(p).match(s))return t||(l="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=a(i(l)?l:65533)),e.pos+=c[0].length,!0}else if(c=e.src.slice(p).match(u),c&&o(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},{"../common/entities":65,"../common/utils":69}],106:[function(e,t,n){"use strict";for(var r=[],o=0;256>o;o++)r.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){r[e.charCodeAt(0)]=1}),t.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(n=e.src.charCodeAt(o),256>n&&0!==r[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;i>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},{}],107:[function(e,t,n){"use strict";function r(e){var t=32|e;return t>=97&&122>=t}var o=e("../common/html_re").HTML_TAG_RE;t.exports=function(e,t){var n,i,a,s,u=e.pos;return e.md.options.html?(a=e.posMax,60!==e.src.charCodeAt(u)||u+2>=a?!1:(n=e.src.charCodeAt(u+1),(33===n||63===n||47===n||r(n))&&(i=e.src.slice(u).match(o))?(t||(s=e.push("html_inline","",0),s.content=e.src.slice(u,u+i[0].length)),e.pos+=i[0].length,!0):!1)):!1}},{"../common/html_re":67}],108:[function(e,t,n){"use strict";var r=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),a=e("../common/utils").normalizeReference;t.exports=function(e,t){var n,s,u,l,c,p,f,h,d,m,v,g,y="",k=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,l=r(e,e.pos+1,!1),0>l)return!1;if(p=l+1,b>p&&40===e.src.charCodeAt(p)){for(p++;b>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(p>=b)return!1;for(g=p,h=o(e.src,p,e.posMax),h.ok&&(y=e.md.normalizeLink(h.str),e.md.validateLink(y)?p=h.pos:y=""),g=p;b>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(h=i(e.src,p,e.posMax),b>p&&g!==p&&h.ok)for(d=h.str,p=h.pos;b>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);else d="";if(p>=b||41!==e.src.charCodeAt(p))return e.pos=k,!1;p++}else{if("undefined"==typeof e.env.references)return!1;for(;b>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(b>p&&91===e.src.charCodeAt(p)?(g=p+1,p=r(e,p),p>=0?u=e.src.slice(g,p++):p=l+1):p=l+1,u||(u=e.src.slice(c,l)),f=e.env.references[a(u)],!f)return e.pos=k,!1;y=f.href,d=f.title}if(!t){e.pos=c,e.posMax=l;var w=new e.md.inline.State(e.src.slice(c,l),e.md,e.env,v=[]);w.md.inline.tokenize(w),m=e.push("image","img",0),m.attrs=n=[["src",y],["alt",""]],m.children=v,d&&n.push(["title",d])}return e.pos=p,e.posMax=b,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],109:[function(e,t,n){"use strict";var r=e("../helpers/parse_link_label"),o=e("../helpers/parse_link_destination"),i=e("../helpers/parse_link_title"),a=e("../common/utils").normalizeReference;t.exports=function(e,t){var n,s,u,l,c,p,f,h,d,m,v="",g=e.pos,y=e.posMax,k=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,l=r(e,e.pos,!0),0>l)return!1;if(p=l+1,y>p&&40===e.src.charCodeAt(p)){for(p++;y>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(p>=y)return!1;for(k=p,f=o(e.src,p,e.posMax),f.ok&&(v=e.md.normalizeLink(f.str),e.md.validateLink(v)?p=f.pos:v=""),k=p;y>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(f=i(e.src,p,e.posMax),y>p&&k!==p&&f.ok)for(d=f.str,p=f.pos;y>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);else d="";if(p>=y||41!==e.src.charCodeAt(p))return e.pos=g,!1;p++}else{if("undefined"==typeof e.env.references)return!1;for(;y>p&&(s=e.src.charCodeAt(p),32===s||10===s);p++);if(y>p&&91===e.src.charCodeAt(p)?(k=p+1,p=r(e,p),p>=0?u=e.src.slice(k,p++):p=l+1):p=l+1,u||(u=e.src.slice(c,l)),h=e.env.references[a(u)],!h)return e.pos=g,!1;v=h.href,d=h.title}return t||(e.pos=c,e.posMax=l,m=e.push("link_open","a",1),m.attrs=n=[["href",v]], |
| d&&n.push(["title",d]),e.md.inline.tokenize(e),m=e.push("link_close","a",-1)),e.pos=p,e.posMax=y,!0}},{"../common/utils":69,"../helpers/parse_link_destination":71,"../helpers/parse_link_label":72,"../helpers/parse_link_title":73}],110:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(n=e.pending.length-1,r=e.posMax,t||(n>=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;r>o&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}},{}],111:[function(e,t,n){"use strict";function r(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={}}var o=e("../token");r.prototype.pushPending=function(){var e=new o("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},r.prototype.push=function(e,t,n){this.pending&&this.pushPending();var r=new o(e,t,n);return 0>n&&this.level--,r.level=this.level,n>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(r),r},r.prototype.Token=o,t.exports=r},{"../token":114}],112:[function(e,t,n){"use strict";function r(e,t){var n,r,s,u,l,c,p,f=t,h=!0,d=!0,m=e.posMax,v=e.src.charCodeAt(t);for(n=t>0?e.src.charCodeAt(t-1):32;m>f&&e.src.charCodeAt(f)===v;)f++;return f>=m&&(h=!1),s=f-t,r=m>f?e.src.charCodeAt(f):32,l=a(n)||i(String.fromCharCode(n)),p=a(r)||i(String.fromCharCode(r)),u=o(n),c=o(r),c?h=!1:p&&(u||l||(h=!1)),u?d=!1:l&&(c||p||(d=!1)),{can_open:h,can_close:d,delims:s}}var o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;t.exports=function(e,t){var n,o,i,a,s,u,l,c=e.posMax,p=e.pos,f=e.src.charCodeAt(p);if(126!==f)return!1;if(t)return!1;if(u=r(e,p),n=u.delims,!u.can_open)return e.pos+=n,e.pending+=e.src.slice(p,e.pos),!0;if(s=Math.floor(n/2),0>=s)return!1;for(e.pos=p+n;e.pos<c;)if(e.src.charCodeAt(e.pos)!==f)e.md.inline.skipToken(e);else{if(u=r(e,e.pos),o=u.delims,i=Math.floor(o/2),u.can_close){if(i>=s){e.pos+=o-2,a=!0;break}s-=i,e.pos+=o;continue}u.can_open&&(s+=i),e.pos+=o}return a?(e.posMax=e.pos,e.pos=p+2,l=e.push("s_open","s",1),l.markup="~~",e.md.inline.tokenize(e),l=e.push("s_close","s",-1),l.markup="~~",e.pos=e.posMax+2,e.posMax=c,!0):(e.pos=p,!1)}},{"../common/utils":69}],113:[function(e,t,n){"use strict";function r(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(e,t){for(var n=e.pos;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},{}],114:[function(e,t,n){"use strict";function r(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}r.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(t=this.attrs,n=0,r=t.length;r>n;n++)if(t[n][0]===e)return n;return-1},r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.exports=r},{}],115:[function(e,t,n){"use strict";function r(e){var t,n,r=i[e];if(r)return r;for(r=i[e]=[],t=0;128>t;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t<e.length;t++)n=e.charCodeAt(t),r[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return r}function o(e,t){var n;return"string"!=typeof t&&(t=o.defaultChars),n=r(t),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t,r,o,i,a,s,u,l="";for(t=0,r=e.length;r>t;t+=3)o=parseInt(e.slice(t+1,t+3),16),128>o?l+=n[o]:192===(224&o)&&r>t+3&&(i=parseInt(e.slice(t+4,t+6),16),128===(192&i))?(u=o<<6&1984|63&i,l+=128>u?"��":String.fromCharCode(u),t+=3):224===(240&o)&&r>t+6&&(i=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128===(192&i)&&128===(192&a))?(u=o<<12&61440|i<<6&4032|63&a,l+=2048>u||u>=55296&&57343>=u?"���":String.fromCharCode(u),t+=6):240===(248&o)&&r>t+9&&(i=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128===(192&i)&&128===(192&a)&&128===(192&s))?(u=o<<18&1835008|i<<12&258048|a<<6&4032|63&s,65536>u||u>1114111?l+="����":(u-=65536,l+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),t+=9):l+="�";return l})}var i={};o.defaultChars=";/?:@&=+$,#",o.componentChars="",t.exports=o},{}],116:[function(e,t,n){"use strict";function r(e){var t,n,r=i[e];if(r)return r;for(r=i[e]=[],t=0;128>t;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}function o(e,t,n){var i,a,s,u,l,c="";for("string"!=typeof t&&(n=t,t=o.defaultChars),"undefined"==typeof n&&(n=!0),l=r(t),i=0,a=e.length;a>i;i++)if(s=e.charCodeAt(i),n&&37===s&&a>i+2&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3)))c+=e.slice(i,i+3),i+=2;else if(128>s)c+=l[s];else if(s>=55296&&57343>=s){if(s>=55296&&56319>=s&&a>i+1&&(u=e.charCodeAt(i+1),u>=56320&&57343>=u)){c+=encodeURIComponent(e[i]+e[i+1]),i++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[i]);return c}var i={};o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",t.exports=o},{}],117:[function(e,t,n){"use strict";t.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",t+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},{}],118:[function(e,t,n){"use strict";t.exports.encode=e("./encode"),t.exports.decode=e("./decode"),t.exports.format=e("./format"),t.exports.parse=e("./parse")},{"./decode":115,"./encode":116,"./format":117,"./parse":119}],119:[function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function o(e,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(u),c=["'"].concat(l),p=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){var n,r,o,a,u,l=e;if(l=l.trim(),!t&&1===e.split("#").length){var c=s.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var y=i.exec(l);if(y&&(y=y[0],o=y.toLowerCase(),this.protocol=y,l=l.substr(y.length)),(t||y||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u="//"===l.substr(0,2),!u||y&&v[y]||(l=l.substr(2),this.slashes=!0)),!v[y]&&(u||y&&!g[y])){var k=-1;for(n=0;n<f.length;n++)a=l.indexOf(f[n]),-1!==a&&(-1===k||k>a)&&(k=a);var b,w;for(w=-1===k?l.lastIndexOf("@"):l.lastIndexOf("@",k),-1!==w&&(b=l.slice(0,w),l=l.slice(w+1),this.auth=b),k=-1,n=0;n<p.length;n++)a=l.indexOf(p[n]),-1!==a&&(-1===k||k>a)&&(k=a);-1===k&&(k=l.length),":"===l[k-1]&&k--;var _=l.slice(0,k);l=l.slice(k),this.parseHost(_),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var C=this.hostname.split(/\./);for(n=0,r=C.length;r>n;n++){var S=C[n];if(S&&!S.match(d)){for(var M="",O=0,A=S.length;A>O;O++)M+=S.charCodeAt(O)>127?"x":S[O];if(!M.match(d)){var T=C.slice(0,n),E=C.slice(n+1),D=S.match(m);D&&(T.push(D[1]),E.unshift(D[2])),E.length&&(l=E.join(".")+l),this.hostname=T.join(".");break}}}}this.hostname.length>h&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var P=l.indexOf("#");-1!==P&&(this.hash=l.substr(P),l=l.slice(0,P));var j=l.indexOf("?");return-1!==j&&(this.search=l.substr(j),l=l.slice(0,j)),l&&(this.pathname=l),g[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=a.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.exports=o},{}],120:[function(e,t,n){t.exports=/[\0-\x1F\x7F-\x9F]/},{}],121:[function(e,t,n){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],122:[function(e,t,n){t.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\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-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],123:[function(e,t,n){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],124:[function(e,t,n){t.exports.Any=e("./properties/Any/regex"),t.exports.Cc=e("./categories/Cc/regex"),t.exports.Cf=e("./categories/Cf/regex"),t.exports.P=e("./categories/P/regex"),t.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":120,"./categories/Cf/regex":121,"./categories/P/regex":122,"./categories/Z/regex":123,"./properties/Any/regex":125}],125:[function(e,t,n){t.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}]},{},[1]); |