PageSourceSearch

https://mainnet.oneworldchain.org/_next/static/chunks/0a4aafe0.76ddd084bc367211.js

js oneworldchain.org collected 2026-09-29 23:13:48 UTC 183,775 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6567],{97480:function(e,t,r){r.r(t),r.d(t,{C:function(){return u},a:function(){return a},c:function(){return c}});var n,i=r(59361),o=Object.defineProperty,l=(e,t)=>o(e,"name",{value:t,configurable:!0});function s(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}l(s,"_mergeNamespaces");var a={exports:{}};i.c,n=function(){var e,t,r,n,i,o,s,a=navigator.userAgent,u=navigator.platform,c=/gecko\/\d/i.test(a),h=/MSIE \d/.test(a),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),f=/Edge\/(\d+)/.exec(a),p=h||d||f,g=p&&(h?document.documentMode||6:+(f||d)[1]),m=!f&&/WebKit\//.test(a),v=m&&/Qt\/\d+\.\d+/.test(a),y=!f&&/Chrome\//.test(a),b=/Opera\//.test(a),x=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(a),C=/PhantomJS/.test(a),S=x&&(/Mobile\/\w+/.test(a)||navigator.maxTouchPoints>2),L=/Android/.test(a),k=S||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(a),T=S||/Mac/.test(u),M=/\bCrOS\b/.test(a),N=/win/i.test(u),O=b&&a.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(b=!1,m=!0);var A=T&&(v||b&&(null==O||O<12.11)),D=c||p&&g>=9;function W(e){return RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}l(W,"classTest");var H=l(function(e,t){var r=e.className,n=W(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}},"rmClass");function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return F(e).appendChild(t)}function E(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 I(e,t,r,n){var i=E(e,t,r,n);return i.setAttribute("role","presentation"),i}function R(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 B(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,t){var r=e.className;W(t).test(r)||(e.className+=(r?" ":"")+t)}function G(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!W(r[n]).test(t)&&(t+=" "+r[n]);return t}l(F,"removeChildren"),l(P,"removeChildrenAndAdd"),l(E,"elt"),l(I,"eltP"),document.createRange?t=l(function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i},"range"):t=l(function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n},"range"),l(R,"contains"),l(B,"activeElt"),l(z,"addClass"),l(G,"joinClasses");var U=l(function(e){e.select()},"selectInput");function V(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function K(e,t,r){for(var n in t||(t={}),e)e.hasOwnProperty(n)&&(!1!==r||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function j(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("	",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}S?U=l(function(e){e.selectionStart=0,e.selectionEnd=e.value.length},"selectInput"):p&&(U=l(function(e){try{e.select()}catch(e){}},"selectInput")),l(V,"bind"),l(K,"copyObj"),l(j,"countColumn");var _=l(function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)},"Delayed");function X(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return -1}_.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},_.prototype.set=function(e,t){this.f=t;var r=+new Date+e;
1(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)},l(X,"indexOf");var Y={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},q={origin:"*mouse"},Z={origin:"+move"};function Q(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("	",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}l(Q,"findColumn");var J=[""];function ee(e){for(;J.length<=e;)J.push(et(J)+" ");return J[e]}function et(e){return e[e.length-1]}function er(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function en(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ei(){}function eo(e,t){var r;return Object.create?r=Object.create(e):(ei.prototype=e,r=new ei),t&&K(t,r),r}l(ee,"spaceStr"),l(et,"lst"),l(er,"map"),l(en,"insertSorted"),l(ei,"nothing"),l(eo,"createObj");var el=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function es(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||el.test(e))}function ea(e,t){return t?!!(t.source.indexOf("\\w")>-1&&es(e))||t.test(e):es(e)}function eu(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}l(es,"isWordCharBasic"),l(ea,"isWordChar"),l(eu,"isEmpty");var ec=/[\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 eh(e){return e.charCodeAt(0)>=768&&ec.test(e)}function ed(e,t,r){for(;(r<0?t>0:t<e.length)&&eh(e.charAt(t));)t+=r;return t}function ef(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function ep(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}l(eh,"isExtendingChar"),l(ed,"skipExtendingChars"),l(ef,"findFirst"),l(ep,"iterateBidiSections");var eg=null;function em(e,t,r){var n;eg=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"==r?n=i:eg=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:eg=i)}return null!=n?n:eg}l(em,"getBidiPartAt");var ev=function(){function e(e){return e<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}l(e,"charType");var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,o=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return l(s,"BidiSpan"),function(l,a){var u="ltr"==a?"L":"R";
1if(0==l.length||"ltr"==a&&!t.test(l))return!1;for(var c=l.length,h=[],d=0;d<c;++d)h.push(e(l.charCodeAt(d)));for(var f=0,p=u;f<c;++f){var g=h[f];"m"==g?h[f]=p:p=g}for(var m=0,v=u;m<c;++m){var y=h[m];"1"==y&&"r"==v?h[m]="n":n.test(y)&&(v=y,"r"==y&&(h[m]="R"))}for(var b=1,x=h[0];b<c-1;++b){var w=h[b];"+"==w&&"1"==x&&"1"==h[b+1]?h[b]="1":","==w&&x==h[b+1]&&("1"==x||"n"==x)&&(h[b]=x),x=w}for(var C=0;C<c;++C){var S=h[C];if(","==S)h[C]="N";else if("%"==S){var L=void 0;for(L=C+1;L<c&&"%"==h[L];++L);for(var k=C&&"!"==h[C-1]||L<c&&"1"==h[L]?"1":"N",T=C;T<L;++T)h[T]=k;C=L-1}}for(var M=0,N=u;M<c;++M){var O=h[M];"L"==N&&"1"==O?h[M]="L":n.test(O)&&(N=O)}for(var A=0;A<c;++A)if(r.test(h[A])){var D=void 0;for(D=A+1;D<c&&r.test(h[D]);++D);for(var W=(A?h[A-1]:u)=="L",H=W==((D<c?h[D]:u)=="L")?W?"L":"R":u,F=A;F<D;++F)h[F]=H;A=D-1}for(var P,E=[],I=0;I<c;)if(i.test(h[I])){var R=I;for(++I;I<c&&i.test(h[I]);++I);E.push(new s(0,R,I))}else{var B=I,z=E.length,G="rtl"==a?1:0;for(++I;I<c&&"L"!=h[I];++I);for(var U=B;U<I;)if(o.test(h[U])){B<U&&(E.splice(z,0,new s(1,B,U)),z+=G);var V=U;for(++U;U<I&&o.test(h[U]);++U);E.splice(z,0,new s(2,V,U)),z+=G,B=U}else++U;B<I&&E.splice(z,0,new s(1,B,I))}return"ltr"==a&&(1==E[0].level&&(P=l.match(/^\s+/))&&(E[0].from=P[0].length,E.unshift(new s(0,0,P[0].length))),1==et(E).level&&(P=l.match(/\s+$/))&&(et(E).to-=P[0].length,E.push(new s(0,c-P[0].length,c)))),"rtl"==a?E.reverse():E}}();function ey(e,t){var r=e.order;return null==r&&(r=e.order=ev(e.text,t)),r}l(ey,"getOrder");var eb=[],ex=l(function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||eb).concat(r)}},"on");function ew(e,t){return e._handlers&&e._handlers[t]||eb}function eC(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=X(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function eS(e,t){var r=ew(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function eL(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),eS(e,r||t.type,e,t),eA(t)||t.codemirrorIgnore}function ek(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==X(r,t[n])&&r.push(t[n])}function eT(e,t){return ew(e,t).length>0}function eM(e){e.prototype.on=function(e,t){ex(this,e,t)},e.prototype.off=function(e,t){eC(this,e,t)}}function eN(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function eO(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function eA(e){return null!=e.defaultPrevented?e.defaultPrevented:!1==e.returnValue}function eD(e){eN(e),eO(e)}function eW(e){return e.target||e.srcElement}function eH(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),T&&e.ctrlKey&&1==t&&(t=3),t}l(ew,"getHandlers"),l(eC,"off"),l(eS,"signal"),l(eL,"signalDOMEvent"),l(ek,"signalCursorActivity"),l(eT,"hasHandler"),l(eM,"eventMixin"),l(eN,"e_preventDefault"),l(eO,"e_stopPropagation"),l(eA,"e_defaultPrevented"),l(eD,"e_stop"),l(eW,"e_target"),l(eH,"e_button");var eF=function(){if(p&&g<9)return!1;var e=E("div");return"draggable"in e||"dragDrop"in e}();function eP(e){if(null==r){var t=E("span","​");P(e,E("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(r=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&g<8))}var n=r?E("span","​"):E("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function eE(e){if(null!=n)return n;var r=P(e,document.createTextNode("AخA")),i=t(r,0,1).getBoundingClientRect(),o=t(r,1,2).getBoundingClientRect();return F(e),!!i&&i.left!=i.right&&(n=o.right-i.right<3)}l(eP,"zeroWidthElement"),l(eE,"hasBadBidiRects");var eI=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},eR=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)},eB="oncopy"in(e=E("div"))||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy),ez=null;function eG(e){if(null!=ez)return ez;var r=P(e,E("span","x")),n=r.getBoundingClientRect(),i=t(r,0,1).getBoundingClientRect();return ez=Math.abs(n.left-i.left)>1}l(eG,"hasBadZoomedRects");var eU={},eV={};function eK(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),eU[e]=t}function ej(e,t){eV[e]=t}function e_(e){if("string"==typeof e&&eV.hasOwnProperty(e))e=eV[e];else if(e&&"string"==typeof e.name&&eV.hasOwnProperty(e.name)){var t=eV[e.name];"string"==typeof t&&(t={name:t}),(e=eo(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return e_("application/xml");else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return e_("application/json");return"string"==typeof e?{name:e}:e||{name:"null"}}function eX(e,t){var r=eU[(t=e_(t)).name];if(!r)return eX(e,"text/plain");var n=r(e,t);if(eY.hasOwnProperty(t.name)){var i=eY[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}l(eK,"defineMode"),l(ej,"defineMIME"),l(e_,"resolveMode"),l(eX,"getMode");var eY={};function e$(e,t){K(t,eY.hasOwnProperty(e)?eY[e]:eY[e]={})}function eq(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function eZ(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function eQ(e,t,r){return!e.startState||e.startState(t,r)}l(e$,"extendMode"),l(eq,"copyState"),l(eZ,"innerMode"),l(eQ,"startState");var eJ=l(function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r},"StringStream");function e0(e,t){if((t-=e.first)<0||t>=e.size)throw Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function e1(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;
1i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function e2(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function e3(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function e5(e){if(null==e.parent)return null;for(var t=e.parent,r=X(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function e9(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function e6(e,t){return t>=e.first&&t<e.first+e.size}function e8(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function e7(e,t,r){if(void 0===r&&(r=null),!(this instanceof e7))return new e7(e,t,r);this.line=e,this.ch=t,this.sticky=r}function e4(e,t){return e.line-t.line||e.ch-t.ch}function te(e,t){return e.sticky==t.sticky&&0==e4(e,t)}function tt(e){return e7(e.line,e.ch)}function tr(e,t){return 0>e4(e,t)?t:e}function tn(e,t){return 0>e4(e,t)?e:t}function ti(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function to(e,t){if(t.line<e.first)return e7(e.first,0);var r=e.first+e.size-1;return t.line>r?e7(r,e0(e,r).text.length):tl(t,e0(e,t.line).text.length)}function tl(e,t){var r=e.ch;return null==r||r>t?e7(e.line,t):r<0?e7(e.line,0):e}function ts(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=to(e,t[n]);return r}eJ.prototype.eol=function(){return this.pos>=this.string.length},eJ.prototype.sol=function(){return this.pos==this.lineStart},eJ.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},eJ.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eJ.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},eJ.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eJ.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},eJ.prototype.skipToEnd=function(){this.pos=this.string.length},eJ.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},eJ.prototype.backUp=function(e){this.pos-=e},eJ.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},eJ.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},eJ.prototype.match=function(e,t,r){if("string"==typeof e){var n=l(function(e){return r?e.toLowerCase():e},"cased");if(n(this.string.substr(this.pos,e.length))==n(e))return!1!==t&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}},eJ.prototype.current=function(){return this.string.slice(this.start,this.pos)},eJ.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},eJ.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},eJ.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)},l(e0,"getLine"),l(e1,"getBetween"),l(e2,"getLines"),l(e3,"updateLineHeight"),l(e5,"lineNo"),l(e9,"lineAtHeight"),l(e6,"isLine"),l(e8,"lineNumberFor"),l(e7,"Pos"),l(e4,"cmp"),l(te,"equalCursorPos"),l(tt,"copyPos"),l(tr,"maxPos"),l(tn,"minPos"),l(ti,"clipLine"),l(to,"clipPos"),l(tl,"clipToLen"),l(ts,"clipPosArray");var ta=l(function(e,t){this.state=e,this.lookAhead=t},"SavedContext"),tu=l(function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1},"Context");function tc(e,t,r,n){var i=[e.state.modeGen],o={};tb(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var s=r.state,a=l(function(n){r.baseTokens=i;var l=e.state.overlays[n],a=1,u=0;r.state=!0,tb(e,t.text,l.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t){if(l.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}},o),r.state=s,r.baseTokens=null,r.baseTokenPos=1},"loop"),u=0;u<e.state.overlays.length;++u)a(u);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function th(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=td(e,e5(t)),i=t.text.length>e.options.maxHighlightLength&&eq(e.doc.mode,n.state),o=tc(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function td(e,t,r){var n=e.doc,i=e.display;
vendor: 5,098 bytes, line 1
1if(!n.mode.startState)return new tu(n,!0,t);var o=tx(e,t,r),l=o>n.first&&e0(n,o-1).stateAfter,s=l?tu.fromSaved(n,l,o):new tu(n,eQ(n.mode),o);return n.iter(o,t,function(r){tf(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function tf(e,t,r,n){var i=e.doc.mode,o=new eJ(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&tp(i,r.state);!o.eol();)tg(i,o,r.state),o.start=o.pos}function tp(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=eZ(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function tg(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=eZ(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw Error("Mode "+e.name+" failed to advance stream.")}tu.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},tu.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}},tu.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},tu.fromSaved=function(e,t,r){return t instanceof ta?new tu(e,eq(e.mode,t.state),r,t.lookAhead):new tu(e,eq(e.mode,t),r)},tu.prototype.save=function(e){var t=!1!==e?eq(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ta(t,this.maxLookAhead):t},l(tc,"highlightLine"),l(th,"getLineStyles"),l(td,"getContextBefore"),l(tf,"processLine"),l(tp,"callBlankLine"),l(tg,"readToken");var tm=l(function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},"Token");function tv(e,t,r,n){var i,o=e.doc,l=o.mode;t=to(o,t);var s,a=e0(o,t.line),u=td(e,t.line,r),c=new eJ(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=tg(l,c,u.state),n&&s.push(new tm(c,i,eq(o.mode,u.state)));return n?s:new tm(c,i,u.state)}function ty(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function tb(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new eJ(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&ty(tp(r,n.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&tf(e,t,n,h.pos),h.pos=t.length,a=null):a=ty(tg(r,h,n.state,d),o),d){var f=d[0].name;f&&(a="m-"+(a?f+" "+a:f))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}function tx(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=e0(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof ta?u.lookAhead:0)<=o.modeFrontier))return s;var c=j(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function tw(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=e0(e,n).stateAfter;if(i&&(!(i instanceof ta)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}l(tv,"takeToken"),l(ty,"extractLineClasses"),l(tb,"runMode"),l(tx,"findStartLine"),l(tw,"retreatFrontier");var tC=!1,tS=!1;function tL(){tC=!0}function tk(){tS=!0}function tT(e,t,r){this.marker=e,this.from=t,this.to=r}function tM(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function tN(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function tO(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function tA(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new tT(l,o.from,s?null:o.to))}}return n}function tD(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new tT(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function tW(e,t){if(t.full)return null;var r=e6(e,t.from.line)&&e0(e,t.from.line).markedSpans,n=e6(e,t.to.line)&&e0(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==e4(t.from,t.to),s=tA(r,i,l),a=tD(n,o,l),u=1==t.text.length,c=et(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var d=s[h];if(null==d.to){var f=tM(a,d.marker);f?u&&(d.to=null==f.to?null:f.to+c):d.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];
1null!=g.to&&(g.to+=c),null==g.from?!tM(s,g.marker)&&(g.from=c,u&&(s||(s=[])).push(g)):(g.from+=c,u&&(s||(s=[])).push(g))}s&&(s=tH(s)),a&&a!=s&&(a=tH(a));var m=[s];if(!u){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new tT(s[b].marker,null,null));for(var x=0;x<y;++x)m.push(v);m.push(a)}return m}function tH(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function tF(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;r.readOnly&&(!n||-1==X(n,r))&&(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(0>e4(u.to,s.from)||e4(u.from,s.to)>0)){var c=[a,1],h=e4(u.from,s.from),d=e4(u.to,s.to);!(h<0)&&(l.inclusiveLeft||h)||c.push({from:u.from,to:s.from}),!(d>0)&&(l.inclusiveRight||d)||c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function tP(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function tE(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function tI(e){return e.inclusiveLeft?-1:0}function tR(e){return e.inclusiveRight?1:0}function tB(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=e4(n.from,i.from)||tI(e)-tI(t);return o?-o:e4(n.to,i.to)||tR(e)-tR(t)||t.id-e.id}function tz(e,t){var r,n=tS&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&(t?i.from:i.to)==null&&(!r||0>tB(r,i.marker))&&(r=i.marker);return r}function tG(e){return tz(e,!0)}function tU(e){return tz(e,!1)}function tV(e,t){var r,n=tS&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||0>tB(r,o.marker))&&(r=o.marker)}return r}function tK(e,t,r,n,i){var o=e0(e,t),l=tS&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=e4(u.from,r)||tI(a.marker)-tI(i),h=e4(u.to,n)||tR(a.marker)-tR(i);if((!(c>=0)||!(h<=0))&&(!(c<=0)||!(h>=0))&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?e4(u.to,r)>=0:e4(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?0>=e4(u.from,n):0>e4(u.from,n))))return!0}}}function tj(e){for(var t;t=tG(e);)e=t.find(-1,!0).line;return e}function t_(e){for(var t;t=tU(e);)e=t.find(1,!0).line;return e}function tX(e){for(var t,r;t=tU(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function tY(e,t){var r=e0(e,t),n=tj(r);return r==n?t:e5(n)}function t$(e,t){if(t>e.lastLine())return t;var r,n=e0(e,t);if(!tq(e,n))return t;for(;r=tU(n);)n=r.find(1,!0).line;return e5(n)+1}function tq(e,t){var r=tS&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed&&(null==n.from||!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&tZ(e,t,n)))return!0}}function tZ(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return tZ(e,n.line,tM(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&tZ(e,t,i))return!0}function tQ(e){e=tj(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function tJ(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=tG(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=tU(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function t0(e){var t=e.display,r=e.doc;t.maxLine=e0(r,r.first),t.maxLineLength=tJ(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=tJ(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}l(tL,"seeReadOnlySpans"),l(tk,"seeCollapsedSpans"),l(tT,"MarkedSpan"),l(tM,"getMarkedSpanFor"),l(tN,"removeMarkedSpan"),l(tO,"addMarkedSpan"),l(tA,"markedSpansBefore"),l(tD,"markedSpansAfter"),l(tW,"stretchSpansOverChange"),l(tH,"clearEmptySp
1ans"),l(tF,"removeReadOnlyRanges"),l(tP,"detachMarkedSpans"),l(tE,"attachMarkedSpans"),l(tI,"extraLeft"),l(tR,"extraRight"),l(tB,"compareCollapsedMarkers"),l(tz,"collapsedSpanAtSide"),l(tG,"collapsedSpanAtStart"),l(tU,"collapsedSpanAtEnd"),l(tV,"collapsedSpanAround"),l(tK,"conflictingCollapsedRange"),l(tj,"visualLine"),l(t_,"visualLineEnd"),l(tX,"visualLineContinued"),l(tY,"visualLineNo"),l(t$,"visualLineEndNo"),l(tq,"lineIsHidden"),l(tZ,"lineIsHiddenInner"),l(tQ,"heightAtLine"),l(tJ,"lineLength"),l(t0,"findMaxLine");var t1=l(function(e,t,r){this.text=e,tE(this,t),this.height=r?r(this):1},"Line");function t2(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),tP(e),tE(e,r);var i=n?n(e):1;i!=e.height&&e3(e,i)}function t3(e){e.parent=null,tP(e)}t1.prototype.lineNo=function(){return e5(this)},eM(t1),l(t2,"updateLine"),l(t3,"cleanUpLine");var t5={},t9={};function t6(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?t9:t5;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function t8(e,t){var r=I("span",null,null,m?"padding-right: .1px":null),n={pre:I("pre",[r],"CodeMirror-line"),content:r,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,l=void 0;n.pos=0,n.addToken=t4,eE(e.display.measure)&&(l=ey(o,e.doc.direction))&&(n.addToken=rt(n.addToken,l)),n.map=[];var s=t!=e.display.externalMeasured&&e5(o);rn(o,n,th(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=G(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=G(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(eP(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(m){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return eS(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=G(n.pre.className,n.textClass||"")),n}function t7(e){var t=E("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function t4(e,t,r,n,i,o,l){if(t){var s,a=e.splitSpaces?re(t,e.trailingSpace):t,u=e.cm.state.specialChars,c=!1;if(u.test(t)){s=document.createDocumentFragment();for(var h=0;;){u.lastIndex=h;var d=u.exec(t),f=d?d.index-h:t.length-h;if(f){var m=document.createTextNode(a.slice(h,h+f));p&&g<9?s.appendChild(E("span",[m])):s.appendChild(m),e.map.push(e.pos,e.pos+f,m),e.col+=f,e.pos+=f}if(!d)break;h+=f+1;var v=void 0;if("	"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=s.appendChild(E("span",ee(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","	"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?(v=s.appendChild(E("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]):((v=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),p&&g<9?s.appendChild(E("span",[v])):s.appendChild(v)),e.col+=1;e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,s),p&&g<9&&(c=!0),e.pos+=t.length;if(e.trailingSpace=32==a.charCodeAt(t.length-1),r||n||i||c||o||l){var x=r||"";n&&(x+=n),i&&(x+=i);var w=E("span",[s],x,o);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,l[C]);return e.content.appendChild(w)}e.content.appendChild(s)}}function re(e,t){if(e.length>1&&!/  /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "==o&&r&&(i==e.length-1||32==e.charCodeAt(i+1))&&(o="\xa0"),n+=o,r=" "==o}return n}function rt(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var h=void 0,d=0;d<t.length&&(!((h=t[d]).to>u)||!(h.from<=u));d++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function rr(e,t,r,n){var i=!n&&r.widgetNode;
vendor: 4,407 bytes, line 1
1i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rn(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var l=1;l<r.length;l+=2)t.addToken(t,i.slice(o,o=r[l]),t6(r[l+1],t.cm.options));return}for(var s,a,u,c,h,d,f,p=i.length,g=0,m=1,v="",y=0;;){if(y==g){u=c=h=a="",f=null,d=null,y=1/0;for(var b=[],x=void 0,w=0;w<n.length;++w){var C=n[w],S=C.marker;if("bookmark"==S.type&&C.from==g&&S.widgetNode)b.push(S);else if(C.from<=g&&(null==C.to||C.to>g||S.collapsed&&C.to==g&&C.from==g)){if(null!=C.to&&C.to!=g&&y>C.to&&(y=C.to,c=""),S.className&&(u+=" "+S.className),S.css&&(a=(a?a+";":"")+S.css),S.startStyle&&C.from==g&&(h+=" "+S.startStyle),S.endStyle&&C.to==y&&(x||(x=[])).push(S.endStyle,C.to),S.title&&((f||(f={})).title=S.title),S.attributes)for(var L in S.attributes)(f||(f={}))[L]=S.attributes[L];S.collapsed&&(!d||0>tB(d.marker,S))&&(d=C)}else C.from>g&&y>C.from&&(y=C.from)}if(x)for(var k=0;k<x.length;k+=2)x[k+1]==y&&(c+=" "+x[k]);if(!d||d.from==g)for(var T=0;T<b.length;++T)rr(t,0,b[T]);if(d&&(d.from||0)==g){if(rr(t,(null==d.to?p+1:d.to)-g,d.marker,null==d.from),null==d.to)return;d.to==g&&(d=!1)}}if(g>=p)break;for(var M=Math.min(p,y);;){if(v){var N=g+v.length;if(!d){var O=N>M?v.slice(0,M-g):v;t.addToken(t,O,s?s+u:u,h,g+O.length==y?c:"",a,f)}if(N>=M){v=v.slice(M-g),g=M;break}g=N,h=""}v=i.slice(o,o=r[m++]),s=t6(r[m++],t.cm.options)}}}function ri(e,t,r){this.line=t,this.rest=tX(t),this.size=this.rest?e5(et(this.rest))-r+1:1,this.node=this.text=null,this.hidden=tq(e,t)}function ro(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new ri(e.doc,e0(e.doc,o),o);n=o+l.size,i.push(l)}return i}l(t6,"interpretTokenStyle"),l(t8,"buildLineContent"),l(t7,"defaultSpecialCharPlaceholder"),l(t4,"buildToken"),l(re,"splitSpaces"),l(rt,"buildTokenBadBidi"),l(rr,"buildCollapsedSpan"),l(rn,"insertLineContent"),l(ri,"LineView"),l(ro,"buildViewArray");var rl=null;function rs(e){rl?rl.ops.push(e):e.ownsGroup=rl={ops:[e],delayedCallbacks:[]}}function ra(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function ru(e,t){var r=e.ownsGroup;if(r)try{ra(r)}finally{rl=null,t(r)}}l(rs,"pushOperation"),l(ra,"fireCallbacksForOps"),l(ru,"finishOperation");var rc=null;function rh(e,t){var r=ew(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);rl?n=rl.delayedCallbacks:rc?n=rc:(n=rc=[],setTimeout(rd,0));for(var o=l(function(e){n.push(function(){return r[e].apply(null,i)})},"loop"),s=0;s<r.length;++s)o(s)}}function rd(){var e=rc;rc=null;for(var t=0;t<e.length;++t)e[t]()}function rf(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?rv(e,t):"gutter"==o?rb(e,t,r,n):"class"==o?ry(e,t):"widget"==o&&rx(e,t,n)}t.changes=null}function rp(e){return e.node==e.text&&(e.node=E("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&g<8&&(e.node.style.zIndex=2)),e.node}function rg(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=rp(t);t.background=n.insertBefore(E("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function rm(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):t8(e,t)}function rv(e,t){var r=t.text.className,n=rm(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ry(e,t)):r&&(t.text.className=r)}function ry(e,t){rg(e,t),t.line.wrapClass?rp(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function rb(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackgroun
vendor: 4,869 bytes, line 1
1d&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=rp(t);t.gutterBackground=E("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.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 l=rp(t),s=t.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(E("div",e8(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.display.gutterSpecs.length;++a){var u=e.display.gutterSpecs[a].className,c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(E("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function rx(e,t,r){t.alignable&&(t.alignable=null);for(var n=W("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);rC(e,t,r)}function rw(e,t,r,n){var i=rm(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ry(e,t),rb(e,t,r,n),rC(e,t,n),t.node}function rC(e,t,r){if(rS(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)rS(e,t.rest[n],t,r,!1)}function rS(e,t,r,n,i){if(t.widgets)for(var o=rp(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=E("div",[a.node],"CodeMirror-linewidget"+(a.className?" "+a.className:""));a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),rL(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),rh(a,"redraw")}}function rL(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function rk(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!R(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),P(t.display.measure,E("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function rT(e,t){for(var r=eW(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function rM(e){return e.lineSpace.offsetTop}function rN(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function rO(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=P(e.measure,E("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function rA(e){return 50-e.display.nativeBarWidth}function rD(e){return e.display.scroller.clientWidth-rA(e)-e.display.barWidth}function rW(e){return e.display.scroller.clientHeight-rA(e)-e.display.barHeight}function rH(e,t,r){var n=e.options.lineWrapping,i=n&&rD(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function rF(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(e5(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rP(e,t){var r=e5(t=tj(t)),n=e.display.externalMeasured=new ri(e.doc,t,r);n.lineN=r;var i=n.built=t8(e,n);return n.text=i.pre,P(e.display.lineMeasure,i.pre),n}function rE(e,t,r,n){return rB(e,rR(e,t),r,n)}function rI(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ns(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function rR(e,t){var r=e5(t),n=rI(e,r);n&&!n.text?n=null:n&&n.changes&&(rf(e,n,r,nr(e)),e.curOp.forceUpdate=!0),n||(n=rP(e,t));var i=rF(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function rB(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");
vendor: 5,196 bytes, line 1
1return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(rH(e,t.view,t.rect),t.hasHeights=!0),(o=rV(e,t,r,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}l(rh,"signalLater"),l(rd,"fireOrphanDelayed"),l(rf,"updateLineForChanges"),l(rp,"ensureLineWrapped"),l(rg,"updateLineBackground"),l(rm,"getLineContent"),l(rv,"updateLineText"),l(ry,"updateLineClasses"),l(rb,"updateLineGutter"),l(rx,"updateLineWidgets"),l(rw,"buildLineElement"),l(rC,"insertLineWidgets"),l(rS,"insertLineWidgetsFor"),l(rL,"positionLineWidget"),l(rk,"widgetHeight"),l(rT,"eventInWidget"),l(rM,"paddingTop"),l(rN,"paddingVert"),l(rO,"paddingH"),l(rA,"scrollGap"),l(rD,"displayWidth"),l(rW,"displayHeight"),l(rH,"ensureLineHeights"),l(rF,"mapFromLineView"),l(rP,"updateExternalMeasurement"),l(rE,"measureChar"),l(rI,"findViewForLine"),l(rR,"prepareMeasureForLine"),l(rB,"measureCharPrepared");var rz={left:0,right:0,top:0,bottom:0};function rG(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function rU(e,t){var r=rz;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function rV(e,r,n,i){var o,l,s=rG(r.map,n,i),a=s.node,u=s.start,c=s.end,h=s.collapse;if(3==a.nodeType){for(var d=0;d<4;d++){for(;u&&eh(r.line.text.charAt(s.coverStart+u));)--u;for(;s.coverStart+c<s.coverEnd&&eh(r.line.text.charAt(s.coverStart+c));)++c;if((o=p&&g<9&&0==u&&c==s.coverEnd-s.coverStart?a.parentNode.getBoundingClientRect():rU(t(a,u,c).getClientRects(),i)).left||o.right||0==u)break;c=u,u-=1,h="right"}p&&g<11&&(o=rK(e.display.measure,o))}else u>0&&(h=i="right"),o=e.options.lineWrapping&&(l=a.getClientRects()).length>1?l["right"==i?l.length-1:0]:a.getBoundingClientRect();if(p&&g<9&&!u&&(!o||!o.left&&!o.right)){var f=a.parentNode.getClientRects()[0];o=f?{left:f.left,right:f.left+nt(e.display),top:f.top,bottom:f.bottom}:rz}for(var m=o.top-r.rect.top,v=o.bottom-r.rect.top,y=(m+v)/2,b=r.view.measure.heights,x=0;x<b.length-1&&!(y<b[x]);x++);var w=x?b[x-1]:0,C=b[x],S={left:("right"==h?o.right:o.left)-r.rect.left,right:("left"==h?o.left:o.right)-r.rect.left,top:w,bottom:C};return o.left||o.right||(S.bogus=!0),e.options.singleCursorHeightPerLine||(S.rtop=m,S.rbottom=v),S}function rK(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!eG(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function rj(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 r_(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)rj(e.display.view[t])}function rX(e){r_(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function rY(){return y&&L?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function r$(){return y&&L?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rq(e){var t=tj(e).widgets,r=0;if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=rk(t[n]));return r}function rZ(e,t,r,n,i){if(!i){var o=rq(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=tQ(t);if("local"==n?l+=rM(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:r$());var a=s.left+("window"==n?0:rY());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function rQ(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=rY(),i-=r$();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function rJ(e,t,r,n,i){return n||(n=e0(e.doc,t.line)),rZ(e,n,rE(e,n,t.ch,i),r)}function r0(e,t,r,n,i,o){function s(t,l){var s=rB(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,rZ(e,n,s,r)}n=n||e0(e.doc,t.line),i||(i=rR(e,n)),l(s,"get");var a=ey(n,e.doc.direction),u=t.ch,c=t.sticky;if(u>=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return s("before"==c?u-1:u,"before"==c);function h(e,t,r){return s(r?e-1:e,1==a[t].level!=r)}l(h,"getBidi");var d=em(a,u,c),f=eg,p=h(u,d,"before"==c);return null!=f&&(p.other=h(u,f,"before"!=c)),p}function r1(e,t){var r=0;
vendor: 4,117 bytes, line 1
1t=to(e.doc,t),e.options.lineWrapping||(r=nt(e.display)*t.ch);var n=e0(e.doc,t.line),i=tQ(n)+rM(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function r2(e,t,r,n,i){var o=e7(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function r3(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return r2(n.first,0,null,-1,-1);var i=e9(n,r),o=n.first+n.size-1;if(i>o)return r2(n.first+n.size-1,e0(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=e0(n,i);;){var s=r8(e,l,i,t,r),a=tV(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=e0(n,i=u.line)}}function r5(e,t,r,n){n-=rq(t);var i=t.text.length,o=ef(function(t){return rB(e,r,t-1).bottom<=n},i,0);return i=ef(function(t){return rB(e,r,t).top>n},o,i),{begin:o,end:i}}function r9(e,t,r,n){r||(r=rR(e,t));var i=rZ(e,t,rB(e,r,n),"line").top;return r5(e,t,r,i)}function r6(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function r8(e,t,r,n,i){i-=tQ(t);var o=rR(e,t),l=rq(t),s=0,a=t.text.length,u=!0,c=ey(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?r4:r7)(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var d,f,p=null,g=null,m=ef(function(t){var r=rB(e,o,t);return r.top+=l,r.bottom+=l,!!r6(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),v=!1;if(g){var y=n-g.left<g.right-n,b=y==u;m=p+(b?0:1),f=b?"after":"before",d=y?g.left:g.right}else{!u&&(m==a||m==s)&&m++,f=0==m?"after":m==t.text.length?"before":rB(e,o,m-(u?1:0)).bottom+l<=i==u?"after":"before";var x=r0(e,e7(r,m,f),"line",t,o);d=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return r2(r,m=ed(t.text,m,1),f,v,n-d)}function r7(e,t,r,n,i,o,l){var s=ef(function(s){var a=i[s],u=1!=a.level;return r6(r0(e,e7(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=r0(e,e7(r,u?a.from:a.to,u?"after":"before"),"line",t,n);r6(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function r4(e,t,r,n,i,o,l){var s=r5(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,d=0;d<i.length;d++){var f=i[d];if(!(f.from>=u)&&!(f.to<=a)){var p=rB(e,n,1!=f.level?Math.min(u,f.to)-1:Math.max(a,f.from)).right,g=p<o?o-p+1e9:p-o;(!c||h>g)&&(c=f,h=g)}}return c||(c=i[i.length-1]),c.from<a&&(c={from:a,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function ne(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==i){i=E("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)i.appendChild(document.createTextNode("x")),i.appendChild(E("br"));i.appendChild(document.createTextNode("x"))}P(e.measure,i);var r=i.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),F(e.measure),r||1}function nt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=E("span","xxxxxxxxxx"),r=E("pre",[t],"CodeMirror-line-like");P(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function nr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ni(e){var t=ne(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/nt(e.display)-3);return function(i){if(tq(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function no(e){var t=e.doc,r=ni(e);t.iter(function(e){var t=r(e);t!=e.height&&e3(e,t)})}function nl(e,t,r,n){var i=e.display;if(!r&&"true"==eW(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(e){return null}var a,u=r3(e,o,l);if(n&&u.xRel>0&&(a=e0(e.doc,u.line).text).length==u.ch){var c=j(a,a.length,e.options.tabSize)-a.length;u=e7(u.line,Math.max(0,Math.round((o-rO(e.display).left)/nt(e.dis
vendor: 4,243 bytes, line 1
1play))-c))}return u}function ns(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function na(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)tS&&tY(e.doc,t)<i.viewTo&&nc(e);else if(r<=i.viewFrom)tS&&t$(e.doc,r+n)>i.viewFrom?nc(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)nc(e);else if(t<=i.viewFrom){var o=nh(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):nc(e)}else if(r>=i.viewTo){var l=nh(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):nc(e)}else{var s=nh(e,t,t,-1),a=nh(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ro(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):nc(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function nu(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom)&&!(t>=n.viewTo)){var o=n.view[ns(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==X(l,r)&&l.push(r)}}}function nc(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function nh(e,t,r,n){var i,o=ns(e,t),l=e.display.view;if(!tS||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;tY(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function nd(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ro(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ro(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ns(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ro(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ns(e,r)))),n.viewTo=r}function nf(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function np(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ng(e,t){void 0===t&&(t=!0);var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var s=0;s<r.sel.ranges.length;s++)if(t||s!=r.sel.primIndex){var a=r.sel.ranges[s];if(!(a.from().line>=e.display.viewTo)&&!(a.to().line<e.display.viewFrom)){var u=a.empty();if(l){var c=l(e,a);c&&nm(e,c,i)}else(u||e.options.showCursorWhenSelecting)&&nm(e,a.head,i);u||ny(e,a,o)}}return n}function nm(e,t,r){var n=r0(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(E("div","\xa0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=rJ(e,t,"div",null,null),l=o.right-o.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild(E("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function nv(e,t){return e.top-t.top||e.left-t.left}function ny(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),s=rO(e.display),a=s.left,u=Math.max(n.sizerWidth,rD(e)-n.sizer.offsetLeft)-s.right,c="ltr"==i.direction;function h(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==r?u-e:r)+"px;\n                             height: "+(n-t)+"px"))}function d(t,r,n){var o,s,d=e0(i,t),f=d.text.length;function p(r,n){return rJ(e,e7(t,r),"div",d,n)}function g(t,r,n){var i=r9(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right";return p("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}l(p,"coords"),l(g,"wrapX");var m=ey(d,i.direction);
1return ep(m,r||0,null==n?f:n,function(e,t,i,l){var d,v,y,b,x="ltr"==i,w=p(e,x?"left":"right"),C=p(t-1,x?"right":"left"),S=null==r&&0==e,L=null==n&&t==f,k=0==l,T=!m||l==m.length-1;if(C.top-w.top<=3){var M=(c?S:L)&&k,N=(c?L:S)&&T,O=M?a:(x?w:C).left,A=N?u:(x?C:w).right;h(O,w.top,A-O,w.bottom)}else x?(d=c&&S&&k?a:w.left,v=c?u:g(e,i,"before"),y=c?a:g(t,i,"after"),b=c&&L&&T?u:C.right):(d=c?g(e,i,"before"):a,v=!c&&S&&k?u:w.right,y=!c&&L&&T?a:C.left,b=c?g(t,i,"after"):u),h(d,w.top,v-d,w.bottom),w.bottom<C.top&&h(a,w.bottom,null,C.top),h(y,C.top,b-y,C.bottom);(!o||0>nv(w,o))&&(o=w),0>nv(C,o)&&(o=C),(!s||0>nv(w,s))&&(s=w),0>nv(C,s)&&(s=C)}),{start:o,end:s}}l(h,"add"),l(d,"drawForLine");var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var g=e0(i,f.line),m=e0(i,p.line),v=tj(g)==tj(m),y=d(f.line,f.ch,v?g.text.length+1:null).end,b=d(p.line,v?0:null,p.ch).start;v&&(y.top<b.top-2?(h(y.right,y.top,null,y.bottom),h(a,b.top,b.left,b.bottom)):h(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&h(a,y.bottom,null,b.top)}r.appendChild(o)}function nb(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||nS(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function nx(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||nC(e))}function nw(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&nS(e))},100)}function nC(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(eS(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),m&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),nb(e))}function nS(e,t){e.state.delayingBlurEvent||(e.state.focused&&(eS(e,"blur",e,t),e.state.focused=!1,H(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function nL(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var s=t.view[l],a=e.options.lineWrapping,u=void 0,c=0;if(!s.hidden){if(i+=s.line.height,p&&g<8){var h=s.node.offsetTop+s.node.offsetHeight;u=h-r,r=h}else{var d=s.node.getBoundingClientRect();u=d.bottom-d.top,!a&&s.text.firstChild&&(c=s.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=s.line.height-u;if((f>.005||f<-.005)&&(i<n&&(o-=f),e3(s.line,u),nk(s.line),s.rest))for(var m=0;m<s.rest.length;m++)nk(s.rest[m]);if(c>e.display.sizerWidth){var v=Math.ceil(c/nt(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nk(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function nT(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-rM(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=e9(t,n),l=e9(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=e9(t,tQ(e0(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=e9(t,tQ(e0(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function nM(e,t){if(!eL(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!C){var o=E("div","​",null,"position: absolute;\n                         top: "+(t.top-r.viewOffset-rM(e.display))+"px;\n                         height: "+(t.bottom-t.top+rA(e)+r.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)}}}
1function nN(e,t,r,n){null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?e7(t.line,t.ch+1,"before"):t,t=t.ch?e7(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i,o=0;o<5;o++){var l=!1,s=r0(e,t),a=r&&r!=t?r0(e,r):s,u=nA(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(nI(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(nB(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}function nO(e,t){var r=nA(e,t);null!=r.scrollTop&&nI(e,r.scrollTop),null!=r.scrollLeft&&nB(e,r.scrollLeft)}function nA(e,t){var r=e.display,n=ne(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=rW(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+rN(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-h,f=rD(e)-r.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<d?l.scrollLeft=Math.max(0,t.left+h-(p?0:10)):t.right>f+d-3&&(l.scrollLeft=t.right+(p?0:10)-f),l}function nD(e,t){null!=t&&(nP(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function nW(e){nP(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function nH(e,t,r){(null!=t||null!=r)&&nP(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function nF(e,t){nP(e),e.curOp.scrollToPos=t}function nP(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=r1(e,t.from),n=r1(e,t.to);nE(e,r,n,t.margin)}}function nE(e,t,r,n){var i=nA(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});nH(e,i.scrollLeft,i.scrollTop)}function nI(e,t){2>Math.abs(e.doc.scrollTop-t)||(c||io(e,{top:t}),nR(e,t,!0),c&&io(e),n6(e,100))}function nR(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function nB(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),((r?t!=e.doc.scrollLeft:!(2>Math.abs(e.doc.scrollLeft-t)))||n)&&(e.doc.scrollLeft=t,iu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function nz(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+rN(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?r:0,docHeight:n,scrollHeight:n+rA(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}l(rG,"nodeAndOffsetInLineMap"),l(rU,"getUsefulRect"),l(rV,"measureCharInner"),l(rK,"maybeUpdateRectForZooming"),l(rj,"clearLineMeasurementCacheFor"),l(r_,"clearLineMeasurementCache"),l(rX,"clearCaches"),l(rY,"pageScrollX"),l(r$,"pageScrollY"),l(rq,"widgetTopHeight"),l(rZ,"intoCoordSystem"),l(rQ,"fromCoordSystem"),l(rJ,"charCoords"),l(r0,"cursorCoords"),l(r1,"estimateCoords"),l(r2,"PosWithInfo"),l(r3,"coordsChar"),l(r5,"wrappedLineExtent"),l(r9,"wrappedLineExtentChar"),l(r6,"boxIsAfter"),l(r8,"coordsCharInner"),l(r7,"coordsBidiPart"),l(r4,"coordsBidiPartWrapped"),l(ne,"textHeight"),l(nt,"charWidth"),l(nr,"getDimensions"),l(nn,"compensateForHScroll"),l(ni,"estimateHeight"),l(no,"estimateLineHeights"),l(nl,"posFromMouse"),l(ns,"findViewIndex"),l(na,"regChange"),l(nu,"regLineChange"),l(nc,"resetView"),l(nh,"viewCuttingPoint"),l(nd,"adjustView"),l(nf,"countDirtyView"),l(np,"updateSelection"),l(ng,"prepareSelection"),l(nm,"drawSelectionCursor"),l(nv,"cmpCoords"),l(ny,"drawSelectionRange"),l(nb,"restartBlink"),l(nx,"ensureFocus"),l(nw,"delayBlurEvent"),l(nC,"onFocus"),l(nS,"onBlur"),l(nL,"updateHeightsInViewport"),l(nk,"updateWidgetHeight"),l(nT,"visibleLines"),l(nM,"maybeScrollWindow"),l(nN,"scrollPosIntoView"),l(nO,"scrollIntoView"),l(nA,"calculateScrollPos"),l(nD,"addToScrollTop"),l(nW,"ensureCursorVisible"),l(nH,"scrollToCoords"),l(nF,"scrollToRange"),l(nP,"resolveScrollToPos"),l(nE,"scrollToCoordsRange"),l(nI,"updateScrollTop"),l(nR,"setScrollTop"),l(nB,"setScrollLeft"),l(nz,"measureForScrollbars");var nG=l(function(e,t,r){this.cm=r;var n=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ex(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ex(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");nG.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);
1this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},nG.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},nG.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},nG.prototype.zeroWidthHack=function(){var e=T&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new _,this.disableVert=new _},nG.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",l(n,"maybeDisable"),t.set(1e3,n)},nG.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var nU=l(function(){},"NullScrollbars");function nV(e,t){t||(t=nz(e));var r=e.display.barWidth,n=e.display.barHeight;nK(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&nL(e),nK(e,nz(e)),r=e.display.barWidth,n=e.display.barHeight}function nK(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}nU.prototype.update=function(){return{bottom:0,right:0}},nU.prototype.setScrollLeft=function(){},nU.prototype.setScrollTop=function(){},nU.prototype.clear=function(){},l(nV,"updateScrollbars"),l(nK,"updateScrollbarsInner");var nj={native:nG,null:nU};function n_(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new nj[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ex(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?nB(e,t):nI(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}l(n_,"initScrollbars");var nX=0;function nY(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:++nX,markArrays:null},rs(e.curOp)}function n$(e){var t=e.curOp;t&&ru(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;nq(e)})}function nq(e){for(var t=e.ops,r=0;r<t.length;r++)nZ(t[r]);for(var n=0;n<t.length;n++)nQ(t[n]);for(var i=0;i<t.length;i++)nJ(t[i]);for(var o=0;o<t.length;o++)n0(t[o]);for(var l=0;l<t.length;l++)n1(t[l])}function nZ(e){var t=e.cm,r=t.display;n4(t),e.updateMaxLine&&t0(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new n7(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nQ(e){e.updatedDisplay=e.mustUpdate&&ir(e.cm,e.update)}function nJ(e){var t=e.cm,r=t.display;e.updatedDisplay&&nL(t),e.barMeasure=nz(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=rE(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+rA(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-rD(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function n0(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&nB(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==B();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&nV(t,e.barMeasure),e.updatedDisplay&&ia(t,e.barMeasure),e.selectionChanged&&nb(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&nx(e.cm)}function n1(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&ii(t,e.update),null!=r.wheelStartX&&(null!=e.scrollTop||null!=e.scrollLeft||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&nR(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&nB(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=nN(t,to(n,e.scrollToPos.from),to(n,e.scrollToPos.to),e.scrollToPos.margin);nM(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||eS(o[s],"hide");if(l)for(var a=0;a<l.length;++a)l[a].lines.length&&eS(l[a],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeOb
vendor: 4,412 bytes, line 1
1js&&eS(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function n2(e,t){if(e.curOp)return t();nY(e);try{return t()}finally{n$(e)}}function n3(e,t){return function(){if(e.curOp)return t.apply(e,arguments);nY(e);try{return t.apply(e,arguments)}finally{n$(e)}}}function n5(e){return function(){if(this.curOp)return e.apply(this,arguments);nY(this);try{return e.apply(this,arguments)}finally{n$(this)}}}function n9(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);nY(t);try{return e.apply(this,arguments)}finally{n$(t)}}}function n6(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,V(n8,e))}function n8(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=td(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?eq(t.mode,n.state):null,a=tc(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!h&&d<l.length;++d)h=l[d]!=o.styles[d];h&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&tf(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return n6(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&n2(e,function(){for(var t=0;t<i.length;t++)nu(e,i[t],"text")})}}l(nY,"startOperation"),l(n$,"endOperation"),l(nq,"endOperations"),l(nZ,"endOperation_R1"),l(nQ,"endOperation_W1"),l(nJ,"endOperation_R2"),l(n0,"endOperation_W2"),l(n1,"endOperation_finish"),l(n2,"runInOp"),l(n3,"operation"),l(n5,"methodOp"),l(n9,"docMethodOp"),l(n6,"startWorker"),l(n8,"highlightWorker");var n7=l(function(e,t,r){var n=e.display;this.viewport=t,this.visible=nT(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=rD(e),this.force=r,this.dims=nr(e),this.events=[]},"DisplayUpdate");function n4(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=rA(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=rA(e)+"px",t.scrollbarsClipped=!0)}function ie(e){if(e.hasFocus())return null;var t=B();if(!t||!R(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&R(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function it(e){if(e&&e.activeElt&&e.activeElt!=B()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function ir(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return nc(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==nf(e))return!1;ic(e)&&(nc(e),t.dims=nr(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),tS&&(o=tY(e.doc,o),l=t$(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;nd(e,o,l),r.viewOffset=tQ(e0(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var a=nf(e);if(!s&&0==a&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=ie(e);return a>4&&(r.lineDiv.style.display="none"),il(e,r.updateLineNumbers,t.dims),a>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,it(u),F(r.cursorDiv),F(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperW
1idth,n6(e,400)),r.updateLineNumbers=null,!0}function ii(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=rD(e))n&&(t.visible=nT(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+rN(e.display)-rW(e),r.top)}),t.visible=nT(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ir(e,t))break;nL(e);var i=nz(e);np(e),nV(e,i),ia(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 io(e,t){var r=new n7(e,t);if(ir(e,r)){nL(e),ii(e,r);var n=nz(e);np(e),nV(e,n),ia(e,n),r.finish()}}function il(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,s=o.firstChild;function a(t){var r=t.nextSibling;return m&&T&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}l(a,"rm");for(var u=n.view,c=n.viewFrom,h=0;h<u.length;h++){var d=u[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;s!=d.node;)s=a(s);var f=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(X(d.changes,"gutter")>-1&&(f=!1),rf(e,d,c,r)),f&&(F(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(e8(e.options,c)))),s=d.node.nextSibling}else{var p=rw(e,d,c,r);o.insertBefore(p,s)}c+=d.size}for(;s;)s=a(s)}function is(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",rh(e,"gutterChanged",e)}function ia(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+rA(e)+"px"}function iu(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function ic(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=e8(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(E("div",[E("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",is(e.display),!0}return!1}function ih(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:l})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function id(e){var t=e.gutters,r=e.gutterSpecs;F(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,l=i.style,s=t.appendChild(E("div",null,"CodeMirror-gutter "+o));l&&(s.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",is(e)}function ip(e){id(e.display),na(e),iu(e)}function ig(e,t,r,n){this.input=r,this.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=I("div",null,"CodeMirror-code"),this.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=E("div",null,"CodeMirror-cursors"),this.measure=E("div",null,"CodeMirror-measure"),this.lineMeasure=E("div",null,"CodeMirror-measure"),this.lineSpace=I("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var i=I("div",[this.lineSpace],"CodeMirror-lines");this.mover=E("div",[i],null,"position: relative"),this.sizer=E("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=E("div",null,null,"position: absolute; height: 50px; width: 1px;"),this.gutters=E("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=E("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=E("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),this.wrapper.setAttribute("translate","no"),p&&g<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),m||c&&k||(this.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(this.wrapper):e(this.wrapper)),this.viewFrom=this.viewTo=t.first,this.reportedViewFrom=this.reportedViewTo=t.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,this.gutterSpecs=ih(n.gutters,n.lineNumbers),id(this),r.init(this)}n7.prototype.signal=function(e,t){eT(e,t)&&this.events.push(arguments)},n7.prototype.finish=function(){for(var e=0;e<this.events.length;e++)eS.apply(null,this.events[e])},l(n4,"maybeClipScrollbars"),l(ie,"selectionSnapshot"),l(it,"restoreSelection"),l(ir,"updateDisplayIfNeeded"),l(ii,"postUpdateDisplay"),l(io,"updateDisplaySimple"),l(il,"patchDisplay"),l(is,"updateGutterSpace"),l(ia,"setDocumentHeight"),l(iu,"alignHorizontally"),l(ic,"maybeUpdateLineNumberWidth"),l(ih,"getGutters"),l(id,"renderGutters"),l(ip,"updateGutters"),l(ig,"Display");var im=0,iv=null;function iy(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function ib(e){var t=iy(e);return t.x*=iv,t.y*=iv,t}function ix(e,t){var r=iy(t),n=r.x,i=r.y,o=iv;0===t.deltaMode&&(n=t.deltaX,i=t.deltaY,o=1);var l=e.display,s=l.scroller,a=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(n&&a||i&&u){if(i&&T&&m){e:for(var h=t.target,d=l.view;h!=s;h=h.parentNode)for(var f=0;f<d.length;f++)if(d[f].node==h){e.display.currentWheelTarget=h;break e}}if(n&&!c&&!b&&null!=o){i&&u&&nI(e,Math.max(0,s.scrollTop+i*o)),nB(e,Math.max(0,s.scrollLeft+n*o)),(!i||i&&u)&&eN(t),l.wheelStartX=null;return}if(i&&null!=o){var p=i*o,g=e.doc.scrollTop,v=g+l.wrapper.clientHeight;p<0?g=Math.max(0,g+p-50):v=Math.min(e.doc.height,v+p+50),io(e,{top:g,bottom:v})}im<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=n,l.wheelDY=i,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(iv=(iv*im+r)/(im+1),++im)}},200)):(l.wheelDX+=n,l.wheelDY+=i))}}p?iv=-.53:c?iv=15:y?iv=-.7:x&&(iv=-1/3),l(iy,"wheelEventDelta"),l(ib,"wheelEventPixels"),l(ix,"onScrollWheel");var iw=l(function(e,t){this.ranges=e,this.primIndex=t},"Selection");iw.prototype.primary=function(){return this.ranges[this.primIndex]},iw.prototype.equals=function(e){if(e==this)return!0;
1if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!te(r.anchor,n.anchor)||!te(r.head,n.head))return!1}return!0},iw.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new iC(tt(this.ranges[t].anchor),tt(this.ranges[t].head));return new iw(e,this.primIndex)},iw.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},iw.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(e4(t,n.from())>=0&&0>=e4(e,n.to()))return r}return -1};var iC=l(function(e,t){this.anchor=e,this.head=t},"Range");function iS(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return e4(e.from(),t.from())}),r=X(t,i);for(var o=1;o<t.length;o++){var l=t[o],s=t[o-1],a=e4(s.to(),l.from());if(n&&!l.empty()?a>0:a>=0){var u=tn(s.from(),l.from()),c=tr(s.to(),l.to()),h=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new iC(h?c:u,h?u:c))}}return new iw(t,r)}function iL(e,t){return new iw([new iC(e,t||e)],0)}function ik(e){return e.text?e7(e.from.line+e.text.length-1,et(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function iT(e,t){if(0>e4(e,t.from))return e;if(0>=e4(e,t.to))return ik(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ik(t).ch-t.to.ch),e7(r,n)}function iM(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new iC(iT(i.anchor,t),iT(i.head,t)))}return iS(e.cm,r,e.sel.primIndex)}function iN(e,t,r){return e.line==t.line?e7(r.line,e.ch-t.ch+r.ch):e7(r.line+(e.line-t.line),e.ch)}function iO(e,t,r){for(var n=[],i=e7(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=iN(s.from,i,o),u=iN(ik(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=0>e4(c.head,c.anchor);n[l]=new iC(h?u:a,h?a:u)}else n[l]=new iC(a,a)}return new iw(n,e.sel.primIndex)}function iA(e){e.doc.mode=eX(e.options,e.doc.modeOption),iD(e)}function iD(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,n6(e,100),e.state.modeGen++,e.curOp&&na(e)}function iW(e,t){return 0==t.from.ch&&0==t.to.ch&&""==et(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function iH(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){t2(e,r,i,n),rh(e,"change",e,t)}function s(e,t){for(var r=[],o=e;o<t;++o)r.push(new t1(c[o],i(o),n));return r}l(i,"spansFor"),l(o,"update"),l(s,"linesFor");var a=t.from,u=t.to,c=t.text,h=e0(e,a.line),d=e0(e,u.line),f=et(c),p=i(c.length-1),g=u.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(iW(e,t)){var m=s(0,c.length-1);o(d,d.text,p),g&&e.remove(a.line,g),m.length&&e.insert(a.line,m)}else if(h==d){if(1==c.length)o(h,h.text.slice(0,a.ch)+f+h.text.slice(u.ch),p);else{var v=s(1,c.length-1);v.push(new t1(f+h.text.slice(u.ch),p,n)),o(h,h.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,v)}}else if(1==c.length)o(h,h.text.slice(0,a.ch)+c[0]+d.text.slice(u.ch),i(0)),e.remove(a.line+1,g);else{o(h,h.text.slice(0,a.ch)+c[0],i(0)),o(d,f+d.text.slice(u.ch),p);var y=s(1,c.length-1);g>1&&e.remove(a.line+1,g-1),e.insert(a.line+1,y)}rh(e,"change",e,t)}function iF(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;(!r||a)&&(t(s.doc,a),n(s.doc,e,a))}}}l(n,"propagate"),n(e,null,!0)}function iP(e,t){if(t.cm)throw Error("This document is already in use.");e.doc=t,t.cm=e,no(e),iA(e),iE(e),e.options.direction=t.direction,e.options.lineWrapping||t0(e),e.options.mode=t.modeOption,na(e)}function iE(e){("rtl"==e.doc.direction?z:H)(e.display.lineDiv,"CodeMirror-rtl")}function iI(e){n2(e,function(){iE(e),na(e)})}function iR(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function iB(e,t){var r={from:tt(t.from),to:ik(t),text:e1(e,t.from,t.to)};return i_(e,r,t.from.line,t.to.line+1),iF(e,function(e){return i_(e,r,t.from.line,t.to.line+1)},!0),r}function iz(e){for(;e.length;)if(et(e).ranges)e.pop();else break}function iG(e,t){return t?(iz(e.done),et(e.done)):e.done.length&&!et(e.done).ranges?et(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),et(e.done)):void 0}function iU(e,t,r,n){var i,o=e.history;o.undone.length=0;var l,s=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(l=iG(o,o.lastOp==n)))i=et(l.changes),0==e4(t.from,t.to)&&0==e4(t.from,i.to)?i.to=ik(t):l.changes.push(iB(e,t));else{var a=et(o.done);for(a&&a.ranges||ij(e.sel,o.done),l={changes:[iB(e,t)],generation:o.generation},o.done.push(l);o.done.length>
1o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,i||eS(e,"historyAdded")}function iV(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function iK(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||iV(e,o,et(i.done),t))?i.done[i.done.length-1]=t:ij(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&iz(i.undone)}function ij(e,t){var r=et(t);r&&r.ranges&&r.equals(e)||t.push(e)}function i_(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function iX(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function iY(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(iX(r[i]));return n}function i$(e,t){var r=iY(e,t),n=tW(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)t:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue t;o.push(a)}else l&&(r[i]=l)}return r}function iq(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?iw.prototype.deepCopy.call(o):o);continue}var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&X(t,Number(c[1]))>-1&&(et(s)[h]=u[h],delete u[h])}}return n}function iZ(e,t,r,n){if(!n)return new iC(r||t,t);var i=e.anchor;if(r){var o=0>e4(t,i);o!=0>e4(r,i)?(i=t,t=r):o!=0>e4(t,r)&&(t=r)}return new iC(i,t)}function iQ(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),i5(e,new iw([iZ(e.sel.primary(),t,r,i)],0),n)}function iJ(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=iZ(e.sel.ranges[o],t[o],null,i);var l=iS(e.cm,n,e.sel.primIndex);i5(e,l,r)}function i0(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,i5(e,iS(e.cm,i,e.sel.primIndex),n)}function i1(e,t,r,n){i5(e,iL(t,r),n)}function i2(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new iC(to(e,t[r].anchor),to(e,t[r].head))},origin:r&&r.origin};return(eS(e,"beforeSelectionChange",e,n),e.cm&&eS(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges)?iS(e.cm,n.ranges,n.ranges.length-1):t}function i3(e,t,r){var n=e.history.done,i=et(n);i&&i.ranges?(n[n.length-1]=t,i9(e,t,r)):i5(e,t,r)}function i5(e,t,r){i9(e,t,r),iK(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function i9(e,t,r){(eT(e,"beforeSelectionChange")||e.cm&&eT(e.cm,"beforeSelectionChange"))&&(t=i2(e,t,r));var n=r&&r.bias||(0>e4(t.primary().head,e.sel.primary().head)?-1:1);i6(e,i7(e,t,n,!0)),!(r&&!1===r.scroll)&&e.cm&&"nocursor"!=e.cm.getOption("readOnly")&&nW(e.cm)}function i6(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ek(e.cm)),rh(e,"cursorActivity",e))}function i8(e){i6(e,i7(e,e.sel,null,!1))}function i7(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=oe(e,l.anchor,s&&s.anchor,r,n),u=oe(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new iC(a,u))}return i?iS(e.cm,i,t.primIndex):t}function i4(e,t,r,n,i){var o=e0(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker,u="selectLeft"in a?!a.selectLeft:a.inclusiveLeft,c="selectRight"in a?!a.selectRight:a.inclusiveRight;if((null==s.from||(u?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(c?s.to>=t.ch:s.to>t.ch))){if(i&&(eS(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var h=a.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(h=ot(e,h,-n,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(d=e4(h,r))&&(n<0?d<0:d>0))return i4(e,h,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?u:c)&&(f=ot(e,f,n,f.line==t.line?o:null)),f?i4(e,f,t,n,i):null}}return t}function oe(e,t,r,n,i){var o=n||1;return i4(e,t,r,o,i)||!i&&i4(e,t,r,o,!0)||i4(e,t,r,-o,i)||!i&&i4(e,t,r,-o,!0)||(e.cantEdit=!0,e7(e.first,0))}
vendor: 8,668 bytes, line 1
1function ot(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?to(e,e7(t.line-1)):null:r>0&&t.ch==(n||e0(e,t.line)).text.length?t.line<e.first+e.size-1?e7(t.line+1,0):null:new e7(t.line,t.ch+r)}function or(e){e.setSelection(e7(e.firstLine(),0),e7(e.lastLine()),$)}function on(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return(r&&(n.update=function(t,r,i,o){t&&(n.from=to(e,t)),r&&(n.to=to(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),eS(e,"beforeChange",e,n),e.cm&&eS(e.cm,"beforeChange",e.cm,n),n.canceled)?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function oi(e,t,r){if(e.cm){if(!e.cm.curOp)return n3(e.cm,oi)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(eT(e,"beforeChange")||e.cm&&eT(e.cm,"beforeChange"))||(t=on(e,t,!0))){var n=tC&&!r&&tF(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=e4(t.from,t.to)){var r=iM(e,t);iU(e,t,r,e.cm?e.cm.curOp.id:NaN),oa(e,t,r,tW(e,t));var n=[];iF(e,function(e,r){r||-1!=X(n,e.history)||(of(e.history,t),n.push(e.history)),oa(e,t,null,tW(e,t))})}}function ol(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,c=0;c<a.length&&(i=a[c],r?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if((i=a.pop()).ranges){if(ij(i,u),r&&!i.equals(e.sel)){i5(e,i,{clearRedo:!1});return}s=i}else if(n){a.push(i);return}else break;var h=[];ij(s,u),u.push({changes:h,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=eT(e,"beforeChange")||e.cm&&eT(e.cm,"beforeChange"),f=l(function(r){var n=i.changes[r];if(n.origin=t,d&&!on(e,n,!1))return a.length=0,{};h.push(iB(e,n));var o=r?iM(e,n):et(a);oa(e,n,o,i$(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:ik(n)});var l=[];iF(e,function(e,t){t||-1!=X(l,e.history)||(of(e.history,n),l.push(e.history)),oa(e,n,null,i$(e,n))})},"loop"),p=i.changes.length-1;p>=0;--p){var g=f(p);if(g)return g.v}}}}function os(e,t){if(0!=t&&(e.first+=t,e.sel=new iw(er(e.sel.ranges,function(e){return new iC(e7(e.anchor.line+t,e.anchor.ch),e7(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){na(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)nu(e.cm,n,"gutter")}}function oa(e,t,r,n){if(e.cm&&!e.cm.curOp)return n3(e.cm,oa)(e,t,r,n);if(t.to.line<e.first){os(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);os(e,i),t={from:e7(e.first,0),to:e7(t.to.line+i,t.to.ch),text:[et(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:e7(o,e0(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=e1(e,t.from,t.to),r||(r=iM(e,t)),e.cm?ou(e.cm,t,n):iH(e,t,n),i9(e,r,$),e.cantEdit&&oe(e,e7(e.firstLine(),0))&&(e.cantEdit=!1)}}function ou(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=e5(tj(e0(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ek(e),iH(n,t,r,ni(e)),!e.options.lineWrapping&&(n.iter(a,o.line+t.text.length,function(e){var t=tJ(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),tw(n,o.line),n6(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?na(e):o.line!=l.line||1!=t.text.length||iW(e.doc,t)?na(e,o.line,l.line+1,u):nu(e,o.line,"text");var c=eT(e,"changes"),h=eT(e,"change");if(h||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&rh(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function oc(e,t,r,n,i){var o;n||(n=r),0>e4(n,r)&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),oi(e,{from:r,to:n,text:t,origin:i})}function oh(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function od(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)oh(o.ranges[s].anchor,t,r,n),oh(o.ranges[s].head,t,r,n);continue}for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=e7(u.from.line+n,u.from.ch),u.to=e7(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}function of(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;od(e.done,r,n,i),od(e.undone,r,n,i)}function op(e,t,r,n){var i=t,o=t;return("number"==typeof t?o=e0(e,ti(e,t)):i=e5(t),null==i)?null:(n(o,i)&&e.cm&&nu(e.cm,i,r),o)}function og(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function om(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}iC.prototype.from=function(){return tn(this.anchor,this.head)},iC.prototype.to=function(){return tr(this.anchor,this.head)},iC.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},l(iS,"normalizeSelection"),l(iL,"simpleSelection"),l(ik,"changeEnd"),l(iT,"adjustForChange"),l(iM,"computeSelAfterChange"),l(iN,"offsetPos"),l(iO,"computeReplacedSel"),l(iA,"loadMode"),l(iD,"resetModeState"),l(iW,"isWholeLineUpdate"),l(iH,"updateDoc"),l(iF,"linkedDocs"),l(iP,"attachDoc"),l(iE,"setDirectionClass"),l(iI,"directionChanged"),l(iR,"History"),l(iB,"historyChangeFromChange"),l(iz,"clearSelectionEvents"),l(iG,"lastChangeEvent"),l(iU,"addChangeToHistory"),l(iV,"selectionEventCanBeMerged"),l(iK,"addSelectionToHistory"),l(ij,"pushSelectionToHistory"),l(i_,"attachLocalSpans"),l(iX,"removeClearedSpans"),l(iY,"getOldSpans"),l(i$,"mergeOldSpans"),l(iq,"copyHistoryArray"),l(iZ,"extendRange"),l(iQ,"extendSelection"),l(iJ,"extendSelections"),l(i0,"replaceOneSelection"),l(i1,"setSimpleSelection"),l(i2,"filterSelectionChange"),l(i3,"setSelectionReplaceHistory"),l(i5,"setSelection"),l(i9,"setSelectionNoUndo"),l(i6,"setSelectionInner"),l(i8,"reCheckSelection"),l(i7,"skipAtomicInSelection"),l(i4,"skipAtomicInner"),l(oe,"skipAtomic"),l(ot,"movePos"),l(or,"selectAll"),l(on,"filterChange"),l(oi,"makeChange"),l(oo,"makeChangeInner"),l(ol,"makeChangeFromHistory"),l(os,"shiftDoc"),l(oa,"makeChangeSingleDoc"),l(ou,"makeChangeSingleDocInEditor"),l(oc,"replaceRange"),l(oh,"rebaseHistSelSingle"),l(od,"rebaseHistArray"),l(of,"rebaseHist"),l(op,"changeLine"),l(og,"LeafChunk"),og.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,t3(i),rh(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},l(om,"BranchChunk"),om.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof og))){var s=[];this.collapse(s),this.children=[new og(s)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new og(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new om(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=X(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new om(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;
1if(0==(t-=l))break;e=0}else e-=o}}};var ov=l(function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t},"LineWidget");function oy(e,t,r){tQ(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&nD(e,r)}function ob(e,t,r,n){var i=new ov(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),op(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!tq(e,t)){var n=tQ(t)<e.scrollTop;e3(t,t.height+rk(i)),n&&nD(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&rh(o,"lineWidgetAdded",o,i,"number"==typeof t?t:e5(t)),i}ov.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=e5(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=rk(this);e3(r,Math.max(0,r.height-o)),e&&(n2(e,function(){oy(e,r,-o),nu(e,n,"widget")}),rh(e,"lineWidgetCleared",e,this,n))}},ov.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=rk(this)-t;i&&(tq(this.doc,n)||e3(n,n.height+i),r&&n2(r,function(){r.curOp.forceUpdate=!0,oy(r,n,i),rh(r,"lineWidgetChanged",r,e,e5(n))}))},eM(ov),l(oy,"adjustScrollWhenAboveVisible"),l(ob,"addLineWidget");var ox=0,ow=l(function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ox},"TextMarker");function oC(e,t,r,n,i){if(n&&n.shared)return oL(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return n3(e.cm,oC)(e,t,r,n,i);var o=new ow(e,i),l=e4(t,r);if(n&&K(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=I("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(tK(e,t.line,t,r,o)||t.line!=r.line&&tK(e,r.line,t,r,o))throw Error("Inserting collapsed marker partially overlapping an existing one");tk()}o.addToHistory&&iU(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(n){u&&o.collapsed&&!u.options.lineWrapping&&tj(n)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&e3(n,0),tO(n,new tT(o,a==t.line?t.ch:null,a==r.line?r.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){tq(e,t)&&e3(t,0)}),o.clearOnEnter&&ex(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(tL(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ox,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)na(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)nu(u,c,"text");o.atomic&&i8(u.doc),rh(u,"markerAdded",u,o)}return o}ow.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&nY(e),eT(this,"clear")){var r=this.find();r&&rh(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=tM(l.markedSpans,this);e&&!this.collapsed?nu(e,e5(l),"text"):e&&(null!=s.to&&(i=e5(l)),null!=s.from&&(n=e5(l))),l.markedSpans=tN(l.markedSpans,s),null==s.from&&this.collapsed&&!tq(this.doc,l)&&e&&e3(l,ne(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=tj(this.lines[a]),c=tJ(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&na(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&i8(e.doc)),e&&rh(e,"markerCleared",e,this,n,i),t&&n$(e),this.parent&&this.parent.clear()}},ow.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],l=tM(o.markedSpans,this);if(null!=l.from&&(r=e7(t?o:e5(o),l.from),-1==e))return r;if(null!=l.to&&(n=e7(t?o:e5(o),l.to),1==e))return n}return r&&{from:r,to:n}},ow.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&n2(n,function(){var i=t.line,o=rI(n,e5(t.line));if(o&&(rj(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!tq(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=rk(r)-l;s&&e3(i,i.height+s)}rh(n,"markerChanged",n,e)})},ow.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=X(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ow.prototype.detachLine=function(e){if(this.lines.splice(X(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},eM(ow),l(oC,"markText");var oS=l(function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this},"SharedTextMarker");function oL(e,t,r,n,i){(n=K(n)).shared=!1;var o=[oC(e,t,r,n,i)],l=o[0],s=n.widgetNode;return iF(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(oC(e,to(e,t),to(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=et(o)}),new oS(o,l)}function ok(e){return e.findMarks(e7(e.first,0),e.clipPos(e7(e.lastLine()
1)),function(e){return e.parent})}function oT(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(e4(o,l)){var s=oC(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function oM(e){for(var t=l(function(t){var r=e[t],n=[r.primary.doc];iF(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==X(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},"loop"),r=0;r<e.length;r++)t(r)}oS.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();rh(this,"clear")}},oS.prototype.find=function(e,t){return this.primary.find(e,t)},eM(oS),l(oL,"markTextShared"),l(ok,"findSharedMarkers"),l(oT,"copySharedMarkers"),l(oM,"detachSharedMarkers");var oN=0,oO=l(function(e,t,r,n,i){if(!(this instanceof oO))return new oO(e,t,r,n,i);null==r&&(r=0),om.call(this,[new og([new t1("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=e7(r,0);this.sel=iL(o),this.history=new iR(null),this.id=++oN,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),iH(this,{from:o,to:o,text:e}),i5(this,iL(o),$)},"Doc");oO.prototype=eo(om.prototype,{constructor:oO,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=e2(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:n9(function(e){var t=e7(this.first,0),r=this.first+this.size-1;oi(this,{from:t,to:e7(r,e0(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&nH(this.cm,0,0),i5(this,iL(t),$)}),replaceRange:function(e,t,r,n){t=to(this,t),r=r?to(this,r):t,oc(this,e,t,r,n)},getRange:function(e,t,r){var n=e1(this,to(this,e),to(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(e6(this,e))return e0(this,e)},getLineNumber:function(e){return e5(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=e0(this,e)),tj(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return to(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:n9(function(e,t,r){i1(this,to(this,"number"==typeof e?e7(e,t||0):e),null,r)}),setSelection:n9(function(e,t,r){i1(this,to(this,e),to(this,t||e),r)}),extendSelection:n9(function(e,t,r){iQ(this,to(this,e),t&&to(this,t),r)}),extendSelections:n9(function(e,t){iJ(this,ts(this,e),t)}),extendSelectionsBy:n9(function(e,t){iJ(this,ts(this,er(this.sel.ranges,e)),t)}),setSelections:n9(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new iC(to(this,e[i].anchor),to(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),i5(this,iS(this.cm,n,t),r)}}),addSelection:n9(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new iC(to(this,e),to(this,t||e))),i5(this,iS(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=e1(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=e1(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:n9(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&iO(this,n,t),a=n.length-1;a>=0;a--)oi(this,n[a]);s?i3(this,s):this.cm&&nW(this.cm)}
1),undo:n9(function(){ol(this,"undo")}),redo:n9(function(){ol(this,"redo")}),undoSelection:n9(function(){ol(this,"undo",!0)}),redoSelection:n9(function(){ol(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)!e.done[n].ranges&&++t;for(var i=0;i<e.undone.length;i++)!e.undone[i].ranges&&++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new iR(this.history),iF(this,function(t){return t.history=e.history},!0)},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:iq(this.history.done),undone:iq(this.history.undone)}},setHistory:function(e){var t=this.history=new iR(this.history);t.done=iq(e.done.slice(0),null,!0),t.undone=iq(e.undone.slice(0),null,!0)},setGutterMarker:n9(function(e,t,r){return op(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&eu(n)&&(e.gutterMarkers=null),!0})}),clearGutter:n9(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&op(t,r,"gutter",function(){return r.gutterMarkers[e]=null,eu(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!e6(this,e)||(t=e,!(e=e0(this,e))))return null}else if(null==(t=e5(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:n9(function(e,t,r){return op(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(W(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:n9(function(e,t,r){return op(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(W(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:n9(function(e,t,r){return ob(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return oC(this,to(this,e),to(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return oC(this,e=to(this,e),e,r,"bookmark")},findMarksAt:function(e){e=to(this,e);var t=[],r=e0(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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(e,t,r){e=to(this,e),t=to(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];!(null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch)&&(!r||r(a.marker))&&n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),to(this,e7(r,t))},indexFromPos:function(e){var t=(e=to(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new oO(e2(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,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new oO(e2(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],oT(n,ok(this)),n},unlinkDoc:function(e){if(e instanceof lA&&(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),oM(ok(this));break}}if(e.history==this.history){var r=[e.id];iF(e,function(e){return r.push(e.id)},!0),e.history=new iR(null),e.history.done=iq(this.history.done,r),e.history.undone=iq(this.history.undone,r)}},iterLinkedDocs:function(e){iF(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):eI(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:n9(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&iI(this.cm))})}),oO.prototype.eachLine=oO.prototype.iter;var oA=0;function oD(e){var t=this;if(oF(t),!(eL(t,e)||rT(t.display,e))){eN(e),p&&(oA=+new Date);var r=nl(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly())){if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=l(function(){++s==i&&n3(t,function(){var e={from:r=to(t.doc,r),to:r,text:t.doc.splitLines(o.filter(function(e){return null!=e}).join(t.doc.lineSeparator())),origin:"paste"};oi(t.doc,e),i3(t.doc,iL(to(t.doc,r),to(t.doc,ik(e))))})()},"markAsReadAndPasteIfAllFilesAreRead"),u=l(function(e,r){if(t.options.allowDropFileTypes&&-1==X(t.options.allowDropFileTypes,e.type)){a();return}var n=new FileReader;n.onerror=function(){return a()},n.onload=function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){a();return}o[r]=e,a()},n.readAsText(e)},"readTextFromFile"),c=0;c<n.length;c++)u(n[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h,d=e.dataTransfer.getData("Text");if(d){if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),i9(t.doc,iL(r,r)),h)for(var f=0;f<h.length;
vendor: 1,183 bytes, line 1
1++f)oc(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}}function oW(e,t){if(p&&(!e.state.draggingText||+new Date-oA<100)){eD(t);return}if(!(eL(e,t)||rT(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!x)){var r=E("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",b&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),b&&r.parentNode.removeChild(r)}}function oH(e,t){var r=nl(e,t);if(r){var n=document.createDocumentFragment();nm(e,r,n),e.display.dragCursor||(e.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),P(e.display.dragCursor,n)}}function oF(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function oP(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;
1n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var t=0;t<r.length;t++)e(r[t])})}}l(oD,"onDrop"),l(oW,"onDragStart"),l(oH,"onDragOver"),l(oF,"clearDragCursor"),l(oP,"forEachCodeMirror");var oE=!1;function oI(){oE||(oR(),oE=!0)}function oR(){var e;ex(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,oP(oB)},100))}),ex(window,"blur",function(){return oP(nS)})}function oB(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}l(oI,"ensureGlobalHandlers"),l(oR,"registerGlobalHandlers"),l(oB,"onResize");for(var oz={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:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},oG=0;oG<10;oG++)oz[oG+48]=oz[oG+96]=String(oG);for(var oU=65;oU<=90;oU++)oz[oU]=String.fromCharCode(oU);for(var oV=1;oV<=12;oV++)oz[oV+111]=oz[oV+63235]="F"+oV;var oK={};function oj(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))n=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function o_(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=er(r.split(" "),oj),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function oX(e,t,r,n){var i=(t=oZ(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return oX(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=oX(e,t.fallthrough[o],r,n);if(l)return l}}}function oY(e){var t="string"==typeof e?e:oz[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function o$(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(A?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(A?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function oq(e,t){if(b&&34==e.keyCode&&e.char)return!1;var r=oz[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),o$(r,e,t))}function oZ(e){return"string"==typeof e?oK[e]:e}function oQ(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&0>=e4(o.from,et(n).to);){var l=n.pop();if(0>e4(l.from,o.from)){o.from=l.from;break}}n.push(o)}n2(e,function(){for(var t=n.length-1;t>=0;t--)oc(e.doc,"",n[t].from,n[t].to,"+delete");nW(e)})}function oJ(e,t,r){var n=ed(e.text,t+r,r);return n<0||n>e.text.length?null:n}function o0(e,t,r){var n=oJ(e,t.ch,r);return null==n?null:new e7(t.line,n,r<0?"after":"before")}function o1(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ey(r,t.doc.direction);if(o){var l,s=i<0?et(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=rR(t,r),c=rB(t,u,l=i<0?r.text.length-1:0).top;l=ef(function(e){return rB(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=oJ(r,l,1))}else l=i<0?s.to:s.from;return new e7(n,l,a)}}return new e7(n,i<0?r.text.length:0,i<0?"before":"after")}function o2(e,t,r,n){var i,o=ey(t,e.doc.direction);if(!o)return o0(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var s=em(o,r.ch,r.sticky),a=o[s];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return o0(t,r,n);var u=l(function(e,r){return oJ(t,e instanceof e7?e.ch:e,r)},"mv"),c=l(function(r){return e.options.lineWrapping?(i=i||rR(e,t),r9(e,t,i,r)):{begin:0,end:t.text.length}},"getWrappedLineExtent"),h=c("before"==r.sticky?u(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=u(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=h.end:f>=a.from&&f>=h.begin))return new e7(r.line,f,d?"before":"after")}var p=l(function(e,t,n){for(var i=l(function(e,t){return t?new e7(r.line,u(e,1),"before"):new e7(r.line,e,"after")},"getRes");e>=0&&e<o.length;e+=t){var s=o[e],a=t>0==(1!=s.level),c=a?n.begin:u(n.end,-1);if(s.from<=c&&c<s.to||(c=a?s.from:u(s.to,-1),n.begin<=c&&c<n.end))return i(c,a)}},"searchInVisualLine"),g=p(s+n,n,h);if(g)return g;var m=n>0?h.end:u(h.begin,-1);return null!=m&&!(n>0&&m==t.text.length)&&(g=p(n>0?0:o.length-1,n,c(m)))?g:null}oK.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"},oK.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"},oK.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},oK.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"]},oK.default=T?oK.macDefault:oK.pcDefault,l(oj,"normalizeKeyName"),l(o_,"normalizeKeyMap"),l(oX,"lookupKey"),l(oY,"isModifierKey"),l(o$,"addModifierNames"),l(oq,"keyName"),l(oZ,"getKeyMap"),l(oQ,"deleteNearSelection"),l(oJ,"moveCharLogically"),l(o0,"moveLogically"),l(o1,"endOfLine"),l(o2,"moveVisually");var o3={selectAll:or,singleSelection:function(e){return e.setSelection(e.getCursor("anch
1or"),e.getCursor("head"),$)},killLine:function(e){return oQ(e,function(t){if(!t.empty())return{from:t.from(),to:t.to()};var r=e0(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:e7(t.head.line+1,0)}:{from:t.head,to:e7(t.head.line,r)}})},deleteLine:function(e){return oQ(e,function(t){return{from:e7(t.from().line,0),to:to(e.doc,e7(t.to().line+1,0))}})},delLineLeft:function(e){return oQ(e,function(e){return{from:e7(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return oQ(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return oQ(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.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(e7(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(e7(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return o5(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return o6(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return o9(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Z)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Z)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?o6(e,t.head):n},Z)},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,"codepoint")},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("	")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=j(e.getLine(o.line),o.ch,n);t.push(ee(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return n2(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=e0(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new e7(i.line,i.ch-1)),i.ch>0)i=new e7(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),e7(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=e0(e.doc,i.line-1).text;l&&(i=new e7(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),e7(i.line-1,l.length-1),i,"+transpose"))}}r.push(new iC(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return n2(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;
1r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);nW(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function o5(e,t){var r=e0(e.doc,t),n=tj(r);return n!=r&&(t=e5(n)),o1(!0,e,n,t,1)}function o9(e,t){var r=e0(e.doc,t),n=t_(r);return n!=r&&(t=e5(n)),o1(!0,e,r,t,-1)}function o6(e,t){var r=o5(e,t.line),n=e0(e.doc,r.line),i=ey(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return e7(r.line,l?0:o,r.sticky)}return r}function o8(e,t,r){if("string"==typeof t&&!(t=o3[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Y}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function o7(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=oX(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&oX(t,e.options.extraKeys,r,e)||oX(t,e.options.keyMap,r,e)}l(o5,"lineStart"),l(o9,"lineEnd"),l(o6,"lineStartSmart"),l(o8,"doHandleBinding"),l(o7,"lookupKeyForEditor");var o4=new _;function le(e,t,r,n){var i=e.state.keySeq;if(i){if(oY(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:o4.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),lt(e,i+" "+t,r,n))return!0}return lt(e,t,r,n)}function lt(e,t,r,n){var i=o7(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&rh(e,"keyHandled",e,t,r),("handled"==i||"multi"==i)&&(eN(r),nb(e)),!!i}function lr(e,t){var r=oq(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?le(e,"Shift-"+r,t,function(t){return o8(e,t,!0)})||le(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return o8(e,t)}):le(e,r,t,function(t){return o8(e,t)}))}function ln(e,t,r){return le(e,"'"+r+"'",t,function(t){return o8(e,t,!0)})}l(le,"dispatchKey"),l(lt,"dispatchKeyInner"),l(lr,"handleKeyBinding"),l(ln,"handleCharBinding");var li=null;function lo(e){if((!e.target||e.target==this.display.input.getField())&&(this.curOp.focus=B(),!eL(this,e))){p&&g<11&&27==e.keyCode&&(e.returnValue=!1);var t=e.keyCode;this.display.shift=16==t||e.shiftKey;var r=lr(this,e);b&&(li=r?t:null,!r&&88==t&&!eB&&(T?e.metaKey:e.ctrlKey)&&this.replaceSelection("",null,"cut")),c&&!T&&!r&&46==t&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=t||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||ll(this)}}function ll(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(H(t,"CodeMirror-crosshair"),eC(document,"keyup",r),eC(document,"mouseover",r))}z(t,"CodeMirror-crosshair"),l(r,"up"),ex(document,"keyup",r),ex(document,"mouseover",r)}function ls(e){16==e.keyCode&&(this.doc.sel.shift=!1),eL(this,e)}function la(e){if(!(e.target&&e.target!=this.display.input.getField()||rT(this.display,e)||eL(this,e))&&(!e.ctrlKey||e.altKey)&&(!T||!e.metaKey)){var t=e.keyCode,r=e.charCode;if(b&&t==li){li=null,eN(e);return}if(!(b&&(!e.which||e.which<10)&&lr(this,e))){var n=String.fromCharCode(null==r?t:r);"\b"==n||ln(this,e,n)||this.display.input.onKeyPress(e)}}}l(lo,"onKeyDown"),l(ll,"showCrossHair"),l(ls,"onKeyUp"),l(la,"onKeyPress");var lu=l(function(e,t,r){this.time=e,this.pos=t,this.button=r},"PastClick");function lc(e,t){var r=+new Date;return s&&s.compare(r,e,t)?(o=s=null,"triple"):o&&o.compare(r,e,t)?(s=new lu(r,e,t),o=null,"double"):(o=new lu(r,e,t),s=null,"single")}function lh(e){var t=this.display;if(!(eL(this,e)||t.activeTouch&&t.input.supportsTouch())){if(t.input.ensurePolled(),t.shift=e.shiftKey,rT(t,e)){m||(t.scroller.draggable=!1,setTimeout(function(){return t.scroller.draggable=!0},100));return}if(!lx(this,e)){var r=nl(this,e),n=eH(e),i=r?lc(r,n):"single";window.focus(),1==n&&this.state.selectingText&&this.state.selectingText(e),r&&ld(this,n,r,i,e)||(1==n?r?lp(this,r,i,e):eW(e)==t.scroller&&eN(e):2==n?(r&&iQ(this.doc,r),setTimeout(function(){return t.input.focus()},20)):3==n&&(D?this.display.input.onContextMenu(e):nw(this)))}}}function ld(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),le(e,o$(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=o3[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=Y}
1finally{e.state.suppressEdits=!1}return n})}function lf(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=M?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=T?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(T?r.altKey:r.ctrlKey)),i}function lp(e,t,r,n){p?setTimeout(V(nx,e),0):e.curOp.focus=B();var i,o=lf(e,r,n),l=e.doc.sel;e.options.dragDrop&&eF&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(0>e4((i=l.ranges[i]).from(),t)||t.xRel>0)&&(e4(i.to(),t)>0||t.xRel<0)?lg(e,n,t,o):lv(e,n,t,o)}function lg(e,t,r,n){var i=e.display,o=!1,s=n3(e,function(t){m&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:nw(e)),eC(i.wrapper.ownerDocument,"mouseup",s),eC(i.wrapper.ownerDocument,"mousemove",a),eC(i.scroller,"dragstart",u),eC(i.scroller,"drop",s),o||(eN(t),n.addNew||iQ(e.doc,r,null,null,n.extend),m&&!x||p&&9==g?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=l(function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},"mouseMove"),u=l(function(){return o=!0},"dragStart");m&&(i.scroller.draggable=!0),e.state.draggingText=s,s.copy=!n.moveOnDrag,ex(i.wrapper.ownerDocument,"mouseup",s),ex(i.wrapper.ownerDocument,"mousemove",a),ex(i.scroller,"dragstart",u),ex(i.scroller,"drop",s),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function lm(e,t,r){if("char"==r)return new iC(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new iC(e7(t.line,0),to(e.doc,e7(t.line+1,0)));var n=r(e,t);return new iC(n.from,n.to)}function lv(e,t,r,n){p&&nw(e);var i=e.display,o=e.doc;eN(t);var s,a,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?s=(a=o.sel.contains(r))>-1?c[a]:new iC(r,r):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new iC(r,r)),r=nl(e,t,!0,!0),a=-1;else{var h=lm(e,r,n.unit);s=n.extend?iZ(s,h.anchor,h.head,n.extend):h}n.addNew?-1==a?(a=c.length,i5(o,iS(e,c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==n.unit&&!n.extend?(i5(o,iS(e,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):i0(o,a,s,q):(a=0,i5(o,new iw([s],0),q),u=o.sel);var d=r;function f(t){if(0!=e4(d,t)){if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=j(e0(o,r.line).text,r.ch,l),h=j(e0(o,t.line).text,t.ch,l),f=Math.min(c,h),p=Math.max(c,h),g=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=m;g++){var v=e0(o,g).text,y=Q(v,f,l);f==p?i.push(new iC(e7(g,y),e7(g,y))):v.length>y&&i.push(new iC(e7(g,y),e7(g,Q(v,p,l))))}i.length||i.push(new iC(r,r)),i5(o,iS(e,u.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=s,w=lm(e,t,n.unit),C=x.anchor;e4(w.anchor,C)>0?(b=w.head,C=tn(x.from(),w.anchor)):(b=w.anchor,C=tr(x.to(),w.head));var S=u.ranges.slice(0);S[a]=ly(e,new iC(to(o,C),b)),i5(o,iS(e,S,a),q)}}}l(f,"extendTo");var g=i.wrapper.getBoundingClientRect(),m=0;function v(t){var r=++m,l=nl(e,t,!0,"rectangle"==n.unit);if(l){if(0!=e4(l,d)){e.curOp.focus=B(),f(l);var s=nT(i,o);(l.line>=s.to||l.line<s.from)&&setTimeout(n3(e,function(){m==r&&v(t)}),150)}else{var a=t.clientY<g.top?-20:t.clientY>g.bottom?20:0;a&&setTimeout(n3(e,function(){m==r&&(i.scroller.scrollTop+=a,v(t))}),50)}}}function y(t){e.state.selectingText=!1,m=1/0,t&&(eN(t),i.input.focus()),eC(i.wrapper.ownerDocument,"mousemove",b),eC(i.wrapper.ownerDocument,"mouseup",x),o.history.lastSelOrigin=null}l(v,"extend"),l(y,"done");var b=n3(e,function(e){0!==e.buttons&&eH(e)?v(e):y(e)}),x=n3(e,y);e.state.selectingText=x,ex(i.wrapper.ownerDocument,"mousemove",b),ex(i.wrapper.ownerDocument,"mouseup",x)}function ly(e,t){var r,n=t.anchor,i=t.head,o=e0(e.doc,n.line);if(0==e4(n,i)&&n.sticky==i.sticky)return t;var l=ey(o);if(!l)return t;var s=em(l,n.ch,n.sticky),a=l[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var u=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==l.length)return t;if(i.line!=n.line)r=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=em(l,i.ch,i.sticky),h=c-s||(i.ch-n.ch)*(1==a.level?-1:1);r=c==u-1||c==u?h<0:h>0}
1var d=l[u+(r?-1:0)],f=r==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?t:new iC(new e7(n.line,p,g),i)}function lb(e,t,r,n){if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&eN(t);var i,o,l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!eT(e,r))return eA(t);o-=s.top-l.viewOffset;for(var a=0;a<e.display.gutterSpecs.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i){var c=e9(e.doc,o),h=e.display.gutterSpecs[a];return eS(e,r,e,c,h.className,t),eA(t)}}}function lx(e,t){return lb(e,t,"gutterClick",!0)}function lw(e,t){!(rT(e.display,t)||lC(e,t)||eL(e,t,"contextmenu"))&&(D||e.display.input.onContextMenu(t))}function lC(e,t){return!!eT(e,"gutterContextMenu")&&lb(e,t,"gutterContextMenu",!1)}function lS(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),rX(e)}lu.prototype.compare=function(e,t,r){return this.time+400>e&&0==e4(t,this.pos)&&r==this.button},l(lc,"clickRepeat"),l(lh,"onMouseDown"),l(ld,"handleMappedButton"),l(lf,"configureMouse"),l(lp,"leftButtonDown"),l(lg,"leftButtonStartDrag"),l(lm,"rangeForUnit"),l(lv,"leftButtonSelect"),l(ly,"bidiSimplify"),l(lb,"gutterEvent"),l(lx,"clickInGutter"),l(lw,"onContextMenu"),l(lC,"contextMenuInGutter"),l(lS,"themeChanged");var lL={toString:function(){return"CodeMirror.Init"}},lk={},lT={};function lM(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=lL&&i(e,t,r)}:i)}l(r,"option"),e.defineOption=r,e.Init=lL,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,iA(e)},!0),r("indentUnit",2,iA,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){iD(e),rX(e),na(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(e7(n,o))}n++});for(var i=r.length-1;i>=0;i--)oc(e.doc,t,r[i],e7(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,r){e.state.specialChars=RegExp(t.source+(t.test("	")?"":"|	"),"g"),r!=lL&&e.refresh()}),r("specialCharPlaceholder",t7,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",k?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),r("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),r("rtlMoveVisually",!N),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){lS(e),ip(e)},!0),r("keyMap","default",function(e,t,r){var n=oZ(t),i=r!=lL&&oZ(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,lO,!0),r("gutters",[],function(e,t){e.display.gutterSpecs=ih(t,e.options.lineNumbers),ip(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return nV(e)},!0),r("scrollbarStyle","native",function(e){n_(e),nV(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ih(e.options.gutters,t),ip(e)},!0),r("firstLineNumber",1,ip,!0),r("lineNumberFormatter",function(e){return e},ip,!0),r("showCursorWhenSelecting",!1,np,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(e,t){"nocursor"==t&&(nS(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,lN),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,np,!0),r("singleCursorHeightPerLine",!0,np,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,iD,!0),r("addModeClass",!1,iD,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,iD,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),r("phrases",null)}function lN(e,t,r){if(!t!=!(r&&r!=lL)){var n=e.display.dragFunctions,i=t?ex:eC;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function lO(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(H(e.display.wrapper,"CodeMirror-wrap"),t0(e)),no(e),na(e),rX(e),setTimeout(function(){return nV(e)},100)}function lA(e,t){var r=this;if(!(this instanceof lA))return new lA(e,t);this.options=t=t?K(t):{},K(lk,t,!1);var n=t.value;"string"==typeof n?n=new oO(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new lA.inputStyles[t.inputStyle](this),o=this.display=new ig(e,n,i,t);for(var l in o.wrapper.CodeMirror=this,lS(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n_(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 _,keySeq:null,specialChars:null},t.autofocus&&!k&&o.input.focus(),p&&g<11&&setTimeout(function(){return r.display.input.reset(!0)},20),lD(this),oI(),nY(this),this.curOp.forceUpdate=!0,iP(this,n),t.autofocus&&!k||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&nC(r)},20):nS(this),lT)lT.hasOwnProperty(l)&&lT[l](this,t[l],lL);ic(this),t.finishInit&&t.finishInit(this);for(var s=0;s<lW.length;++s)lW[s](this);n$(this),m&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}
1function lD(e){var t=e.display;ex(t.scroller,"mousedown",n3(e,lh)),p&&g<11?ex(t.scroller,"dblclick",n3(e,function(t){if(!eL(e,t)){var r=nl(e,t);if(!(!r||lx(e,t)||rT(e.display,t))){eN(t);var n=e.findWordAt(r);iQ(e.doc,n.anchor,n.head)}}})):ex(t.scroller,"dblclick",function(t){return eL(e,t)||eN(t)}),ex(t.scroller,"contextmenu",function(t){return lw(e,t)}),ex(t.input.getField(),"contextmenu",function(r){t.scroller.contains(r.target)||lw(e,r)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}l(i,"finishTouch"),l(o,"isMouseLikeTouchEvent"),l(s,"farAway"),ex(t.scroller,"touchstart",function(i){if(!eL(e,i)&&!o(i)&&!lx(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),ex(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ex(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!rT(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new iC(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new iC(e7(l.line,0),to(e.doc,e7(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),eN(r)}i()}),ex(t.scroller,"touchcancel",i),ex(t.scroller,"scroll",function(){t.scroller.clientHeight&&(nI(e,t.scroller.scrollTop),nB(e,t.scroller.scrollLeft,!0),eS(e,"scroll",e))}),ex(t.scroller,"mousewheel",function(t){return ix(e,t)}),ex(t.scroller,"DOMMouseScroll",function(t){return ix(e,t)}),ex(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){eL(e,t)||eD(t)},over:function(t){eL(e,t)||(oH(e,t),eD(t))},start:function(t){return oW(e,t)},drop:n3(e,oD),leave:function(t){eL(e,t)||oF(e)}};var a=t.input.getField();ex(a,"keyup",function(t){return ls.call(e,t)}),ex(a,"keydown",n3(e,lo)),ex(a,"keypress",n3(e,la)),ex(a,"focus",function(t){return nC(e,t)}),ex(a,"blur",function(t){return nS(e,t)})}l(lM,"defineOptions"),l(lN,"dragDropChanged"),l(lO,"wrappingChanged"),l(lA,"CodeMirror"),lA.defaults=lk,lA.optionHandlers=lT,l(lD,"registerEventHandlers");var lW=[];function lH(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=td(e,t).state:r="prev");var l=e.options.tabSize,s=e0(o,t),a=j(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Y||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?j(e0(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/l);f;--f)d+=l,h+="	";if(d<u&&(h+=ee(u-d)),h!=c)return oc(o,h,e7(t,0),e7(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var m=e7(t,c.length);i0(o,p,new iC(m,m));break}}}lA.defineInitHook=function(e){return lW.push(e)},l(lH,"indentLine");var lF=null;function lP(e){lF=e}function lE(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=+new Date-200,s="paste"==i||e.state.pasteIncoming>l,a=eI(t),u=null;if(s&&n.ranges.length>1){if(lF&&lF.text.join("\n")==t){if(n.ranges.length%lF.text.length==0){u=[];for(var c=0;c<lF.text.length;c++)u.push(o.splitLines(lF.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=er(a,function(e){return[e]}))}for(var h=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],p=f.from(),g=f.to();f.empty()&&(r&&r>0?p=e7(p.line,p.ch-r):e.state.overwrite&&!s?g=e7(g.line,Math.min(e0(o,g.line).text.length,g.ch+et(a).length)):s&&lF&&lF.lineWise&&lF.text.join("\n")==a.join("\n")&&(p=g=e7(p.line,0)));var m={from:p,to:g,text:u?u[d%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};oi(e.doc,m),rh(e,"inputRead",e,m)}t&&!s&&lR(e,t),nW(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function lI(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||n2(t,function(){return lE(t,r,0,null,"paste")}),!0}function lR(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100)&&(!n||r.ranges[n-1].head.line!=i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=lH(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(e0(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=lH(e,i.head.line,"smart"));l&&rh(e,"electricInput",e,i.head.line)}}}function lB(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:e7(i,0),head:e7(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function lz(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}
vendor: 4,869 bytes, line 1
1function lG(){var e=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=E("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?e.style.width="1000px":e.setAttribute("wrap","off"),S&&(e.style.border="1px solid black"),lz(e),t}function lU(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];(n[e]!=r||"mode"==e)&&(n[e]=r,t.hasOwnProperty(e)&&n3(this,t[e])(this,r,i),eS(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"](oZ(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:n5(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw Error("Overlays may not be stateful.");en(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,na(this)}),removeOverlay:n5(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e){t.splice(r,1),this.state.modeGen++,na(this);return}}}),indentLine:n5(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),e6(this.doc,e)&&lH(this,e,t,r)}),indentSelection:n5(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(lH(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&nW(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)lH(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&i0(this.doc,n,new iC(o,u[n].to()),$)}}}),getTokenAt:function(e,t){return tv(this,e,t)},getLineTokens:function(e,t){return tv(this,e7(e),t,!0)},getTokenTypeAt:function(e){e=to(this.doc,e);var t,r=th(this,e0(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else if(r[2*l+1]<o)n=l+1;else{t=r[2*l+2];break}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==X(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return td(this,(e=ti(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return r0(this,null==e?r.head:"object"==typeof e?to(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return rJ(this,to(this.doc,e),t||"page")},coordsChar:function(e,t){return r3(this,(e=rQ(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=rQ(this,{top:e,left:0},t||"page").top,e9(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=e0(this.doc,e)}else n=e;return rZ(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-tQ(n):0)},defaultTextHeight:function(){return ne(this.display)},defaultCharWidth:function(){return nt(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=r0(this,to(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&nO(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:n5(lo),triggerOnKeyPress:n5(la),triggerOnKeyUp:ls,triggerOnM
1ouseDown:n5(lh),execCommand:function(e){if(o3.hasOwnProperty(e))return o3[e].call(null,this)},triggerElectric:n5(function(e){lR(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=to(this.doc,e),l=0;l<t&&!(o=lV(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:n5(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?lV(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Z)}),deleteH:n5(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):oQ(this,function(r){var i=lV(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=to(this.doc,e),s=0;s<t;++s){var a=r0(this,l,"div");if(null==o?o=a.left:a.left=o,(l=lK(this,a,i,r)).hitSide)break}return l},moveV:n5(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=r0(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=lK(r,s,e,t);return"page"==t&&l==n.sel.primary()&&nD(r,rJ(r,a,"div").top-s.top),a},Z),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=e0(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");("before"==e.sticky||n==t.length)&&r?--r:++n;for(var o=t.charAt(r),l=ea(o,i)?function(e){return ea(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ea(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new iC(e7(e.line,r),e7(e.line,n))},toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):H(this.display.cursorDiv,"CodeMirror-overwrite"),eS(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==B()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:n5(function(e,t){nH(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-rA(this)-this.display.barHeight,width:e.scrollWidth-rA(this)-this.display.barWidth,clientHeight:rW(this),clientWidth:rD(this)}},scrollIntoView:n5(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:e7(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?nF(this,e):nE(this,e.from,e.to,e.margin)}),setSize:n5(function(e,t){var r=this,n=l(function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e},"interpret");null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&r_(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){nu(r,i,"widget");break}}++i}),this.curOp.forceUpdate=!0,eS(this,"refresh",this)}),operation:function(e){return n2(this,e)},startOperation:function(){return nY(this)},endOperation:function(){return n$(this)},refresh:n5(function(){var e=this.display.cachedTextHeight;na(this),this.curOp.forceUpdate=!0,rX(this),nH(this,this.doc.scrollLeft,this.doc.scrollTop),is(this.display),(null==e||Math.abs(e-ne(this.display))>.5||this.options.lineWrapping)&&no(this),eS(this,"refresh",this)}),swapDoc:n5(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),iP(this,e),rX(this),this.display.input.reset(),nH(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,rh(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}},eM(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function lV(e,t,r,n,i){var o=t,s=r,a=e0(e,t.line),u=i&&"rtl"==e.direction?-r:r;function c(){var r=t.line+u;return!(r<e.first)&&!(r>=e.first+e.size)&&(t=new e7(r,t.ch,t.sticky),a=e0(e,r))}function h(o){var l;if("codepoint"==n){var s=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(s))l=null;else{var h=r>0?s>=55296&&s<56320:s>=56320&&s<57343;l=new e7(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(h?2:1))),-r)}}else l=i?o2(e.cm,a,t,r):o0(a,t,r);if(null==l){if(!(!o&&c()))return!1;t=o1(i,e.cm,a,t.line,u)}else t=l;return!0}if(l(c,"findNextLine"),l(h,"moveOnce"),"char"==n||"codepoint"==n)h();else if("column"==n)h(!0);else if("word"==n||"group"==n)for(var d=null,f="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(r<0)||h(!g);g=!1){var m=a.text.charAt(t.ch)||"\n",v=ea(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||g||v||(v="s"),d&&d!=v){r<0&&(r=1,h(),t.sticky="after");break}if(v&&(d=v),r>0&&!h(!g))break}var y=oe(e,t,o,s,!0);return te(o,y)&&(y.hitSide=!0),y}function lK(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.max(Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight)-.5*ne(e.display),3);o=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(i=r3(e,s,o)).outside;){if(r<0?o<=0:o>
1=l.height){i.hitSide=!0;break}o+=5*r}return i}l(lP,"setLastCopied"),l(lE,"applyTextInput"),l(lI,"handlePaste"),l(lR,"triggerElectric"),l(lB,"copyableRanges"),l(lz,"disableBrowserMagic"),l(lG,"hiddenTextarea"),l(lU,"addEditorMethods"),l(lV,"findPosH"),l(lK,"findPosV");var lj=l(function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");function l_(e,t){var r=rI(e,t.line);if(!r||r.hidden)return null;var n=e0(e.doc,t.line),i=rF(r,n,t.line),o=ey(n,e.doc.direction),l="left";o&&(l=em(o,t.ch)%2?"right":"left");var s=rG(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function lX(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function lY(e,t){return t&&(e.bad=!0),e}function l$(e,t,r,n,i){var o="",s=!1,a=e.doc.lineSeparator(),u=!1;function c(e){return function(t){return t.id==e}}function h(){s&&(o+=a,u&&(o+=a),s=u=!1)}function d(e){e&&(h(),o+=e)}function f(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r){d(r);return}var o,l=t.getAttribute("cm-marker");if(l){var p=e.findMarks(e7(n,0),e7(i+1,0),c(+l));p.length&&(o=p[0].find(0))&&d(e1(e.doc,o.from,o.to).join(a));return}if("false"!=t.getAttribute("contenteditable")){var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(/^br$/i.test(t.nodeName)||0!=t.textContent.length){g&&h();for(var m=0;m<t.childNodes.length;m++)f(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(u=!0),g&&(s=!0)}}}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(l(c,"recognizeMarker"),l(h,"close"),l(d,"addText"),l(f,"walk");f(t),t!=r;)t=t.nextSibling,u=!1;return o}function lq(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return lY(e.clipPos(e7(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return lZ(o,t,r)}}function lZ(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!R(n,t))return lY(e7(e5(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?et(e.rest):e.line;return lY(e7(e5(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(!s&&1==t.childNodes.length&&3==t.firstChild.nodeType&&(s=t.firstChild,r&&(r=s.nodeValue.length));a.parentNode!=n;)a=a.parentNode;var u=e.measure,c=u.maps;function h(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?u.map:c[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var a=e5(i<0?e.line:e.rest[i]),h=o[l]+n;return(n<0||s!=t)&&(h=o[l+(n?1:0)]),e7(a,h)}}}l(h,"find");var d=h(s,a,r);if(d)return lY(d,i);for(var f=a.nextSibling,p=s?s.nodeValue.length-r:0;f;f=f.nextSibling){if(d=h(f,f.firstChild,0))return lY(e7(d.line,d.ch-p),i);p+=f.textContent.length}for(var g=a.previousSibling,m=r;g;g=g.previousSibling){if(d=h(g,g.firstChild,-1))return lY(e7(d.line,d.ch+m),i);m+=g.textContent.length}}lj.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function s(e){if(!(!o(e)||eL(n,e))){if(n.somethingSelected())lP({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=lB(n);lP({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,$),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var l=lF.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l){e.preventDefault();return}}var s=lG(),a=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),a.value=lF.text.join("\n");var u=B();U(a),setTimeout(function(){n.display.lineSpace.removeChild(s),u.focus(),u==i&&r.showPrimarySelection()},50)}}i.contentEditable=!0,lz(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),l(o,"belongsToInput"),ex(i,"paste",function(e){!(!o(e)||eL(n,e)||lI(e,n))&&g<=11&&setTimeout(n3(n,function(){return t.updateFromDOM()}),20)}),ex(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),ex(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),ex(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ex(i,"touchstart",function(){return r.forceCompositionEnd()}),ex(i,"input",function(){t.composing||t.readFromDOMSoon()}),l(s,"onCopyCut"),ex(i,"copy",s),ex(i,"cut",s)},lj.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},lj.prototype.prepareSelection=function(){var e=ng(this.cm,!1);return e.focus=B()==this.div,e},lj.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},lj.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},lj.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,n=r.doc.sel.primary(),i=n.from(),o=n.to();if(r.display.viewTo==r.display.viewFrom||i.line>=r.display.viewTo||o.line<r.display.viewFrom){e.removeAllRanges();return}var l=lq(r,e.anchorNode,e.anchorOffset),s=lq(r,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=e4(tn(l,s),i)||0!=e4(tr(l,s),o)){var a=r.display.view,u=i.line>=r.display.viewFrom&&l_(r,i)||{node:a[0].measure.map[2],offset:0},h=o.line<r.display.viewTo&&l_(r,o);if(!h){var d=a[a.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;h={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!u||!h){e.removeAllRanges();return}var p,g=e.rangeCount&&e.getRangeAt(0);try{p=t(u.node,u.offset,h.offset,h.node)}catch(e){}p&&(!c&&r.state.focused?(e.collapse(u.node,u.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),g&&null==e.anchorNode?e.addRange(g):c&&this.startGracePeriod()),this.rememberSelection()}},lj.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)},lj.prototype.showMultipleSelections=function(e){P(this.cm.display.cursorDiv,e.cursors),P(this.cm.display.selectionDiv,e.selection)},lj.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},lj.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return R(this.div,t)}
1,lj.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&B()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},lj.prototype.blur=function(){this.div.blur()},lj.prototype.getField=function(){return this.div},lj.prototype.supportsTouch=function(){return!0},lj.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):n2(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),l(r,"poll"),this.polling.set(this.cm.options.pollInterval,r)},lj.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},lj.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(L&&y&&this.cm.display.gutterSpecs.length&&lX(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var r=lq(t,e.anchorNode,e.anchorOffset),n=lq(t,e.focusNode,e.focusOffset);r&&n&&n2(t,function(){i5(t.doc,iL(r,n),$),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},lj.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n,i,o=this.cm,l=o.display,s=o.doc.sel.primary(),a=s.from(),u=s.to();if(0==a.ch&&a.line>o.firstLine()&&(a=e7(a.line-1,e0(o.doc,a.line-1).length)),u.ch==e0(o.doc,u.line).text.length&&u.line<o.lastLine()&&(u=e7(u.line+1,0)),a.line<l.viewFrom||u.line>l.viewTo-1)return!1;a.line==l.viewFrom||0==(e=ns(o,a.line))?(t=e5(l.view[0].line),r=l.view[0].node):(t=e5(l.view[e].line),r=l.view[e-1].node.nextSibling);var c=ns(o,u.line);if(c==l.view.length-1?(n=l.viewTo-1,i=l.lineDiv.lastChild):(n=e5(l.view[c+1].line)-1,i=l.view[c+1].node.previousSibling),!r)return!1;for(var h=o.doc.splitLines(l$(o,r,i,t,n)),d=e1(o.doc,e7(t,0),e7(n,e0(o.doc,n).text.length));h.length>1&&d.length>1;)if(et(h)==et(d))h.pop(),d.pop(),n--;else if(h[0]==d[0])h.shift(),d.shift(),t++;else break;for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=et(h),b=et(d),x=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==d.length&&t==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=e7(t,f),C=e7(n,d.length?et(d).length-p:0);if(h.length>1||h[0]||e4(w,C))return oc(o.doc,h,w,C,"+input"),!0},lj.prototype.ensurePolled=function(){this.forceCompositionEnd()},lj.prototype.reset=function(){this.forceCompositionEnd()},lj.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},lj.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))},lj.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&n2(this.cm,function(){return na(e.cm)})},lj.prototype.setUneditable=function(e){e.contentEditable="false"},lj.prototype.onKeyPress=function(e){0!=e.charCode&&!this.composing&&(e.preventDefault(),this.cm.isReadOnly()||n3(this.cm,lE)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},lj.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},lj.prototype.onContextMenu=function(){},lj.prototype.resetPosition=function(){},lj.prototype.needsContentAttribute=!0,l(l_,"posToDOM"),l(lX,"isInGutter"),l(lY,"badPos"),l(l$,"domTextBet
1ween"),l(lq,"domToPos"),l(lZ,"locateNodeInLineView");var lQ=l(function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new _,this.hasSelection=!1,this.composing=null},"TextareaInput");function lJ(e,t){if((t=t?K(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r,n=B();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=a.getValue()}if(l(i,"save"),e.form&&(ex(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var s=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(eC(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=r))}},e.style.display="none";var a=lA(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function l0(e){e.off=eC,e.on=ex,e.wheelEventPixels=ib,e.Doc=oO,e.splitLines=eI,e.countColumn=j,e.findColumn=Q,e.isWordChar=es,e.Pass=Y,e.signal=eS,e.Line=t1,e.changeEnd=ik,e.scrollbarModel=nj,e.Pos=e7,e.cmpPos=e4,e.modes=eU,e.mimeModes=eV,e.resolveMode=e_,e.getMode=eX,e.modeExtensions=eY,e.extendMode=e$,e.copyState=eq,e.startState=eQ,e.innerMode=eZ,e.commands=o3,e.keyMap=oK,e.keyName=oq,e.isModifierKey=oY,e.lookupKey=oX,e.normalizeKeyMap=o_,e.StringStream=eJ,e.SharedTextMarker=oS,e.TextMarker=ow,e.LineWidget=ov,e.e_preventDefault=eN,e.e_stopPropagation=eO,e.e_stop=eD,e.addClass=z,e.contains=R,e.rmClass=H,e.keyNames=oz}lQ.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!eL(n,e)){if(n.somethingSelected())lP({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=lB(n);lP({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,$):(r.prevInput="",i.value=t.text.join("\n"),U(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),S&&(i.style.width="0px"),ex(i,"input",function(){p&&g>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ex(i,"paste",function(e){eL(n,e)||lI(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())}),l(o,"prepareCopyCut"),ex(i,"cut",o),ex(i,"copy",o),ex(e.scroller,"paste",function(t){if(!(rT(e,t)||eL(n,t))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),ex(e.lineSpace,"selectstart",function(t){rT(e,t)||eN(t)}),ex(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),ex(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},lQ.prototype.createField=function(e){this.wrapper=lG(),this.textarea=this.wrapper.firstChild},lQ.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},lQ.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=ng(e);if(e.options.moveInputWithCursor){var i=r0(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},lQ.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},lQ.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&U(this.textarea),p&&g>=9&&(this.hasSelection=r)}else!e&&(this.prevInput=this.textarea.value="",p&&g>=9&&(this.hasSelection=null))}},lQ.prototype.getField=function(){return this.textarea},lQ.prototype.supportsTouch=function(){return!1}
1,lQ.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!k||B()!=this.textarea))try{this.textarea.focus()}catch(e){}},lQ.prototype.blur=function(){this.textarea.blur()},lQ.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lQ.prototype.receivedFocus=function(){this.slowPoll()},lQ.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},lQ.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,l(r,"p"),t.polling.set(20,r)},lQ.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||eR(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(p&&g>=9&&this.hasSelection===i||T&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l<s&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return n2(t,function(){lE(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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},lQ.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lQ.prototype.onKeyPress=function(){p&&g>=9&&(this.hasSelection=null),this.fastPoll()},lQ.prototype.onContextMenu=function(e){var t,r=this,n=r.cm,i=n.display,o=r.textarea;r.contextMenuPending&&r.contextMenuPending();var s=nl(n,e),a=i.scroller.scrollTop;if(s&&!b){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(s)&&n3(n,i5)(n.doc,iL(s),$);var u=o.style.cssText,c=r.wrapper.style.cssText,h=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(p?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",m&&(t=window.scrollY),i.input.focus(),m&&window.scrollTo(null,t),i.input.reset(),n.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),l(f,"prepareSelectAllHack"),l(v,"rehide"),p&&g>=9&&f(),D){eD(e);var d=l(function(){eC(window,"mouseup",d),setTimeout(v,20)},"mouseup");ex(window,"mouseup",d)}else setTimeout(v,50)}function f(){if(null!=o.selectionStart){var e=n.somethingSelected(),t="​"+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=n.doc.sel}}function v(){if(r.contextMenuPending==v&&(r.contextMenuPending=!1,r.wrapper.style.cssText=c,o.style.cssText=u,p&&g<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!p||p&&g<9)&&f();var e=0,t=l(function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==r.prevInput?n3(n,or)(n):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())},"poll");i.detectingSelectAll=setTimeout(t,200)}}},lQ.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},lQ.prototype.setUneditable=function(){},lQ.prototype.needsContentAttribute=!1,l(lJ,"fromTextArea"),l(l0,"addLegacyProps"),lM(lA),lU(lA);var l1="iter insert remove copy getEditor constructor".split(" ");for(var l2 in oO.prototype)oO.prototype.hasOwnProperty(l2)&&0>X(l1,l2)&&(lA.prototype[l2]=function(e){return function(){return e.apply(this.doc,arguments)}}(oO.prototype[l2]));return eM(oO),lA.inputStyles={textarea:lQ,contenteditable:lj},lA.defineMode=function(e){lA.defaults.mode||"null"==e||(lA.defaults.mode=e),eK.apply(this,arguments)},lA.defineMIME=ej,lA.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}
1),lA.defineMIME("text/plain","null"),lA.defineExtension=function(e,t){lA.prototype[e]=t},lA.defineDocExtension=function(e,t){oO.prototype[e]=t},lA.fromTextArea=lJ,l0(lA),lA.version="5.65.3",lA},a.exports=n();var u=a.exports,c=s({__proto__:null,default:u},[a.exports])}}]);
2//# sourceMappingURL=0a4aafe0.76ddd084bc367211.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.