(function(){var lo={"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(Xe,ze,we){"use strict";var W=we("./node_modules/typo-js/typo.js");function j(T){if(T=T||{},typeof T.codeMirrorInstance!="function"||typeof T.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),T.codeMirrorInstance.defineMode("spell-checker",function(N){if(!j.aff_loading){j.aff_loading=!0;var S=new XMLHttpRequest;S.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),S.onload=function(){S.readyState===4&&S.status===200&&(j.aff_data=S.responseText,j.num_loaded++,j.num_loaded==2&&(j.typo=new W("en_US",j.aff_data,j.dic_data,{platform:"any"})))},S.send(null)}if(!j.dic_loading){j.dic_loading=!0;var A=new XMLHttpRequest;A.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),A.onload=function(){A.readyState===4&&A.status===200&&(j.dic_data=A.responseText,j.num_loaded++,j.num_loaded==2&&(j.typo=new W("en_US",j.aff_data,j.dic_data,{platform:"any"})))},A.send(null)}var B='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',q={token:function(z){var R=z.peek(),ce="";if(B.includes(R))return z.next(),null;for(;(R=z.peek())!=null&&!B.includes(R);)ce+=R,z.next();return j.typo&&!j.typo.check(ce)?"spell-error":null}},J=T.codeMirrorInstance.getMode(N,N.backdrop||"text/plain");return T.codeMirrorInstance.overlayMode(J,q,!0)})}j.num_loaded=0,j.aff_loading=!1,j.dic_loading=!1,j.aff_data="",j.dic_data="",j.typo,Xe.exports=j},"./node_modules/codemirror/addon/display/autorefresh.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("autoRefresh",!1,function(N,S){N.state.autoRefresh&&(T(N,N.state.autoRefresh),N.state.autoRefresh=null),S&&N.display.wrapper.offsetHeight==0&&j(N,N.state.autoRefresh={delay:S.delay||250})});function j(N,S){function A(){N.display.wrapper.offsetHeight?(T(N,S),N.display.lastWrapHeight!=N.display.wrapper.clientHeight&&N.refresh()):S.timeout=setTimeout(A,S.delay)}S.timeout=setTimeout(A,S.delay),S.hurry=function(){clearTimeout(S.timeout),S.timeout=setTimeout(A,50)},W.on(window,"mouseup",S.hurry),W.on(window,"keyup",S.hurry)}function T(N,S){clearTimeout(S.timeout),W.off(window,"mouseup",S.hurry),W.off(window,"keyup",S.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("fullScreen",!1,function(N,S,A){A==W.Init&&(A=!1),!A!=!S&&(S?j(N):T(N))});function j(N){var S=N.getWrapperElement();N.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:S.style.width,height:S.style.height},S.style.width="",S.style.height="auto",S.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",N.refresh()}function T(N){var S=N.getWrapperElement();S.className=S.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var A=N.state.fullScreenRestore;S.style.width=A.width,S.style.height=A.height,window.scrollTo(A.scrollLeft,A.scrollTop),N.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){W.defineOption("placeholder","",function(q,J,z){var R=z&&z!=W.Init;if(J&&!R)q.on("blur",S),q.on("change",A),q.on("swapDoc",A),W.on(q.getInputField(),"compositionupdate",q.state.placeholderCompose=function(){N(q)}),A(q);else if(!J&&R){q.off("blur",S),q.off("change",A),q.off("swapDoc",A),W.off(q.getInputField(),"compositionupdate",q.state.placeholderCompose),j(q);var ce=q.getWrapperElement();ce.className=ce.className.replace(" CodeMirror-empty","")}J&&!q.hasFocus()&&S(q)});function j(q){q.state.placeholder&&(q.state.placeholder.parentNode.removeChild(q.state.placeholder),q.state.placeholder=null)}function T(q){j(q);var J=q.state.placeholder=document.createElement("pre");J.style.cssText="height: 0; overflow: visible",J.style.direction=q.getOption("direction"),J.className="CodeMirror-placeholder CodeMirror-line-like";var z=q.getOption("placeholder");typeof z=="string"&&(z=document.createTextNode(z)),J.appendChild(z),q.display.lineSpace.insertBefore(J,q.display.lineSpace.firstChild)}function N(q){setTimeout(function(){var J=!1;if(q.lineCount()==1){var z=q.getInputField();J=z.nodeName=="TEXTAREA"?!q.getLine(0).length:!/[^\u200b]/.test(z.querySelector(".CodeMirror-line").textContent)}J?T(q):j(q)},20)}function S(q){B(q)&&T(q)}function A(q){var J=q.getWrapperElement(),z=B(q);J.className=J.className.replace(" CodeMirror-empty","")+(z?" CodeMirror-empty":""),z?T(q):j(q)}function B(q){return q.lineCount()===1&&q.getLine(0)===""}})},"./node_modules/codemirror/addon/edit/continuelist.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var j=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,T=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,N=/[*+-]\s/;W.commands.newlineAndIndentContinueMarkdownList=function(A){if(A.getOption("disableInput"))return W.Pass;for(var B=A.listSelections(),q=[],J=0;J\s*$/.test(me),te=!/>\s*$/.test(me);(P||te)&&A.replaceRange("",{line:z.line,ch:0},{line:z.line,ch:z.ch+1}),q[J]=` `}else{var Y=ye[1],X=ye[5],fe=!(N.test(ye[2])||ye[2].indexOf(">")>=0),re=fe?parseInt(ye[3],10)+1+ye[4]:ye[2].replace("x"," ");q[J]=` `+Y+re+X,fe&&S(A,z)}}A.replaceSelections(q)};function S(A,B){var q=B.line,J=0,z=0,R=j.exec(A.getLine(q)),ce=R[1];do{J+=1;var le=q+J,De=A.getLine(le),me=j.exec(De);if(me){var ye=me[1],I=parseInt(R[3],10)+J-z,P=parseInt(me[3],10),te=P;if(ce===ye&&!isNaN(P))I===P&&(te=P+1),I>P&&(te=I+1),A.replaceRange(De.replace(j,ye+te+me[4]+me[5]),{line:le,ch:0},{line:le,ch:De.length});else{if(ce.length>ye.length||ce.lengthre);ie++){var Be=I.getLine(fe++);Y=Y==null?Be:Y+` `+Be}X=X*2,P.lastIndex=te.ch;var ne=P.exec(Y);if(ne){var ae=Y.slice(0,ne.index).split(` `),Ae=ne[0].split(` `),O=te.line+ae.length-1,Q=ae[ae.length-1].length;return{from:j(O,Q),to:j(O+Ae.length-1,Ae.length==1?Q+Ae[0].length:Ae[Ae.length-1].length),match:ne}}}}function q(I,P,te){for(var Y,X=0;X<=I.length;){P.lastIndex=X;var fe=P.exec(I);if(!fe)break;var re=fe.index+fe[0].length;if(re>I.length-te)break;(!Y||re>Y.index+Y[0].length)&&(Y=fe),X=fe.index+1}return Y}function J(I,P,te){P=N(P,"g");for(var Y=te.line,X=te.ch,fe=I.firstLine();Y>=fe;Y--,X=-1){var re=I.getLine(Y),ie=q(re,P,X<0?0:re.length-X);if(ie)return{from:j(Y,ie.index),to:j(Y,ie.index+ie[0].length),match:ie}}}function z(I,P,te){if(!S(P))return J(I,P,te);P=N(P,"gm");for(var Y,X=1,fe=I.getLine(te.line).length-te.ch,re=te.line,ie=I.firstLine();re>=ie;){for(var Be=0;Be=ie;Be++){var ne=I.getLine(re--);Y=Y==null?ne:ne+` `+Y}X*=2;var ae=q(Y,P,fe);if(ae){var Ae=Y.slice(0,ae.index).split(` `),O=ae[0].split(` `),Q=re+Ae.length,G=Ae[Ae.length-1].length;return{from:j(Q,G),to:j(Q+O.length-1,O.length==1?G+O[0].length:O[O.length-1].length),match:ae}}}}var R,ce;String.prototype.normalize?(R=function(I){return I.normalize("NFD").toLowerCase()},ce=function(I){return I.normalize("NFD")}):(R=function(I){return I.toLowerCase()},ce=function(I){return I});function le(I,P,te,Y){if(I.length==P.length)return te;for(var X=0,fe=te+Math.max(0,I.length-P.length);;){if(X==fe)return X;var re=X+fe>>1,ie=Y(I.slice(0,re)).length;if(ie==te)return re;ie>te?fe=re:X=re+1}}function De(I,P,te,Y){if(!P.length)return null;var X=Y?R:ce,fe=X(P).split(/\r|\n\r?/);e:for(var re=te.line,ie=te.ch,Be=I.lastLine()+1-fe.length;re<=Be;re++,ie=0){var ne=I.getLine(re).slice(ie),ae=X(ne);if(fe.length==1){var Ae=ae.indexOf(fe[0]);if(Ae==-1)continue e;var te=le(ne,ae,Ae,X)+ie;return{from:j(re,le(ne,ae,Ae,X)+ie),to:j(re,le(ne,ae,Ae+fe[0].length,X)+ie)}}else{var O=ae.length-fe[0].length;if(ae.slice(O)!=fe[0])continue e;for(var Q=1;Q=Be;re--,ie=-1){var ne=I.getLine(re);ie>-1&&(ne=ne.slice(0,ie));var ae=X(ne);if(fe.length==1){var Ae=ae.lastIndexOf(fe[0]);if(Ae==-1)continue e;return{from:j(re,le(ne,ae,Ae,X)),to:j(re,le(ne,ae,Ae+fe[0].length,X))}}else{var O=fe[fe.length-1];if(ae.slice(0,O.length)!=O)continue e;for(var Q=1,te=re-fe.length+1;Q0);)te.push({anchor:Y.from(),head:Y.to()});te.length&&this.setSelections(te,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("styleSelectedText",!1,function(R,ce,le){var De=le&&le!=W.Init;ce&&!De?(R.state.markedSelection=[],R.state.markedSelectionStyle=typeof ce=="string"?ce:"CodeMirror-selectedtext",J(R),R.on("cursorActivity",j),R.on("change",T)):!ce&&De&&(R.off("cursorActivity",j),R.off("change",T),q(R),R.state.markedSelection=R.state.markedSelectionStyle=null)});function j(R){R.state.markedSelection&&R.operation(function(){z(R)})}function T(R){R.state.markedSelection&&R.state.markedSelection.length&&R.operation(function(){q(R)})}var N=8,S=W.Pos,A=W.cmpPos;function B(R,ce,le,De){if(A(ce,le)!=0)for(var me=R.state.markedSelection,ye=R.state.markedSelectionStyle,I=ce.line;;){var P=I==ce.line?ce:S(I,0),te=I+N,Y=te>=le.line,X=Y?le:S(te,0),fe=R.markText(P,X,{className:ye});if(De==null?me.push(fe):me.splice(De++,0,fe),Y)break;I=te}}function q(R){for(var ce=R.state.markedSelection,le=0;le1)return J(R);var ce=R.getCursor("start"),le=R.getCursor("end"),De=R.state.markedSelection;if(!De.length)return B(R,ce,le);var me=De[0].find(),ye=De[De.length-1].find();if(!me||!ye||le.line-ce.line<=N||A(ce,ye.to)>=0||A(le,me.from)<=0)return J(R);for(;A(ce,me.from)>0;)De.shift().clear(),me=De[0].find();for(A(ce,me.from)<0&&(me.to.line-ce.line0&&(le.line-ye.from.line2),me=/Android/.test(ze),ye=De||me||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ze),I=De||/Mac/.test(we),P=/\bCrOS\b/.test(ze),te=/win/i.test(we),Y=z&&ze.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(z=!1,B=!0);var X=I&&(q||z&&(Y==null||Y<12.11)),fe=W||S&&A>=9;function re(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ie=function(e,t){var n=e.className,r=re(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function Be(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ne(e,t){return Be(e).appendChild(t)}function ae(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return l+(t-a);l+=o-a,l+=n-l%n,a=o+1}}var d=function(){this.id=null,this.f=null,this.time=0,this.handler=St(this.onTimeout,this)};d.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},d.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var ut=[""];function Pe(e){for(;ut.length<=e;)ut.push(Se(ut)+" ");return ut[e]}function Se(e){return e[e.length-1]}function ft(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||yt.test(e))}function Ft(e,t){return t?t.source.indexOf("\\w")>-1&&ct(e)?!0:t.test(e):ct(e)}function nt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Nt=/[\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]/;function Zt(e){return e.charCodeAt(0)>=768&&Nt.test(e)}function yr(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function Vr(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var zt=null;function ge(e,t,n){var r;zt=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:zt=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:zt=i)}return r!=null?r:zt}var br=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(s){return s<=247?e.charAt(s):1424<=s&&s<=1524?"R":1536<=s&&s<=1785?t.charAt(s-1536):1774<=s&&s<=2220?"r":8192<=s&&s<=8203?"w":s==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,o=/[1n]/;function u(s,m,b){this.level=s,this.from=m,this.to=b}return function(s,m){var b=m=="ltr"?"L":"R";if(s.length==0||m=="ltr"&&!r.test(s))return!1;for(var L=s.length,F=[],H=0;H-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function _(e,t){var n=M(e,t);if(!!n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function c(e){e.prototype.on=function(t,n){C(this,t,n)},e.prototype.off=function(t,n){E(this,t,n)}}function h(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function x(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function D(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function w(e){h(e),x(e)}function K(e){return e.target||e.srcElement}function Z(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),I&&e.ctrlKey&&t==1&&(t=3),t}var V=function(){if(S&&A<9)return!1;var e=ae("div");return"draggable"in e||"dragDrop"in e}(),oe;function Me(e){if(oe==null){var t=ae("span","\u200B");ne(e,ae("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&A<8))}var n=oe?ae("span","\u200B"):ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var _e;function He(e){if(_e!=null)return _e;var t=ne(e,document.createTextNode("A\u062EA")),n=O(t,0,1).getBoundingClientRect(),r=O(t,1,2).getBoundingClientRect();return Be(e),!n||n.left==n.right?!1:_e=r.right-n.right<3}var Te=` b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` `,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Pt=function(){var e=ae("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ot=null;function It(e){if(Ot!=null)return Ot;var t=ne(e,ae("span","x")),n=t.getBoundingClientRect(),r=O(t,0,1).getBoundingClientRect();return Ot=Math.abs(n.left-r.left)>1}var Ke={},Ue={};function Nr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ke[e]=t}function nr(e,t){Ue[e]=t}function Je(e){if(typeof e=="string"&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&typeof e.name=="string"&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];typeof t=="string"&&(t={name:t}),e=xt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Je("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Je("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Rt(e,t){t=Je(t);var n=Ke[t.name];if(!n)return Rt(e,"text/plain");var r=n(e,t);if(Ct.hasOwnProperty(t.name)){var i=Ct[t.name];for(var a in i)!i.hasOwnProperty(a)||(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var Ct={};function qt(e,t){var n=Ct.hasOwnProperty(e)?Ct[e]:Ct[e]={};Ye(t,n)}function At(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ir(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function en(e,t,n){return e.startState?e.startState(t,n):!0}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};et.prototype.eol=function(){return this.pos>=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.post},et.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?$(n,Ce(e,n).text.length):oo(t,Ce(e,t.line).text.length)}function oo(e,t){var n=e.ch;return n==null||n>t?$(e.line,t):n<0?$(e.line,0):e}function la(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,n){return t instanceof Mn?new Jt(e,At(e.mode,t.state),n,t.lookAhead):new Jt(e,At(e.mode,t),n)},Jt.prototype.save=function(e){var t=e!==!1?At(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Mn(t,this.maxLookAhead):t};function oa(e,t,n,r){var i=[e.state.modeGen],a={};da(e,t.text,e.doc.mode,n,function(s,m){return i.push(s,m)},a,r);for(var l=n.state,o=function(s){n.baseTokens=i;var m=e.state.overlays[s],b=1,L=0;n.state=!0,da(e,t.text,m.mode,n,function(F,H){for(var U=b;LF&&i.splice(b,1,F,i[b+1],ee),b+=2,L=Math.min(F,ee)}if(!!H)if(m.opaque)i.splice(U,b-U,F,"overlay "+H),b=U+2;else for(;Ue.options.maxHighlightLength&&At(e.doc.mode,r.state),a=oa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function rn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=uo(e,t,n),l=a>r.first&&Ce(r,a-1).stateAfter,o=l?Jt.fromSaved(r,l,a):new Jt(r,en(r.mode),a);return r.iter(a,t,function(u){hi(e,u.text,o);var s=o.line;u.stateAfter=s==t-1||s%5==0||s>=i.viewFrom&&st.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var fa=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ca(e,t,n,r){var i=e.doc,a=i.mode,l;t=Oe(i,t);var o=Ce(i,t.line),u=rn(e,t.line,n),s=new et(o.text,e.options.tabSize,u),m;for(r&&(m=[]);(r||s.pose.options.maxHighlightLength?(o=!1,l&&hi(e,t,r,m.pos),m.pos=t.length,b=null):b=ha(di(n,m,r.state,L),a),L){var F=L[0].name;F&&(b="m-"+(b?F+" "+b:F))}if(!o||s!=b){for(;ul;--o){if(o<=a.first)return a.first;var u=Ce(a,o-1),s=u.stateAfter;if(s&&(!n||o+(s instanceof Mn?s.lookAhead:0)<=a.modeFrontier))return o;var m=k(u.text,null,e.options.tabSize);(i==null||r>m)&&(i=o-1,r=m)}return i}function so(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ce(e,r).stateAfter;if(i&&(!(i instanceof Mn)||r+i.lookAhead=t:a.to>t);(r||(r=[])).push(new Nn(l,a.from,u?null:a.to))}}return r}function vo(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t);if(o||a.from==t&&l.type=="bookmark"&&(!n||a.marker.insertLeft)){var u=a.from==null||(l.inclusiveLeft?a.from<=t:a.from0&&o)for(var xe=0;xe0)){var m=[u,1],b=Ne(s.from,o.from),L=Ne(s.to,o.to);(b<0||!l.inclusiveLeft&&!b)&&m.push({from:s.from,to:o.from}),(L>0||!l.inclusiveRight&&!L)&&m.push({from:o.to,to:s.to}),i.splice.apply(i,m),u+=m.length-3}}return i}function va(e){var t=e.markedSpans;if(!!t){for(var n=0;nt)&&(!r||gi(r,a.marker)<0)&&(r=a.marker)}return r}function ba(e,t,n,r,i){var a=Ce(e,t),l=ar&&a.markedSpans;if(l)for(var o=0;o=0&&b<=0||m<=0&&b>=0)&&(m<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?Ne(s.to,n)>=0:Ne(s.to,n)>0)||m>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?Ne(s.from,r)<=0:Ne(s.from,r)<0)))return!0}}}function Qt(e){for(var t;t=ya(e);)e=t.find(-1,!0).line;return e}function yo(e){for(var t;t=_n(e);)e=t.find(1,!0).line;return e}function bo(e){for(var t,n;t=_n(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function vi(e,t){var n=Ce(e,t),r=Qt(n);return n==r?t:je(r)}function Da(e,t){if(t>e.lastLine())return t;var n=Ce(e,t),r;if(!fr(e,n))return t;for(;r=_n(n);)n=r.find(1,!0).line;return je(n)+1}function fr(e,t){var n=ar&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Or=function(e,t,n){this.text=e,ma(this,t),this.height=n?n(this):1};Or.prototype.lineNo=function(){return je(this)},c(Or);function Do(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),va(e),ma(e,n);var i=r?r(e):1;i!=e.height&&$t(e,i)}function Co(e){e.parent=null,va(e)}var wo={},ko={};function Ca(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ko:wo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function wa(e,t){var n=Ae("span",null,null,B?"padding-right: .1px":null),r={pre:Ae("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Fo,He(e.display.measure)&&(l=f(a,e.doc.direction))&&(r.addToken=Eo(r.addToken,l)),r.map=[];var o=t!=e.display.externalMeasured&&je(a);Lo(a,r,ua(e,a,o)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Ge(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Ge(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Me(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(B){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return _(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ge(r.pre.className,r.textClass||"")),r}function So(e){var t=ae("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fo(e,t,n,r,i,a,l){if(!!t){var o=e.splitSpaces?Ao(t,e.trailingSpace):t,u=e.cm.state.specialChars,s=!1,m;if(!u.test(t))e.col+=t.length,m=document.createTextNode(o),e.map.push(e.pos,e.pos+t.length,m),S&&A<9&&(s=!0),e.pos+=t.length;else{m=document.createDocumentFragment();for(var b=0;;){u.lastIndex=b;var L=u.exec(t),F=L?L.index-b:t.length-b;if(F){var H=document.createTextNode(o.slice(b,b+F));S&&A<9?m.appendChild(ae("span",[H])):m.appendChild(H),e.map.push(e.pos,e.pos+F,H),e.col+=F,e.pos+=F}if(!L)break;b+=F+1;var U=void 0;if(L[0]==" "){var ee=e.cm.options.tabSize,ue=ee-e.col%ee;U=m.appendChild(ae("span",Pe(ue),"cm-tab")),U.setAttribute("role","presentation"),U.setAttribute("cm-text"," "),e.col+=ue}else L[0]=="\r"||L[0]==` `?(U=m.appendChild(ae("span",L[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),U.setAttribute("cm-text",L[0]),e.col+=1):(U=e.cm.options.specialCharPlaceholder(L[0]),U.setAttribute("cm-text",L[0]),S&&A<9?m.appendChild(ae("span",[U])):m.appendChild(U),e.col+=1);e.map.push(e.pos,e.pos+1,U),e.pos++}}if(e.trailingSpace=o.charCodeAt(t.length-1)==32,n||r||i||s||a||l){var ve=n||"";r&&(ve+=r),i&&(ve+=i);var se=ae("span",[m],ve,a);if(l)for(var xe in l)l.hasOwnProperty(xe)&&xe!="style"&&xe!="class"&&se.setAttribute(xe,l[xe]);return e.content.appendChild(se)}e.content.appendChild(m)}}function Ao(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;is&&b.from<=s));L++);if(b.to>=m)return e(n,r,i,a,l,o,u);e(n,r.slice(0,b.to-s),i,a,null,o,u),a=null,r=r.slice(b.to-s),s=b.to}}}function ka(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Lo(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;lu||Ie.collapsed&&ke.to==u&&ke.from==u)){if(ke.to!=null&&ke.to!=u&&F>ke.to&&(F=ke.to,U=""),Ie.className&&(H+=" "+Ie.className),Ie.css&&(L=(L?L+";":"")+Ie.css),Ie.startStyle&&ke.from==u&&(ee+=" "+Ie.startStyle),Ie.endStyle&&ke.to==F&&(xe||(xe=[])).push(Ie.endStyle,ke.to),Ie.title&&((ve||(ve={})).title=Ie.title),Ie.attributes)for(var Ze in Ie.attributes)(ve||(ve={}))[Ze]=Ie.attributes[Ze];Ie.collapsed&&(!ue||gi(ue.marker,Ie)<0)&&(ue=ke)}else ke.from>u&&F>ke.from&&(F=ke.from)}if(xe)for(var gt=0;gt=o)break;for(var Ht=Math.min(o,F);;){if(m){var Tt=u+m.length;if(!ue){var lt=Tt>Ht?m.slice(0,Ht-u):m;t.addToken(t,lt,b?b+H:H,ee,u+lt.length==F?U:"",L,ve)}if(Tt>=Ht){m=m.slice(Ht-u),u=Ht;break}u=Tt,ee=""}m=i.slice(a,a=n[s++]),b=Ca(n[s++],t.cm.options)}}}function Sa(e,t,n){this.line=t,this.rest=bo(t),this.size=this.rest?je(Se(this.rest))-n+1:1,this.node=this.text=null,this.hidden=fr(e,t)}function zn(e,t,n){for(var r=[],i,a=t;a2&&a.push((u.bottom+s.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Ma(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ro(e,t){t=Qt(t);var n=je(t),r=e.display.externalMeasured=new Sa(e.doc,t,n);r.lineN=n;var i=r.built=wa(e,r);return r.text=i.pre,ne(e.display.lineMeasure,i.pre),r}function Na(e,t,n,r){return er(e,_r(e,t),n,r)}function Ci(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=u-o,i=a-1,t>=u&&(l="right")),i!=null){if(r=e[s+2],o==u&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],l="left";if(n=="right"&&i==u-o)for(;s=0&&(n=e[i]).left==n.right;i--);return n}function Uo(e,t,n,r){var i=Ia(t.map,n,r),a=i.node,l=i.start,o=i.end,u=i.collapse,s;if(a.nodeType==3){for(var m=0;m<4;m++){for(;l&&Zt(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+o0&&(u=r="right");var b;e.options.lineWrapping&&(b=a.getClientRects()).length>1?s=b[r=="right"?b.length-1:0]:s=a.getBoundingClientRect()}if(S&&A<9&&!l&&(!s||!s.left&&!s.right)){var L=a.parentNode.getClientRects()[0];L?s={left:L.left,right:L.left+zr(e.display),top:L.top,bottom:L.bottom}:s=Oa}for(var F=s.top-t.rect.top,H=s.bottom-t.rect.top,U=(F+H)/2,ee=t.view.measure.heights,ue=0;ue=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!o)return l(s=="before"?u-1:u,s=="before");function m(H,U,ee){var ue=o[U],ve=ue.level==1;return l(ee?H-1:H,ve!=ee)}var b=ge(o,u,s),L=zt,F=m(u,b,s=="before");return L!=null&&(F.other=m(u,L,s!="before")),F}function Wa(e,t){var n=0;t=Oe(e.doc,t),e.options.lineWrapping||(n=zr(e.display)*t.ch);var r=Ce(e.doc,t.line),i=lr(r)+Pn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Si(e,t,n,r,i){var a=$(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Fi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Si(r.first,0,null,-1,-1);var i=Cr(r,n),a=r.first+r.size-1;if(i>a)return Si(r.first+r.size-1,Ce(r,a).text.length,null,1,1);t<0&&(t=0);for(var l=Ce(r,i);;){var o=qo(e,l,i,t,n),u=xo(l,o.ch+(o.xRel>0||o.outside>0?1:0));if(!u)return o;var s=u.find(1);if(s.line==i)return s;l=Ce(r,i=s.line)}}function Ua(e,t,n,r){r-=wi(t);var i=t.text.length,a=rr(function(l){return er(e,n,l-1).bottom<=r},i,0);return i=rr(function(l){return er(e,n,l).top>r},a,i),{begin:a,end:i}}function ja(e,t,n,r){n||(n=_r(e,t));var i=Rn(e,t,er(e,n,r),"line").top;return Ua(e,t,n,i)}function Ai(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function qo(e,t,n,r,i){i-=lr(t);var a=_r(e,t),l=wi(t),o=0,u=t.text.length,s=!0,m=f(t,e.doc.direction);if(m){var b=(e.options.lineWrapping?Ko:Go)(e,t,n,a,m,r,i);s=b.level!=1,o=s?b.from:b.to-1,u=s?b.to:b.from-1}var L=null,F=null,H=rr(function(Fe){var ke=er(e,a,Fe);return ke.top+=l,ke.bottom+=l,Ai(ke,r,i,!1)?(ke.top<=i&&ke.left<=r&&(L=Fe,F=ke),!0):!1},o,u),U,ee,ue=!1;if(F){var ve=r-F.left=xe.bottom?1:0}return H=yr(t.text,H,1),Si(n,H,ee,ue,r-U)}function Go(e,t,n,r,i,a,l){var o=rr(function(b){var L=i[b],F=L.level!=1;return Ai(Gt(e,$(n,F?L.to:L.from,F?"before":"after"),"line",t,r),a,l,!0)},0,i.length-1),u=i[o];if(o>0){var s=u.level!=1,m=Gt(e,$(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Ai(m,a,l,!0)&&m.top>l&&(u=i[o-1])}return u}function Ko(e,t,n,r,i,a,l){var o=Ua(e,t,r,l),u=o.begin,s=o.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var m=null,b=null,L=0;L=s||F.to<=u)){var H=F.level!=1,U=er(e,r,H?Math.min(s,F.to)-1:Math.max(u,F.from)).right,ee=Uee)&&(m=F,b=ee)}}return m||(m=i[i.length-1]),m.froms&&(m={from:m.from,to:s,level:m.level}),m}var kr;function Hr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kr==null){kr=ae("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kr.appendChild(document.createTextNode("x")),kr.appendChild(ae("br"));kr.appendChild(document.createTextNode("x"))}ne(e.measure,kr);var n=kr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Be(e.measure),n||1}function zr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=ae("span","xxxxxxxxxx"),n=ae("pre",[t],"CodeMirror-line-like");ne(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ei(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,l=0;a;a=a.nextSibling,++l){var o=e.display.gutterSpecs[l].className;n[o]=a.offsetLeft+a.clientLeft+i,r[o]=a.clientWidth}return{fixedPos:Li(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Li(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function qa(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/zr(e.display)-3);return function(i){if(fr(e.doc,i))return 0;var a=0;if(i.widgets)for(var l=0;l0&&(s=Ce(e.doc,u.line).text).length==u.ch){var m=k(s,s.length,e.options.tabSize)-s.length;u=$(u.line,Math.max(0,Math.round((a-Ba(e.display).left)/zr(e.display))-m))}return u}function Fr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)ar&&vi(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var a=Wn(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Wn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var o=Wn(e,t,t,-1),u=Wn(e,n,n+r,1);o&&u?(i.view=i.view.slice(0,o.index).concat(zn(e,o.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):hr(e)}var s=i.externalMeasured;s&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Fr(e,t)];if(a.node!=null){var l=a.changes||(a.changes=[]);he(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wn(e,t,n,r){var i=Fr(e,t),a,l=e.display.view;if(!ar||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var o=e.display.viewFrom,u=0;u0){if(i==l.length-1)return null;a=o+l[i].size-t,i++}else a=o-t;t+=a,n+=a}for(;vi(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Xo(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=zn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=zn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Fr(e,n)))),r.viewTo=n}function Ga(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||o.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Pr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ya(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ni(e))}function Mi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Pr(e))},100)}function Ni(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(_(e,"focus",e,t),e.state.focused=!0,de(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),B&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bi(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(_(e,"blur",e,t),e.state.focused=!1,ie(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function jn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||m<-.005)&&($t(i.line,l),Za(i.line),i.rest))for(var b=0;be.display.sizerWidth){var L=Math.ceil(o/zr(e.display));L>e.display.maxLineLength&&(e.display.maxLineLength=L,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Za(e){if(e.widgets)for(var t=0;t=l&&(a=Cr(t,lr(Ce(t,u))-e.wrapper.clientHeight),l=u)}return{from:a,to:Math.max(l,a+1)}}function Zo(e,t){if(!g(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!le){var a=ae("div","\u200B",null,`position: absolute; top: `+(t.top-n.viewOffset-Pn(e.display))+`px; height: `+(t.bottom-t.top+Vt(e)+n.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function $o(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(t=t.ch?$(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?$(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var l=!1,o=Gt(e,t),u=!n||n==t?o:Gt(e,n);i={left:Math.min(o.left,u.left),top:Math.min(o.top,u.top)-r,right:Math.max(o.left,u.left),bottom:Math.max(o.bottom,u.bottom)+r};var s=Oi(e,i),m=e.doc.scrollTop,b=e.doc.scrollLeft;if(s.scrollTop!=null&&(cn(e,s.scrollTop),Math.abs(e.doc.scrollTop-m)>1&&(l=!0)),s.scrollLeft!=null&&(Ar(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-b)>1&&(l=!0)),!l)break}return i}function Jo(e,t){var n=Oi(e,t);n.scrollTop!=null&&cn(e,n.scrollTop),n.scrollLeft!=null&&Ar(e,n.scrollLeft)}function Oi(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=Di(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var o=e.doc.height+bi(n),u=t.topo-r;if(t.topi+a){var m=Math.min(t.top,(s?o:t.bottom)-a);m!=i&&(l.scrollTop=m)}var b=e.options.fixedGutter?0:n.gutters.offsetWidth,L=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-b,F=wr(e)-n.gutters.offsetWidth,H=t.right-t.left>F;return H&&(t.right=t.left+F),t.left<10?l.scrollLeft=0:t.leftF+L-3&&(l.scrollLeft=t.right+(H?0:10)-F),l}function Ii(e,t){t!=null&&(Gn(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){Gn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fn(e,t,n){(t!=null||n!=null)&&Gn(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Qo(e,t){Gn(e),e.curOp.scrollToPos=t}function Gn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Wa(e,t.from),r=Wa(e,t.to);$a(e,n,r,t.margin)}}function $a(e,t,n,r){var i=Oi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fn(e,i.scrollLeft,i.scrollTop)}function cn(e,t){Math.abs(e.doc.scrollTop-t)<2||(W||Hi(e,{top:t}),Ja(e,t,!0),W&&Hi(e),pn(e,100))}function Ja(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Ar(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,rl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function hn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+bi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Vt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Er=function(e,t,n){this.cm=n;var r=this.vert=ae("div",[ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ae("div",[ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),C(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),C(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Er.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var e=I&&!ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new d,this.disableVert=new d},Er.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},Er.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var dn=function(){};dn.prototype.update=function(){return{bottom:0,right:0}},dn.prototype.setScrollLeft=function(){},dn.prototype.setScrollTop=function(){},dn.prototype.clear=function(){};function Wr(e,t){t||(t=hn(e));var n=e.display.barWidth,r=e.display.barHeight;Qa(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&jn(e),Qa(e,hn(e)),n=e.display.barWidth,r=e.display.barHeight}function Qa(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var Va={native:Er,null:dn};function el(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ie(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Va[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),C(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Ar(e,t):cn(e,t)},e),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)}var Vo=0;function Lr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vo},To(e.curOp)}function Tr(e){var t=e.curOp;t&&Mo(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Kn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ru(e){e.updatedDisplay=e.mustUpdate&&_i(e.cm,e.update)}function nu(e){var t=e.cm,n=t.display;e.updatedDisplay&&jn(t),e.barMeasure=hn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Na(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Vt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function iu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=rn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var l=a.styles,o=a.text.length>e.options.maxHighlightLength?At(t.mode,r.state):null,u=oa(e,a,r,!0);o&&(r.state=o),a.styles=u.styles;var s=a.styleClasses,m=u.classes;m?a.styleClasses=m:s&&(a.styleClasses=null);for(var b=!l||l.length!=a.styles.length||s!=m&&(!s||!m||s.bgClass!=m.bgClass||s.textClass!=m.textClass),L=0;!b&&Ln)return pn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&_t(e,function(){for(var a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Ga(e)==0)return!1;nl(e)&&(hr(e),t.dims=Ei(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),ar&&(a=vi(e.doc,a),l=Da(e.doc,l));var o=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Xo(e,a,l),n.viewOffset=lr(Ce(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Ga(e);if(!o&&u==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var s=uu(e);return u>4&&(n.lineDiv.style.display="none"),fu(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,su(s),Be(n.cursorDiv),Be(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,o&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,pn(e,400)),n.updateLineNumbers=null,!0}function tl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+bi(e.display)-Di(e),n.top)}),t.visible=qn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=qn(e.display,e.doc,n));if(!_i(e,t))break;jn(e);var i=hn(e);sn(e),Wr(e,i),Pi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Hi(e,t){var n=new Kn(e,t);if(_i(e,n)){jn(e),tl(e,n);var r=hn(e);sn(e),Wr(e,r),Pi(e,r),n.finish()}}function fu(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,l=a.firstChild;function o(H){var U=H.nextSibling;return B&&I&&e.display.currentWheelTarget==H?H.style.display="none":H.parentNode.removeChild(H),U}for(var u=r.view,s=r.viewFrom,m=0;m-1&&(F=!1),Fa(e,b,s,n)),F&&(Be(b.lineNumber),b.lineNumber.appendChild(document.createTextNode(si(e.options,s)))),l=b.node.nextSibling}s+=b.size}for(;l;)l=o(l)}function zi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ht(e,"gutterChanged",e)}function Pi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Vt(e)+"px"}function rl(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Li(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",l=0;ll.clientWidth,u=l.scrollHeight>l.clientHeight;if(!!(r&&o||i&&u)){if(i&&I&&B){e:for(var s=t.target,m=a.view;s!=l;s=s.parentNode)for(var b=0;b=0&&Ne(e,r.to())<=0)return n}return-1};var We=function(e,t){this.anchor=e,this.head=t};We.prototype.from=function(){return Bn(this.anchor,this.head)},We.prototype.to=function(){return Tn(this.anchor,this.head)},We.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(L,F){return Ne(L.from(),F.from())}),n=he(t,i);for(var a=1;a0:u>=0){var s=Bn(o.from(),l.from()),m=Tn(o.to(),l.to()),b=o.empty()?l.from()==l.head:o.from()==o.head;a<=n&&--n,t.splice(--a,2,new We(b?m:s,b?s:m))}}return new Ut(t,n)}function dr(e,t){return new Ut([new We(e,t||e)],0)}function pr(e){return e.text?$(e.from.line+e.text.length-1,Se(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ol(e,t){if(Ne(e,t.from)<0)return e;if(Ne(e,t.to)<=0)return pr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=pr(t).ch-t.to.ch),$(n,r)}function Wi(e,t){for(var n=[],r=0;r1&&e.remove(o.line+1,H-1),e.insert(o.line+1,ue)}ht(e,"change",e,t)}function gr(e,t,n){function r(i,a,l){if(i.linked)for(var o=0;o1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Se(e.done)}function dl(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,l,o;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=gu(i,i.lastOp==r)))o=Se(l.changes),Ne(t.from,t.to)==0&&Ne(t.from,o.to)==0?o.to=pr(t):l.changes.push(qi(e,t));else{var u=Se(i.done);for((!u||!u.ranges)&&Zn(e.sel,i.done),l={changes:[qi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||_(e,"historyAdded")}function vu(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function mu(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||vu(e,a,Se(i.done),t))?i.done[i.done.length-1]=t:Zn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&hl(i.undone)}function Zn(e,t){var n=Se(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pl(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=l.markedSpans),++a})}function xu(e){if(!e)return null;for(var t,n=0;n-1&&(Se(o)[b]=s[b],delete s[b])}}return r}function Gi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=Ne(t,i)<0;a!=Ne(n,i)<0?(i=t,t=n):a!=Ne(t,n)<0&&(t=n)}return new We(i,t)}else return new We(n||t,t)}function $n(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),bt(e,new Ut([Gi(e.sel.primary(),t,n,i)],0),r)}function vl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:o.to>t.ch))){if(i&&(_(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--l;continue}else break;if(!u.atomic)continue;if(n){var b=u.find(r<0?1:-1),L=void 0;if((r<0?m:s)&&(b=Cl(e,b,-r,b&&b.line==t.line?a:null)),b&&b.line==t.line&&(L=Ne(b,n))&&(r<0?L<0:L>0))return jr(e,b,t,r,i)}var F=u.find(r<0?-1:1);return(r<0?s:m)&&(F=Cl(e,F,r,F.line==t.line?a:null)),F?jr(e,F,t,r,i):null}}return t}function Qn(e,t,n,r,i){var a=r||1,l=jr(e,t,n,a,i)||!i&&jr(e,t,n,a,!0)||jr(e,t,n,-a,i)||!i&&jr(e,t,n,-a,!0);return l||(e.cantEdit=!0,$(e.first,0))}function Cl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Oe(e,$(t.line-1)):null:n>0&&t.ch==(r||Ce(e,t.line)).text.length?t.line=0;--i)Sl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Sl(e,t)}}function Sl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Ne(t.from,t.to)==0)){var n=Wi(e,t);dl(e,t,n,e.cm?e.cm.curOp.id:NaN),mn(e,t,n,pi(e,t));var r=[];gr(e,function(i,a){!a&&he(r,i.history)==-1&&(Ll(i.history,t),r.push(i.history)),mn(i,t,null,pi(i,t))})}}function Vn(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,l=e.sel,o=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,s=0;s=0;--F){var H=L(F);if(H)return H.v}}}}function Fl(e,t){if(t!=0&&(e.first+=t,e.sel=new Ut(ft(e.sel.ranges,function(i){return new We($(i.anchor.line+t,i.anchor.ch),$(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Et(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:$(a,Ce(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dr(e,t.from,t.to),n||(n=Wi(e,t)),e.cm?Du(e.cm,t,r):ji(e,t,r),Jn(e,n,Ee),e.cantEdit&&Qn(e,$(e.firstLine(),0))&&(e.cantEdit=!1)}}function Du(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,o=!1,u=a.line;e.options.lineWrapping||(u=je(Qt(Ce(r,a.line))),r.iter(u,l.line+1,function(F){if(F==i.maxLine)return o=!0,!0})),r.sel.contains(t.from,t.to)>-1&&p(e),ji(r,t,n,qa(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(F){var H=Hn(F);H>i.maxLineLength&&(i.maxLine=F,i.maxLineLength=H,i.maxLineChanged=!0,o=!1)}),o&&(e.curOp.updateMaxLine=!0)),so(r,a.line),pn(e,400);var s=t.text.length-(l.line-a.line)-1;t.full?Et(e):a.line==l.line&&t.text.length==1&&!sl(e.doc,t)?cr(e,a.line,"text"):Et(e,a.line,l.line+1,s);var m=v(e,"changes"),b=v(e,"change");if(b||m){var L={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};b&&ht(e,"change",e,L),m&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(L)}e.display.selForContextMenu=null}function Gr(e,t,n,r,i){var a;r||(r=n),Ne(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),qr(e,{from:n,to:r,text:t,origin:i})}function Al(e,t,n,r){n1||!(this.children[0]instanceof yn))){var o=[];this.collapse(o),this.children=[new yn(o)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,o=l;o10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=m,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Et(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bl(e.doc)),e&&ht(e,"markerCleared",e,this,r,i),t&&Tr(e),this.parent&&this.parent.clear()}},vr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Ae("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ba(e,t.line,t,n,a)||t.line!=n.line&&ba(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");co()}a.addToHistory&&dl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var o=t.line,u=e.cm,s;if(e.iter(o,n.line+1,function(b){u&&a.collapsed&&!u.options.lineWrapping&&Qt(b)==u.display.maxLine&&(s=!0),a.collapsed&&o!=t.line&&$t(b,0),po(b,new Nn(a,o==t.line?t.ch:null,o==n.line?n.ch:null)),++o}),a.collapsed&&e.iter(t.line,n.line+1,function(b){fr(e,b)&&$t(b,0)}),a.clearOnEnter&&C(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(fo(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Bl,a.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),a.collapsed)Et(u,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var m=t.line;m<=n.line;m++)cr(u,m,"text");a.atomic&&bl(u.doc),ht(u,"markerAdded",u,a)}return a}var Cn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;u--)qr(this,r[u]);o?xl(this,o):this.cm&&Rr(this.cm)}),undo:pt(function(){Vn(this,"undo")}),redo:pt(function(){Vn(this,"redo")}),undoSelection:pt(function(){Vn(this,"undo",!0)}),redoSelection:pt(function(){Vn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Oe(this,e),t=Oe(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var l=a.markedSpans;if(l)for(var o=0;o=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!n||n(u.marker))&&r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n}),Oe(this,$(n,t))},indexFromPos:function(e){e=Oe(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var m=e.dataTransfer.getData("Text");if(m){var b;if(t.state.draggingText&&!t.state.draggingText.copy&&(b=t.listSelections()),Jn(t.doc,dr(n,n)),b)for(var L=0;L=0;o--)Gr(e.doc,"",r[o].from,r[o].to,"+delete");Rr(e)})}function Xi(e,t,n){var r=yr(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Yi(e,t,n){var r=Xi(e,t.ch,n);return r==null?null:new $(t.line,r,n<0?"after":"before")}function Zi(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=f(n,t.doc.direction);if(a){var l=i<0?Se(a):a[0],o=i<0==(l.level==1),u=o?"after":"before",s;if(l.level>0||t.doc.direction=="rtl"){var m=_r(t,n);s=i<0?n.text.length-1:0;var b=er(t,m,s).top;s=rr(function(L){return er(t,m,L).top==b},i<0==(l.level==1)?l.from:l.to-1,s),u=="before"&&(s=Xi(n,s,1))}else s=i<0?l.to:l.from;return new $(r,s,u)}}return new $(r,i<0?n.text.length:0,i<0?"before":"after")}function Iu(e,t,n,r){var i=f(t,e.doc.direction);if(!i)return Yi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=ge(i,n.ch,n.sticky),l=i[a];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&L>=m.begin)){var F=b?"before":"after";return new $(n.line,L,F)}}var H=function(ue,ve,se){for(var xe=function(Ze,gt){return gt?new $(n.line,o(Ze,1),"before"):new $(n.line,Ze,"after")};ue>=0&&ue0==(Fe.level!=1),Ie=ke?se.begin:o(se.end,-1);if(Fe.from<=Ie&&Ie0?m.end:o(m.begin,-1);return ee!=null&&!(r>0&&ee==t.text.length)&&(U=H(r>0?0:i.length-1,r,s(ee)),U)?U:null}var Sn={selectAll:wl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ee)},killLine:function(e){return Yr(e,function(t){if(t.empty()){var n=Ce(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new $(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),$(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ce(e.doc,i.line-1).text;l&&(i=new $(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),$(i.line-1,l.length-1),i,"+transpose"))}}n.push(new We(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return _t(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&Ne(t,this.pos)==0&&n==this.button};var An,En;function Uu(e,t){var n=+new Date;return En&&En.compare(n,e,t)?(An=En=null,"triple"):An&&An.compare(n,e,t)?(En=new Ji(n,e,t),An=null,"double"):(An=new Ji(n,e,t),En=null,"single")}function Xl(e){var t=this,n=t.display;if(!(g(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,or(n,e)){B||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Qi(t,e)){var r=Sr(t,e),i=Z(e),a=r?Uu(r,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ju(t,i,r,a,e))&&(i==1?r?Gu(t,r,a,e):K(e)==n.scroller&&h(e):i==2?(r&&$n(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):Mi(t)))}}}function ju(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Fn(e,zl(a,i),i,function(l){if(typeof l=="string"&&(l=Sn[l]),!l)return!1;var o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),o=l(e,n)!=Le}finally{e.state.suppressEdits=!1}return o})}function qu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=P?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=I?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(I?n.altKey:n.ctrlKey)),i}function Gu(e,t,n,r){S?setTimeout(St(Ya,e),0):e.curOp.focus=G();var i=qu(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&V&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(Ne((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(Ne(l.to(),t)>0||t.xRel<0)?Ku(e,r,t,i):Xu(e,r,t,i)}function Ku(e,t,n,r){var i=e.display,a=!1,l=dt(e,function(s){B&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Mi(e)),E(i.wrapper.ownerDocument,"mouseup",l),E(i.wrapper.ownerDocument,"mousemove",o),E(i.scroller,"dragstart",u),E(i.scroller,"drop",l),a||(h(s),r.addNew||$n(e.doc,n,null,null,r.extend),B&&!R||S&&A==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),o=function(s){a=a||Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)>=10},u=function(){return a=!0};B&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,C(i.wrapper.ownerDocument,"mouseup",l),C(i.wrapper.ownerDocument,"mousemove",o),C(i.scroller,"dragstart",u),C(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Yl(e,t,n){if(n=="char")return new We(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new We($(t.line,0),Oe(e.doc,$(t.line+1,0)));var r=n(e,t);return new We(r.from,r.to)}function Xu(e,t,n,r){S&&Mi(e);var i=e.display,a=e.doc;h(t);var l,o,u=a.sel,s=u.ranges;if(r.addNew&&!r.extend?(o=a.sel.contains(n),o>-1?l=s[o]:l=new We(n,n)):(l=a.sel.primary(),o=a.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new We(n,n)),n=Sr(e,t,!0,!0),o=-1;else{var m=Yl(e,n,r.unit);r.extend?l=Gi(l,m.anchor,m.head,r.extend):l=m}r.addNew?o==-1?(o=s.length,bt(a,Kt(e,s.concat([l]),o),{scroll:!1,origin:"*mouse"})):s.length>1&&s[o].empty()&&r.unit=="char"&&!r.extend?(bt(a,Kt(e,s.slice(0,o).concat(s.slice(o+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Ki(a,o,l,rt):(o=0,bt(a,new Ut([l],0),rt),u=a.sel);var b=n;function L(se){if(Ne(b,se)!=0)if(b=se,r.unit=="rectangle"){for(var xe=[],Fe=e.options.tabSize,ke=k(Ce(a,n.line).text,n.ch,Fe),Ie=k(Ce(a,se.line).text,se.ch,Fe),Ze=Math.min(ke,Ie),gt=Math.max(ke,Ie),Qe=Math.min(n.line,se.line),Ht=Math.min(e.lastLine(),Math.max(n.line,se.line));Qe<=Ht;Qe++){var Tt=Ce(a,Qe).text,lt=pe(Tt,Ze,Fe);Ze==gt?xe.push(new We($(Qe,lt),$(Qe,lt))):Tt.length>lt&&xe.push(new We($(Qe,lt),$(Qe,pe(Tt,gt,Fe))))}xe.length||xe.push(new We(n,n)),bt(a,Kt(e,u.ranges.slice(0,o).concat(xe),o),{origin:"*mouse",scroll:!1}),e.scrollIntoView(se)}else{var Bt=l,mt=Yl(e,se,r.unit),st=Bt.anchor,ot;Ne(mt.anchor,st)>0?(ot=mt.head,st=Bn(Bt.from(),mt.anchor)):(ot=mt.anchor,st=Tn(Bt.to(),mt.head));var tt=u.ranges.slice(0);tt[o]=Yu(e,new We(Oe(a,st),ot)),bt(a,Kt(e,tt,o),rt)}}var F=i.wrapper.getBoundingClientRect(),H=0;function U(se){var xe=++H,Fe=Sr(e,se,!0,r.unit=="rectangle");if(!!Fe)if(Ne(Fe,b)!=0){e.curOp.focus=G(),L(Fe);var ke=qn(i,a);(Fe.line>=ke.to||Fe.lineF.bottom?20:0;Ie&&setTimeout(dt(e,function(){H==xe&&(i.scroller.scrollTop+=Ie,U(se))}),50)}}function ee(se){e.state.selectingText=!1,H=Infinity,se&&(h(se),i.input.focus()),E(i.wrapper.ownerDocument,"mousemove",ue),E(i.wrapper.ownerDocument,"mouseup",ve),a.history.lastSelOrigin=null}var ue=dt(e,function(se){se.buttons===0||!Z(se)?ee(se):U(se)}),ve=dt(e,ee);e.state.selectingText=ve,C(i.wrapper.ownerDocument,"mousemove",ue),C(i.wrapper.ownerDocument,"mouseup",ve)}function Yu(e,t){var n=t.anchor,r=t.head,i=Ce(e.doc,n.line);if(Ne(n,r)==0&&n.sticky==r.sticky)return t;var a=f(i);if(!a)return t;var l=ge(a,n.ch,n.sticky),o=a[l];if(o.from!=n.ch&&o.to!=n.ch)return t;var u=l+(o.from==n.ch==(o.level!=1)?0:1);if(u==0||u==a.length)return t;var s;if(r.line!=n.line)s=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var m=ge(a,r.ch,r.sticky),b=m-l||(r.ch-n.ch)*(o.level==1?-1:1);m==u-1||m==u?s=b<0:s=b>0}var L=a[u+(s?-1:0)],F=s==(L.level==1),H=F?L.from:L.to,U=F?"after":"before";return n.ch==H&&n.sticky==U?t:new We(new $(n.line,H,U),r)}function Zl(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(L){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&h(t);var l=e.display,o=l.lineDiv.getBoundingClientRect();if(a>o.bottom||!v(e,n))return D(t);a-=o.top-l.viewOffset;for(var u=0;u=i){var m=Cr(e.doc,a),b=e.display.gutterSpecs[u];return _(e,n,e,m,b.className,t),D(t)}}}function Qi(e,t){return Zl(e,t,"gutterClick",!0)}function $l(e,t){or(e.display,t)||Zu(e,t)||g(e,t,"contextmenu")||fe||e.display.input.onContextMenu(t)}function Zu(e,t){return v(e,"gutterContextMenu")?Zl(e,t,"gutterContextMenu",!1):!1}function Jl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),un(e)}var Zr={toString:function(){return"CodeMirror.Init"}},Ql={},ni={};function $u(e){var t=e.optionHandlers;function n(r,i,a,l){e.defaults[r]=i,a&&(t[r]=l?function(o,u,s){s!=Zr&&a(o,u,s)}:a)}e.defineOption=n,e.Init=Zr,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Ui(r)},!0),n("indentUnit",2,Ui,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){vn(r),un(r),Et(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],l=r.doc.first;r.doc.iter(function(u){for(var s=0;;){var m=u.text.indexOf(i,s);if(m==-1)break;s=m+i.length,a.push($(l,m))}l++});for(var o=a.length-1;o>=0;o--)Gr(r.doc,i,a[o],$(a[o].line,a[o].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,i,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Zr&&r.refresh()}),n("specialCharPlaceholder",So,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ye?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!te),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Jl(r),gn(r)},!0),n("keyMap","default",function(r,i,a){var l=ti(i),o=a!=Zr&&ti(a);o&&o.detach&&o.detach(r,l),l.attach&&l.attach(r,o||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Qu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ri(i,r.options.lineNumbers),gn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Li(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Wr(r)},!0),n("scrollbarStyle","native",function(r){el(r),Wr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ri(r.options.gutters,i),gn(r)},!0),n("firstLineNumber",1,gn,!0),n("lineNumberFormatter",function(r){return r},gn,!0),n("showCursorWhenSelecting",!1,sn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Pr(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Ju),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,sn,!0),n("singleCursorHeightPerLine",!0,sn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,vn,!0),n("addModeClass",!1,vn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,vn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Ju(e,t,n){var r=n&&n!=Zr;if(!t!=!r){var i=e.display.dragFunctions,a=t?C:E;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Qu(e){e.options.lineWrapping?(de(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ie(e.display.wrapper,"CodeMirror-wrap"),xi(e)),Ti(e),Et(e),un(e),setTimeout(function(){return Wr(e)},100)}function $e(e,t){var n=this;if(!(this instanceof $e))return new $e(e,t);this.options=t=t?Ye(t):{},Ye(Ql,t,!1);var r=t.value;typeof r=="string"?r=new Lt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new $e.inputStyles[t.inputStyle](this),a=this.display=new cu(e,r,i,t);a.wrapper.CodeMirror=this,Jl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),el(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new d,keySeq:null,specialChars:null},t.autofocus&&!ye&&a.input.focus(),S&&A<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vu(this),Tu(),Lr(this),this.curOp.forceUpdate=!0,fl(this,r),t.autofocus&&!ye||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ni(n)},20):Pr(this);for(var l in ni)ni.hasOwnProperty(l)&&ni[l](this,t[l],Zr);nl(this),t.finishInit&&t.finishInit(this);for(var o=0;o20*20}C(t.scroller,"touchstart",function(u){if(!g(e,u)&&!a(u)&&!Qi(e,u)){t.input.ensurePolled(),clearTimeout(n);var s=+new Date;t.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),C(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),C(t.scroller,"touchend",function(u){var s=t.activeTouch;if(s&&!or(t,u)&&s.left!=null&&!s.moved&&new Date-s.start<300){var m=e.coordsChar(t.activeTouch,"page"),b;!s.prev||l(s,s.prev)?b=new We(m,m):!s.prev.prev||l(s,s.prev.prev)?b=e.findWordAt(m):b=new We($(m.line,0),Oe(e.doc,$(m.line+1,0))),e.setSelection(b.anchor,b.head),e.focus(),h(u)}i()}),C(t.scroller,"touchcancel",i),C(t.scroller,"scroll",function(){t.scroller.clientHeight&&(cn(e,t.scroller.scrollTop),Ar(e,t.scroller.scrollLeft,!0),_(e,"scroll",e))}),C(t.scroller,"mousewheel",function(u){return ll(e,u)}),C(t.scroller,"DOMMouseScroll",function(u){return ll(e,u)}),C(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){g(e,u)||w(u)},over:function(u){g(e,u)||(Lu(e,u),w(u))},start:function(u){return Eu(e,u)},drop:dt(e,Au),leave:function(u){g(e,u)||Ol(e)}};var o=t.input.getField();C(o,"keyup",function(u){return Gl.call(e,u)}),C(o,"keydown",dt(e,ql)),C(o,"keypress",dt(e,Kl)),C(o,"focus",function(u){return Ni(e,u)}),C(o,"blur",function(u){return Pr(e,u)})}var Vi=[];$e.defineInitHook=function(e){return Vi.push(e)};function Ln(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=rn(e,t).state:n="prev");var l=e.options.tabSize,o=Ce(i,t),u=k(o.text,null,l);o.stateAfter&&(o.stateAfter=null);var s=o.text.match(/^\s*/)[0],m;if(!r&&!/\S/.test(o.text))m=0,n="not";else if(n=="smart"&&(m=i.mode.indent(a,o.text.slice(s.length),o.text),m==Le||m>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?m=k(Ce(i,t-1).text,null,l):m=0:n=="add"?m=u+e.options.indentUnit:n=="subtract"?m=u-e.options.indentUnit:typeof n=="number"&&(m=u+n),m=Math.max(0,m);var b="",L=0;if(e.options.indentWithTabs)for(var F=Math.floor(m/l);F;--F)L+=l,b+=" ";if(Ll,u=Te(t),s=null;if(o&&r.ranges.length>1)if(Xt&&Xt.text.join(` `)==t){if(r.ranges.length%Xt.text.length==0){s=[];for(var m=0;m=0;L--){var F=r.ranges[L],H=F.from(),U=F.to();F.empty()&&(n&&n>0?H=$(H.line,H.ch-n):e.state.overwrite&&!o?U=$(U.line,Math.min(Ce(a,U.line).text.length,U.ch+Se(u).length)):o&&Xt&&Xt.lineWise&&Xt.text.join(` `)==u.join(` `)&&(H=U=$(H.line,0)));var ee={from:H,to:U,text:s?s[L%s.length]:u,origin:i||(o?"paste":e.state.cutIncoming>l?"cut":"+input")};qr(e.doc,ee),ht(e,"inputRead",e,ee)}t&&!o&&eo(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=b),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Vl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&_t(t,function(){return ea(t,n,0,null,"paste")}),!0}function eo(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var o=0;o-1){l=Ln(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ln(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function to(e){for(var t=[],n=[],r=0;ra&&(Ln(this,o.head.line,r,!0),a=o.head.line,l==this.doc.sel.primIndex&&Rr(this));else{var u=o.from(),s=o.to(),m=Math.max(a,u.line);a=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var b=m;b0&&Ki(this.doc,l,new We(u,L[l].to()),Ee)}}}),getTokenAt:function(r,i){return ca(this,r,i)},getLineTokens:function(r,i){return ca(this,$(r),i,!0)},getTokenTypeAt:function(r){r=Oe(this.doc,r);var i=ua(this,Ce(this.doc,r.line)),a=0,l=(i.length-1)/2,o=r.ch,u;if(o==0)u=i[2];else for(;;){var s=a+l>>1;if((s?i[s*2-1]:0)>=o)l=s;else if(i[s*2+1]u&&(r=u,l=!0),o=Ce(this.doc,r)}else o=r;return Rn(this,o,{top:0,left:0},i||"page",a||l).top+(l?this.doc.height-lr(o):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return zr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,l,o){var u=this.display;r=Gt(this,Oe(this.doc,r));var s=r.bottom,m=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),l=="over")s=r.top;else if(l=="above"||l=="near"){var b=Math.max(u.wrapper.clientHeight,this.doc.height),L=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>b)&&r.top>i.offsetHeight?s=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=b&&(s=r.bottom),m+i.offsetWidth>L&&(m=L-i.offsetWidth)}i.style.top=s+"px",i.style.left=i.style.right="",o=="right"?(m=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(o=="left"?m=0:o=="middle"&&(m=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=m+"px"),a&&Jo(this,{left:m,top:s,right:m+i.offsetWidth,bottom:s+i.offsetHeight})},triggerOnKeyDown:wt(ql),triggerOnKeyPress:wt(Kl),triggerOnKeyUp:Gl,triggerOnMouseDown:wt(Xl),execCommand:function(r){if(Sn.hasOwnProperty(r))return Sn[r].call(null,this)},triggerElectric:wt(function(r){eo(this,r)}),findPosH:function(r,i,a,l){var o=1;i<0&&(o=-1,i=-i);for(var u=Oe(this.doc,r),s=0;s0&&m(a.charAt(l-1));)--l;for(;o.5||this.options.lineWrapping)&&Ti(this),_(this,"refresh",this)}),swapDoc:wt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),fl(this,r),un(this),this.display.input.reset(),fn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ht(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},c(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,l){e.registerHelper(r,i,l),n[r]._global.push({pred:a,val:l})}}function ta(e,t,n,r,i){var a=t,l=n,o=Ce(e,t.line),u=i&&e.direction=="rtl"?-n:n;function s(){var ve=t.line+u;return ve=e.first+e.size?!1:(t=new $(ve,t.ch,t.sticky),o=Ce(e,ve))}function m(ve){var se;if(r=="codepoint"){var xe=o.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(xe))se=null;else{var Fe=n>0?xe>=55296&&xe<56320:xe>=56320&&xe<57343;se=new $(t.line,Math.max(0,Math.min(o.text.length,t.ch+n*(Fe?2:1))),-n)}}else i?se=Iu(e.cm,o,t,n):se=Yi(o,t,n);if(se==null)if(!ve&&s())t=Zi(i,e.cm,o,t.line,u);else return!1;else t=se;return!0}if(r=="char"||r=="codepoint")m();else if(r=="column")m(!0);else if(r=="word"||r=="group")for(var b=null,L=r=="group",F=e.cm&&e.cm.getHelper(t,"wordChars"),H=!0;!(n<0&&!m(!H));H=!1){var U=o.text.charAt(t.ch)||` `,ee=Ft(U,F)?"w":L&&U==` `?"n":!L||/\s/.test(U)?null:"p";if(L&&!H&&!ee&&(ee="s"),b&&b!=ee){n<0&&(n=1,m(),t.sticky="after");break}if(ee&&(b=ee),n>0&&!m(!H))break}var ue=Qn(e,t,a,l,!0);return fi(a,ue)&&(ue.hitSide=!0),ue}function io(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var o=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(o-.5*Hr(e.display),3);l=(n>0?t.bottom:t.top)+n*u}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var s;s=Fi(e,a,l),!!s.outside;){if(n<0?l<=0:l>=i.height){s.hitSide=!0;break}l+=n*5}return s}var qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new d,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,ro(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(o){for(var u=o.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}C(i,"paste",function(o){!a(o)||g(r,o)||Vl(o,r)||A<=11&&setTimeout(dt(r,function(){return t.updateFromDOM()}),20)}),C(i,"compositionstart",function(o){t.composing={data:o.data,done:!1}}),C(i,"compositionupdate",function(o){t.composing||(t.composing={data:o.data,done:!1})}),C(i,"compositionend",function(o){t.composing&&(o.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),C(i,"touchstart",function(){return n.forceCompositionEnd()}),C(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(o){if(!(!a(o)||g(r,o))){if(r.somethingSelected())ii({lineWise:!1,text:r.getSelections()}),o.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var u=to(r);ii({lineWise:!0,text:u.text}),o.type=="cut"&&r.operation(function(){r.setSelections(u.ranges,0,Ee),r.replaceSelection("",null,"cut")})}else return;if(o.clipboardData){o.clipboardData.clearData();var s=Xt.text.join(` `);if(o.clipboardData.setData("Text",s),o.clipboardData.getData("Text")==s){o.preventDefault();return}}var m=no(),b=m.firstChild;r.display.lineSpace.insertBefore(m,r.display.lineSpace.firstChild),b.value=Xt.text.join(` `);var L=G();Ve(b),setTimeout(function(){r.display.lineSpace.removeChild(m),L.focus(),L==i&&n.showPrimarySelection()},50)}}C(i,"copy",l),C(i,"cut",l)},qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qe.prototype.prepareSelection=function(){var e=Ka(this.cm,!1);return e.focus=G()==this.div,e},qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ao(t,r)||{node:o[0].measure.map[2],offset:0},s=i.linee.firstLine()&&(r=$(r.line-1,Ce(e.doc,r.line-1).length)),i.ch==Ce(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,l,o;r.line==t.viewFrom||(a=Fr(e,r.line))==0?(l=je(t.view[0].line),o=t.view[0].node):(l=je(t.view[a].line),o=t.view[a-1].node.nextSibling);var u=Fr(e,i.line),s,m;if(u==t.view.length-1?(s=t.viewTo-1,m=t.lineDiv.lastChild):(s=je(t.view[u+1].line)-1,m=t.view[u+1].node.previousSibling),!o)return!1;for(var b=e.doc.splitLines(rs(e,o,m,l,s)),L=Dr(e.doc,$(l,0),$(s,Ce(e.doc,s).text.length));b.length>1&&L.length>1;)if(Se(b)==Se(L))b.pop(),L.pop(),s--;else if(b[0]==L[0])b.shift(),L.shift(),l++;else break;for(var F=0,H=0,U=b[0],ee=L[0],ue=Math.min(U.length,ee.length);Fr.ch&&ve.charCodeAt(ve.length-H-1)==se.charCodeAt(se.length-H-1);)F--,H++;b[b.length-1]=ve.slice(0,ve.length-H).replace(/^\u200b+/,""),b[0]=b[0].slice(F).replace(/\u200b+$/,"");var Fe=$(l,F),ke=$(s,L.length?Se(L).length-H:0);if(b.length>1||b[0]||Ne(Fe,ke))return Gr(e.doc,b,Fe,ke,"+input"),!0},qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},qe.prototype.reset=function(){this.forceCompositionEnd()},qe.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&_t(this.cm,function(){return Et(e.cm)})},qe.prototype.setUneditable=function(e){e.contentEditable="false"},qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||dt(this.cm,ea)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},qe.prototype.onContextMenu=function(){},qe.prototype.resetPosition=function(){},qe.prototype.needsContentAttribute=!0;function ao(e,t){var n=Ci(e,t.line);if(!n||n.hidden)return null;var r=Ce(e.doc,t.line),i=Ma(n,r,t.line),a=f(r,e.doc.direction),l="left";if(a){var o=ge(a,t.ch);l=o%2?"right":"left"}var u=Ia(i.map,t.ch,l);return u.offset=u.collapse=="right"?u.end:u.start,u}function ts(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function $r(e,t){return t&&(e.bad=!0),e}function rs(e,t,n,r,i){var a="",l=!1,o=e.doc.lineSeparator(),u=!1;function s(F){return function(H){return H.id==F}}function m(){l&&(a+=o,u&&(a+=o),l=u=!1)}function b(F){F&&(m(),a+=F)}function L(F){if(F.nodeType==1){var H=F.getAttribute("cm-text");if(H){b(H);return}var U=F.getAttribute("cm-marker"),ee;if(U){var ue=e.findMarks($(r,0),$(i+1,0),s(+U));ue.length&&(ee=ue[0].find(0))&&b(Dr(e.doc,ee.from,ee.to).join(o));return}if(F.getAttribute("contenteditable")=="false")return;var ve=/^(pre|div|p|li|table|br)$/i.test(F.nodeName);if(!/^br$/i.test(F.nodeName)&&F.textContent.length==0)return;ve&&m();for(var se=0;se=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),C(i,"paste",function(l){g(r,l)||Vl(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(l){if(!g(r,l)){if(r.somethingSelected())ii({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var o=to(r);ii({lineWise:!0,text:o.text}),l.type=="cut"?r.setSelections(o.ranges,null,Ee):(n.prevInput="",i.value=o.text.join(` `),Ve(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}C(i,"cut",a),C(i,"copy",a),C(e.scroller,"paste",function(l){if(!(or(e,l)||g(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var o=new Event("paste");o.clipboardData=l.clipboardData,i.dispatchEvent(o)}}),C(e.lineSpace,"selectstart",function(l){or(e,l)||h(l)}),C(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),C(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},at.prototype.createField=function(e){this.wrapper=no(),this.textarea=this.wrapper.firstChild},at.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},at.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ka(e);if(e.options.moveInputWithCursor){var i=Gt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},at.prototype.showSelection=function(e){var t=this.cm,n=t.display;ne(n.cursorDiv,e.cursors),ne(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},at.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ve(this.textarea),S&&A>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",S&&A>=9&&(this.hasSelection=null))}},at.prototype.getField=function(){return this.textarea},at.prototype.supportsTouch=function(){return!1},at.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ye||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},at.prototype.blur=function(){this.textarea.blur()},at.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},at.prototype.receivedFocus=function(){this.slowPoll()},at.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},at.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},at.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(S&&A>=9&&this.hasSelection===i||I&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,o=Math.min(r.length,i.length);l1e3||i.indexOf(` `)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},at.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},at.prototype.onKeyPress=function(){S&&A>=9&&(this.hasSelection=null),this.fastPoll()},at.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Sr(n,e),l=r.scroller.scrollTop;if(!a||z)return;var o=n.options.resetSelectionOnContextMenu;o&&n.doc.sel.contains(a)==-1&&dt(n,bt)(n.doc,dr(a),Ee);var u=i.style.cssText,s=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+`px; z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var b;B&&(b=window.scrollY),r.input.focus(),B&&window.scrollTo(null,b),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=F,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function L(){if(i.selectionStart!=null){var U=n.somethingSelected(),ee="\u200B"+(U?i.value:"");i.value="\u21DA",i.value=ee,t.prevInput=U?"":"\u200B",i.selectionStart=1,i.selectionEnd=ee.length,r.selForContextMenu=n.doc.sel}}function F(){if(t.contextMenuPending==F&&(t.contextMenuPending=!1,t.wrapper.style.cssText=s,i.style.cssText=u,S&&A<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!S||S&&A<9)&&L();var U=0,ee=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?dt(n,wl)(n):U++<10?r.detectingSelectAll=setTimeout(ee,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ee,200)}}if(S&&A>=9&&L(),fe){w(e);var H=function(){E(window,"mouseup",H),setTimeout(F,20)};C(window,"mouseup",H)}else setTimeout(F,50)},at.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},at.prototype.setUneditable=function(){},at.prototype.needsContentAttribute=!1;function is(e,t){if(t=t?Ye(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=G();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=o.getValue()}var i;if(e.form&&(C(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch(u){}}t.finishInit=function(u){u.save=r,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,r(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(E(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var o=$e(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return o}function as(e){e.off=E,e.on=C,e.wheelEventPixels=hu,e.Doc=Lt,e.splitLines=Te,e.countColumn=k,e.findColumn=pe,e.isWordChar=ct,e.Pass=Le,e.signal=_,e.Line=Or,e.changeEnd=pr,e.scrollbarModel=Va,e.Pos=$,e.cmpPos=Ne,e.modes=Ke,e.mimeModes=Ue,e.resolveMode=Je,e.getMode=Rt,e.modeExtensions=Ct,e.extendMode=qt,e.copyState=At,e.startState=en,e.innerMode=ir,e.commands=Sn,e.keyMap=ur,e.keyName=Pl,e.isModifierKey=Hl,e.lookupKey=Xr,e.normalizeKeyMap=Ou,e.StringStream=et,e.SharedTextMarker=Cn,e.TextMarker=vr,e.LineWidget=Dn,e.e_preventDefault=h,e.e_stopPropagation=x,e.e_stop=w,e.addClass=de,e.contains=Q,e.rmClass=ie,e.keyNames=mr}$u($e),es($e);var ls="iter insert remove copy getEditor constructor".split(" ");for(var li in Lt.prototype)Lt.prototype.hasOwnProperty(li)&&he(ls,li)<0&&($e.prototype[li]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lt.prototype[li]));return c(Lt),$e.inputStyles={textarea:at,contenteditable:qe},$e.defineMode=function(e){!$e.defaults.mode&&e!="null"&&($e.defaults.mode=e),Nr.apply(this,arguments)},$e.defineMIME=nr,$e.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),$e.defineMIME("text/plain","null"),$e.defineExtension=function(e,t){$e.prototype[e]=t},$e.defineDocExtension=function(e,t){Lt.prototype[e]=t},$e.fromTextArea=is,as($e),$e.version="5.61.0",$e})},"./node_modules/codemirror/mode/gfm/gfm.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"),we("./node_modules/codemirror/mode/markdown/markdown.js"),we("./node_modules/codemirror/addon/mode/overlay.js"))})(function(W){"use strict";var j=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;W.defineMode("gfm",function(T,N){var S=0;function A(z){return z.code=!1,null}var B={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(z){return{code:z.code,codeBlock:z.codeBlock,ateSpace:z.ateSpace}},token:function(z,R){if(R.combineTokens=null,R.codeBlock)return z.match(/^```+/)?(R.codeBlock=!1,null):(z.skipToEnd(),null);if(z.sol()&&(R.code=!1),z.sol()&&z.match(/^```+/))return z.skipToEnd(),R.codeBlock=!0,null;if(z.peek()==="`"){z.next();var ce=z.pos;z.eatWhile("`");var le=1+z.pos-ce;return R.code?le===S&&(R.code=!1):(S=le,R.code=!0),null}else if(R.code)return z.next(),null;if(z.eatSpace())return R.ateSpace=!0,null;if((z.sol()||R.ateSpace)&&(R.ateSpace=!1,N.gitHubSpice!==!1)){if(z.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return R.combineTokens=!0,"link";if(z.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return R.combineTokens=!0,"link"}return z.match(j)&&z.string.slice(z.start-2,z.start)!="]("&&(z.start==0||/\W/.test(z.string.charAt(z.start-1)))?(R.combineTokens=!0,"link"):(z.next(),null)},blankLine:A},q={taskLists:!0,strikethrough:!0,emoji:!0};for(var J in N)q[J]=N[J];return q.name="markdown",W.overlayMode(W.getMode(T,q),B)},"markdown"),W.defineMIME("text/x-gfm","gfm")})},"./node_modules/codemirror/mode/markdown/markdown.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"),we("./node_modules/codemirror/mode/xml/xml.js"),we("./node_modules/codemirror/mode/meta.js"))})(function(W){"use strict";W.defineMode("markdown",function(j,T){var N=W.getMode(j,"text/html"),S=N.name=="null";function A(k){if(W.findModeByName){var d=W.findModeByName(k);d&&(k=d.mime||d.mimes[0])}var he=W.getMode(j,k);return he.name=="null"?null:he}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var B={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var q in B)B.hasOwnProperty(q)&&T.tokenTypeOverrides[q]&&(B[q]=T.tokenTypeOverrides[q]);var J=/^([*\-_])(?:\s*\1){2,}\s*$/,z=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,R=/^\[(x| )\](?=\s)/i,ce=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,le=/^ {0,3}(?:\={1,}|-{2,})\s*$/,De=/^[^#!\[\]*_\\<>` "'(~:]+/,me=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ye=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,P=" ";function te(k,d,he){return d.f=d.inline=he,he(k,d)}function Y(k,d,he){return d.f=d.block=he,he(k,d)}function X(k){return!k||!/\S/.test(k.string)}function fe(k){if(k.linkTitle=!1,k.linkHref=!1,k.linkText=!1,k.em=!1,k.strong=!1,k.strikethrough=!1,k.quote=0,k.indentedCode=!1,k.f==ie){var d=S;if(!d){var he=W.innerMode(N,k.htmlState);d=he.mode.name=="xml"&&he.state.tagStart===null&&!he.state.context&&he.state.tokenize.isInText}d&&(k.f=Ae,k.block=re,k.htmlState=null)}return k.trailingSpace=0,k.trailingSpaceNewLine=!1,k.prevLine=k.thisLine,k.thisLine={stream:null},null}function re(k,d){var he=k.column()===d.indentation,Re=X(d.prevLine.stream),Le=d.indentedCode,Ee=d.prevLine.hr,rt=d.list!==!1,be=(d.listStack[d.listStack.length-1]||0)+3;d.indentedCode=!1;var pe=d.indentation;if(d.indentationDiff===null&&(d.indentationDiff=d.indentation,rt)){for(d.list=null;pe=4&&(Le||d.prevLine.fencedCodeEnd||d.prevLine.header||Re))return k.skipToEnd(),d.indentedCode=!0,B.code;if(k.eatSpace())return null;if(he&&d.indentation<=be&&(Se=k.match(ce))&&Se[1].length<=6)return d.quote=0,d.header=Se[1].length,d.thisLine.header=!0,T.highlightFormatting&&(d.formatting="header"),d.f=d.inline,ne(d);if(d.indentation<=be&&k.eat(">"))return d.quote=he?1:d.quote+1,T.highlightFormatting&&(d.formatting="quote"),k.eatSpace(),ne(d);if(!Pe&&!d.setext&&he&&d.indentation<=be&&(Se=k.match(z))){var ft=Se[1]?"ol":"ul";return d.indentation=pe+k.current().length,d.list=!0,d.quote=0,d.listStack.push(d.indentation),d.em=!1,d.strong=!1,d.code=!1,d.strikethrough=!1,T.taskLists&&k.match(R,!1)&&(d.taskList=!0),d.f=d.inline,T.highlightFormatting&&(d.formatting=["list","list-"+ft]),ne(d)}else{if(he&&d.indentation<=be&&(Se=k.match(me,!0)))return d.quote=0,d.fencedEndRE=new RegExp(Se[1]+"+ *$"),d.localMode=T.fencedCodeBlockHighlighting&&A(Se[2]||T.fencedCodeBlockDefaultMode),d.localMode&&(d.localState=W.startState(d.localMode)),d.f=d.block=Be,T.highlightFormatting&&(d.formatting="code-block"),d.code=-1,ne(d);if(d.setext||(!ut||!rt)&&!d.quote&&d.list===!1&&!d.code&&!Pe&&!ye.test(k.string)&&(Se=k.lookAhead(1))&&(Se=Se.match(le)))return d.setext?(d.header=d.setext,d.setext=0,k.skipToEnd(),T.highlightFormatting&&(d.formatting="header")):(d.header=Se[0].charAt(0)=="="?1:2,d.setext=d.header),d.thisLine.header=!0,d.f=d.inline,ne(d);if(Pe)return k.skipToEnd(),d.hr=!0,d.thisLine.hr=!0,B.hr;if(k.peek()==="[")return te(k,d,Ge)}return te(k,d,d.inline)}function ie(k,d){var he=N.token(k,d.htmlState);if(!S){var Re=W.innerMode(N,d.htmlState);(Re.mode.name=="xml"&&Re.state.tagStart===null&&!Re.state.context&&Re.state.tokenize.isInText||d.md_inside&&k.current().indexOf(">")>-1)&&(d.f=Ae,d.block=re,d.htmlState=null)}return he}function Be(k,d){var he=d.listStack[d.listStack.length-1]||0,Re=d.indentation=k.quote?d.push(B.formatting+"-"+k.formatting[he]+"-"+k.quote):d.push("error"))}if(k.taskOpen)return d.push("meta"),d.length?d.join(" "):null;if(k.taskClosed)return d.push("property"),d.length?d.join(" "):null;if(k.linkHref?d.push(B.linkHref,"url"):(k.strong&&d.push(B.strong),k.em&&d.push(B.em),k.strikethrough&&d.push(B.strikethrough),k.emoji&&d.push(B.emoji),k.linkText&&d.push(B.linkText),k.code&&d.push(B.code),k.image&&d.push(B.image),k.imageAltText&&d.push(B.imageAltText,"link"),k.imageMarker&&d.push(B.imageMarker)),k.header&&d.push(B.header,B.header+"-"+k.header),k.quote&&(d.push(B.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=k.quote?d.push(B.quote+"-"+k.quote):d.push(B.quote+"-"+T.maxBlockquoteDepth)),k.list!==!1){var Re=(k.listStack.length-1)%3;Re?Re===1?d.push(B.list2):d.push(B.list3):d.push(B.list1)}return k.trailingSpaceNewLine?d.push("trailing-space-new-line"):k.trailingSpace&&d.push("trailing-space-"+(k.trailingSpace%2?"a":"b")),d.length?d.join(" "):null}function ae(k,d){if(k.match(De,!0))return ne(d)}function Ae(k,d){var he=d.text(k,d);if(typeof he!="undefined")return he;if(d.list)return d.list=null,ne(d);if(d.taskList){var Re=k.match(R,!0)[1]===" ";return Re?d.taskOpen=!0:d.taskClosed=!0,T.highlightFormatting&&(d.formatting="task"),d.taskList=!1,ne(d)}if(d.taskOpen=!1,d.taskClosed=!1,d.header&&k.match(/^#+$/,!0))return T.highlightFormatting&&(d.formatting="header"),ne(d);var Le=k.next();if(d.linkTitle){d.linkTitle=!1;var Ee=Le;Le==="("&&(Ee=")"),Ee=(Ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rt="^\\s*(?:[^"+Ee+"\\\\]+|\\\\\\\\|\\\\.)"+Ee;if(k.match(new RegExp(rt),!0))return B.linkHref}if(Le==="`"){var be=d.formatting;T.highlightFormatting&&(d.formatting="code"),k.eatWhile("`");var pe=k.current().length;if(d.code==0&&(!d.quote||pe==1))return d.code=pe,ne(d);if(pe==d.code){var ut=ne(d);return d.code=0,ut}else return d.formatting=be,ne(d)}else if(d.code)return ne(d);if(Le==="\\"&&(k.next(),T.highlightFormatting)){var Pe=ne(d),Se=B.formatting+"-escape";return Pe?Pe+" "+Se:Se}if(Le==="!"&&k.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return d.imageMarker=!0,d.image=!0,T.highlightFormatting&&(d.formatting="image"),ne(d);if(Le==="["&&d.imageMarker&&k.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return d.imageMarker=!1,d.imageAltText=!0,T.highlightFormatting&&(d.formatting="image"),ne(d);if(Le==="]"&&d.imageAltText){T.highlightFormatting&&(d.formatting="image");var Pe=ne(d);return d.imageAltText=!1,d.image=!1,d.inline=d.f=Q,Pe}if(Le==="["&&!d.image)return d.linkText&&k.match(/^.*?\]/)||(d.linkText=!0,T.highlightFormatting&&(d.formatting="link")),ne(d);if(Le==="]"&&d.linkText){T.highlightFormatting&&(d.formatting="link");var Pe=ne(d);return d.linkText=!1,d.inline=d.f=k.match(/\(.*?\)| ?\[.*?\]/,!1)?Q:Ae,Pe}if(Le==="<"&&k.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=O,T.highlightFormatting&&(d.formatting="link");var Pe=ne(d);return Pe?Pe+=" ":Pe="",Pe+B.linkInline}if(Le==="<"&&k.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=O,T.highlightFormatting&&(d.formatting="link");var Pe=ne(d);return Pe?Pe+=" ":Pe="",Pe+B.linkEmail}if(T.xml&&Le==="<"&&k.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ft=k.string.indexOf(">",k.pos);if(ft!=-1){var Yt=k.string.substring(k.start,ft);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Yt)&&(d.md_inside=!0)}return k.backUp(1),d.htmlState=W.startState(N),Y(k,d,ie)}if(T.xml&&Le==="<"&&k.match(/^\/\w*?>/))return d.md_inside=!1,"tag";if(Le==="*"||Le==="_"){for(var jt=1,xt=k.pos==1?" ":k.string.charAt(k.pos-2);jt<3&&k.eat(Le);)jt++;var yt=k.peek()||" ",ct=!/\s/.test(yt)&&(!I.test(yt)||/\s/.test(xt)||I.test(xt)),Ft=!/\s/.test(xt)&&(!I.test(xt)||/\s/.test(yt)||I.test(yt)),nt=null,Nt=null;if(jt%2&&(!d.em&&ct&&(Le==="*"||!Ft||I.test(xt))?nt=!0:d.em==Le&&Ft&&(Le==="*"||!ct||I.test(yt))&&(nt=!1)),jt>1&&(!d.strong&&ct&&(Le==="*"||!Ft||I.test(xt))?Nt=!0:d.strong==Le&&Ft&&(Le==="*"||!ct||I.test(yt))&&(Nt=!1)),Nt!=null||nt!=null){T.highlightFormatting&&(d.formatting=nt==null?"strong":Nt==null?"em":"strong em"),nt===!0&&(d.em=Le),Nt===!0&&(d.strong=Le);var ut=ne(d);return nt===!1&&(d.em=!1),Nt===!1&&(d.strong=!1),ut}}else if(Le===" "&&(k.eat("*")||k.eat("_"))){if(k.peek()===" ")return ne(d);k.backUp(1)}if(T.strikethrough){if(Le==="~"&&k.eatWhile(Le)){if(d.strikethrough){T.highlightFormatting&&(d.formatting="strikethrough");var ut=ne(d);return d.strikethrough=!1,ut}else if(k.match(/^[^\s]/,!1))return d.strikethrough=!0,T.highlightFormatting&&(d.formatting="strikethrough"),ne(d)}else if(Le===" "&&k.match("~~",!0)){if(k.peek()===" ")return ne(d);k.backUp(2)}}if(T.emoji&&Le===":"&&k.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){d.emoji=!0,T.highlightFormatting&&(d.formatting="emoji");var Zt=ne(d);return d.emoji=!1,Zt}return Le===" "&&(k.match(/^ +$/,!1)?d.trailingSpace++:d.trailingSpace&&(d.trailingSpaceNewLine=!0)),ne(d)}function O(k,d){var he=k.next();if(he===">"){d.f=d.inline=Ae,T.highlightFormatting&&(d.formatting="link");var Re=ne(d);return Re?Re+=" ":Re="",Re+B.linkInline}return k.match(/^[^>]+/,!0),B.linkInline}function Q(k,d){if(k.eatSpace())return null;var he=k.next();return he==="("||he==="["?(d.f=d.inline=de(he==="("?")":"]"),T.highlightFormatting&&(d.formatting="link-string"),d.linkHref=!0,ne(d)):"error"}var G={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function de(k){return function(d,he){var Re=d.next();if(Re===k){he.f=he.inline=Ae,T.highlightFormatting&&(he.formatting="link-string");var Le=ne(he);return he.linkHref=!1,Le}return d.match(G[k]),he.linkHref=!0,ne(he)}}function Ge(k,d){return k.match(/^([^\]\\]|\\.)*\]:/,!1)?(d.f=Ve,k.next(),T.highlightFormatting&&(d.formatting="link"),d.linkText=!0,ne(d)):te(k,d,Ae)}function Ve(k,d){if(k.match("]:",!0)){d.f=d.inline=St,T.highlightFormatting&&(d.formatting="link");var he=ne(d);return d.linkText=!1,he}return k.match(/^([^\]\\]|\\.)+/,!0),B.linkText}function St(k,d){return k.eatSpace()?null:(k.match(/^[^\s]+/,!0),k.peek()===void 0?d.linkTitle=!0:k.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),d.f=d.inline=Ae,B.linkHref+" url")}var Ye={startState:function(){return{f:re,prevLine:{stream:null},thisLine:{stream:null},block:re,htmlState:null,indentation:0,inline:Ae,text:ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(k){return{f:k.f,prevLine:k.prevLine,thisLine:k.thisLine,block:k.block,htmlState:k.htmlState&&W.copyState(N,k.htmlState),indentation:k.indentation,localMode:k.localMode,localState:k.localMode?W.copyState(k.localMode,k.localState):null,inline:k.inline,text:k.text,formatting:!1,linkText:k.linkText,linkTitle:k.linkTitle,linkHref:k.linkHref,code:k.code,em:k.em,strong:k.strong,strikethrough:k.strikethrough,emoji:k.emoji,header:k.header,setext:k.setext,hr:k.hr,taskList:k.taskList,list:k.list,listStack:k.listStack.slice(0),quote:k.quote,indentedCode:k.indentedCode,trailingSpace:k.trailingSpace,trailingSpaceNewLine:k.trailingSpaceNewLine,md_inside:k.md_inside,fencedEndRE:k.fencedEndRE}},token:function(k,d){if(d.formatting=!1,k!=d.thisLine.stream){if(d.header=0,d.hr=!1,k.match(/^\s*$/,!0))return fe(d),null;if(d.prevLine=d.thisLine,d.thisLine={stream:k},d.taskList=!1,d.trailingSpace=0,d.trailingSpaceNewLine=!1,!d.localState&&(d.f=d.block,d.f!=ie)){var he=k.match(/^\s*/,!0)[0].replace(/\t/g,P).length;if(d.indentation=he,d.indentationDiff=null,he>0)return null}}return d.f(k,d)},innerMode:function(k){return k.block==ie?{state:k.htmlState,mode:N}:k.localState?{state:k.localState,mode:k.localMode}:{state:k,mode:Ye}},indent:function(k,d,he){return k.block==ie&&N.indent?N.indent(k.htmlState,d,he):k.localState&&k.localMode.indent?k.localMode.indent(k.localState,d,he):W.Pass},blankLine:fe,getType:ne,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ye},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},"./node_modules/codemirror/mode/meta.js":function(Xe,ze,we){(function(W){W(we("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var j=0;j-1&&N.substring(B+1,N.length);if(q)return W.findModeByExtension(q)},W.findModeByName=function(N){N=N.toLowerCase();for(var S=0;S")):null:O.match("--")?G(me("comment","-->")):O.match("DOCTYPE",!0,!0)?(O.eatWhile(/[\w\._\-]/),G(ye(1))):null:O.eat("?")?(O.eatWhile(/[\w\._\-]/),Q.tokenize=me("meta","?>"),"meta"):(z=O.eat("/")?"closeTag":"openTag",Q.tokenize=le,"tag bracket");if(de=="&"){var Ge;return O.eat("#")?O.eat("x")?Ge=O.eatWhile(/[a-fA-F\d]/)&&O.eat(";"):Ge=O.eatWhile(/[\d]/)&&O.eat(";"):Ge=O.eatWhile(/[\w\.\-:]/)&&O.eat(";"),Ge?"atom":"error"}else return O.eatWhile(/[^&<]/),null}ce.isInText=!0;function le(O,Q){var G=O.next();if(G==">"||G=="/"&&O.eat(">"))return Q.tokenize=ce,z=G==">"?"endTag":"selfcloseTag","tag bracket";if(G=="=")return z="equals",null;if(G=="<"){Q.tokenize=ce,Q.state=Y,Q.tagName=Q.tagStart=null;var de=Q.tokenize(O,Q);return de?de+" tag error":"tag error"}else return/[\'\"]/.test(G)?(Q.tokenize=De(G),Q.stringStartCol=O.column(),Q.tokenize(O,Q)):(O.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function De(O){var Q=function(G,de){for(;!G.eol();)if(G.next()==O){de.tokenize=le;break}return"string"};return Q.isInAttribute=!0,Q}function me(O,Q){return function(G,de){for(;!G.eol();){if(G.match(Q)){de.tokenize=ce;break}G.next()}return O}}function ye(O){return function(Q,G){for(var de;(de=Q.next())!=null;){if(de=="<")return G.tokenize=ye(O+1),G.tokenize(Q,G);if(de==">")if(O==1){G.tokenize=ce;break}else return G.tokenize=ye(O-1),G.tokenize(Q,G)}return"meta"}}function I(O,Q,G){this.prev=O.context,this.tagName=Q||"",this.indent=O.indented,this.startOfLine=G,(B.doNotIndent.hasOwnProperty(Q)||O.context&&O.context.noIndent)&&(this.noIndent=!0)}function P(O){O.context&&(O.context=O.context.prev)}function te(O,Q){for(var G;;){if(!O.context||(G=O.context.tagName,!B.contextGrabbers.hasOwnProperty(G)||!B.contextGrabbers[G].hasOwnProperty(Q)))return;P(O)}}function Y(O,Q,G){return O=="openTag"?(G.tagStart=Q.column(),X):O=="closeTag"?fe:Y}function X(O,Q,G){return O=="word"?(G.tagName=Q.current(),R="tag",Be):B.allowMissingTagName&&O=="endTag"?(R="tag bracket",Be(O,Q,G)):(R="error",X)}function fe(O,Q,G){if(O=="word"){var de=Q.current();return G.context&&G.context.tagName!=de&&B.implicitlyClosed.hasOwnProperty(G.context.tagName)&&P(G),G.context&&G.context.tagName==de||B.matchClosing===!1?(R="tag",re):(R="tag error",ie)}else return B.allowMissingTagName&&O=="endTag"?(R="tag bracket",re(O,Q,G)):(R="error",ie)}function re(O,Q,G){return O!="endTag"?(R="error",re):(P(G),Y)}function ie(O,Q,G){return R="error",re(O,Q,G)}function Be(O,Q,G){if(O=="word")return R="attribute",ne;if(O=="endTag"||O=="selfcloseTag"){var de=G.tagName,Ge=G.tagStart;return G.tagName=G.tagStart=null,O=="selfcloseTag"||B.autoSelfClosers.hasOwnProperty(de)?te(G,de):(te(G,de),G.context=new I(G,de,Ge==G.indented)),Y}return R="error",Be}function ne(O,Q,G){return O=="equals"?ae:(B.allowMissing||(R="error"),Be(O,Q,G))}function ae(O,Q,G){return O=="string"?Ae:O=="word"&&B.allowUnquoted?(R="string",Be):(R="error",Be(O,Q,G))}function Ae(O,Q,G){return O=="string"?Ae:Be(O,Q,G)}return{startState:function(O){var Q={tokenize:ce,state:Y,indented:O||0,tagName:null,tagStart:null,context:null};return O!=null&&(Q.baseIndent=O),Q},token:function(O,Q){if(!Q.tagName&&O.sol()&&(Q.indented=O.indentation()),O.eatSpace())return null;z=null;var G=Q.tokenize(O,Q);return(G||z)&&G!="comment"&&(R=null,Q.state=Q.state(z||G,O,Q),R&&(G=R=="error"?G+" error":R)),G},indent:function(O,Q,G){var de=O.context;if(O.tokenize.isInAttribute)return O.tagStart==O.indented?O.stringStartCol+1:O.indented+A;if(de&&de.noIndent)return W.Pass;if(O.tokenize!=le&&O.tokenize!=ce)return G?G.match(/^(\s*)/)[0].length:0;if(O.tagName)return B.multilineTagIndentPastTag!==!1?O.tagStart+O.tagName.length+2:O.tagStart+A*(B.multilineTagIndentFactor||1);if(B.alignCDATA&&/$/,blockCommentStart:"",configuration:B.htmlMode?"html":"xml",helperType:B.htmlMode?"html":"xml",skipAttribute:function(O){O.state==ae&&(O.state=Be)},xmlCurrentTag:function(O){return O.tagName?{name:O.tagName,close:O.type=="closeTag"}:null},xmlCurrentContext:function(O){for(var Q=[],G=O.context;G;G=G.prev)Q.push(G.tagName);return Q.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"./node_modules/easymde/src/js/codemirror/tablist.js":function(Xe,ze,we){var W=we("./node_modules/codemirror/lib/codemirror.js");W.commands.tabAndIndentMarkdownList=function(j){var T=j.listSelections(),N=T[0].head,S=j.getStateAfter(N.line),A=S.list!==!1;if(A){j.execCommand("indentMore");return}if(j.options.indentWithTabs)j.execCommand("insertTab");else{var B=Array(j.options.tabSize+1).join(" ");j.replaceSelection(B)}},W.commands.shiftTabAndUnindentMarkdownList=function(j){var T=j.listSelections(),N=T[0].head,S=j.getStateAfter(N.line),A=S.list!==!1;if(A){j.execCommand("indentLess");return}if(j.options.indentWithTabs)j.execCommand("insertTab");else{var B=Array(j.options.tabSize+1).join(" ");j.replaceSelection(B)}}},"./node_modules/easymde/src/js/easymde.js":function(Xe,ze,we){"use strict";var W=we("./node_modules/codemirror/lib/codemirror.js");we("./node_modules/codemirror/addon/edit/continuelist.js"),we("./node_modules/easymde/src/js/codemirror/tablist.js"),we("./node_modules/codemirror/addon/display/fullscreen.js"),we("./node_modules/codemirror/mode/markdown/markdown.js"),we("./node_modules/codemirror/addon/mode/overlay.js"),we("./node_modules/codemirror/addon/display/placeholder.js"),we("./node_modules/codemirror/addon/display/autorefresh.js"),we("./node_modules/codemirror/addon/selection/mark-selection.js"),we("./node_modules/codemirror/addon/search/searchcursor.js"),we("./node_modules/codemirror/mode/gfm/gfm.js"),we("./node_modules/codemirror/mode/xml/xml.js");var j=we("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),T=we("./node_modules/marked/lib/marked.js"),N=/Mac/.test(navigator.platform),S=new RegExp(/()+?/g),A={toggleBold:ie,toggleItalic:Be,drawLink:k,toggleHeadingSmaller:O,toggleHeadingBigger:Q,drawImage:d,toggleBlockquote:Ae,toggleOrderedList:St,toggleUnorderedList:Ve,toggleCodeBlock:ae,togglePreview:ut,toggleStrikethrough:ne,toggleHeading1:G,toggleHeading2:de,toggleHeading3:Ge,cleanBlock:Ye,drawTable:Le,drawHorizontalRule:Ee,undo:rt,redo:be,toggleSideBySide:pe,toggleFullScreen:re},B={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},q=function(f){for(var y in A)if(A[y]===f)return y;return null},J=function(){var f=!1;return function(y){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(y)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(y.substr(0,4)))&&(f=!0)}(navigator.userAgent||navigator.vendor||window.opera),f};function z(f){for(var y;(y=S.exec(f))!==null;){var C=y[0];if(C.indexOf("target=")===-1){var M=C.replace(/>$/,' target="_blank">');f=f.replace(C,M)}}return f}function R(f){for(var y=new DOMParser,C=y.parseFromString(f,"text/html"),M=C.getElementsByTagName("li"),E=0;E=0&&(h=g.getLineHandle(D),!C(h));D--);var oe=g.getTokenAt({line:D,ch:1}),Me=M(oe).fencedChars,_e,He,Te,it;C(g.getLineHandle(p.line))?(_e="",He=p.line):C(g.getLineHandle(p.line-1))?(_e="",He=p.line-1):(_e=Me+` `,He=p.line),C(g.getLineHandle(v.line))?(Te="",it=v.line,v.ch===0&&(it+=1)):v.ch!==0&&C(g.getLineHandle(v.line+1))?(Te="",it=v.line+1):(Te=Me+` `,it=v.line+1),v.ch===0&&(it-=1),g.operation(function(){g.replaceRange(Te,{line:it,ch:0},{line:it+(Te?0:1),ch:0}),g.replaceRange(_e,{line:He,ch:0},{line:He+(_e?0:1),ch:0})}),g.setSelection({line:He+(_e?1:0),ch:0},{line:it+(_e?1:-1),ch:0}),g.focus()}else{var Pt=p.line;if(C(g.getLineHandle(p.line))&&(E(g,p.line+1)==="fenced"?(D=p.line,Pt=p.line+1):(w=p.line,Pt=p.line-1)),D===void 0)for(D=Pt;D>=0&&(h=g.getLineHandle(D),!C(h));D--);if(w===void 0)for(K=g.lineCount(),w=Pt;w=0;D--)if(h=g.getLineHandle(D),!h.text.match(/^\s*$/)&&E(g,D,h)!=="indented"){D+=1;break}for(K=g.lineCount(),w=p.line;w\s+/,"unordered-list":C,"ordered-list":C},v=function(w,K){var Z={quote:">","unordered-list":"*","ordered-list":"%%i."};return Z[w].replace("%%i",K)},c=function(w,K){var Z={quote:">","unordered-list":"*","ordered-list":"\\d+."},V=new RegExp(Z[w]);return K&&V.test(K)},h=function(w,K,Z){var V=C.exec(K),oe=v(w,x);return V!==null?(c(w,V[2])&&(oe=""),K=V[1]+oe+V[3]+K.replace(M,"").replace(p[w],"$1")):Z==!1&&(K=oe+" "+K),K},x=1,D=_.line;D<=g.line;D++)(function(w){var K=f.getLine(w);E[y]?K=K.replace(p[y],"$1"):(y=="unordered-list"&&(K=h("ordered-list",K,!0)),K=h(y,K,!1),x+=1),f.replaceRange(K,{line:w,ch:0},{line:w,ch:99999999999999})})(D);f.focus()}}function Yt(f,y,C,M){if(!/editor-preview-active/.test(f.codemirror.getWrapperElement().lastChild.className)){M=typeof M=="undefined"?C:M;var E=f.codemirror,_=X(E),g,p=C,v=M,c=E.getCursor("start"),h=E.getCursor("end");_[y]?(g=E.getLine(c.line),p=g.slice(0,c.ch),v=g.slice(c.ch),y=="bold"?(p=p.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),v=v.replace(/(\*\*|__)/,"")):y=="italic"?(p=p.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),v=v.replace(/(\*|_)/,"")):y=="strikethrough"&&(p=p.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),v=v.replace(/(\*\*|~~)/,"")),E.replaceRange(p+v,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),y=="bold"||y=="strikethrough"?(c.ch-=2,c!==h&&(h.ch-=2)):y=="italic"&&(c.ch-=1,c!==h&&(h.ch-=1))):(g=E.getSelection(),y=="bold"?(g=g.split("**").join(""),g=g.split("__").join("")):y=="italic"?(g=g.split("*").join(""),g=g.split("_").join("")):y=="strikethrough"&&(g=g.split("~~").join("")),E.replaceSelection(p+g+v),c.ch+=C.length,h.ch=c.ch+g.length),E.setSelection(c,h),E.focus()}}function jt(f){if(!/editor-preview-active/.test(f.getWrapperElement().lastChild.className))for(var y=f.getCursor("start"),C=f.getCursor("end"),M,E=y.line;E<=C.line;E++)M=f.getLine(E),M=M.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),f.replaceRange(M,{line:E,ch:0},{line:E,ch:99999999999999})}function xt(f,y){if(Math.abs(f)<1024)return""+f+y[0];var C=0;do f/=1024,++C;while(Math.abs(f)>=1024&&C=19968?M+=C[E].length:M+=1;return M}var nt={bold:{name:"bold",action:ie,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:Be,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:ne,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:O,className:"fa fa-header fa-heading",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:O,className:"fa fa-header fa-heading header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Q,className:"fa fa-header fa-heading header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:G,className:"fa fa-header fa-heading header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:de,className:"fa fa-header fa-heading header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:Ge,className:"fa fa-header fa-heading header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:ae,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:Ae,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:Ve,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:St,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:Ye,className:"fa fa-eraser",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:k,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:d,className:"fa fa-image",title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:he,className:"fa fa-image",title:"Import an image"},table:{name:"table",action:Le,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Ee,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:ut,className:"fa fa-eye",noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:pe,className:"fa fa-columns",noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:re,className:"fa fa-arrows-alt",noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:"fa fa-question-circle",noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:rt,className:"fa fa-undo",noDisable:!0,title:"Undo"},redo:{name:"redo",action:be,className:"fa fa-repeat fa-redo",noDisable:!0,title:"Redo"}},Nt={link:["[","](#url#)"],image:["![](","#url#)"],uploadedImage:["![](#url#)",""],table:["",` | Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | | Text | Text | Text | `],horizontalRule:["",` ----- `]},Zt={link:"URL for the link:",image:"URL of the image:"},yr={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},rr={bold:"**",code:"```",italic:"*"},Vr={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},zt={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#). Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function ge(f){f=f||{},f.parent=this;var y=!0;if(f.autoDownloadFontAwesome===!1&&(y=!1),f.autoDownloadFontAwesome!==!0)for(var C=document.styleSheets,M=0;M-1&&(y=!1);if(y){var E=document.createElement("link");E.rel="stylesheet",E.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(E)}if(f.element)this.element=f.element;else if(f.element===null){console.log("EasyMDE: Error. No element was found.");return}if(f.toolbar===void 0){f.toolbar=[];for(var _ in nt)Object.prototype.hasOwnProperty.call(nt,_)&&(_.indexOf("separator-")!=-1&&f.toolbar.push("|"),(nt[_].default===!0||f.showIcons&&f.showIcons.constructor===Array&&f.showIcons.indexOf(_)!=-1)&&f.toolbar.push(_))}if(Object.prototype.hasOwnProperty.call(f,"previewClass")||(f.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(f,"status")||(f.status=["autosave","lines","words","cursor"],f.uploadImage&&f.status.unshift("upload-image")),f.previewRender||(f.previewRender=function(p){return this.parent.markdown(p)}),f.parsingConfig=ct({highlightFormatting:!0},f.parsingConfig||{}),f.insertTexts=ct({},Nt,f.insertTexts||{}),f.promptTexts=ct({},Zt,f.promptTexts||{}),f.blockStyles=ct({},rr,f.blockStyles||{}),f.autosave!=null&&(f.autosave.timeFormat=ct({},yr,f.autosave.timeFormat||{})),f.shortcuts=ct({},B,f.shortcuts||{}),f.maxHeight=f.maxHeight||void 0,typeof f.maxHeight!="undefined"?f.minHeight=f.maxHeight:f.minHeight=f.minHeight||"300px",f.errorCallback=f.errorCallback||function(p){alert(p)},f.uploadImage=f.uploadImage||!1,f.imageMaxSize=f.imageMaxSize||2097152,f.imageAccept=f.imageAccept||"image/png, image/jpeg",f.imageTexts=ct({},Vr,f.imageTexts||{}),f.errorMessages=ct({},zt,f.errorMessages||{}),f.autosave!=null&&f.autosave.unique_id!=null&&f.autosave.unique_id!=""&&(f.autosave.uniqueId=f.autosave.unique_id),f.overlayMode&&f.overlayMode.combine===void 0&&(f.overlayMode.combine=!0),this.options=f,this.render(),f.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(f.initialValue),f.uploadImage){var g=this;this.codemirror.on("dragenter",function(p,v){g.updateStatusBar("upload-image",g.options.imageTexts.sbOnDragEnter),v.stopPropagation(),v.preventDefault()}),this.codemirror.on("dragend",function(p,v){g.updateStatusBar("upload-image",g.options.imageTexts.sbInit),v.stopPropagation(),v.preventDefault()}),this.codemirror.on("dragleave",function(p,v){g.updateStatusBar("upload-image",g.options.imageTexts.sbInit),v.stopPropagation(),v.preventDefault()}),this.codemirror.on("dragover",function(p,v){g.updateStatusBar("upload-image",g.options.imageTexts.sbOnDragEnter),v.stopPropagation(),v.preventDefault()}),this.codemirror.on("drop",function(p,v){v.stopPropagation(),v.preventDefault(),f.imageUploadFunction?g.uploadImagesUsingCustomFunction(f.imageUploadFunction,v.dataTransfer.files):g.uploadImages(v.dataTransfer.files)}),this.codemirror.on("paste",function(p,v){f.imageUploadFunction?g.uploadImagesUsingCustomFunction(f.imageUploadFunction,v.clipboardData.files):g.uploadImages(v.clipboardData.files)})}}ge.prototype.uploadImages=function(f,y,C){if(f.length!==0){for(var M=[],E=0;E=2){var _e=Me[1];if(window.EMDEimagesCache[_e])w(oe,window.EMDEimagesCache[_e]);else{var He=document.createElement("img");He.onload=function(){window.EMDEimagesCache[_e]={naturalWidth:He.naturalWidth,naturalHeight:He.naturalHeight,url:_e},w(oe,window.EMDEimagesCache[_e])},He.src=_e}}}})}this.codemirror.on("update",function(){K()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var Z=this.codemirror;setTimeout(function(){Z.refresh()}.bind(Z),0)},ge.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function br(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(f){return!1}else return!1;return!0}ge.prototype.autosave=function(){if(br()){var f=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(f.element.form!=null&&f.element.form!=null&&f.element.form.addEventListener("submit",function(){clearTimeout(f.autosaveTimeoutId),f.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+f.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var y=f.value();y!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,y):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var C=document.getElementById("autosaved");if(C!=null&&C!=null&&C!=""){var M=new Date,E=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(M),_=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;C.innerHTML=_+E}}else console.log("EasyMDE: localStorage not available, cannot autosave")},ge.prototype.clearAutosavedValue=function(){if(br()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},ge.prototype.openBrowseFileWindow=function(f,y){var C=this,M=this.gui.toolbar.getElementsByClassName("imageInput")[0];M.click();function E(_){C.options.imageUploadFunction?C.uploadImagesUsingCustomFunction(C.options.imageUploadFunction,_.target.files):C.uploadImages(_.target.files,f,y),M.removeEventListener("change",E)}M.addEventListener("change",E)},ge.prototype.uploadImage=function(f,y,C){var M=this;y=y||function(c){Re(M,c)};function E(v){M.updateStatusBar("upload-image",v),setTimeout(function(){M.updateStatusBar("upload-image",M.options.imageTexts.sbInit)},1e4),C&&typeof C=="function"&&C(v),M.options.errorCallback(v)}function _(v){var c=M.options.imageTexts.sizeUnits.split(",");return v.replace("#image_name#",f.name).replace("#image_size#",xt(f.size,c)).replace("#image_max_size#",xt(M.options.imageMaxSize,c))}if(f.size>this.options.imageMaxSize){E(_(this.options.errorMessages.fileTooLarge));return}var g=new FormData;g.append("image",f),M.options.imageCSRFToken&&g.append("csrfmiddlewaretoken",M.options.imageCSRFToken);var p=new XMLHttpRequest;p.upload.onprogress=function(v){if(v.lengthComputable){var c=""+Math.round(v.loaded*100/v.total);M.updateStatusBar("upload-image",M.options.imageTexts.sbProgress.replace("#file_name#",f.name).replace("#progress#",c))}},p.open("POST",this.options.imageUploadEndpoint),p.onload=function(){try{var v=JSON.parse(this.responseText)}catch(c){console.error("EasyMDE: The server did not return a valid json."),E(_(M.options.errorMessages.importError));return}this.status===200&&v&&!v.error&&v.data&&v.data.filePath?y((M.options.imagePathAbsolute?"":window.location.origin+"/")+v.data.filePath):v.error&&v.error in M.options.errorMessages?E(_(M.options.errorMessages[v.error])):v.error?E(_(v.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),E(_(M.options.errorMessages.importError)))},p.onerror=function(v){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+v.target.status+" ("+v.target.statusText+")"),E(M.options.errorMessages.importError)},p.send(g)},ge.prototype.uploadImageUsingCustomFunction=function(f,y){var C=this;function M(g){Re(C,g)}function E(g){var p=_(g);C.updateStatusBar("upload-image",p),setTimeout(function(){C.updateStatusBar("upload-image",C.options.imageTexts.sbInit)},1e4),C.options.errorCallback(p)}function _(g){var p=C.options.imageTexts.sizeUnits.split(",");return g.replace("#image_name#",y.name).replace("#image_size#",xt(y.size,p)).replace("#image_max_size#",xt(C.options.imageMaxSize,p))}f.apply(this,[y,M,E])},ge.prototype.setPreviewMaxHeight=function(){var f=this.codemirror,y=f.getWrapperElement(),C=y.nextSibling,M=parseInt(window.getComputedStyle(y).paddingTop),E=parseInt(window.getComputedStyle(y).borderTopWidth),_=parseInt(this.options.maxHeight),g=_+M*2+E*2,p=g.toString()+"px";C.style.height=p},ge.prototype.createSideBySide=function(){var f=this.codemirror,y=f.getWrapperElement(),C=y.nextSibling;if(!C||!/editor-preview-side/.test(C.className)){if(C=document.createElement("div"),C.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var M=0;Mg.length)&&(p=g.length);for(var v=0,c=new Array(p);v=g.length?{done:!0}:{done:!1,value:g[c++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return v=g[Symbol.iterator](),v.next.bind(v)}function N(g){var p={exports:{}};return g(p,p.exports),p.exports}var S=N(function(g){function p(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function v(c){g.exports.defaults=c}g.exports={defaults:p(),getDefaults:p,changeDefaults:v}}),A=/[&<>"']/,B=/[&<>"']/g,q=/[<>"']|&(?!#?\w+;)/,J=/[<>"']|&(?!#?\w+;)/g,z={"&":"&","<":"<",">":">",'"':""","'":"'"},R=function(p){return z[p]};function ce(g,p){if(p){if(A.test(g))return g.replace(B,R)}else if(q.test(g))return g.replace(J,R);return g}var le=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function De(g){return g.replace(le,function(p,v){return v=v.toLowerCase(),v==="colon"?":":v.charAt(0)==="#"?v.charAt(1)==="x"?String.fromCharCode(parseInt(v.substring(2),16)):String.fromCharCode(+v.substring(1)):""})}var me=/(^|[^\[])\^/g;function ye(g,p){g=g.source||g,p=p||"";var v={replace:function(h,x){return x=x.source||x,x=x.replace(me,"$1"),g=g.replace(h,x),v},getRegex:function(){return new RegExp(g,p)}};return v}var I=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function te(g,p,v){if(g){var c;try{c=decodeURIComponent(De(v)).replace(I,"").toLowerCase()}catch(h){return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}p&&!P.test(v)&&(v=ie(p,v));try{v=encodeURI(v).replace(/%25/g,"%")}catch(h){return null}return v}var Y={},X=/^[^:]+:\/*[^/]*$/,fe=/^([^:]+:)[\s\S]*$/,re=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(g,p){Y[" "+g]||(X.test(g)?Y[" "+g]=g+"/":Y[" "+g]=Ae(g,"/",!0)),g=Y[" "+g];var v=g.indexOf(":")===-1;return p.substring(0,2)==="//"?v?p:g.replace(fe,"$1")+p:p.charAt(0)==="/"?v?p:g.replace(re,"$1")+p:g+p}var Be={exec:function(){}};function ne(g){for(var p=1,v,c;p=0&&w[Z]==="\\";)K=!K;return K?"|":" |"}),c=v.split(/ \|/),h=0;if(c.length>p)c.splice(p);else for(;c.length1;)p&1&&(v+=g),p>>=1,g+=g;return v+g}var de={escape:ce,unescape:De,edit:ye,cleanUrl:te,resolveUrl:ie,noopTest:Be,merge:ne,splitCells:ae,rtrim:Ae,findClosingBracket:O,checkSanitizeDeprecation:Q,repeatString:G},Ge=S.defaults,Ve=de.rtrim,St=de.splitCells,Ye=de.escape,k=de.findClosingBracket;function d(g,p,v){var c=p.href,h=p.title?Ye(p.title):null,x=g[1].replace(/\\([\[\]])/g,"$1");return g[0].charAt(0)!=="!"?{type:"link",raw:v,href:c,title:h,text:x}:{type:"image",raw:v,href:c,title:h,text:Ye(x)}}function he(g,p){var v=g.match(/^(\s+)(?:```)/);if(v===null)return p;var c=v[1];return p.split(` `).map(function(h){var x=h.match(/^\s+/);if(x===null)return h;var D=x[0];return D.length>=c.length?h.slice(c.length):h}).join(` `)}var Re=function(){function g(v){this.options=v||Ge}var p=g.prototype;return p.space=function(c){var h=this.rules.block.newline.exec(c);if(h)return h[0].length>1?{type:"space",raw:h[0]}:{raw:` `}},p.code=function(c){var h=this.rules.block.code.exec(c);if(h){var x=h[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:h[0],codeBlockStyle:"indented",text:this.options.pedantic?x:Ve(x,` `)}}},p.fences=function(c){var h=this.rules.block.fences.exec(c);if(h){var x=h[0],D=he(x,h[3]||"");return{type:"code",raw:x,lang:h[2]?h[2].trim():h[2],text:D}}},p.heading=function(c){var h=this.rules.block.heading.exec(c);if(h){var x=h[2].trim();if(/#$/.test(x)){var D=Ve(x,"#");(this.options.pedantic||!D||/ $/.test(D))&&(x=D.trim())}return{type:"heading",raw:h[0],depth:h[1].length,text:x}}},p.nptable=function(c){var h=this.rules.block.nptable.exec(c);if(h){var x={type:"table",header:St(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(` `):[],raw:h[0]};if(x.header.length===x.align.length){var D=x.align.length,w;for(w=0;w ?/gm,"");return{type:"blockquote",raw:h[0],text:x}}},p.list=function(c){var h=this.rules.block.list.exec(c);if(h){var x=h[0],D=h[2],w=D.length>1,K={type:"list",raw:x,ordered:w,start:w?+D.slice(0,-1):"",loose:!1,items:[]},Z=h[0].match(this.rules.block.item),V=!1,oe,Me,_e,He,Te,it,Pt,Ot,It,Ke=Z.length;_e=this.rules.block.listItemStart.exec(Z[0]);for(var Ue=0;Ue_e[1].length:He[1].length>=_e[0].length||He[1].length>3){Z.splice(Ue,2,Z[Ue]+(!this.options.pedantic&&He[1].length<_e[0].length&&!Z[Ue].match(/\n$/)?"":` `)+Z[Ue+1]),Ue--,Ke--;continue}else(!this.options.pedantic||this.options.smartLists?He[2][He[2].length-1]!==D[D.length-1]:w===(He[2].length===1))&&(Te=Z.slice(Ue+1).join(` `).length,K.raw=K.raw.substring(0,K.raw.length-Te),Ue=Ke-1);_e=He}Me=oe.length,oe=oe.replace(/^ *([*+-]|\d+[.)]) ?/,""),~oe.indexOf(` `)&&(Me-=oe.length,oe=this.options.pedantic?oe.replace(/^ {1,4}/gm,""):oe.replace(new RegExp("^ {1,"+Me+"}","gm"),"")),oe=Ve(oe,` `),Ue!==Ke-1&&(x=x+` `),it=V||/\n\n(?!\s*$)/.test(x),Ue!==Ke-1&&(V=x.slice(-2)===` `,it||(it=V)),it&&(K.loose=!0),this.options.gfm&&(Pt=/^\[[ xX]\] /.test(oe),Ot=void 0,Pt&&(Ot=oe[1]!==" ",oe=oe.replace(/^\[[ xX]\] +/,""))),K.items.push({type:"list_item",raw:x,task:Pt,checked:Ot,loose:it,text:oe})}return K}},p.html=function(c){var h=this.rules.block.html.exec(c);if(h)return{type:this.options.sanitize?"paragraph":"html",raw:h[0],pre:!this.options.sanitizer&&(h[1]==="pre"||h[1]==="script"||h[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(h[0]):Ye(h[0]):h[0]}},p.def=function(c){var h=this.rules.block.def.exec(c);if(h){h[3]&&(h[3]=h[3].substring(1,h[3].length-1));var x=h[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:x,raw:h[0],href:h[2],title:h[3]}}},p.table=function(c){var h=this.rules.block.table.exec(c);if(h){var x={type:"table",header:St(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(` `):[]};if(x.header.length===x.align.length){x.raw=h[0];var D=x.align.length,w;for(w=0;w/i.test(D[0])&&(h=!1),!x&&/^<(pre|code|kbd|script)(\s|>)/i.test(D[0])?x=!0:x&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(D[0])&&(x=!1),{type:this.options.sanitize?"text":"html",raw:D[0],inLink:h,inRawBlock:x,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(D[0]):Ye(D[0]):D[0]}},p.link=function(c){var h=this.rules.inline.link.exec(c);if(h){var x=h[2].trim();if(!this.options.pedantic&&/^$/.test(x))return;var D=Ve(x.slice(0,-1),"\\");if((x.length-D.length)%2==0)return}else{var w=k(h[2],"()");if(w>-1){var K=h[0].indexOf("!")===0?5:4,Z=K+h[1].length+w;h[2]=h[2].substring(0,w),h[0]=h[0].substring(0,Z).trim(),h[3]=""}}var V=h[2],oe="";if(this.options.pedantic){var Me=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(V);Me&&(V=Me[1],oe=Me[3])}else oe=h[3]?h[3].slice(1,-1):"";return V=V.trim(),/^$/.test(x)?V=V.slice(1):V=V.slice(1,-1)),d(h,{href:V&&V.replace(this.rules.inline._escapes,"$1"),title:oe&&oe.replace(this.rules.inline._escapes,"$1")},h[0])}},p.reflink=function(c,h){var x;if((x=this.rules.inline.reflink.exec(c))||(x=this.rules.inline.nolink.exec(c))){var D=(x[2]||x[1]).replace(/\s+/g," ");if(D=h[D.toLowerCase()],!D||!D.href){var w=x[0].charAt(0);return{type:"text",raw:w,text:w}}return d(x,D,x[0])}},p.emStrong=function(c,h,x){x===void 0&&(x="");var D=this.rules.inline.emStrong.lDelim.exec(c);if(!!D&&!(D[3]&&x.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var w=D[1]||D[2]||"";if(!w||w&&(x===""||this.rules.inline.punctuation.exec(x))){var K=D[0].length-1,Z,V,oe=K,Me=0,_e=D[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(_e.lastIndex=0,h=h.slice(-1*c.length+K);(D=_e.exec(h))!=null;)if(Z=D[1]||D[2]||D[3]||D[4]||D[5]||D[6],!!Z){if(V=Z.length,D[3]||D[4]){oe+=V;continue}else if((D[5]||D[6])&&K%3&&!((K+V)%3)){Me+=V;continue}if(oe-=V,!(oe>0)){if(oe+Me-V<=0&&!h.slice(_e.lastIndex).match(_e)&&(V=Math.min(V,V+oe+Me)),Math.min(K,V)%2)return{type:"em",raw:c.slice(0,K+D.index+V+1),text:c.slice(1,K+D.index+V)};if(Math.min(K,V)%2==0)return{type:"strong",raw:c.slice(0,K+D.index+V+1),text:c.slice(2,K+D.index+V-1)}}}}}},p.codespan=function(c){var h=this.rules.inline.code.exec(c);if(h){var x=h[2].replace(/\n/g," "),D=/[^ ]/.test(x),w=/^ /.test(x)&&/ $/.test(x);return D&&w&&(x=x.substring(1,x.length-1)),x=Ye(x,!0),{type:"codespan",raw:h[0],text:x}}},p.br=function(c){var h=this.rules.inline.br.exec(c);if(h)return{type:"br",raw:h[0]}},p.del=function(c){var h=this.rules.inline.del.exec(c);if(h)return{type:"del",raw:h[0],text:h[2]}},p.autolink=function(c,h){var x=this.rules.inline.autolink.exec(c);if(x){var D,w;return x[2]==="@"?(D=Ye(this.options.mangle?h(x[1]):x[1]),w="mailto:"+D):(D=Ye(x[1]),w=D),{type:"link",raw:x[0],text:D,href:w,tokens:[{type:"text",raw:D,text:D}]}}},p.url=function(c,h){var x;if(x=this.rules.inline.url.exec(c)){var D,w;if(x[2]==="@")D=Ye(this.options.mangle?h(x[0]):x[0]),w="mailto:"+D;else{var K;do K=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])[0];while(K!==x[0]);D=Ye(x[0]),x[1]==="www."?w="http://"+D:w=D}return{type:"link",raw:x[0],text:D,href:w,tokens:[{type:"text",raw:D,text:D}]}}},p.inlineText=function(c,h,x){var D=this.rules.inline.text.exec(c);if(D){var w;return h?w=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(D[0]):Ye(D[0]):D[0]:w=Ye(this.options.smartypants?x(D[0]):D[0]),{type:"text",raw:D[0],text:w}}},g}(),Le=de.noopTest,Ee=de.edit,rt=de.merge,be={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Le,table:Le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};be._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,be._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,be.def=Ee(be.def).replace("label",be._label).replace("title",be._title).getRegex(),be.bullet=/(?:[*+-]|\d{1,9}[.)])/,be.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,be.item=Ee(be.item,"gm").replace(/bull/g,be.bullet).getRegex(),be.listItemStart=Ee(/^( *)(bull) */).replace("bull",be.bullet).getRegex(),be.list=Ee(be.list).replace(/bull/g,be.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+be.def.source+")").getRegex(),be._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",be._comment=/|$)/,be.html=Ee(be.html,"i").replace("comment",be._comment).replace("tag",be._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),be.paragraph=Ee(be._paragraph).replace("hr",be.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",be._tag).getRegex(),be.blockquote=Ee(be.blockquote).replace("paragraph",be.paragraph).getRegex(),be.normal=rt({},be),be.gfm=rt({},be.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),be.gfm.nptable=Ee(be.gfm.nptable).replace("hr",be.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",be._tag).getRegex(),be.gfm.table=Ee(be.gfm.table).replace("hr",be.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",be._tag).getRegex(),be.pedantic=rt({},be.normal,{html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",be._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Le,paragraph:Ee(be.normal._paragraph).replace("hr",be.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",be.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var pe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Le,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Le,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",pe.punctuation=Ee(pe.punctuation).replace(/punctuation/g,pe._punctuation).getRegex(),pe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,pe.escapedEmSt=/\\\*|\\_/g,pe._comment=Ee(be._comment).replace("(?:-->|$)","-->").getRegex(),pe.emStrong.lDelim=Ee(pe.emStrong.lDelim).replace(/punct/g,pe._punctuation).getRegex(),pe.emStrong.rDelimAst=Ee(pe.emStrong.rDelimAst,"g").replace(/punct/g,pe._punctuation).getRegex(),pe.emStrong.rDelimUnd=Ee(pe.emStrong.rDelimUnd,"g").replace(/punct/g,pe._punctuation).getRegex(),pe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,pe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,pe._email=/[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])?)+(?![-_])/,pe.autolink=Ee(pe.autolink).replace("scheme",pe._scheme).replace("email",pe._email).getRegex(),pe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,pe.tag=Ee(pe.tag).replace("comment",pe._comment).replace("attribute",pe._attribute).getRegex(),pe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,pe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,pe.link=Ee(pe.link).replace("label",pe._label).replace("href",pe._href).replace("title",pe._title).getRegex(),pe.reflink=Ee(pe.reflink).replace("label",pe._label).getRegex(),pe.reflinkSearch=Ee(pe.reflinkSearch,"g").replace("reflink",pe.reflink).replace("nolink",pe.nolink).getRegex(),pe.normal=rt({},pe),pe.pedantic=rt({},pe.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",pe._label).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pe._label).getRegex()}),pe.gfm=rt({},pe.normal,{escape:Ee(pe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(c="x"+c.toString(16)),p+="&#"+c+";";return p}var yt=function(){function g(v){this.tokens=[],this.tokens.links=Object.create(null),this.options=v||Pe,this.options.tokenizer=this.options.tokenizer||new Re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var c={block:Se.normal,inline:ft.normal};this.options.pedantic?(c.block=Se.pedantic,c.inline=ft.pedantic):this.options.gfm&&(c.block=Se.gfm,this.options.breaks?c.inline=ft.breaks:c.inline=ft.gfm),this.tokenizer.rules=c}g.lex=function(c,h){var x=new g(h);return x.lex(c)},g.lexInline=function(c,h){var x=new g(h);return x.inlineTokens(c)};var p=g.prototype;return p.lex=function(c){return c=c.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(c,this.tokens,!0),this.inline(this.tokens),this.tokens},p.blockTokens=function(c,h,x){h===void 0&&(h=[]),x===void 0&&(x=!0),this.options.pedantic&&(c=c.replace(/^ +$/gm,""));for(var D,w,K,Z;c;){if(D=this.tokenizer.space(c)){c=c.substring(D.raw.length),D.type&&h.push(D);continue}if(D=this.tokenizer.code(c)){c=c.substring(D.raw.length),Z=h[h.length-1],Z&&Z.type==="paragraph"?(Z.raw+=` `+D.raw,Z.text+=` `+D.text):h.push(D);continue}if(D=this.tokenizer.fences(c)){c=c.substring(D.raw.length),h.push(D);continue}if(D=this.tokenizer.heading(c)){c=c.substring(D.raw.length),h.push(D);continue}if(D=this.tokenizer.nptable(c)){c=c.substring(D.raw.length),h.push(D);continue}if(D=this.tokenizer.hr(c)){c=c.substring(D.raw.length),h.push(D);continue}if(D=this.tokenizer.blockquote(c)){c=c.substring(D.raw.length),D.tokens=this.blockTokens(D.text,[],x),h.push(D);continue}if(D=this.tokenizer.list(c)){for(c=c.substring(D.raw.length),K=D.items.length,w=0;w0)for(;(V=this.tokenizer.rules.inline.reflinkSearch.exec(Z))!=null;)_e.includes(V[0].slice(V[0].lastIndexOf("[")+1,-1))&&(Z=Z.slice(0,V.index)+"["+Yt("a",V[0].length-2)+"]"+Z.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(V=this.tokenizer.rules.inline.blockSkip.exec(Z))!=null;)Z=Z.slice(0,V.index)+"["+Yt("a",V[0].length-2)+"]"+Z.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(V=this.tokenizer.rules.inline.escapedEmSt.exec(Z))!=null;)Z=Z.slice(0,V.index)+"++"+Z.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;c;){if(oe||(Me=""),oe=!1,w=this.tokenizer.escape(c)){c=c.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(c,x,D)){c=c.substring(w.raw.length),x=w.inLink,D=w.inRawBlock;var He=h[h.length-1];He&&w.type==="text"&&He.type==="text"?(He.raw+=w.raw,He.text+=w.text):h.push(w);continue}if(w=this.tokenizer.link(c)){c=c.substring(w.raw.length),w.type==="link"&&(w.tokens=this.inlineTokens(w.text,[],!0,D)),h.push(w);continue}if(w=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(w.raw.length);var Te=h[h.length-1];w.type==="link"?(w.tokens=this.inlineTokens(w.text,[],!0,D),h.push(w)):Te&&w.type==="text"&&Te.type==="text"?(Te.raw+=w.raw,Te.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(c,Z,Me)){c=c.substring(w.raw.length),w.tokens=this.inlineTokens(w.text,[],x,D),h.push(w);continue}if(w=this.tokenizer.codespan(c)){c=c.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(c)){c=c.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(c)){c=c.substring(w.raw.length),w.tokens=this.inlineTokens(w.text,[],x,D),h.push(w);continue}if(w=this.tokenizer.autolink(c,xt)){c=c.substring(w.raw.length),h.push(w);continue}if(!x&&(w=this.tokenizer.url(c,xt))){c=c.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.inlineText(c,D,jt)){c=c.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(Me=w.raw.slice(-1)),oe=!0,K=h[h.length-1],K&&K.type==="text"?(K.raw+=w.raw,K.text+=w.text):h.push(w);continue}if(c){var it="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return h},we(g,null,[{key:"rules",get:function(){return{block:Se,inline:ft}}}]),g}(),ct=S.defaults,Ft=de.cleanUrl,nt=de.escape,Nt=function(){function g(v){this.options=v||ct}var p=g.prototype;return p.code=function(c,h,x){var D=(h||"").match(/\S*/)[0];if(this.options.highlight){var w=this.options.highlight(c,D);w!=null&&w!==c&&(x=!0,c=w)}return c=c.replace(/\n$/,"")+` `,D?'
'+(x?c:nt(c,!0))+`
`:"
"+(x?c:nt(c,!0))+`
`},p.blockquote=function(c){return`
`+c+`
`},p.html=function(c){return c},p.heading=function(c,h,x,D){return this.options.headerIds?"'+c+" `:""+c+" `},p.hr=function(){return this.options.xhtml?`
`:`
`},p.list=function(c,h,x){var D=h?"ol":"ul",w=h&&x!==1?' start="'+x+'"':"";return"<"+D+w+`> `+c+" `},p.listitem=function(c){return"
  • "+c+`
  • `},p.checkbox=function(c){return" "},p.paragraph=function(c){return"

    "+c+`

    `},p.table=function(c,h){return h&&(h=""+h+""),` `+c+` `+h+`
    `},p.tablerow=function(c){return` `+c+` `},p.tablecell=function(c,h){var x=h.header?"th":"td",D=h.align?"<"+x+' align="'+h.align+'">':"<"+x+">";return D+c+" `},p.strong=function(c){return""+c+""},p.em=function(c){return""+c+""},p.codespan=function(c){return""+c+""},p.br=function(){return this.options.xhtml?"
    ":"
    "},p.del=function(c){return""+c+""},p.link=function(c,h,x){if(c=Ft(this.options.sanitize,this.options.baseUrl,c),c===null)return x;var D='",D},p.image=function(c,h,x){if(c=Ft(this.options.sanitize,this.options.baseUrl,c),c===null)return x;var D=''+x+'":">",D},p.text=function(c){return c},g}(),Zt=function(){function g(){}var p=g.prototype;return p.strong=function(c){return c},p.em=function(c){return c},p.codespan=function(c){return c},p.del=function(c){return c},p.html=function(c){return c},p.text=function(c){return c},p.link=function(c,h,x){return""+x},p.image=function(c,h,x){return""+x},p.br=function(){return""},g}(),yr=function(){function g(){this.seen={}}var p=g.prototype;return p.serialize=function(c){return c.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},p.getNextSafeSlug=function(c,h){var x=c,D=0;if(this.seen.hasOwnProperty(x)){D=this.seen[c];do D++,x=c+"-"+D;while(this.seen.hasOwnProperty(x))}return h||(this.seen[c]=D,this.seen[x]=0),x},p.slug=function(c,h){h===void 0&&(h={});var x=this.serialize(c);return this.getNextSafeSlug(x,h.dryrun)},g}(),rr=S.defaults,Vr=de.unescape,zt=function(){function g(v){this.options=v||rr,this.options.renderer=this.options.renderer||new Nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Zt,this.slugger=new yr}g.parse=function(c,h){var x=new g(h);return x.parse(c)},g.parseInline=function(c,h){var x=new g(h);return x.parseInline(c)};var p=g.prototype;return p.parse=function(c,h){h===void 0&&(h=!0);var x="",D,w,K,Z,V,oe,Me,_e,He,Te,it,Pt,Ot,It,Ke,Ue,Nr,nr,Je=c.length;for(D=0;D0&&Ke.tokens[0].type==="text"?(Ke.tokens[0].text=nr+" "+Ke.tokens[0].text,Ke.tokens[0].tokens&&Ke.tokens[0].tokens.length>0&&Ke.tokens[0].tokens[0].type==="text"&&(Ke.tokens[0].tokens[0].text=nr+" "+Ke.tokens[0].tokens[0].text)):Ke.tokens.unshift({type:"text",text:nr}):It+=nr),It+=this.parse(Ke.tokens,Ot),He+=this.renderer.listitem(It,Nr,Ue);x+=this.renderer.list(He,it,Pt);continue}case"html":{x+=this.renderer.html(Te.text);continue}case"paragraph":{x+=this.renderer.paragraph(this.parseInline(Te.tokens));continue}case"text":{for(He=Te.tokens?this.parseInline(Te.tokens):Te.text;D+1An error occurred:

    "+f(K.message+"",!0)+"
    ";throw K}}E.options=E.setOptions=function(g){return ge(E.defaults,g),C(E.defaults),E},E.getDefaults=y,E.defaults=M,E.use=function(g){var p=ge({},g);if(g.renderer&&function(){var c=E.defaults.renderer||new Nt,h=function(w){var K=c[w];c[w]=function(){for(var Z=arguments.length,V=new Array(Z),oe=0;oeAn error occurred:

    "+f(c.message+"",!0)+"
    ";throw c}},E.Parser=zt,E.parser=zt.parse,E.Renderer=Nt,E.TextRenderer=Zt,E.Lexer=yt,E.lexer=yt.lex,E.Tokenizer=Re,E.Slugger=yr,E.parse=E;var _=E;return _})},"./node_modules/typo-js/typo.js":function(Xe,ze,we){var W="/",j;(function(){"use strict";j=function(T,N,S,A){A=A||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=A.flags||{},this.memoized={},this.loaded=!1;var B=this,q,J,z,R,ce;T&&(B.dictionary=T,N&&S?ye():typeof window!="undefined"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(A.dictionaryPath?q=A.dictionaryPath:q="typo/dictionaries",N||le(chrome.extension.getURL(q+"/"+T+"/"+T+".aff"),De),S||le(chrome.extension.getURL(q+"/"+T+"/"+T+".dic"),me)):(A.dictionaryPath?q=A.dictionaryPath:q=W+"/dictionaries",N||le(q+"/"+T+"/"+T+".aff",De),S||le(q+"/"+T+"/"+T+".dic",me)));function le(I,P){var te=B._readFile(I,null,A.asyncLoad);A.asyncLoad?te.then(function(Y){P(Y)}):P(te)}function De(I){N=I,S&&ye()}function me(I){S=I,N&&ye()}function ye(){for(B.rules=B._parseAFF(N),B.compoundRuleCodes={},J=0,R=B.compoundRules.length;J0&&(ie.continuationClasses=fe),re!=="."&&(me==="SFX"?ie.match=new RegExp(re+"$"):ie.match=new RegExp("^"+re)),te!="0"&&(me==="SFX"?ie.remove=new RegExp(te+"$"):ie.remove=te),P.push(ie)}N[ye]={type:me,combineable:I=="Y",entries:P},J+=B}else if(me==="COMPOUNDRULE"){for(B=parseInt(De[1],10),z=J+1,ce=J+1+B;z0&&(S[Ae]===null&&(S[Ae]=[]),S[Ae].push(O))}for(var B=1,q=N.length;B1){var ce=this.parseRuleCodes(z[1]);(!("NEEDAFFIX"in this.flags)||ce.indexOf(this.flags.NEEDAFFIX)==-1)&&A(R,ce);for(var le=0,De=ce.length;le=this.flags.COMPOUNDMIN){for(S=0,A=this.compoundRules.length;S1&&ie[1][1]!==ie[1][0]&&(X=ie[0]+ie[1][1]+ie[1][0]+ie[1].substring(2),(!De||z.check(X))&&(X in me?me[X]+=1:me[X]=1)),ie[1]){var Be=ie[1].substring(0,1).toUpperCase()===ie[1].substring(0,1)?"uppercase":"lowercase";for(I=0;IAe?1:ne[0].localeCompare(Be[0])}Y.sort(X).reverse();var fe=[],re="lowercase";le.toUpperCase()===le?re="uppercase":le.substr(0,1).toUpperCase()+le.substr(1).toLowerCase()===le&&(re="capitalized");var ie=N;for(P=0;P