You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/public/react/build/static/js/14.ba93abf4.chunk.js

1 line
234 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

webpackJsonp([14],{1553:function(e,t,n){var r;r=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),w=n||r||i,k=w&&(n?document.documentMode||6:+(i||r)[1]),x=!i&&/WebKit\//.test(e),o=x&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),s=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),u=/PhantomJS/.test(e),c=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),f=/Android/.test(e),d=c||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=c||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);(v=v&&Number(v[1]))&&15<=v&&(x=!(g=!1));var y=b&&(o||g&&(null==v||v<12.11)),C=m||w&&9<=k;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,L=function(e,t){var n=e.className,r=S(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 T(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function D(e,t){return T(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,n,r){var i=N(e,t,n,r);return i.setAttribute("role","presentation"),i}function F(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function E(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function O(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function I(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}M=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var P=function(e){e.select()};function W(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,n){for(var r in t=t||{},e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function _(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||t<=l)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}c?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(P=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}z.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var B=30,R={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},V={origin:"*mouse"},G={origin:"+move"};function U(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||t<=i+a)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}var $=[""];function Y(e){for(;$.length<=e;)$.push(K($)+" ");return $[e]}function K(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function J(){}function Q(e,t){var n;return n=Object.create?Object.create(e):(J.prototype=e,new J),t&&j(t,n),n}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||"€"<e&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 ie(e){return 768<=e.charCodeAt(0)&&re.test(e)}function oe(e,t,n){for(;(n<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=n<t?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function se(e,t,n){var r;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var ue,ce,fe,de,he,pe,me,ge=(ue="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,de=/[stwN]/,he=/[LRr]/,pe=/[Lb1n]/,me=/[1n]/,function(e,t){var n="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!fe.test(e))return!1;for(var r,i=e.length,o=[],a=0;a<i;++a)o.push((r=e.charCodeAt(a))<=247?ue.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?ce.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L");for(var l=0,s=n;l<i;++l){var u=o[l];"m"==u?o[l]=s:s=u}for(var c=0,f=n;c<i;++c){var d=o[c];"1"==d&&"r"==f?o[c]="n":he.test(d)&&"r"==(f=d)&&(o[c]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var x=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",b=g;b<y;++b)o[b]=x;g=y-1}}for(var w=0,k=n;w<i;++w){var C=o[w];"L"==k&&"1"==C?o[w]="L":he.test(C)&&(k=C)}for(var S=0;S<i;++S)if(de.test(o[S])){var M=void 0;for(M=S+1;M<i&&de.test(o[M]);++M);for(var L="L"==(S?o[S-1]:n),T=L==("L"==(M<i?o[M]:n))?L?"L":"R":n,D=S;D<M;++D)o[D]=T;S=M-1}for(var A,N=[],F=0;F<i;)if(pe.test(o[F])){var E=F;for(++F;F<i&&pe.test(o[F]);++F);N.push(new ve(0,E,F))}else{var O=F,I=N.length;for(++F;F<i&&"L"!=o[F];++F);for(var P=O;P<F;)if(me.test(o[P])){O<P&&N.splice(I,0,new ve(1,O,P));var W=P;for(++P;P<F&&me.test(o[P]);++P);N.splice(I,0,new ve(2,W,P)),O=P}else++P;O<F&&N.splice(I,0,new ve(1,O,F))}return"ltr"==t&&(1==N[0].level&&(A=e.match(/^\s+/))&&(N[0].from=A[0].length,N.unshift(new ve(0,0,A[0].length))),1==K(N).level&&(A=e.match(/\s+$/))&&(K(N).to-=A[0].length,N.push(new ve(0,i-A[0].length,i)))),"rtl"==t?N.reverse():N});function ve(e,t,n){this.level=e,this.from=t,this.to=n}function ye(e,t){var n=e.order;return null==n&&(n=e.order=ge(e.text,t)),n}var xe=[],be=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||xe).concat(n)}};function we(e,t){return e._handlers&&e._handlers[t]||xe}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=H(i,n);-1<o&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Se(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ce(e,n||t.type,e,t),Ne(t)||t.codemirrorIgnore}function Me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function Le(e,t){return 0<we(e,t).length}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function De(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ne(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){De(e),Ae(e)}function Ee(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Ie,Pe,We=function(){if(w&&k<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function je(e){if(null==Ie){var t=N("span","");D(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ie=t.offsetWidth<=1&&2<t.offsetHeight&&!(w&&k<8))}var n=Ie?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _e(e){if(null!=Pe)return Pe;var t=D(e,document.createTextNode("AخA")),n=M(t,0,1).getBoundingClientRect(),r=M(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Pe=r.right-n.right<3)}var ze,He=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(ze=N("div"))||(ze.setAttribute("oncopy","return;"),"function"==typeof ze.oncopy),qe=null;var Ve={},Ge={};function Ue(e){if("string"==typeof e&&Ge.hasOwnProperty(e))e=Ge[e];else if(e&&"string"==typeof e.name&&Ge.hasOwnProperty(e.name)){var t=Ge[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function $e(e,t){t=Ue(t);var n=Ve[t.name];if(!n)return $e(e,"text/plain");var r=n(e,t);if(Ye.hasOwnProperty(t.name)){var i=Ye[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ye={};function Ke(e,t){j(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={})}function Xe(e,t){if(!0===t)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 Je(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var Ze=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};function et(e,t){if((t-=e.first)<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],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function tt(e,n,r){var i=[],o=n.line;return e.iter(n.line,r.line+1,function(e){var t=e.text;o==r.line&&(t=t.slice(0,r.ch)),o==n.line&&(t=t.slice(n.ch)),i.push(t),++o}),i}function nt(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function rt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function it(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;r=(t=r).parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ot(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function at(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ut(e,t){return e.line-t.line||e.ch-t.ch}function ct(e,t){return e.sticky==t.sticky&&0==ut(e,t)}function ft(e){return st(e.line,e.ch)}function dt(e,t){return ut(e,t)<0?t:e}function ht(e,t){return ut(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function mt(e,t){if(t.line<e.first)return st(e.first,0);var n=e.first+e.size-1;return t.line>n?st(n,et(e,n).text.length):function(e,t){var n=e.ch;return null==n||t<n?st(e.line,t):n<0?st(e.line,0):e}(t,et(e,t.line).text.length)}function gt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=mt(e,t[r]);return n}Ze.prototype.eol=function(){return this.pos>=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ze.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ze.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=_(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?_(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.indentation=function(){return _(this.string,null,this.tabSize)-(this.lineStart?_(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&0<r.index?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}function i(e){return n?e.toLowerCase():e}if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},yt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function xt(t,n,r,e){var s=[t.state.modeGen],i={};Dt(t,n.text,t.doc.mode,r,function(e,t){return s.push(e,t)},i,e);for(var u=r.state,o=function(e){r.baseTokens=s;var o=t.state.overlays[e],a=1,l=0;r.state=!0,Dt(t,n.text,o.mode,r,function(e,t){for(var n=a;l<e;){var r=s[a];e<r&&s.splice(a,1,e,s[a+1],r),a+=2,l=Math.min(e,r)}if(t)if(o.opaque)s.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var i=s[n+1];s[n+1]=(i?i+" ":"")+"overlay "+t}},i),r.state=u,r.baseTokens=null,r.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:s,classes:i.bgClass||i.textClass?i:null}}function bt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=wt(e,it(t)),i=t.text.length>e.options.maxHighlightLength&&Xe(e.doc.mode,r.state),o=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.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 wt(n,r,e){var t=n.doc,i=n.display;if(!t.mode.startState)return new yt(t,!0,r);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;a<l;--l){if(l<=o.first)return o.first;var s=et(o,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof vt?u.lookAhead:0)<=o.modeFrontier))return l;var c=_(s.text,null,e.options.tabSize);(null==i||c<r)&&(i=l-1,r=c)}return i}(n,r,e),a=o>t.first&&et(t,o-1).stateAfter,l=a?yt.fromSaved(t,a,o):new yt(t,Qe(t.mode),o);return t.iter(o,r,function(e){kt(n,e.text,l);var t=l.line;e.stateAfter=t==r-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?l.save():null,l.nextLine()}),e&&(t.modeFrontier=l.line),l}function kt(e,t,n,r){var i=e.doc.mode,o=new Ze(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Ct(i,n.state);!o.eol();)St(i,o,n.state),o.start=o.pos}function Ct(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Je(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function St(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Je(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}yt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},yt.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}},yt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},yt.fromSaved=function(e,t,n){return t instanceof vt?new yt(e,Xe(e.mode,t.state),n,t.lookAhead):new yt(e,Xe(e.mode,t),n)},yt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new vt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Lt(e,t,n,r){var i,o,a=e.doc,l=a.mode,s=et(a,(t=mt(a,t)).line),u=wt(e,t.line,n),c=new Ze(s.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=St(l,c,u.state),r&&o.push(new Mt(c,i,Xe(a.mode,u.state)));return r?o:new Mt(c,i,u.state)}function Tt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Dt(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,u=0,c=null,f=new Ze(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&Tt(Ct(n,r.state),o);!f.eol();){if(s=f.pos>e.options.maxHighlightLength?(l=!1,a&&kt(e,t,r,f.pos),f.pos=t.length,null):Tt(St(n,f,r.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||c!=s){for(;u<f.start;)i(u=Math.min(f.start,u+5e3),c);c=s}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}var At=!1,Nt=!1;function Ft(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ot(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n=n||[]).push(e[r]);return n}function It(e,t){if(t.full)return null;var n=at(e,t.from.line)&&et(e,t.from.line).markedSpans,r=at(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ut(t.from,t.to),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r=r||[]).push(new Ft(a,o.from,l?null:o.to))}}return r}(n,i,a),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r=r||[]).push(new Ft(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),u=1==t.text.length,c=K(t.text).length+(u?i:0);if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null==d.to){var h=Et(s,d.marker);h?u&&(d.to=null==h.to?null:h.to+c):d.to=i}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=c),null==m.from)Et(l,m.marker)||(m.from=c,u&&(l=l||[]).push(m));else m.from+=c,u&&(l=l||[]).push(m)}l=l&&Pt(l),s&&s!=l&&(s=Pt(s));var g=[l];if(!u){var v,y=t.text.length-2;if(0<y&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(v=v||[]).push(new Ft(l[x].marker,null,null));for(var b=0;b<y;++b)g.push(v);g.push(s)}return g}function Pt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Wt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function jt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function _t(e){return e.inclusiveLeft?-1:0}function zt(e){return e.inclusiveRight?1:0}function Ht(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ut(r.from,i.from)||_t(e)-_t(t);if(o)return-o;var a=ut(r.to,i.to)||zt(e)-zt(t);return a||t.id-e.id}function Bt(e,t){var n,r=Nt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ht(n,i.marker)<0)&&(n=i.marker);return n}function Rt(e){return Bt(e,!0)}function qt(e){return Bt(e,!1)}function Vt(e,t){var n,r=Nt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ht(n,o.marker)<0)&&(n=o.marker)}return n}function Gt(e,t,n,r,i){var o=et(e,t),a=Nt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=ut(u.from,n)||_t(s.marker)-_t(i),f=ut(u.to,r)||zt(s.marker)-zt(i);if(!(0<=c&&f<=0||c<=0&&0<=f)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?0<=ut(u.to,n):0<ut(u.to,n))||0<=c&&(s.marker.inclusiveRight&&i.inclusiveLeft?ut(u.from,r)<=0:ut(u.from,r)<0)))return!0}}}function Ut(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function $t(e,t){var n=et(e,t),r=Ut(n);return n==r?t:it(r)}function Yt(e,t){if(t>e.lastLine())return t;var n,r=et(e,t);if(!Kt(e,r))return t;for(;n=qt(r);)r=n.find(1,!0).line;return it(r)+1}function Kt(e,t){var n=Nt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Xt(e,t,r))return!0}}function Xt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Xt(e,r.line,Et(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Xt(e,t,i))return!0}function Jt(e){for(var t=0,n=(e=Ut(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function Qt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Rt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=qt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Zt(e){var n=e.display,t=e.doc;n.maxLine=et(t,t.first),n.maxLineLength=Qt(n.maxLine),n.maxLineChanged=!0,t.iter(function(e){var t=Qt(e);t>n.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var en=function(e,t,n){this.text=e,jt(this,t),this.height=n?n(this):1};en.prototype.lineNo=function(){return it(this)},Te(en);var tn={},nn={};function rn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?nn:tn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function on(e,t){var n=A("span",null,null,x?"padding-right: .1px":null),r={pre:A("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 o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=ln,_e(e.display.measure)&&(a=ye(o,e.doc.direction))&&(r.addToken=sn(r.addToken,a)),r.map=[],cn(o,r,bt(e,o,t!=e.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=I(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=I(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(je(e.display.measure))),0==i?(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(x){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function an(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ln(e,t,n,r,i,o,a){if(t){var l,s=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,u=e.cm.state.specialChars,c=!1;if(u.test(t)){l=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var d=u.exec(t),h=d?d.index-f:t.length-f;if(h){var p=document.createTextNode(s.slice(f,f+h));w&&k<9?l.appendChild(N("span",[p])):l.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!d)break;f+=1+h;var m=void 0;if("\t"==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=l.appendChild(N("span",Y(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==d[0]||"\n"==d[0]?(m=l.appendChild(N("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]):((m=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),w&&k<9?l.appendChild(N("span",[m])):l.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,l=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,l),w&&k<9&&(c=!0),e.pos+=t.length;if(e.trailingSpace=32==s.charCodeAt(t.length-1),n||r||i||c||o){var y=n||"";r&&(y+=r),i&&(y+=i);var x=N("span",[l],y,o);if(a)for(var b in a)a.hasOwnProperty(b)&&"style"!=b&&"class"!=b&&x.setAttribute(b,a[b]);return e.content.appendChild(x)}e.content.appendChild(l)}}function sn(f,d){return function(e,t,n,r,i,o,a){n=n?n+" cm-force-border":"cm-force-border";for(var l=e.pos,s=l+t.length;;){for(var u=void 0,c=0;c<d.length&&!((u=d[c]).to>l&&u.from<=l);c++);if(u.to>=s)return f(e,t,n,r,i,o,a);f(e,t.slice(0,u.to-l),n,r,null,o,a),r=null,t=t.slice(u.to-l),l=u.to}}}function un(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"))).setAttribute("cm-marker",n.id),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function cn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,u,c,f,d,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=u=c=l="",f=d=null,v=1/0;for(var y=[],x=void 0,b=0;b<r.length;++b){var w=r[b],k=w.marker;if("bookmark"==k.type&&w.from==p&&k.widgetNode)y.push(k);else if(w.from<=p&&(null==w.to||w.to>p||k.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&w.from==p&&(c+=" "+k.startStyle),k.endStyle&&w.to==v&&(x=x||[]).push(k.endStyle,w.to),k.title&&((d=d||{}).title=k.title),k.attributes)for(var C in k.attributes)(d=d||{})[C]=k.attributes[C];k.collapsed&&(!f||Ht(f.marker,k)<0)&&(f=w)}else w.from>p&&v>w.from&&(v=w.from)}if(x)for(var S=0;S<x.length;S+=2)x[S+1]==v&&(u+=" "+x[S]);if(!f||f.from==p)for(var M=0;M<y.length;++M)un(t,0,y[M]);if(f&&(f.from||0)==p){if(un(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(h<=p)break;for(var L=Math.min(h,v);;){if(g){var T=p+g.length;if(!f){var D=L<T?g.slice(0,L-p):g;t.addToken(t,D,a?a+s:s,c,p+D.length==v?u:"",l,d)}if(L<=T){g=g.slice(L-p),p=L;break}p=T,c=""}g=i.slice(o,o=n[m++]),a=rn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),rn(n[A+1],t.cm.options))}function fn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=qt(e);)e=t.find(1,!0).line,(n=n||[]).push(e);return n}(t),this.size=this.rest?it(K(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Kt(e,t)}function dn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new fn(e.doc,et(e.doc,o),o);r=o+a.size,i.push(a)}return i}var hn=null;var pn=null;function mn(e,t){var n=we(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);hn?r=hn.delayedCallbacks:pn?r=pn:(r=pn=[],setTimeout(gn,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},a=0;a<n.length;++a)o(a)}}function gn(){var e=pn;pn=null;for(var t=0;t<e.length;++t)e[t]()}function vn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?bn(e,t):"gutter"==o?kn(e,t,n,r):"class"==o?wn(e,t):"widget"==o&&Cn(e,t,r)}t.changes=null}function yn(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&k<8&&(e.node.style.zIndex=2)),e.node}function xn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):on(e,t)}function bn(e,t){var n=t.text.className,r=xn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,wn(e,t)):n&&(t.text.className=n)}function wn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=yn(t);t.background=r.insertBefore(N("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?yn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function kn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=yn(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=yn(t),l=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(N("div",lt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,c=o.hasOwnProperty(u)&&o[u];c&&l.appendChild(N("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Cn(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);Sn(e,t,n)}function Sn(e,t,n){if(Mn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Mn(e,t.rest[r],t,n,!1)}function Mn(e,t,n,r,i){if(t.widgets)for(var o=yn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=N("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Ln(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),mn(s,"redraw")}}function Ln(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Tn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!F(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),D(t.display.measure,N("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Dn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function An(e){return e.lineSpace.offsetTop}function Nn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=D(e.measure,N("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function En(e){return B-e.display.nativeBarWidth}function On(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function In(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function Pn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(it(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Wn(e,t,n,r){return zn(e,_n(e,t),n,r)}function jn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[pr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function _n(e,t){var n=it(t),r=jn(e,n);r&&!r.text?r=null:r&&r.changes&&(vn(e,r,n,ur(e)),e.curOp.forceUpdate=!0);var i=Pn(r=r||function(e,t){var n=it(t=Ut(t)),r=e.display.externalMeasured=new fn(e.doc,t,n);r.lineN=n;var i=r.built=on(e,r);return r.text=i.pre,D(e.display.lineMeasure,i.pre),r}(e,t),t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function zn(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&On(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];2<Math.abs(s.bottom-u.bottom)&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Rn(t.map,n,r),a=o.node,l=o.start,s=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;l&&ie(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+s));)++s;if((i=w&&k<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():qn(M(a,l,s).getClientRects(),r)).left||i.right||0==l)break;s=l,l-=1,u="right"}w&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=qe)return qe;var t=D(e,N("span","x")),n=t.getBoundingClientRect(),r=M(t,0,1).getBoundingClientRect();return qe=1<Math.abs(n.left-r.left)}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;0<l&&(u=r="right"),i=e.options.lineWrapping&&1<(f=a.getClientRects()).length?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(w&&k<9&&!l&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+sr(e.display),top:d.top,bottom:d.bottom}:Bn}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,x=g[v],b={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:x};i.left||i.right||(b.bogus=!0);e.options.singleCursorHeightPerLine||(b.rtop=h,b.rbottom=p);return b}(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hn,Bn={left:0,right:0,top:0,bottom:0};function Rn(e,t,n){for(var r,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?o=(i=t-l)+1:(u==e.length-3||t==s&&e[u+3]>t)&&(i=(o=s-l)-1,s<=t&&(a="right")),null!=i){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function qn(e,t){var n=Bn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;0<=i&&(n=e[i]).left==n.right;i--);return n}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Gn(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function Un(e){Gn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function $n(){return a&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Yn(){return a&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Kn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Tn(e.widgets[n]));return t}function Xn(e,t,n,r,i){if(!i){var o=Kn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r=r||"local";var a=Jt(t);if("local"==r?a+=An(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:Yn());var s=l.left+("window"==r?0:$n());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Jn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=$n(),i-=Yn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Qn(e,t,n,r,i){return Xn(e,r=r||et(e.doc,t.line),Wn(e,r,t.ch,i),n)}function Zn(r,e,i,o,a,l){function s(e,t){var n=zn(r,a,e,t?"right":"left",l);return t?n.left=n.right:n.right=n.left,Xn(r,o,n,i)}o=o||et(r.doc,e.line),a=a||_n(r,o);var u=ye(o,r.doc.direction),t=e.ch,n=e.sticky;if(t>=o.text.length?(t=o.text.length,n="before"):t<=0&&(t=0,n="after"),!u)return s("before"==n?t-1:t,"before"==n);function c(e,t,n){return s(n?e-1:e,1==u[t].level!=n)}var f=se(u,t,n),d=le,h=c(t,f,"before"==n);return null!=d&&(h.other=c(t,d,"before"!=n)),h}function er(e,t){var n=0;t=mt(e.doc,t),e.options.lineWrapping||(n=sr(e.display)*t.ch);var r=et(e.doc,t.line),i=Jt(r)+An(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function tr(e,t,n,r,i){var o=st(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function nr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return tr(r.first,0,null,!0,-1);var i=ot(r,n),o=r.first+r.size-1;if(o<i)return tr(r.first+r.size-1,et(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=et(r,i);;){var l=ar(e,a,i,t,n),s=Vt(a,l.ch+(0<l.xRel?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=et(r,i=u.line)}}function rr(t,e,n,r){r-=Kn(e);var i=e.text.length,o=ae(function(e){return zn(t,n,e-1).bottom<=r},i,0);return{begin:o,end:i=ae(function(e){return zn(t,n,e).top>r},o,i)}}function ir(e,t,n,r){return rr(e,t,n=n||_n(e,t),Xn(e,t,zn(e,n,r),"line").top)}function or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ar(n,e,t,r,i){i-=Jt(e);var o=_n(n,e),a=Kn(e),l=0,s=e.text.length,u=!0,c=ye(e,n.doc.direction);if(c){var f=(n.options.lineWrapping?function(e,t,n,r,i,o,a){var l=rr(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=u||h.to<=s)){var p=1!=h.level,m=zn(e,r,p?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!c||g<f)&&(c=h,f=g)}}c=c||i[i.length-1];c.from<s&&(c={from:s,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(r,i,o,a,l,s,u){var e=ae(function(e){var t=l[e],n=1!=t.level;return or(Zn(r,st(o,n?t.to:t.from,n?"before":"after"),"line",i,a),s,u,!0)},0,l.length-1),t=l[e];if(0<e){var n=1!=t.level,c=Zn(r,st(o,n?t.from:t.to,n?"after":"before"),"line",i,a);or(c,s,u,!0)&&c.top>u&&(t=l[e-1])}return t})(n,e,t,o,c,r,i);l=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,m=null,g=ae(function(e){var t=zn(n,o,e);return t.top+=a,t.bottom+=a,!!or(t,r,i,!1)&&(t.top<=i&&t.left<=r&&(p=e,m=t),!0)},l,s),v=!1;if(m){var y=r-m.left<m.right-r,x=y==u;g=p+(x?0:1),h=x?"after":"before",d=y?m.left:m.right}else{u||g!=s&&g!=l||g++,h=0==g?"after":g==e.text.length?"before":zn(n,o,g-(u?1:0)).bottom+a<=i==u?"after":"before";var b=Zn(n,st(t,g,h),"line",e,o);d=b.left,v=i<b.top||i>=b.bottom}return tr(t,g=oe(e.text,g,1),h,v,r-d)}function lr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=N("pre");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(N("br"));Hn.appendChild(document.createTextNode("x"))}D(e.measure,Hn);var n=Hn.offsetHeight/50;return 3<n&&(e.cachedTextHeight=n),T(e.measure),n||1}function sr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t]);D(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function ur(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:cr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function cr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function fr(r){var i=lr(r.display),o=r.options.lineWrapping,a=o&&Math.max(5,r.display.scroller.clientWidth/sr(r.display)-3);return function(e){if(Kt(r.doc,e))return 0;var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;n++)e.widgets[n].height&&(t+=e.widgets[n].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function dr(e){var t=e.doc,n=fr(e);t.iter(function(e){var t=n(e);t!=e.height&&rt(e,t)})}function hr(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,u=nr(e,o,a);if(r&&1==u.xRel&&(s=et(e.doc,u.line).text).length==u.ch){var c=_(s,s.length,e.options.tabSize)-s.length;u=st(u.line,Math.max(0,Math.round((o-Fn(e.display).left)/sr(e.display))-c))}return u}function pr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function mr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r=r||0;var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Nt&&$t(e.doc,t)<i.viewTo&&vr(e);else if(n<=i.viewFrom)Nt&&Yt(e.doc,n+r)>i.viewFrom?vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)vr(e);else if(t<=i.viewFrom){var o=yr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):vr(e)}else if(n>=i.viewTo){var a=yr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):vr(e)}else{var l=yr(e,t,t,-1),s=yr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(dn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):vr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function gr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[pr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==H(a,n)&&a.push(n)}}}function vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yr(e,t,n,r){var i,o=pr(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(0<r){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;$t(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function xr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function br(e){e.display.input.showSelection(e.display.input.prepareSelection())}function wr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&kr(e,l.head,i),s||Sr(e,l,o)}}return r}function kr(e,t,n){var r=Zn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(N("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Cr(e,t){return e.top-t.top||e.left-t.left}function Sr(a,e,t){var n=a.display,r=a.doc,i=document.createDocumentFragment(),o=Fn(a.display),L=o.left,T=Math.max(n.sizerWidth,On(a)-n.sizer.offsetLeft)-o.right,D="ltr"==r.direction;function A(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?T-e:n)+"px;\n height: "+(r-t)+"px"))}function l(n,y,x){var b,w,o=et(r,n),k=o.text.length;function C(e,t){return Qn(a,st(n,e),"div",o,t)}function S(e,t,n){var r=ir(a,o,null,e),i="ltr"==t==("after"==n)?"left":"right";return C("after"==n?r.begin:r.end-(/\s/.test(o.text.charAt(r.end-1))?2:1),i)[i]}var M=ye(o,r.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(M,y||0,null==x?k:x,function(e,t,n,r){var i="ltr"==n,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),l=null==y&&0==e,s=null==x&&t==k,u=0==r,c=!M||r==M.length-1;if(a.top-o.top<=3){var f=(D?s:l)&&c,d=(D?l:s)&&u?L:(i?o:a).left,h=f?T:(i?a:o).right;A(d,o.top,h-d,o.bottom)}else{var p,m,g,v;v=i?(p=D&&l&&u?L:o.left,m=D?T:S(e,n,"before"),g=D?L:S(t,n,"after"),D&&s&&c?T:a.right):(p=D?S(e,n,"before"):L,m=!D&&l&&u?T:o.right,g=!D&&s&&c?L:a.left,D?S(t,n,"after"):T),A(p,o.top,m-p,o.bottom),o.bottom<a.top&&A(L,o.bottom,null,a.top),A(g,a.top,v-g,a.bottom)}(!b||Cr(o,b)<0)&&(b=o),Cr(a,b)<0&&(b=a),(!w||Cr(o,w)<0)&&(w=o),Cr(a,w)<0&&(w=a)}),{start:b,end:w}}var s=e.from(),u=e.to();if(s.line==u.line)l(s.line,s.ch,u.ch);else{var c=et(r,s.line),f=et(r,u.line),d=Ut(c)==Ut(f),h=l(s.line,s.ch,d?c.text.length+1:null).end,p=l(u.line,d?0:null,u.ch).start;d&&(h.top<p.top-2?(A(h.right,h.top,null,h.bottom),A(L,p.top,p.left,p.bottom)):A(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&A(L,h.bottom,null,p.top)}t.appendChild(i)}function Mr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lr(e){e.state.focused||(e.display.input.focus(),Dr(e))}function Tr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ar(e))},100)}function Dr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,O(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),x&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Mr(e))}function Ar(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Nr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(w&&k<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-n,n=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var c=i.line.height-a;if((.005<c||c<-.005)&&(rt(i.line,a),Fr(i.line),i.rest))for(var f=0;f<i.rest.length;f++)Fr(i.rest[f]);if(l>e.display.sizerWidth){var d=Math.ceil(l/sr(e.display));d>e.display.maxLineLength&&(e.display.maxLineLength=d,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Fr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Er(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-An(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ot(t,r),a=ot(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?a=ot(t,Jt(et(t,o=l))+e.wrapper.clientHeight):Math.min(s,t.lastLine())>=a&&(o=ot(t,Jt(et(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Or(e,t){var n=e.display,r=lr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=In(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Nn(n),s=t.top<r,u=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,d=On(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>d+f-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Ir(e,t){null!=t&&(jr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){jr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Wr(e,t,n){null==t&&null==n||jr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function jr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,_r(e,er(e,t.from),er(e,t.to),t.margin))}function _r(e,t,n,r){var i=Or(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});Wr(e,i.scrollLeft,i.scrollTop)}function zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||fi(e,{top:t}),Hr(e,t,!0),m&&fi(e),ai(e,100))}function Hr(e,t,n){t=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 Br(e,t,n,r){t=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,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Nn(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+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function qr(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}qr.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 o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=b&&!l?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},qr.prototype.enableZeroWidthBar=function(n,r,i){n.style.pointerEvents="auto",r.set(1e3,function e(){var t=n.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=n?n.style.pointerEvents="none":r.set(1e3,e)})},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};function Vr(){}function Gr(e,t){t=t||Rr(e);var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Nr(e),Ur(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(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=""}Vr.prototype.update=function(){return{bottom:0,right:0}},Vr.prototype.setScrollLeft=function(){},Vr.prototype.setScrollTop=function(){},Vr.prototype.clear=function(){};var $r={native:qr,null:Vr};function Yr(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&&L(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new $r[n.options.scrollbarStyle](function(e){n.display.wrapper.insertBefore(e,n.display.scrollbarFiller),be(e,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?Br(n,e):zr(n,e)},n),n.display.scrollbars.addClass&&O(n.display.wrapper,n.display.scrollbars.addClass)}var Kr=0;function Xr(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:++Kr},function(e){hn?hn.ops.push(e):e.ownsGroup=hn={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Jr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{hn=null,t(n)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Qr(t[n]);for(var r=0;r<t.length;r++)(i=t[r]).updatedDisplay=i.mustUpdate&&ui(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Zr(t[o]);for(var a=0;a<t.length;a++)ei(t[a]);for(var l=0;l<t.length;l++)ti(t[l])}(e)})}function Qr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Zt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new si(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Zr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Nr(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Wn(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+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-On(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ei(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),!e.updatedDisplay&&e.startHeight==t.doc.height||Gr(t,e.barMeasure),e.updatedDisplay&&hi(t,e.barMeasure),e.selectionChanged&&Mr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Lr(e.cm)}function ti(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&ci(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Hr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Br(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!Se(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),null!=i&&!u){var o=N("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-An(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?st(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Zn(e,t),s=n&&n!=t?Zn(e,n):l,u=Or(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(zr(e,u.scrollTop),1<Math.abs(e.doc.scrollTop-c)&&(a=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),1<Math.abs(e.doc.scrollLeft-f)&&(a=!0)),!a)break}return i}(t,mt(r,e.scrollToPos.from),mt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Ce(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Ce(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ce(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ni(e,t){if(e.curOp)return t();Xr(e);try{return t()}finally{Jr(e)}}function ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Xr(e);try{return t.apply(e,arguments)}finally{Jr(e)}}}function ii(e){return function(){if(this.curOp)return e.apply(this,arguments);Xr(this);try{return e.apply(this,arguments)}finally{Jr(this)}}}function oi(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Xr(e);try{return t.apply(this,arguments)}finally{Jr(e)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,W(li,e))}function li(s){var u=s.doc;if(!(u.highlightFrontier>=s.display.viewTo)){var c=+new Date+s.options.workTime,f=wt(s,u.highlightFrontier),d=[];u.iter(f.line,Math.min(u.first+u.size,s.display.viewTo+500),function(e){if(f.line>=s.display.viewFrom){var t=e.styles,n=e.text.length>s.options.maxHighlightLength?Xe(u.mode,f.state):null,r=xt(s,e,f,!0);n&&(f.state=n),e.styles=r.styles;var i=e.styleClasses,o=r.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),l=0;!a&&l<t.length;++l)a=t[l]!=e.styles[l];a&&d.push(f.line),e.stateAfter=f.save(),f.nextLine()}else e.text.length<=s.options.maxHighlightLength&&kt(s,e.text,f),e.stateAfter=f.line%5==0?f.save():null,f.nextLine();if(+new Date>c)return ai(s,s.options.workDelay),!0}),u.highlightFrontier=f.line,u.modeFrontier=Math.max(u.modeFrontier,f.line),d.length&&ni(s,function(){for(var e=0;e<d.length;e++)gr(s,d[e],"text")})}}var si=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Er(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=On(e),this.force=n,this.dims=ur(e),this.events=[]};function ui(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return vr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==xr(e))return!1;mi(e)&&(vr(e),t.dims=ur(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Nt&&(o=$t(e.doc,o),a=Yt(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=dn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=dn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(dn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Jt(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=xr(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=E();if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&F(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4<s&&(n.lineDiv.style.display="none"),function(n,e,t){var r=n.display,i=n.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(e){var t=e.nextSibling;return x&&b&&n.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var s=r.view,u=r.viewFrom,c=0;c<s.length;c++){var f=s[c];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=l(a);var d=i&&null!=e&&e<=u&&f.lineNumber;f.changes&&(-1<H(f.changes,"gutter")&&(d=!1),vn(n,f,u,t)),d&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(lt(n.options,u)))),a=f.node.nextSibling}else{var h=(g=u,v=t,void 0,y=xn(p=n,m=f),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),wn(p,m),kn(p,m,g,v),Sn(p,m,v),m.node);o.insertBefore(h,a)}u+=f.size}var p,m,g,v,y;for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),4<s&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ai(e,400)),!(n.updateLineNumbers=null)}function ci(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=On(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Nn(e.display)-In(e),n.top)}),t.visible=Er(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ui(e,t);r=!1){Nr(e);var i=Rr(e);br(e),Gr(e,i),hi(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 fi(e,t){var n=new si(e,t);if(ui(e,n)){Nr(e),ci(e,n);var r=Rr(e);br(e),Gr(e,r),hi(e,r),n.finish()}}function di(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function hi(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+En(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=cr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function mi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lt(e.options,t.first+t.size-1),r=e.display;if(n.length==r.lineNumChars)return!1;var i=r.measure.appendChild(N("div",[N("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",di(e.display),!0}function gi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function vi(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(N("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&((e.lineGutter=l).style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",di(e)}function yi(e){vi(e.display),mr(e),pi(e)}function xi(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=N("div",null,"CodeMirror-cursors"),i.measure=N("div",null,"CodeMirror-measure"),i.lineMeasure=N("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=N("div",[o],null,"position: relative"),i.sizer=N("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=N("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),i.gutters=N("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=N("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=N("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),w&&k<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),x||m&&d||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=gi(r.gutters,r.lineNumbers),vi(i),n.init(i)}si.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},si.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ce.apply(null,this.events[e])};var bi=0,wi=null;function ki(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Ci(e){var t=ki(e);return t.x*=wi,t.y*=wi,t}function Si(e,t){var n=ki(t),r=n.x,i=n.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&b&&x)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(r&&!m&&!g&&null!=wi)return i&&s&&zr(e,Math.max(0,a.scrollTop+i*wi)),Br(e,Math.max(0,a.scrollLeft+r*wi)),(!i||i&&s)&&De(t),void(o.wheelStartX=null);if(i&&null!=wi){var d=i*wi,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;d<0?h=Math.max(0,h+d-50):p=Math.min(e.doc.height,p+d+50),fi(e,{top:h,bottom:p})}bi<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(wi=(wi*bi+n)/(bi+1),++bi)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}w?wi=-.53:m?wi=15:a?wi=-.7:s&&(wi=-1/3);var Mi=function(e,t){this.ranges=e,this.primIndex=t};Mi.prototype.primary=function(){return this.ranges[this.primIndex]},Mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ct(n.anchor,r.anchor)||!ct(n.head,r.head))return!1}return!0},Mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Li(ft(this.ranges[t].anchor),ft(this.ranges[t].head));return new Mi(e,this.primIndex)},Mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Mi.prototype.contains=function(e,t){t=t||e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(0<=ut(t,r.from())&&ut(e,r.to())<=0)return n}return-1};var Li=function(e,t){this.anchor=e,this.head=t};function Ti(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ut(e.from(),t.from())}),n=H(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ut(l.to(),a.from());if(r&&!a.empty()?0<s:0<=s){var u=ht(l.from(),a.from()),c=dt(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Li(f?c:u,f?u:c))}}return new Mi(t,n)}function Di(e,t){return new Mi([new Li(e,t||e)],0)}function Ai(e){return e.text?st(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ni(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Ai(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+=Ai(t).ch-t.to.ch),st(n,r)}function Fi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Li(Ni(i.anchor,t),Ni(i.head,t)))}return Ti(e.cm,n,e.sel.primIndex)}function Ei(e,t,n){return e.line==t.line?st(n.line,e.ch-t.ch+n.ch):st(n.line+(e.line-t.line),e.ch)}function Oi(e){e.doc.mode=$e(e.options,e.doc.modeOption),Ii(e)}function Ii(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ai(e,100),e.state.modeGen++,e.curOp&&mr(e)}function Pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wi(e,r,t,i){function o(e){return t?t[e]:null}function n(e,t,n){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Wt(e),jt(e,n);var i=r?r(e):1;i!=e.height&&rt(e,i)}(e,t,n,i),mn(e,"change",e,r)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new en(u[r],o(r),i));return n}var l=r.from,s=r.to,u=r.text,c=et(e,l.line),f=et(e,s.line),d=K(u),h=o(u.length-1),p=s.line-l.line;if(r.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Pi(e,r)){var m=a(0,u.length-1);n(f,f.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(c==f)if(1==u.length)n(c,c.text.slice(0,l.ch)+d+c.text.slice(s.ch),h);else{var g=a(1,u.length-1);g.push(new en(d+c.text.slice(s.ch),h,i)),n(c,c.text.slice(0,l.ch)+u[0],o(0)),e.insert(l.line+1,g)}else if(1==u.length)n(c,c.text.slice(0,l.ch)+u[0]+f.text.slice(s.ch),o(0)),e.remove(l.line+1,p);else{n(c,c.text.slice(0,l.ch)+u[0],o(0)),n(f,d+f.text.slice(s.ch),h);var v=a(1,u.length-1);1<p&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}mn(e,"change",e,r)}function ji(e,l,s){!function e(t,n,r){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=n){var a=r&&o.sharedHist;s&&!a||(l(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function _i(e,t){if(t.cm)throw new Error("This document is already in use.");dr((e.doc=t).cm=e),Oi(e),zi(e),e.options.lineWrapping||Zt(e),e.options.mode=t.modeOption,mr(e)}function zi(e){("rtl"==e.doc.direction?O:L)(e.display.lineDiv,"CodeMirror-rtl")}function Hi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Bi(e,t){var n={from:ft(t.from),to:Ai(t),text:tt(e,t.from,t.to)};return Ui(e,n,t.from.line,t.to.line+1),ji(e,function(e){return Ui(e,n,t.from.line,t.to.line+1)},!0),n}function Ri(e){for(;e.length;){if(!K(e).ranges)break;e.pop()}}function qi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Ri(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}(i,i.lastOp==r)))a=K(o.changes),0==ut(t.from,t.to)&&0==ut(t.from,a.to)?a.to=Ai(t):o.changes.push(Bi(e,t));else{var s=K(i.done);for(s&&s.ranges||Gi(e.sel,i.done),o={changes:[Bi(e,t)],generation:i.generation},i.done.push(o);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=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ce(e,"historyAdded")}function Vi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(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)}(e,o,K(i.done),t))?i.done[i.done.length-1]=t:Gi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ri(i.undone)}function Gi(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ui(t,n,e,r){var i=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,r),function(e){e.markedSpans&&((i=i||(n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function $i(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t=t||e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function Yi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push($i(n[i]));return r}(e,t),r=It(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Ki(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Mi.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&-1<H(t,Number(c[1]))&&(K(l)[f]=u[f],delete u[f])}}}return r}function Xi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ut(t,i)<0;o!=ut(n,i)<0?(i=t,t=n):o!=ut(t,n)<0&&(t=n)}return new Li(i,t)}return new Li(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),no(e,new Mi([Xi(e.sel.primary(),t,n,i)],0),r)}function Qi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Xi(e.sel.ranges[o],t[o],null,i);no(e,Ti(e.cm,r,e.sel.primIndex),n)}function Zi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,no(e,Ti(e.cm,i,e.sel.primIndex),r)}function eo(e,t,n,r){no(e,Di(t,n),r)}function to(e,t,n){var r=e.history.done,i=K(r);i&&i.ranges?ro(e,r[r.length-1]=t,n):no(e,t,n)}function no(e,t,n){ro(e,t,n),Vi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ro(e,t,n){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=function(n,e,t){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new Li(mt(n,e[t].anchor),mt(n,e[t].head))},origin:t&&t.origin};return Ce(n,"beforeSelectionChange",n,r),n.cm&&Ce(n.cm,"beforeSelectionChange",n.cm,r),r.ranges!=e.ranges?Ti(n.cm,r.ranges,r.ranges.length-1):e}(e,t,n));var r=n&&n.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);io(e,ao(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Pr(e.cm)}function io(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Me(e.cm)),mn(e,"cursorActivity",e))}function oo(e){io(e,ao(e,e.sel,null,!1))}function ao(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=so(e,a.anchor,l&&l.anchor,n,r),u=so(e,a.head,l&&l.head,n,r);!i&&s==a.anchor&&u==a.head||((i=i||t.ranges.slice(0,o))[o]=new Li(s,u))}return i?Ti(e.cm,i,t.primIndex):t}function lo(e,t,n,r,i){var o=et(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(u?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?l.to>=t.ch:l.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var f=s.find(r<0?1:-1),d=void 0;if((r<0?c:u)&&(f=uo(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=ut(f,n))&&(r<0?d<0:0<d))return lo(e,f,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?u:c)&&(h=uo(e,h,r,h.line==t.line?o:null)),h?lo(e,h,t,r,i):null}}return t}function so(e,t,n,r,i){var o=r||1,a=lo(e,t,n,o,i)||!i&&lo(e,t,n,o,!0)||lo(e,t,n,-o,i)||!i&&lo(e,t,n,-o,!0);return a||(e.cantEdit=!0,st(e.first,0))}function uo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?mt(e,st(t.line-1)):null:0<n&&t.ch==(r||et(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+n)}function co(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),q)}function fo(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,n,r){e&&(o.from=mt(i,e)),t&&(o.to=mt(i,t)),n&&(o.text=n),void 0!==r&&(o.origin=r)}),Ce(i,"beforeChange",i,o),i.cm&&Ce(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function ho(e,t,n){if(e.cm){if(!e.cm.curOp)return ri(e.cm,ho)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))||(t=fo(e,t,!0))){var r=At&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r=r||[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(ut(u.to,l.from)<0||0<ut(u.from,l.to))){var c=[s,1],f=ut(u.from,l.from),d=ut(u.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:l.from}),(0<d||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;0<=i;--i)po(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else po(e,t)}}function po(e,n){if(1!=n.text.length||""!=n.text[0]||0!=ut(n.from,n.to)){var t=Fi(e,n);qi(e,n,t,e.cm?e.cm.curOp.id:NaN),vo(e,n,t,It(e,n));var r=[];ji(e,function(e,t){t||-1!=H(r,e.history)||(wo(e.history,n),r.push(e.history)),vo(e,n,null,It(e,n))})}}function mo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,n=i.history,r=i.sel,l="undo"==o?n.done:n.undone,s="undo"==o?n.undone:n.done,u=0;u<l.length&&(a=l[u],e?!a.ranges||a.equals(i.sel):a.ranges);u++);if(u!=l.length){for(n.lastOrigin=n.lastSelOrigin=null;;){if(!(a=l.pop()).ranges){if(t)return void l.push(a);break}if(Gi(a,s),e&&!a.equals(i.sel))return void no(i,a,{clearRedo:!1});r=a}var c=[];Gi(r,s),s.push({changes:c,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var f=Le(i,"beforeChange")||i.cm&&Le(i.cm,"beforeChange"),d=function(e){var n=a.changes[e];if(n.origin=o,f&&!fo(i,n,!1))return l.length=0,{};c.push(Bi(i,n));var t=e?Fi(i,n):K(l);vo(i,n,t,Yi(i,n)),!e&&i.cm&&i.cm.scrollIntoView({from:n.from,to:Ai(n)});var r=[];ji(i,function(e,t){t||-1!=H(r,e.history)||(wo(e.history,n),r.push(e.history)),vo(e,n,null,Yi(e,n))})},h=a.changes.length-1;0<=h;--h){var p=d(h);if(p)return p.v}}}}function go(e,t){if(0!=t&&(e.first+=t,e.sel=new Mi(X(e.sel.ranges,function(e){return new Li(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)gr(e.cm,r,"gutter")}}function vo(e,t,n,r){if(e.cm&&!e.cm.curOp)return ri(e.cm,vo)(e,t,n,r);if(t.to.line<e.first)go(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);go(e,i),t={from:st(e.first,0),to:st(t.to.line+i,t.to.ch),text:[K(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:st(o,et(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),n=n||Fi(e,t),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=it(Ut(et(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0}));-1<r.sel.contains(t.from,t.to)&&Me(e);Wi(r,t,n,fr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=Qt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;n<r;r--){var i=et(e,r).stateAfter;if(i&&(!(i instanceof vt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}})(r,o.line),ai(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?mr(e):o.line!=a.line||1!=t.text.length||Pi(e.doc,t)?mr(e,o.line,a.line+1,u):gr(e,o.line,"text");var c=Le(e,"changes"),f=Le(e,"change");if(f||c){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&mn(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Wi(e,t,r),ro(e,n,q)}}function yo(e,t,n,r,i){var o;ut(r=r||n,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ho(e,{from:n,to:r,text:t,origin:i})}function xo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function bo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)xo(o.ranges[l].anchor,t,n,r),xo(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=st(u.from.line+r,u.from.ch),u.to=st(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function wo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;bo(e.done,n,r,i),bo(e.undone,n,r,i)}function ko(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=et(e,pt(e,t)):i=it(t),null==i?null:(r(o,i)&&e.cm&&gr(e.cm,i,n),o)}function Co(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function So(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Li.prototype.from=function(){return ht(this.anchor,this.head)},Li.prototype.to=function(){return dt(this.anchor,this.head)},Li.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Co.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n,r=e,i=e+t;r<i;++r){var o=this.lines[r];this.height-=o.height,(n=o).parent=null,Wt(n),mn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},So.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(1<this.children.length||!(this.children[0]instanceof Co))){var l=[];this.collapse(l),this.children=[new Co(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&50<i.lines.length){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Co(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new So(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new So(e.children);(r.parent=e).children=[r,t],e=r}t.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};function Mo(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t}function Lo(e,t,n){Jt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ir(e,n)}Mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=it(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Tn(this);rt(n,Math.max(0,n.height-o)),e&&(ni(e,function(){Lo(e,n,-o),gr(e,r,"widget")}),mn(e,"lineWidgetCleared",e,this,r))}},Mo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Tn(this)-t;i&&(Kt(this.doc,r)||rt(r,r.height+i),n&&ni(n,function(){n.curOp.forceUpdate=!0,Lo(n,r,i),mn(n,"lineWidgetChanged",n,e,it(r))}))},Te(Mo);var To=0,Do=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++To};function Ao(t,n,r,e,i){if(e&&e.shared)return function(e,n,r,i,o){(i=j(i)).shared=!1;var a=[Ao(e,n,r,i,o)],l=a[0],s=i.widgetNode;return ji(e,function(e){s&&(i.widgetNode=s.cloneNode(!0)),a.push(Ao(e,mt(e,n),mt(e,r),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;l=K(a)}),new No(a,l)}(t,n,r,e,i);if(t.cm&&!t.cm.curOp)return ri(t.cm,Ao)(t,n,r,e,i);var o=new Do(t,i),a=ut(n,r);if(e&&j(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Gt(t,n.line,n,r,o)||n.line!=r.line&&Gt(t,r.line,n,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt=!0}o.addToHistory&&qi(t,{from:n,to:r,origin:"markText"},t.sel,NaN);var l,s=n.line,u=t.cm;if(t.iter(s,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ut(e)==u.display.maxLine&&(l=!0),o.collapsed&&s!=n.line&&rt(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ft(o,s==n.line?n.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&t.iter(n.line,r.line+1,function(e){Kt(t,e)&&rt(e,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(At=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++To,o.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),o.collapsed)mr(u,n.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=n.line;c<=r.line;c++)gr(u,c,"text");o.atomic&&oo(u.doc),mn(u,"markerAdded",u,o)}return o}Do.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&Xr(t),Le(this,"clear")){var r=this.find();r&&mn(this,"clear",r.from,r.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=e.lines[a],s=Et(l.markedSpans,e);t&&!e.collapsed?gr(t,it(l),"text"):t&&(null!=s.to&&(o=it(l)),null!=s.from&&(i=it(l))),l.markedSpans=Ot(l.markedSpans,s),null==s.from&&e.collapsed&&!Kt(e.doc,l)&&t&&rt(l,lr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=Ut(e.lines[u]),f=Qt(c);f>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&oo(t.doc)),t&&mn(t,"markerCleared",t,this,i,o),n&&Jr(t),this.parent&&this.parent.clear()}},Do.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Et(o.markedSpans,this);if(null!=a.from&&(n=st(t?o:it(o),a.from),-1==e))return n;if(null!=a.to&&(r=st(t?o:it(o),a.to),1==e))return r}return n&&{from:n,to:r}},Do.prototype.changed=function(){var o=this,a=this.find(-1,!0),l=this,s=this.doc.cm;a&&s&&ni(s,function(){var e=a.line,t=it(a.line),n=jn(s,t);if(n&&(Vn(n),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Kt(l.doc,e)&&null!=l.height){var r=l.height;l.height=null;var i=Tn(l)-r;i&&rt(e,e.height+i)}mn(s,"markerChanged",s,o)})},Do.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Do.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Te(Do);var No=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Fo(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),function(e){return e.parent})}function Eo(o){for(var e=function(e){var t=o[e],n=[t.primary.doc];ji(t.primary.doc,function(e){return n.push(e)});for(var r=0;r<t.markers.length;r++){var i=t.markers[r];-1==H(n,i.doc)&&(i.parent=null,t.markers.splice(r--,1))}},t=0;t<o.length;t++)e(t)}No.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();mn(this,"clear")}},No.prototype.find=function(e,t){return this.primary.find(e,t)},Te(No);var Oo=0,Io=function(e,t,n,r,i){if(!(this instanceof Io))return new Io(e,t,n,r,i);null==n&&(n=0),So.call(this,[new Co([new en("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=st(n,0);this.sel=Di(o),this.history=new Hi(null),this.id=++Oo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Wi(this,{from:o,to:o,text:e}),no(this,Di(o),q)};Io.prototype=Q(So.prototype,{constructor:Io,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=nt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:oi(function(e){var t=st(this.first,0),n=this.first+this.size-1;ho(this,{from:t,to:st(n,et(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Wr(this.cm,0,0),no(this,Di(t),q)}),replaceRange:function(e,t,n,r){yo(this,e,t=mt(this,t),n=n?mt(this,n):t,r)},getRange:function(e,t,n){var r=tt(this,mt(this,e),mt(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return et(this,e)},getLineNumber:function(e){return it(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),Ut(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return mt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oi(function(e,t,n){eo(this,mt(this,"number"==typeof e?st(e,t||0):e),null,n)}),setSelection:oi(function(e,t,n){eo(this,mt(this,e),mt(this,t||e),n)}),extendSelection:oi(function(e,t,n){Ji(this,mt(this,e),t&&mt(this,t),n)}),extendSelections:oi(function(e,t){Qi(this,gt(this,e),t)}),extendSelectionsBy:oi(function(e,t){Qi(this,gt(this,X(this.sel.ranges,e)),t)}),setSelections:oi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Li(mt(this,e[i].anchor),mt(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),no(this,Ti(this.cm,r,t),n)}}),addSelection:oi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Li(mt(this,e),mt(this,t||e))),no(this,Ti(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=tt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:oi(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],i=st(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ei(l.from,i,o),u=Ei(Ai(l),i,o);if(i=l.to,o=u,"around"==n){var c=e.sel.ranges[a],f=ut(c.head,c.anchor)<0;r[a]=new Li(f?u:s,f?s:u)}else r[a]=new Li(s,s)}return new Mi(r,e.sel.primIndex)}(this,r,t),s=r.length-1;0<=s;s--)ho(this,r[s]);l?to(this,l):this.cm&&Pr(this.cm)}),undo:oi(function(){mo(this,"undo")}),redo:oi(function(){mo(this,"redo")}),undoSelection:oi(function(){mo(this,"undo",!0)}),redoSelection:oi(function(){mo(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.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new Hi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Hi(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:oi(function(e,n,r){return ko(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[n]=r)&&ne(t)&&(e.gutterMarkers=null),!0})}),clearGutter:oi(function(t){var n=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ko(n,e,"gutter",function(){return e.gutterMarkers[t]=null,ne(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!at(this,e))return null;if(!(e=et(this,t=e)))return null}else if(null==(t=it(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:oi(function(e,n,r){return ko(this,e,"gutter"==n?"gutter":"class",function(e){var t="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(e[t]){if(S(r).test(e[t]))return!1;e[t]+=" "+r}else e[t]=r;return!0})}),removeLineClass:oi(function(e,o,a){return ko(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",n=e[t];if(!n)return!1;if(null==a)e[t]=null;else{var r=n.match(S(a));if(!r)return!1;var i=r.index+r[0].length;e[t]=n.slice(0,r.index)+(r.index&&i!=n.length?" ":"")+n.slice(i)||null}return!0})}),addLineWidget:oi(function(e,t,n){return function(r,e,t,n){var i=new Mo(r,t,n),o=r.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ko(r,e,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==i.insertAt?t.push(i):t.splice(Math.min(t.length-1,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!Kt(r,e)){var n=Jt(e)<r.scrollTop;rt(e,e.height+Tn(i)),n&&Ir(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&mn(o,"lineWidgetAdded",o,i,"number"==typeof e?e:it(e)),i}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ao(this,mt(this,e),mt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ao(this,e=mt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=et(this,(e=mt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,a){i=mt(this,i),o=mt(this,o);var l=[],s=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;n++){var r=t[n];null!=r.to&&s==i.line&&i.ch>=r.to||null==r.from&&s!=i.line||null!=r.from&&s==o.line&&r.from>=o.ch||a&&!a(r.marker)||l.push(r.marker.parent||r.marker)}++s}),l},getAllMarks:function(){var r=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;n<t.length;++n)null!=t[n].from&&r.push(t[n].marker)}),r},posFromIndex:function(n){var r,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(n<t)return r=n,!0;n-=t,++i}),mt(this,st(i,r))},indexFromPos:function(e){var t=(e=mt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Io(nt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e=e||{};var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Io(nt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ut(o,a)){var l=Ao(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,Fo(this)),r},unlinkDoc:function(e){if(e instanceof Na&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Eo(Fo(this));break}}if(e.history==this.history){var n=[e.id];ji(e,function(e){return n.push(e.id)},!0),e.history=new Hi(null),e.history.done=Ki(this.history.done,n),e.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(e){ji(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):He(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:oi(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){ni(e,function(){zi(e),mr(e)})}(this.cm))})}),Io.prototype.eachLine=Io.prototype.iter;var Po=0;function Wo(e){var i=this;if(jo(i),!Se(i,e)&&!Dn(i.display,e)){De(e),w&&(Po=+new Date);var o=hr(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var a=t.length,l=Array(a),s=0,n=function(e,n){if(!i.options.allowDropFileTypes||-1!=H(i.options.allowDropFileTypes,e.type)){var r=new FileReader;r.onload=ri(i,function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),l[n]=e,++s==a){var t={from:o=mt(i.doc,o),to:o,text:i.doc.splitLines(l.join(i.doc.lineSeparator())),origin:"paste"};ho(i.doc,t),to(i.doc,Di(o,Ai(t)))}}),r.readAsText(e)}},r=0;r<a;++r)n(t[r],r);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var c;if(i.state.draggingText&&!i.state.draggingText.copy&&(c=i.listSelections()),ro(i.doc,Di(o,o)),c)for(var f=0;f<c.length;++f)yo(i.doc,"",c[f].anchor,c[f].head,"drag");i.replaceSelection(u,"around","paste"),i.display.input.focus()}}catch(e){}}}}function jo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _o(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var i=e[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var zo=!1;function Ho(){zo||(function(){var e;be(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,_o(Bo)},100))}),be(window,"blur",function(){return _o(Ar)})}(),zo=!0)}function Bo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ro={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},qo=0;qo<10;qo++)Ro[qo+48]=Ro[qo+96]=String(qo);for(var Vo=65;Vo<=90;Vo++)Ro[Vo]=String.fromCharCode(Vo);for(var Go=1;Go<=12;Go++)Ro[Go+111]=Ro[Go+63235]="F"+Go;var Uo={};function $o(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Yo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=X(n.split(" "),$o),o=0;o<i.length;o++){var a=void 0,l=void 0;a=o==i.length-1?(l=i.join(" "),r):(l=i.slice(0,o+1).join(" "),"...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function Ko(e,t,n,r){var i=(t=Zo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ko(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ko(e,t.fallthrough[o],n,r);if(a)return a}}}function Xo(e){var t="string"==typeof e?e:Ro[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Jo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Qo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var n=Ro[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Jo(n,e,t))}function Zo(e){return"string"==typeof e?Uo[e]:e}function ea(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&ut(o.from,K(r).to)<=0;){var a=r.pop();if(ut(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}ni(t,function(){for(var e=r.length-1;0<=e;e--)yo(t.doc,"",r[e].from,r[e].to,"+delete");Pr(t)})}function ta(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function na(e,t,n){var r=ta(e,t.ch,n);return null==r?null:new st(t.line,r,n<0?"after":"before")}function ra(e,t,n,r,i){if(e){var o=ye(n,t.doc.direction);if(o){var a,l=i<0?K(o):o[0],s=i<0==(1==l.level)?"after":"before";if(0<l.level||"rtl"==t.doc.direction){var u=_n(t,n);a=i<0?n.text.length-1:0;var c=zn(t,u,a).top;a=ae(function(e){return zn(t,u,e).top==c},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=ta(n,a,1))}else a=i<0?l.to:l.from;return new st(r,a,s)}}return new st(r,i<0?n.text.length:0,i<0?"before":"after")}Uo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Uo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Uo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Uo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Uo.default=b?Uo.macDefault:Uo.pcDefault;var ia={selectAll:co,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(n){return ea(n,function(e){if(e.empty()){var t=et(n.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<n.lastLine()?{from:e.head,to:st(e.head.line+1,0)}:{from:e.head,to:st(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return ea(t,function(e){return{from:st(e.from().line,0),to:mt(t.doc,st(e.to().line+1,0))}})},delLineLeft:function(e){return ea(e,function(e){return{from:st(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(n){return ea(n,function(e){var t=n.charCoords(e.head,"div").top+5;return{from:n.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(r){return ea(r,function(e){var t=r.charCoords(e.head,"div").top+5,n=r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return oa(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return aa(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var n=et(e.doc,t),r=function(e){for(var t;t=qt(e);)e=t.find(1,!0).line;return e}(n);r!=n&&(t=it(r));return ra(!0,e,n,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div")},G)},goLineLeft:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5;return n.coordsChar({left:0,top:t},"div")},G)},goLineLeftSmart:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5,n=r.coordsChar({left:0,top:t},"div");return n.ch<r.getLine(n.line).search(/\S/)?aa(r,e.head):n},G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=_(e.getLine(o.line),o.ch,r);t.push(Y(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return ni(a,function(){for(var e=a.listSelections(),t=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,i=et(a.doc,r.line).text;if(i)if(r.ch==i.length&&(r=new st(r.line,r.ch-1)),0<r.ch)r=new st(r.line,r.ch+1),a.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),st(r.line,r.ch-2),r,"+transpose");else if(r.line>a.doc.first){var o=et(a.doc,r.line-1).text;o&&(r=new st(r.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),st(r.line-1,o.length-1),r,"+transpose"))}t.push(new Li(r,r))}a.setSelections(t)})},newlineAndIndent:function(r){return ni(r,function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=r.listSelections();for(var n=0;n<e.length;n++)r.indentLine(e[n].from().line,null,!0);Pr(r)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function oa(e,t){var n=et(e.doc,t),r=Ut(n);return r!=n&&(t=it(r)),ra(!0,e,r,t,1)}function aa(e,t){var n=oa(e,t.line),r=et(e.doc,n.line),i=ye(r,e.doc.direction);if(i&&0!=i[0].level)return n;var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return st(n.line,a?0:o,n.sticky)}function la(e,t,n){if("string"==typeof t&&!(t=ia[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=R}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var sa=new z;function ua(e,t,n,r){var i=e.state.keySeq;if(i){if(Xo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:sa.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ca(e,i+" "+t,n,r))return!0}return ca(e,t,n,r)}function ca(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ko(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ko(t,e.options.extraKeys,n,e)||Ko(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&mn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(De(n),Mr(e)),!!i}function fa(t,e){var n=Qo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ua(t,"Shift-"+n,e,function(e){return la(t,e,!0)})||ua(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return la(t,e)}):ua(t,n,e,function(e){return la(t,e)}))}var da=null;function ha(e){var t=this;if(t.curOp.focus=E(),!Se(t,e)){w&&k<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=fa(t,e);g&&(da=r?n:null,!r&&88==n&&!Re&&(b?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),ke(document,"keyup",n),ke(document,"mouseover",n))}O(t,"CodeMirror-crosshair"),be(document,"keyup",n),be(document,"mouseover",n)}(t)}}function pa(e){16==e.keyCode&&(this.doc.sel.shift=!1),Se(this,e)}function ma(e){var t=this;if(!(Dn(t.display,e)||Se(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(g&&n==da)return da=null,void De(e);if(!g||e.which&&!(e.which<10)||!fa(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"==i||function(t,e,n){return ua(t,"'"+n+"'",e,function(e){return la(t,e,!0)})}(t,e,i)||t.display.input.onKeyPress(e)}}}var ga,va,ya=function(e,t,n){this.time=e,this.pos=t,this.button=n};function xa(e){var t=this,n=t.display;if(!(Se(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Dn(n,e))x||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!ka(t,e)){var r=hr(t,e),i=Oe(e),o=r?function(e,t){var n=+new Date;return va&&va.compare(n,e,t)?(ga=va=null,"triple"):ga&&ga.compare(n,e,t)?(va=new ya(n,e,t),ga=null,"double"):(ga=new ya(n,e,t),va=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(n,e,r,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ua(n,Jo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=ia[e]),!e)return!1;var t=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),t=e(n,r)!=R}finally{n.state.suppressEdits=!1}return t})}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){w?setTimeout(W(Lr,e),0):e.curOp.focus=E();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=h?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}null!=i.extend&&!e.doc.extend||(i.extend=e.doc.extend||n.shiftKey);null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey));return i}(e,n,r),a=e.doc.sel;e.options.dragDrop&&We&&!e.isReadOnly()&&"single"==n&&-1<(i=a.contains(t))&&(ut((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ut(i.to(),t)||t.xRel<0)?function(t,n,r,i){var o=t.display,a=!1,l=ri(t,function(e){x&&(o.scroller.draggable=!1),t.state.draggingText=!1,ke(o.wrapper.ownerDocument,"mouseup",l),ke(o.wrapper.ownerDocument,"mousemove",s),ke(o.scroller,"dragstart",u),ke(o.scroller,"drop",l),a||(De(e),i.addNew||Ji(t.doc,r,null,null,i.extend),x||w&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),s=function(e){a=a||10<=Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)},u=function(){return a=!0};x&&(o.scroller.draggable=!0);(t.state.draggingText=l).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();be(o.wrapper.ownerDocument,"mouseup",l),be(o.wrapper.ownerDocument,"mousemove",s),be(o.scroller,"dragstart",u),be(o.scroller,"drop",l),Tr(t),setTimeout(function(){return o.input.focus()},20)}(e,r,t,o):function(g,e,v,y){var a=g.display,x=g.doc;De(e);var b,w,k=x.sel,t=k.ranges;y.addNew&&!y.extend?(w=x.sel.contains(v),b=-1<w?t[w]:new Li(v,v)):(b=x.sel.primary(),w=x.sel.primIndex);if("rectangle"==y.unit)y.addNew||(b=new Li(v,v)),v=hr(g,e,!0,!0),w=-1;else{var n=ba(g,v,y.unit);b=y.extend?Xi(b,n.anchor,n.head,y.extend):n}y.addNew?-1==w?(w=t.length,no(x,Ti(g,t.concat([b]),w),{scroll:!1,origin:"*mouse"})):1<t.length&&t[w].empty()&&"char"==y.unit&&!y.extend?(no(x,Ti(g,t.slice(0,w).concat(t.slice(w+1)),0),{scroll:!1,origin:"*mouse"}),k=x.sel):Zi(x,w,b,V):(no(x,new Mi([b],w=0),V),k=x.sel);var C=v;function l(e){if(0!=ut(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],n=g.options.tabSize,r=_(et(x,v.line).text,v.ch,n),i=_(et(x,e.line).text,e.ch,n),o=Math.min(r,i),a=Math.max(r,i),l=Math.min(v.line,e.line),s=Math.min(g.lastLine(),Math.max(v.line,e.line));l<=s;l++){var u=et(x,l).text,c=U(u,o,n);o==a?t.push(new Li(st(l,c),st(l,c))):u.length>c&&t.push(new Li(st(l,c),st(l,U(u,a,n))))}t.length||t.push(new Li(v,v)),no(x,Ti(g,k.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var f,d=b,h=ba(g,e,y.unit),p=d.anchor;p=0<ut(h.anchor,p)?(f=h.head,ht(d.from(),h.anchor)):(f=h.anchor,dt(d.to(),h.head));var m=k.ranges.slice(0);m[w]=function(e,t){var n=t.anchor,r=t.head,i=et(e.doc,n.line);if(0==ut(n,r)&&n.sticky==r.sticky)return t;var o=ye(i);if(!o)return t;var a=se(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=0<(r.line-n.line)*("ltr"==e.doc.direction?1:-1);else{var c=se(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);s=c==u-1||c==u?f<0:0<f}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Li(new st(n.line,p,m),r)}(g,new Li(mt(x,p),f)),no(x,Ti(g,m,w),V)}}var s=a.wrapper.getBoundingClientRect(),u=0;function r(e){g.state.selectingText=!1,u=1/0,e&&(De(e),a.input.focus()),ke(a.wrapper.ownerDocument,"mousemove",i),ke(a.wrapper.ownerDocument,"mouseup",o),x.history.lastSelOrigin=null}var i=ri(g,function(e){0!==e.buttons&&Oe(e)?function e(t){var n=++u,r=hr(g,t,!0,"rectangle"==y.unit);if(r)if(0!=ut(r,C)){g.curOp.focus=E(),l(r);var i=Er(a,x);(r.line>=i.to||r.line<i.from)&&setTimeout(ri(g,function(){u==n&&e(t)}),150)}else{var o=t.clientY<s.top?-20:t.clientY>s.bottom?20:0;o&&setTimeout(ri(g,function(){u==n&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):r(e)}),o=ri(g,r);g.state.selectingText=o,be(a.wrapper.ownerDocument,"mousemove",i),be(a.wrapper.ownerDocument,"mouseup",o)}(e,r,t,o)}(t,r,o,e):Ee(e)==n.scroller&&De(e):2==i?(r&&Ji(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(C?t.display.input.onContextMenu(e):Tr(t)))}}function ba(e,t,n){if("char"==n)return new Li(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Li(st(t.line,0),mt(e.doc,st(t.line+1,0)));var r=n(e,t);return new Li(r.from,r.to)}function wa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&De(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,n))return Ne(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i)return Ce(e,n,e,ot(e.doc,o),e.display.gutterSpecs[s].className,t),Ne(t)}}function ka(e,t){return wa(e,t,"gutterClick",!0)}function Ca(e,t){Dn(e.display,t)||function(e,t){return!!Le(e,"gutterContextMenu")&&wa(e,t,"gutterContextMenu",!1)}(e,t)||Se(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Sa(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)}ya.prototype.compare=function(e,t,n){return this.time+400>e&&0==ut(t,this.pos)&&n==this.button};var Ma={toString:function(){return"CodeMirror.Init"}},La={},Ta={};function Da(e,t,n){if(!t!=!(n&&n!=Ma)){var r=e.display.dragFunctions,i=t?be:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Aa(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Zt(e)),dr(e),mr(e),Un(e),setTimeout(function(){return Gr(e)},100)}function Na(e,t){var n=this;if(!(this instanceof Na))return new Na(e,t);this.options=t=t?j(t):{},j(La,t,!1);var r=t.value;"string"==typeof r?r=new Io(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Na.inputStyles[t.inputStyle](this),o=this.display=new xi(e,r,i,t);for(var a in Sa(o.wrapper.CodeMirror=this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Yr(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 z,keySeq:null,specialChars:null},t.autofocus&&!d&&o.input.focus(),w&&k<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(i){var o=i.display;be(o.scroller,"mousedown",ri(i,xa)),be(o.scroller,"dblclick",w&&k<11?ri(i,function(e){if(!Se(i,e)){var t=hr(i,e);if(t&&!ka(i,e)&&!Dn(i.display,e)){De(e);var n=i.findWordAt(t);Ji(i.doc,n.anchor,n.head)}}}):function(e){return Se(i,e)||De(e)});be(o.scroller,"contextmenu",function(e){return Ca(i,e)});var n,r={end:0};function a(){o.activeTouch&&(n=setTimeout(function(){return o.activeTouch=null},1e3),(r=o.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400<n*n+r*r}be(o.scroller,"touchstart",function(e){if(!Se(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ka(i,e)){o.input.ensurePolled(),clearTimeout(n);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-r.end<=300?r:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),be(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),be(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!Dn(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var n,r=i.coordsChar(o.activeTouch,"page");n=!t.prev||l(t,t.prev)?new Li(r,r):!t.prev.prev||l(t,t.prev.prev)?i.findWordAt(r):new Li(st(r.line,0),mt(i.doc,st(r.line+1,0))),i.setSelection(n.anchor,n.head),i.focus(),De(e)}a()}),be(o.scroller,"touchcancel",a),be(o.scroller,"scroll",function(){o.scroller.clientHeight&&(zr(i,o.scroller.scrollTop),Br(i,o.scroller.scrollLeft,!0),Ce(i,"scroll",i))}),be(o.scroller,"mousewheel",function(e){return Si(i,e)}),be(o.scroller,"DOMMouseScroll",function(e){return Si(i,e)}),be(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){Se(i,e)||Fe(e)},over:function(e){Se(i,e)||(function(e,t){var n=hr(e,t);if(n){var r=document.createDocumentFragment();kr(e,n,r),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,r)}}(i,e),Fe(e))},start:function(e){return function(e,t){if(w&&(!e.state.draggingText||+new Date-Po<100))Fe(t);else if(!Se(e,t)&&!Dn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!s)){var n=N("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),g&&n.parentNode.removeChild(n)}}(i,e)},drop:ri(i,Wo),leave:function(e){Se(i,e)||jo(i)}};var e=o.input.getField();be(e,"keyup",function(e){return pa.call(i,e)}),be(e,"keydown",ri(i,ha)),be(e,"keypress",ri(i,ma)),be(e,"focus",function(e){return Dr(i,e)}),be(e,"blur",function(e){return Ar(i,e)})}(this),Ho(),Xr(this),this.curOp.forceUpdate=!0,_i(this,r),t.autofocus&&!d||this.hasFocus()?setTimeout(W(Dr,this),20):Ar(this),Ta)Ta.hasOwnProperty(a)&&Ta[a](n,t[a],Ma);mi(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Fa.length;++l)Fa[l](n);Jr(this),x&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Na.defaults=La,Na.optionHandlers=Ta;var Fa=[];function Ea(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=wt(e,t).state:n="prev");var a=e.options.tabSize,l=et(o,t),s=_(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((u=o.mode.indent(i,l.text.slice(c.length),l.text))==R||150<u)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?_(et(o,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/a);h;--h)d+=a,f+="\t";if(d<u&&(f+=Y(u-d)),f!=c)return yo(o,f,st(t,0),st(t,c.length),"+input"),!(l.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<c.length){var g=st(t,c.length);Zi(o,p,new Li(g,g));break}}}Na.defineInitHook=function(e){return Fa.push(e)};var Oa=null;function Ia(e){Oa=e}function Pa(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r=r||o.sel;var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=He(t),u=null;if(l&&1<r.ranges.length)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){u=[];for(var c=0;c<Oa.text.length;c++)u.push(o.splitLines(Oa.text[c]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=X(s,function(e){return[e]}));for(var f=e.curOp.updateInput,d=r.ranges.length-1;0<=d;d--){var h=r.ranges[d],p=h.from(),m=h.to();h.empty()&&(n&&0<n?p=st(p.line,p.ch-n):e.state.overwrite&&!l?m=st(m.line,Math.min(et(o,m.line).text.length,m.ch+K(s).length)):l&&Oa&&Oa.lineWise&&Oa.text.join("\n")==t&&(p=m=st(p.line,0)));var g={from:p,to:m,text:u?u[d%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ho(e.doc,g),mn(e,"inputRead",e,g)}t&&!l&&ja(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Wa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||ni(t,function(){return Pa(t,n,0,null,"paste")}),!0}function ja(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;0<=r;r--){var i=n.ranges[r];if(!(100<i.head.ch||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(-1<t.indexOf(o.electricChars.charAt(l))){a=Ea(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ea(e,i.head.line,"smart"));a&&mn(e,"electricInput",e,i.head.line)}}}function _a(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:st(i,0),head:st(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function za(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ha(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(e.style.border="1px solid black"),za(e),t}function Ba(n,r,i,e,o){var t=r,a=i,l=et(n,r.line);function s(e){var t;if(null==(t=o?function(t,n,l,e){var s=ye(n,t.doc.direction);if(!s)return na(n,l,e);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var r=se(s,l.ch,l.sticky),i=s[r];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>l.ch:i.from<l.ch))return na(n,l,e);function u(e,t){return ta(n,e instanceof st?e.ch:e,t)}function o(e){return t.options.lineWrapping?(a=a||_n(t,n),ir(t,n,a,e)):{begin:0,end:n.text.length}}var a,c=o("before"==l.sticky?u(l,-1):l.ch);if("rtl"==t.doc.direction||1==i.level){var f=1==i.level==e<0,d=u(l,f?1:-1);if(null!=d&&(f?d<=i.to&&d<=c.end:d>=i.from&&d>=c.begin)){var h=f?"before":"after";return new st(l.line,d,h)}}function p(e,t,n){for(var r=function(e,t){return t?new st(l.line,u(e,1),"before"):new st(l.line,e,"after")};0<=e&&e<s.length;e+=t){var i=s[e],o=0<t==(1!=i.level),a=o?n.begin:u(n.end,-1);if(i.from<=a&&a<i.to)return r(a,o);if(a=o?i.from:u(i.to,-1),n.begin<=a&&a<n.end)return r(a,o)}}var m=p(r+e,e,c);if(m)return m;var g=0<e?c.end:u(c.begin,-1);return null==g||0<e&&g==n.text.length||!(m=p(0<e?0:s.length-1,e,o(g)))?null:m}(n.cm,l,r,i):na(l,r,i))){if(e||!function(){var e=r.line+i;return!(e<n.first||e>=n.first+n.size)&&(r=new st(e,r.ch,r.sticky),l=et(n,e))}())return!1;r=ra(o,n.cm,l,r.line,i)}else r=t;return!0}if("char"==e)s();else if("column"==e)s(!0);else if("word"==e||"group"==e)for(var u=null,c="group"==e,f=n.cm&&n.cm.getHelper(r,"wordChars"),d=!0;!(i<0)||s(!d);d=!1){var h=l.text.charAt(r.ch)||"\n",p=te(h,f)?"w":c&&"\n"==h?"n":!c||/\s/.test(h)?null:"p";if(!c||d||p||(p="s"),u&&u!=p){i<0&&(i=1,s(),r.sticky="after");break}if(p&&(u=p),0<i&&!s(!d))break}var m=so(n,r,t,a,!0);return ct(t,m)&&(m.hitSide=!0),m}function Ra(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*lr(e.display),3);i=(0<n?t.bottom:t.top)+n*u}else"line"==r&&(i=0<n?t.bottom+3:t.top-3);for(;(o=nr(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}function qa(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Va(e,t){var n=jn(e,t.line);if(!n||n.hidden)return null;var r=et(e.doc,t.line),i=Pn(n,r,t.line),o=ye(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var l=Rn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ga(e,t){return t&&(e.bad=!0),e}function Ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ga(e.clipPos(st(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return $a(o,t,n)}}function $a(u,e,t){var n=u.text.firstChild,r=!1;if(!e||!F(n,e))return Ga(st(it(u.line),0),!0);if(e==n&&(r=!0,e=n.childNodes[t],t=0,!e)){var i=u.rest?K(u.rest):u.line;return Ga(st(it(i),i.text.length),r)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t=t&&o.nodeValue.length);a.parentNode!=n;)a=a.parentNode;var c=u.measure,f=c.maps;function l(e,t,n){for(var r=-1;r<(f?f.length:0);r++)for(var i=r<0?c.map:f[r],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var l=it(r<0?u.line:u.rest[r]),s=i[o]+n;return(n<0||a!=e)&&(s=i[o+(n?1:0)]),st(l,s)}}}var s=l(o,a,t);if(s)return Ga(s,r);for(var d=a.nextSibling,h=o?o.nodeValue.length-t:0;d;d=d.nextSibling){if(s=l(d,d.firstChild,0))return Ga(st(s.line,s.ch-h),r);h+=d.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(s=l(p,p.firstChild,-1))return Ga(st(s.line,s.ch+m),r);m+=p.textContent.length}}qa.prototype.init=function(e){var t=this,a=this,l=a.cm,s=a.div=e.lineDiv;function n(e){if(!Se(l,e)){if(l.somethingSelected())Ia({lineWise:!1,text:l.getSelections()}),"cut"==e.type&&l.replaceSelection("",null,"cut");else{if(!l.options.lineWiseCopyCut)return;var t=_a(l);Ia({lineWise:!0,text:t.text}),"cut"==e.type&&l.operation(function(){l.setSelections(t.ranges,0,q),l.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Oa.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var r=Ha(),i=r.firstChild;l.display.lineSpace.insertBefore(r,l.display.lineSpace.firstChild),i.value=Oa.text.join("\n");var o=document.activeElement;P(i),setTimeout(function(){l.display.lineSpace.removeChild(r),o.focus(),o==s&&a.showPrimarySelection()},50)}}za(s,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize),be(s,"paste",function(e){Se(l,e)||Wa(e,l)||k<=11&&setTimeout(ri(l,function(){return t.updateFromDOM()}),20)}),be(s,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),be(s,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),be(s,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),be(s,"touchstart",function(){return a.forceCompositionEnd()}),be(s,"input",function(){t.composing||t.readFromDOMSoon()}),be(s,"copy",n),be(s,"cut",n)},qa.prototype.prepareSelection=function(){var e=wr(this.cm,!1);return e.focus=this.cm.state.focused,e},qa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qa.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)e.removeAllRanges();else{var o=Ua(t,e.anchorNode,e.anchorOffset),a=Ua(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ut(ht(o,a),r)||0!=ut(dt(o,a),i)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Va(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Va(t,i);if(!u){var c=l[l.length-1].measure,f=c.maps?c.maps[c.maps.length-1]:c.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(s&&u){var d,h=e.rangeCount&&e.getRangeAt(0);try{d=M(s.node,s.offset,u.offset,u.node)}catch(e){}d&&(!m&&t.state.focused?(e.collapse(s.node,s.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),h&&null==e.anchorNode?e.addRange(h):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},qa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},qa.prototype.showMultipleSelections=function(e){D(this.cm.display.cursorDiv,e.cursors),D(this.cm.display.selectionDiv,e.selection)},qa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},qa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return F(this.div,t)},qa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},qa.prototype.blur=function(){this.div.blur()},qa.prototype.getField=function(){return this.div},qa.prototype.supportsTouch=function(){return!0},qa.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():ni(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},qa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},qa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(f&&a&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Ua(t,e.anchorNode,e.anchorOffset),r=Ua(t,e.focusNode,e.focusOffset);n&&r&&ni(t,function(){no(t.doc,Di(n,r),q),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},qa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=st(a.line-1,et(r.doc,a.line-1).length)),l.ch==et(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=st(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;n=a.line==i.viewFrom||0==(e=pr(r,a.line))?(t=it(i.view[0].line),i.view[0].node):(t=it(i.view[e].line),i.view[e-1].node.nextSibling);var s,u,c=pr(r,l.line);if(u=c==i.view.length-1?(s=i.viewTo-1,i.lineDiv.lastChild):(s=it(i.view[c+1].line)-1,i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(l,e,t,s,u){var n="",c=!1,f=l.doc.lineSeparator(),d=!1;function h(){c&&(n+=f,d&&(n+=f),c=d=!1)}function p(e){e&&(h(),n+=e)}function m(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void p(t);var n,r=e.getAttribute("cm-marker");if(r){var i=l.findMarks(st(s,0),st(u+1,0),function(t){return function(e){return e.id==t}}(+r));return void(i.length&&(n=i[0].find(0))&&p(tt(l.doc,n.from,n.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&h();for(var a=0;a<e.childNodes.length;a++)m(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(d=!0),o&&(c=!0)}else 3==e.nodeType&&p(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;m(e),e!=t;)e=e.nextSibling,d=!1;return n}(r,n,u,t,s)),d=tt(r.doc,st(t,0),st(s,et(r.doc,s).text.length));1<f.length&&1<d.length;)if(K(f)==K(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=K(f),x=K(d),b=Math.min(y.length-(1==f.length?h:0),x.length-(1==d.length?h:0));p<b&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)++p;if(1==f.length&&1==d.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var w=st(t,h),k=st(s,d.length?K(d).length-p:0);return 1<f.length||f[0]||ut(w,k)?(yo(r.doc,f,w,k,"+input"),!0):void 0},qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},qa.prototype.reset=function(){this.forceCompositionEnd()},qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},qa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},qa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ni(this.cm,function(){return mr(e.cm)})},qa.prototype.setUneditable=function(e){e.contentEditable="false"},qa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ri(this.cm,Pa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},qa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},qa.prototype.onContextMenu=function(){},qa.prototype.resetPosition=function(){},qa.prototype.needsContentAttribute=!0;function Ya(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null}var Ka,Xa,Ja,Qa,Za;function el(e,t,r,n){Ka.defaults[e]=t,r&&(Xa[e]=n?function(e,t,n){n!=Ma&&r(e,t,n)}:r)}Ya.prototype.init=function(n){var e=this,r=this,i=this.cm;this.createField(n);var o=this.textarea;function t(e){if(!Se(i,e)){if(i.somethingSelected())Ia({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=_a(i);Ia({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,q):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),c&&(o.style.width="0px"),be(o,"input",function(){w&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),be(o,"paste",function(e){Se(i,e)||Wa(e,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())}),be(o,"cut",t),be(o,"copy",t),be(n.scroller,"paste",function(e){if(!Dn(n,e)&&!Se(i,e)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var t=new Event("paste");t.clipboardData=e.clipboardData,o.dispatchEvent(t)}}),be(n.lineSpace,"selectstart",function(e){Dn(n,e)||De(e)}),be(o,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),be(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ya.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},Ya.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=wr(e);if(e.options.moveInputWithCursor){var i=Zn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ya.prototype.showSelection=function(e){var t=this.cm.display;D(t.cursorDiv,e.cursors),D(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ya.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&&P(this.textarea),w&&9<=k&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",w&&9<=k&&(this.hasSelection=null))}},Ya.prototype.getField=function(){return this.textarea},Ya.prototype.supportsTouch=function(){return!1},Ya.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!d||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ya.prototype.blur=function(){this.textarea.blur()},Ya.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ya.prototype.receivedFocus=function(){this.slowPoll()},Ya.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ya.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))})},Ya.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Be(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(w&&9<=k&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return ni(t,function(){Pa(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?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},Ya.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ya.prototype.onKeyPress=function(){w&&9<=k&&(this.hasSelection=null),this.fastPoll()},Ya.prototype.onContextMenu=function(e){var n=this,r=n.cm,i=r.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var t=hr(r,e),a=i.scroller.scrollTop;if(t&&!g){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(t)&&ri(r,no)(r.doc,Di(t),q);var l,s=o.style.cssText,u=n.wrapper.style.cssText,c=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-c.top-5)+"px; left: "+(e.clientX-c.left-5)+"px;\n z-index: 1000; background: "+(w?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",x&&(l=window.scrollY),i.input.focus(),x&&window.scrollTo(null,l),i.input.reset(),r.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=h,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),w&&9<=k&&d(),C){Fe(e);var f=function(){ke(window,"mouseup",f),setTimeout(h,20)};be(window,"mouseup",f)}else setTimeout(h,50)}function d(){if(null!=o.selectionStart){var e=r.somethingSelected(),t=""+(e?o.value:"");o.value="⇚",o.value=t,n.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=r.doc.sel}}function h(){if(n.contextMenuPending==h&&(n.contextMenuPending=!1,n.wrapper.style.cssText=u,o.style.cssText=s,w&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!w||w&&k<9)&&d();var e=0,t=function(){i.selForContextMenu==r.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&""==n.prevInput?ri(r,co)(r):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},Ya.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ya.prototype.setUneditable=function(){},Ya.prototype.needsContentAttribute=!1,Xa=(Ka=Na).optionHandlers,Ka.defineOption=el,Ka.Init=Ma,el("value","",function(e,t){return e.setValue(t)},!0),el("mode",null,function(e,t){e.doc.modeOption=t,Oi(e)},!0),el("indentUnit",2,Oi,!0),el("indentWithTabs",!1),el("smartIndent",!0),el("tabSize",4,function(e){Ii(e),Un(e),mr(e)},!0),el("lineSeparator",null,function(e,r){if(e.doc.lineSep=r){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var n=e.text.indexOf(r,t);if(-1==n)break;t=n+r.length,i.push(st(o,n))}o++});for(var t=i.length-1;0<=t;t--)yo(e.doc,r,i[t],st(i[t].line,i[t].ch+r.length))}}),el("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ma&&e.refresh()}),el("specialCharPlaceholder",an,function(e){return e.refresh()},!0),el("electricChars",!0),el("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),el("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),el("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),el("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),el("rtlMoveVisually",!p),el("wholeLineUpdateBefore",!0),el("theme","default",function(e){Sa(e),yi(e)},!0),el("keyMap","default",function(e,t,n){var r=Zo(t),i=n!=Ma&&Zo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),el("extraKeys",null),el("configureMouse",null),el("lineWrapping",!1,Aa,!0),el("gutters",[],function(e,t){e.display.gutterSpecs=gi(t,e.options.lineNumbers),yi(e)},!0),el("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?cr(e.display)+"px":"0",e.refresh()},!0),el("coverGutterNextToScrollbar",!1,function(e){return Gr(e)},!0),el("scrollbarStyle","native",function(e){Yr(e),Gr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),el("lineNumbers",!1,function(e,t){e.display.gutterSpecs=gi(e.options.gutters,t),yi(e)},!0),el("firstLineNumber",1,yi,!0),el("lineNumberFormatter",function(e){return e},yi,!0),el("showCursorWhenSelecting",!1,br,!0),el("resetSelectionOnContextMenu",!0),el("lineWiseCopyCut",!0),el("pasteLinesPerSelection",!0),el("selectionsMayTouch",!1),el("readOnly",!1,function(e,t){"nocursor"==t&&(Ar(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),el("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),el("dragDrop",!0,Da),el("allowDropFileTypes",null),el("cursorBlinkRate",530),el("cursorScrollMargin",0),el("cursorHeight",1,br,!0),el("singleCursorHeightPerLine",!0,br,!0),el("workTime",100),el("workDelay",100),el("flattenSpans",!0,Ii,!0),el("addModeClass",!1,Ii,!0),el("pollInterval",100),el("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),el("historyEventDelay",1250),el("viewportMargin",10,function(e){return e.refresh()},!0),el("maxHighlightLength",1e4,Ii,!0),el("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),el("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),el("autofocus",null),el("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),el("phrases",null),Qa=(Ja=Na).optionHandlers,Za=Ja.helpers={},Ja.prototype={constructor:Ja,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Qa.hasOwnProperty(e)&&ri(this,Qa[e])(this,t,r),Ce(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Zo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ii(function(e,t){var n=e.token?e:Ja.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:n,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,mr(this)}),removeOverlay:ii(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void mr(this)}}),indentLine:ii(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Ea(this,e,t,n)}),indentSelection:ii(function(e){for(var t=this,n=this.doc.sel.ranges,r=-1,i=0;i<n.length;i++){var o=n[i];if(o.empty())o.head.line>r&&(Ea(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Pr(t));else{var a=o.from(),l=o.to(),s=Math.max(r,a.line);r=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var u=s;u<r;++u)Ea(t,u,e);var c=t.doc.sel.ranges;0==a.ch&&n.length==c.length&&0<c[i].from().ch&&Zi(t.doc,i,new Li(a,c[i].to()),q)}}}),getTokenAt:function(e,t){return Lt(this,e,t)},getLineTokens:function(e,t){return Lt(this,st(e),t,!0)},getTokenTypeAt:function(e){e=mt(this.doc,e);var t,n=bt(this,et(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=1+a}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Ja.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Za.hasOwnProperty(t))return n;var r=Za[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var l=0;l<r._global.length;l++){var s=r._global[l];s.pred(i,this)&&-1==H(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return wt(this,(e=pt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Zn(this,null==e?n.head:"object"==typeof e?mt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Qn(this,mt(this.doc,e),t||"page")},coordsChar:function(e,t){return nr(this,(e=Jn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Jn(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),r=et(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Jt(r):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return sr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Zn(this,mt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&function(e,t){var n=Or(e,t);null!=n.scrollTop&&zr(e,n.scrollTop),null!=n.scrollLeft&&Br(e,n.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ii(ha),triggerOnKeyPress:ii(ma),triggerOnKeyUp:pa,triggerOnMouseDown:ii(xa),execCommand:function(e){if(ia.hasOwnProperty(e))return ia[e].call(null,this)},triggerElectric:ii(function(e){ja(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=mt(this.doc,e),a=0;a<t&&!(o=Ba(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ii(function(t,n){var r=this;this.extendSelectionsBy(function(e){return r.display.shift||r.doc.extend||e.empty()?Ba(r.doc,e.head,t,n,r.options.rtlMoveVisually):t<0?e.from():e.to()},G)}),deleteH:ii(function(n,r){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):ea(this,function(e){var t=Ba(i,e.head,n,r,!1);return n<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=mt(this.doc,e),l=0;l<t;++l){var s=Zn(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Ra(this,s,i,n)).hitSide)break}return a},moveV:ii(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(s)return r<0?e.from():e.to();var t=Zn(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),l.push(t.left);var n=Ra(o,t,r,i);return"page"==i&&e==a.sel.primary()&&Ir(o,Qn(o,n,"div").top-t.top),n},G),l.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=l[e]}),findWordAt:function(e){var t=et(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<n&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Li(st(e.line,n),st(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?O(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),Ce(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ii(function(e,t){Wr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:In(this),clientWidth:On(this)}},scrollIntoView:ii(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){jr(e),e.curOp.scrollToPos=t}(this,e):_r(this,e.from,e.to,e.margin)}),setSize:ii(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Gn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gr(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ce(this,"refresh",this)}),operation:function(e){return ni(this,e)},startOperation:function(){return Xr(this)},endOperation:function(){return Jr(this)},refresh:ii(function(){var e=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,Un(this),Wr(this,this.doc.scrollLeft,this.doc.scrollTop),di(this.display),(null==e||.5<Math.abs(e-lr(this.display)))&&dr(this),Ce(this,"refresh",this)}),swapDoc:ii(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),_i(this,e),Un(this),this.display.input.reset(),Wr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,mn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},Te(Ja),Ja.registerHelper=function(e,t,n){Za.hasOwnProperty(e)||(Za[e]=Ja[e]={_global:[]}),Za[e][t]=n},Ja.registerGlobalHelper=function(e,t,n,r){Ja.registerHelper(e,t,r),Za[e]._global.push({pred:n,val:r})};var tl,nl="iter insert remove copy getEditor constructor".split(" ");for(var rl in Io.prototype)Io.prototype.hasOwnProperty(rl)&&H(nl,rl)<0&&(Na.prototype[rl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Io.prototype[rl]));return Te(Io),Na.inputStyles={textarea:Ya,contenteditable:qa},Na.defineMode=function(e){Na.defaults.mode||"null"==e||(Na.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}.apply(this,arguments)},Na.defineMIME=function(e,t){Ge[e]=t},Na.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Na.defineMIME("text/plain","null"),Na.defineExtension=function(e,t){Na.prototype[e]=t},Na.defineDocExtension=function(e,t){Io.prototype[e]=t},Na.fromTextArea=function(t,e){if((e=e?j(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=E();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=l.getValue()}var i;if(t.form&&(be(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}e.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ke(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var l=Na(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return l},(tl=Na).off=ke,tl.on=be,tl.wheelEventPixels=Ci,tl.Doc=Io,tl.splitLines=He,tl.countColumn=_,tl.findColumn=U,tl.isWordChar=ee,tl.Pass=R,tl.signal=Ce,tl.Line=en,tl.changeEnd=Ai,tl.scrollbarModel=$r,tl.Pos=st,tl.cmpPos=ut,tl.modes=Ve,tl.mimeModes=Ge,tl.resolveMode=Ue,tl.getMode=$e,tl.modeExtensions=Ye,tl.extendMode=Ke,tl.copyState=Xe,tl.startState=Qe,tl.innerMode=Je,tl.commands=ia,tl.keyMap=Uo,tl.keyName=Qo,tl.isModifierKey=Xo,tl.lookupKey=Ko,tl.normalizeKeyMap=Yo,tl.StringStream=Ze,tl.SharedTextMarker=No,tl.TextMarker=Do,tl.LineWidget=Mo,tl.e_preventDefault=De,tl.e_stopPropagation=Ae,tl.e_stop=Fe,tl.addClass=O,tl.contains=F,tl.rmClass=L,tl.keyNames=Ro,Na.version="5.48.0",Na},e.exports=r()},2138:function(e,t,n){(function(C){"use strict";var S={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},M={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var i,o,a=e.indentUnit,l={},n=t.htmlMode?S:M;for(var r in n)l[r]=n[r];for(var r in t)l[r]=t[r];function s(t,n){function e(e){return(n.tokenize=e)(t,n)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(c("atom","]]>")):null:t.match("--")?e(c("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function r(i){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=r(i+1),t.tokenize(e,t);if(">"==n){if(1!=i)return t.tokenize=r(i-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=c("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",n.tokenize=u,"tag bracket"):"&"!=r?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function u(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=s,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=function(n){function e(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=u;break}return"string"}return e.isInAttribute=!0,e}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=s,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}function c(n,r){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=s;break}e.next()}return n}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;d(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",x):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,t,n)):(o="error",m)}function g(e,t,n){if("word"!=e)return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,n)):(o="error",y);var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,n){return"endTag"!=e?(o="error",v):(d(n),p)}function y(e,t,n){return o="error",v(e,0,n)}function x(e,t,n){if("word"==e)return o="attribute",b;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",x;var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new f(n,r,i==n.indented)),p}function b(e,t,n){return"equals"==e?w:(l.allowMissing||(o="error"),x(e,0,n))}function w(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",x):(o="error",x(e,0,n))}function k(e,t,n){return"string"==e?k:x(e,0,n)}return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var n=t.tokenize(e,t);return(n||i)&&"comment"!=n&&(o=null,t.state=t.state(i||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(e,t,n){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return C.Pass;if(e.tokenize!=u&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;r;){if(r.tagName==i[2]){r=r.prev;break}if(!l.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(i)for(;r;){var o=l.contextGrabbers[r.tagName];if(!o||!o.hasOwnProperty(i[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+a:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=x)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})(n(1553))},2617:function(e,t,n){(function(tt){"use strict";tt.defineMode("javascript",function(e,u){var t,n,r,i,o,a,c=e.indentUnit,f=u.statementIndent,l=u.jsonld,s=u.json||l,d=u.typescript,h=u.wordCharacters||/[\w$\xa1-\uffff]/,p=(t=m("keyword a"),n=m("keyword b"),r=m("keyword c"),i=m("keyword d"),o=m("operator"),a={type:"atom",style:"atom"},{if:m("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:m("new"),delete:r,void:r,throw:r,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:m("this"),class:m("class"),super:m("atom"),yield:r,export:m("export"),import:m("import"),extends:r,await:r});function m(e){return{type:e,style:"keyword"}}var g,v,y=/[+\-*&%=<>!?|~^@]/,x=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(e,t,n){return g=e,v=n,t}function w(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=function(i){return function(e,t){var n,r=!1;if(l&&"@"==e.peek()&&e.match(x))return t.tokenize=w,b("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(t.tokenize=w),b("string","string")}}(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return b("number","number");if("."==n&&e.match(".."))return b("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return b(n);if("="==n&&e.eat(">"))return b("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return b("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),b("number","number");if("/"==n)return e.eat("*")?(t.tokenize=k)(e,t):e.eat("/")?(e.skipToEnd(),b("comment","comment")):et(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),b("regexp","string-2")):(e.eat("="),b("operator","operator",e.current()));if("`"==n)return(t.tokenize=C)(e,t);if("#"==n)return e.skipToEnd(),b("error","error");if(y.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),b("operator","operator",e.current());if(h.test(n)){e.eatWhile(h);var r=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(r)){var i=p[r];return b(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return b("async","keyword",r)}return b("variable","variable",r)}}function k(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=w;break}r="*"==n}return b("comment","comment")}function C(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=w;break}r=!r&&"\\"==n}return b("quasi","string-2",e.current())}var S="([{}])";function M(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(d){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;0<=a;--a){var l=e.string.charAt(a),s=S.indexOf(l);if(0<=s&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(3<=s&&s<6)++i;else if(h.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var L={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function T(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function D(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var A={state:null,column:null,marked:null,cc:null};function N(){for(var e=arguments.length-1;0<=e;e--)A.cc.push(arguments[e])}function F(){return N.apply(null,arguments),!0}function E(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function O(e){var t=A.state;if(A.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,n){{if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new P(r,n.vars,!0):null}return E(t,n.vars)?n:new P(n.prev,new W(t,n.vars),!1)}return null}}(e,t.context);if(null!=n)return void(t.context=n)}else if(!E(e,t.localVars))return void(t.localVars=new W(e,t.localVars));u.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new W(e,t.globalVars))}function I(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function P(e,t,n){this.prev=e,this.vars=t,this.block=n}function W(e,t){this.name=e,this.next=t}var j=new W("this",new W("arguments",null));function _(){A.state.context=new P(A.state.context,A.state.localVars,!1),A.state.localVars=j}function z(){A.state.context=new P(A.state.context,A.state.localVars,!0),A.state.localVars=null}function H(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function B(r,i){function e(){var e=A.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var n=e.lexical;n&&")"==n.type&&n.align;n=n.prev)t=n.indented;e.lexical=new T(t,A.stream.column(),r,null,e.lexical,i)}return e.lex=!0,e}function R(){var e=A.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(n){return function e(t){return t==n?F():";"==n||"}"==t||")"==t||"]"==t?N():F(e)}}function V(e,t){return"var"==e?F(B("vardef",t),Me,q(";"),R):"keyword a"==e?F(B("form"),Y,V,R):"keyword b"==e?F(B("form"),V,R):"keyword d"==e?A.stream.match(/^\s*$/,!1)?F():F(B("stat"),X,q(";"),R):"debugger"==e?F(q(";")):"{"==e?F(B("}"),z,de,R,H):";"==e?F():"if"==e?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==R&&A.state.cc.pop()(),F(B("form"),Y,V,R,Fe)):"function"==e?F(Pe):"for"==e?F(B("form"),Ee,V,R):"class"==e||d&&"interface"==t?(A.marked="keyword",F(B("form","class"==e?e:t),He,R)):"variable"==e?d&&"declare"==t?(A.marked="keyword",F(V)):d&&("module"==t||"enum"==t||"type"==t)&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword","enum"==t?F(Qe):"type"==t?F(je,q("operator"),ve,q(";")):F(B("form"),Le,q("{"),B("}"),de,R,R)):d&&"namespace"==t?(A.marked="keyword",F(B("form"),U,V,R)):d&&"abstract"==t?(A.marked="keyword",F(V)):F(B("stat"),oe):"switch"==e?F(B("form"),Y,q("{"),B("}","switch"),z,de,R,R,H):"case"==e?F(U,q(":")):"default"==e?F(q(":")):"catch"==e?F(B("form"),_,G,V,R,H):"export"==e?F(B("stat"),Ve,R):"import"==e?F(B("stat"),Ue,R):"async"==e?F(V):"@"==t?F(U,V):N(B("stat"),U,q(";"),R)}function G(e){if("("==e)return F(_e,q(")"))}function U(e,t){return K(e,t,!1)}function $(e,t){return K(e,t,!0)}function Y(e){return"("!=e?N():F(B(")"),U,q(")"),R)}function K(e,t,n){if(A.state.fatArrowAt==A.stream.start){var r=n?ne:te;if("("==e)return F(_,B(")"),ce(_e,")"),R,q("=>"),r,H);if("variable"==e)return N(_,Le,q("=>"),r,H)}var i=n?Q:J;return L.hasOwnProperty(e)?F(i):"function"==e?F(Pe,i):"class"==e||d&&"interface"==t?(A.marked="keyword",F(B("form"),ze,R)):"keyword c"==e||"async"==e?F(n?$:U):"("==e?F(B(")"),X,q(")"),R,i):"operator"==e||"spread"==e?F(n?$:U):"["==e?F(B("]"),Je,R,i):"{"==e?fe(le,"}",null,i):"quasi"==e?N(Z,i):"new"==e?F(function(t){return function(e){return"."==e?F(t?ie:re):"variable"==e&&d?F(ke,t?Q:J):N(t?$:U)}}(n)):"import"==e?F(U):F()}function X(e){return e.match(/[;\}\)\],]/)?N():N(U)}function J(e,t){return","==e?F(U):Q(e,t,!1)}function Q(e,t,n){var r=0==n?J:Q,i=0==n?U:$;return"=>"==e?F(_,n?ne:te,H):"operator"==e?/\+\+|--/.test(t)||d&&"!"==t?F(r):d&&"<"==t&&A.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?F(B(">"),ce(ve,">"),R,r):"?"==t?F(U,q(":"),i):F(i):"quasi"==e?N(Z,r):";"!=e?"("==e?fe($,")","call",r):"."==e?F(ae,r):"["==e?F(B("]"),X,q("]"),R,r):d&&"as"==t?(A.marked="keyword",F(ve,r)):"regexp"==e?(A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.stream.start-1),F(i)):void 0:void 0}function Z(e,t){return"quasi"!=e?N():"${"!=t.slice(t.length-2)?F(Z):F(U,ee)}function ee(e){if("}"==e)return A.marked="string-2",A.state.tokenize=C,F(Z)}function te(e){return M(A.stream,A.state),N("{"==e?V:U)}function ne(e){return M(A.stream,A.state),N("{"==e?V:$)}function re(e,t){if("target"==t)return A.marked="keyword",F(J)}function ie(e,t){if("target"==t)return A.marked="keyword",F(Q)}function oe(e){return":"==e?F(R,V):N(J,q(";"),R)}function ae(e){if("variable"==e)return A.marked="property",F()}function le(e,t){if("async"==e)return A.marked="property",F(le);if("variable"==e||"keyword"==A.style){return A.marked="property","get"==t||"set"==t?F(se):(d&&A.state.fatArrowAt==A.stream.start&&(n=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+n[0].length),F(ue));var n}else{if("number"==e||"string"==e)return A.marked=l?"property":A.style+" property",F(ue);if("jsonld-keyword"==e)return F(ue);if(d&&I(t))return A.marked="keyword",F(le);if("["==e)return F(U,pe,q("]"),ue);if("spread"==e)return F($,ue);if("*"==t)return A.marked="keyword",F(le);if(":"==e)return N(ue)}}function se(e){return"variable"!=e?N(ue):(A.marked="property",F(Pe))}function ue(e){return":"==e?F($):"("==e?N(Pe):void 0}function ce(r,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var n=A.state.lexical;return"call"==n.info&&(n.pos=(n.pos||0)+1),F(function(e,t){return e==i||t==i?N():N(r)},a)}return e==i||t==i?F():o&&-1<o.indexOf(";")?N(r):F(q(i))}return function(e,t){return e==i||t==i?F():N(r,a)}}function fe(e,t,n){for(var r=3;r<arguments.length;r++)A.cc.push(arguments[r]);return F(B(t,n),ce(e,t),R)}function de(e){return"}"==e?F():N(V,de)}function he(e,t){if(d){if(":"==e)return F(ve);if("?"==t)return F(he)}}function pe(e,t){if(d&&(":"==e||"in"==t))return F(ve)}function me(e){if(d&&":"==e)return A.stream.match(/^\s*\w+\s+is\b/,!1)?F(U,ge,ve):F(ve)}function ge(e,t){if("is"==t)return A.marked="keyword",F()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(A.marked="keyword",F("typeof"==t?$:ve)):"variable"==e||"void"==t?(A.marked="type",F(we)):"|"==t||"&"==t?F(ve):"string"==e||"number"==e||"atom"==e?F(we):"["==e?F(B("]"),ce(ve,"]",","),R,we):"{"==e?F(B("}"),ce(xe,"}",",;"),R,we):"("==e?F(ce(be,")"),ye,we):"<"==e?F(ce(ve,">"),ve):void 0}function ye(e){if("=>"==e)return F(ve)}function xe(e,t){return"variable"==e||"keyword"==A.style?(A.marked="property",F(xe)):"?"==t||"number"==e||"string"==e?F(xe):":"==e?F(ve):"["==e?F(q("variable"),he,q("]"),xe):"("==e?N(We,xe):void 0}function be(e,t){return"variable"==e&&A.stream.match(/^\s*[?:]/,!1)||"?"==t?F(be):":"==e?F(ve):"spread"==e?F(be):N(ve)}function we(e,t){return"<"==t?F(B(">"),ce(ve,">"),R,we):"|"==t||"."==e||"&"==t?F(ve):"["==e?F(ve,q("]"),we):"extends"==t||"implements"==t?(A.marked="keyword",F(ve)):"?"==t?F(ve,q(":"),ve):void 0}function ke(e,t){if("<"==t)return F(B(">"),ce(ve,">"),R,we)}function Ce(){return N(ve,Se)}function Se(e,t){if("="==t)return F(ve)}function Me(e,t){return"enum"==t?(A.marked="keyword",F(Qe)):N(Le,he,Ae,Ne)}function Le(e,t){return d&&I(t)?(A.marked="keyword",F(Le)):"variable"==e?(O(t),F()):"spread"==e?F(Le):"["==e?fe(De,"]"):"{"==e?fe(Te,"}"):void 0}function Te(e,t){return"variable"!=e||A.stream.match(/^\s*:/,!1)?("variable"==e&&(A.marked="property"),"spread"==e?F(Le):"}"==e?N():"["==e?F(U,q("]"),q(":"),Te):F(q(":"),Le,Ae)):(O(t),F(Ae))}function De(){return N(Le,Ae)}function Ae(e,t){if("="==t)return F($)}function Ne(e){if(","==e)return F(Me)}function Fe(e,t){if("keyword b"==e&&"else"==t)return F(B("form","else"),V,R)}function Ee(e,t){return"await"==t?F(Ee):"("==e?F(B(")"),Oe,R):void 0}function Oe(e){return"var"==e?F(Me,Ie):"variable"==e?F(Ie):N(Ie)}function Ie(e,t){return")"==e?F():";"==e?F(Ie):"in"==t||"of"==t?(A.marked="keyword",F(U,Ie)):N(U,Ie)}function Pe(e,t){return"*"==t?(A.marked="keyword",F(Pe)):"variable"==e?(O(t),F(Pe)):"("==e?F(_,B(")"),ce(_e,")"),R,me,V,H):d&&"<"==t?F(B(">"),ce(Ce,">"),R,Pe):void 0}function We(e,t){return"*"==t?(A.marked="keyword",F(We)):"variable"==e?(O(t),F(We)):"("==e?F(_,B(")"),ce(_e,")"),R,me,H):d&&"<"==t?F(B(">"),ce(Ce,">"),R,We):void 0}function je(e,t){return"keyword"==e||"variable"==e?(A.marked="type",F(je)):"<"==t?F(B(">"),ce(Ce,">"),R):void 0}function _e(e,t){return"@"==t&&F(U,_e),"spread"==e?F(_e):d&&I(t)?(A.marked="keyword",F(_e)):d&&"this"==e?F(he,Ae):N(Le,he,Ae)}function ze(e,t){return"variable"==e?He(e,t):Be(e,t)}function He(e,t){if("variable"==e)return O(t),F(Be)}function Be(e,t){return"<"==t?F(B(">"),ce(Ce,">"),R,Be):"extends"==t||"implements"==t||d&&","==e?("implements"==t&&(A.marked="keyword"),F(d?ve:U,Be)):"{"==e?F(B("}"),Re,R):void 0}function Re(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||d&&I(t))&&A.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(A.marked="keyword",F(Re)):"variable"==e||"keyword"==A.style?(A.marked="property",F(d?qe:Pe,Re)):"number"==e||"string"==e?F(d?qe:Pe,Re):"["==e?F(U,he,q("]"),d?qe:Pe,Re):"*"==t?(A.marked="keyword",F(Re)):d&&"("==e?N(We,Re):";"==e||","==e?F(Re):"}"==e?F():"@"==t?F(U,Re):void 0}function qe(e,t){if("?"==t)return F(qe);if(":"==e)return F(ve,Ae);if("="==t)return F($);var n=A.state.lexical.prev;return N(n&&"interface"==n.info?We:Pe)}function Ve(e,t){return"*"==t?(A.marked="keyword",F(Xe,q(";"))):"default"==t?(A.marked="keyword",F(U,q(";"))):"{"==e?F(ce(Ge,"}"),Xe,q(";")):N(V)}function Ge(e,t){return"as"==t?(A.marked="keyword",F(q("variable"))):"variable"==e?N($,Ge):void 0}function Ue(e){return"string"==e?F():"("==e?N(U):N($e,Ye,Xe)}function $e(e,t){return"{"==e?fe($e,"}"):("variable"==e&&O(t),"*"==t&&(A.marked="keyword"),F(Ke))}function Ye(e){if(","==e)return F($e,Ye)}function Ke(e,t){if("as"==t)return A.marked="keyword",F($e)}function Xe(e,t){if("from"==t)return A.marked="keyword",F(U)}function Je(e){return"]"==e?F():N(ce($,"]"))}function Qe(){return N(B("form"),Le,q("{"),B("}"),ce(Ze,"}"),R,R)}function Ze(){return N(Le,Ae)}function et(e,t,n){return t.tokenize==w&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return R.lex=H.lex=!0,{startState:function(e){var t={tokenize:w,lastType:"sof",cc:[],lexical:new T((e||0)-c,0,"block",!1),localVars:u.localVars,context:u.localVars&&new P(null,null,!1),indented:e||0};return u.globalVars&&"object"==typeof u.globalVars&&(t.globalVars=u.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),M(e,t)),t.tokenize!=k&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==g?n:(t.lastType="operator"!=g||"++"!=v&&"--"!=v?g:"incdec",function(e,t,n,r,i){var o=e.cc;for(A.state=e,A.stream=i,A.marked=null,A.cc=o,A.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():s?U:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return A.marked?A.marked:"variable"==n&&D(e,r)?"variable-2":t}}}(t,n,g,v,e))},indent:function(e,t){if(e.tokenize==k)return tt.Pass;if(e.tokenize!=w)return 0;var n,r=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==R)i=i.prev;else if(a!=Fe)break}for(;("stat"==i.type||"form"==i.type)&&("}"==r||(n=e.cc[e.cc.length-1])&&(n==J||n==Q)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;f&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var l=i.type,s=r==l;return"vardef"==l?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==l&&"{"==r?i.indented:"form"==l?i.indented+c:"stat"==l?i.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||y.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(e,t)?f||c:0):"switch"!=i.info||s||0==u.doubleIndentSwitch?i.align?i.column+(s?0:1):i.indented+(s?0:c):i.indented+(/^(?:case|default)\b/.test(t)?c:2*c)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:et,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=U&&t!=$||e.cc.pop()}}}),tt.registerHelper("wordChars","javascript",/[\w$]/),tt.defineMIME("text/javascript","javascript"),tt.defineMIME("text/ecmascript","javascript"),tt.defineMIME("application/javascript","javascript"),tt.defineMIME("application/x-javascript","javascript"),tt.defineMIME("application/ecmascript","javascript"),tt.defineMIME("application/json",{name:"javascript",json:!0}),tt.defineMIME("application/x-json",{name:"javascript",json:!0}),tt.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),tt.defineMIME("text/typescript",{name:"javascript",typescript:!0}),tt.defineMIME("application/typescript",{name:"javascript",typescript:!0})})(n(1553))},3416:function(e,t,n){"use strict";var r=n(0),i=(n(4),n(1)),o=n(3),a=n(3417),l=n(3418);function s(e){return e?e.replace(/\r\n|\r/g,"\n"):e}var u=n(964)({propTypes:{autoFocus:i.bool,className:i.any,codeMirrorInstance:i.func,defaultValue:i.string,name:i.string,onChange:i.func,onCursorActivity:i.func,onFocusChange:i.func,onScroll:i.func,options:i.object,path:i.string,value:i.string,preserveScrollPosition:i.bool},getDefaultProps:function(){return{preserveScrollPosition:!1}},getCodeMirrorInstance:function(){return this.props.codeMirrorInstance||n(1553)},getInitialState:function(){return{isFocused:!1}},componentWillMount:function(){this.componentWillReceiveProps=a(this.componentWillReceiveProps,0),this.props.path},componentDidMount:function(){var e=this.getCodeMirrorInstance();this.codeMirror=e.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged),this.codeMirror.on("cursorActivity",this.cursorActivity),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")},componentWillUnmount:function(){this.codeMirror&&this.codeMirror.toTextArea()},componentWillReceiveProps:function(e){if(this.codeMirror&&void 0!==e.value&&e.value!==this.props.value&&s(this.codeMirror.getValue())!==s(e.value))if(this.props.preserveScrollPosition){var t=this.codeMirror.getScrollInfo();this.codeMirror.setValue(e.value),this.codeMirror.scrollTo(t.left,t.top)}else this.codeMirror.setValue(e.value);if("object"==typeof e.options)for(var n in e.options)e.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,e.options[n])},setOptionIfChanged:function(e,t){var n=this.codeMirror.getOption(e);l(n,t)||this.codeMirror.setOption(e,t)},getCodeMirror:function(){return this.codeMirror},focus:function(){this.codeMirror&&this.codeMirror.focus()},focusChanged:function(e){this.setState({isFocused:e}),this.props.onFocusChange&&this.props.onFocusChange(e)},cursorActivity:function(e){this.props.onCursorActivity&&this.props.onCursorActivity(e)},scrollChanged:function(e){this.props.onScroll&&this.props.onScroll(e.getScrollInfo())},codemirrorValueChanged:function(e,t){this.props.onChange&&"setValue"!==t.origin&&this.props.onChange(e.getValue(),t)},render:function(){var t=this,e=o("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return r.createElement("div",{className:e},r.createElement("textarea",{ref:function(e){return t.textareaNode=e},name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}});e.exports=u},3417:function(d,e,t){(function(e){function y(){return c.Date.now()}var r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt,t="object"==typeof e&&e&&e.Object===Object&&e,n="object"==typeof self&&self&&self.Object===Object&&self,c=t||n||Function("return this")(),f=Object.prototype.toString,x=Math.max,b=Math.min;function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==i}(e))return r;if(w(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=w(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?r:+e}d.exports=function(r,n,e){var i,o,a,l,s,u,c=0,f=!1,d=!1,t=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function h(e){var t=i,n=o;return i=o=void 0,c=e,l=r.apply(n,t)}function p(e){var t=e-u;return void 0===u||n<=t||t<0||d&&a<=e-c}function m(){var e=y();if(p(e))return g(e);s=setTimeout(m,function(e){var t=n-(e-u);return d?b(t,a-(e-c)):t}(e))}function g(e){return s=void 0,t&&i?h(e):(i=o=void 0,l)}function v(){var e=y(),t=p(e);if(i=arguments,o=this,u=e,t){if(void 0===s)return function(e){return c=e,s=setTimeout(m,n),f?h(e):l}(u);if(d)return s=setTimeout(m,n),h(u)}return void 0===s&&(s=setTimeout(m,n)),l}return n=k(n)||0,w(e)&&(f=!!e.leading,a=(d="maxWait"in e)?x(k(e.maxWait)||0,n):a,t="trailing"in e?!!e.trailing:t),v.cancel=function(){void 0!==s&&clearTimeout(s),i=u=o=s=void(c=0)},v.flush=function(){return void 0===s?l:g(y())},v}}).call(e,t(34))},3418:function(e,et,t){(function(e,t){var r="__lodash_hash_undefined__",b=1,v=2,n=9007199254740991,y="[object Arguments]",x="[object Array]",i="[object AsyncFunction]",w="[object Boolean]",k="[object Date]",C="[object Error]",o="[object Function]",a="[object GeneratorFunction]",S="[object Map]",M="[object Number]",l="[object Null]",L="[object Object]",s="[object Promise]",u="[object Proxy]",T="[object RegExp]",D="[object Set]",A="[object String]",N="[object Symbol]",c="[object Undefined]",f="[object WeakMap]",F="[object ArrayBuffer]",E="[object DataView]",d=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[y]=p[x]=p[F]=p[w]=p[E]=p[k]=p[C]=p[o]=p[S]=p[M]=p[L]=p[T]=p[D]=p[A]=p[f]=!1;var m="object"==typeof e&&e&&e.Object===Object&&e,g="object"==typeof self&&self&&self.Object===Object&&self,O=m||g||Function("return this")(),I="object"==typeof et&&et&&!et.nodeType&&et,P=I&&"object"==typeof t&&t&&!t.nodeType&&t,W=P&&P.exports===I,j=W&&m.process,_=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),z=_&&_.isTypedArray;function H(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var n=-1,r=Array(e.size);return e.forEach(function(e,t){r[++n]=[t,e]}),r}function R(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q,V,G,U=Array.prototype,$=Function.prototype,Y=Object.prototype,K=O["__core-js_shared__"],X=$.toString,J=Y.hasOwnProperty,Q=(q=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=Y.toString,ee=RegExp("^"+X.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=W?O.Buffer:void 0,ne=O.Symbol,re=O.Uint8Array,ie=Y.propertyIsEnumerable,oe=U.splice,ae=ne?ne.toStringTag:void 0,le=Object.getOwnPropertySymbols,se=te?te.isBuffer:void 0,ue=(V=Object.keys,G=Object,function(e){return V(G(e))}),ce=_e(O,"DataView"),fe=_e(O,"Map"),de=_e(O,"Promise"),he=_e(O,"Set"),pe=_e(O,"WeakMap"),me=_e(Object,"create"),ge=Re(ce),ve=Re(fe),ye=Re(de),xe=Re(he),be=Re(pe),we=ne?ne.prototype:void 0,ke=we?we.valueOf:void 0;function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Le(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Me;++t<n;)this.add(e[t])}function Te(e){var t=this.__data__=new Se(e);this.size=t.size}function De(e,t){var n=Ge(e),r=!n&&Ve(e),i=!n&&!r&&Ue(e),o=!n&&!r&&!i&&Qe(e),a=n||r||i||o,l=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var u in e)!t&&!J.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Be(u,s))||l.push(u);return l}function Ae(e,t){for(var n=e.length;n--;)if(qe(e[n][0],t))return n;return-1}function Ne(e){return null==e?void 0===e?c:l:ae&&ae in Object(e)?function(e){var t=J.call(e,ae),n=e[ae];try{var r=!(e[ae]=void 0)}catch(e){}var i=Z.call(e);r&&(t?e[ae]=n:delete e[ae]);return i}(e):function(e){return Z.call(e)}(e)}function Fe(e){return Xe(e)&&Ne(e)==y}function Ee(e,t,n,r,i){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=Ge(e),l=Ge(t),s=a?x:He(e),u=l?x:He(t),c=(s=s==y?L:s)==L,f=(u=u==y?L:u)==L,d=s==u;if(d&&Ue(e)){if(!Ue(t))return!1;c=!(a=!0)}if(d&&!c)return o=o||new Te,a||Qe(e)?Pe(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case F:return!(e.byteLength!=t.byteLength||!o(new re(e),new re(t)));case w:case k:case M:return qe(+e,+t);case C:return e.name==t.name&&e.message==t.message;case T:case A:return e==t+"";case S:var l=B;case D:var s=r&b;if(l=l||R,e.size!=t.size&&!s)return!1;var u=a.get(e);if(u)return u==t;r|=v,a.set(e,t);var c=Pe(l(e),l(t),r,i,o,a);return a.delete(e),c;case N:if(ke)return ke.call(e)==ke.call(t)}return!1}(e,t,s,n,r,i,o);if(!(n&b)){var h=c&&J.call(e,"__wrapped__"),p=f&&J.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,g=p?t.value():t;return o=o||new Te,i(m,g,n,r,o)}}return d&&(o=o||new Te,function(e,t,n,r,i,o){var a=n&b,l=We(e),s=l.length,u=We(t).length;if(s!=u&&!a)return!1;var c=s;for(;c--;){var f=l[c];if(!(a?f in t:J.call(t,f)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);var p=a;for(;++c<s;){f=l[c];var m=e[f],g=t[f];if(r)var v=a?r(g,m,f,t,e,o):r(m,g,f,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){h=!1;break}p=p||"constructor"==f}if(h&&!p){var y=e.constructor,x=t.constructor;y!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x)&&(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}(e,t,n,r,Ee,i))}function Oe(e){return!(!Ke(e)||function(e){return!!Q&&Q in e}(e))&&($e(e)?ee:d).test(Re(e))}function Ie(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||Y;return e===n}(e))return ue(e);var t=[];for(var n in Object(e))J.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Pe(e,t,r,i,o,a){var n=r&b,l=e.length,s=t.length;if(l!=s&&!(n&&l<s))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var c=-1,f=!0,d=r&v?new Le:void 0;for(a.set(e,t),a.set(t,e);++c<l;){var h=e[c],p=t[c];if(i)var m=n?i(p,h,c,t,e,a):i(h,p,c,e,t,a);if(void 0!==m){if(m)continue;f=!1;break}if(d){if(!H(t,function(e,t){if(n=t,!d.has(n)&&(h===e||o(h,e,r,i,a)))return d.push(t);var n})){f=!1;break}}else if(h!==p&&!o(h,p,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function We(e){return function(e,t,n){var r=t(e);return Ge(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ze,ze)}function je(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Oe(n)?n:void 0}Ce.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Ce.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ce.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return J.call(t,e)?t[e]:void 0},Ce.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:J.call(t,e)},Ce.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Se.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return-1<Ae(this.__data__,e)},Se.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Me.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(fe||Se),string:new Ce}},Me.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Me.prototype.get=function(e){return je(this,e).get(e)},Me.prototype.has=function(e){return je(this,e).has(e)},Me.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Le.prototype.add=Le.prototype.push=function(e){return this.__data__.set(e,r),this},Le.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Se,this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!fe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Me(r)}return n.set(e,t),this.size=n.size,this};var ze=le?function(t){return null==t?[]:(t=Object(t),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(le(t),function(e){return ie.call(t,e)}))}:function(){return[]},He=Ne;function Be(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||h.test(e))&&-1<e&&e%1==0&&e<t}function Re(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(ce&&He(new ce(new ArrayBuffer(1)))!=E||fe&&He(new fe)!=S||de&&He(de.resolve())!=s||he&&He(new he)!=D||pe&&He(new pe)!=f)&&(He=function(e){var t=Ne(e),n=t==L?e.constructor:void 0,r=n?Re(n):"";if(r)switch(r){case ge:return E;case ve:return S;case ye:return s;case xe:return D;case be:return f}return t});var Ve=Fe(function(){return arguments}())?Fe:function(e){return Xe(e)&&J.call(e,"callee")&&!ie.call(e,"callee")},Ge=Array.isArray;var Ue=se||function(){return!1};function $e(e){if(!Ke(e))return!1;var t=Ne(e);return t==o||t==a||t==i||t==u}function Ye(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=n}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Je,Qe=z?(Je=z,function(e){return Je(e)}):function(e){return Xe(e)&&Ye(e.length)&&!!p[Ne(e)]};function Ze(e){return function(e){return null!=e&&Ye(e.length)&&!$e(e)}(e)?De(e):Ie(e)}t.exports=function(e,t){return Ee(e,t)}}).call(et,t(34),t(297)(e))},3419:function(e,t,n){(function(I){"use strict";I.defineMode("markdown",function(h,w){var k=I.getMode(h,"text/html"),i="null"==k.name;void 0===w.highlightFormatting&&(w.highlightFormatting=!1),void 0===w.maxBlockquoteDepth&&(w.maxBlockquoteDepth=0),void 0===w.taskLists&&(w.taskLists=!1),void 0===w.strikethrough&&(w.strikethrough=!1),void 0===w.emoji&&(w.emoji=!1),void 0===w.fencedCodeBlockHighlighting&&(w.fencedCodeBlockHighlighting=!0),void 0===w.xml&&(w.xml=!0),void 0===w.tokenTypeOverrides&&(w.tokenTypeOverrides={});var C={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 e in C)C.hasOwnProperty(e)&&w.tokenTypeOverrides[e]&&(C[e]=w.tokenTypeOverrides[e]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,m=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,S=/^\[(x| )\](?=\s)/i,g=w.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,v=/^ *(?:\={1,}|-{1,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,y=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,x=/^\s*\[[^\]]+?\]:.*$/,M=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function b(e,t,n){return t.f=t.inline=n,n(e,t)}function L(e,t,n){return t.f=t.block=n,n(e,t)}function r(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==T){var t=i;if(!t){var n=I.innerMode(k,e.htmlState);t="xml"==n.mode.name&&null===n.state.tagStart&&!n.state.context&&n.state.tokenize.isInText}t&&(e.f=N,e.block=a,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function a(e,t){var n=e.column()===t.indentation,r=function(e){return!e||!/\S/.test(e.string)}(t.prevLine.stream),i=t.indentedCode,o=t.prevLine.hr,a=!1!==t.list,l=(t.listStack[t.listStack.length-1]||0)+3;t.indentedCode=!1;var s=t.indentation;if(null===t.indentationDiff&&(t.indentationDiff=t.indentation,a)){for(t.em=!1,t.strong=!1,t.code=!1,t.strikethrough=!1,t.list=null;s<t.listStack[t.listStack.length-1];)t.listStack.pop(),t.listStack.length?t.indentation=t.listStack[t.listStack.length-1]:t.list=!1;!1!==t.list&&(t.indentationDiff=s-t.listStack[t.listStack.length-1])}var u=!(r||o||t.prevLine.header||a&&i||t.prevLine.fencedCodeEnd),c=(!1===t.list||o||r)&&t.indentation<=l&&e.match(p),f=null;if(4<=t.indentationDiff&&(i||t.prevLine.fencedCodeEnd||t.prevLine.header||r))return e.skipToEnd(),t.indentedCode=!0,C.code;if(e.eatSpace())return null;if(n&&t.indentation<=l&&(f=e.match(g))&&f[1].length<=6)return t.quote=0,t.header=f[1].length,t.thisLine.header=!0,w.highlightFormatting&&(t.formatting="header"),t.f=t.inline,A(t);if(t.indentation<=l&&e.eat(">"))return t.quote=n?1:t.quote+1,w.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),A(t);if(!c&&!t.setext&&n&&t.indentation<=l&&(f=e.match(m))){var d=f[1]?"ol":"ul";return t.indentation=s+e.current().length,t.list=!0,t.quote=0,t.listStack.push(t.indentation),w.taskLists&&e.match(S,!1)&&(t.taskList=!0),t.f=t.inline,w.highlightFormatting&&(t.formatting=["list","list-"+d]),A(t)}return n&&t.indentation<=l&&(f=e.match(y,!0))?(t.quote=0,t.fencedEndRE=new RegExp(f[1]+"+ *$"),t.localMode=w.fencedCodeBlockHighlighting&&function(e){if(I.findModeByName){var t=I.findModeByName(e);t&&(e=t.mime||t.mimes[0])}var n=I.getMode(h,e);return"null"==n.name?null:n}(f[2]),t.localMode&&(t.localState=I.startState(t.localMode)),t.f=t.block=D,w.highlightFormatting&&(t.formatting="code-block"),t.code=-1,A(t)):t.setext||!(u&&a||t.quote||!1!==t.list||t.code||c||x.test(e.string))&&(f=e.lookAhead(1))&&(f=f.match(v))?(t.setext?(t.header=t.setext,t.setext=0,e.skipToEnd(),w.highlightFormatting&&(t.formatting="header")):(t.header="="==f[0].charAt(0)?1:2,t.setext=t.header),t.thisLine.header=!0,t.f=t.inline,A(t)):c?(e.skipToEnd(),t.hr=!0,t.thisLine.hr=!0,C.hr):"["===e.peek()?b(e,t,O):b(e,t,t.inline)}function T(e,t){var n=k.token(e,t.htmlState);if(!i){var r=I.innerMode(k,t.htmlState);("xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText||t.md_inside&&-1<e.current().indexOf(">"))&&(t.f=N,t.block=a,t.htmlState=null)}return n}function D(e,t){var n,r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,o=r+3;return t.fencedEndRE&&t.indentation<=o&&(i||e.match(t.fencedEndRE))?(w.highlightFormatting&&(t.formatting="code-block"),i||(n=A(t)),t.localMode=t.localState=null,t.block=a,t.f=N,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?L(e,t,t.block):n):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),C.code)}function A(e){var t=[];if(e.formatting){t.push(C.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n<e.formatting.length;n++)t.push(C.formatting+"-"+e.formatting[n]),"header"===e.formatting[n]&&t.push(C.formatting+"-"+e.formatting[n]+"-"+e.header),"quote"===e.formatting[n]&&(!w.maxBlockquoteDepth||w.maxBlockquoteDepth>=e.quote?t.push(C.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(C.linkHref,"url"):(e.strong&&t.push(C.strong),e.em&&t.push(C.em),e.strikethrough&&t.push(C.strikethrough),e.emoji&&t.push(C.emoji),e.linkText&&t.push(C.linkText),e.code&&t.push(C.code),e.image&&t.push(C.image),e.imageAltText&&t.push(C.imageAltText,"link"),e.imageMarker&&t.push(C.imageMarker)),e.header&&t.push(C.header,C.header+"-"+e.header),e.quote&&(t.push(C.quote),!w.maxBlockquoteDepth||w.maxBlockquoteDepth>=e.quote?t.push(C.quote+"-"+e.quote):t.push(C.quote+"-"+w.maxBlockquoteDepth)),!1!==e.list){var r=(e.listStack.length-1)%3;r?1==r?t.push(C.list2):t.push(C.list3):t.push(C.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function t(e,t){if(e.match(n,!0))return A(t)}function N(e,t){var n=t.text(e,t);if(void 0!==n)return n;if(t.list)return t.list=null,A(t);if(t.taskList)return" "===e.match(S,!0)[1]?t.taskOpen=!0:t.taskClosed=!0,w.highlightFormatting&&(t.formatting="task"),t.taskList=!1,A(t);if(t.taskOpen=!1,t.taskClosed=!1,t.header&&e.match(/^#+$/,!0))return w.highlightFormatting&&(t.formatting="header"),A(t);var r=e.next();if(t.linkTitle){t.linkTitle=!1;var i=r;"("===r&&(i=")");var o="^\\s*(?:[^"+(i=(i+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+i;if(e.match(new RegExp(o),!0))return C.linkHref}if("`"===r){var a=t.formatting;w.highlightFormatting&&(t.formatting="code"),e.eatWhile("`");var l=e.current().length;if(0!=t.code||t.quote&&1!=l){if(l!=t.code)return t.formatting=a,A(t);var s=A(t);return t.code=0,s}return t.code=l,A(t)}if(t.code)return A(t);if("\\"===r&&(e.next(),w.highlightFormatting)){var u=A(t),c=C.formatting+"-escape";return u?u+" "+c:c}if("!"===r&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.imageMarker=!0,t.image=!0,w.highlightFormatting&&(t.formatting="image"),A(t);if("["===r&&t.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return t.imageMarker=!1,t.imageAltText=!0,w.highlightFormatting&&(t.formatting="image"),A(t);if("]"===r&&t.imageAltText){w.highlightFormatting&&(t.formatting="image");var u=A(t);return t.imageAltText=!1,t.image=!1,t.inline=t.f=E,u}if("["===r&&!t.image)return t.linkText&&e.match(/^.*?\]/)||(t.linkText=!0,w.highlightFormatting&&(t.formatting="link")),A(t);if("]"===r&&t.linkText){w.highlightFormatting&&(t.formatting="link");var u=A(t);return t.linkText=!1,t.inline=t.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?E:N,u}if("<"===r&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=F,w.highlightFormatting&&(t.formatting="link"),(u=A(t))?u+=" ":u="",u+C.linkInline;if("<"===r&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=F,w.highlightFormatting&&(t.formatting="link"),(u=A(t))?u+=" ":u="",u+C.linkEmail;if(w.xml&&"<"===r&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var f=e.string.indexOf(">",e.pos);if(-1!=f){var d=e.string.substring(e.start,f);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(d)&&(t.md_inside=!0)}return e.backUp(1),t.htmlState=I.startState(k),L(e,t,T)}if(w.xml&&"<"===r&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";if("*"===r||"_"===r){for(var h=1,p=1==e.pos?" ":e.string.charAt(e.pos-2);h<3&&e.eat(r);)h++;var m=e.peek()||" ",g=!/\s/.test(m)&&(!M.test(m)||/\s/.test(p)||M.test(p)),v=!/\s/.test(p)&&(!M.test(p)||/\s/.test(m)||M.test(m)),y=null,x=null;if(h%2&&(t.em||!g||"*"!==r&&v&&!M.test(p)?t.em!=r||!v||"*"!==r&&g&&!M.test(m)||(y=!1):y=!0),1<h&&(t.strong||!g||"*"!==r&&v&&!M.test(p)?t.strong!=r||!v||"*"!==r&&g&&!M.test(m)||(x=!1):x=!0),null!=x||null!=y){w.highlightFormatting&&(t.formatting=null==y?"strong":null==x?"em":"strong em"),!0===y&&(t.em=r),!0===x&&(t.strong=r);s=A(t);return!1===y&&(t.em=!1),!1===x&&(t.strong=!1),s}}else if(" "===r&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return A(t);e.backUp(1)}if(w.strikethrough)if("~"===r&&e.eatWhile(r)){if(t.strikethrough){w.highlightFormatting&&(t.formatting="strikethrough");s=A(t);return t.strikethrough=!1,s}if(e.match(/^[^\s]/,!1))return t.strikethrough=!0,w.highlightFormatting&&(t.formatting="strikethrough"),A(t)}else if(" "===r&&e.match(/^~~/,!0)){if(" "===e.peek())return A(t);e.backUp(2)}if(w.emoji&&":"===r&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){t.emoji=!0,w.highlightFormatting&&(t.formatting="emoji");var b=A(t);return t.emoji=!1,b}return" "===r&&(e.match(/^ +$/,!1)?t.trailingSpace++:t.trailingSpace&&(t.trailingSpaceNewLine=!0)),A(t)}function F(e,t){if(">"!==e.next())return e.match(/^[^>]+/,!0),C.linkInline;t.f=t.inline=N,w.highlightFormatting&&(t.formatting="link");var n=A(t);return n?n+=" ":n="",n+C.linkInline}function E(e,t){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(t.f=t.inline=function(r){return function(e,t){if(e.next()!==r)return e.match(o[r]),t.linkHref=!0,A(t);t.f=t.inline=N,w.highlightFormatting&&(t.formatting="link-string");var n=A(t);return t.linkHref=!1,n}}("("===n?")":"]"),w.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,A(t)):"error"}var o={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=l,e.next(),w.highlightFormatting&&(t.formatting="link"),t.linkText=!0,A(t)):b(e,t,N)}function l(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=s,w.highlightFormatting&&(t.formatting="link");var n=A(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function s(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=N,C.linkHref+" url")}var u={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:N,text:t,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(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&I.copyState(k,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?I.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return r(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=T)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,0<n)return null}}return t.f(e,t)},innerMode:function(e){return e.block==T?{state:e.htmlState,mode:k}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:u}},indent:function(e,t,n){return e.block==T&&k.indent?k.indent(e.htmlState,t,n):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,t,n):I.Pass},blankLine:r,getType:A,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return u},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})(n(1553),n(2138),n(3420))},3420:function(e,t,n){(function(o){"use strict";o.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"]},{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"]},{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","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"]}];for(var e=0;e<o.modeInfo.length;e++){var t=o.modeInfo[e];t.mimes&&(t.mime=t.mimes[0])}o.findModeByMIME=function(e){e=e.toLowerCase();for(var t=0;t<o.modeInfo.length;t++){var n=o.modeInfo[t];if(n.mime==e)return n;if(n.mimes)for(var r=0;r<n.mimes.length;r++)if(n.mimes[r]==e)return n}return/\+xml$/.test(e)?o.findModeByMIME("application/xml"):/\+json$/.test(e)?o.findModeByMIME("application/json"):void 0},o.findModeByExtension=function(e){for(var t=0;t<o.modeInfo.length;t++){var n=o.modeInfo[t];if(n.ext)for(var r=0;r<n.ext.length;r++)if(n.ext[r]==e)return n}},o.findModeByFileName=function(e){for(var t=0;t<o.modeInfo.length;t++){var n=o.modeInfo[t];if(n.file&&n.file.test(e))return n}var r=e.lastIndexOf("."),i=-1<r&&e.substring(r+1,e.length);if(i)return o.findModeByExtension(i)},o.findModeByName=function(e){e=e.toLowerCase();for(var t=0;t<o.modeInfo.length;t++){var n=o.modeInfo[t];if(n.name.toLowerCase()==e)return n;if(n.alias)for(var r=0;r<n.alias.length;r++)if(n.alias[r].toLowerCase()==e)return n}}})(n(1553))},752:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(3416),a=n.n(o),l=function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(334),n(2617),n(2138),n(3419);var u=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(c,r.Component),l(c,[{key:"updateCode",value:function(e){this.setState({code:e})}},{key:"componentDidMount",value:function(){var n=[0,1,2,3,8];this.refs.editor.getCodeMirror().on("beforeChange",function(e,t){-1!==n.indexOf(t.from.line)&&t.cancel()})}},{key:"setCode",value:function(){this.setState({code:"test"})}},{key:"render",value:function(){return i.a.createElement("div",null,i.a.createElement("button",{onClick:this.setCode.bind(this)},"set"),i.a.createElement(a.a,{ref:"editor",value:this.state.code,onChange:this.updateCode,options:{lineNumbers:!0,mode:"javascript"}}))}}]),c);function c(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,e));return t.updateCode=t.updateCode.bind(t),t.state={code:"// Code\n //2 \n //3 \n //4 \n //5 \n\n\n\n\n\n\n"},t}t.default=u},964:function(e,t,n){"use strict";var r=n(0),i=n(965);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},965:function(e,t,n){"use strict";var i=n(70),f=n(966),y=n(967);e.exports=function(e,d,o){var n=[],h={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},a={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},p={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)r(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=i({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=i({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=m(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=i({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(y(!(n in p),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e){var i=a.hasOwnProperty(n)?a[n]:null;return y("DEFINE_MANY_MERGED"===i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=m(e[n],r)}e[n]=r}}}(e,t)},autobind:function(){}};function r(e,t){if(t){y("function"!=typeof t,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),y(!d(t),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var n,r,i,o=e.prototype,a=o.__reactAutoBindPairs;for(var l in t.hasOwnProperty("mixins")&&p.mixins(e,t.mixins),t)if(t.hasOwnProperty(l)&&"mixins"!==l){var s=t[l],u=o.hasOwnProperty(l);if(n=u,r=l,void 0,i=h.hasOwnProperty(r)?h[r]:null,v.hasOwnProperty(r)&&y("OVERRIDE_BASE"===i,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",r),n&&y("DEFINE_MANY"===i||"DEFINE_MANY_MERGED"===i,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r),p.hasOwnProperty(l))p[l](e,s);else{var c=h.hasOwnProperty(l);if("function"==typeof s&&!c&&!u&&!1!==t.autobind)a.push(l,s),o[l]=s;else if(u){var f=h[l];y(c&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,l),"DEFINE_MANY_MERGED"===f?o[l]=m(o[l],s):"DEFINE_MANY"===f&&(o[l]=g(o[l],s))}else o[l]=s}}}else;}function l(e,t){for(var n in y(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(y(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function m(r,i){return function(){var e=r.apply(this,arguments),t=i.apply(this,arguments);if(null==e)return t;if(null==t)return e;var n={};return l(n,e),l(n,t),n}}function g(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function s(){}var u={componentDidMount:function(){this.__isMounted=!0}},c={componentWillUnmount:function(){this.__isMounted=!1}},v={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}};return i(s.prototype,e.prototype,v),function(e){var i=function(e){return e}(function(e,t,n){this.__reactAutoBindPairs.length&&function(e){for(var t,n=e.__reactAutoBindPairs,r=0;r<n.length;r+=2){var i=n[r],o=n[r+1];e[i]=(t=e,void 0,o.bind(t))}}(this),this.props=e,this.context=t,this.refs=f,this.updater=n||o,this.state=null;var r=this.getInitialState?this.getInitialState():null;y("object"==typeof r&&!Array.isArray(r),"%s.getInitialState(): must return an object or null",i.displayName||"ReactCompositeComponent"),this.state=r});for(var t in i.prototype=new s,(i.prototype.constructor=i).prototype.__reactAutoBindPairs=[],n.forEach(r.bind(null,i)),r(i,u),r(i,e),r(i,c),i.getDefaultProps&&(i.defaultProps=i.getDefaultProps()),y(i.prototype.render,"createClass(...): Class specification must implement a `render` method."),h)i.prototype[t]||(i.prototype[t]=null);return i}}},966:function(e,t,n){"use strict";var r={};e.exports=r},967:function(e,t,n){"use strict";var f=function(e){};e.exports=function(e,t,n,r,i,o,a,l){if(f(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,l],c=0;(s=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}}});