@hpcc-js/codemirror 3.7.8 → 3.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,33 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/codemirror"]={},e["@hpcc-js/common"])}(this,function(e,t){"use strict";var n=Object.defineProperty,r=(e,t)=>n(e,"name",{value:t,configurable:!0});function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}r(i,"getDefaultExportFromCjs");var o,a,l={},s={exports:{}};function c(){return o||(o=1,s.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),l=i||o||a,s=l&&(i?document.documentMode||6:+(a||o)[1]),c=!a&&/WebKit\//.test(e),u=c&&/Qt\/\d+\.\d+/.test(e),d=!a&&/Chrome\/(\d+)/.exec(e),p=d&&+d[1],f=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),v=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),y=/Android/.test(e),x=v||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),k=/\bCrOS\b/.test(e),w=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,c=!0);var _=b&&(u||f&&(null==C||C<12.11)),S=n||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}r(L,"classTest");var M,T=r(function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},"rmClass");function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return F(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function E(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function O(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 N(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(qe){t=n.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function z(e,t){var n=e.className;L(t).test(n)||(e.className+=(n?" ":"")+t)}function P(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!L(n[r]).test(t)&&(t+=" "+n[r]);return t}r(F,"removeChildren"),r(D,"removeChildrenAndAdd"),r(A,"elt"),r(E,"eltP"),M=document.createRange?r(function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i},"range"):r(function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(qe){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r},"range"),r(O,"contains"),r(N,"activeElt"),r(z,"addClass"),r(P,"joinClasses");var H=r(function(e){e.select()},"selectInput");function I(e){return e.display.wrapper.ownerDocument}function q(e){return B(e.display.wrapper)}function B(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function W(e){return I(e).defaultView}function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,n){for(var r in t||(t={}),e)!Object.prototype.hasOwnProperty.call(e,r)||!1===n&&Object.prototype.hasOwnProperty.call(t,r)||(t[r]=e[r]);return t}function V(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}v?H=r(function(e){e.selectionStart=0,e.selectionEnd=e.value.length},"selectInput"):l&&(H=r(function(e){try{e.select()}catch(t){}},"selectInput")),r(I,"doc"),r(q,"root"),r(B,"rootNode"),r(W,"win"),r(j,"bind"),r(R,"copyObj"),r(V,"countColumn");var G=r(function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)},"Delayed");function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}G.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},G.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)},r(U,"indexOf");var K=50,$={toString:r(function(){return"CodeMirror.Pass"},"toString")},X={scroll:!1},Q={origin:"*mouse"},Y={origin:"+move"};function J(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}r(J,"findColumn");var Z=[""];function ee(e){for(;Z.length<=e;)Z.push(te(Z)+" ");return Z[e]}function te(e){return e[e.length-1]}function ne(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function re(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ie(){}function oe(e,t){var n;return Object.create?n=Object.create(e):(ie.prototype=e,n=new ie),t&&R(t,n),n}r(ee,"spaceStr"),r(te,"lst"),r(ne,"map"),r(re,"insertSorted"),r(ie,"nothing"),r(oe,"createObj");var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function le(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ae.test(e))}function se(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}r(le,"isWordCharBasic"),r(se,"isWordChar"),r(ce,"isEmpty");var ue=/[\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 de(e){return e.charCodeAt(0)>=768&&ue.test(e)}function pe(e,t,n){for(;(n<0?t>0:t<e.length)&&de(e.charAt(t));)t+=n;return t}function fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function he(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}r(de,"isExtendingChar"),r(pe,"skipExtendingChars"),r(fe,"findFirst"),r(he,"iterateBidiSections");var me=null;function ge(e,t,n){var r;me=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:me=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:me=i)}return null!=r?r:me}r(ge,"getBidiPartAt");var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}r(n,"charType");var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;function c(e,t,n){this.level=e,this.from=t,this.to=n}return r(c,"BidiSpan"),function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!i.test(e))return!1;for(var u=e.length,d=[],p=0;p<u;++p)d.push(n(e.charCodeAt(p)));for(var f=0,h=r;f<u;++f){var m=d[f];"m"==m?d[f]=h:h=m}for(var g=0,v=r;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":a.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var x=1,b=d[0];x<u-1;++x){var k=d[x];"+"==k&&"1"==b&&"1"==d[x+1]?d[x]="1":","!=k||b!=d[x+1]||"1"!=b&&"n"!=b||(d[x]=b),b=k}for(var w=0;w<u;++w){var C=d[w];if(","==C)d[w]="N";else if("%"==C){var _=void 0;for(_=w+1;_<u&&"%"==d[_];++_);for(var S=w&&"!"==d[w-1]||_<u&&"1"==d[_]?"1":"N",L=w;L<_;++L)d[L]=S;w=_-1}}for(var M=0,T=r;M<u;++M){var F=d[M];"L"==T&&"1"==F?d[M]="L":a.test(F)&&(T=F)}for(var D=0;D<u;++D)if(o.test(d[D])){var A=void 0;for(A=D+1;A<u&&o.test(d[A]);++A);for(var E="L"==(D?d[D-1]:r),O=E==("L"==(A<u?d[A]:r))?E?"L":"R":r,N=D;N<A;++N)d[N]=O;D=A-1}for(var z,P=[],H=0;H<u;)if(l.test(d[H])){var I=H;for(++H;H<u&&l.test(d[H]);++H);P.push(new c(0,I,H))}else{var q=H,B=P.length,W="rtl"==t?1:0;for(++H;H<u&&"L"!=d[H];++H);for(var j=q;j<H;)if(s.test(d[j])){q<j&&(P.splice(B,0,new c(1,q,j)),B+=W);var R=j;for(++j;j<H&&s.test(d[j]);++j);P.splice(B,0,new c(2,R,j)),B+=W,q=j}else++j;q<H&&P.splice(B,0,new c(1,q,H))}return"ltr"==t&&(1==P[0].level&&(z=e.match(/^\s+/))&&(P[0].from=z[0].length,P.unshift(new c(0,0,z[0].length))),1==te(P).level&&(z=e.match(/\s+$/))&&(te(P).to-=z[0].length,P.push(new c(0,u-z[0].length,u)))),"rtl"==t?P.reverse():P}}();function ye(e,t){var n=e.order;return null==n&&(n=e.order=ve(e.text,t)),n}r(ye,"getOrder");var xe=[],be=r(function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||xe).concat(n)}},"on");function ke(e,t){return e._handlers&&e._handlers[t]||xe}function we(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=U(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=ke(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:r(function(){this.defaultPrevented=!0},"preventDefault")}),Ce(e,n||t.type,e,t),De(t)||t.codemirrorIgnore}function Se(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function Le(e,t){return ke(e,t).length>0}function Me(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){we(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ae(e){Te(e),Fe(e)}function Ee(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}r(ke,"getHandlers"),r(we,"off"),r(Ce,"signal"),r(_e,"signalDOMEvent"),r(Se,"signalCursorActivity"),r(Le,"hasHandler"),r(Me,"eventMixin"),r(Te,"e_preventDefault"),r(Fe,"e_stopPropagation"),r(De,"e_defaultPrevented"),r(Ae,"e_stop"),r(Ee,"e_target"),r(Oe,"e_button");var Ne,ze,Pe=function(){if(l&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function He(e){if(null==Ne){var t=A("span","​");D(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ne=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var n=Ne?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=ze)return ze;var t=D(e,document.createTextNode("AخA")),n=M(t,0,1).getBoundingClientRect(),r=M(t,1,2).getBoundingClientRect();return F(e),!(!n||n.left==n.right)&&(ze=r.right-n.right<3)}r(He,"zeroWidthElement"),r(Ie,"hasBadBidiRects");var qe,Be=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},We=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(qe){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(qe){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},je="oncopy"in(qe=A("div"))||(qe.setAttribute("oncopy","return;"),"function"==typeof qe.oncopy),Re=null;function Ve(e){if(null!=Re)return Re;var t=D(e,A("span","x")),n=t.getBoundingClientRect(),r=M(t,0,1).getBoundingClientRect();return Re=Math.abs(n.left-r.left)>1}r(Ve,"hasBadZoomedRects");var Ge={},Ue={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ge[e]=t}function $e(e,t){Ue[e]=t}function Xe(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=oe(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Qe(e,t){t=Xe(t);var n=Ge[t.name];if(!n)return Qe(e,"text/plain");var r=n(e,t);if(Ye.hasOwnProperty(t.name)){var i=Ye[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}r(Ke,"defineMode"),r($e,"defineMIME"),r(Xe,"resolveMode"),r(Qe,"getMode");var Ye={};function Je(e,t){R(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={})}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function et(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function tt(e,t,n){return!e.startState||e.startState(t,n)}r(Je,"extendMode"),r(Ze,"copyState"),r(et,"innerMode"),r(tt,"startState");var nt=r(function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n},"StringStream");function rt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function it(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function ot(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function at(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function lt(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function st(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function ct(e,t){return t>=e.first&&t<e.first+e.size}function ut(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function dt(e,t,n){if(void 0===n&&(n=null),!(this instanceof dt))return new dt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function pt(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&0==pt(e,t)}function ht(e){return dt(e.line,e.ch)}function mt(e,t){return pt(e,t)<0?t:e}function gt(e,t){return pt(e,t)<0?e:t}function vt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function yt(e,t){if(t.line<e.first)return dt(e.first,0);var n=e.first+e.size-1;return t.line>n?dt(n,rt(e,n).text.length):xt(t,rt(e,t.line).text.length)}function xt(e,t){var n=e.ch;return null==n||n>t?dt(e.line,t):n<0?dt(e.line,0):e}function bt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=yt(e,t[r]);return n}nt.prototype.eol=function(){return this.pos>=this.string.length},nt.prototype.sol=function(){return this.pos==this.lineStart},nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nt.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},nt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},nt.prototype.skipToEnd=function(){this.pos=this.string.length},nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},nt.prototype.backUp=function(e){this.pos-=e},nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},nt.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},nt.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=r(function(e){return n?e.toLowerCase():e},"cased");if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)},r(rt,"getLine"),r(it,"getBetween"),r(ot,"getLines"),r(at,"updateLineHeight"),r(lt,"lineNo"),r(st,"lineAtHeight"),r(ct,"isLine"),r(ut,"lineNumberFor"),r(dt,"Pos"),r(pt,"cmp"),r(ft,"equalCursorPos"),r(ht,"copyPos"),r(mt,"maxPos"),r(gt,"minPos"),r(vt,"clipLine"),r(yt,"clipPos"),r(xt,"clipToLen"),r(bt,"clipPosArray");var kt=r(function(e,t){this.state=e,this.lookAhead=t},"SavedContext"),wt=r(function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1},"Context");function Ct(e,t,n,i){var o=[e.state.modeGen],a={};Et(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},a,i);for(var l=n.state,s=r(function(r){n.baseTokens=o;var i=e.state.overlays[r],s=1,c=0;n.state=!0,Et(e,t.text,i.mode,n,function(e,t){for(var n=s;c<e;){var r=o[s];r>e&&o.splice(s,1,e,o[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(i.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var a=o[n+1];o[n+1]=(a?a+" ":"")+"overlay "+t}},a),n.state=l,n.baseTokens=null,n.baseTokenPos=1},"loop"),c=0;c<e.state.overlays.length;++c)s(c);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function _t(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=St(e,lt(t)),i=t.text.length>e.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=Ct(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Ot(e,t,n),a=o>r.first&&rt(r,o-1).stateAfter,l=a?wt.fromSaved(r,a,o):new wt(r,tt(r.mode),o);return r.iter(o,t,function(n){Lt(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function Lt(e,t,n,r){var i=e.doc.mode,o=new nt(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Mt(i,n.state);!o.eol();)Tt(i,o,n.state),o.start=o.pos}function Mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=et(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Tt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=et(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.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}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof kt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kt(t,this.maxLookAhead):t},r(Ct,"highlightLine"),r(_t,"getLineStyles"),r(St,"getContextBefore"),r(Lt,"processLine"),r(Mt,"callBlankLine"),r(Tt,"readToken");var Ft=r(function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},"Token");function Dt(e,t,n,r){var i,o,a=e.doc,l=a.mode,s=rt(a,(t=yt(a,t)).line),c=St(e,t.line,n),u=new nt(s.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Tt(l,u,c.state),r&&o.push(new Ft(u,i,Ze(a.mode,c.state)));return r?o:new Ft(u,i,c.state)}function At(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new nt(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&At(Mt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Lt(e,t,r,d.pos),d.pos=t.length,s=null):s=At(Tt(n,d,r.state,p),o),p){var f=p[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}function Ot(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=rt(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof kt?c.lookAhead:0)<=o.modeFrontier))return l;var u=V(s.text,null,e.options.tabSize);(null==i||r>u)&&(i=l-1,r=u)}return i}function Nt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=rt(e,r).stateAfter;if(i&&(!(i instanceof kt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}r(Dt,"takeToken"),r(At,"extractLineClasses"),r(Et,"runMode"),r(Ot,"findStartLine"),r(Nt,"retreatFrontier");var zt=!1,Pt=!1;function Ht(){zt=!0}function It(){Pt=!0}function qt(e,t,n){this.marker=e,this.from=t,this.to=n}function Bt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Wt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function jt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Rt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new qt(a,o.from,l?null:o.to))}}return r}function Vt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new qt(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Gt(e,t){if(t.full)return null;var n=ct(e,t.from.line)&&rt(e,t.from.line).markedSpans,r=ct(e,t.to.line)&&rt(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==pt(t.from,t.to),l=Rt(n,i,a),s=Vt(r,o,a),c=1==t.text.length,u=te(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var p=l[d];if(null==p.to){var f=Bt(s,p.marker);f?c&&(p.to=null==f.to?null:f.to+u):p.to=i}}if(s)for(var h=0;h<s.length;++h){var m=s[h];null!=m.to&&(m.to+=u),null==m.from?Bt(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m)):(m.from+=u,c&&(l||(l=[])).push(m))}l&&(l=Ut(l)),s&&s!=l&&(s=Ut(s));var g=[l];if(!c){var v,y=t.text.length-2;if(y>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(v||(v=[])).push(new qt(l[x].marker,null,null));for(var b=0;b<y;++b)g.push(v);g.push(s)}return g}function Ut(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Kt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(pt(c.to,l.from)<0||pt(c.from,l.to)>0)){var u=[s,1],d=pt(c.from,l.from),p=pt(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function $t(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Xt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Qt(e){return e.inclusiveLeft?-1:0}function Yt(e){return e.inclusiveRight?1:0}function Jt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=pt(r.from,i.from)||Qt(e)-Qt(t);if(o)return-o;var a=pt(r.to,i.to)||Yt(e)-Yt(t);return a||t.id-e.id}function Zt(e,t){var n,r=Pt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Jt(n,i.marker)<0)&&(n=i.marker);return n}function en(e){return Zt(e,!0)}function tn(e){return Zt(e,!1)}function nn(e,t){var n,r=Pt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Jt(n,o.marker)<0)&&(n=o.marker)}return n}function rn(e,t,n,r,i){var o=rt(e,t),a=Pt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=pt(c.from,n)||Qt(s.marker)-Qt(i),d=pt(c.to,r)||Yt(s.marker)-Yt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?pt(c.to,n)>=0:pt(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?pt(c.from,r)<=0:pt(c.from,r)<0)))return!0}}}function on(e){for(var t;t=en(e);)e=t.find(-1,!0).line;return e}function an(e){for(var t;t=tn(e);)e=t.find(1,!0).line;return e}function ln(e){for(var t,n;t=tn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function sn(e,t){var n=rt(e,t),r=on(n);return n==r?t:lt(r)}function cn(e,t){if(t>e.lastLine())return t;var n,r=rt(e,t);if(!un(e,r))return t;for(;n=tn(r);)r=n.find(1,!0).line;return lt(r)+1}function un(e,t){var n=Pt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&dn(e,t,r))return!0}}function dn(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return dn(e,r.line,Bt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&dn(e,t,i))return!0}function pn(e){for(var t=0,n=(e=on(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function fn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=en(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=tn(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function hn(e){var t=e.display,n=e.doc;t.maxLine=rt(n,n.first),t.maxLineLength=fn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=fn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}r(Ht,"seeReadOnlySpans"),r(It,"seeCollapsedSpans"),r(qt,"MarkedSpan"),r(Bt,"getMarkedSpanFor"),r(Wt,"removeMarkedSpan"),r(jt,"addMarkedSpan"),r(Rt,"markedSpansBefore"),r(Vt,"markedSpansAfter"),r(Gt,"stretchSpansOverChange"),r(Ut,"clearEmptySpans"),r(Kt,"removeReadOnlyRanges"),r($t,"detachMarkedSpans"),r(Xt,"attachMarkedSpans"),r(Qt,"extraLeft"),r(Yt,"extraRight"),r(Jt,"compareCollapsedMarkers"),r(Zt,"collapsedSpanAtSide"),r(en,"collapsedSpanAtStart"),r(tn,"collapsedSpanAtEnd"),r(nn,"collapsedSpanAround"),r(rn,"conflictingCollapsedRange"),r(on,"visualLine"),r(an,"visualLineEnd"),r(ln,"visualLineContinued"),r(sn,"visualLineNo"),r(cn,"visualLineEndNo"),r(un,"lineIsHidden"),r(dn,"lineIsHiddenInner"),r(pn,"heightAtLine"),r(fn,"lineLength"),r(hn,"findMaxLine");var mn=r(function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1},"Line");function gn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),$t(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&at(e,i)}function vn(e){e.parent=null,$t(e)}mn.prototype.lineNo=function(){return lt(this)},Me(mn),r(gn,"updateLine"),r(vn,"cleanUpLine");var yn={},xn={};function bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?xn:yn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function kn(e,t){var n=E("span",null,null,c?"padding-right: .1px":null),r={pre:E("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Cn,Ie(e.display.measure)&&(a=ye(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,a)),r.map=[],Mn(o,r,_t(e,o,t!=e.display.externalMeasured&&lt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=P(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=P(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(He(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||"")),r}function wn(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Cn(e,t,n,r,i,o,a){if(t){var c,u=e.splitSpaces?_n(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var h=d.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(u.slice(f,f+m));l&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,x=y-e.col%y;(v=c.appendChild(A("span",ee(x),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(A("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),l&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),l&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||p||o||a){var b=n||"";r&&(b+=r),i&&(b+=i);var k=A("span",[c],b,o);if(a)for(var w in a)a.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,a[w]);return e.content.appendChild(k)}e.content.appendChild(c)}}function _n(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function Sn(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,p=0;p<t.length&&!((d=t[p]).to>c&&d.from<=c);p++);if(d.to>=u)return e(n,r,i,o,a,l,s);e(n,r.slice(0,d.to-c),i,o,null,l,s),o=null,r=r.slice(d.to-c),c=d.to}}}function Ln(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Mn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,d,p,f=i.length,h=0,m=1,g="",v=0;;){if(v==h){s=c=u=l="",p=null,d=null,v=1/0;for(var y=[],x=void 0,b=0;b<r.length;++b){var k=r[b],w=k.marker;if("bookmark"==w.type&&k.from==h&&w.widgetNode)y.push(w);else if(k.from<=h&&(null==k.to||k.to>h||w.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&v>k.to&&(v=k.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&k.from==h&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(x||(x=[])).push(w.endStyle,k.to),w.title&&((p||(p={})).title=w.title),w.attributes)for(var C in w.attributes)(p||(p={}))[C]=w.attributes[C];w.collapsed&&(!d||Jt(d.marker,w)<0)&&(d=k)}else k.from>h&&v>k.from&&(v=k.from)}if(x)for(var _=0;_<x.length;_+=2)x[_+1]==v&&(c+=" "+x[_]);if(!d||d.from==h)for(var S=0;S<y.length;++S)Ln(t,0,y[S]);if(d&&(d.from||0)==h){if(Ln(t,(null==d.to?f+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=f)break;for(var L=Math.min(f,v);;){if(g){var M=h+g.length;if(!d){var T=M>L?g.slice(0,L-h):g;t.addToken(t,T,a?a+s:s,u,h+T.length==v?c:"",l,p)}if(M>=L){g=g.slice(L-h),h=L;break}h=M,u=""}g=i.slice(o,o=n[m++]),a=bn(n[m++],t.cm.options)}}else for(var F=1;F<n.length;F+=2)t.addToken(t,i.slice(o,o=n[F]),bn(n[F+1],t.cm.options))}function Tn(e,t,n){this.line=t,this.rest=ln(t),this.size=this.rest?lt(te(this.rest))-n+1:1,this.node=this.text=null,this.hidden=un(e,t)}function Fn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Tn(e.doc,rt(e.doc,o),o);r=o+a.size,i.push(a)}return i}r(bn,"interpretTokenStyle"),r(kn,"buildLineContent"),r(wn,"defaultSpecialCharPlaceholder"),r(Cn,"buildToken"),r(_n,"splitSpaces"),r(Sn,"buildTokenBadBidi"),r(Ln,"buildCollapsedSpan"),r(Mn,"insertLineContent"),r(Tn,"LineView"),r(Fn,"buildViewArray");var Dn=null;function An(e){Dn?Dn.ops.push(e):e.ownsGroup=Dn={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function On(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{Dn=null,t(n)}}r(An,"pushOperation"),r(En,"fireCallbacksForOps"),r(On,"finishOperation");var Nn=null;function zn(e,t){var n=ke(e,t);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);Dn?i=Dn.delayedCallbacks:Nn?i=Nn:(i=Nn=[],setTimeout(Pn,0));for(var a=r(function(e){i.push(function(){return n[e].apply(null,o)})},"loop"),l=0;l<n.length;++l)a(l)}}function Pn(){var e=Nn;Nn=null;for(var t=0;t<e.length;++t)e[t]()}function Hn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Wn(e,t):"gutter"==o?Rn(e,t,n,r):"class"==o?jn(e,t):"widget"==o&&Vn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function qn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):kn(e,t)}function Wn(e,t){var n=t.text.className,r=Bn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,jn(e,t)):n&&(t.text.className=n)}function jn(e,t){qn(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Rn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=In(t),l=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(A("div",ut(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Vn(e,t,n){t.alignable&&(t.alignable=null);for(var r=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Un(e,t,n)}function Gn(e,t,n,r){var i=Bn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),jn(e,t),Rn(e,t,n,r),Un(e,t,r),t.node}function Un(e,t,n){if(Kn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Kn(e,t.rest[r],t,n,!1)}function Kn(e,t,n,r,i){if(t.widgets)for(var o=In(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),$n(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),zn(s,"redraw")}}function $n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Xn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!O(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),D(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Qn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yn(e){return e.lineSpace.offsetTop}function Jn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Zn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=D(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function er(e){return K-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-er(e)-e.display.barWidth}function nr(e){return e.display.scroller.clientHeight-er(e)-e.display.barHeight}function rr(e,t,n){var r=e.options.lineWrapping,i=r&&tr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function ir(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(lt(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function or(e,t){var n=lt(t=on(t)),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=kn(e,r);return r.text=i.pre,D(e.display.lineMeasure,i.pre),r}function ar(e,t,n,r){return cr(e,sr(e,t),n,r)}function lr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[jr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function sr(e,t){var n=lt(t),r=lr(e,n);r&&!r.text?r=null:r&&r.changes&&(Hn(e,r,n,Hr(e)),e.curOp.forceUpdate=!0),r||(r=or(e,t));var i=ir(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function cr(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(rr(e,t.view,t.rect),t.hasHeights=!0),(o=hr(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}r(zn,"signalLater"),r(Pn,"fireOrphanDelayed"),r(Hn,"updateLineForChanges"),r(In,"ensureLineWrapped"),r(qn,"updateLineBackground"),r(Bn,"getLineContent"),r(Wn,"updateLineText"),r(jn,"updateLineClasses"),r(Rn,"updateLineGutter"),r(Vn,"updateLineWidgets"),r(Gn,"buildLineElement"),r(Un,"insertLineWidgets"),r(Kn,"insertLineWidgetsFor"),r($n,"positionLineWidget"),r(Xn,"widgetHeight"),r(Qn,"eventInWidget"),r(Yn,"paddingTop"),r(Jn,"paddingVert"),r(Zn,"paddingH"),r(er,"scrollGap"),r(tr,"displayWidth"),r(nr,"displayHeight"),r(rr,"ensureLineHeights"),r(ir,"mapFromLineView"),r(or,"updateExternalMeasurement"),r(ar,"measureChar"),r(lr,"findViewForLine"),r(sr,"prepareMeasureForLine"),r(cr,"measureCharPrepared");var ur,dr={left:0,right:0,top:0,bottom:0};function pr(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=1+(i=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function fr(e,t){var n=dr;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function hr(e,t,n,r){var i,o=pr(t.map,n,r),a=o.node,c=o.start,u=o.end,d=o.collapse;if(3==a.nodeType){for(var p=0;p<4;p++){for(;c&&de(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&de(t.line.text.charAt(o.coverStart+u));)++u;if((i=l&&s<9&&0==c&&u==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():fr(M(a,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}l&&s<11&&(i=mr(e.display.measure,i))}else{var f;c>0&&(d=r="right"),i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Pr(e.display),top:h.top,bottom:h.bottom}:dr}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,x=0;x<y.length-1&&!(v<y[x]);x++);var b=x?y[x-1]:0,k=y[x],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:b,bottom:k};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}function mr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ve(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function gr(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 vr(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)gr(e.display.view[t])}function yr(e){vr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function xr(e){return d&&y?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function br(e){return d&&y?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function kr(e){var t=on(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Xn(t[r]));return n}function wr(e,t,n,r,i){if(!i){var o=kr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=pn(t);if("local"==r?a+=Yn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:br(I(e)));var s=l.left+("window"==r?0:xr(I(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Cr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=xr(I(e)),i-=br(I(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function _r(e,t,n,r,i){return r||(r=rt(e.doc,t.line)),wr(e,r,ar(e,r,t.ch,i),n)}function Sr(e,t,n,i,o,a){function l(t,r){var l=cr(e,o,t,r?"right":"left",a);return r?l.left=l.right:l.right=l.left,wr(e,i,l,n)}i=i||rt(e.doc,t.line),o||(o=sr(e,i)),r(l,"get");var s=ye(i,e.doc.direction),c=t.ch,u=t.sticky;if(c>=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!s)return l("before"==u?c-1:c,"before"==u);function d(e,t,n){return l(n?e-1:e,1==s[t].level!=n)}r(d,"getBidi");var p=ge(s,c,u),f=me,h=d(c,p,"before"==u);return null!=f&&(h.other=d(c,f,"before"!=u)),h}function Lr(e,t){var n=0;t=yt(e.doc,t),e.options.lineWrapping||(n=Pr(e.display)*t.ch);var r=rt(e.doc,t.line),i=pn(r)+Yn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Mr(e,t,n,r,i){var o=dt(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Mr(r.first,0,null,-1,-1);var i=st(r,n),o=r.first+r.size-1;if(i>o)return Mr(r.first+r.size-1,rt(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=rt(r,i);;){var l=Er(e,a,i,t,n),s=nn(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=rt(r,i=c.line)}}function Fr(e,t,n,r){r-=kr(t);var i=t.text.length,o=fe(function(t){return cr(e,n,t-1).bottom<=r},i,0);return{begin:o,end:i=fe(function(t){return cr(e,n,t).top>r},o,i)}}function Dr(e,t,n,r){return n||(n=sr(e,t)),Fr(e,t,n,wr(e,t,cr(e,n,r),"line").top)}function Ar(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Er(e,t,n,r,i){i-=pn(t);var o=sr(e,t),a=kr(t),l=0,s=t.text.length,c=!0,u=ye(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Nr:Or)(e,t,n,o,u,r,i);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var p,f,h=null,m=null,g=fe(function(t){var n=cr(e,o,t);return n.top+=a,n.bottom+=a,!!Ar(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},l,s),v=!1;if(m){var y=r-m.left<m.right-r,x=y==c;g=h+(x?0:1),f=x?"after":"before",p=y?m.left:m.right}else{c||g!=s&&g!=l||g++,f=0==g?"after":g==t.text.length?"before":cr(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var b=Sr(e,dt(n,g,f),"line",t,o);p=b.left,v=i<b.top?-1:i>=b.bottom?1:0}return Mr(n,g=pe(t.text,g,1),f,v,r-p)}function Or(e,t,n,r,i,o,a){var l=fe(function(l){var s=i[l],c=1!=s.level;return Ar(Sr(e,dt(n,c?s.to:s.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=Sr(e,dt(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Ar(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s}function Nr(e,t,n,r,i,o,a){var l=Fr(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p<i.length;p++){var f=i[p];if(!(f.from>=c||f.to<=s)){var h=cr(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(s,f.from)).right,m=h<o?o-h+1e9:h-o;(!u||d>m)&&(u=f,d=m)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function zr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ur){ur=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ur.appendChild(document.createTextNode("x")),ur.appendChild(A("br"));ur.appendChild(document.createTextNode("x"))}D(e.measure,ur);var n=ur.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),F(e.measure),n||1}function Pr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");D(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Hr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function qr(e){var t=zr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Pr(e.display)-3);return function(i){if(un(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Br(e){var t=e.doc,n=qr(e);t.iter(function(e){var t=n(e);t!=e.height&&at(e,t)})}function Wr(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(d){return null}var s,c=Tr(e,o,a);if(r&&c.xRel>0&&(s=rt(e.doc,c.line).text).length==c.ch){var u=V(s,s.length,e.options.tabSize)-s.length;c=dt(c.line,Math.max(0,Math.round((o-Zn(e.display).left)/Pr(e.display))-u))}return c}function jr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Rr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Pt&&sn(e.doc,t)<i.viewTo&&Gr(e);else if(n<=i.viewFrom)Pt&&cn(e.doc,n+r)>i.viewFrom?Gr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Gr(e);else if(t<=i.viewFrom){var o=Ur(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Gr(e)}else if(n>=i.viewTo){var a=Ur(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Gr(e)}else{var l=Ur(e,t,t,-1),s=Ur(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Fn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Gr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Vr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[jr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ur(e,t,n,r){var i,o=jr(e,t),a=e.display.view;if(!Pt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;sn(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Kr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Fn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Fn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(jr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Fn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,jr(e,n)))),r.viewTo=n}function $r(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Xr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Qr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var s=n.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();if(a){var u=a(e,s);u&&Yr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&Yr(e,s.head,i);c||Zr(e,s,o)}}return r}function Yr(e,t,n){var r=Sr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=_r(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var l=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Jr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var i=e.display,o=e.doc,a=document.createDocumentFragment(),l=Zn(e.display),s=l.left,c=Math.max(i.sizerWidth,tr(e)-i.sizer.offsetLeft)-l.right,u="ltr"==o.direction;function d(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?c-e:n)+"px;\n height: "+(r-t)+"px"))}function p(t,n,i){var a,l,p=rt(o,t),f=p.text.length;function h(n,r){return _r(e,dt(t,n),"div",p,r)}function m(t,n,r){var i=Dr(e,p,null,t),o="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(p.text.charAt(i.end-1))?2:1),o)[o]}r(h,"coords"),r(m,"wrapX");var g=ye(p,o.direction);return he(g,n||0,null==i?f:i,function(e,t,r,o){var p="ltr"==r,v=h(e,p?"left":"right"),y=h(t-1,p?"right":"left"),x=null==n&&0==e,b=null==i&&t==f,k=0==o,w=!g||o==g.length-1;if(y.top-v.top<=3){var C=(u?b:x)&&w,_=(u?x:b)&&k?s:(p?v:y).left,S=C?c:(p?y:v).right;d(_,v.top,S-_,v.bottom)}else{var L,M,T,F;p?(L=u&&x&&k?s:v.left,M=u?c:m(e,r,"before"),T=u?s:m(t,r,"after"),F=u&&b&&w?c:y.right):(L=u?m(e,r,"before"):s,M=!u&&x&&k?c:v.right,T=!u&&b&&w?s:y.left,F=u?m(t,r,"after"):c),d(L,v.top,M-L,v.bottom),v.bottom<y.top&&d(s,v.bottom,null,y.top),d(T,y.top,F-T,y.bottom)}(!a||Jr(v,a)<0)&&(a=v),Jr(y,a)<0&&(a=y),(!l||Jr(v,l)<0)&&(l=v),Jr(y,l)<0&&(l=y)}),{start:a,end:l}}r(d,"add"),r(p,"drawForLine");var f=t.from(),h=t.to();if(f.line==h.line)p(f.line,f.ch,h.ch);else{var m=rt(o,f.line),g=rt(o,h.line),v=on(m)==on(g),y=p(f.line,f.ch,v?m.text.length+1:null).end,x=p(h.line,v?0:null,h.ch).start;v&&(y.top<x.top-2?(d(y.right,y.top,null,y.bottom),d(s,x.top,x.left,x.bottom)):d(y.right,y.top,x.left-y.right,y.bottom)),y.bottom<x.top&&d(s,y.bottom,null,x.top)}n.appendChild(a)}function ei(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ii(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ti(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ni(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ii(e))},100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(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(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ei(e))}function ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function oi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,a=0;a<t.view.length;a++){var c=t.view[a],u=e.options.lineWrapping,d=void 0,p=0;if(!c.hidden){if(i+=c.line.height,l&&s<8){var f=c.node.offsetTop+c.node.offsetHeight;d=f-n,n=f}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(p=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),at(c.line,d),ai(c.line),c.rest))for(var g=0;g<c.rest.length;g++)ai(c.rest[g]);if(p>e.display.sizerWidth){var v=Math.ceil(p/Pr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ai(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function li(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Yn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=st(t,r),a=st(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=st(t,pn(rt(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=st(t,pn(rt(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function si(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var a=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Yn(e.display))+"px;\n height: "+(t.bottom-t.top+er(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function ci(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?dt(t.line,t.ch+1,"before"):t,t=t.ch?dt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Sr(e,t),s=n&&n!=t?Sr(e,n):l,c=di(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(yi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(bi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ui(e,t){var n=di(e,t);null!=n.scrollTop&&yi(e,n.scrollTop),null!=n.scrollLeft&&bi(e,n.scrollLeft)}function di(e,t){var n=e.display,r=zr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=nr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Jn(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=tr(e)-n.gutters.offsetWidth,h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>f+p-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function pi(e,t){null!=t&&(gi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function fi(e){gi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function hi(e,t,n){null==t&&null==n||gi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function mi(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,vi(e,Lr(e,t.from),Lr(e,t.to),t.margin))}function vi(e,t,n,r){var i=di(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});hi(e,i.scrollLeft,i.scrollTop)}function yi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),xi(e,t,!0),n&&Xi(e),Wi(e,100))}function xi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ki(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Jn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}r(pr,"nodeAndOffsetInLineMap"),r(fr,"getUsefulRect"),r(hr,"measureCharInner"),r(mr,"maybeUpdateRectForZooming"),r(gr,"clearLineMeasurementCacheFor"),r(vr,"clearLineMeasurementCache"),r(yr,"clearCaches"),r(xr,"pageScrollX"),r(br,"pageScrollY"),r(kr,"widgetTopHeight"),r(wr,"intoCoordSystem"),r(Cr,"fromCoordSystem"),r(_r,"charCoords"),r(Sr,"cursorCoords"),r(Lr,"estimateCoords"),r(Mr,"PosWithInfo"),r(Tr,"coordsChar"),r(Fr,"wrappedLineExtent"),r(Dr,"wrappedLineExtentChar"),r(Ar,"boxIsAfter"),r(Er,"coordsCharInner"),r(Or,"coordsBidiPart"),r(Nr,"coordsBidiPartWrapped"),r(zr,"textHeight"),r(Pr,"charWidth"),r(Hr,"getDimensions"),r(Ir,"compensateForHScroll"),r(qr,"estimateHeight"),r(Br,"estimateLineHeights"),r(Wr,"posFromMouse"),r(jr,"findViewIndex"),r(Rr,"regChange"),r(Vr,"regLineChange"),r(Gr,"resetView"),r(Ur,"viewCuttingPoint"),r(Kr,"adjustView"),r($r,"countDirtyView"),r(Xr,"updateSelection"),r(Qr,"prepareSelection"),r(Yr,"drawSelectionCursor"),r(Jr,"cmpCoords"),r(Zr,"drawSelectionRange"),r(ei,"restartBlink"),r(ti,"ensureFocus"),r(ni,"delayBlurEvent"),r(ri,"onFocus"),r(ii,"onBlur"),r(oi,"updateHeightsInViewport"),r(ai,"updateWidgetHeight"),r(li,"visibleLines"),r(si,"maybeScrollWindow"),r(ci,"scrollPosIntoView"),r(ui,"scrollIntoView"),r(di,"calculateScrollPos"),r(pi,"addToScrollTop"),r(fi,"ensureCursorVisible"),r(hi,"scrollToCoords"),r(mi,"scrollToRange"),r(gi,"resolveScrollToPos"),r(vi,"scrollToCoordsRange"),r(yi,"updateScrollTop"),r(xi,"setScrollTop"),r(bi,"setScrollLeft"),r(ki,"measureForScrollbars");var wi=r(function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");wi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wi.prototype.zeroWidthHack=function(){var e=b&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new G,this.disableVert=new G},wi.prototype.enableZeroWidthBar=function(e,t,n){function i(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,i)}e.style.visibility="",r(i,"maybeDisable"),t.set(1e3,i)},wi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ci=r(function(){},"NullScrollbars");function _i(e,t){t||(t=ki(e));var n=e.display.barWidth,r=e.display.barHeight;Si(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&oi(e),Si(e,ki(e)),n=e.display.barWidth,r=e.display.barHeight}function Si(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ci.prototype.update=function(){return{bottom:0,right:0}},Ci.prototype.setScrollLeft=function(){},Ci.prototype.setScrollTop=function(){},Ci.prototype.clear=function(){},r(_i,"updateScrollbars"),r(Si,"updateScrollbarsInner");var Li={native:wi,null:Ci};function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Li[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?bi(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}r(Mi,"initScrollbars");var Ti=0;function Fi(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:++Ti,markArrays:null},An(e.curOp)}function Di(e){var t=e.curOp;t&&On(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ai(e)})}function Ai(e){for(var t=e.ops,n=0;n<t.length;n++)Ei(t[n]);for(var r=0;r<t.length;r++)Oi(t[r]);for(var i=0;i<t.length;i++)Ni(t[i]);for(var o=0;o<t.length;o++)zi(t[o]);for(var a=0;a<t.length;a++)Pi(t[a])}function Ei(e){var t=e.cm,n=t.display;Vi(t),e.updateMaxLine&&hn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ri(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Oi(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Ni(e){var t=e.cm,n=t.display;e.updatedDisplay&&oi(t),e.barMeasure=ki(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ar(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function zi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(q(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&_i(t,e.barMeasure),e.updatedDisplay&&Ji(t,e.barMeasure),e.selectionChanged&&ei(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ti(e.cm)}function Pi(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&$i(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&xi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos&&si(t,ci(t,yt(r,e.scrollToPos.from),yt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Ce(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Ce(o[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ce(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Hi(e,t){if(e.curOp)return t();Fi(e);try{return t()}finally{Di(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Fi(e);try{return t.apply(e,arguments)}finally{Di(e)}}}function qi(e){return function(){if(this.curOp)return e.apply(this,arguments);Fi(this);try{return e.apply(this,arguments)}finally{Di(this)}}}function Bi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Fi(t);try{return e.apply(this,arguments)}finally{Di(t)}}}function Wi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(ji,e))}function ji(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,s=Ct(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=o.styles[p];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Lt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Wi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Hi(e,function(){for(var t=0;t<i.length;t++)Vr(e,i[t],"text")})}}r(Fi,"startOperation"),r(Di,"endOperation"),r(Ai,"endOperations"),r(Ei,"endOperation_R1"),r(Oi,"endOperation_W1"),r(Ni,"endOperation_R2"),r(zi,"endOperation_W2"),r(Pi,"endOperation_finish"),r(Hi,"runInOp"),r(Ii,"operation"),r(qi,"methodOp"),r(Bi,"docMethodOp"),r(Wi,"startWorker"),r(ji,"highlightWorker");var Ri=r(function(e,t,n){var r=e.display;this.viewport=t,this.visible=li(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=n,this.dims=Hr(e),this.events=[]},"DisplayUpdate");function Vi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=er(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=er(e)+"px",t.scrollbarsClipped=!0)}function Gi(e){if(e.hasFocus())return null;var t=N(q(e));if(!t||!O(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=W(e).getSelection();r.anchorNode&&r.extend&&O(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ui(e){if(e&&e.activeElt&&e.activeElt!=N(B(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&O(document.body,e.anchorNode)&&O(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function Ki(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Gr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==$r(e))return!1;eo(e)&&(Gr(e),t.dims=Hr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Pt&&(o=sn(e.doc,o),a=cn(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Kr(e,o,a),n.viewOffset=pn(rt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=$r(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi(e);return s>4&&(n.lineDiv.style.display="none"),Qi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ui(c),F(n.cursorDiv),F(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Wi(e,400)),n.updateLineNumbers=null,!0}function $i(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=tr(e))r&&(t.visible=li(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Jn(e.display)-nr(e),n.top)}),t.visible=li(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;oi(e);var i=ki(e);Xr(e),_i(e,i),Ji(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 Xi(e,t){var n=new Ri(e,t);if(Ki(e,n)){oi(e),$i(e,n);var r=ki(e);Xr(e),_i(e,r),Ji(e,r),n.finish()}}function Qi(e,t,n){var i=e.display,o=e.options.lineNumbers,a=i.lineDiv,l=a.firstChild;function s(t){var n=t.nextSibling;return c&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}r(s,"rm");for(var u=i.view,d=i.viewFrom,p=0;p<u.length;p++){var f=u[p];if(f.hidden);else if(f.node&&f.node.parentNode==a){for(;l!=f.node;)l=s(l);var h=o&&null!=t&&t<=d&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(h=!1),Hn(e,f,d,n)),h&&(F(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ut(e.options,d)))),l=f.node.nextSibling}else{var m=Gn(e,f,d,n);a.insertBefore(m,l)}d+=f.size}for(;l;)l=s(l)}function Yi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",zn(e,"gutterChanged",e)}function Ji(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+er(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function eo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ut(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Yi(e.display),!0}return!1}function to(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function no(e){var t=e.gutters,n=e.gutterSpecs;F(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(A("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Yi(e)}function ro(e){no(e.display),Rr(e),Zi(e)}function io(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=E("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=E("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=E("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[a],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+K+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),d&&105===p&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),l&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),c||n&&x||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=to(i.gutters,i.lineNumbers),no(o),r.init(o)}Ri.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},Ri.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ce.apply(null,this.events[e])},r(Vi,"maybeClipScrollbars"),r(Gi,"selectionSnapshot"),r(Ui,"restoreSelection"),r(Ki,"updateDisplayIfNeeded"),r($i,"postUpdateDisplay"),r(Xi,"updateDisplaySimple"),r(Qi,"patchDisplay"),r(Yi,"updateGutterSpace"),r(Ji,"setDocumentHeight"),r(Zi,"alignHorizontally"),r(eo,"maybeUpdateLineNumberWidth"),r(to,"getGutters"),r(no,"renderGutters"),r(ro,"updateGutters"),r(io,"Display");var oo=0,ao=null;function lo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function so(e){var t=lo(e);return t.x*=ao,t.y*=ao,t}function co(e,t){d&&102==p&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var r=lo(t),i=r.x,o=r.y,a=ao;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,h=s.scrollHeight>s.clientHeight;if(i&&u||o&&h){if(o&&b&&c)e:for(var m=t.target,g=l.view;m!=s;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(i&&!n&&!f&&null!=a)return o&&h&&yi(e,Math.max(0,s.scrollTop+o*a)),bi(e,Math.max(0,s.scrollLeft+i*a)),(!o||o&&h)&&Te(t),void(l.wheelStartX=null);if(o&&null!=a){var y=o*a,x=e.doc.scrollTop,k=x+l.wrapper.clientHeight;y<0?x=Math.max(0,x+y-50):k=Math.min(e.doc.height,k+y+50),Xi(e,{top:x,bottom:k})}oo<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(ao=(ao*oo+n)/(oo+1),++oo)}},200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?ao=-.53:n?ao=15:d?ao=-.7:h&&(ao=-1/3),r(lo,"wheelEventDelta"),r(so,"wheelEventPixels"),r(co,"onScrollWheel");var uo=r(function(e,t){this.ranges=e,this.primIndex=t},"Selection");uo.prototype.primary=function(){return this.ranges[this.primIndex]},uo.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ft(n.anchor,r.anchor)||!ft(n.head,r.head))return!1}return!0},uo.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new po(ht(this.ranges[t].anchor),ht(this.ranges[t].head));return new uo(e,this.primIndex)},uo.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},uo.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(pt(t,r.from())>=0&&pt(e,r.to())<=0)return n}return-1};var po=r(function(e,t){this.anchor=e,this.head=t},"Range");function fo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return pt(e.from(),t.from())}),n=U(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=pt(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=gt(l.from(),a.from()),u=mt(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new po(d?u:c,d?c:u))}}return new uo(t,n)}function ho(e,t){return new uo([new po(e,t||e)],0)}function mo(e){return e.text?dt(e.from.line+e.text.length-1,te(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function go(e,t){if(pt(e,t.from)<0)return e;if(pt(e,t.to)<=0)return mo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=mo(t).ch-t.to.ch),dt(n,r)}function vo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new po(go(i.anchor,t),go(i.head,t)))}return fo(e.cm,n,e.sel.primIndex)}function yo(e,t,n){return e.line==t.line?dt(n.line,e.ch-t.ch+n.ch):dt(n.line+(e.line-t.line),e.ch)}function xo(e,t,n){for(var r=[],i=dt(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=yo(l.from,i,o),c=yo(mo(l),i,o);if(i=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=pt(u.head,u.anchor)<0;r[a]=new po(d?c:s,d?s:c)}else r[a]=new po(s,s)}return new uo(r,e.sel.primIndex)}function bo(e){e.doc.mode=Qe(e.options,e.doc.modeOption),ko(e)}function ko(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,Wi(e,100),e.state.modeGen++,e.curOp&&Rr(e)}function wo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==te(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Co(e,t,n,i){function o(e){return n?n[e]:null}function a(e,n,r){gn(e,n,r,i),zn(e,"change",e,t)}function l(e,t){for(var n=[],r=e;r<t;++r)n.push(new mn(u[r],o(r),i));return n}r(o,"spansFor"),r(a,"update"),r(l,"linesFor");var s=t.from,c=t.to,u=t.text,d=rt(e,s.line),p=rt(e,c.line),f=te(u),h=o(u.length-1),m=c.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(wo(e,t)){var g=l(0,u.length-1);a(p,p.text,h),m&&e.remove(s.line,m),g.length&&e.insert(s.line,g)}else if(d==p)if(1==u.length)a(d,d.text.slice(0,s.ch)+f+d.text.slice(c.ch),h);else{var v=l(1,u.length-1);v.push(new mn(f+d.text.slice(c.ch),h,i)),a(d,d.text.slice(0,s.ch)+u[0],o(0)),e.insert(s.line+1,v)}else if(1==u.length)a(d,d.text.slice(0,s.ch)+u[0]+p.text.slice(c.ch),o(0)),e.remove(s.line+1,m);else{a(d,d.text.slice(0,s.ch)+u[0],o(0)),a(p,f+p.text.slice(c.ch),h);var y=l(1,u.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,y)}zn(e,"change",e,t)}function _o(e,t,n){function i(e,r,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=r){var s=o&&l.sharedHist;n&&!s||(t(l.doc,s),i(l.doc,e,s))}}}r(i,"propagate"),i(e,null,!0)}function So(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Br(e),bo(e),Lo(e),e.options.direction=t.direction,e.options.lineWrapping||hn(e),e.options.mode=t.modeOption,Rr(e)}function Lo(e){("rtl"==e.doc.direction?z:T)(e.display.lineDiv,"CodeMirror-rtl")}function Mo(e){Hi(e,function(){Lo(e),Rr(e)})}function To(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 Fo(e,t){var n={from:ht(t.from),to:mo(t),text:it(e,t.from,t.to)};return Po(e,n,t.from.line,t.to.line+1),_o(e,function(e){return Po(e,n,t.from.line,t.to.line+1)},!0),n}function Do(e){for(;e.length&&te(e).ranges;)e.pop()}function Ao(e,t){return t?(Do(e.done),te(e.done)):e.done.length&&!te(e.done).ranges?te(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),te(e.done)):void 0}function Eo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==r)))a=te(o.changes),0==pt(t.from,t.to)&&0==pt(t.from,a.to)?a.to=mo(t):o.changes.push(Fo(e,t));else{var s=te(i.done);for(s&&s.ranges||zo(e.sel,i.done),o={changes:[Fo(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ce(e,"historyAdded")}function Oo(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function No(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Oo(e,o,te(i.done),t))?i.done[i.done.length-1]=t:zo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Do(i.undone)}function zo(e,t){var n=te(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Po(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Ho(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ho(n[i]));return r}function qo(e,t){var n=Io(e,t),r=Gt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Bo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?uo.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(te(l)[d]=c[d],delete c[d])}}}return r}function Wo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=pt(t,i)<0;o!=pt(n,i)<0?(i=t,t=n):o!=pt(t,n)<0&&(t=n)}return new po(i,t)}return new po(n||t,t)}function jo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$o(e,new uo([Wo(e.sel.primary(),t,n,i)],0),r)}function Ro(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Wo(e.sel.ranges[o],t[o],null,i);$o(e,fo(e.cm,r,e.sel.primIndex),n)}function Vo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,$o(e,fo(e.cm,i,e.sel.primIndex),r)}function Go(e,t,n,r){$o(e,ho(t,n),r)}function Uo(e,t,n){var i={ranges:t.ranges,update:r(function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new po(yt(e,t[n].anchor),yt(e,t[n].head))},"update"),origin:n&&n.origin};return Ce(e,"beforeSelectionChange",e,i),e.cm&&Ce(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?fo(e.cm,i.ranges,i.ranges.length-1):t}function Ko(e,t,n){var r=e.history.done,i=te(r);i&&i.ranges?(r[r.length-1]=t,Xo(e,t,n)):$o(e,t,n)}function $o(e,t,n){Xo(e,t,n),No(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Xo(e,t,n){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=Uo(e,t,n));var r=n&&n.bias||(pt(t.primary().head,e.sel.primary().head)<0?-1:1);Qo(e,Jo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||fi(e.cm)}function Qo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Se(e.cm)),zn(e,"cursorActivity",e))}function Yo(e){Qo(e,Jo(e,e.sel,null,!1))}function Jo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=ea(e,a.anchor,l&&l.anchor,n,r),c=a.head==a.anchor?s:ea(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new po(s,c))}return i?fo(e.cm,i,t.primIndex):t}function Zo(e,t,n,r,i){var o=rt(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(d=ta(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(p=pt(d,n))&&(r<0?p<0:p>0))return Zo(e,d,t,r,i)}var f=s.find(r<0?-1:1);return(r<0?c:u)&&(f=ta(e,f,r,f.line==t.line?o:null)),f?Zo(e,f,t,r,i):null}}return t}function ea(e,t,n,r,i){var o=r||1,a=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return a||(e.cantEdit=!0,dt(e.first,0))}function ta(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?yt(e,dt(t.line-1)):null:n>0&&t.ch==(r||rt(e,t.line)).text.length?t.line<e.first+e.size-1?dt(t.line+1,0):null:new dt(t.line,t.ch+n)}function na(e){e.setSelection(dt(e.firstLine(),0),dt(e.lastLine()),X)}function ra(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:r(function(){return i.canceled=!0},"cancel")};return n&&(i.update=function(t,n,r,o){t&&(i.from=yt(e,t)),n&&(i.to=yt(e,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),Ce(e,"beforeChange",e,i),e.cm&&Ce(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function ia(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,ia)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))||(t=ra(e,t,!0))){var r=zt&&!n&&Kt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)oa(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else oa(e,t)}}function oa(e,t){if(1!=t.text.length||""!=t.text[0]||0!=pt(t.from,t.to)){var n=vo(e,t);Eo(e,t,n,e.cm?e.cm.curOp.id:NaN),sa(e,t,n,Gt(e,t));var r=[];_o(e,function(e,n){n||-1!=U(r,e.history)||(fa(e.history,t),r.push(e.history)),sa(e,t,null,Gt(e,t))})}}function aa(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var o,a=e.history,l=e.sel,s="undo"==t?a.done:a.undone,c="undo"==t?a.undone:a.done,u=0;u<s.length&&(o=s[u],n?!o.ranges||o.equals(e.sel):o.ranges);u++);if(u!=s.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(i)return void s.push(o);break}if(zo(o,c),n&&!o.equals(e.sel))return void $o(e,o,{clearRedo:!1});l=o}var d=[];zo(l,c),c.push({changes:d,generation:a.generation}),a.generation=o.generation||++a.maxGeneration;for(var p=Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"),f=r(function(n){var r=o.changes[n];if(r.origin=t,p&&!ra(e,r,!1))return s.length=0,{};d.push(Fo(e,r));var i=n?vo(e,r):te(s);sa(e,r,i,qo(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:mo(r)});var a=[];_o(e,function(e,t){t||-1!=U(a,e.history)||(fa(e.history,r),a.push(e.history)),sa(e,r,null,qo(e,r))})},"loop"),h=o.changes.length-1;h>=0;--h){var m=f(h);if(m)return m.v}}}}function la(e,t){if(0!=t&&(e.first+=t,e.sel=new uo(ne(e.sel.ranges,function(e){return new po(dt(e.anchor.line+t,e.anchor.ch),dt(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Vr(e.cm,r,"gutter")}}function sa(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,sa)(e,t,n,r);if(t.to.line<e.first)la(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);la(e,i),t={from:dt(e.first,0),to:dt(t.to.line+i,t.to.ch),text:[te(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:dt(o,rt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=it(e,t.from,t.to),n||(n=vo(e,t)),e.cm?ca(e.cm,t,r):Co(e,t,r),Xo(e,n,X),e.cantEdit&&ea(e,dt(e.firstLine(),0))&&(e.cantEdit=!1)}}function ca(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=lt(on(rt(r,o.line))),r.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Se(e),Co(r,t,n,qr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=fn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Nt(r,o.line),Wi(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Rr(e):o.line!=a.line||1!=t.text.length||wo(e.doc,t)?Rr(e,o.line,a.line+1,c):Vr(e,o.line,"text");var u=Le(e,"changes"),d=Le(e,"change");if(d||u){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&zn(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function ua(e,t,n,r,i){var o;r||(r=n),pt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ia(e,{from:n,to:r,text:t,origin:i})}function da(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function pa(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)da(o.ranges[l].anchor,t,n,r),da(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=dt(c.from.line+r,c.from.ch),c.to=dt(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function fa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;pa(e.done,n,r,i),pa(e.undone,n,r,i)}function ha(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=rt(e,vt(e,t)):i=lt(t),null==i?null:(r(o,i)&&e.cm&&Vr(e.cm,i,n),o)}function ma(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ga(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}po.prototype.from=function(){return gt(this.anchor,this.head)},po.prototype.to=function(){return mt(this.anchor,this.head)},po.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},r(fo,"normalizeSelection"),r(ho,"simpleSelection"),r(mo,"changeEnd"),r(go,"adjustForChange"),r(vo,"computeSelAfterChange"),r(yo,"offsetPos"),r(xo,"computeReplacedSel"),r(bo,"loadMode"),r(ko,"resetModeState"),r(wo,"isWholeLineUpdate"),r(Co,"updateDoc"),r(_o,"linkedDocs"),r(So,"attachDoc"),r(Lo,"setDirectionClass"),r(Mo,"directionChanged"),r(To,"History"),r(Fo,"historyChangeFromChange"),r(Do,"clearSelectionEvents"),r(Ao,"lastChangeEvent"),r(Eo,"addChangeToHistory"),r(Oo,"selectionEventCanBeMerged"),r(No,"addSelectionToHistory"),r(zo,"pushSelectionToHistory"),r(Po,"attachLocalSpans"),r(Ho,"removeClearedSpans"),r(Io,"getOldSpans"),r(qo,"mergeOldSpans"),r(Bo,"copyHistoryArray"),r(Wo,"extendRange"),r(jo,"extendSelection"),r(Ro,"extendSelections"),r(Vo,"replaceOneSelection"),r(Go,"setSimpleSelection"),r(Uo,"filterSelectionChange"),r(Ko,"setSelectionReplaceHistory"),r($o,"setSelection"),r(Xo,"setSelectionNoUndo"),r(Qo,"setSelectionInner"),r(Yo,"reCheckSelection"),r(Jo,"skipAtomicInSelection"),r(Zo,"skipAtomicInner"),r(ea,"skipAtomic"),r(ta,"movePos"),r(na,"selectAll"),r(ra,"filterChange"),r(ia,"makeChange"),r(oa,"makeChangeInner"),r(aa,"makeChangeFromHistory"),r(la,"shiftDoc"),r(sa,"makeChangeSingleDoc"),r(ca,"makeChangeSingleDocInEditor"),r(ua,"replaceRange"),r(da,"rebaseHistSelSingle"),r(pa,"rebaseHistArray"),r(fa,"rebaseHist"),r(ha,"changeLine"),r(ma,"LeafChunk"),ma.prototype={chunkSize:r(function(){return this.lines.length},"chunkSize"),removeInner:r(function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,vn(i),zn(i,"delete")}this.lines.splice(e,t)},"removeInner"),collapse:r(function(e){e.push.apply(e,this.lines)},"collapse"),insertInner:r(function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},"insertInner"),iterN:r(function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0},"iterN")},r(ga,"BranchChunk"),ga.prototype={chunkSize:r(function(){return this.size},"chunkSize"),removeInner:r(function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ma))){var l=[];this.collapse(l),this.children=[new ma(l)],this.children[0].parent=this}},"removeInner"),collapse:r(function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},"collapse"),insertInner:r(function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new ma(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},"insertInner"),maybeSpill:r(function(){if(!(this.children.length<=10)){var e=this;do{var t=new ga(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ga(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},"maybeSpill"),iterN:r(function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}},"iterN")};var va=r(function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t},"LineWidget");function ya(e,t,n){pn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pi(e,n)}function xa(e,t,n,r){var i=new va(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ha(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!un(e,t)){var r=pn(t)<e.scrollTop;at(t,t.height+Xn(i)),r&&pi(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&zn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:lt(t)),i}va.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=lt(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Xn(this);at(n,Math.max(0,n.height-o)),e&&(Hi(e,function(){ya(e,n,-o),Vr(e,r,"widget")}),zn(e,"lineWidgetCleared",e,this,r))}},va.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Xn(this)-t;i&&(un(this.doc,r)||at(r,r.height+i),n&&Hi(n,function(){n.curOp.forceUpdate=!0,ya(n,r,i),zn(n,"lineWidgetChanged",n,e,lt(r))}))},Me(va),r(ya,"adjustScrollWhenAboveVisible"),r(xa,"addLineWidget");var ba=0,ka=r(function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ba},"TextMarker");function wa(e,t,n,r,i){if(r&&r.shared)return _a(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,wa)(e,t,n,r,i);var o=new ka(e,i),a=pt(t,n);if(r&&R(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(rn(e,t.line,t,n,o)||t.line!=n.line&&rn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&Eo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,function(r){c&&o.collapsed&&!c.options.lineWrapping&&on(r)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&at(r,0),jt(r,new qt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){un(e,t)&&at(t,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ht(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ba,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Rr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Vr(c,u,"text");o.atomic&&Yo(c.doc),zn(c,"markerAdded",c,o)}return o}ka.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Fi(e),Le(this,"clear")){var n=this.find();n&&zn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Bt(a.markedSpans,this);e&&!this.collapsed?Vr(e,lt(a),"text"):e&&(null!=l.to&&(i=lt(a)),null!=l.from&&(r=lt(a))),a.markedSpans=Wt(a.markedSpans,l),null==l.from&&this.collapsed&&!un(this.doc,a)&&e&&at(a,zr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=on(this.lines[s]),u=fn(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Yo(e.doc)),e&&zn(e,"markerCleared",e,this,r,i),t&&Di(e),this.parent&&this.parent.clear()}},ka.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Bt(o.markedSpans,this);if(null!=a.from&&(n=dt(t?o:lt(o),a.from),-1==e))return n;if(null!=a.to&&(r=dt(t?o:lt(o),a.to),1==e))return r}return n&&{from:n,to:r}},ka.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Hi(r,function(){var i=t.line,o=lt(t.line),a=lr(r,o);if(a&&(gr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!un(n.doc,i)&&null!=n.height){var l=n.height;n.height=null;var s=Xn(n)-l;s&&at(i,i.height+s)}zn(r,"markerChanged",r,e)})},ka.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ka.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(ka),r(wa,"markText");var Ca=r(function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this},"SharedTextMarker");function _a(e,t,n,r,i){(r=R(r)).shared=!1;var o=[wa(e,t,n,r,i)],a=o[0],l=r.widgetNode;return _o(e,function(e){l&&(r.widgetNode=l.cloneNode(!0)),o.push(wa(e,yt(e,t),yt(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=te(o)}),new Ca(o,a)}function Sa(e){return e.findMarks(dt(e.first,0),e.clipPos(dt(e.lastLine())),function(e){return e.parent})}function La(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(pt(o,a)){var l=wa(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Ma(e){for(var t=r(function(t){var n=e[t],r=[n.primary.doc];_o(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==U(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},"loop"),n=0;n<e.length;n++)t(n)}Ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();zn(this,"clear")}},Ca.prototype.find=function(e,t){return this.primary.find(e,t)},Me(Ca),r(_a,"markTextShared"),r(Sa,"findSharedMarkers"),r(La,"copySharedMarkers"),r(Ma,"detachSharedMarkers");var Ta=0,Fa=r(function(e,t,n,r,i){if(!(this instanceof Fa))return new Fa(e,t,n,r,i);null==n&&(n=0),ga.call(this,[new ma([new mn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=dt(n,0);this.sel=ho(o),this.history=new To(null),this.id=++Ta,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Co(this,{from:o,to:o,text:e}),$o(this,ho(o),X)},"Doc");Fa.prototype=oe(ga.prototype,{constructor:Fa,iter:r(function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},"iter"),insert:r(function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},"insert"),remove:r(function(e,t){this.removeInner(e-this.first,t)},"remove"),getValue:r(function(e){var t=ot(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},"getValue"),setValue:Bi(function(e){var t=dt(this.first,0),n=this.first+this.size-1;ia(this,{from:t,to:dt(n,rt(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&hi(this.cm,0,0),$o(this,ho(t),X)}),replaceRange:r(function(e,t,n,r){ua(this,e,t=yt(this,t),n=n?yt(this,n):t,r)},"replaceRange"),getRange:r(function(e,t,n){var r=it(this,yt(this,e),yt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},"getRange"),getLine:r(function(e){var t=this.getLineHandle(e);return t&&t.text},"getLine"),getLineHandle:r(function(e){if(ct(this,e))return rt(this,e)},"getLineHandle"),getLineNumber:r(function(e){return lt(e)},"getLineNumber"),getLineHandleVisualStart:r(function(e){return"number"==typeof e&&(e=rt(this,e)),on(e)},"getLineHandleVisualStart"),lineCount:r(function(){return this.size},"lineCount"),firstLine:r(function(){return this.first},"firstLine"),lastLine:r(function(){return this.first+this.size-1},"lastLine"),clipPos:r(function(e){return yt(this,e)},"clipPos"),getCursor:r(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()},"getCursor"),listSelections:r(function(){return this.sel.ranges},"listSelections"),somethingSelected:r(function(){return this.sel.somethingSelected()},"somethingSelected"),setCursor:Bi(function(e,t,n){Go(this,yt(this,"number"==typeof e?dt(e,t||0):e),null,n)}),setSelection:Bi(function(e,t,n){Go(this,yt(this,e),yt(this,t||e),n)}),extendSelection:Bi(function(e,t,n){jo(this,yt(this,e),t&&yt(this,t),n)}),extendSelections:Bi(function(e,t){Ro(this,bt(this,e),t)}),extendSelectionsBy:Bi(function(e,t){Ro(this,bt(this,ne(this.sel.ranges,e)),t)}),setSelections:Bi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new po(yt(this,e[i].anchor),yt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$o(this,fo(this.cm,r,t),n)}}),addSelection:Bi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new po(yt(this,e),yt(this,t||e))),$o(this,fo(this.cm,r,r.length-1),n)}),getSelection:r(function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=it(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},"getSelection"),getSelections:r(function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=it(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},"getSelections"),replaceSelection:r(function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},"replaceSelection"),replaceSelections:Bi(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&xo(this,r,t),s=r.length-1;s>=0;s--)ia(this,r[s]);l?Ko(this,l):this.cm&&fi(this.cm)}),undo:Bi(function(){aa(this,"undo")}),redo:Bi(function(){aa(this,"redo")}),undoSelection:Bi(function(){aa(this,"undo",!0)}),redoSelection:Bi(function(){aa(this,"redo",!0)}),setExtending:r(function(e){this.extend=e},"setExtending"),getExtending:r(function(){return this.extend},"getExtending"),historySize:r(function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},"historySize"),clearHistory:r(function(){var e=this;this.history=new To(this.history),_o(this,function(t){return t.history=e.history},!0)},"clearHistory"),markClean:r(function(){this.cleanGeneration=this.changeGeneration(!0)},"markClean"),changeGeneration:r(function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},"changeGeneration"),isClean:r(function(e){return this.history.generation==(e||this.cleanGeneration)},"isClean"),getHistory:r(function(){return{done:Bo(this.history.done),undone:Bo(this.history.undone)}},"getHistory"),setHistory:r(function(e){var t=this.history=new To(this.history);t.done=Bo(e.done.slice(0),null,!0),t.undone=Bo(e.undone.slice(0),null,!0)},"setHistory"),setGutterMarker:Bi(function(e,t,n){return ha(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ce(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Bi(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ha(t,n,"gutter",function(){return n.gutterMarkers[e]=null,ce(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:r(function(e){var t;if("number"==typeof e){if(!ct(this,e))return null;if(t=e,!(e=rt(this,e)))return null}else if(null==(t=lt(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}},"lineInfo"),addLineClass:Bi(function(e,t,n){return ha(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(L(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:Bi(function(e,t,n){return ha(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(L(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Bi(function(e,t,n){return xa(this,e,t,n)}),removeLineWidget:r(function(e){e.clear()},"removeLineWidget"),markText:r(function(e,t,n){return wa(this,yt(this,e),yt(this,t),n,n&&n.type||"range")},"markText"),setBookmark:r(function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return wa(this,e=yt(this,e),e,n,"bookmark")},"setBookmark"),findMarksAt:r(function(e){var t=[],n=rt(this,(e=yt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},"findMarksAt"),findMarks:r(function(e,t,n){e=yt(this,e),t=yt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},"findMarks"),getAllMarks:r(function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},"getAllMarks"),posFromIndex:r(function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),yt(this,dt(n,t))},"posFromIndex"),indexFromPos:r(function(e){var t=(e=yt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},"indexFromPos"),copy:r(function(e){var t=new Fa(ot(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},"copy"),linkedDoc:r(function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Fa(ot(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],La(r,Sa(this)),r},"linkedDoc"),unlinkDoc:r(function(e){if(e instanceof Rl&&(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),Ma(Sa(this));break}if(e.history==this.history){var n=[e.id];_o(e,function(e){return n.push(e.id)},!0),e.history=new To(null),e.history.done=Bo(this.history.done,n),e.history.undone=Bo(this.history.undone,n)}},"unlinkDoc"),iterLinkedDocs:r(function(e){_o(this,e)},"iterLinkedDocs"),getMode:r(function(){return this.mode},"getMode"),getEditor:r(function(){return this.cm},"getEditor"),splitLines:r(function(e){return this.lineSep?e.split(this.lineSep):Be(e)},"splitLines"),lineSeparator:r(function(){return this.lineSep||"\n"},"lineSeparator"),setDirection:Bi(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Mo(this.cm))})}),Fa.prototype.eachLine=Fa.prototype.iter;var Da=0;function Aa(e){var t=this;if(Na(t),!_e(t,e)&&!Qn(t.display,e)){Te(e),l&&(Da=+new Date);var n=Wr(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,a=Array(o),s=0,c=r(function(){++s==o&&Ii(t,function(){var e={from:n=yt(t.doc,n),to:n,text:t.doc.splitLines(a.filter(function(e){return null!=e}).join(t.doc.lineSeparator())),origin:"paste"};ia(t.doc,e),Ko(t.doc,ho(yt(t.doc,n),yt(t.doc,mo(e))))})()},"markAsReadAndPasteIfAllFilesAreRead"),u=r(function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))c();else{var r=new FileReader;r.onerror=function(){return c()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(a[n]=e),c()},r.readAsText(e)}},"readTextFromFile"),d=0;d<i.length;d++)u(i[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var p=e.dataTransfer.getData("Text");if(p){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Xo(t.doc,ho(n,n)),f)for(var h=0;h<f.length;++h)ua(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(m){}}}}function Ea(e,t){if(l&&(!e.state.draggingText||+new Date-Da<100))Ae(t);else if(!_e(e,t)&&!Qn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function Oa(e,t){var n=Wr(e,t);if(n){var r=document.createDocumentFragment();Yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,r)}}function Na(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function za(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}r(Aa,"onDrop"),r(Ea,"onDragStart"),r(Oa,"onDragOver"),r(Na,"clearDragCursor"),r(za,"forEachCodeMirror");var Pa=!1;function Ha(){Pa||(Ia(),Pa=!0)}function Ia(){var e;be(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,za(qa)},100))}),be(window,"blur",function(){return za(ii)})}function qa(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}r(Ha,"ensureGlobalHandlers"),r(Ia,"registerGlobalHandlers"),r(qa,"onResize");for(var Ba={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"},Wa=0;Wa<10;Wa++)Ba[Wa+48]=Ba[Wa+96]=String(Wa);for(var ja=65;ja<=90;ja++)Ba[ja]=String.fromCharCode(ja);for(var Ra=1;Ra<=12;Ra++)Ba[Ra+111]=Ba[Ra+63235]="F"+Ra;var Va={};function Ga(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ua(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=ne(n.split(" "),Ga),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ka(e,t,n,r){var i=(t=Ya(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ka(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ka(e,t.fallthrough[o],n,r);if(a)return a}}}function $a(e){var t="string"==typeof e?e:Ba[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Xa(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(_?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(_?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Qa(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Ba[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Xa(n,e,t))}function Ya(e){return"string"==typeof e?Va[e]:e}function Ja(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&pt(o.from,te(r).to)<=0;){var a=r.pop();if(pt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Hi(e,function(){for(var t=r.length-1;t>=0;t--)ua(e.doc,"",r[t].from,r[t].to,"+delete");fi(e)})}function Za(e,t,n){var r=pe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function el(e,t,n){var r=Za(e,t.ch,n);return null==r?null:new dt(t.line,r,n<0?"after":"before")}function tl(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ye(n,t.doc.direction);if(o){var a,l=i<0?te(o):o[0],s=i<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=sr(t,n);a=i<0?n.text.length-1:0;var u=cr(t,c,a).top;a=fe(function(e){return cr(t,c,e).top==u},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Za(n,a,1))}else a=i<0?l.to:l.from;return new dt(r,a,s)}}return new dt(r,i<0?n.text.length:0,i<0?"before":"after")}function nl(e,t,n,i){var o=ye(t,e.doc.direction);if(!o)return el(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=ge(o,n.ch,n.sticky),l=o[a];if("ltr"==e.doc.direction&&l.level%2==0&&(i>0?l.to>n.ch:l.from<n.ch))return el(t,n,i);var s,c=r(function(e,n){return Za(t,e instanceof dt?e.ch:e,n)},"mv"),u=r(function(n){return e.options.lineWrapping?(s=s||sr(e,t),Dr(e,t,s,n)):{begin:0,end:t.text.length}},"getWrappedLineExtent"),d=u("before"==n.sticky?c(n,-1):n.ch);if("rtl"==e.doc.direction||1==l.level){var p=1==l.level==i<0,f=c(n,p?1:-1);if(null!=f&&(p?f<=l.to&&f<=d.end:f>=l.from&&f>=d.begin)){var h=p?"before":"after";return new dt(n.line,f,h)}}var m=r(function(e,t,i){for(var a=r(function(e,t){return t?new dt(n.line,c(e,1),"before"):new dt(n.line,e,"after")},"getRes");e>=0&&e<o.length;e+=t){var l=o[e],s=t>0==(1!=l.level),u=s?i.begin:c(i.end,-1);if(l.from<=u&&u<l.to)return a(u,s);if(u=s?l.from:c(l.to,-1),i.begin<=u&&u<i.end)return a(u,s)}},"searchInVisualLine"),g=m(a+i,i,d);if(g)return g;var v=i>0?d.end:c(d.begin,-1);return null==v||i>0&&v==t.text.length||!(g=m(i>0?0:o.length-1,i,u(v)))?null:g}Va.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"},Va.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"},Va.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"},Va.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"]},Va.default=b?Va.macDefault:Va.pcDefault,r(Ga,"normalizeKeyName"),r(Ua,"normalizeKeyMap"),r(Ka,"lookupKey"),r($a,"isModifierKey"),r(Xa,"addModifierNames"),r(Qa,"keyName"),r(Ya,"getKeyMap"),r(Ja,"deleteNearSelection"),r(Za,"moveCharLogically"),r(el,"moveLogically"),r(tl,"endOfLine"),r(nl,"moveVisually");var rl={selectAll:na,singleSelection:r(function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),X)},"singleSelection"),killLine:r(function(e){return Ja(e,function(t){if(t.empty()){var n=rt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:dt(t.head.line+1,0)}:{from:t.head,to:dt(t.head.line,n)}}return{from:t.from(),to:t.to()}})},"killLine"),deleteLine:r(function(e){return Ja(e,function(t){return{from:dt(t.from().line,0),to:yt(e.doc,dt(t.to().line+1,0))}})},"deleteLine"),delLineLeft:r(function(e){return Ja(e,function(e){return{from:dt(e.from().line,0),to:e.from()}})},"delLineLeft"),delWrappedLineLeft:r(function(e){return Ja(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},"delWrappedLineLeft"),delWrappedLineRight:r(function(e){return Ja(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},"delWrappedLineRight"),undo:r(function(e){return e.undo()},"undo"),redo:r(function(e){return e.redo()},"redo"),undoSelection:r(function(e){return e.undoSelection()},"undoSelection"),redoSelection:r(function(e){return e.redoSelection()},"redoSelection"),goDocStart:r(function(e){return e.extendSelection(dt(e.firstLine(),0))},"goDocStart"),goDocEnd:r(function(e){return e.extendSelection(dt(e.lastLine()))},"goDocEnd"),goLineStart:r(function(e){return e.extendSelectionsBy(function(t){return il(e,t.head.line)},{origin:"+move",bias:1})},"goLineStart"),goLineStartSmart:r(function(e){return e.extendSelectionsBy(function(t){return al(e,t.head)},{origin:"+move",bias:1})},"goLineStartSmart"),goLineEnd:r(function(e){return e.extendSelectionsBy(function(t){return ol(e,t.head.line)},{origin:"+move",bias:-1})},"goLineEnd"),goLineRight:r(function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Y)},"goLineRight"),goLineLeft:r(function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Y)},"goLineLeft"),goLineLeftSmart:r(function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?al(e,t.head):r},Y)},"goLineLeftSmart"),goLineUp:r(function(e){return e.moveV(-1,"line")},"goLineUp"),goLineDown:r(function(e){return e.moveV(1,"line")},"goLineDown"),goPageUp:r(function(e){return e.moveV(-1,"page")},"goPageUp"),goPageDown:r(function(e){return e.moveV(1,"page")},"goPageDown"),goCharLeft:r(function(e){return e.moveH(-1,"char")},"goCharLeft"),goCharRight:r(function(e){return e.moveH(1,"char")},"goCharRight"),goColumnLeft:r(function(e){return e.moveH(-1,"column")},"goColumnLeft"),goColumnRight:r(function(e){return e.moveH(1,"column")},"goColumnRight"),goWordLeft:r(function(e){return e.moveH(-1,"word")},"goWordLeft"),goGroupRight:r(function(e){return e.moveH(1,"group")},"goGroupRight"),goGroupLeft:r(function(e){return e.moveH(-1,"group")},"goGroupLeft"),goWordRight:r(function(e){return e.moveH(1,"word")},"goWordRight"),delCharBefore:r(function(e){return e.deleteH(-1,"codepoint")},"delCharBefore"),delCharAfter:r(function(e){return e.deleteH(1,"char")},"delCharAfter"),delWordBefore:r(function(e){return e.deleteH(-1,"word")},"delWordBefore"),delWordAfter:r(function(e){return e.deleteH(1,"word")},"delWordAfter"),delGroupBefore:r(function(e){return e.deleteH(-1,"group")},"delGroupBefore"),delGroupAfter:r(function(e){return e.deleteH(1,"group")},"delGroupAfter"),indentAuto:r(function(e){return e.indentSelection("smart")},"indentAuto"),indentMore:r(function(e){return e.indentSelection("add")},"indentMore"),indentLess:r(function(e){return e.indentSelection("subtract")},"indentLess"),insertTab:r(function(e){return e.replaceSelection("\t")},"insertTab"),insertSoftTab:r(function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=V(e.getLine(o.line),o.ch,r);t.push(ee(r-a%r))}e.replaceSelections(t)},"insertSoftTab"),defaultTab:r(function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},"defaultTab"),transposeChars:r(function(e){return Hi(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=rt(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new dt(i.line,i.ch-1)),i.ch>0)i=new dt(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),dt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=rt(e.doc,i.line-1).text;a&&(i=new dt(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),dt(i.line-1,a.length-1),i,"+transpose"))}n.push(new po(i,i))}e.setSelections(n)})},"transposeChars"),newlineAndIndent:r(function(e){return Hi(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);fi(e)})},"newlineAndIndent"),openLine:r(function(e){return e.replaceSelection("\n","start")},"openLine"),toggleOverwrite:r(function(e){return e.toggleOverwrite()},"toggleOverwrite")};function il(e,t){var n=rt(e.doc,t),r=on(n);return r!=n&&(t=lt(r)),tl(!0,e,r,t,1)}function ol(e,t){var n=rt(e.doc,t),r=an(n);return r!=n&&(t=lt(r)),tl(!0,e,n,t,-1)}function al(e,t){var n=il(e,t.line),r=rt(e.doc,n.line),i=ye(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return dt(n.line,a?0:o,n.sticky)}return n}function ll(e,t,n){if("string"==typeof t&&!(t=rl[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=$}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sl(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ka(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ka(t,e.options.extraKeys,n,e)||Ka(t,e.options.keyMap,n,e)}r(il,"lineStart"),r(ol,"lineEnd"),r(al,"lineStartSmart"),r(ll,"doHandleBinding"),r(sl,"lookupKeyForEditor");var cl=new G;function ul(e,t,n,r){var i=e.state.keySeq;if(i){if($a(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:cl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),dl(e,i+" "+t,n,r))return!0}return dl(e,t,n,r)}function dl(e,t,n,r){var i=sl(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&zn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Te(n),ei(e)),!!i}function pl(e,t){var n=Qa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ul(e,"Shift-"+n,t,function(t){return ll(e,t,!0)})||ul(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ll(e,t)}):ul(e,n,t,function(t){return ll(e,t)}))}function fl(e,t,n){return ul(e,"'"+n+"'",t,function(t){return ll(e,t,!0)})}r(ul,"dispatchKey"),r(dl,"dispatchKeyInner"),r(pl,"handleKeyBinding"),r(fl,"handleCharBinding");var hl=null;function ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=N(q(t)),_e(t,e)))){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=pl(t,e);f&&(hl=i?r:null,i||88!=r||je||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||gl(t)}}function gl(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),we(document,"keyup",n),we(document,"mouseover",n))}z(t,"CodeMirror-crosshair"),r(n,"up"),be(document,"keyup",n),be(document,"mouseover",n)}function vl(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function yl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Qn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==hl)return hl=null,void Te(e);if(!f||e.which&&!(e.which<10)||!pl(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(fl(t,e,i)||t.display.input.onKeyPress(e))}}}r(ml,"onKeyDown"),r(gl,"showCrossHair"),r(vl,"onKeyUp"),r(yl,"onKeyPress");var xl,bl,kl=400,wl=r(function(e,t,n){this.time=e,this.pos=t,this.button=n},"PastClick");function Cl(e,t){var n=+new Date;return bl&&bl.compare(n,e,t)?(xl=bl=null,"triple"):xl&&xl.compare(n,e,t)?(bl=new wl(n,e,t),xl=null,"double"):(xl=new wl(n,e,t),bl=null,"single")}function _l(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Qn(n,e))c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!Ol(t,e)){var r=Wr(t,e),i=Oe(e),o=r?Cl(r,i):"single";W(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&Sl(t,i,r,o,e)||(1==i?r?Ml(t,r,o,e):Ee(e)==n.scroller&&Te(e):2==i?(r&&jo(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(S?t.display.input.onContextMenu(e):ni(t)))}}function Sl(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ul(e,Xa(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=rl[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=$}finally{e.state.suppressEdits=!1}return r})}function Ll(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=k?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}function Ml(e,t,n,r){l?setTimeout(j(ti,e),0):e.curOp.focus=N(q(e));var i,o=Ll(e,n,r),a=e.doc.sel;e.options.dragDrop&&Pe&&!e.isReadOnly()&&"single"==n&&(i=a.contains(t))>-1&&(pt((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(pt(i.to(),t)>0||t.xRel<0)?Tl(e,r,t,o):Dl(e,r,t,o)}function Tl(e,t,n,i){var o=e.display,a=!1,u=Ii(e,function(t){c&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ni(e)),we(o.wrapper.ownerDocument,"mouseup",u),we(o.wrapper.ownerDocument,"mousemove",d),we(o.scroller,"dragstart",p),we(o.scroller,"drop",u),a||(Te(t),i.addNew||jo(e.doc,n,null,null,i.extend),c&&!h||l&&9==s?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),d=r(function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},"mouseMove"),p=r(function(){return a=!0},"dragStart");c&&(o.scroller.draggable=!0),e.state.draggingText=u,u.copy=!i.moveOnDrag,be(o.wrapper.ownerDocument,"mouseup",u),be(o.wrapper.ownerDocument,"mousemove",d),be(o.scroller,"dragstart",p),be(o.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Fl(e,t,n){if("char"==n)return new po(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new po(dt(t.line,0),yt(e.doc,dt(t.line+1,0)));var r=n(e,t);return new po(r.from,r.to)}function Dl(e,t,n,i){l&&ni(e);var o=e.display,a=e.doc;Te(t);var s,c,u=a.sel,d=u.ranges;if(i.addNew&&!i.extend?(c=a.sel.contains(n),s=c>-1?d[c]:new po(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new po(n,n)),n=Wr(e,t,!0,!0),c=-1;else{var p=Fl(e,n,i.unit);s=i.extend?Wo(s,p.anchor,p.head,i.extend):p}i.addNew?-1==c?(c=d.length,$o(a,fo(e,d.concat([s]),c),{scroll:!1,origin:"*mouse"})):d.length>1&&d[c].empty()&&"char"==i.unit&&!i.extend?($o(a,fo(e,d.slice(0,c).concat(d.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Vo(a,c,s,Q):(c=0,$o(a,new uo([s],0),Q),u=a.sel);var f=n;function h(t){if(0!=pt(f,t))if(f=t,"rectangle"==i.unit){for(var r=[],o=e.options.tabSize,l=V(rt(a,n.line).text,n.ch,o),d=V(rt(a,t.line).text,t.ch,o),p=Math.min(l,d),h=Math.max(l,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=rt(a,m).text,y=J(v,p,o);p==h?r.push(new po(dt(m,y),dt(m,y))):v.length>y&&r.push(new po(dt(m,y),dt(m,J(v,h,o))))}r.length||r.push(new po(n,n)),$o(a,fo(e,u.ranges.slice(0,c).concat(r),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=s,k=Fl(e,t,i.unit),w=b.anchor;pt(k.anchor,w)>0?(x=k.head,w=gt(b.from(),k.anchor)):(x=k.anchor,w=mt(b.to(),k.head));var C=u.ranges.slice(0);C[c]=Al(e,new po(yt(a,w),x)),$o(a,fo(e,C,c),Q)}}r(h,"extendTo");var m=o.wrapper.getBoundingClientRect(),g=0;function v(t){var n=++g,r=Wr(e,t,!0,"rectangle"==i.unit);if(r)if(0!=pt(r,f)){e.curOp.focus=N(q(e)),h(r);var l=li(o,a);(r.line>=l.to||r.line<l.from)&&setTimeout(Ii(e,function(){g==n&&v(t)}),150)}else{var s=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;s&&setTimeout(Ii(e,function(){g==n&&(o.scroller.scrollTop+=s,v(t))}),50)}}function y(t){e.state.selectingText=!1,g=1/0,t&&(Te(t),o.input.focus()),we(o.wrapper.ownerDocument,"mousemove",x),we(o.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}r(v,"extend"),r(y,"done");var x=Ii(e,function(e){0!==e.buttons&&Oe(e)?v(e):y(e)}),b=Ii(e,y);e.state.selectingText=b,be(o.wrapper.ownerDocument,"mousemove",x),be(o.wrapper.ownerDocument,"mouseup",b)}function Al(e,t){var n=t.anchor,r=t.head,i=rt(e.doc,n.line);if(0==pt(n,r)&&n.sticky==r.sticky)return t;var o=ye(i);if(!o)return t;var a=ge(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ge(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var p=o[c+(s?-1:0)],f=s==(1==p.level),h=f?p.from:p.to,m=f?"after":"before";return n.ch==h&&n.sticky==m?t:new po(new dt(n.line,h,m),r)}function El(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(u){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Te(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Le(e,n))return De(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i)return Ce(e,n,e,st(e.doc,o),e.display.gutterSpecs[s].className,t),De(t)}}function Ol(e,t){return El(e,t,"gutterClick",!0)}function Nl(e,t){Qn(e.display,t)||zl(e,t)||_e(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function zl(e,t){return!!Le(e,"gutterContextMenu")&&El(e,t,"gutterContextMenu",!1)}function Pl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yr(e)}wl.prototype.compare=function(e,t,n){return this.time+kl>e&&0==pt(t,this.pos)&&n==this.button},r(Cl,"clickRepeat"),r(_l,"onMouseDown"),r(Sl,"handleMappedButton"),r(Ll,"configureMouse"),r(Ml,"leftButtonDown"),r(Tl,"leftButtonStartDrag"),r(Fl,"rangeForUnit"),r(Dl,"leftButtonSelect"),r(Al,"bidiSimplify"),r(El,"gutterEvent"),r(Ol,"clickInGutter"),r(Nl,"onContextMenu"),r(zl,"contextMenuInGutter"),r(Pl,"themeChanged");var Hl={toString:r(function(){return"CodeMirror.Init"},"toString")},Il={},ql={};function Bl(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Hl&&i(e,t,n)}:i)}r(n,"option"),e.defineOption=n,e.Init=Hl,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,bo(e)},!0),n("indentUnit",2,bo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){ko(e),yr(e),Rr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=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,n.push(dt(r,o))}r++});for(var i=n.length-1;i>=0;i--)ua(e.doc,t,n[i],dt(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Hl&&e.refresh()}),n("specialCharPlaceholder",wn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",x?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Pl(e),ro(e)},!0),n("keyMap","default",function(e,t,n){var r=Ya(t),i=n!=Hl&&Ya(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,jl,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=to(t,e.options.lineNumbers),ro(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return _i(e)},!0),n("scrollbarStyle","native",function(e){Mi(e),_i(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=to(e.options.gutters,t),ro(e)},!0),n("firstLineNumber",1,ro,!0),n("lineNumberFormatter",function(e){return e},ro,!0),n("showCursorWhenSelecting",!1,Xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(ii(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Wl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xr,!0),n("singleCursorHeightPerLine",!0,Xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ko,!0),n("addModeClass",!1,ko,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,ko,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Wl(e,t,n){if(!t!=!(n&&n!=Hl)){var r=e.display.dragFunctions,i=t?be:we;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function jl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),hn(e)),Br(e),Rr(e),yr(e),setTimeout(function(){return _i(e)},100)}function Rl(e,t){var n=this;if(!(this instanceof Rl))return new Rl(e,t);this.options=t=t?R(t):{},R(Il,t,!1);var r=t.value;"string"==typeof r?r=new Fa(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Rl.inputStyles[t.inputStyle](this),o=this.display=new io(e,r,i,t);for(var a in o.wrapper.CodeMirror=this,Pl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(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 G,keySeq:null,specialChars:null},t.autofocus&&!x&&o.input.focus(),l&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vl(this),Ha(),Fi(this),this.curOp.forceUpdate=!0,So(this,r),t.autofocus&&!x||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ri(n)},20):ii(this),ql)ql.hasOwnProperty(a)&&ql[a](this,t[a],Hl);eo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Gl.length;++u)Gl[u](this);Di(this),c&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Vl(e){var t=e.display;be(t.scroller,"mousedown",Ii(e,_l)),be(t.scroller,"dblclick",l&&s<11?Ii(e,function(t){if(!_e(e,t)){var n=Wr(e,t);if(n&&!Ol(e,t)&&!Qn(e.display,t)){Te(t);var r=e.findWordAt(n);jo(e.doc,r.anchor,r.head)}}}):function(t){return _e(e,t)||Te(t)}),be(t.scroller,"contextmenu",function(t){return Nl(e,t)}),be(t.input.getField(),"contextmenu",function(n){t.scroller.contains(n.target)||Nl(e,n)});var n,i={end:0};function o(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(i=t.activeTouch).end=+new Date)}function a(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}r(o,"finishTouch"),r(a,"isMouseLikeTouchEvent"),r(c,"farAway"),be(t.scroller,"touchstart",function(r){if(!_e(e,r)&&!a(r)&&!Ol(e,r)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-i.end<=300?i:null},1==r.touches.length&&(t.activeTouch.left=r.touches[0].pageX,t.activeTouch.top=r.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Qn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!r.prev||c(r,r.prev)?new po(a,a):!r.prev.prev||c(r,r.prev.prev)?e.findWordAt(a):new po(dt(a.line,0),yt(e.doc,dt(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),Te(n)}o()}),be(t.scroller,"touchcancel",o),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))}),be(t.scroller,"mousewheel",function(t){return co(e,t)}),be(t.scroller,"DOMMouseScroll",function(t){return co(e,t)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:r(function(t){_e(e,t)||Ae(t)},"enter"),over:r(function(t){_e(e,t)||(Oa(e,t),Ae(t))},"over"),start:r(function(t){return Ea(e,t)},"start"),drop:Ii(e,Aa),leave:r(function(t){_e(e,t)||Na(e)},"leave")};var u=t.input.getField();be(u,"keyup",function(t){return vl.call(e,t)}),be(u,"keydown",Ii(e,ml)),be(u,"keypress",Ii(e,yl)),be(u,"focus",function(t){return ri(e,t)}),be(u,"blur",function(t){return ii(e,t)})}r(Bl,"defineOptions"),r(Wl,"dragDropChanged"),r(jl,"wrappingChanged"),r(Rl,"CodeMirror"),Rl.defaults=Il,Rl.optionHandlers=ql,r(Vl,"registerEventHandlers");var Gl=[];function Ul(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=St(e,t).state:n="prev");var a=e.options.tabSize,l=rt(o,t),s=V(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==$||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?V(rt(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)p+=a,d+="\t";if(p<c&&(d+=ee(c-p)),d!=u)return ua(o,d,dt(t,0),dt(t,u.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var m=o.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=dt(t,u.length);Vo(o,h,new po(g,g));break}}}Rl.defineInitHook=function(e){return Gl.push(e)},r(Ul,"indentLine");var Kl=null;function $l(e){Kl=e}function Xl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=Be(t),c=null;if(l&&r.ranges.length>1)if(Kl&&Kl.text.join("\n")==t){if(r.ranges.length%Kl.text.length==0){c=[];for(var u=0;u<Kl.text.length;u++)c.push(o.splitLines(Kl.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=ne(s,function(e){return[e]}));for(var d=e.curOp.updateInput,p=r.ranges.length-1;p>=0;p--){var f=r.ranges[p],h=f.from(),m=f.to();f.empty()&&(n&&n>0?h=dt(h.line,h.ch-n):e.state.overwrite&&!l?m=dt(m.line,Math.min(rt(o,m.line).text.length,m.ch+te(s).length)):l&&Kl&&Kl.lineWise&&Kl.text.join("\n")==s.join("\n")&&(h=m=dt(h.line,0)));var g={from:h,to:m,text:c?c[p%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ia(e.doc,g),zn(e,"inputRead",e,g)}t&&!l&&Yl(e,t),fi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ql(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Hi(t,function(){return Xl(t,n,0,null,"paste")}),!0}function Yl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Ul(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(rt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ul(e,i.head.line,"smart"));a&&zn(e,"electricInput",e,i.head.line)}}}function Jl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:dt(i,0),head:dt(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Zl(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function es(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return c?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),t}function ts(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:r(function(){W(this).focus(),this.display.input.focus()},"focus"),setOption:r(function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),Ce(this,"optionChange",this,e))},"setOption"),getOption:r(function(e){return this.options[e]},"getOption"),getDoc:r(function(){return this.doc},"getDoc"),addKeyMap:r(function(e,t){this.state.keyMaps[t?"push":"unshift"](Ya(e))},"addKeyMap"),removeKeyMap:r(function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},"removeKeyMap"),addOverlay:qi(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");re(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Rr(this)}),removeOverlay:qi(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Rr(this)}}),indentLine:qi(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ct(this.doc,e)&&Ul(this,e,t,n)}),indentSelection:qi(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ul(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&fi(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Ul(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Vo(this.doc,r,new po(o,c[r].to()),X)}}}),getTokenAt:r(function(e,t){return Dt(this,e,t)},"getTokenAt"),getLineTokens:r(function(e,t){return Dt(this,dt(e),t,!0)},"getLineTokens"),getTokenTypeAt:r(function(e){e=yt(this.doc,e);var t,n=_t(this,rt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},"getTokenTypeAt"),getModeAt:r(function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},"getModeAt"),getHelper:r(function(e,t){return this.getHelpers(e,t)[0]},"getHelper"),getHelpers:r(function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&r.push(l)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},"getHelpers"),getStateAfter:r(function(e,t){var n=this.doc;return St(this,(e=vt(n,null==e?n.first+n.size-1:e))+1,t).state},"getStateAfter"),cursorCoords:r(function(e,t){var n=this.doc.sel.primary();return Sr(this,null==e?n.head:"object"==typeof e?yt(this.doc,e):e?n.from():n.to(),t||"page")},"cursorCoords"),charCoords:r(function(e,t){return _r(this,yt(this.doc,e),t||"page")},"charCoords"),coordsChar:r(function(e,t){return Tr(this,(e=Cr(this,e,t||"page")).left,e.top)},"coordsChar"),lineAtHeight:r(function(e,t){return e=Cr(this,{top:e,left:0},t||"page").top,st(this.doc,e+this.display.viewOffset)},"lineAtHeight"),heightAtLine:r(function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=rt(this.doc,e)}else r=e;return wr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-pn(r):0)},"heightAtLine"),defaultTextHeight:r(function(){return zr(this.display)},"defaultTextHeight"),defaultCharWidth:r(function(){return Pr(this.display)},"defaultCharWidth"),getViewport:r(function(){return{from:this.display.viewFrom,to:this.display.viewTo}},"getViewport"),addWidget:r(function(e,t,n,r,i){var o=this.display,a=(e=Sr(this,yt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&ui(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},"addWidget"),triggerOnKeyDown:qi(ml),triggerOnKeyPress:qi(yl),triggerOnKeyUp:vl,triggerOnMouseDown:qi(_l),execCommand:r(function(e){if(rl.hasOwnProperty(e))return rl[e].call(null,this)},"execCommand"),triggerElectric:qi(function(e){Yl(this,e)}),findPosH:r(function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=yt(this.doc,e),a=0;a<t&&!(o=ns(this.doc,o,i,n,r)).hitSide;++a);return o},"findPosH"),moveH:qi(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?ns(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},Y)}),deleteH:qi(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ja(this,function(n){var i=ns(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:r(function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=yt(this.doc,e),l=0;l<t;++l){var s=Sr(this,a,"div");if(null==o?o=s.left:s.left=o,(a=rs(this,s,i,n)).hitSide)break}return a},"findPosV"),moveV:qi(function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=Sr(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=rs(n,l,e,t);return"page"==t&&a==r.sel.primary()&&pi(n,_r(n,s,"div").top-l.top),s},Y),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]}),findWordAt:r(function(e){var t=rt(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=se(o,i)?function(e){return se(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!se(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new po(dt(e.line,n),dt(e.line,r))},"findWordAt"),toggleOverwrite:r(function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),Ce(this,"overwriteToggle",this,this.state.overwrite))},"toggleOverwrite"),hasFocus:r(function(){return this.display.input.getField()==N(q(this))},"hasFocus"),isReadOnly:r(function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},"isReadOnly"),scrollTo:qi(function(e,t){hi(this,e,t)}),getScrollInfo:r(function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-er(this)-this.display.barHeight,width:e.scrollWidth-er(this)-this.display.barWidth,clientHeight:nr(this),clientWidth:tr(this)}},"getScrollInfo"),scrollIntoView:qi(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:dt(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?mi(this,e):vi(this,e.from,e.to,e.margin)}),setSize:qi(function(e,t){var n=this,i=r(function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e},"interpret");null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&vr(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Vr(n,o,"widget");break}++o}),this.curOp.forceUpdate=!0,Ce(this,"refresh",this)}),operation:r(function(e){return Hi(this,e)},"operation"),startOperation:r(function(){return Fi(this)},"startOperation"),endOperation:r(function(){return Di(this)},"endOperation"),refresh:qi(function(){var e=this.display.cachedTextHeight;Rr(this),this.curOp.forceUpdate=!0,yr(this),hi(this,this.doc.scrollLeft,this.doc.scrollTop),Yi(this.display),(null==e||Math.abs(e-zr(this.display))>.5||this.options.lineWrapping)&&Br(this),Ce(this,"refresh",this)}),swapDoc:qi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),yr(this),this.display.input.reset(),hi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,zn(this,"swapDoc",this,t),t}),phrase:r(function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},"phrase"),getInputField:r(function(){return this.display.input.getField()},"getInputField"),getWrapperElement:r(function(){return this.display.wrapper},"getWrapperElement"),getScrollerElement:r(function(){return this.display.scroller},"getScrollerElement"),getGutterElement:r(function(){return this.display.gutters},"getGutterElement")},Me(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function ns(e,t,n,i,o){var a=t,l=n,s=rt(e,t.line),c=o&&"rtl"==e.direction?-n:n;function u(){var n=t.line+c;return!(n<e.first||n>=e.first+e.size)&&(t=new dt(n,t.ch,t.sticky),s=rt(e,n))}function d(r){var a;if("codepoint"==i){var l=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(l))a=null;else{var d=n>0?l>=55296&&l<56320:l>=56320&&l<57343;a=new dt(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?nl(e.cm,s,t,n):el(s,t,n);if(null==a){if(r||!u())return!1;t=tl(o,e.cm,s,t.line,c)}else t=a;return!0}if(r(u,"findNextLine"),r(d,"moveOnce"),"char"==i||"codepoint"==i)d();else if("column"==i)d(!0);else if("word"==i||"group"==i)for(var p=null,f="group"==i,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(n<0)||d(!m);m=!1){var g=s.text.charAt(t.ch)||"\n",v=se(g,h)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||m||v||(v="s"),p&&p!=v){n<0&&(n=1,d(),t.sticky="after");break}if(v&&(p=v),n>0&&!d(!m))break}var y=ea(e,t,a,l,!0);return ft(a,y)&&(y.hitSide=!0),y}function rs(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,W(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(s-.5*zr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Tr(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}r($l,"setLastCopied"),r(Xl,"applyTextInput"),r(Ql,"handlePaste"),r(Yl,"triggerElectric"),r(Jl,"copyableRanges"),r(Zl,"disableBrowserMagic"),r(es,"hiddenTextarea"),r(ts,"addEditorMethods"),r(ns,"findPosH"),r(rs,"findPosV");var is=r(function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new G,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");function os(e,t){var n=lr(e,t.line);if(!n||n.hidden)return null;var r=rt(e.doc,t.line),i=ir(n,r,t.line),o=ye(r,e.doc.direction),a="left";o&&(a=ge(o,t.ch)%2?"right":"left");var l=pr(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function as(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ls(e,t){return t&&(e.bad=!0),e}function ss(e,t,n,i,o){var a="",l=!1,s=e.doc.lineSeparator(),c=!1;function u(e){return function(t){return t.id==e}}function d(){l&&(a+=s,c&&(a+=s),l=c=!1)}function p(e){e&&(d(),a+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void p(n);var r,a=t.getAttribute("cm-marker");if(a){var h=e.findMarks(dt(i,0),dt(o+1,0),u(+a));return void(h.length&&(r=h[0].find(0))&&p(it(e.doc,r.from,r.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&d();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),m&&(l=!0)}else 3==t.nodeType&&p(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(r(u,"recognizeMarker"),r(d,"close"),r(p,"addText"),r(f,"walk");f(t),t!=n;)t=t.nextSibling,c=!1;return a}function cs(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return ls(e.clipPos(dt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return us(o,t,n)}}function us(e,t,n){var i=e.text.firstChild,o=!1;if(!t||!O(i,t))return ls(dt(lt(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?te(e.rest):e.line;return ls(dt(lt(a),a.text.length),o)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=e.measure,u=c.maps;function d(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?c.map:u[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var s=lt(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||l!=t)&&(d=o[a+(r?1:0)]),dt(s,d)}}}r(d,"find");var p=d(l,s,n);if(p)return ls(p,o);for(var f=s.nextSibling,h=l?l.nodeValue.length-n:0;f;f=f.nextSibling){if(p=d(f,f.firstChild,0))return ls(dt(p.line,p.ch-h),o);h+=f.textContent.length}for(var m=s.previousSibling,g=n;m;m=m.previousSibling){if(p=d(m,m.firstChild,-1))return ls(dt(p.line,p.ch+g),o);g+=m.textContent.length}}is.prototype.init=function(e){var t=this,n=this,i=n.cm,o=n.div=e.lineDiv;function a(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(a(e)&&!_e(i,e)){if(i.somethingSelected())$l({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Jl(i);$l({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,X),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Kl.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=es(),s=l.firstChild;Zl(s),i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Kl.text.join("\n");var c=N(B(o));H(s),setTimeout(function(){i.display.lineSpace.removeChild(l),c.focus(),c==o&&n.showPrimarySelection()},50)}}o.contentEditable=!0,Zl(o,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),r(a,"belongsToInput"),be(o,"paste",function(e){!a(e)||_e(i,e)||Ql(e,i)||s<=11&&setTimeout(Ii(i,function(){return t.updateFromDOM()}),20)}),be(o,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),be(o,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),be(o,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),be(o,"touchstart",function(){return n.forceCompositionEnd()}),be(o,"input",function(){t.composing||t.readFromDOMSoon()}),r(l,"onCopyCut"),be(o,"copy",l),be(o,"cut",l)},is.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var e=Qr(this.cm,!1);return e.focus=N(B(this.div))==this.div,e},is.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},is.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},is.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=cs(t,e.anchorNode,e.anchorOffset),l=cs(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=pt(gt(a,l),i)||0!=pt(mt(a,l),o)){var s=t.display.view,c=i.line>=t.display.viewFrom&&os(t,i)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&os(t,o);if(!u){var d=s[s.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var f,h=e.rangeCount&&e.getRangeAt(0);try{f=M(c.node,c.offset,u.offset,u.node)}catch(qe){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},is.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)},is.prototype.showMultipleSelections=function(e){D(this.cm.display.cursorDiv,e.cursors),D(this.cm.display.selectionDiv,e.selection)},is.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},is.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return O(this.div,t)},is.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&N(B(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},is.prototype.blur=function(){this.div.blur()},is.prototype.getField=function(){return this.div},is.prototype.supportsTouch=function(){return!0},is.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Hi(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),r(n,"poll"),this.polling.set(this.cm.options.pollInterval,n)},is.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},is.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(y&&d&&this.cm.display.gutterSpecs.length&&as(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=cs(t,e.anchorNode,e.anchorOffset),r=cs(t,e.focusNode,e.focusOffset);n&&r&&Hi(t,function(){$o(t.doc,ho(n,r),X),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},is.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=dt(a.line-1,rt(r.doc,a.line-1).length)),l.ch==rt(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=dt(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=jr(r,a.line))?(t=lt(i.view[0].line),n=i.view[0].node):(t=lt(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,c,u=jr(r,l.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=lt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(ss(r,n,c,t,s)),p=it(r.doc,dt(t,0),dt(s,rt(r.doc,s).text.length));d.length>1&&p.length>1;)if(te(d)==te(p))d.pop(),p.pop(),s--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),t++}for(var f=0,h=0,m=d[0],g=p[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=te(d),x=te(p),b=Math.min(y.length-(1==d.length?f:0),x.length-(1==p.length?f:0));h<b&&y.charCodeAt(y.length-h-1)==x.charCodeAt(x.length-h-1);)++h;if(1==d.length&&1==p.length&&t==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-h-1)==x.charCodeAt(x.length-h-1);)f--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var k=dt(t,f),w=dt(s,p.length?te(p).length-h:0);return d.length>1||d[0]||pt(k,w)?(ua(r.doc,d,k,w,"+input"),!0):void 0},is.prototype.ensurePolled=function(){this.forceCompositionEnd()},is.prototype.reset=function(){this.forceCompositionEnd()},is.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},is.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))},is.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Hi(this.cm,function(){return Rr(e.cm)})},is.prototype.setUneditable=function(e){e.contentEditable="false"},is.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Xl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},is.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},is.prototype.onContextMenu=function(){},is.prototype.resetPosition=function(){},is.prototype.needsContentAttribute=!0,r(os,"posToDOM"),r(as,"isInGutter"),r(ls,"badPos"),r(ss,"domTextBetween"),r(cs,"domToPos"),r(us,"locateNodeInLineView");var ds=r(function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new G,this.hasSelection=!1,this.composing=null,this.resetting=!1},"TextareaInput");function ps(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N(B(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=s.getValue()}var o;if(r(i,"save"),e.form&&(be(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var l=a.submit=function(){i(),a.submit=o,a.submit(),a.submit=l}}catch(qe){}}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&&(we(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Rl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function fs(e){e.off=we,e.on=be,e.wheelEventPixels=so,e.Doc=Fa,e.splitLines=Be,e.countColumn=V,e.findColumn=J,e.isWordChar=le,e.Pass=$,e.signal=Ce,e.Line=mn,e.changeEnd=mo,e.scrollbarModel=Li,e.Pos=dt,e.cmpPos=pt,e.modes=Ge,e.mimeModes=Ue,e.resolveMode=Xe,e.getMode=Qe,e.modeExtensions=Ye,e.extendMode=Je,e.copyState=Ze,e.startState=tt,e.innerMode=et,e.commands=rl,e.keyMap=Va,e.keyName=Qa,e.isModifierKey=$a,e.lookupKey=Ka,e.normalizeKeyMap=Ua,e.StringStream=nt,e.SharedTextMarker=Ca,e.TextMarker=ka,e.LineWidget=va,e.e_preventDefault=Te,e.e_stopPropagation=Fe,e.e_stop=Ae,e.addClass=z,e.contains=O,e.rmClass=T,e.keyNames=Ba}ds.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var o=this.textarea;function a(e){if(!_e(i,e)){if(i.somethingSelected())$l({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Jl(i);$l({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,X):(n.prevInput="",o.value=t.text.join("\n"),H(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),be(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(o,"paste",function(e){_e(i,e)||Ql(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())}),r(a,"prepareCopyCut"),be(o,"cut",a),be(o,"copy",a),be(e.scroller,"paste",function(t){if(!Qn(e,t)&&!_e(i,t)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var r=new Event("paste");r.clipboardData=t.clipboardData,o.dispatchEvent(r)}}),be(e.lineSpace,"selectstart",function(t){Qn(e,t)||Te(t)}),be(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),be(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ds.prototype.createField=function(e){this.wrapper=es(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Zl(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},ds.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ds.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Qr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ds.prototype.showSelection=function(e){var t=this.cm.display;D(t.cursorDiv,e.cursors),D(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ds.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&H(this.textarea),l&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null));this.resetting=!1}},ds.prototype.getField=function(){return this.textarea},ds.prototype.supportsTouch=function(){return!1},ds.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!x||N(B(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(qe){}},ds.prototype.blur=function(){this.textarea.blur()},ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ds.prototype.receivedFocus=function(){this.slowPoll()},ds.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ds.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,r(n,"p"),t.polling.set(20,n)},ds.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||We(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,c=Math.min(r.length,i.length);a<c&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return Hi(t,function(){Xl(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ds.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},ds.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Wr(n,e),u=i.scroller.scrollTop;if(a&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&Ii(n,$o)(n.doc,ho(a),X);var d,p=o.style.cssText,h=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(d=o.ownerDocument.defaultView.scrollY),i.input.focus(),c&&o.ownerDocument.defaultView.scrollTo(null,d),i.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=y,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),r(v,"prepareSelectAllHack"),r(y,"rehide"),l&&s>=9&&v(),S){Ae(e);var g=r(function(){we(window,"mouseup",g),setTimeout(y,20)},"mouseup");be(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=o.selectionStart){var e=n.somethingSelected(),r="​"+(e?o.value:"");o.value="⇚",o.value=r,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=r.length,i.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,o.style.cssText=p,l&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=o.selectionStart)){(!l||l&&s<9)&&v();var e=0,a=r(function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?Ii(n,na)(n):e++<10?i.detectingSelectAll=setTimeout(a,500):(i.selForContextMenu=null,i.input.reset())},"poll");i.detectingSelectAll=setTimeout(a,200)}}},ds.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ds.prototype.setUneditable=function(){},ds.prototype.needsContentAttribute=!1,r(ps,"fromTextArea"),r(fs,"addLegacyProps"),Bl(Rl),ts(Rl);var hs="iter insert remove copy getEditor constructor".split(" ");for(var ms in Fa.prototype)Fa.prototype.hasOwnProperty(ms)&&U(hs,ms)<0&&(Rl.prototype[ms]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fa.prototype[ms]));return Me(Fa),Rl.inputStyles={textarea:ds,contenteditable:is},Rl.defineMode=function(e){Rl.defaults.mode||"null"==e||(Rl.defaults.mode=e),Ke.apply(this,arguments)},Rl.defineMIME=$e,Rl.defineMode("null",function(){return{token:r(function(e){return e.skipToEnd()},"token")}}),Rl.defineMIME("text/plain","null"),Rl.defineExtension=function(e,t){Rl.prototype[e]=t},Rl.defineDocExtension=function(e,t){Fa.prototype[e]=t},Rl.fromTextArea=ps,fs(Rl),Rl.version="5.65.21",Rl}()),s.exports}function u(){return a||(a=1,function(e){function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",function(t,n){var i=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var o,a,l=t.indentUnit,s=n.tokenHooks,c=n.documentTypes||{},u=n.mediaTypes||{},d=n.mediaFeatures||{},p=n.mediaValueKeywords||{},f=n.propertyKeywords||{},h=n.nonStandardPropertyKeywords||{},m=n.fontProperties||{},g=n.counterDescriptors||{},v=n.colorKeywords||{},y=n.valueKeywords||{},x=n.allowNested,b=n.lineComment,k=!0===n.supportsAtComponent,w=!1!==t.highlightNonStandardPropertyKeywords;function C(e,t){return o=t,e}function _(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),C("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?C(null,"compare"):'"'==n||"'"==n?(t.tokenize=S(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),C("atom","hash")):"!"==n?(e.match(/^\s*\w*/),C("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),C("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?C(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?C("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?C(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=L),C("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),C("property","word")):C(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),C("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?C("variable-2","variable-definition"):C("variable-2","variable")):e.match(/^\w+-/)?C("meta","meta"):void 0}function S(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),C("string","string")}}function L(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),C(null,"(")}function M(e,t,n){this.type=e,this.indent=t,this.prev=n}function T(e,t,n,r){return e.context=new M(n,t.indentation()+(!1===r?0:l),e.context),n}function F(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function D(e,t,n){return O[n.context.type](e,t,n)}function A(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return D(e,t,n)}function E(e){var t=e.current().toLowerCase();a=y.hasOwnProperty(t)?"atom":v.hasOwnProperty(t)?"keyword":"variable"}r(C,"ret"),r(_,"tokenBase"),r(S,"tokenString"),r(L,"tokenParenthesized"),r(M,"Context"),r(T,"pushContext"),r(F,"popContext"),r(D,"pass"),r(A,"popAndPass"),r(E,"wordAsValue");var O={top:function(e,t,n){if("{"==e)return T(n,t,"block");if("}"==e&&n.context.prev)return F(n);if(k&&/@component/i.test(e))return T(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return T(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return T(n,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return T(n,t,"interpolation");if(":"==e)return"pseudo";if(x&&"("==e)return T(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(a="property","maybeprop"):h.hasOwnProperty(r)?(a=w?"string-2":"property","maybeprop"):x?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":x||"hash"!=e&&"qualifier"!=e?O.top(e,t,n):(a="error","block")},maybeprop:function(e,t,n){return":"==e?T(n,t,"prop"):D(e,t,n)},prop:function(e,t,n){if(";"==e)return F(n);if("{"==e&&x)return T(n,t,"propBlock");if("}"==e||"{"==e)return A(e,t,n);if("("==e)return T(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)E(t);else if("interpolation"==e)return T(n,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?F(n):"word"==e?(a="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?A(e,t,n):")"==e?F(n):"("==e?T(n,t,"parens"):"interpolation"==e?T(n,t,"interpolation"):("word"==e&&E(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(a="variable-3",n.context.type):D(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&c.hasOwnProperty(t.current())?(a="tag",n.context.type):O.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return T(n,t,"atBlock_parens");if("}"==e||";"==e)return A(e,t,n);if("{"==e)return F(n)&&T(n,t,x?"block":"top");if("interpolation"==e)return T(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();a="only"==r||"not"==r||"and"==r||"or"==r?"keyword":u.hasOwnProperty(r)?"attribute":d.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":h.hasOwnProperty(r)?w?"string-2":"property":y.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?A(e,t,n):"{"==e?F(n)&&T(n,t,x?"block":"top",!1):("word"==e&&(a="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?F(n):"{"==e||"}"==e?A(e,t,n,2):O.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?T(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(a="variable","restricted_atBlock_before"):D(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,F(n)):"word"==e?(a="@font-face"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(a="variable","keyframes"):"{"==e?T(n,t,"top"):D(e,t,n)},at:function(e,t,n){return";"==e?F(n):"{"==e||"}"==e?A(e,t,n):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?F(n):"{"==e||";"==e?A(e,t,n):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:r(function(e){return{tokenize:null,state:i?"block":"top",stateArg:null,context:new M(i?"block":"top",e||0,null)}},"startState"),token:r(function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||_)(e,t);return n&&"object"==typeof n&&(o=n[1],n=n[0]),a=n,"comment"!=o&&(t.state=O[t.state](o,e,t)),a},"token"),indent:r(function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-l)):i=(n=n.prev).indent),i},"indent"),electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}),r(t,"keySet");var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],h=t(f),m=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(v),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(x),k=n.concat(o).concat(l).concat(c).concat(d).concat(f).concat(v).concat(x);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",k),r(w,"tokenCComment"),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":r(function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))},"/")},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":r(function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"/"),":":r(function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},":"),$:r(function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"$"),"#":r(function(e){return!!e.eat("{")&&[null,"interpolation"]},"#")},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:y,valueKeywords:b,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":r(function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"/"),"@":r(function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"@"),"&":r(function(){return["atom","atom"]},"&")},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:m,counterDescriptors:g,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":r(function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))},"/")},name:"css",helperType:"gss"})}(c())),l}r(c,"requireCodemirror"),r(u,"requireCss"),u();var d,p={};function f(){return d||(d=1,(e=c()).defineMode("ecl",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t){return!!t.startOfLine&&(e.skipToEnd(),"meta")}r(t,"words"),r(n,"metaHook");var i,o=e.indentUnit,a=t("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),l=t("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),s=t("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),c=t("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),u=t("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),d=t("catch class do else finally for if switch try while"),p=t("true false null"),f={"#":n},h=/[+\-*&%=<>!?|\/]/;function m(e,t){var n=e.next();if(f[n]){var r=f[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=g(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return i=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if("/"==n){if(e.eat("*"))return t.tokenize=v,v(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(n))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_]/);var o=e.current().toLowerCase();if(a.propertyIsEnumerable(o))return d.propertyIsEnumerable(o)&&(i="newstatement"),"keyword";if(l.propertyIsEnumerable(o))return d.propertyIsEnumerable(o)&&(i="newstatement"),"variable";if(s.propertyIsEnumerable(o))return d.propertyIsEnumerable(o)&&(i="newstatement"),"variable-2";if(c.propertyIsEnumerable(o))return d.propertyIsEnumerable(o)&&(i="newstatement"),"variable-3";if(u.propertyIsEnumerable(o))return d.propertyIsEnumerable(o)&&(i="newstatement"),"builtin";for(var m=o.length-1;m>=0&&(!isNaN(o[m])||"_"==o[m]);)--m;if(m>0){var y=o.substr(0,m+1);if(c.propertyIsEnumerable(y))return d.propertyIsEnumerable(y)&&(i="newstatement"),"variable-3"}return p.propertyIsEnumerable(o)?"atom":null}function g(e){return function(t,n){for(var r,i=!1,o=!1;null!=(r=t.next());){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return!o&&i||(n.tokenize=m),"string"}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return"comment"}function y(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function x(e,t,n){return e.context=new y(e.indented,t,n,null,e.context)}function b(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return r(m,"tokenBase"),r(g,"tokenString"),r(v,"tokenComment"),r(y,"Context"),r(x,"pushContext"),r(b,"popContext"),{startState:r(function(e){return{tokenize:null,context:new y((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},"startState"),token:r(function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;i=null;var r=(t.tokenize||m)(e,t);if("comment"==r||"meta"==r)return r;if(null==n.align&&(n.align=!0),";"!=i&&":"!=i||"statement"!=n.type)if("{"==i)x(t,e.column(),"}");else if("["==i)x(t,e.column(),"]");else if("("==i)x(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=b(t);for("}"==n.type&&(n=b(t));"statement"==n.type;)n=b(t)}else i==n.type?b(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==i)&&x(t,e.column(),"statement");else b(t);return t.startOfLine=!1,r},"token"),indent:r(function(e,t){if(e.tokenize!=m&&null!=e.tokenize)return 0;var n=e.context,r=t&&t.charAt(0);"statement"==n.type&&"}"==r&&(n=n.prev);var i=r==n.type;return"statement"==n.type?n.indented+("{"==r?0:o):n.align?n.column+(i?0:1):n.indented+(i?0:o)},"indent"),electricChars:"{}"}}),e.defineMIME("text/x-ecl","ecl")),p;var e}r(f,"requireEcl"),f();var h,m={},g={},v={};function y(){return h||(h=1,e=c(),t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},e.defineMode("xml",function(i,o){var a,l,s=i.indentUnit,c={},u=o.htmlMode?t:n;for(var d in u)c[d]=u[d];for(var d in o)c[d]=o[d];function p(e,t){function n(n){return t.tokenize=n,n(e,t)}r(n,"chain");var i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(m("atom","]]>")):null:e.match("--")?n(m("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(g(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=m("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==i?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=p,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){t.tokenize=p,t.state=k,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=h(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e){var t=r(function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return"string"},"closure");return t.isInAttribute=!0,t}function m(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=p;break}n.next()}return e}}function g(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=g(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=p;break}return n.tokenize=g(e-1),n.tokenize(t,n)}}return"meta"}}function v(e){return e&&e.toLowerCase()}function y(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(c.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function x(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!c.contextGrabbers.hasOwnProperty(v(n))||!c.contextGrabbers[v(n)].hasOwnProperty(v(t)))return;x(e)}}function k(e,t,n){return"openTag"==e?(n.tagStart=t.column(),w):"closeTag"==e?C:k}function w(e,t,n){return"word"==e?(n.tagName=t.current(),l="tag",L):c.allowMissingTagName&&"endTag"==e?(l="tag bracket",L(e,t,n)):(l="error",w)}function C(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&c.implicitlyClosed.hasOwnProperty(v(n.context.tagName))&&x(n),n.context&&n.context.tagName==r||!1===c.matchClosing?(l="tag",_):(l="tag error",S)}return c.allowMissingTagName&&"endTag"==e?(l="tag bracket",_(e,t,n)):(l="error",S)}function _(e,t,n){return"endTag"!=e?(l="error",_):(x(n),k)}function S(e,t,n){return l="error",_(e,t,n)}function L(e,t,n){if("word"==e)return l="attribute",M;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||c.autoSelfClosers.hasOwnProperty(v(r))?b(n,r):(b(n,r),n.context=new y(n,r,i==n.indented)),k}return l="error",L}function M(e,t,n){return"equals"==e?T:(c.allowMissing||(l="error"),L(e,t,n))}function T(e,t,n){return"string"==e?F:"word"==e&&c.allowUnquoted?(l="string",L):(l="error",L(e,t,n))}function F(e,t,n){return"string"==e?F:L(e,t,n)}return r(p,"inText"),p.isInText=!0,r(f,"inTag"),r(h,"inAttribute"),r(m,"inBlock"),r(g,"doctype"),r(v,"lower"),r(y,"Context"),r(x,"popContext"),r(b,"maybePopContext"),r(k,"baseState"),r(w,"tagNameState"),r(C,"closeTagNameState"),r(_,"closeState"),r(S,"closeStateErr"),r(L,"attrState"),r(M,"attrEqState"),r(T,"attrValueState"),r(F,"attrContinuedState"),{startState:r(function(e){var t={tokenize:p,state:k,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},"startState"),token:r(function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(l=null,t.state=t.state(a||n,e,t),l&&(n="error"==l?n+" error":l)),n},"token"),indent:r(function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=p)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==c.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(c.multilineTagIndentFactor||1);if(c.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!c.implicitlyClosed.hasOwnProperty(v(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=c.contextGrabbers[v(i.tagName)];if(!a||!a.hasOwnProperty(v(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},"indent"),electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml",skipAttribute:r(function(e){e.state==T&&(e.state=L)},"skipAttribute"),xmlCurrentTag:r(function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},"xmlCurrentTag"),xmlCurrentContext:r(function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()},"xmlCurrentContext")}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})),v;var e,t,n}r(y,"requireXml");var x,b,k={};function w(){return x||(x=1,function(e){e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(c())),k}function C(){return b||(b=1,e=c(),y(),w(),e.defineMode("markdown",function(t,n){var i=e.getMode(t,"text/html"),o="null"==i.name;function a(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}r(a,"getMode"),void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var l={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in l)l.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(l[s]=n.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,u=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,d=/^\[(x| )\](?=\s)/i,p=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,y=" ";function x(e,t,n){return t.f=t.inline=n,n(e,t)}function b(e,t,n){return t.f=t.block=n,n(e,t)}function k(e){return!e||!/\S/.test(e.string)}function w(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==_){var n=o;if(!n){var r=e.innerMode(i,t.htmlState);n="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}n&&(t.f=T,t.block=C,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function C(t,r){var i=t.column()===r.indentation,o=k(r.prevLine.stream),s=r.indentedCode,h=r.prevLine.hr,v=!1!==r.list,y=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var b=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,v)){for(r.list=null;b<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=b-r.listStack[r.listStack.length-1])}var w=!(o||h||r.prevLine.header||v&&s||r.prevLine.fencedCodeEnd),C=(!1===r.list||h||o)&&r.indentation<=y&&t.match(c),_=null;if(r.indentationDiff>=4&&(s||r.prevLine.fencedCodeEnd||r.prevLine.header||o))return t.skipToEnd(),r.indentedCode=!0,l.code;if(t.eatSpace())return null;if(i&&r.indentation<=y&&(_=t.match(p))&&_[1].length<=6)return r.quote=0,r.header=_[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,L(r);if(r.indentation<=y&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),L(r);if(!C&&!r.setext&&i&&r.indentation<=y&&(_=t.match(u))){var M=_[1]?"ol":"ul";return r.indentation=b+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(d,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+M]),L(r)}return i&&r.indentation<=y&&(_=t.match(m,!0))?(r.quote=0,r.fencedEndRE=new RegExp(_[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&a(_[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=S,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,L(r)):r.setext||!(w&&v||r.quote||!1!==r.list||r.code||C||g.test(t.string))&&(_=t.lookAhead(1))&&(_=_.match(f))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==_[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,L(r)):C?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,l.hr):"["===t.peek()?x(t,r,O):x(t,r,r.inline)}function _(t,n){var r=i.token(t,n.htmlState);if(!o){var a=e.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=T,n.block=C,n.htmlState=null)}return r}function S(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,a=i+3;return t.fencedEndRE&&t.indentation<=a&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=L(t)),t.localMode=t.localState=null,t.block=C,t.f=T,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?b(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),l.code)}function L(e){var t=[];if(e.formatting){t.push(l.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(l.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(l.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(l.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(l.linkHref,"url"):(e.strong&&t.push(l.strong),e.em&&t.push(l.em),e.strikethrough&&t.push(l.strikethrough),e.emoji&&t.push(l.emoji),e.linkText&&t.push(l.linkText),e.code&&t.push(l.code),e.image&&t.push(l.image),e.imageAltText&&t.push(l.imageAltText,"link"),e.imageMarker&&t.push(l.imageMarker)),e.header&&t.push(l.header,l.header+"-"+e.header),e.quote&&(t.push(l.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(l.quote+"-"+e.quote):t.push(l.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(l.list2):t.push(l.list3):t.push(l.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function M(e,t){if(e.match(h,!0))return L(t)}function T(t,r){var o=r.text(t,r);if(void 0!==o)return o;if(r.list)return r.list=null,L(r);if(r.taskList)return" "===t.match(d,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,L(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),L(r);var a=t.next();if(r.linkTitle){r.linkTitle=!1;var s=a;"("===a&&(s=")");var c="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(c),!0))return l.linkHref}if("`"===a){var u=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var p=t.current().length;if(0!=r.code||r.quote&&1!=p){if(p==r.code){var f=L(r);return r.code=0,f}return r.formatting=u,L(r)}return r.code=p,L(r)}if(r.code)return L(r);if("\\"===a&&(t.next(),n.highlightFormatting)){var h=L(r),m=l.formatting+"-escape";return h?h+" "+m:m}if("!"===a&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),L(r);if("["===a&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),L(r);if("]"===a&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var h=L(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=D,h}if("["===a&&!r.image)return r.linkText&&t.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),L(r);if("]"===a&&r.linkText){n.highlightFormatting&&(r.formatting="link");var h=L(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?D:T,h}if("<"===a&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=F,n.highlightFormatting&&(r.formatting="link"),(h=L(r))?h+=" ":h="",h+l.linkInline;if("<"===a&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=F,n.highlightFormatting&&(r.formatting="link"),(h=L(r))?h+=" ":h="",h+l.linkEmail;if(n.xml&&"<"===a&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var g=t.string.indexOf(">",t.pos);if(-1!=g){var y=t.string.substring(t.start,g);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(i),b(t,r,_)}if(n.xml&&"<"===a&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===a||"_"===a){for(var x=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);x<3&&t.eat(a);)x++;var w=t.peek()||" ",C=!/\s/.test(w)&&(!v.test(w)||/\s/.test(k)||v.test(k)),S=!/\s/.test(k)&&(!v.test(k)||/\s/.test(w)||v.test(w)),M=null,A=null;if(x%2&&(r.em||!C||"*"!==a&&S&&!v.test(k)?r.em!=a||!S||"*"!==a&&C&&!v.test(w)||(M=!1):M=!0),x>1&&(r.strong||!C||"*"!==a&&S&&!v.test(k)?r.strong!=a||!S||"*"!==a&&C&&!v.test(w)||(A=!1):A=!0),null!=A||null!=M)return n.highlightFormatting&&(r.formatting=null==M?"strong":null==A?"em":"strong em"),!0===M&&(r.em=a),!0===A&&(r.strong=a),f=L(r),!1===M&&(r.em=!1),!1===A&&(r.strong=!1),f}else if(" "===a&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return L(r);t.backUp(1)}if(n.strikethrough)if("~"===a&&t.eatWhile(a)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),f=L(r),r.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),L(r)}else if(" "===a&&t.match("~~",!0)){if(" "===t.peek())return L(r);t.backUp(2)}if(n.emoji&&":"===a&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var E=L(r);return r.emoji=!1,E}return" "===a&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),L(r)}function F(e,t){if(">"===e.next()){t.f=t.inline=T,n.highlightFormatting&&(t.formatting="link");var r=L(t);return r?r+=" ":r="",r+l.linkInline}return e.match(/^[^>]+/,!0),l.linkInline}function D(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=E("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,L(t)):"error"}r(x,"switchInline"),r(b,"switchBlock"),r(k,"lineIsEmpty"),r(w,"blankLine"),r(C,"blockNormal"),r(_,"htmlBlock"),r(S,"local"),r(L,"getType"),r(M,"handleText"),r(T,"inlineNormal"),r(F,"linkInline"),r(D,"linkHref");var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e){return function(t,r){if(t.next()===e){r.f=r.inline=T,n.highlightFormatting&&(r.formatting="link-string");var i=L(r);return r.linkHref=!1,i}return t.match(A[e]),r.linkHref=!0,L(r)}}function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=N,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,L(t)):x(e,t,T)}function N(e,t){if(e.match("]:",!0)){t.f=t.inline=z,n.highlightFormatting&&(t.formatting="link");var r=L(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),l.linkText}function z(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=T,l.linkHref+" url")}r(E,"getLinkHrefInside"),r(O,"footnoteLink"),r(N,"footnoteLinkInside"),r(z,"footnoteUrl");var P={startState:r(function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:T,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},"startState"),copyState:r(function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(i,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},"copyState"),token:r(function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=_)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,y).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},"token"),innerMode:r(function(e){return e.block==_?{state:e.htmlState,mode:i}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:P}},"innerMode"),indent:r(function(t,n,r){return t.block==_&&i.indent?i.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},"indent"),blankLine:w,getType:L,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return P},"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")),g;var e}r(w,"requireMeta"),r(C,"requireMarkdown");var _,S,L={};function M(){return _||(_=1,(e=c()).overlayMode=function(t,n,i){return{startState:r(function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},"startState"),copyState:r(function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},"copyState"),token:r(function(e,r){return(e!=r.streamSeen||Math.min(r.basePos,r.overlayPos)<e.start)&&(r.streamSeen=e,r.basePos=r.overlayPos=e.start),e.start==r.basePos&&(r.baseCur=t.token(e,r.base),r.basePos=e.pos),e.start==r.overlayPos&&(e.pos=e.start,r.overlayCur=n.token(e,r.overlay),r.overlayPos=e.pos),e.pos=Math.min(r.basePos,r.overlayPos),null==r.overlayCur?r.baseCur:null!=r.baseCur&&r.overlay.combineTokens||i&&null==r.overlay.combineTokens?r.baseCur+" "+r.overlayCur:r.overlayCur},"token"),indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:r(function(e){return{state:e.base,mode:t}},"innerMode"),blankLine:r(function(e){var r,o;return t.blankLine&&(r=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?r:i&&null!=r?r+" "+o:o},"blankLine")}}),L;var e}function T(){return S||(S=1,e=c(),C(),M(),t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i,e.defineMode("gfm",function(n,i){var o=0;function a(e){return e.code=!1,null}r(a,"blankLine");var l={startState:r(function(){return{code:!1,codeBlock:!1,ateSpace:!1}},"startState"),copyState:r(function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},"copyState"),token:r(function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var r=e.pos;e.eatWhile("`");var a=1+e.pos-r;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==i.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},"token"),blankLine:a},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var c in i)s[c]=i[c];return s.name="markdown",e.overlayMode(e.getMode(n,s),l)},"markdown"),e.defineMIME("text/x-gfm","gfm")),m;var e,t}r(M,"requireOverlay"),r(T,"requireGfm"),T();var F,D,A={},E={};function O(){return F||(F=1,(e=c()).defineMode("javascript",function(t,n){var i,o,a=t.indentUnit,l=n.statementIndent,s=n.jsonld,c=n.json||s,u=!1!==n.trackScope,d=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}r(e,"kw");var t=e("keyword a"),n=e("keyword b"),i=e("keyword c"),o=e("keyword d"),a=e("operator"),l={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:i,void:i,throw:i,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:l,false:l,null:l,undefined:l,NaN:l,Infinity:l,this:e("this"),class:e("class"),super:e("atom"),yield:i,export:e("export"),import:e("import"),extends:i,await:i}}(),h=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function v(e,t,n){return i=e,o=n,t}function y(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=x(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):ot(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==n)return t.tokenize=k,k(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==n&&e.eatWhile(p))return v("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?v("."):v("operator","operator",e.current());if(p.test(n)){e.eatWhile(p);var r=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(r)){var i=f[r];return v(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",r)}return v("variable","variable",r)}}function x(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(m))return n.tokenize=y,v("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=y),v("string","string")}}function b(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=y;break}r="*"==n}return v("comment","comment")}function k(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=y;break}r=!r&&"\\"==n}return v("quasi","string-2",e.current())}r(g,"readRegexp"),r(v,"ret"),r(y,"tokenBase"),r(x,"tokenString"),r(b,"tokenComment"),r(k,"tokenQuasi");var w="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(d){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var l=e.string.charAt(a),s=w.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(p.test(l))o=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}r(C,"findFatArrow");var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function L(e,t){if(!u)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function M(e,t,n,r,i){var o=e.cc;for(T.state=e,T.stream=i,T.marked=null,T.cc=o,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():c?U:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return T.marked?T.marked:"variable"==n&&L(e,r)?"variable-2":t}}r(S,"JSLexical"),r(L,"inScope"),r(M,"parseJS");var T={state:null,marked:null,cc:null};function F(){for(var e=arguments.length-1;e>=0;e--)T.cc.push(arguments[e])}function D(){return F.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function E(e){var t=T.state;if(T.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=O(e,t.context);if(null!=r)return void(t.context=r)}else if(!A(e,t.localVars))return void(t.localVars=new P(e,t.localVars));n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new P(e,t.globalVars))}}function O(e,t){if(t){if(t.block){var n=O(e,t.prev);return n?n==t.prev?t:new z(n,t.vars,!0):null}return A(e,t.vars)?t:new z(t.prev,new P(e,t.vars),!1)}return null}function N(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function z(e,t,n){this.prev=e,this.vars=t,this.block=n}function P(e,t){this.name=e,this.next=t}r(F,"pass"),r(D,"cont"),r(A,"inList"),r(E,"register"),r(O,"registerVarScoped"),r(N,"isModifier"),r(z,"Context"),r(P,"Var");var H=new P("this",new P("arguments",null));function I(){T.state.context=new z(T.state.context,T.state.localVars,!1),T.state.localVars=H}function q(){T.state.context=new z(T.state.context,T.state.localVars,!0),T.state.localVars=null}function B(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function W(e,t){var n=r(function(){var n=T.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new S(r,T.stream.column(),e,null,n.lexical,t)},"result");return n.lex=!0,n}function j(){var e=T.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function R(e){function t(n){return n==e?D():";"==e||"}"==n||")"==n||"]"==n?F():D(t)}return r(t,"exp"),t}function V(e,t){return"var"==e?D(W("vardef",t),Fe,R(";"),j):"keyword a"==e?D(W("form"),$,V,j):"keyword b"==e?D(W("form"),V,j):"keyword d"==e?T.stream.match(/^\s*$/,!1)?D():D(W("stat"),Q,R(";"),j):"debugger"==e?D(R(";")):"{"==e?D(W("}"),q,fe,j,B):";"==e?D():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==j&&T.state.cc.pop()(),D(W("form"),$,V,j,ze)):"function"==e?D(qe):"for"==e?D(W("form"),q,Pe,V,B,j):"class"==e||d&&"interface"==t?(T.marked="keyword",D(W("form","class"==e?e:t),Ve,j)):"variable"==e?d&&"declare"==t?(T.marked="keyword",D(V)):d&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?D(nt):"type"==t?D(We,R("operator"),ye,R(";")):D(W("form"),De,R("{"),W("}"),fe,j,j)):d&&"namespace"==t?(T.marked="keyword",D(W("form"),U,V,j)):d&&"abstract"==t?(T.marked="keyword",D(V)):D(W("stat"),ae):"switch"==e?D(W("form"),$,R("{"),W("}","switch"),q,fe,j,j,B):"case"==e?D(U,R(":")):"default"==e?D(R(":")):"catch"==e?D(W("form"),I,G,V,j,B):"export"==e?D(W("stat"),$e,j):"import"==e?D(W("stat"),Qe,j):"async"==e?D(V):"@"==t?D(U,V):F(W("stat"),U,R(";"),j)}function G(e){if("("==e)return D(je,R(")"))}function U(e,t){return X(e,t,!1)}function K(e,t){return X(e,t,!0)}function $(e){return"("!=e?F():D(W(")"),Q,R(")"),j)}function X(e,t,n){if(T.state.fatArrowAt==T.stream.start){var r=n?ne:te;if("("==e)return D(I,W(")"),de(je,")"),j,R("=>"),r,B);if("variable"==e)return F(I,De,R("=>"),r,B)}var i=n?J:Y;return _.hasOwnProperty(e)?D(i):"function"==e?D(qe,i):"class"==e||d&&"interface"==t?(T.marked="keyword",D(W("form"),Re,j)):"keyword c"==e||"async"==e?D(n?K:U):"("==e?D(W(")"),Q,R(")"),j,i):"operator"==e||"spread"==e?D(n?K:U):"["==e?D(W("]"),tt,j,i):"{"==e?pe(se,"}",null,i):"quasi"==e?F(Z,i):"new"==e?D(re(n)):D()}function Q(e){return e.match(/[;\}\)\],]/)?F():F(U)}function Y(e,t){return","==e?D(Q):J(e,t,!1)}function J(e,t,n){var r=0==n?Y:J,i=0==n?U:K;return"=>"==e?D(I,n?ne:te,B):"operator"==e?/\+\+|--/.test(t)||d&&"!"==t?D(r):d&&"<"==t&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?D(W(">"),de(ye,">"),j,r):"?"==t?D(U,R(":"),i):D(i):"quasi"==e?F(Z,r):";"!=e?"("==e?pe(K,")","call",r):"."==e?D(le,r):"["==e?D(W("]"),Q,R("]"),j,r):d&&"as"==t?(T.marked="keyword",D(ye,r)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),D(i)):void 0:void 0}function Z(e,t){return"quasi"!=e?F():"${"!=t.slice(t.length-2)?D(Z):D(Q,ee)}function ee(e){if("}"==e)return T.marked="string-2",T.state.tokenize=k,D(Z)}function te(e){return C(T.stream,T.state),F("{"==e?V:U)}function ne(e){return C(T.stream,T.state),F("{"==e?V:K)}function re(e){return function(t){return"."==t?D(e?oe:ie):"variable"==t&&d?D(Le,e?J:Y):F(e?K:U)}}function ie(e,t){if("target"==t)return T.marked="keyword",D(Y)}function oe(e,t){if("target"==t)return T.marked="keyword",D(J)}function ae(e){return":"==e?D(j,V):F(Y,R(";"),j)}function le(e){if("variable"==e)return T.marked="property",D()}function se(e,t){return"async"==e?(T.marked="property",D(se)):"variable"==e||"keyword"==T.style?(T.marked="property","get"==t||"set"==t?D(ce):(d&&T.state.fatArrowAt==T.stream.start&&(n=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+n[0].length),D(ue))):"number"==e||"string"==e?(T.marked=s?"property":T.style+" property",D(ue)):"jsonld-keyword"==e?D(ue):d&&N(t)?(T.marked="keyword",D(se)):"["==e?D(U,he,R("]"),ue):"spread"==e?D(K,ue):"*"==t?(T.marked="keyword",D(se)):":"==e?F(ue):void 0;var n}function ce(e){return"variable"!=e?F(ue):(T.marked="property",D(qe))}function ue(e){return":"==e?D(K):"("==e?F(qe):void 0}function de(e,t,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var a=T.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),D(function(n,r){return n==t||r==t?F():F(e)},i)}return r==t||o==t?D():n&&n.indexOf(";")>-1?F(e):D(R(t))}return r(i,"proceed"),function(n,r){return n==t||r==t?D():F(e,i)}}function pe(e,t,n){for(var r=3;r<arguments.length;r++)T.cc.push(arguments[r]);return D(W(t,n),de(e,t),j)}function fe(e){return"}"==e?D():F(V,fe)}function he(e,t){if(d){if(":"==e)return D(ye);if("?"==t)return D(he)}}function me(e,t){if(d&&(":"==e||"in"==t))return D(ye)}function ge(e){if(d&&":"==e)return T.stream.match(/^\s*\w+\s+is\b/,!1)?D(U,ve,ye):D(ye)}function ve(e,t){if("is"==t)return T.marked="keyword",D()}function ye(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(T.marked="keyword",D("typeof"==t?K:ye)):"variable"==e||"void"==t?(T.marked="type",D(Se)):"|"==t||"&"==t?D(ye):"string"==e||"number"==e||"atom"==e?D(Se):"["==e?D(W("]"),de(ye,"]",","),j,Se):"{"==e?D(W("}"),be,j,Se):"("==e?D(de(_e,")"),xe,Se):"<"==e?D(de(ye,">"),ye):"quasi"==e?F(we,Se):void 0}function xe(e){if("=>"==e)return D(ye)}function be(e){return e.match(/[\}\)\]]/)?D():","==e||";"==e?D(be):F(ke,be)}function ke(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",D(ke)):"?"==t||"number"==e||"string"==e?D(ke):":"==e?D(ye):"["==e?D(R("variable"),me,R("]"),ke):"("==e?F(Be,ke):e.match(/[;\}\)\],]/)?void 0:D()}function we(e,t){return"quasi"!=e?F():"${"!=t.slice(t.length-2)?D(we):D(ye,Ce)}function Ce(e){if("}"==e)return T.marked="string-2",T.state.tokenize=k,D(we)}function _e(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?D(_e):":"==e?D(ye):"spread"==e?D(_e):F(ye)}function Se(e,t){return"<"==t?D(W(">"),de(ye,">"),j,Se):"|"==t||"."==e||"&"==t?D(ye):"["==e?D(ye,R("]"),Se):"extends"==t||"implements"==t?(T.marked="keyword",D(ye)):"?"==t?D(ye,R(":"),ye):void 0}function Le(e,t){if("<"==t)return D(W(">"),de(ye,">"),j,Se)}function Me(){return F(ye,Te)}function Te(e,t){if("="==t)return D(ye)}function Fe(e,t){return"enum"==t?(T.marked="keyword",D(nt)):F(De,he,Oe,Ne)}function De(e,t){return d&&N(t)?(T.marked="keyword",D(De)):"variable"==e?(E(t),D()):"spread"==e?D(De):"["==e?pe(Ee,"]"):"{"==e?pe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?D(De):"}"==e?F():"["==e?D(U,R("]"),R(":"),Ae):D(R(":"),De,Oe)):(E(t),D(Oe))}function Ee(){return F(De,Oe)}function Oe(e,t){if("="==t)return D(K)}function Ne(e){if(","==e)return D(Fe)}function ze(e,t){if("keyword b"==e&&"else"==t)return D(W("form","else"),V,j)}function Pe(e,t){return"await"==t?D(Pe):"("==e?D(W(")"),He,j):void 0}function He(e){return"var"==e?D(Fe,Ie):"variable"==e?D(Ie):F(Ie)}function Ie(e,t){return")"==e?D():";"==e?D(Ie):"in"==t||"of"==t?(T.marked="keyword",D(U,Ie)):F(U,Ie)}function qe(e,t){return"*"==t?(T.marked="keyword",D(qe)):"variable"==e?(E(t),D(qe)):"("==e?D(I,W(")"),de(je,")"),j,ge,V,B):d&&"<"==t?D(W(">"),de(Me,">"),j,qe):void 0}function Be(e,t){return"*"==t?(T.marked="keyword",D(Be)):"variable"==e?(E(t),D(Be)):"("==e?D(I,W(")"),de(je,")"),j,ge,B):d&&"<"==t?D(W(">"),de(Me,">"),j,Be):void 0}function We(e,t){return"keyword"==e||"variable"==e?(T.marked="type",D(We)):"<"==t?D(W(">"),de(Me,">"),j):void 0}function je(e,t){return"@"==t&&D(U,je),"spread"==e?D(je):d&&N(t)?(T.marked="keyword",D(je)):d&&"this"==e?D(he,Oe):F(De,he,Oe)}function Re(e,t){return"variable"==e?Ve(e,t):Ge(e,t)}function Ve(e,t){if("variable"==e)return E(t),D(Ge)}function Ge(e,t){return"<"==t?D(W(">"),de(Me,">"),j,Ge):"extends"==t||"implements"==t||d&&","==e?("implements"==t&&(T.marked="keyword"),D(d?ye:U,Ge)):"{"==e?D(W("}"),Ue,j):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||d&&N(t))&&T.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",D(Ue)):"variable"==e||"keyword"==T.style?(T.marked="property",D(Ke,Ue)):"number"==e||"string"==e?D(Ke,Ue):"["==e?D(U,he,R("]"),Ke,Ue):"*"==t?(T.marked="keyword",D(Ue)):d&&"("==e?F(Be,Ue):";"==e||","==e?D(Ue):"}"==e?D():"@"==t?D(U,Ue):void 0}function Ke(e,t){if("!"==t)return D(Ke);if("?"==t)return D(Ke);if(":"==e)return D(ye,Oe);if("="==t)return D(K);var n=T.state.lexical.prev;return F(n&&"interface"==n.info?Be:qe)}function $e(e,t){return"*"==t?(T.marked="keyword",D(et,R(";"))):"default"==t?(T.marked="keyword",D(U,R(";"))):"{"==e?D(de(Xe,"}"),et,R(";")):F(V)}function Xe(e,t){return"as"==t?(T.marked="keyword",D(R("variable"))):"variable"==e?F(K,Xe):void 0}function Qe(e){return"string"==e?D():"("==e?F(U):"."==e?F(Y):F(Ye,Je,et)}function Ye(e,t){return"{"==e?pe(Ye,"}"):("variable"==e&&E(t),"*"==t&&(T.marked="keyword"),D(Ze))}function Je(e){if(","==e)return D(Ye,Je)}function Ze(e,t){if("as"==t)return T.marked="keyword",D(Ye)}function et(e,t){if("from"==t)return T.marked="keyword",D(U)}function tt(e){return"]"==e?D():F(de(K,"]"))}function nt(){return F(W("form"),De,R("{"),W("}"),de(rt,"}"),j,j)}function rt(){return F(De,Oe)}function it(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function ot(e,t,n){return t.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return r(I,"pushcontext"),r(q,"pushblockcontext"),I.lex=q.lex=!0,r(B,"popcontext"),B.lex=!0,r(W,"pushlex"),r(j,"poplex"),j.lex=!0,r(R,"expect"),r(V,"statement"),r(G,"maybeCatchBinding"),r(U,"expression"),r(K,"expressionNoComma"),r($,"parenExpr"),r(X,"expressionInner"),r(Q,"maybeexpression"),r(Y,"maybeoperatorComma"),r(J,"maybeoperatorNoComma"),r(Z,"quasi"),r(ee,"continueQuasi"),r(te,"arrowBody"),r(ne,"arrowBodyNoComma"),r(re,"maybeTarget"),r(ie,"target"),r(oe,"targetNoComma"),r(ae,"maybelabel"),r(le,"property"),r(se,"objprop"),r(ce,"getterSetter"),r(ue,"afterprop"),r(de,"commasep"),r(pe,"contCommasep"),r(fe,"block"),r(he,"maybetype"),r(me,"maybetypeOrIn"),r(ge,"mayberettype"),r(ve,"isKW"),r(ye,"typeexpr"),r(xe,"maybeReturnType"),r(be,"typeprops"),r(ke,"typeprop"),r(we,"quasiType"),r(Ce,"continueQuasiType"),r(_e,"typearg"),r(Se,"afterType"),r(Le,"maybeTypeArgs"),r(Me,"typeparam"),r(Te,"maybeTypeDefault"),r(Fe,"vardef"),r(De,"pattern"),r(Ae,"proppattern"),r(Ee,"eltpattern"),r(Oe,"maybeAssign"),r(Ne,"vardefCont"),r(ze,"maybeelse"),r(Pe,"forspec"),r(He,"forspec1"),r(Ie,"forspec2"),r(qe,"functiondef"),r(Be,"functiondecl"),r(We,"typename"),r(je,"funarg"),r(Re,"classExpression"),r(Ve,"className"),r(Ge,"classNameAfter"),r(Ue,"classBody"),r(Ke,"classfield"),r($e,"afterExport"),r(Xe,"exportField"),r(Qe,"afterImport"),r(Ye,"importSpec"),r(Je,"maybeMoreImports"),r(Ze,"maybeAs"),r(et,"maybeFrom"),r(tt,"arrayLiteral"),r(nt,"enumdef"),r(rt,"enummember"),r(it,"isContinuedStatement"),r(ot,"expressionAllowed"),{startState:r(function(e){var t={tokenize:y,lastType:"sof",cc:[],lexical:new S((e||0)-a,0,"block",!1),localVars:n.localVars,context:n.localVars&&new z(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},"startState"),token:r(function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==i?n:(t.lastType="operator"!=i||"++"!=o&&"--"!=o?i:"incdec",M(t,n,i,o,e))},"token"),indent:r(function(t,r){if(t.tokenize==b||t.tokenize==k)return e.Pass;if(t.tokenize!=y)return 0;var i,o=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==j)s=s.prev;else if(u!=ze&&u!=B)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==Y||i==J)&&!/^[,\.=+\-*:?[\(]/.test(r));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+a:"stat"==d?s.indented+(it(t,r)?l||a:0):"switch"!=s.info||p||0==n.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:a):s.indented+(/^(?:case|default)\b/.test(r)?a:2*a)},"indent"),electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",blockCommentContinue:c?null:" * ",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:s,jsonMode:c,expressionAllowed:ot,skipExpression:r(function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))},"skipExpression")}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})),E;var e}function N(){return D||(D=1,function(e){var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}r(n,"maybeBackup");var i={};function o(e){var t=i[e];return t||(i[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function a(e,t){var n=e.match(o(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function l(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(a(t,r[0])))return r[2]}}r(o,"getAttrRegexp"),r(a,"getAttrValue"),r(l,"getTagRegexp"),r(s,"addTags"),r(c,"findMatchingMode"),e.defineMode("htmlmixed",function(i,o){var a=e.getMode(i,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag,allowMissingTagName:o.allowMissingTagName}),u={},d=o&&o.tags,p=o&&o.scriptTypes;if(s(t,u),d&&s(d,u),p)for(var f=p.length-1;f>=0;f--)u.script.unshift(["type",p[f].matches,p[f].mode]);function h(t,r){var o,s=a.token(t,r.htmlState),d=/\btag\b/.test(s);if(d&&!/[<>\s\/]/.test(t.current())&&(o=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(o))r.inTag=o+" ";else if(r.inTag&&d&&/>$/.test(t.current())){var p=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var f=">"==t.current()&&c(u[p[1]],p[2]),m=e.getMode(i,f),g=l(p[1],!0),v=l(p[1],!1);r.token=function(e,t){return e.match(g,!1)?(t.token=h,t.localState=t.localMode=null,null):n(e,v,t.localMode.token(e,t.localState))},r.localMode=m,r.localState=e.startState(m,a.indent(r.htmlState,"",""))}else r.inTag&&(r.inTag+=t.current(),t.eol()&&(r.inTag+=" "));return s}return r(h,"html"),{startState:r(function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},"startState"),copyState:r(function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},"copyState"),token:r(function(e,t){return t.token(e,t)},"token"),indent:r(function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},"indent"),innerMode:r(function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}},"innerMode")}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(c(),y(),O(),u())),A}r(O,"requireJavascript"),r(N,"requireHtmlmixed"),N(),O(),y();var z,P={};function H(){return z||(z=1,function(e){function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function i(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function o(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",function(t,n){var i=n.client||{},o=n.atoms||{false:!0,true:!0,null:!0},c=n.builtin||l(s),u=n.keywords||l(a),d=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,p=n.support||{},f=n.hooks||{},h=n.dateSQL||{date:!0,time:!0,timestamp:!0},m=!1!==n.backslashStringEscapes,g=n.brackets||/^[\{}\(\)\[\]]/,v=n.punctuation||/^[;.,:]/;function y(e,t){var n=e.next();if(f[n]){var r=f[n](e,t);if(!1!==r)return r}if(p.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]*'/)))return"number";if(p.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]*'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),p.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&p.doubleQuote)return t.tokenize=x(n),t.tokenize(e,t);if((p.nCharCast&&("n"==n||"N"==n)||p.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(p.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&p.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=x(e.next(),!0))(e,t)},"keyword";if(p.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(p.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!p.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(d.test(n))return e.eatWhile(d),"operator";if(g.test(n))return"bracket";if(v.test(n))return e.eatWhile(v),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return h.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":o.hasOwnProperty(a)?"atom":c.hasOwnProperty(a)?"type":u.hasOwnProperty(a)?"keyword":i.hasOwnProperty(a)?"builtin":null}return p.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function x(e,t){return function(n,r){for(var i,o=!1;null!=(i=n.next());){if(i==e&&!o){r.tokenize=y;break}o=(m||t)&&!o&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):y:t.skipToEnd(),"comment"}}function k(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function w(e){e.indent=e.context.indent,e.context=e.context.prev}return r(y,"tokenBase"),r(x,"tokenLiteral"),r(b,"tokenComment"),r(k,"pushContext"),r(w,"popContext"),{startState:r(function(){return{tokenize:y,context:null}},"startState"),token:r(function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==y&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?k(e,t,")"):"["==r?k(e,t,"]"):t.context&&t.context.type==r&&w(t),n},"token"),indent:r(function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},"indent"),blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:p.commentSlashSlash?"//":p.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:n}}),r(t,"hookIdentifier"),r(n,"hookIdentifierDoublequote"),r(i,"hookVar"),r(o,"hookClient");var a="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function l(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}r(l,"set");var s="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";e.defineMIME("text/x-sql",{name:"sql",keywords:l(a+"begin"),builtin:l(s),atoms:l("false true null unknown"),dateSQL:l("date time timestamp"),support:l("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:l("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:l(a+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:l("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:l("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:l("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":i}}),e.defineMIME("text/x-mysql",{name:"sql",client:l("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:l(a+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:l("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:l("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:l("date time timestamp"),support:l("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":t,"\\":o}}),e.defineMIME("text/x-mariadb",{name:"sql",client:l("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:l(a+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:l("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:l("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:l("date time timestamp"),support:l("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":t,"\\":o}}),e.defineMIME("text/x-sqlite",{name:"sql",client:l("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:l(a+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:l("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:l("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:l("date time timestamp datetime"),support:l("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":i,":":i,"?":i,$:i,'"':n,"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:l("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:l("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:l("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:l("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:l("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:l("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:l("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:l("date time timestamp"),support:l("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:l("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:l("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:l("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:l("date timestamp"),support:l("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:l("source"),keywords:l(a+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:l("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:l("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,identifierQuote:'"',hooks:{'"':n},dateSQL:l("date time timestamp"),support:l("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:l("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:l("false true"),builtin:l("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:l("source"),keywords:l("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:l("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:l("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:l("date time timestamp"),support:l("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:l("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:l("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:l("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:l("date time timestamp"),support:l("doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:l("source"),keywords:l("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:l("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:l("time"),support:l("decimallessFloat zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-trino",{name:"sql",keywords:l("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:l("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:l("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:l("date time timestamp zone"),support:l("decimallessFloat zerolessFloat hexNumber")})}(c())),P}r(H,"requireSql"),H();var I,q={};function B(){return I||(I=1,(e=c()).defineMode("yaml",function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:r(function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},"token"),startState:r(function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},"startState"),lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")),q;var e}r(B,"requireYaml"),B();const W=i(c());W.defineMode("dot",function(e){const t=/--|->|=|;/,n=/[\[\]{}]/;return{startState:()=>({indent_level:0}),token(e,r){switch(e.eatSpace(),r.looking_for){case"multiline-comment":return e.match(/.*\*\//)?r.looking_for=null:e.skipToEnd(),"comment";case"property":return e.match("=")?"variable-3":(e.match(/\w+/),r.looking_for=null,"string-2");case"graphname":if(r.looking_for=null,e.match(/{\W*$/))return r.indent_level+=1,"bracket";if(e.match("{"))return"bracket";if(e.match(/[^\W]+/))return"variable-2";default:return e.match(/{\W*$/)?(r.indent_level+=1,"bracket"):e.match(/}\W*$/)?(r.indent_level-=1,"bracket"):e.match(n)?"bracket":e.match(/".*"/)?"string":e.match(/\w+=[\"\w]+/,!1)?(r.looking_for="property",e.match(/[^=]+/),"attribute"):e.match(t)?"variable-3":e.match(/(di)?graph[^{\w]+/)?(r.looking_for="graphname","keyword"):e.match(/\/\/|#/)?(e.skipToEnd(),"comment"):e.match(/\/\*.*\*\//)?"comment":e.match("/*")?(r.looking_for="multiline-comment","comment"):(e.match(/\w+/)||e.skipToEnd(),"variable")}},indent:(t,n)=>t.indent_level*(e.indentUnit||2),closeBrackets:{pairs:'[]{}""'},lineComment:/(\/\/|#)/,blockCommentStart:"/*",blockCommentEnd:"*/"}}),W.defineMIME("text/x-dot","dot"),W.defineMode("markdown",function(e,t){var n=W.getMode(e,"text/html"),i="null"==n.name;function o(n){if(n=""===n?t.defaultMode:n,W.findModeByName){var r=W.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=W.getMode(e,n);return"null"==i.name?null:i}void 0===t.defaultMode&&(t.defaultMode=""),r(o,"getMode"),void 0===t.highlightFormatting&&(t.highlightFormatting=!1),void 0===t.maxBlockquoteDepth&&(t.maxBlockquoteDepth=0),void 0===t.taskLists&&(t.taskLists=!1),void 0===t.strikethrough&&(t.strikethrough=!1),void 0===t.emoji&&(t.emoji=!1),void 0===t.fencedCodeBlockHighlighting&&(t.fencedCodeBlockHighlighting=!0),void 0===t.xml&&(t.xml=!0),void 0===t.tokenTypeOverrides&&(t.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in a)a.hasOwnProperty(l)&&t.tokenTypeOverrides[l]&&(a[l]=t.tokenTypeOverrides[l]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=t.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ *(?:\={1,}|-{1,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function v(e,t,n){return t.f=t.inline=n,n(e,t)}function y(e,t,n){return t.f=t.block=n,n(e,t)}function x(e){return!e||!/\S/.test(e.string)}function b(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==w){var t=i;if(!t){var r=W.innerMode(n,e.htmlState);t="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}t&&(e.f=L,e.block=k,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function k(e,n){var r=e.column()===n.indentation,i=x(n.prevLine.stream),l=n.indentedCode,f=n.prevLine.hr,g=!1!==n.list,y=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var b=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,g)){for(n.list=null;b<n.listStack[n.listStack.length-1];)n.listStack.pop(),n.listStack.length?n.indentation=n.listStack[n.listStack.length-1]:n.list=!1;!1!==n.list&&(n.indentationDiff=b-n.listStack[n.listStack.length-1])}var k=!(i||f||n.prevLine.header||g&&l||n.prevLine.fencedCodeEnd),w=(!1===n.list||f||i)&&n.indentation<=y&&e.match(s),S=null;if(n.indentationDiff>=4&&(l||n.prevLine.fencedCodeEnd||n.prevLine.header||i))return e.skipToEnd(),n.indentedCode=!0,a.code;if(e.eatSpace())return null;if(r&&n.indentation<=y&&(S=e.match(d))&&S[1].length<=6)return n.quote=0,n.header=S[1].length,n.thisLine.header=!0,t.highlightFormatting&&(n.formatting="header"),n.f=n.inline,_(n);if(n.indentation<=y&&e.eat(">"))return n.quote=r?1:n.quote+1,t.highlightFormatting&&(n.formatting="quote"),e.eatSpace(),_(n);if(!w&&!n.setext&&r&&n.indentation<=y&&(S=e.match(c))){var L=S[1]?"ol":"ul";return n.indentation=b+e.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,t.taskLists&&e.match(u,!1)&&(n.taskList=!0),n.f=n.inline,t.highlightFormatting&&(n.formatting=["list","list-"+L]),_(n)}return r&&n.indentation<=y&&(S=e.match(h,!0))?(n.quote=0,n.fencedEndRE=new RegExp(S[1]+"+ *$"),n.localMode=t.fencedCodeBlockHighlighting&&o(S[2]),n.localMode&&(n.localState=W.startState(n.localMode)),n.f=n.block=C,t.highlightFormatting&&(n.formatting="code-block"),n.code=-1,_(n)):n.setext||!(k&&g||n.quote||!1!==n.list||n.code||w||m.test(e.string))&&(S=e.lookAhead(1))&&(S=S.match(p))?(n.setext?(n.header=n.setext,n.setext=0,e.skipToEnd(),t.highlightFormatting&&(n.formatting="header")):(n.header="="==S[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,_(n)):w?(e.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===e.peek()?v(e,n,A):v(e,n,n.inline)}function w(e,t){var r=n.token(e,t.htmlState);if(!i){var o=W.innerMode(n,t.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=L,t.block=k,t.htmlState=null)}return r}function C(e,n){var r,i=n.listStack[n.listStack.length-1]||0,o=n.indentation<i,l=i+3;return n.fencedEndRE&&n.indentation<=l&&(o||e.match(n.fencedEndRE))?(t.highlightFormatting&&(n.formatting="code-block"),o||(r=_(n)),n.localMode=n.localState=null,n.block=k,n.f=L,n.fencedEndRE=null,n.code=0,n.thisLine.fencedCodeEnd=!0,o?y(e,n,n.block):r):n.localMode?n.localMode.token(e,n.localState):(e.skipToEnd(),a.code)}function _(e){var n=[];if(e.formatting){n.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)n.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&n.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?n.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):n.push("error"))}if(e.taskOpen)return n.push("meta"),n.length?n.join(" "):null;if(e.taskClosed)return n.push("property"),n.length?n.join(" "):null;if(e.linkHref?n.push(a.linkHref,"url"):(e.strong&&n.push(a.strong),e.em&&n.push(a.em),e.strikethrough&&n.push(a.strikethrough),e.emoji&&n.push(a.emoji),e.linkText&&n.push(a.linkText),e.code&&n.push(a.code),e.image&&n.push(a.image),e.imageAltText&&n.push(a.imageAltText,"link"),e.imageMarker&&n.push(a.imageMarker)),e.header&&n.push(a.header,a.header+"-"+e.header),e.quote&&(n.push(a.quote),!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?n.push(a.quote+"-"+e.quote):n.push(a.quote+"-"+t.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?n.push(a.list2):n.push(a.list3):n.push(a.list1)}return e.trailingSpaceNewLine?n.push("trailing-space-new-line"):e.trailingSpace&&n.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),n.length?n.join(" "):null}function S(e,t){if(e.match(f,!0))return _(t)}function L(e,r){var i=r.text(e,r);if(void 0!==i)return i;if(r.list)return r.list=null,_(r);if(r.taskList)return" "===e.match(u,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,t.highlightFormatting&&(r.formatting="task"),r.taskList=!1,_(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&e.match(/^#+$/,!0))return t.highlightFormatting&&(r.formatting="header"),_(r);var o=e.next();if(r.linkTitle){r.linkTitle=!1;var l=o;"("===o&&(l=")");var s="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(s),!0))return a.linkHref}if("`"===o){var c=r.formatting;t.highlightFormatting&&(r.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=r.code||r.quote&&1!=d){if(d==r.code){var p=_(r);return r.code=0,p}return r.formatting=c,_(r)}return r.code=d,_(r)}if(r.code)return _(r);if("\\"===o&&(e.next(),t.highlightFormatting)){var f=_(r),h=a.formatting+"-escape";return f?f+" "+h:h}if("!"===o&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,t.highlightFormatting&&(r.formatting="image"),_(r);if("["===o&&r.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,t.highlightFormatting&&(r.formatting="image"),_(r);if("]"===o&&r.imageAltText){t.highlightFormatting&&(r.formatting="image");var f=_(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=T,f}if("["===o&&!r.image)return r.linkText&&e.match(/^.*?\]/)||(r.linkText=!0,t.highlightFormatting&&(r.formatting="link")),_(r);if("]"===o&&r.linkText){t.highlightFormatting&&(r.formatting="link");var f=_(r);return r.linkText=!1,r.inline=r.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:L,f}if("<"===o&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=M,t.highlightFormatting&&(r.formatting="link"),(f=_(r))?f+=" ":f="",f+a.linkInline;if("<"===o&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=M,t.highlightFormatting&&(r.formatting="link"),(f=_(r))?f+=" ":f="",f+a.linkEmail;if(t.xml&&"<"===o&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var m=e.string.indexOf(">",e.pos);if(-1!=m){var v=e.string.substring(e.start,m);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(r.md_inside=!0)}return e.backUp(1),r.htmlState=W.startState(n),y(e,r,w)}if(t.xml&&"<"===o&&e.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===o||"_"===o){for(var x=1,b=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(o);)x++;var k=e.peek()||" ",C=!/\s/.test(k)&&(!g.test(k)||/\s/.test(b)||g.test(b)),S=!/\s/.test(b)&&(!g.test(b)||/\s/.test(k)||g.test(k)),F=null,D=null;if(x%2&&(r.em||!C||"*"!==o&&S&&!g.test(b)?r.em!=o||!S||"*"!==o&&C&&!g.test(k)||(F=!1):F=!0),x>1&&(r.strong||!C||"*"!==o&&S&&!g.test(b)?r.strong!=o||!S||"*"!==o&&C&&!g.test(k)||(D=!1):D=!0),null!=D||null!=F){t.highlightFormatting&&(r.formatting=null==F?"strong":null==D?"em":"strong em"),!0===F&&(r.em=o),!0===D&&(r.strong=o);p=_(r);return!1===F&&(r.em=!1),!1===D&&(r.strong=!1),p}}else if(" "===o&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return _(r);e.backUp(1)}if(t.strikethrough)if("~"===o&&e.eatWhile(o)){if(r.strikethrough){t.highlightFormatting&&(r.formatting="strikethrough");p=_(r);return r.strikethrough=!1,p}if(e.match(/^[^\s]/,!1))return r.strikethrough=!0,t.highlightFormatting&&(r.formatting="strikethrough"),_(r)}else if(" "===o&&e.match(/^~~/,!0)){if(" "===e.peek())return _(r);e.backUp(2)}if(t.emoji&&":"===o&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,t.highlightFormatting&&(r.formatting="emoji");var A=_(r);return r.emoji=!1,A}return" "===o&&(e.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),_(r)}function M(e,n){if(">"===e.next()){n.f=n.inline=L,t.highlightFormatting&&(n.formatting="link");var r=_(n);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function T(e,n){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(n.f=n.inline=D("("===r?")":"]"),t.highlightFormatting&&(n.formatting="link-string"),n.linkHref=!0,_(n)):"error"}r(v,"switchInline"),r(y,"switchBlock"),r(x,"lineIsEmpty"),r(b,"blankLine"),r(k,"blockNormal"),r(w,"htmlBlock"),r(C,"local"),r(_,"getType"),r(S,"handleText"),r(L,"inlineNormal"),r(M,"linkInline"),r(T,"linkHref");var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(e){return function(n,r){if(n.next()===e){r.f=r.inline=L,t.highlightFormatting&&(r.formatting="link-string");var i=_(r);return r.linkHref=!1,i}return n.match(F[e]),r.linkHref=!0,_(r)}}function A(e,n){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(n.f=E,e.next(),t.highlightFormatting&&(n.formatting="link"),n.linkText=!0,_(n)):v(e,n,L)}function E(e,n){if(e.match(/^\]:/,!0)){n.f=n.inline=O,t.highlightFormatting&&(n.formatting="link");var r=_(n);return n.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function O(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=L,a.linkHref+" url")}r(D,"getLinkHrefInside"),r(A,"footnoteLink"),r(E,"footnoteLinkInside"),r(O,"footnoteUrl");var N={startState:r(function(){return{f:k,prevLine:{stream:null},thisLine:{stream:null},block:k,htmlState:null,indentation:0,inline:L,text:S,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},"startState"),copyState:r(function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&W.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?W.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},"copyState"),token:r(function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return b(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=w)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},"token"),innerMode:r(function(e){return e.block==w?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:N}},"innerMode"),indent:r(function(e,t,r){return e.block==w&&n.indent?n.indent(e.htmlState,t,r):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,t,r):W.Pass},"indent"),blankLine:b,getType:_,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return N},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown");var j,R={};function V(){return j||(j=1,function(e){function t(t){return function(n,i){var o=i.line,a=n.getLine(o);function l(t){for(var r,l=i.ch,s=0;;){var c=l<=0?-1:a.lastIndexOf(t[0],l-1);if(-1!=c){if(1==s&&c<i.ch)break;if(r=n.getTokenTypeAt(e.Pos(o,c+1)),!/^(comment|string)/.test(r))return{ch:c+1,tokenType:r,pair:t};l=c-1}else{if(1==s)break;s=1,l=a.length}}}function s(t){var r,i,a=1,l=n.lastLine(),s=t.ch;e:for(var c=o;c<=l;++c)for(var u=n.getLine(c),d=c==o?s:0;;){var p=u.indexOf(t.pair[0],d),f=u.indexOf(t.pair[1],d);if(p<0&&(p=u.length),f<0&&(f=u.length),(d=Math.min(p,f))==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==p)++a;else if(! --a){r=c,i=d;break e}++d}return null==r||o==r?null:{from:e.Pos(o,s),to:e.Pos(r,i)}}r(l,"findOpening"),r(s,"findRange");for(var c=[],u=0;u<t.length;u++){var d=l(t[u]);d&&c.push(d)}for(c.sort(function(e,t){return e.ch-t.ch}),u=0;u<c.length;u++){var p=s(c[u]);if(p)return p}return null}}r(t,"bracketFolding"),e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}r(i,"hasImport");var o,a=n.line,l=i(a);if(!l||i(a-1)||(o=i(a-2))&&o.end.line==a-1)return null;for(var s=l.end;;){var c=i(s.line+1);if(null==c)break;s=c.end}return{from:t.clipPos(e.Pos(a,l.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}r(i,"hasInclude");var o=n.line,a=i(o);if(null==a||null!=i(o-1))return null;for(var l=o;null!=i(l+1);)++l;return{from:e.Pos(o,a+1),to:t.clipPos(e.Pos(l))}})}(c())),R}r(V,"requireBraceFold"),V();var G,U={};function K(){return G||(G=1,(e=c()).registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,o=r.blockCommentEnd;if(i&&o){for(var a,l=n.line,s=t.getLine(l),c=n.ch,u=0;;){var d=c<=0?-1:s.lastIndexOf(i,c-1);if(-1!=d){if(1==u&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,d+1)))&&(0==d||s.slice(d-o.length,d)==o||!/comment/.test(t.getTokenTypeAt(e.Pos(l,d))))){a=d+i.length;break}c=d-1}else{if(1==u)return;u=1,c=s.length}}var p,f,h=1,m=t.lastLine();e:for(var g=l;g<=m;++g)for(var v=t.getLine(g),y=g==l?a:0;;){var x=v.indexOf(i,y),b=v.indexOf(o,y);if(x<0&&(x=v.length),b<0&&(b=v.length),(y=Math.min(x,b))==v.length)break;if(y==x)++h;else if(! --h){p=g,f=y;break e}++y}if(null!=p&&(l!=p||f!=a))return{from:e.Pos(l,a),to:e.Pos(p,f)}}})),U;var e}r(K,"requireCommentFold"),K();var $,X={};function Q(){return $||($=1,function(e){function t(t,i,a,l){if(a&&a.call){var s=a;a=null}else s=o(t,a,"rangeFinder");"number"==typeof i&&(i=e.Pos(i,0));var c=o(t,a,"minFoldSize");function u(e){var n=s(t,i);if(!n||n.to.line-n.from.line<c)return null;if("fold"===l)return n;for(var r=t.findMarksAt(n.from),o=0;o<r.length;++o)if(r[o].__isFold){if(!e)return null;n.cleared=!0,r[o].clear()}return n}r(u,"getRange");var d=u(!0);if(o(t,a,"scanUp"))for(;!d&&i.line>t.firstLine();)i=e.Pos(i.line-1,0),d=u(!1);if(d&&!d.cleared&&"unfold"!==l){var p=n(t,a,d);e.on(p,"mousedown",function(t){f.clear(),e.e_preventDefault(t)});var f=t.markText(d.from,d.to,{replacedWith:p,clearOnEnter:o(t,a,"clearOnEnter"),__isFold:!0});f.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)}),e.signal(t,"fold",t,d.from,d.to)}}function n(e,t,n){var r=o(e,t,"widget");if("function"==typeof r&&(r=r(n.from,n.to)),"string"==typeof r){var i=document.createTextNode(r);(r=document.createElement("span")).appendChild(i),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}r(t,"doFold"),r(n,"makeWidget"),e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var i={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function o(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.defineOption("foldOptions",null),r(o,"getOption"),e.defineExtension("foldOption",function(e,t){return o(this,e,t)})}(c())),X}r(Q,"requireFoldcode"),Q();var Y,J={};function Z(){return Y||(Y=1,function(e){e.defineOption("foldGutter",!1,function(t,r,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",p),t.off("viewportChange",f),t.off("fold",h),t.off("unfold",h),t.off("swapDoc",p),t.off("optionChange",d)),r&&(t.state.foldGutter=new n(i(r)),c(t),t.on("gutterClick",u),t.on("changes",p),t.on("viewportChange",f),t.on("fold",h),t.on("unfold",h),t.on("swapDoc",p),t.on("optionChange",d))});var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function i(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function o(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function a(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function l(e,n,r){var i=e.state.foldGutter.options,l=n-1,c=e.foldOption(i,"minFoldSize"),u=e.foldOption(i,"rangeFinder"),d="string"==typeof i.indicatorFolded&&s(i.indicatorFolded),p="string"==typeof i.indicatorOpen&&s(i.indicatorOpen);e.eachLine(n,r,function(n){++l;var r=null,s=n.gutterMarkers;if(s&&(s=s[i.gutter]),o(e,l)){if(d&&s&&d.test(s.className))return;r=a(i.indicatorFolded)}else{var f=t(l,0),h=u&&u(e,f);if(h&&h.to.line-h.from.line>=c){if(p&&s&&p.test(s.className))return;r=a(i.indicatorOpen)}}(r||s)&&e.setGutterMarker(n,i.gutter,r)})}function s(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function c(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){l(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function u(e,n,r){var i=e.state.foldGutter;if(i){var a=i.options;if(r==a.gutter){var l=o(e,n);l?l.clear():e.foldCode(t(n,0),a)}}}function d(e,t){"mode"==t&&p(e)}function p(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){c(e)},n.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?c(e):e.operation(function(){n.from<t.from&&(l(e,n.from,t.from),t.from=n.from),n.to>t.to&&(l(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function h(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&l(e,r,r+1)}}r(n,"State"),r(i,"parseOptions"),r(o,"isFolded"),r(a,"marker"),r(l,"updateFoldInfo"),r(s,"classTest"),r(c,"updateInViewport"),r(u,"onGutterClick"),r(d,"optionChange"),r(p,"onChange"),r(f,"onViewportChange"),r(h,"onFold")}(c(),Q())),J}r(Z,"requireFoldgutter"),Z();var ee,te={};function ne(){return ee||(ee=1,function(e){function t(t,n){var r=t.getLine(n),i=r.search(/\S/);return-1==i||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,i+1)))?-1:e.countColumn(r,null,t.getOption("tabSize"))}r(t,"lineIndent"),e.registerHelper("fold","indent",function(n,r){var i=t(n,r.line);if(!(i<0)){for(var o=null,a=r.line+1,l=n.lastLine();a<=l;++a){var s=t(n,a);if(-1==s);else{if(!(s>i))break;o=a}}return o?{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}})}(c())),te}r(ne,"requireIndentFold"),ne();var re,ie={};function oe(){return re||(re=1,function(e){var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}r(n,"cmp");var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function l(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function c(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function u(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(l(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(c(e))continue;return}if(l(e,t+1)){o.lastIndex=t,e.ch=t;var n=o.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function p(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(s(e))continue;return}if(l(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(c(e))continue;return}if(l(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function h(e,n){for(var r=[];;){var i,o=p(e),a=e.line,l=e.ch-(o?o[0].length:0);if(!o||!(i=u(e)))return;if("selfClose"!=i)if(o[1]){for(var s=r.length-1;s>=0;--s)if(r[s]==o[2]){r.length=s;break}if(s<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,l),to:t(e.line,e.ch)}}else r.push(o[2])}}function m(e,n){for(var r=[];;){var i=f(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,l=d(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==l[2]){r.length=s;break}if(s<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(o,a)}}}else d(e)}}r(a,"Iter"),r(l,"tagAt"),r(s,"nextLine"),r(c,"prevLine"),r(u,"toTagEnd"),r(d,"toTagStart"),r(p,"toNextTag"),r(f,"toPrevTag"),r(h,"findMatchingClose"),r(m,"findMatchingOpen"),e.registerHelper("fold","xml",function(e,r){for(var i=new a(e,r.line,0);;){var o=p(i);if(!o||i.line!=r.line)return;var l=u(i);if(!l)return;if(!o[1]&&"selfClose"!=l){var s=t(i.line,i.ch),c=h(i,o[2]);return c&&n(c.from,s)>0?{from:s,to:c.from}:null}}}),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=u(o),s=l&&t(o.line,o.ch),c=l&&d(o);if(l&&c&&!(n(o,r)>0)){var p={from:t(o.line,o.ch),to:s,tag:c[2]};return"selfClose"==l?{open:p,close:null,at:"open"}:c[1]?{open:m(o,c[2]),close:p,at:"close"}:{open:p,close:h(o=new a(e,s.line,s.ch,i),c[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=m(i,r);if(!o)break;var l=h(new a(e,t.line,t.ch,n),o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,r){return h(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(c())),ie}r(oe,"requireXmlFold"),oe();var ae,le={};function se(){return ae||(ae=1,function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}r(t,"dialogDiv"),r(n,"closeNotification"),e.defineExtension("openDialog",function(i,o,a){a||(a={}),n(this,null);var l=t(this,i,a.bottom),s=!1,c=this;function u(t){if("string"==typeof t)p.value=t;else{if(s)return;s=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),c.focus(),a.onClose&&a.onClose(l)}}r(u,"close");var d,p=l.getElementsByTagName("input")[0];return p?(p.focus(),a.value&&(p.value=a.value,!1!==a.selectValueOnOpen&&p.select()),a.onInput&&e.on(p,"input",function(e){a.onInput(e,p.value,u)}),a.onKeyUp&&e.on(p,"keyup",function(e){a.onKeyUp(e,p.value,u)}),e.on(p,"keydown",function(t){a&&a.onKeyDown&&a.onKeyDown(t,p.value,u)||((27==t.keyCode||!1!==a.closeOnEnter&&13==t.keyCode)&&(p.blur(),e.e_stop(t),u()),13==t.keyCode&&o(p.value,t))}),!1!==a.closeOnBlur&&e.on(l,"focusout",function(e){null!==e.relatedTarget&&u()})):(d=l.getElementsByTagName("button")[0])&&(e.on(d,"click",function(){u(),c.focus()}),!1!==a.closeOnBlur&&e.on(d,"blur",u),d.focus()),u}),e.defineExtension("openConfirm",function(i,o,a){n(this,null);var l=t(this,i,a&&a.bottom),s=l.getElementsByTagName("button"),c=!1,u=this,d=1;function p(){c||(c=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),u.focus())}r(p,"close"),s[0].focus();for(var f=0;f<s.length;++f){var h=s[f];(function(t){e.on(h,"click",function(n){e.e_preventDefault(n),p(),t&&t(u)})})(o[f]),e.on(h,"blur",function(){--d,setTimeout(function(){d<=0&&p()},200)}),e.on(h,"focus",function(){++d})}}),e.defineExtension("openNotification",function(i,o){n(this,u);var a,l=t(this,i,o&&o.bottom),s=!1,c=o&&void 0!==o.duration?o.duration:5e3;function u(){s||(s=!0,clearTimeout(a),e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}return r(u,"close"),e.on(l,"click",function(t){e.e_preventDefault(t),u()}),c&&(a=setTimeout(u,c)),u})}(c())),le}r(se,"requireDialog"),se();var ce,ue={};function de(){return ce||(ce=1,function(e){function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function i(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),r(t,"dialog"),r(n,"getJumpDialog"),r(i,"interpretLine"),e.commands.jumpToLine=function(e){var r=e.getCursor();t(e,n(e),e.phrase("Jump to line:"),r.line+1+":"+r.ch,function(t){var n;if(t)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(i(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(o=r.line+o+1),e.setCursor(o-1,r.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(i(e,n[1]),r.ch)})},e.keyMap.default["Alt-G"]="jumpToLine"}(c(),se())),ue}r(de,"requireJumpToLine"),de();var pe,fe,he={},me={};function ge(){return pe||(pe=1,function(e){var t,n,i=e.Pos;function o(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function a(e,t){for(var n=o(e),r=n,i=0;i<t.length;i++)-1==r.indexOf(t.charAt(i))&&(r+=t.charAt(i));return n==r?e:new RegExp(e.source,r)}function l(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,n){t=a(t,"g");for(var r=n.line,o=n.ch,l=e.lastLine();r<=l;r++,o=0){t.lastIndex=o;var s=e.getLine(r),c=t.exec(s);if(c)return{from:i(r,c.index),to:i(r,c.index+c[0].length),match:c}}}function c(e,t,n){if(!l(t))return s(e,t,n);t=a(t,"gm");for(var r,o=1,c=n.line,u=e.lastLine();c<=u;){for(var d=0;d<o&&!(c>u);d++){var p=e.getLine(c++);r=null==r?p:r+"\n"+p}o*=2,t.lastIndex=n.ch;var f=t.exec(r);if(f){var h=r.slice(0,f.index).split("\n"),m=f[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:i(g,v),to:i(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:f}}}}function u(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function d(e,t,n){t=a(t,"g");for(var r=n.line,o=n.ch,l=e.firstLine();r>=l;r--,o=-1){var s=e.getLine(r),c=u(s,t,o<0?0:s.length-o);if(c)return{from:i(r,c.index),to:i(r,c.index+c[0].length),match:c}}}function p(e,t,n){if(!l(t))return d(e,t,n);t=a(t,"gm");for(var r,o=1,s=e.getLine(n.line).length-n.ch,c=n.line,p=e.firstLine();c>=p;){for(var f=0;f<o&&c>=p;f++){var h=e.getLine(c--);r=null==r?h:h+"\n"+r}o*=2;var m=u(r,t,s);if(m){var g=r.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=c+g.length,x=g[g.length-1].length;return{from:i(y,x),to:i(y+v.length-1,1==v.length?x+v[0].length:v[v.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,l=r(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:i=a+1}}function h(e,r,o,a){if(!r.length)return null;var l=a?t:n,s=l(r).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-s.length;c<=d;c++,u=0){var p=e.getLine(c).slice(u),h=l(p);if(1==s.length){var m=h.indexOf(s[0]);if(-1==m)continue e;return o=f(p,h,m,l)+u,{from:i(c,f(p,h,m,l)+u),to:i(c,f(p,h,m+s[0].length,l)+u)}}var g=h.length-s[0].length;if(h.slice(g)==s[0]){for(var v=1;v<s.length-1;v++)if(l(e.getLine(c+v))!=s[v])continue e;var y=e.getLine(c+s.length-1),x=l(y),b=s[s.length-1];if(x.slice(0,b.length)==b)return{from:i(c,f(p,h,g,l)+u),to:i(c+s.length-1,f(y,x,b.length,l))}}}}function m(e,r,o,a){if(!r.length)return null;var l=a?t:n,s=l(r).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.firstLine()-1+s.length;c>=d;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=l(p);if(1==s.length){var m=h.lastIndexOf(s[0]);if(-1==m)continue e;return{from:i(c,f(p,h,m,l)),to:i(c,f(p,h,m+s[0].length,l))}}var g=s[s.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=c-s.length+1;v<s.length-1;v++)if(l(e.getLine(o+v))!=s[v])continue e;var y=e.getLine(c+1-s.length),x=l(y);if(x.slice(x.length-s[0].length)==s[0])return{from:i(c+1-s.length,f(y,x,y.length-s[0].length,l)),to:i(c,f(p,h,g.length,l))}}}}function g(e,t,n,r){var o;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):i(0,0),this.pos={from:n,to:n},"object"==typeof r?o=r.caseFold:(o=r,r=null),"string"==typeof t?(null==o&&(o=!1),this.matches=function(n,r){return(n?m:h)(e,t,r,o)}):(t=a(t,"gm"),r&&!1===r.multiline?this.matches=function(n,r){return(n?d:s)(e,t,r)}:this.matches=function(n,r){return(n?p:c)(e,t,r)})}r(o,"regexpFlags"),r(a,"ensureFlags"),r(l,"maybeMultiline"),r(s,"searchRegexpForward"),r(c,"searchRegexpForwardMultiline"),r(u,"lastMatchIn"),r(d,"searchRegexpBackward"),r(p,"searchRegexpBackwardMultiline"),String.prototype.normalize?(t=r(function(e){return e.normalize("NFD").toLowerCase()},"doFold"),n=r(function(e){return e.normalize("NFD")},"noFold")):(t=r(function(e){return e.toLowerCase()},"doFold"),n=r(function(e){return e},"noFold")),r(f,"adjustPos"),r(h,"searchStringForward"),r(m,"searchStringBackward"),r(g,"SearchCursor"),g.prototype={findNext:r(function(){return this.find(!1)},"findNext"),findPrevious:r(function(){return this.find(!0)},"findPrevious"),find:r(function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=i(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var r=this.matches(t,n);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var o=i(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},"find"),from:r(function(){if(this.atOccurrence)return this.pos.from},"from"),to:r(function(){if(this.atOccurrence)return this.pos.to},"to"),replace:r(function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}},"replace")},e.defineExtension("getSearchCursor",function(e,t,n){return new g(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new g(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})}(c())),me}function ve(){return fe||(fe=1,function(e){function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:r(function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()},"token")}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function i(e){return e.state.search||(e.state.search=new n)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function a(e,t,n){return e.getSearchCursor(t,n,{caseFold:o(t),multiline:!0})}function l(e,t,n,i,o){e.openDialog(t,i,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:r(function(){m(e)},"onClose"),onKeyDown:o,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function c(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function u(e){return e.replace(/\\([nrt\\])/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e})}function d(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(n){}else e=u(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function p(e,n,r){n.queryText=r,n.query=d(r),e.removeOverlay(n.overlay,o(n.query)),n.overlay=t(n.query,o(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,o(n.query)))}function f(t,n,o,a){var c=i(t);if(c.query)return h(t,n);var u=t.getSelection()||c.lastQuery;if(u instanceof RegExp&&"x^"==u.source&&(u=null),o&&t.openDialog){var d=null,f=r(function(n,r){e.e_stop(r),n&&(n!=c.queryText&&(p(t,c,n),c.posFrom=c.posTo=t.getCursor()),d&&(d.style.opacity=1),h(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((d=r).style.opacity=.4)}))},"searchNext");l(t,v(t),u,f,function(n,r){var o=e.keyName(n),a=t.getOption("extraKeys"),l=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),p(t,i(t),r),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(n),f(r,n))}),a&&u&&(p(t,c,u),h(t,n))}else s(t,v(t),"Search for:",u,function(e){e&&!c.query&&t.operation(function(){p(t,c,e),c.posFrom=c.posTo=t.getCursor(),h(t,n)})})}function h(t,n,r){t.operation(function(){var o=i(t),l=a(t,o.query,n?o.posFrom:o.posTo);(l.find(n)||(l=a(t,o.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),o.posFrom=l.from(),o.posTo=l.to(),r&&r(l.from(),l.to()))})}function m(e){e.operation(function(){var t=i(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function g(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function v(e){var t=g("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),g("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),g("",null,t," ",g("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return g("",null," ",g("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",g("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function x(e){return g("",null,g("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",g("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return g("",null,g("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",g("button",{},e.phrase("Yes"))," ",g("button",{},e.phrase("No"))," ",g("button",{},e.phrase("All"))," ",g("button",{},e.phrase("Stop")))}function k(e,t,n){e.operation(function(){for(var r=a(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function w(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||i(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),l=g("",null,g("span",{className:"CodeMirror-search-label"},o),y(e));s(e,l,o,n,function(n){n&&(n=d(n),s(e,x(e),e.phrase("Replace with:"),"",function(i){if(i=u(i),t)k(e,n,i);else{m(e);var o=a(e,n,e.getCursor("from")),l=r(function(){var t,r=o.from();!(t=o.findNext())&&(o=a(e,n),!(t=o.findNext())||r&&o.from().line==r.line&&o.from().ch==r.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),c(e,b(e),e.phrase("Replace?"),[function(){s(t)},l,function(){k(e,n,i)}]))},"advance"),s=r(function(e){o.replace("string"==typeof n?i:i.replace(/\$(\d)/g,function(t,n){return e[n]})),l()},"doReplace");l()}}))})}}e.defineOption("search",{bottom:!1}),r(t,"searchOverlay"),r(n,"SearchState"),r(i,"getSearchState"),r(o,"queryCaseInsensitive"),r(a,"getSearchCursor"),r(l,"persistentDialog"),r(s,"dialog"),r(c,"confirmDialog"),r(u,"parseString"),r(d,"parseQuery"),r(p,"startSearch"),r(f,"doSearch"),r(h,"findNext"),r(m,"clearSearch"),r(g,"el"),r(v,"getQueryDialog"),r(y,"getReplaceQueryDialog"),r(x,"getReplacementQueryDialog"),r(b,"getDoReplaceConfirm"),r(k,"replaceAll"),r(w,"replace"),e.commands.find=function(e){m(e),f(e)},e.commands.findPersistent=function(e){m(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=m,e.commands.replace=w,e.commands.replaceAll=function(e){w(e,!0)}}(c(),ge(),se())),he}r(ge,"requireSearchcursor"),r(ve,"requireSearch"),ve(),ge();var ye,xe={};function be(){return ye||(ye=1,function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function i(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",function(t){t=l(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var r=0;r<n.length;r++)if(n[r].head.line!=n[r].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new i(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}}),e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()}),r(i,"Completion");var o=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},a=window.cancelAnimationFrame||clearTimeout;function l(e,t,n){var r=e.options.hintOptions,i={};for(var o in m)i[o]=m[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function s(e){return"string"==typeof e?e:e.text}function c(e,t){var n={Up:r(function(){t.moveFocus(-1)},"Up"),Down:r(function(){t.moveFocus(1)},"Down"),PageUp:r(function(){t.moveFocus(1-t.menuSize(),!0)},"PageUp"),PageDown:r(function(){t.moveFocus(t.menuSize()-1,!0)},"PageDown"),Home:r(function(){t.setFocus(0)},"Home"),End:r(function(){t.setFocus(t.length-1)},"End"),Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var i=e.options.customKeys,o=i?{}:n;function a(e,i){var a;a="string"!=typeof i?r(function(e){return i(e,t)},"bound"):n.hasOwnProperty(i)?n[i]:i,o[e]=a}if(r(a,"addBinding"),i)for(var l in i)i.hasOwnProperty(l)&&a(l,i[l]);var s=e.options.extraKeys;if(s)for(var l in s)s.hasOwnProperty(l)&&a(l,s[l]);return o}function u(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function d(i,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=i,this.data=o,this.picked=!1;var a=this,l=i.cm,d=l.getInputField().ownerDocument,p=d.defaultView||d.parentWindow,f=this.hints=d.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var h=i.cm.options.theme;f.className="CodeMirror-hints "+h,this.selectedHint=o.selectedHint||0;for(var m=o.list,g=0;g<m.length;++g){var v=f.appendChild(d.createElement("li")),y=m[g],x=t+(g!=this.selectedHint?"":" "+n);null!=y.className&&(x=y.className+" "+x),v.className=x,g==this.selectedHint&&v.setAttribute("aria-selected","true"),v.id=this.id+"-"+g,v.setAttribute("role","option"),y.render?y.render(v,o,y):v.appendChild(d.createTextNode(y.displayText||s(y))),v.hintId=g}var b=i.options.container||d.body,k=l.cursorCoords(i.options.alignWithWord?o.from:null),w=k.left,C=k.bottom,_=!0,S=0,L=0;if(b!==d.body){var M=-1!==["absolute","relative","fixed"].indexOf(p.getComputedStyle(b).position)?b:b.offsetParent,T=M.getBoundingClientRect(),F=d.body.getBoundingClientRect();S=T.left-F.left-M.scrollLeft,L=T.top-F.top-M.scrollTop}f.style.left=w-S+"px",f.style.top=C-L+"px";var D=p.innerWidth||Math.max(d.body.offsetWidth,d.documentElement.offsetWidth),A=p.innerHeight||Math.max(d.body.offsetHeight,d.documentElement.offsetHeight);b.appendChild(f),l.getInputField().setAttribute("aria-autocomplete","list"),l.getInputField().setAttribute("aria-owns",this.id),l.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var E,O=i.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,N=!!i.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout(function(){E=l.getScrollInfo()}),O.bottom-A>0){var z=O.bottom-O.top,P=O.top-(k.bottom-k.top)-2;A-O.top<P?(z>P&&(f.style.height=(z=P)+"px"),f.style.top=(C=k.top-z)-L+"px",_=!1):f.style.height=A-O.top-2+"px"}var H,I=O.right-D;if(N&&(I+=l.display.nativeBarWidth),I>0&&(O.right-O.left>D&&(f.style.width=D-5+"px",I-=O.right-O.left-D),f.style.left=(w=Math.max(k.left-I-S,0))+"px"),N)for(var q=f.firstChild;q;q=q.nextSibling)q.style.paddingRight=l.display.nativeBarWidth+"px";l.addKeyMap(this.keyMap=c(i,{moveFocus:r(function(e,t){a.changeActive(a.selectedHint+e,t)},"moveFocus"),setFocus:r(function(e){a.changeActive(e)},"setFocus"),menuSize:r(function(){return a.screenAmount()},"menuSize"),length:m.length,close:r(function(){i.close()},"close"),pick:r(function(){a.pick()},"pick"),data:o})),i.options.closeOnUnfocus&&(l.on("blur",this.onBlur=function(){H=setTimeout(function(){i.close()},100)}),l.on("focus",this.onFocus=function(){clearTimeout(H)})),l.on("scroll",this.onScroll=function(){var e=l.getScrollInfo(),t=l.getWrapperElement().getBoundingClientRect();E||(E=l.getScrollInfo());var n=C+E.top-e.top,r=n-(p.pageYOffset||(d.documentElement||d.body).scrollTop);if(_||(r+=f.offsetHeight),r<=t.top||r>=t.bottom)return i.close();f.style.top=n+"px",f.style.left=w+E.left-e.left+"px"}),e.on(f,"dblclick",function(e){var t=u(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())}),e.on(f,"click",function(e){var t=u(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),i.options.completeOnSingleClick&&a.pick())}),e.on(f,"mousedown",function(){setTimeout(function(){l.focus()},20)});var B=this.getSelectedHintRange();return 0===B.from&&0===B.to||this.scrollToActive(),e.signal(o,"select",m[this.selectedHint],f.childNodes[this.selectedHint]),!0}function p(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function h(t,n){var i,o=t.getHelpers(n,"hint");if(o.length){var a=r(function(e,t,n){var i=p(e,o);function a(r){if(r==i.length)return t(null);f(i[r],e,n,function(e){e&&e.list.length>0?t(e):a(r+1)})}r(a,"run"),a(0)},"resolved");return a.async=!0,a.supportsSelection=!0,a}return(i=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:i})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}i.prototype={close:r(function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},"close"),active:r(function(){return this.cm.state.completionActive==this},"active"),pick:r(function(t,n){var r=t.list[n],i=this;this.cm.operation(function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},"pick"),cursorActivity:r(function(){this.debounce&&(a(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=o(function(){r.update()}),this.widget&&this.widget.disable()}},"cursorActivity"),update:r(function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,function(r){t.tick==n&&t.finishUpdate(r,e)})}},"update"),finishUpdate:r(function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new d(this,t),e.signal(t,"shown")))},"finishUpdate")},r(l,"parseOptions"),r(s,"getText"),r(c,"buildKeyMap"),r(u,"getHintElement"),r(d,"Widget"),d.prototype={close:r(function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},"close"),disable:r(function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:r(function(){e.picked=!0},"Enter")},this.completion.cm.addKeyMap(this.keyMap)},"disable"),pick:r(function(){this.completion.pick(this.data,this.selectedHint)},"pick"),changeActive:r(function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},"changeActive"),scrollToActive:r(function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},"scrollToActive"),screenAmount:r(function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},"screenAmount"),getSelectedHintRange:r(function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}},"getSelectedHintRange")},r(p,"applicableHelpers"),r(f,"fetchHints"),r(h,"resolveAutoHints"),e.registerHelper("hint","auto",{resolve:h}),e.registerHelper("hint","fromList",function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),l=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",a=i);for(var s=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&s.push(u)}if(s.length)return{list:s,from:a,to:l}}),e.commands.autocomplete=e.showHint;var m={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(c())),xe}r(be,"requireShowHint"),be();const ke=class _Editor extends t.HTMLWidget{_codemirror;_markedText=[];_initialText="";options(){return{gutters:this.guttersOption(),readOnly:this.readOnly(),lineNumbers:!0,tabSize:2}}_options=new Map;option(e,t){return this._codemirror?arguments.length<2?this._codemirror.getOption(e):(this._codemirror.setOption(e,t),this):arguments.length<2?this._options.get(e):void this._options.set(e,t)}guttersOption(){const e=["CodeMirror-linenumbers"];return this.gutterMarkerWidth()>0&&e.unshift({className:"CodeMirror-guttermarker",style:`width:${this.gutterMarkerWidth()}px;`}),e}addGutterMarker(e,n,r=null,i=null,o=null,a=()=>{},l=()=>{},s=e=>{}){const c=this._codemirror.getLineHandle(e),u=document.createElement("div");u.textContent=n,u.style.paddingLeft="3px",u.style.paddingRight="3px",u.style.color=t.Palette.textColor(r),null!==i&&(u.style.fontFamily=i),null!==o&&(u.style.fontSize=o),u.style.backgroundColor=r,u.style.textAlign=this.markerTextAlign(),this._codemirror.setGutterMarker(c,"CodeMirror-guttermarker",u),u.onmouseenter=a,u.onmouseleave=l,u.onclick=s}removeGutterMarker(e){const t=this._codemirror.getLineHandle(e);this._codemirror.setGutterMarker(t,"CodeMirror-guttermarker",null)}hasFocus(){return this._codemirror.hasFocus()}text(e){if(this._codemirror){const t=this._codemirror.getDoc();return arguments.length?(t.setValue(e),this):t.getValue()}return arguments.length?(this._initialText=e,this):this._initialText}highlight(e,t,n="cm-marked-text"){return"number"==typeof e&&(e=this.positionAt(e)),"number"==typeof t&&(t=this.positionAt(t)),this._codemirror&&this._markedText.push(this._codemirror.markText(e,t,{className:n})),this}highlightInfo(e,t){return this.highlight(e,t,"cm-marked-info"),this}highlightWarning(e,t){return this.highlight(e,t,"cm-marked-warning"),this}highlightError(e,t){return this.highlight(e,t,"cm-marked-error"),this}addLineClass(e){return this._codemirror.addLineClass(this._codemirror.getLineHandle(e.lineNum),e.where??"background",e.cssClass),this}removeLineClass(e){return this._codemirror.removeLineClass(this._codemirror.getLineHandle(e.lineNum),e.where??"background",e.cssClass),this}removeAllHighlight(){for(const e of this._markedText)e.clear();return this._markedText=[],this}positionAt(e){return this._codemirror.posFromIndex(e)}getLineLength(e){return this._codemirror.doc.getLine(e)?.length||0}highlightSubstring(e){const t=this.text().split(e).slice(0,-1);let n=0;t.forEach(t=>{n+=t.length,this.highlight(this.positionAt(n),this.positionAt(n+e.length)),n+=e.length})}setCursor(e,t,n=!0){this._codemirror.setCursor(e,t),n&&setTimeout(()=>{this._codemirror.focus()},0)}enter(e,t){super.enter(e,t),this._codemirror=W.fromTextArea(t.append("textarea").node(),this.options()),this._codemirror.on("changes",(e,t)=>{this.changes(t)}),this._options.forEach((e,t)=>{this._codemirror.setOption(t,e)}),this.text(this._initialText)}update(e,t){super.update(e,t);const n=this._codemirror.getOption("extraKeys")??{};this.showHints()?n["Ctrl-Space"]="autocomplete":delete n["Ctrl-Space"],this._codemirror.setOption("readOnly",this.readOnly()),this._codemirror.setOption("gutters",this.guttersOption()),this._codemirror.setOption("extraKeys",n),this._codemirror.setOption("hintOptions",this.showHints()?{hint:r((e,t)=>this.fetchHints(e,t),"hint")}:{}),this._codemirror.setSize(this.width()-2,this.height()-2),this._codemirror.refresh()}changes(e){}fetchHints(e,t){return Promise.resolve(null)}setOption(e,t){this._codemirror.setOption(e,t)}};r(ke,"Editor");let we=ke;we.prototype._class+=" codemirror_Editor",we.prototype.publish("markerTextAlign","right","string","Gutter marker text alignment",["left","center","right"]),we.prototype.publish("readOnly",!1,"boolean","If true, the contents will be uneditable"),we.prototype.publish("gutterMarkerWidth",0,"number","Width of gutter marker column displayed to the left of line numbers (pixels)"),we.prototype.publish("showHints",!1,"boolean","Show autocomplete hints on ctrl+space");const Ce=class _CSSEditor extends we{options(){return{...super.options(),mode:"text/css",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}css(e){return arguments.length?(this.text(e),this):this.text()}};r(Ce,"CSSEditor");let _e=Ce;_e.prototype._class+=" codemirror_CSSEditor";const Se=class _DOTEditor extends we{options(){return{...super.options(),mode:"text/x-dot"}}dot(e){return arguments.length?(this.text(e),this):this.text()}};r(Se,"DOTEditor");let Le=Se;Le.prototype._class+=" codemirror_DOTEditor";const Me=class _ECLEditor extends we{options(){return{...super.options(),mode:"text/x-ecl",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}ecl(e){return arguments.length?(this.text(e),this):this.text()}};r(Me,"ECLEditor");let Te=Me;Te.prototype._class+=" codemirror_ECLEditor";const Fe=class _HTMLEditor extends we{options(){return{...super.options(),mode:"htmlmixed",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}html(e){return arguments.length?(this.text(e),this):this.text()}};r(Fe,"HTMLEditor");let De=Fe;De.prototype._class+=" codemirror_HTMLEditor";const Ae=class _JSEditor extends we{options(){return{...super.options(),mode:"text/javascript",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}javascript(e){return arguments.length?(this.text(e),this):this.text()}};r(Ae,"JSEditor");let Ee=Ae;Ee.prototype._class+=" codemirror_JSEditor";const Oe=class _JSONEditor extends we{options(){return{...super.options(),mode:"application/json",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}json(e){return arguments.length?(this.text(JSON.stringify(e,null,"\t")),this):JSON.parse(this.text())}};r(Oe,"JSONEditor");let Ne=Oe;Ne.prototype._class+=" codemirror_JSONEditor";const ze=class _MarkdownEditor extends we{options(){return{...super.options(),mode:"text/x-gfm",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}markdown(e){return arguments.length?(this.text(e),this):this.text()}};r(ze,"MarkdownEditor");let Pe=ze;Pe.prototype._class+=" codemirror_MarkdownEditor";const He=class _ObservableMarkdownEditor extends Pe{options(){return{...super.options(),mode:{name:"text/x-gfm",defaultMode:"javascript"}}}};r(He,"ObservableMarkdownEditor");let Ie=He;Ie.prototype._class+=" codemirror_ObservableMarkdownEditor";const qe=class _XMLEditor extends we{options(){return{...super.options(),mode:"application/xml",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}xml(e){return arguments.length?(this.text(e),this):this.text()}};r(qe,"XMLEditor");let Be=qe;Be.prototype._class+=" codemirror_XMLEditor";const We=class _SQLEditor extends we{options(){return{...super.options(),mode:"text/x-pgsql",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}sql(e){return arguments.length?(this.text(e),this):this.text()}};r(We,"SQLEditor");let je=We;je.prototype._class+=" codemirror_SQLEditor";const Re=class _YAMLEditor extends we{options(){return{...super.options(),mode:"text/x-yaml",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}yaml(e){return arguments.length?(this.text(e),this):this.text()}};r(Re,"YAMLEditor");let Ve=Re;Ve.prototype._class+=" codemirror_YAMLEditor",e.BUILD_VERSION="3.24.0",e.CSSEditor=_e,e.DOTEditor=Le,e.ECLEditor=Te,e.Editor=we,e.HTMLEditor=De,e.JSEditor=Ee,e.JSONEditor=Ne,e.MarkdownEditor=Pe,e.ObservableMarkdownEditor=Ie,e.PKG_NAME="@hpcc-js/codemirror",e.PKG_VERSION="3.7.8",e.SQLEditor=je,e.XMLEditor=Be,e.YAMLEditor=Ve,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@hpcc-js/common")):typeof define==`function`&&define.amd?define([`exports`,`@hpcc-js/common`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@hpcc-js/codemirror`]={},e[`@hpcc-js/common`]))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),c=`@hpcc-js/codemirror`,l=`3.7.9`,u=`3.25.1`,d=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.CodeMirror=r())})(e,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),c=!a&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),m=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),_=m&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=_||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=_||/Mac/.test(t),x=/\bCrOS\b/.test(e),S=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&=Number(C[1]),C&&C>=15&&(f=!1,c=!0);var w=b&&(l||f&&(C==null||C<12.11)),T=n||o&&s>=9;function classTest(e){return RegExp(`(^|\\s)`+e+`(?:$|\\s)\\s*`)}var rmClass=function(e,t){var n=e.className,r=classTest(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:``)}};function removeChildren(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(e,t){return removeChildren(e).appendChild(t)}function elt(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t==`string`)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function eltP(e,t,n,r){var i=elt(e,t,n,r);return i.setAttribute(`role`,`presentation`),i}var E=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd(`character`,n),r.moveStart(`character`,t),r};function contains(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function activeElt(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function addClass(e,t){var n=e.className;classTest(t).test(n)||(e.className+=(n?` `:``)+t)}function joinClasses(e,t){for(var n=e.split(` `),r=0;r<n.length;r++)n[r]&&!classTest(n[r]).test(t)&&(t+=` `+n[r]);return t}var selectInput=function(e){e.select()};_?selectInput=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(selectInput=function(e){try{e.select()}catch{}});function doc(e){return e.display.wrapper.ownerDocument}function root(e){return rootNode(e.display.wrapper)}function rootNode(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function win(e){return doc(e).defaultView}function bind(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function copyObj(e,t,n){for(var r in t||={},e)Object.prototype.hasOwnProperty.call(e,r)&&(n!==!1||!Object.prototype.hasOwnProperty.call(t,r))&&(t[r]=e[r]);return t}function countColumn(e,t,n,r,i){t??(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=i||0;;){var s=e.indexOf(` `,a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}var Delayed=function(){this.id=null,this.f=null,this.time=0,this.handler=bind(this.onTimeout,this)};Delayed.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Delayed.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function indexOf(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var D=50,O={toString:function(){return`CodeMirror.Pass`}},k={scroll:!1},A={origin:`*mouse`},j={origin:`+move`};function findColumn(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(` `,r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var M=[``];function spaceStr(e){for(;M.length<=e;)M.push(lst(M)+` `);return M[e]}function lst(e){return e[e.length-1]}function map(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function insertSorted(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function nothing(){}function createObj(e,t){var n;return Object.create?n=Object.create(e):(nothing.prototype=e,n=new nothing),t&&copyObj(t,n),n}var N=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function isWordCharBasic(e){return/\w/.test(e)||e>`€`&&(e.toUpperCase()!=e.toLowerCase()||N.test(e))}function isWordChar(e,t){return t?t.source.indexOf(`\\w`)>-1&&isWordCharBasic(e)?!0:t.test(e):isWordCharBasic(e)}function isEmpty(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var P=/[\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 isExtendingChar(e){return e.charCodeAt(0)>=768&&P.test(e)}function skipExtendingChars(e,t,n){for(;(n<0?t>0:t<e.length)&&isExtendingChar(e.charAt(t));)t+=n;return t}function findFirst(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function iterateBidiSections(e,t,n,r){if(!e)return r(t,n,`ltr`,0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?`rtl`:`ltr`,a),i=!0)}i||r(t,n,`ltr`)}var F=null;function getBidiPartAt(e,t,n){var r;F=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n==`before`?r=i:F=i),a.from==t&&(a.from!=a.to&&n!=`before`?r=i:F=i)}return r??F}var I=(function(){var e=`bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN`,t=`nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111`;function charType(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?`R`:1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?`r`:8192<=n&&n<=8203?`w`:n==8204?`b`:`L`}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,a=/[Lb1n]/,o=/[1n]/;function BidiSpan(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var s=t==`ltr`?`L`:`R`;if(e.length==0||t==`ltr`&&!n.test(e))return!1;for(var c=e.length,l=[],u=0;u<c;++u)l.push(charType(e.charCodeAt(u)));for(var d=0,f=s;d<c;++d){var m=l[d];m==`m`?l[d]=f:f=m}for(var h=0,g=s;h<c;++h){var _=l[h];_==`1`&&g==`r`?l[h]=`n`:i.test(_)&&(g=_,_==`r`&&(l[h]=`R`))}for(var v=1,y=l[0];v<c-1;++v){var b=l[v];b==`+`&&y==`1`&&l[v+1]==`1`?l[v]=`1`:b==`,`&&y==l[v+1]&&(y==`1`||y==`n`)&&(l[v]=y),y=b}for(var x=0;x<c;++x){var S=l[x];if(S==`,`)l[x]=`N`;else if(S==`%`){var C=void 0;for(C=x+1;C<c&&l[C]==`%`;++C);for(var w=x&&l[x-1]==`!`||C<c&&l[C]==`1`?`1`:`N`,T=x;T<C;++T)l[T]=w;x=C-1}}for(var E=0,D=s;E<c;++E){var O=l[E];D==`L`&&O==`1`?l[E]=`L`:i.test(O)&&(D=O)}for(var k=0;k<c;++k)if(r.test(l[k])){var A=void 0;for(A=k+1;A<c&&r.test(l[A]);++A);for(var j=(k?l[k-1]:s)==`L`,M=j==((A<c?l[A]:s)==`L`)?j?`L`:`R`:s,N=k;N<A;++N)l[N]=M;k=A-1}for(var P=[],F,I=0;I<c;)if(a.test(l[I])){var ee=I;for(++I;I<c&&a.test(l[I]);++I);P.push(new BidiSpan(0,ee,I))}else{var L=I,R=P.length,z=+(t==`rtl`);for(++I;I<c&&l[I]!=`L`;++I);for(var B=L;B<I;)if(o.test(l[B])){L<B&&(P.splice(R,0,new BidiSpan(1,L,B)),R+=z);var te=B;for(++B;B<I&&o.test(l[B]);++B);P.splice(R,0,new BidiSpan(2,te,B)),R+=z,L=B}else ++B;L<I&&P.splice(R,0,new BidiSpan(1,L,I))}return t==`ltr`&&(P[0].level==1&&(F=e.match(/^\s+/))&&(P[0].from=F[0].length,P.unshift(new BidiSpan(0,0,F[0].length))),lst(P).level==1&&(F=e.match(/\s+$/))&&(lst(P).to-=F[0].length,P.push(new BidiSpan(0,c-F[0].length,c)))),t==`rtl`?P.reverse():P}})();function getOrder(e,t){var n=e.order;return n??=e.order=I(e.text,t),n}var ee=[],on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent(`on`+t,n);else{var r=e._handlers||={};r[t]=(r[t]||ee).concat(n)}};function getHandlers(e,t){return e._handlers&&e._handlers[t]||ee}function off(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent(`on`+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=indexOf(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function signal(e,t){var n=getHandlers(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function signalDOMEvent(e,t,n){return typeof t==`string`&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),signal(e,n||t.type,e,t),e_defaultPrevented(t)||t.codemirrorIgnore}function signalCursorActivity(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)indexOf(n,t[r])==-1&&n.push(t[r])}function hasHandler(e,t){return getHandlers(e,t).length>0}function eventMixin(e){e.prototype.on=function(e,t){on(this,e,t)},e.prototype.off=function(e,t){off(this,e,t)}}function e_preventDefault(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function e_stopPropagation(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function e_defaultPrevented(e){return e.defaultPrevented==null?e.returnValue==0:e.defaultPrevented}function e_stop(e){e_preventDefault(e),e_stopPropagation(e)}function e_target(e){return e.target||e.srcElement}function e_button(e){var t=e.which;return t??(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),b&&e.ctrlKey&&t==1&&(t=3),t}var L=function(){if(o&&s<9)return!1;var e=elt(`div`);return`draggable`in e||`dragDrop`in e}(),R;function zeroWidthElement(e){if(R==null){var t=elt(`span`,`​`);removeChildrenAndAdd(e,elt(`span`,[t,document.createTextNode(`x`)])),e.firstChild.offsetHeight!=0&&(R=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=R?elt(`span`,`​`):elt(`span`,`\xA0`,null,`display: inline-block; width: 1px; margin-right: -1px`);return n.setAttribute(`cm-text`,``),n}var z;function hasBadBidiRects(e){if(z!=null)return z;var t=removeChildrenAndAdd(e,document.createTextNode(`AخA`)),n=E(t,0,1).getBoundingClientRect(),r=E(t,1,2).getBoundingClientRect();return removeChildren(e),!n||n.left==n.right?!1:z=r.right-n.right<3}var B=`
2
+
3
+ b`.split(/\n/).length==3?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
4
+ `,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)==`\r`?i-1:i),o=a.indexOf(`\r`);o==-1?(n.push(a),t=i+1):(n.push(a.slice(0,o)),t+=o+1)}return n},te=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints(`StartToEnd`,t)!=0},ne=(function(){var e=elt(`div`);return`oncopy`in e?!0:(e.setAttribute(`oncopy`,`return;`),typeof e.oncopy==`function`)})(),re=null;function hasBadZoomedRects(e){if(re!=null)return re;var t=removeChildrenAndAdd(e,elt(`span`,`x`)),n=t.getBoundingClientRect(),r=E(t,0,1).getBoundingClientRect();return re=Math.abs(n.left-r.left)>1}var ie={},V={};function defineMode(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ie[e]=t}function defineMIME(e,t){V[e]=t}function resolveMode(e){if(typeof e==`string`&&V.hasOwnProperty(e))e=V[e];else if(e&&typeof e.name==`string`&&V.hasOwnProperty(e.name)){var t=V[e.name];typeof t==`string`&&(t={name:t}),e=createObj(t,e),e.name=t.name}else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return resolveMode(`application/xml`);else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return resolveMode(`application/json`);return typeof e==`string`?{name:e}:e||{name:`null`}}function getMode(e,t){t=resolveMode(t);var n=ie[t.name];if(!n)return getMode(e,`text/plain`);var r=n(e,t);if(H.hasOwnProperty(t.name)){var i=H[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r[`_`+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var H={};function extendMode(e,t){copyObj(t,H.hasOwnProperty(e)?H[e]:H[e]={})}function copyState(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function innerMode(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function startState(e,t,n){return e.startState?e.startState(t,n):!0}var StringStream=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};StringStream.prototype.eol=function(){return this.pos>=this.string.length},StringStream.prototype.sol=function(){return this.pos==this.lineStart},StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},StringStream.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},StringStream.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(typeof e==`string`?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},StringStream.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},StringStream.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},StringStream.prototype.skipToEnd=function(){this.pos=this.string.length},StringStream.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},StringStream.prototype.backUp=function(e){this.pos-=e},StringStream.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},StringStream.prototype.indentation=function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},StringStream.prototype.match=function(e,t,n){if(typeof e==`string`){var cased=function(e){return n?e.toLowerCase():e};if(cased(this.string.substr(this.pos,e.length))==cased(e))return t!==!1&&(this.pos+=e.length),!0}else{var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}},StringStream.prototype.current=function(){return this.string.slice(this.start,this.pos)},StringStream.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},StringStream.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},StringStream.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function getLine(e,t){if(t-=e.first,t<0||t>=e.size)throw Error(`There is no line `+(t+e.first)+` in the document.`);for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function getBetween(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function getLines(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function updateLineHeight(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function lineNo(e){if(e.parent==null)return null;for(var t=e.parent,n=indexOf(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function lineAtHeight(e,t){var n=e.first;outer:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue outer}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function isLine(e,t){return t>=e.first&&t<e.first+e.size}function lineNumberFor(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Pos(e,t,n){if(n===void 0&&(n=null),!(this instanceof Pos))return new Pos(e,t,n);this.line=e,this.ch=t,this.sticky=n}function cmp(e,t){return e.line-t.line||e.ch-t.ch}function equalCursorPos(e,t){return e.sticky==t.sticky&&cmp(e,t)==0}function copyPos(e){return Pos(e.line,e.ch)}function maxPos(e,t){return cmp(e,t)<0?t:e}function minPos(e,t){return cmp(e,t)<0?e:t}function clipLine(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function clipPos(e,t){if(t.line<e.first)return Pos(e.first,0);var n=e.first+e.size-1;return t.line>n?Pos(n,getLine(e,n).text.length):clipToLen(t,getLine(e,t.line).text.length)}function clipToLen(e,t){var n=e.ch;return n==null||n>t?Pos(e.line,t):n<0?Pos(e.line,0):e}function clipPosArray(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=clipPos(e,t[r]);return n}var SavedContext=function(e,t){this.state=e,this.lookAhead=t},Context=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Context.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Context.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}},Context.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Context.fromSaved=function(e,t,n){return t instanceof SavedContext?new Context(e,copyState(e.mode,t.state),n,t.lookAhead):new Context(e,copyState(e.mode,t),n)},Context.prototype.save=function(e){var t=e===!1?this.state:copyState(this.doc.mode,this.state);return this.maxLookAhead>0?new SavedContext(t,this.maxLookAhead):t};function highlightLine(e,t,n,r){var i=[e.state.modeGen],a={};runMode(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},a,r);for(var o=n.state,loop=function(r){n.baseTokens=i;var s=e.state.overlays[r],c=1,l=0;n.state=!0,runMode(e,t.text,s.mode,n,function(e,t){for(var n=c;l<e;){var r=i[c];r>e&&i.splice(c,1,e,i[c+1],r),c+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,c-n,e,`overlay `+t),c=n+2;else for(;n<c;n+=2){var a=i[n+1];i[n+1]=(a?a+` `:``)+`overlay `+t}},a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)loop(s);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function getLineStyles(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=getContextBefore(e,lineNo(t)),i=t.text.length>e.options.maxHighlightLength&&copyState(e.doc.mode,r.state),a=highlightLine(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&=null,n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function getContextBefore(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Context(r,!0,t);var a=findStartLine(e,t,n),o=a>r.first&&getLine(r,a-1).stateAfter,s=o?Context.fromSaved(r,o,a):new Context(r,startState(r.mode),a);return r.iter(a,t,function(n){processLine(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function processLine(e,t,n,r){var i=e.doc.mode,a=new StringStream(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==``&&callBlankLine(i,n.state);!a.eol();)readToken(i,a,n.state),a.start=a.pos}function callBlankLine(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=innerMode(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function readToken(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=innerMode(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw Error(`Mode `+e.name+` failed to advance stream.`)}var Token=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function takeToken(e,t,n,r){var i=e.doc,a=i.mode,o;t=clipPos(i,t);var s=getLine(i,t.line),c=getContextBefore(e,t.line,n),l=new StringStream(s.text,e.options.tabSize,c),u;for(r&&(u=[]);(r||l.pos<t.ch)&&!l.eol();)l.start=l.pos,o=readToken(a,l,c.state),r&&u.push(new Token(l,o,copyState(i.mode,c.state)));return r?u:new Token(l,o,c.state)}function extractLineClasses(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?`bgClass`:`textClass`;t[r]==null?t[r]=n[2]:RegExp(`(?:^|\\s)`+n[2]+`(?:$|\\s)`).test(t[r])||(t[r]+=` `+n[2])}return e}function runMode(e,t,n,r,i,a,o){var s=n.flattenSpans;s??=e.options.flattenSpans;var c=0,l=null,u=new StringStream(t,e.options.tabSize,r),d,f=e.options.addModeClass&&[null];for(t==``&&extractLineClasses(callBlankLine(n,r.state),a);!u.eol();){if(u.pos>e.options.maxHighlightLength?(s=!1,o&&processLine(e,t,r,u.pos),u.pos=t.length,d=null):d=extractLineClasses(readToken(n,u,r.state,f),a),f){var m=f[0].name;m&&(d=`m-`+(d?m+` `+d:m))}if(!s||l!=d){for(;c<u.start;)c=Math.min(u.start,c+5e3),i(c,l);l=d}u.start=u.pos}for(;c<u.pos;){var h=Math.min(u.pos,c+5e3);i(h,l),c=h}}function findStartLine(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var c=getLine(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof SavedContext?l.lookAhead:0)<=a.modeFrontier))return s;var u=countColumn(c.text,null,e.options.tabSize);(i==null||r>u)&&(i=s-1,r=u)}return i}function retreatFrontier(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=getLine(e,r).stateAfter;if(i&&(!(i instanceof SavedContext)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var ae=!1,U=!1;function seeReadOnlySpans(){ae=!0}function seeCollapsedSpans(){U=!0}function MarkedSpan(e,t,n){this.marker=e,this.from=t,this.to=n}function getMarkedSpanFor(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function removeMarkedSpan(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||=[]).push(e[r]);return n}function addMarkedSpan(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||=new WeakSet);r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function markedSpansBefore(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&o.type==`bookmark`&&(!n||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||=[]).push(new MarkedSpan(o,a.from,s?null:a.to))}}return r}function markedSpansAfter(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.to==null||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&o.type==`bookmark`&&(!n||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||=[]).push(new MarkedSpan(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function stretchSpansOverChange(e,t){if(t.full)return null;var n=isLine(e,t.from.line)&&getLine(e,t.from.line).markedSpans,r=isLine(e,t.to.line)&&getLine(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=cmp(t.from,t.to)==0,s=markedSpansBefore(n,i,o),c=markedSpansAfter(r,a,o),l=t.text.length==1,u=lst(t.text).length+(l?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(f.to==null){var m=getMarkedSpanFor(c,f.marker);m?l&&(f.to=m.to==null?null:m.to+u):f.to=i}}if(c)for(var h=0;h<c.length;++h){var g=c[h];g.to!=null&&(g.to+=u),g.from==null?getMarkedSpanFor(s,g.marker)||(g.from=u,l&&(s||=[]).push(g)):(g.from+=u,l&&(s||=[]).push(g))}s&&=clearEmptySpans(s),c&&c!=s&&(c=clearEmptySpans(c));var _=[s];if(!l){var v=t.text.length-2,y;if(v>0&&s)for(var b=0;b<s.length;++b)s[b].to??(y||=[]).push(new MarkedSpan(s[b].marker,null,null));for(var x=0;x<v;++x)_.push(y);_.push(c)}return _}function clearEmptySpans(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function removeReadOnlyRanges(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!r||indexOf(r,n)==-1)&&(r||=[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),c=0;c<i.length;++c){var l=i[c];if(!(cmp(l.to,s.from)<0||cmp(l.from,s.to)>0)){var u=[c,1],d=cmp(l.from,s.from),f=cmp(l.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:l.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function detachMarkedSpans(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function attachMarkedSpans(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function extraLeft(e){return e.inclusiveLeft?-1:0}function extraRight(e){return+!!e.inclusiveRight}function compareCollapsedMarkers(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=cmp(r.from,i.from)||extraLeft(e)-extraLeft(t);return a?-a:cmp(r.to,i.to)||extraRight(e)-extraRight(t)||t.id-e.id}function collapsedSpanAtSide(e,t){var n=U&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||compareCollapsedMarkers(r,i.marker)<0)&&(r=i.marker);return r}function collapsedSpanAtStart(e){return collapsedSpanAtSide(e,!0)}function collapsedSpanAtEnd(e){return collapsedSpanAtSide(e,!1)}function collapsedSpanAround(e,t){var n=U&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||compareCollapsedMarkers(r,a.marker)<0)&&(r=a.marker)}return r}function conflictingCollapsedRange(e,t,n,r,i){var a=getLine(e,t),o=U&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var c=o[s];if(c.marker.collapsed){var l=c.marker.find(0),u=cmp(l.from,n)||extraLeft(c.marker)-extraLeft(i),d=cmp(l.to,r)||extraRight(c.marker)-extraRight(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?cmp(l.to,n)>=0:cmp(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?cmp(l.from,r)<=0:cmp(l.from,r)<0)))return!0}}}function visualLine(e){for(var t;t=collapsedSpanAtStart(e);)e=t.find(-1,!0).line;return e}function visualLineEnd(e){for(var t;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line;return e}function visualLineContinued(e){for(var t,n;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line,(n||=[]).push(e);return n}function visualLineNo(e,t){var n=getLine(e,t),r=visualLine(n);return n==r?t:lineNo(r)}function visualLineEndNo(e,t){if(t>e.lastLine())return t;var n=getLine(e,t),r;if(!lineIsHidden(e,n))return t;for(;r=collapsedSpanAtEnd(n);)n=r.find(1,!0).line;return lineNo(n)+1}function lineIsHidden(e,t){var n=U&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed&&(r.from==null||!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&lineIsHiddenInner(e,t,r)))return!0}}function lineIsHiddenInner(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return lineIsHiddenInner(e,r.line,getMarkedSpanFor(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&lineIsHiddenInner(e,t,i))return!0}function heightAtLine(e){e=visualLine(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function lineLength(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=collapsedSpanAtStart(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=collapsedSpanAtEnd(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function findMaxLine(e){var t=e.display,n=e.doc;t.maxLine=getLine(n,n.first),t.maxLineLength=lineLength(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=lineLength(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Line=function(e,t,n){this.text=e,attachMarkedSpans(this,t),this.height=n?n(this):1};Line.prototype.lineNo=function(){return lineNo(this)},eventMixin(Line);function updateLine(e,t,n,r){e.text=t,e.stateAfter&&=null,e.styles&&=null,e.order!=null&&(e.order=null),detachMarkedSpans(e),attachMarkedSpans(e,n);var i=r?r(e):1;i!=e.height&&updateLineHeight(e,i)}function cleanUpLine(e){e.parent=null,detachMarkedSpans(e)}var oe={},se={};function interpretTokenStyle(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?se:oe;return n[e]||(n[e]=e.replace(/\S+/g,`cm-$&`))}function buildLineContent(e,t){var n=eltP(`span`,null,null,c?`padding-right: .1px`:null),r={pre:eltP(`pre`,[n],`CodeMirror-line`),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption(`lineWrapping`)};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=buildToken,hasBadBidiRects(e.display.measure)&&(o=getOrder(a,e.doc.direction))&&(r.addToken=buildTokenBadBidi(r.addToken,o)),r.map=[],insertLineContent(a,r,getLineStyles(e,a,t!=e.display.externalMeasured&&lineNo(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=joinClasses(a.styleClasses.bgClass,r.bgClass||``)),a.styleClasses.textClass&&(r.textClass=joinClasses(a.styleClasses.textClass,r.textClass||``))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(zeroWidthElement(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(`.cm-tab`))&&(r.content.className=`cm-tab-wrap-hack`)}return signal(e,`renderLine`,e,t.line,r.pre),r.pre.className&&(r.textClass=joinClasses(r.pre.className,r.textClass||``)),r}function defaultSpecialCharPlaceholder(e){var t=elt(`span`,`•`,`cm-invalidchar`);return t.title=`\\u`+e.charCodeAt(0).toString(16),t.setAttribute(`aria-label`,t.title),t}function buildToken(e,t,n,r,i,a,c){if(t){var l=e.splitSpaces?splitSpaces(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,f;if(!u.test(t))e.col+=t.length,f=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,f),o&&s<9&&(d=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var m=0;;){u.lastIndex=m;var h=u.exec(t),g=h?h.index-m:t.length-m;if(g){var _=document.createTextNode(l.slice(m,m+g));o&&s<9?f.appendChild(elt(`span`,[_])):f.appendChild(_),e.map.push(e.pos,e.pos+g,_),e.col+=g,e.pos+=g}if(!h)break;m+=g+1;var v=void 0;if(h[0]==` `){var y=e.cm.options.tabSize,b=y-e.col%y;v=f.appendChild(elt(`span`,spaceStr(b),`cm-tab`)),v.setAttribute(`role`,`presentation`),v.setAttribute(`cm-text`,` `),e.col+=b}else h[0]==`\r`||h[0]==`
5
+ `?(v=f.appendChild(elt(`span`,h[0]==`\r`?`␍`:`␤`,`cm-invalidchar`)),v.setAttribute(`cm-text`,h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute(`cm-text`,h[0]),o&&s<9?f.appendChild(elt(`span`,[v])):f.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||d||a||c){var x=n||``;r&&(x+=r),i&&(x+=i);var S=elt(`span`,[f],x,a);if(c)for(var C in c)c.hasOwnProperty(C)&&C!=`style`&&C!=`class`&&S.setAttribute(C,c[C]);return e.content.appendChild(S)}e.content.appendChild(f)}}function splitSpaces(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r=``,i=0;i<e.length;i++){var a=e.charAt(i);a==` `&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a=`\xA0`),r+=a,n=a==` `}return r}function buildTokenBadBidi(e,t){return function(n,r,i,a,o,s,c){i=i?i+` cm-force-border`:`cm-force-border`;for(var l=n.pos,u=l+r.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>l&&d.from<=l));f++);if(d.to>=u)return e(n,r,i,a,o,s,c);e(n,r.slice(0,d.to-l),i,a,null,s,c),a=null,r=r.slice(d.to-l),l=d.to}}}function buildCollapsedSpan(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||=e.content.appendChild(document.createElement(`span`)),i.setAttribute(`cm-marker`,n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function insertLineContent(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var o=1;o<n.length;o+=2)t.addToken(t,i.slice(a,a=n[o]),interpretTokenStyle(n[o+1],t.cm.options));return}for(var s=i.length,c=0,l=1,u=``,d,f,m=0,h,g,_,v,y;;){if(m==c){h=g=_=f=``,y=null,v=null,m=1/0;for(var b=[],x=void 0,S=0;S<r.length;++S){var C=r[S],w=C.marker;if(w.type==`bookmark`&&C.from==c&&w.widgetNode)b.push(w);else if(C.from<=c&&(C.to==null||C.to>c||w.collapsed&&C.to==c&&C.from==c)){if(C.to!=null&&C.to!=c&&m>C.to&&(m=C.to,g=``),w.className&&(h+=` `+w.className),w.css&&(f=(f?f+`;`:``)+w.css),w.startStyle&&C.from==c&&(_+=` `+w.startStyle),w.endStyle&&C.to==m&&(x||=[]).push(w.endStyle,C.to),w.title&&((y||={}).title=w.title),w.attributes)for(var T in w.attributes)(y||={})[T]=w.attributes[T];w.collapsed&&(!v||compareCollapsedMarkers(v.marker,w)<0)&&(v=C)}else C.from>c&&m>C.from&&(m=C.from)}if(x)for(var E=0;E<x.length;E+=2)x[E+1]==m&&(g+=` `+x[E]);if(!v||v.from==c)for(var D=0;D<b.length;++D)buildCollapsedSpan(t,0,b[D]);if(v&&(v.from||0)==c){if(buildCollapsedSpan(t,(v.to==null?s+1:v.to)-c,v.marker,v.from==null),v.to==null)return;v.to==c&&(v=!1)}}if(c>=s)break;for(var O=Math.min(s,m);;){if(u){var k=c+u.length;if(!v){var A=k>O?u.slice(0,O-c):u;t.addToken(t,A,d?d+h:h,_,c+A.length==m?g:``,f,y)}if(k>=O){u=u.slice(O-c),c=O;break}c=k,_=``}u=i.slice(a,a=n[l++]),d=interpretTokenStyle(n[l++],t.cm.options)}}}function LineView(e,t,n){this.line=t,this.rest=visualLineContinued(t),this.size=this.rest?lineNo(lst(this.rest))-n+1:1,this.node=this.text=null,this.hidden=lineIsHidden(e,t)}function buildViewArray(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new LineView(e.doc,getLine(e.doc,a),a);i=a+o.size,r.push(o)}return r}var W=null;function pushOperation(e){W?W.ops.push(e):e.ownsGroup=W={ops:[e],delayedCallbacks:[]}}function fireCallbacksForOps(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function finishOperation(e,t){var n=e.ownsGroup;if(n)try{fireCallbacksForOps(n)}finally{W=null,t(n)}}var G=null;function signalLater(e,t){var n=getHandlers(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;W?i=W.delayedCallbacks:G?i=G:(i=G=[],setTimeout(fireOrphanDelayed,0));for(var loop=function(e){i.push(function(){return n[e].apply(null,r)})},a=0;a<n.length;++a)loop(a)}}function fireOrphanDelayed(){var e=G;G=null;for(var t=0;t<e.length;++t)e[t]()}function updateLineForChanges(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a==`text`?updateLineText(e,t):a==`gutter`?updateLineGutter(e,t,n,r):a==`class`?updateLineClasses(e,t):a==`widget`&&updateLineWidgets(e,t,r)}t.changes=null}function ensureLineWrapped(e){return e.node==e.text&&(e.node=elt(`div`,null,null,`position: relative`),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function updateLineBackground(e,t){var n=t.bgClass?t.bgClass+` `+(t.line.bgClass||``):t.line.bgClass;if(n&&(n+=` CodeMirror-linebackground`),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=ensureLineWrapped(t);t.background=r.insertBefore(elt(`div`,null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function getLineContent(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):buildLineContent(e,t)}function updateLineText(e,t){var n=t.text.className,r=getLineContent(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,updateLineClasses(e,t)):n&&(t.text.className=n)}function updateLineClasses(e,t){updateLineBackground(e,t),t.line.wrapClass?ensureLineWrapped(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=``);var n=t.textClass?t.textClass+` `+(t.line.textClass||``):t.line.textClass;t.text.className=n||``}function updateLineGutter(e,t,n,r){if(t.gutter&&=(t.node.removeChild(t.gutter),null),t.gutterBackground&&=(t.node.removeChild(t.gutterBackground),null),t.line.gutterClass){var i=ensureLineWrapped(t);t.gutterBackground=elt(`div`,null,`CodeMirror-gutter-background `+t.line.gutterClass,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px; width: `+r.gutterTotalWidth+`px`),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ensureLineWrapped(t),s=t.gutter=elt(`div`,null,`CodeMirror-gutter-wrapper`,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px`);if(s.setAttribute(`aria-hidden`,`true`),e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=` `+t.line.gutterClass),e.options.lineNumbers&&(!a||!a[`CodeMirror-linenumbers`])&&(t.lineNumber=s.appendChild(elt(`div`,lineNumberFor(e.options,n),`CodeMirror-linenumber CodeMirror-gutter-elt`,`left: `+r.gutterLeft[`CodeMirror-linenumbers`]+`px; width: `+e.display.lineNumInnerWidth+`px`))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=a.hasOwnProperty(l)&&a[l];u&&s.appendChild(elt(`div`,[u],`CodeMirror-gutter-elt`,`left: `+r.gutterLeft[l]+`px; width: `+r.gutterWidth[l]+`px`))}}}function updateLineWidgets(e,t,n){t.alignable&&=null;for(var r=classTest(`CodeMirror-linewidget`),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);insertLineWidgets(e,t,n)}function buildLineElement(e,t,n,r){var i=getLineContent(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),updateLineClasses(e,t),updateLineGutter(e,t,n,r),insertLineWidgets(e,t,r),t.node}function insertLineWidgets(e,t,n){if(insertLineWidgetsFor(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)insertLineWidgetsFor(e,t.rest[r],t,n,!1)}function insertLineWidgetsFor(e,t,n,r,i){if(t.widgets)for(var a=ensureLineWrapped(n),o=0,s=t.widgets;o<s.length;++o){var c=s[o],l=elt(`div`,[c.node],`CodeMirror-linewidget`+(c.className?` `+c.className:``));c.handleMouseEvents||l.setAttribute(`cm-ignore-events`,`true`),positionLineWidget(c,l,n,r),e.display.input.setUneditable(l),i&&c.above?a.insertBefore(l,n.gutter||n.text):a.appendChild(l),signalLater(c,`redraw`)}}function positionLineWidget(e,t,n,r){if(e.noHScroll){(n.alignable||=[]).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+`px`,e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+`px`),t.style.width=i+`px`}e.coverGutter&&(t.style.zIndex=5,t.style.position=`relative`,e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+`px`))}function widgetHeight(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!contains(document.body,e.node)){var n=`position: relative;`;e.coverGutter&&(n+=`margin-left: -`+t.display.gutters.offsetWidth+`px;`),e.noHScroll&&(n+=`width: `+t.display.wrapper.clientWidth+`px;`),removeChildrenAndAdd(t.display.measure,elt(`div`,[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function eventInWidget(e,t){for(var n=e_target(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute(`cm-ignore-events`)==`true`||n.parentNode==e.sizer&&n!=e.mover)return!0}function paddingTop(e){return e.lineSpace.offsetTop}function paddingVert(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function paddingH(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=removeChildrenAndAdd(e.measure,elt(`pre`,`x`,`CodeMirror-line-like`)),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function scrollGap(e){return D-e.display.nativeBarWidth}function displayWidth(e){return e.display.scroller.clientWidth-scrollGap(e)-e.display.barWidth}function displayHeight(e){return e.display.scroller.clientHeight-scrollGap(e)-e.display.barHeight}function ensureLineHeights(e,t,n){var r=e.options.lineWrapping,i=r&&displayWidth(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var c=o[s],l=o[s+1];Math.abs(c.bottom-l.bottom)>2&&a.push((c.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function mapFromLineView(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(lineNo(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function updateExternalMeasurement(e,t){t=visualLine(t);var n=lineNo(t),r=e.display.externalMeasured=new LineView(e.doc,t,n);r.lineN=n;var i=r.built=buildLineContent(e,r);return r.text=i.pre,removeChildrenAndAdd(e.display.lineMeasure,i.pre),r}function measureChar(e,t,n,r){return measureCharPrepared(e,prepareMeasureForLine(e,t),n,r)}function findViewForLine(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[findViewIndex(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function prepareMeasureForLine(e,t){var n=lineNo(t),r=findViewForLine(e,n);r&&!r.text?r=null:r&&r.changes&&(updateLineForChanges(e,r,n,getDimensions(e)),e.curOp.forceUpdate=!0),r||=updateExternalMeasurement(e,t);var i=mapFromLineView(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function measureCharPrepared(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||``),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||=t.view.text.getBoundingClientRect(),t.hasHeights||=(ensureLineHeights(e,t.view,t.rect),!0),o=measureCharInner(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ce={left:0,right:0,top:0,bottom:0};function nodeAndOffsetInLineMap(e,t,n){for(var r,i,a,o,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,a=1,o=`left`):t<c?(i=t-s,a=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(a=c-s,i=a-1,t>=c&&(o=`right`)),i!=null){if(r=e[l+2],s==c&&n==(r.insertLeft?`left`:`right`)&&(o=n),n==`left`&&i==0)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[(l-=3)+2],o=`left`;if(n==`right`&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)r=e[(l+=3)+2],o=`right`;break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:c}}function getUsefulRect(e,t){var n=ce;if(t==`left`)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function measureCharInner(e,t,n,r){var i=nodeAndOffsetInLineMap(t.map,n,r),a=i.node,c=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var f=0;f<4;f++){for(;c&&isExtendingChar(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+l<i.coverEnd&&isExtendingChar(t.line.text.charAt(i.coverStart+l));)++l;if(d=o&&s<9&&c==0&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():getUsefulRect(E(a,c,l).getClientRects(),r),d.left||d.right||c==0)break;l=c,--c,u=`right`}o&&s<11&&(d=maybeUpdateRectForZooming(e.display.measure,d))}else{c>0&&(u=r=`right`);var m;d=e.options.lineWrapping&&(m=a.getClientRects()).length>1?m[r==`right`?m.length-1:0]:a.getBoundingClientRect()}if(o&&s<9&&!c&&(!d||!d.left&&!d.right)){var h=a.parentNode.getClientRects()[0];d=h?{left:h.left,right:h.left+charWidth(e.display),top:h.top,bottom:h.bottom}:ce}for(var g=d.top-t.rect.top,_=d.bottom-t.rect.top,v=(g+_)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,S=y[b],C={left:(u==`right`?d.right:d.left)-t.rect.left,right:(u==`left`?d.left:d.right)-t.rect.left,top:x,bottom:S};return!d.left&&!d.right&&(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=_),C}function maybeUpdateRectForZooming(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!hasBadZoomedRects(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function clearLineMeasurementCacheFor(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 clearLineMeasurementCache(e){e.display.externalMeasure=null,removeChildren(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)clearLineMeasurementCacheFor(e.display.view[t])}function clearCaches(e){clearLineMeasurementCache(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function pageScrollX(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function pageScrollY(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function widgetTopHeight(e){var t=visualLine(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=widgetHeight(t[r]));return n}function intoCoordSystem(e,t,n,r,i){if(!i){var a=widgetTopHeight(t);n.top+=a,n.bottom+=a}if(r==`line`)return n;r||=`local`;var o=heightAtLine(t);if(r==`local`?o+=paddingTop(e.display):o-=e.display.viewOffset,r==`page`||r==`window`){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(r==`window`?0:pageScrollY(doc(e)));var c=s.left+(r==`window`?0:pageScrollX(doc(e)));n.left+=c,n.right+=c}return n.top+=o,n.bottom+=o,n}function fromCoordSystem(e,t,n){if(n==`div`)return t;var r=t.left,i=t.top;if(n==`page`)r-=pageScrollX(doc(e)),i-=pageScrollY(doc(e));else if(n==`local`||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function charCoords(e,t,n,r,i){return r||=getLine(e.doc,t.line),intoCoordSystem(e,r,measureChar(e,r,t.ch,i),n)}function cursorCoords(e,t,n,r,i,a){r||=getLine(e.doc,t.line),i||=prepareMeasureForLine(e,r);function get(t,o){var s=measureCharPrepared(e,i,t,o?`right`:`left`,a);return o?s.left=s.right:s.right=s.left,intoCoordSystem(e,r,s,n)}var o=getOrder(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c=`before`):s<=0&&(s=0,c=`after`),!o)return get(c==`before`?s-1:s,c==`before`);function getBidi(e,t,n){var r=o[t].level==1;return get(n?e-1:e,r!=n)}var l=getBidiPartAt(o,s,c),u=F,d=getBidi(s,l,c==`before`);return u!=null&&(d.other=getBidi(s,u,c!=`before`)),d}function estimateCoords(e,t){var n=0;t=clipPos(e.doc,t),e.options.lineWrapping||(n=charWidth(e.display)*t.ch);var r=getLine(e.doc,t.line),i=heightAtLine(r)+paddingTop(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function PosWithInfo(e,t,n,r,i){var a=Pos(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function coordsChar(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return PosWithInfo(r.first,0,null,-1,-1);var i=lineAtHeight(r,n),a=r.first+r.size-1;if(i>a)return PosWithInfo(r.first+r.size-1,getLine(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=getLine(r,i);;){var s=coordsCharInner(e,o,i,t,n),c=collapsedSpanAround(o,s.ch+ +(s.xRel>0||s.outside>0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;o=getLine(r,i=l.line)}}function wrappedLineExtent(e,t,n,r){r-=widgetTopHeight(t);var i=t.text.length,a=findFirst(function(t){return measureCharPrepared(e,n,t-1).bottom<=r},i,0);return i=findFirst(function(t){return measureCharPrepared(e,n,t).top>r},a,i),{begin:a,end:i}}function wrappedLineExtentChar(e,t,n,r){n||=prepareMeasureForLine(e,t);var i=intoCoordSystem(e,t,measureCharPrepared(e,n,r),`line`).top;return wrappedLineExtent(e,t,n,i)}function boxIsAfter(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function coordsCharInner(e,t,n,r,i){i-=heightAtLine(t);var a=prepareMeasureForLine(e,t),o=widgetTopHeight(t),s=0,c=t.text.length,l=!0,u=getOrder(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?coordsBidiPartWrapped:coordsBidiPart)(e,t,n,a,u,r,i);l=d.level!=1,s=l?d.from:d.to-1,c=l?d.to:d.from-1}var f=null,m=null,h=findFirst(function(t){var n=measureCharPrepared(e,a,t);return n.top+=o,n.bottom+=o,boxIsAfter(n,r,i,!1)?(n.top<=i&&n.left<=r&&(f=t,m=n),!0):!1},s,c),g,_,v=!1;if(m){var y=r-m.left<m.right-r,b=y==l;h=f+ +!b,_=b?`after`:`before`,g=y?m.left:m.right}else{!l&&(h==c||h==s)&&h++,_=h==0?`after`:h==t.text.length?`before`:measureCharPrepared(e,a,h-+!!l).bottom+o<=i==l?`after`:`before`;var x=cursorCoords(e,Pos(n,h,_),`line`,t,a);g=x.left,v=i<x.top?-1:+(i>=x.bottom)}return h=skipExtendingChars(t.text,h,1),PosWithInfo(n,h,_,v,r-g)}function coordsBidiPart(e,t,n,r,i,a,o){var s=findFirst(function(s){var c=i[s],l=c.level!=1;return boxIsAfter(cursorCoords(e,Pos(n,l?c.to:c.from,l?`before`:`after`),`line`,t,r),a,o,!0)},0,i.length-1),c=i[s];if(s>0){var l=c.level!=1,u=cursorCoords(e,Pos(n,l?c.from:c.to,l?`after`:`before`),`line`,t,r);boxIsAfter(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function coordsBidiPartWrapped(e,t,n,r,i,a,o){var s=wrappedLineExtent(e,t,r,o),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,d=null,f=0;f<i.length;f++){var m=i[f];if(!(m.from>=l||m.to<=c)){var h=measureCharPrepared(e,r,m.level==1?Math.max(c,m.from):Math.min(l,m.to)-1).right,g=h<a?a-h+1e9:h-a;(!u||d>g)&&(u=m,d=g)}}return u||=i[i.length-1],u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}var K;function textHeight(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(K==null){K=elt(`pre`,null,`CodeMirror-line-like`);for(var t=0;t<49;++t)K.appendChild(document.createTextNode(`x`)),K.appendChild(elt(`br`));K.appendChild(document.createTextNode(`x`))}removeChildrenAndAdd(e.measure,K);var n=K.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),removeChildren(e.measure),n||1}function charWidth(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=elt(`span`,`xxxxxxxxxx`),n=elt(`pre`,[t],`CodeMirror-line-like`);removeChildrenAndAdd(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function getDimensions(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:compensateForHScroll(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function compensateForHScroll(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function estimateHeight(e){var t=textHeight(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/charWidth(e.display)-3);return function(i){if(lineIsHidden(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function estimateLineHeights(e){var t=e.doc,n=estimateHeight(e);t.iter(function(e){var t=n(e);t!=e.height&&updateLineHeight(e,t)})}function posFromMouse(e,t,n,r){var i=e.display;if(!n&&e_target(t).getAttribute(`cm-not-content`)==`true`)return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch{return null}var c=coordsChar(e,a,o),l;if(r&&c.xRel>0&&(l=getLine(e.doc,c.line).text).length==c.ch){var u=countColumn(l,l.length,e.options.tabSize)-l.length;c=Pos(c.line,Math.max(0,Math.round((a-paddingH(e.display).left)/charWidth(e.display))-u))}return c}function findViewIndex(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function regChange(e,t,n,r){t??=e.doc.first,n??=e.doc.first+e.doc.size,r||=0;var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)U&&visualLineNo(e.doc,t)<i.viewTo&&resetView(e);else if(n<=i.viewFrom)U&&visualLineEndNo(e.doc,n+r)>i.viewFrom?resetView(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)resetView(e);else if(t<=i.viewFrom){var a=viewCuttingPoint(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):resetView(e)}else if(n>=i.viewTo){var o=viewCuttingPoint(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):resetView(e)}else{var s=viewCuttingPoint(e,t,t,-1),c=viewCuttingPoint(e,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(buildViewArray(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):resetView(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function regLineChange(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[findViewIndex(e,t)];if(a.node!=null){var o=a.changes||=[];indexOf(o,n)==-1&&o.push(n)}}}function resetView(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function viewCuttingPoint(e,t,n,r){var i=findViewIndex(e,t),a,o=e.display.view;if(!U||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=o[c].size;if(s!=t){if(r>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,n+=a}for(;visualLineNo(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-+(r<0)].size,i+=r}return{index:i,lineN:n}}function adjustView(e,t,n){var r=e.display;r.view.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=buildViewArray(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=buildViewArray(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(findViewIndex(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(buildViewArray(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,findViewIndex(e,n)))),r.viewTo=n}function countDirtyView(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function updateSelection(e){e.display.input.showSelection(e.display.input.prepareSelection())}function prepareSelection(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(!(!t&&s==n.sel.primIndex)){var c=n.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(o){var u=o(e,c);u&&drawSelectionCursor(e,u,i)}else (l||e.options.showCursorWhenSelecting)&&drawSelectionCursor(e,c.head,i);l||drawSelectionRange(e,c,a)}}return r}function drawSelectionCursor(e,t,n){var r=cursorCoords(e,t,`div`,null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(elt(`div`,`\xA0`,`CodeMirror-cursor`));if(i.style.left=r.left+`px`,i.style.top=r.top+`px`,i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+`px`,/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=charCoords(e,t,`div`,null,null),o=a.right-a.left;i.style.width=(o>0?o:e.defaultCharWidth())+`px`}if(r.other){var s=n.appendChild(elt(`div`,`\xA0`,`CodeMirror-cursor CodeMirror-secondarycursor`));s.style.display=``,s.style.left=r.other.left+`px`,s.style.top=r.other.top+`px`,s.style.height=(r.other.bottom-r.other.top)*.85+`px`}}function cmpCoords(e,t){return e.top-t.top||e.left-t.left}function drawSelectionRange(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=paddingH(e.display),s=o.left,c=Math.max(r.sizerWidth,displayWidth(e)-r.sizer.offsetLeft)-o.right,l=i.direction==`ltr`;function add(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(elt(`div`,null,`CodeMirror-selected`,`position: absolute; left: `+e+`px;
6
+ top: `+t+`px; width: `+(n??c-e)+`px;
7
+ height: `+(r-t)+`px`))}function drawForLine(t,n,r){var a=getLine(i,t),o=a.text.length,u,d;function coords(n,r){return charCoords(e,Pos(t,n),`div`,a,r)}function wrapX(t,n,r){var i=wrappedLineExtentChar(e,a,null,t),o=n==`ltr`==(r==`after`)?`left`:`right`;return coords(r==`after`?i.begin:i.end-(/\s/.test(a.text.charAt(i.end-1))?2:1),o)[o]}var f=getOrder(a,i.direction);return iterateBidiSections(f,n||0,r??o,function(e,t,i,a){var m=i==`ltr`,h=coords(e,m?`left`:`right`),g=coords(t-1,m?`right`:`left`),_=n==null&&e==0,v=r==null&&t==o,y=a==0,b=!f||a==f.length-1;if(g.top-h.top<=3){var x=(l?_:v)&&y,S=(l?v:_)&&b,C=x?s:(m?h:g).left,w=S?c:(m?g:h).right;add(C,h.top,w-C,h.bottom)}else{var T,E,D,O;m?(T=l&&_&&y?s:h.left,E=l?c:wrapX(e,i,`before`),D=l?s:wrapX(t,i,`after`),O=l&&v&&b?c:g.right):(T=l?wrapX(e,i,`before`):s,E=!l&&_&&y?c:h.right,D=!l&&v&&b?s:g.left,O=l?wrapX(t,i,`after`):c),add(T,h.top,E-T,h.bottom),h.bottom<g.top&&add(s,h.bottom,null,g.top),add(D,g.top,O-D,g.bottom)}(!u||cmpCoords(h,u)<0)&&(u=h),cmpCoords(g,u)<0&&(u=g),(!d||cmpCoords(h,d)<0)&&(d=h),cmpCoords(g,d)<0&&(d=g)}),{start:u,end:d}}var u=t.from(),d=t.to();if(u.line==d.line)drawForLine(u.line,u.ch,d.ch);else{var f=getLine(i,u.line),m=getLine(i,d.line),h=visualLine(f)==visualLine(m),g=drawForLine(u.line,u.ch,h?f.text.length+1:null).end,_=drawForLine(d.line,h?0:null,d.ch).start;h&&(g.top<_.top-2?(add(g.right,g.top,null,g.bottom),add(s,_.top,_.left,_.bottom)):add(g.right,g.top,_.left-g.right,g.bottom)),g.bottom<_.top&&add(s,g.bottom,null,_.top)}n.appendChild(a)}function restartBlink(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility=``,e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||onBlur(e),t.cursorDiv.style.visibility=(n=!n)?``:`hidden`},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=`hidden`)}}function ensureFocus(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||onFocus(e))}function delayBlurEvent(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&onBlur(e))},100)}function onFocus(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=`nocursor`&&(e.state.focused||(signal(e,`focus`,e,t),e.state.focused=!0,addClass(e.display.wrapper,`CodeMirror-focused`),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),restartBlink(e))}function onBlur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(signal(e,`blur`,e,t),e.state.focused=!1,rmClass(e.display.wrapper,`CodeMirror-focused`)),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function updateHeightsInViewport(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,d=void 0,f=0;if(!l.hidden){if(i+=l.line.height,o&&s<8){var m=l.node.offsetTop+l.node.offsetHeight;d=m-n,n=m}else{var h=l.node.getBoundingClientRect();d=h.bottom-h.top,!u&&l.text.firstChild&&(f=l.text.firstChild.getBoundingClientRect().right-h.left-1)}var g=l.line.height-d;if((g>.005||g<-.005)&&(i<r&&(a-=g),updateLineHeight(l.line,d),updateWidgetHeight(l.line),l.rest))for(var _=0;_<l.rest.length;_++)updateWidgetHeight(l.rest[_]);if(f>e.display.sizerWidth){var v=Math.ceil(f/charWidth(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function updateWidgetHeight(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function visibleLines(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-paddingTop(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=lineAtHeight(t,r),o=lineAtHeight(t,i);if(n&&n.ensure){var s=n.ensure.from.line,c=n.ensure.to.line;s<a?(a=s,o=lineAtHeight(t,heightAtLine(getLine(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=lineAtHeight(t,heightAtLine(getLine(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function maybeScrollWindow(e,t){if(!signalDOMEvent(e,`scrollCursorIntoView`)){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!g){var o=elt(`div`,`​`,null,`position: absolute;
8
+ top: `+(t.top-n.viewOffset-paddingTop(e.display))+`px;
9
+ height: `+(t.bottom-t.top+scrollGap(e)+n.barHeight)+`px;
10
+ 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)}}}function scrollPosIntoView(e,t,n,r){r??=0;var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==`before`?Pos(t.line,t.ch+1,`before`):t,t=t.ch?Pos(t.line,t.sticky==`before`?t.ch-1:t.ch,`after`):t);for(var a=0;a<5;a++){var o=!1,s=cursorCoords(e,t),c=!n||n==t?s:cursorCoords(e,n);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r};var l=calculateScrollPos(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(l.scrollTop!=null&&(updateScrollTop(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),l.scrollLeft!=null&&(setScrollLeft(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}function scrollIntoView(e,t){var n=calculateScrollPos(e,t);n.scrollTop!=null&&updateScrollTop(e,n.scrollTop),n.scrollLeft!=null&&setScrollLeft(e,n.scrollLeft)}function calculateScrollPos(e,t){var n=e.display,r=textHeight(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=displayHeight(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+paddingVert(n),c=t.top<r,l=t.bottom>s-r;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(l?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-d,m=displayWidth(e)-n.gutters.offsetWidth,h=t.right-t.left>m;return h&&(t.right=t.left+m),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>m+f-3&&(o.scrollLeft=t.right+(h?0:10)-m),o}function addToScrollTop(e,t){t!=null&&(resolveScrollToPos(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ensureCursorVisible(e){resolveScrollToPos(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function scrollToCoords(e,t,n){(t!=null||n!=null)&&resolveScrollToPos(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function scrollToRange(e,t){resolveScrollToPos(e),e.curOp.scrollToPos=t}function resolveScrollToPos(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,scrollToCoordsRange(e,estimateCoords(e,t.from),estimateCoords(e,t.to),t.margin))}function scrollToCoordsRange(e,t,n,r){var i=calculateScrollPos(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});scrollToCoords(e,i.scrollLeft,i.scrollTop)}function updateScrollTop(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||updateDisplaySimple(e,{top:t}),setScrollTop(e,t,!0),n&&updateDisplaySimple(e),startWorker(e,100))}function setScrollTop(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function setScrollLeft(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,alignHorizontally(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function measureForScrollbars(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+paddingVert(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+scrollGap(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var NativeScrollbars=function(e,t,n){this.cm=n;var r=this.vert=elt(`div`,[elt(`div`,null,null,`min-width: 1px`)],`CodeMirror-vscrollbar`),i=this.horiz=elt(`div`,[elt(`div`,null,null,`height: 100%; min-height: 1px`)],`CodeMirror-hscrollbar`);r.tabIndex=i.tabIndex=-1,e(r),e(i),on(r,`scroll`,function(){r.clientHeight&&t(r.scrollTop,`vertical`)}),on(i,`scroll`,function(){i.clientWidth&&t(i.scrollLeft,`horizontal`)}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=`18px`)};NativeScrollbars.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display=`block`,this.vert.style.bottom=t?r+`px`:`0`;var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+`px`}else this.vert.scrollTop=0,this.vert.style.display=``,this.vert.firstChild.style.height=`0`;if(t){this.horiz.style.display=`block`,this.horiz.style.right=n?r+`px`:`0`,this.horiz.style.left=e.barLeft+`px`;var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+`px`}else this.horiz.style.display=``,this.horiz.firstChild.style.width=`0`;return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},NativeScrollbars.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,`horiz`)},NativeScrollbars.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,`vert`)},NativeScrollbars.prototype.zeroWidthHack=function(){var e=b&&!h?`12px`:`18px`;this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility=`hidden`,this.disableHoriz=new Delayed,this.disableVert=new Delayed},NativeScrollbars.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility=``;function maybeDisable(){var r=e.getBoundingClientRect();(n==`vert`?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))==e?t.set(1e3,maybeDisable):e.style.visibility=`hidden`}t.set(1e3,maybeDisable)},NativeScrollbars.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var NullScrollbars=function(){};NullScrollbars.prototype.update=function(){return{bottom:0,right:0}},NullScrollbars.prototype.setScrollLeft=function(){},NullScrollbars.prototype.setScrollTop=function(){},NullScrollbars.prototype.clear=function(){};function updateScrollbars(e,t){t||=measureForScrollbars(e);var n=e.display.barWidth,r=e.display.barHeight;updateScrollbarsInner(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&updateHeightsInViewport(e),updateScrollbarsInner(e,measureForScrollbars(e)),n=e.display.barWidth,r=e.display.barHeight}function updateScrollbarsInner(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+`px`,n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+`px`,n.heightForcer.style.borderBottom=r.bottom+`px solid transparent`,r.right&&r.bottom?(n.scrollbarFiller.style.display=`block`,n.scrollbarFiller.style.height=r.bottom+`px`,n.scrollbarFiller.style.width=r.right+`px`):n.scrollbarFiller.style.display=``,r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display=`block`,n.gutterFiller.style.height=r.bottom+`px`,n.gutterFiller.style.width=t.gutterWidth+`px`):n.gutterFiller.style.display=``}var le={native:NativeScrollbars,null:NullScrollbars};function initScrollbars(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&rmClass(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new le[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),on(t,`mousedown`,function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute(`cm-not-content`,`true`)},function(t,n){n==`horizontal`?setScrollLeft(e,t):updateScrollTop(e,t)},e),e.display.scrollbars.addClass&&addClass(e.display.wrapper,e.display.scrollbars.addClass)}var ue=0;function startOperation(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:++ue,markArrays:null},pushOperation(e.curOp)}function endOperation(e){var t=e.curOp;t&&finishOperation(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;endOperations(e)})}function endOperations(e){for(var t=e.ops,n=0;n<t.length;n++)endOperation_R1(t[n]);for(var r=0;r<t.length;r++)endOperation_W1(t[r]);for(var i=0;i<t.length;i++)endOperation_R2(t[i]);for(var a=0;a<t.length;a++)endOperation_W2(t[a]);for(var o=0;o<t.length;o++)endOperation_finish(t[o])}function endOperation_R1(e){var t=e.cm,n=t.display;maybeClipScrollbars(t),e.updateMaxLine&&findMaxLine(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new DisplayUpdate(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function endOperation_W1(e){e.updatedDisplay=e.mustUpdate&&updateDisplayIfNeeded(e.cm,e.update)}function endOperation_R2(e){var t=e.cm,n=t.display;e.updatedDisplay&&updateHeightsInViewport(t),e.barMeasure=measureForScrollbars(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=measureChar(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+scrollGap(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-displayWidth(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function endOperation_W2(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+`px`,e.maxScrollLeft<t.doc.scrollLeft&&setScrollLeft(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==activeElt(root(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&updateScrollbars(t,e.barMeasure),e.updatedDisplay&&setDocumentHeight(t,e.barMeasure),e.selectionChanged&&restartBlink(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ensureFocus(e.cm)}function endOperation_finish(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&postUpdateDisplay(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&setScrollTop(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&setScrollLeft(t,e.scrollLeft,!0,!0),e.scrollToPos&&maybeScrollWindow(t,scrollPosIntoView(t,clipPos(r,e.scrollToPos.from),clipPos(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||signal(i[o],`hide`);if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&signal(a[s],`unhide`);n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&signal(t,`changes`,t,e.changeObjs),e.update&&e.update.finish()}function runInOp(e,t){if(e.curOp)return t();startOperation(e);try{return t()}finally{endOperation(e)}}function operation(e,t){return function(){if(e.curOp)return t.apply(e,arguments);startOperation(e);try{return t.apply(e,arguments)}finally{endOperation(e)}}}function methodOp(e){return function(){if(this.curOp)return e.apply(this,arguments);startOperation(this);try{return e.apply(this,arguments)}finally{endOperation(this)}}}function docMethodOp(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);startOperation(t);try{return e.apply(this,arguments)}finally{endOperation(t)}}}function startWorker(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,bind(highlightWorker,e))}function highlightWorker(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=getContextBefore(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?copyState(t.mode,r.state):null,c=highlightLine(e,a,r,!0);s&&(r.state=s),a.styles=c.styles;var l=a.styleClasses,u=c.classes;u?a.styleClasses=u:l&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=a.styles[f];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&processLine(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return startWorker(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&runInOp(e,function(){for(var t=0;t<i.length;t++)regLineChange(e,i[t],`text`)})}}var DisplayUpdate=function(e,t,n){var r=e.display;this.viewport=t,this.visible=visibleLines(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=displayWidth(e),this.force=n,this.dims=getDimensions(e),this.events=[]};DisplayUpdate.prototype.signal=function(e,t){hasHandler(e,t)&&this.events.push(arguments)},DisplayUpdate.prototype.finish=function(){for(var e=0;e<this.events.length;e++)signal.apply(null,this.events[e])};function maybeClipScrollbars(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=scrollGap(e)+`px`,t.sizer.style.marginBottom=-t.nativeBarWidth+`px`,t.sizer.style.borderRightWidth=scrollGap(e)+`px`,t.scrollbarsClipped=!0)}function selectionSnapshot(e){if(e.hasFocus())return null;var t=activeElt(root(e));if(!t||!contains(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=win(e).getSelection();r.anchorNode&&r.extend&&contains(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function restoreSelection(e){if(!(!e||!e.activeElt||e.activeElt==activeElt(rootNode(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&contains(document.body,e.anchorNode)&&contains(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function updateDisplayIfNeeded(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return resetView(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&countDirtyView(e)==0)return!1;maybeUpdateLineNumberWidth(e)&&(resetView(e),t.dims=getDimensions(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),U&&(a=visualLineNo(e.doc,a),o=visualLineEndNo(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;adjustView(e,a,o),n.viewOffset=heightAtLine(getLine(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+`px`;var c=countDirtyView(e);if(!s&&c==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var l=selectionSnapshot(e);return c>4&&(n.lineDiv.style.display=`none`),patchDisplay(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=``),n.renderedView=n.view,restoreSelection(l),removeChildren(n.cursorDiv),removeChildren(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,startWorker(e,400)),n.updateLineNumbers=null,!0}function postUpdateDisplay(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==displayWidth(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+paddingVert(e.display)-displayHeight(e),n.top)}),t.visible=visibleLines(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=visibleLines(e.display,e.doc,n));if(!updateDisplayIfNeeded(e,t))break;updateHeightsInViewport(e);var i=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,i),setDocumentHeight(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 updateDisplaySimple(e,t){var n=new DisplayUpdate(e,t);if(updateDisplayIfNeeded(e,n)){updateHeightsInViewport(e),postUpdateDisplay(e,n);var r=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,r),setDocumentHeight(e,r),n.finish()}}function patchDisplay(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function rm(t){var n=t.nextSibling;return c&&b&&e.display.currentWheelTarget==t?t.style.display=`none`:t.parentNode.removeChild(t),n}for(var s=r.view,l=r.viewFrom,u=0;u<s.length;u++){var d=s[u];if(!d.hidden)if(!d.node||d.node.parentNode!=a){var f=buildLineElement(e,d,l,n);a.insertBefore(f,o)}else{for(;o!=d.node;)o=rm(o);var m=i&&t!=null&&t<=l&&d.lineNumber;d.changes&&(indexOf(d.changes,`gutter`)>-1&&(m=!1),updateLineForChanges(e,d,l,n)),m&&(removeChildren(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lineNumberFor(e.options,l)))),o=d.node.nextSibling}l+=d.size}for(;o;)o=rm(o)}function updateGutterSpace(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+`px`,signalLater(e,`gutterChanged`,e)}function setDocumentHeight(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+scrollGap(e)+`px`}function alignHorizontally(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=compensateForHScroll(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+`px`,o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+`px`)}}function maybeUpdateLineNumberWidth(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lineNumberFor(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(elt(`div`,[elt(`div`,n)],`CodeMirror-linenumber CodeMirror-gutter-elt`)),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width=``,r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+`px`,updateGutterSpace(e.display),!0}return!1}function getGutters(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!=`string`&&(o=a.style,a=a.className),a==`CodeMirror-linenumbers`)if(t)r=!0;else continue;n.push({className:a,style:o})}return t&&!r&&n.push({className:`CodeMirror-linenumbers`,style:null}),n}function renderGutters(e){var t=e.gutters,n=e.gutterSpecs;removeChildren(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(elt(`div`,null,`CodeMirror-gutter `+a));o&&(s.style.cssText=o),a==`CodeMirror-linenumbers`&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+`px`)}t.style.display=n.length?``:`none`,updateGutterSpace(e)}function updateGutters(e){renderGutters(e.display),regChange(e),alignHorizontally(e)}function Display(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=elt(`div`,null,`CodeMirror-scrollbar-filler`),a.scrollbarFiller.setAttribute(`cm-not-content`,`true`),a.gutterFiller=elt(`div`,null,`CodeMirror-gutter-filler`),a.gutterFiller.setAttribute(`cm-not-content`,`true`),a.lineDiv=eltP(`div`,null,`CodeMirror-code`),a.selectionDiv=elt(`div`,null,null,`position: relative; z-index: 1`),a.cursorDiv=elt(`div`,null,`CodeMirror-cursors`),a.measure=elt(`div`,null,`CodeMirror-measure`),a.lineMeasure=elt(`div`,null,`CodeMirror-measure`),a.lineSpace=eltP(`div`,[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,`position: relative; outline: none`),a.mover=elt(`div`,[eltP(`div`,[a.lineSpace],`CodeMirror-lines`)],null,`position: relative`),a.sizer=elt(`div`,[a.mover],`CodeMirror-sizer`),a.sizerWidth=null,a.heightForcer=elt(`div`,null,null,`position: absolute; height: `+D+`px; width: 1px;`),a.gutters=elt(`div`,null,`CodeMirror-gutters`),a.lineGutter=null,a.scroller=elt(`div`,[a.sizer,a.heightForcer,a.gutters],`CodeMirror-scroll`),a.scroller.setAttribute(`tabIndex`,`-1`),a.wrapper=elt(`div`,[a.scrollbarFiller,a.gutterFiller,a.scroller],`CodeMirror`),u&&d===105&&(a.wrapper.style.clipPath=`inset(0px)`),a.wrapper.setAttribute(`translate`,`no`),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!c&&!(n&&y)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=getGutters(i.gutters,i.lineNumbers),renderGutters(a),r.init(a)}var de=0,q=null;o?q=-.53:n?q=15:u?q=-.7:m&&(q=-1/3);function wheelEventDelta(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n??=e.wheelDelta,{x:t,y:n}}function wheelEventPixels(e){var t=wheelEventDelta(e);return t.x*=q,t.y*=q,t}function onScrollWheel(e,t){u&&d==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents=`none`:clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=``},100));var r=wheelEventDelta(t),i=r.x,a=r.y,o=q;t.deltaMode===0&&(i=t.deltaX,a=t.deltaY,o=1);var s=e.display,l=s.scroller,m=l.scrollWidth>l.clientWidth,h=l.scrollHeight>l.clientHeight;if(i&&m||a&&h){if(a&&b&&c){outer:for(var g=t.target,_=s.view;g!=l;g=g.parentNode)for(var v=0;v<_.length;v++)if(_[v].node==g){e.display.currentWheelTarget=g;break outer}}if(i&&!n&&!f&&o!=null){a&&h&&updateScrollTop(e,Math.max(0,l.scrollTop+a*o)),setScrollLeft(e,Math.max(0,l.scrollLeft+i*o)),(!a||a&&h)&&e_preventDefault(t),s.wheelStartX=null;return}if(a&&o!=null){var y=a*o,x=e.doc.scrollTop,S=x+s.wrapper.clientHeight;y<0?x=Math.max(0,x+y-50):S=Math.min(e.doc.height,S+y+50),updateDisplaySimple(e,{top:x,bottom:S})}de<20&&t.deltaMode!==0&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=a,setTimeout(function(){if(s.wheelStartX!=null){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(q=(q*de+n)/(de+1),++de)}},200)):(s.wheelDX+=i,s.wheelDY+=a))}}var Selection=function(e,t){this.ranges=e,this.primIndex=t};Selection.prototype.primary=function(){return this.ranges[this.primIndex]},Selection.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!equalCursorPos(n.anchor,r.anchor)||!equalCursorPos(n.head,r.head))return!1}return!0},Selection.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Range(copyPos(this.ranges[t].anchor),copyPos(this.ranges[t].head));return new Selection(e,this.primIndex)},Selection.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Selection.prototype.contains=function(e,t){t||=e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(cmp(t,r.from())>=0&&cmp(e,r.to())<=0)return n}return-1};var Range=function(e,t){this.anchor=e,this.head=t};Range.prototype.from=function(){return minPos(this.anchor,this.head)},Range.prototype.to=function(){return maxPos(this.anchor,this.head)},Range.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function normalizeSelection(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return cmp(e.from(),t.from())}),n=indexOf(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=cmp(s.to(),o.from());if(r&&!o.empty()?c>0:c>=0){var l=minPos(s.from(),o.from()),u=maxPos(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Range(d?u:l,d?l:u))}}return new Selection(t,n)}function simpleSelection(e,t){return new Selection([new Range(e,t||e)],0)}function changeEnd(e){return e.text?Pos(e.from.line+e.text.length-1,lst(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function adjustForChange(e,t){if(cmp(e,t.from)<0)return e;if(cmp(e,t.to)<=0)return changeEnd(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=changeEnd(t).ch-t.to.ch),Pos(n,r)}function computeSelAfterChange(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Range(adjustForChange(i.anchor,t),adjustForChange(i.head,t)))}return normalizeSelection(e.cm,n,e.sel.primIndex)}function offsetPos(e,t,n){return e.line==t.line?Pos(n.line,e.ch-t.ch+n.ch):Pos(n.line+(e.line-t.line),e.ch)}function computeReplacedSel(e,t,n){for(var r=[],i=Pos(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=offsetPos(s.from,i,a),l=offsetPos(changeEnd(s),i,a);if(i=s.to,a=l,n==`around`){var u=e.sel.ranges[o],d=cmp(u.head,u.anchor)<0;r[o]=new Range(d?l:c,d?c:l)}else r[o]=new Range(c,c)}return new Selection(r,e.sel.primIndex)}function loadMode(e){e.doc.mode=getMode(e.options,e.doc.modeOption),resetModeState(e)}function resetModeState(e){e.doc.iter(function(e){e.stateAfter&&=null,e.styles&&=null}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,startWorker(e,100),e.state.modeGen++,e.curOp&&regChange(e)}function isWholeLineUpdate(e,t){return t.from.ch==0&&t.to.ch==0&&lst(t.text)==``&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function updateDoc(e,t,n,r){function spansFor(e){return n?n[e]:null}function update(e,n,i){updateLine(e,n,i,r),signalLater(e,`change`,e,t)}function linesFor(e,t){for(var n=[],i=e;i<t;++i)n.push(new Line(o[i],spansFor(i),r));return n}var i=t.from,a=t.to,o=t.text,s=getLine(e,i.line),c=getLine(e,a.line),l=lst(o),u=spansFor(o.length-1),d=a.line-i.line;if(t.full)e.insert(0,linesFor(0,o.length)),e.remove(o.length,e.size-o.length);else if(isWholeLineUpdate(e,t)){var f=linesFor(0,o.length-1);update(c,c.text,u),d&&e.remove(i.line,d),f.length&&e.insert(i.line,f)}else if(s==c)if(o.length==1)update(s,s.text.slice(0,i.ch)+l+s.text.slice(a.ch),u);else{var m=linesFor(1,o.length-1);m.push(new Line(l+s.text.slice(a.ch),u,r)),update(s,s.text.slice(0,i.ch)+o[0],spansFor(0)),e.insert(i.line+1,m)}else if(o.length==1)update(s,s.text.slice(0,i.ch)+o[0]+c.text.slice(a.ch),spansFor(0)),e.remove(i.line+1,d);else{update(s,s.text.slice(0,i.ch)+o[0],spansFor(0)),update(c,l+c.text.slice(a.ch),u);var h=linesFor(1,o.length-1);d>1&&e.remove(i.line+1,d-1),e.insert(i.line+1,h)}signalLater(e,`change`,e,t)}function linkedDocs(e,t,n){function propagate(e,r,i){if(e.linked)for(var a=0;a<e.linked.length;++a){var o=e.linked[a];if(o.doc!=r){var s=i&&o.sharedHist;n&&!s||(t(o.doc,s),propagate(o.doc,e,s))}}}propagate(e,null,!0)}function attachDoc(e,t){if(t.cm)throw Error(`This document is already in use.`);e.doc=t,t.cm=e,estimateLineHeights(e),loadMode(e),setDirectionClass(e),e.options.direction=t.direction,e.options.lineWrapping||findMaxLine(e),e.options.mode=t.modeOption,regChange(e)}function setDirectionClass(e){(e.doc.direction==`rtl`?addClass:rmClass)(e.display.lineDiv,`CodeMirror-rtl`)}function directionChanged(e){runInOp(e,function(){setDirectionClass(e),regChange(e)})}function History(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 historyChangeFromChange(e,t){var n={from:copyPos(t.from),to:changeEnd(t),text:getBetween(e,t.from,t.to)};return attachLocalSpans(e,n,t.from.line,t.to.line+1),linkedDocs(e,function(e){return attachLocalSpans(e,n,t.from.line,t.to.line+1)},!0),n}function clearSelectionEvents(e){for(;e.length&&lst(e).ranges;)e.pop()}function lastChangeEvent(e,t){if(t)return clearSelectionEvents(e.done),lst(e.done);if(e.done.length&&!lst(e.done).ranges)return lst(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),lst(e.done)}function addChangeToHistory(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)==`+`&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)==`*`))&&(o=lastChangeEvent(i,i.lastOp==r)))s=lst(o.changes),cmp(t.from,t.to)==0&&cmp(t.from,s.to)==0?s.to=changeEnd(t):o.changes.push(historyChangeFromChange(e,t));else{var c=lst(i.done);for((!c||!c.ranges)&&pushSelectionToHistory(e.sel,i.done),o={changes:[historyChangeFromChange(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||signal(e,`historyAdded`)}function selectionEventCanBeMerged(e,t,n,r){var i=t.charAt(0);return i==`*`||i==`+`&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function addSelectionToHistory(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||selectionEventCanBeMerged(e,a,lst(i.done),t))?i.done[i.done.length-1]=t:pushSelectionToHistory(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&clearSelectionEvents(i.undone)}function pushSelectionToHistory(e,t){var n=lst(t);n&&n.ranges&&n.equals(e)||t.push(e)}function attachLocalSpans(e,t,n,r){var i=t[`spans_`+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||=t[`spans_`+e.id]={})[a]=n.markedSpans),++a})}function removeClearedSpans(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||=e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function getOldSpans(e,t){var n=t[`spans_`+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(removeClearedSpans(n[i]));return r}function mergeOldSpans(e,t){var n=getOldSpans(e,t),r=stretchSpansOverChange(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)spans:for(var s=0;s<o.length;++s){for(var c=o[s],l=0;l<a.length;++l)if(a[l].marker==c.marker)continue spans;a.push(c)}else o&&(n[i]=o)}return n}function copyHistoryArray(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?Selection.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];r.push({changes:s});for(var c=0;c<o.length;++c){var l=o[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var d in l)(u=d.match(/^spans_(\d+)$/))&&indexOf(t,Number(u[1]))>-1&&(lst(s)[d]=l[d],delete l[d])}}return r}function extendRange(e,t,n,r){if(r){var i=e.anchor;if(n){var a=cmp(t,i)<0;a==cmp(n,i)<0?a!=cmp(t,n)<0&&(t=n):(i=t,t=n)}return new Range(i,t)}else return new Range(n||t,t)}function extendSelection(e,t,n,r,i){i??=e.cm&&(e.cm.display.shift||e.extend),setSelection(e,new Selection([extendRange(e.sel.primary(),t,n,i)],0),r)}function extendSelections(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=extendRange(e.sel.ranges[a],t[a],null,i);setSelection(e,normalizeSelection(e.cm,r,e.sel.primIndex),n)}function replaceOneSelection(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,setSelection(e,normalizeSelection(e.cm,i,e.sel.primIndex),r)}function setSimpleSelection(e,t,n,r){setSelection(e,simpleSelection(t,n),r)}function filterSelectionChange(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Range(clipPos(e,t[n].anchor),clipPos(e,t[n].head))},origin:n&&n.origin};return signal(e,`beforeSelectionChange`,e,r),e.cm&&signal(e.cm,`beforeSelectionChange`,e.cm,r),r.ranges==t.ranges?t:normalizeSelection(e.cm,r.ranges,r.ranges.length-1)}function setSelectionReplaceHistory(e,t,n){var r=e.history.done,i=lst(r);i&&i.ranges?(r[r.length-1]=t,setSelectionNoUndo(e,t,n)):setSelection(e,t,n)}function setSelection(e,t,n){setSelectionNoUndo(e,t,n),addSelectionToHistory(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function setSelectionNoUndo(e,t,n){(hasHandler(e,`beforeSelectionChange`)||e.cm&&hasHandler(e.cm,`beforeSelectionChange`))&&(t=filterSelectionChange(e,t,n));var r=n&&n.bias||(cmp(t.primary().head,e.sel.primary().head)<0?-1:1);setSelectionInner(e,skipAtomicInSelection(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption(`readOnly`)!=`nocursor`&&ensureCursorVisible(e.cm)}function setSelectionInner(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,signalCursorActivity(e.cm)),signalLater(e,`cursorActivity`,e))}function reCheckSelection(e){setSelectionInner(e,skipAtomicInSelection(e,e.sel,null,!1))}function skipAtomicInSelection(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=skipAtomic(e,o.anchor,s&&s.anchor,n,r),l=o.head==o.anchor?c:skipAtomic(e,o.head,s&&s.head,n,r);(i||c!=o.anchor||l!=o.head)&&(i||=t.ranges.slice(0,a),i[a]=new Range(c,l))}return i?normalizeSelection(e.cm,i,t.primIndex):t}function skipAtomicInner(e,t,n,r,i){var a=getLine(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],c=s.marker,l=`selectLeft`in c?!c.selectLeft:c.inclusiveLeft,u=`selectRight`in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(l?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(signal(c,`beforeCursorEnter`),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(n){var d=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(d=movePos(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=cmp(d,n))&&(r<0?f<0:f>0))return skipAtomicInner(e,d,t,r,i)}var m=c.find(r<0?-1:1);return(r<0?l:u)&&(m=movePos(e,m,r,m.line==t.line?a:null)),m?skipAtomicInner(e,m,t,r,i):null}}return t}function skipAtomic(e,t,n,r,i){var a=r||1;return skipAtomicInner(e,t,n,a,i)||!i&&skipAtomicInner(e,t,n,a,!0)||skipAtomicInner(e,t,n,-a,i)||!i&&skipAtomicInner(e,t,n,-a,!0)||(e.cantEdit=!0,Pos(e.first,0))}function movePos(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?clipPos(e,Pos(t.line-1)):null:n>0&&t.ch==(r||getLine(e,t.line)).text.length?t.line<e.first+e.size-1?Pos(t.line+1,0):null:new Pos(t.line,t.ch+n)}function selectAll(e){e.setSelection(Pos(e.firstLine(),0),Pos(e.lastLine()),k)}function filterChange(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=clipPos(e,t)),n&&(r.to=clipPos(e,n)),i&&(r.text=i),a!==void 0&&(r.origin=a)}),signal(e,`beforeChange`,e,r),e.cm&&signal(e.cm,`beforeChange`,e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function makeChange(e,t,n){if(e.cm){if(!e.cm.curOp)return operation(e.cm,makeChange)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((hasHandler(e,`beforeChange`)||e.cm&&hasHandler(e.cm,`beforeChange`))&&(t=filterChange(e,t,!0),!t))){var r=ae&&!n&&removeReadOnlyRanges(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)makeChangeInner(e,{from:r[i].from,to:r[i].to,text:i?[``]:t.text,origin:t.origin});else makeChangeInner(e,t)}}function makeChangeInner(e,t){if(!(t.text.length==1&&t.text[0]==``&&cmp(t.from,t.to)==0)){var n=computeSelAfterChange(e,t);addChangeToHistory(e,t,n,e.cm?e.cm.curOp.id:NaN),makeChangeSingleDoc(e,t,n,stretchSpansOverChange(e,t));var r=[];linkedDocs(e,function(e,n){!n&&indexOf(r,e.history)==-1&&(rebaseHist(e.history,t),r.push(e.history)),makeChangeSingleDoc(e,t,null,stretchSpansOverChange(e,t))})}}function makeChangeFromHistory(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,o=e.sel,s=t==`undo`?i.done:i.undone,c=t==`undo`?i.undone:i.done,l=0;l<s.length&&(a=s[l],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(pushSelectionToHistory(a,c),n&&!a.equals(e.sel)){setSelection(e,a,{clearRedo:!1});return}o=a}else if(r){s.push(a);return}else break;var u=[];pushSelectionToHistory(o,c),c.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=hasHandler(e,`beforeChange`)||e.cm&&hasHandler(e.cm,`beforeChange`),loop=function(n){var r=a.changes[n];if(r.origin=t,d&&!filterChange(e,r,!1))return s.length=0,{};u.push(historyChangeFromChange(e,r)),makeChangeSingleDoc(e,r,n?computeSelAfterChange(e,r):lst(s),mergeOldSpans(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:changeEnd(r)});var i=[];linkedDocs(e,function(e,t){!t&&indexOf(i,e.history)==-1&&(rebaseHist(e.history,r),i.push(e.history)),makeChangeSingleDoc(e,r,null,mergeOldSpans(e,r))})},f=a.changes.length-1;f>=0;--f){var m=loop(f);if(m)return m.v}}}}function shiftDoc(e,t){if(t!=0&&(e.first+=t,e.sel=new Selection(map(e.sel.ranges,function(e){return new Range(Pos(e.anchor.line+t,e.anchor.ch),Pos(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){regChange(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)regLineChange(e.cm,r,`gutter`)}}function makeChangeSingleDoc(e,t,n,r){if(e.cm&&!e.cm.curOp)return operation(e.cm,makeChangeSingleDoc)(e,t,n,r);if(t.to.line<e.first){shiftDoc(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);shiftDoc(e,i),t={from:Pos(e.first,0),to:Pos(t.to.line+i,t.to.ch),text:[lst(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Pos(a,getLine(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=getBetween(e,t.from,t.to),n||=computeSelAfterChange(e,t),e.cm?makeChangeSingleDocInEditor(e.cm,t,r):updateDoc(e,t,r),setSelectionNoUndo(e,n,k),e.cantEdit&&skipAtomic(e,Pos(e.firstLine(),0))&&(e.cantEdit=!1)}}function makeChangeSingleDocInEditor(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=lineNo(visualLine(getLine(r,a.line))),r.iter(c,o.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&signalCursorActivity(e),updateDoc(r,t,n,estimateHeight(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=lineLength(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),retreatFrontier(r,a.line),startWorker(e,400);var l=t.text.length-(o.line-a.line)-1;t.full?regChange(e):a.line==o.line&&t.text.length==1&&!isWholeLineUpdate(e.doc,t)?regLineChange(e,a.line,`text`):regChange(e,a.line,o.line+1,l);var u=hasHandler(e,`changes`),d=hasHandler(e,`change`);if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&signalLater(e,`change`,e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function replaceRange(e,t,n,r,i){var a;r||=n,cmp(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t==`string`&&(t=e.splitLines(t)),makeChange(e,{from:n,to:r,text:t,origin:i})}function rebaseHistSelSingle(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function rebaseHistArray(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)rebaseHistSelSingle(a.ranges[s].anchor,t,n,r),rebaseHistSelSingle(a.ranges[s].head,t,n,r);continue}for(var c=0;c<a.changes.length;++c){var l=a.changes[c];if(n<l.from.line)l.from=Pos(l.from.line+r,l.from.ch),l.to=Pos(l.to.line+r,l.to.ch);else if(t<=l.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function rebaseHist(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;rebaseHistArray(e.done,n,r,i),rebaseHistArray(e.undone,n,r,i)}function changeLine(e,t,n,r){var i=t,a=t;return typeof t==`number`?a=getLine(e,clipLine(e,t)):i=lineNo(t),i==null?null:(r(a,i)&&e.cm&&regLineChange(e.cm,i,n),a)}function LeafChunk(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}LeafChunk.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,cleanUpLine(i),signalLater(i,`delete`)}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function BranchChunk(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}BranchChunk.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof LeafChunk))){var s=[];this.collapse(s),this.children=[new LeafChunk(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,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var c=new LeafChunk(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++r,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new BranchChunk(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=indexOf(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new BranchChunk(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};LineWidget.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=lineNo(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=widgetHeight(this);updateLineHeight(n,Math.max(0,n.height-a)),e&&(runInOp(e,function(){adjustScrollWhenAboveVisible(e,n,-a),regLineChange(e,r,`widget`)}),signalLater(e,`lineWidgetCleared`,e,this,r))}},LineWidget.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=widgetHeight(this)-t;i&&(lineIsHidden(this.doc,r)||updateLineHeight(r,r.height+i),n&&runInOp(n,function(){n.curOp.forceUpdate=!0,adjustScrollWhenAboveVisible(n,r,i),signalLater(n,`lineWidgetChanged`,n,e,lineNo(r))}))},eventMixin(LineWidget);function adjustScrollWhenAboveVisible(e,t,n){heightAtLine(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&addToScrollTop(e,n)}function addLineWidget(e,t,n,r){var i=new LineWidget(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),changeLine(e,t,`widget`,function(t){var n=t.widgets||=[];if(i.insertAt==null?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!lineIsHidden(e,t)){var r=heightAtLine(t)<e.scrollTop;updateLineHeight(t,t.height+widgetHeight(i)),r&&addToScrollTop(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&signalLater(a,`lineWidgetAdded`,a,i,typeof t==`number`?t:lineNo(t)),i}var fe=0,TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++fe};TextMarker.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&startOperation(e),hasHandler(this,`clear`)){var n=this.find();n&&signalLater(this,`clear`,n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=getMarkedSpanFor(o.markedSpans,this);e&&!this.collapsed?regLineChange(e,lineNo(o),`text`):e&&(s.to!=null&&(i=lineNo(o)),s.from!=null&&(r=lineNo(o))),o.markedSpans=removeMarkedSpan(o.markedSpans,s),s.from==null&&this.collapsed&&!lineIsHidden(this.doc,o)&&e&&updateLineHeight(o,textHeight(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=visualLine(this.lines[c]),u=lineLength(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&regChange(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&reCheckSelection(e.doc)),e&&signalLater(e,`markerCleared`,e,this,r,i),t&&endOperation(e),this.parent&&this.parent.clear()}},TextMarker.prototype.find=function(e,t){e==null&&this.type==`bookmark`&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var a=this.lines[i],o=getMarkedSpanFor(a.markedSpans,this);if(o.from!=null&&(n=Pos(t?a:lineNo(a),o.from),e==-1))return n;if(o.to!=null&&(r=Pos(t?a:lineNo(a),o.to),e==1))return r}return n&&{from:n,to:r}},TextMarker.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||runInOp(r,function(){var i=t.line,a=findViewForLine(r,lineNo(t.line));if(a&&(clearLineMeasurementCacheFor(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!lineIsHidden(n.doc,i)&&n.height!=null){var o=n.height;n.height=null;var s=widgetHeight(n)-o;s&&updateLineHeight(i,i.height+s)}signalLater(r,`markerChanged`,r,e)})},TextMarker.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||indexOf(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||=[]).push(this)}this.lines.push(e)},TextMarker.prototype.detachLine=function(e){if(this.lines.splice(indexOf(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||=[]).push(this)}},eventMixin(TextMarker);function markText(e,t,n,r,i){if(r&&r.shared)return markTextShared(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return operation(e.cm,markText)(e,t,n,r,i);var a=new TextMarker(e,i),o=cmp(t,n);if(r&&copyObj(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=eltP(`span`,[a.replacedWith],`CodeMirror-widget`),r.handleMouseEvents||a.widgetNode.setAttribute(`cm-ignore-events`,`true`),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(conflictingCollapsedRange(e,t.line,t,n,a)||t.line!=n.line&&conflictingCollapsedRange(e,n.line,t,n,a))throw Error(`Inserting collapsed marker partially overlapping an existing one`);seeCollapsedSpans()}a.addToHistory&&addChangeToHistory(e,{from:t,to:n,origin:`markText`},e.sel,NaN);var s=t.line,c=e.cm,l;if(e.iter(s,n.line+1,function(r){c&&a.collapsed&&!c.options.lineWrapping&&visualLine(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&updateLineHeight(r,0),addMarkedSpan(r,new MarkedSpan(a,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),a.collapsed&&e.iter(t.line,n.line+1,function(t){lineIsHidden(e,t)&&updateLineHeight(t,0)}),a.clearOnEnter&&on(a,`beforeCursorEnter`,function(){return a.clear()}),a.readOnly&&(seeReadOnlySpans(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++fe,a.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),a.collapsed)regChange(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)regLineChange(c,u,`text`);a.atomic&&reCheckSelection(c.doc),signalLater(c,`markerAdded`,c,a)}return a}var SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};SharedTextMarker.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();signalLater(this,`clear`)}},SharedTextMarker.prototype.find=function(e,t){return this.primary.find(e,t)},eventMixin(SharedTextMarker);function markTextShared(e,t,n,r,i){r=copyObj(r),r.shared=!1;var a=[markText(e,t,n,r,i)],o=a[0],s=r.widgetNode;return linkedDocs(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(markText(e,clipPos(e,t),clipPos(e,n),r,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;o=lst(a)}),new SharedTextMarker(a,o)}function findSharedMarkers(e){return e.findMarks(Pos(e.first,0),e.clipPos(Pos(e.lastLine())),function(e){return e.parent})}function copySharedMarkers(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(cmp(a,o)){var s=markText(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function detachSharedMarkers(e){for(var loop=function(t){var n=e[t],r=[n.primary.doc];linkedDocs(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var a=n.markers[i];indexOf(r,a.doc)==-1&&(a.parent=null,n.markers.splice(i--,1))}},t=0;t<e.length;t++)loop(t)}var pe=0,Doc=function(e,t,n,r,i){if(!(this instanceof Doc))return new Doc(e,t,n,r,i);n??=0,BranchChunk.call(this,[new LeafChunk([new Line(``,null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=Pos(n,0);this.sel=simpleSelection(a),this.history=new History(null),this.id=++pe,this.modeOption=t,this.lineSep=r,this.direction=i==`rtl`?`rtl`:`ltr`,this.extend=!1,typeof e==`string`&&(e=this.splitLines(e)),updateDoc(this,{from:a,to:a,text:e}),setSelection(this,simpleSelection(a),k)};Doc.prototype=createObj(BranchChunk.prototype,{constructor:Doc,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=getLines(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:docMethodOp(function(e){var t=Pos(this.first,0),n=this.first+this.size-1;makeChange(this,{from:t,to:Pos(n,getLine(this,n).text.length),text:this.splitLines(e),origin:`setValue`,full:!0},!0),this.cm&&scrollToCoords(this.cm,0,0),setSelection(this,simpleSelection(t),k)}),replaceRange:function(e,t,n,r){t=clipPos(this,t),n=n?clipPos(this,n):t,replaceRange(this,e,t,n,r)},getRange:function(e,t,n){var r=getBetween(this,clipPos(this,e),clipPos(this,t));return n===!1?r:n===``?r.join(``):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(isLine(this,e))return getLine(this,e)},getLineNumber:function(e){return lineNo(e)},getLineHandleVisualStart:function(e){return typeof e==`number`&&(e=getLine(this,e)),visualLine(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return clipPos(this,e)},getCursor:function(e){var t=this.sel.primary();return e==null||e==`head`?t.head:e==`anchor`?t.anchor:e==`end`||e==`to`||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:docMethodOp(function(e,t,n){setSimpleSelection(this,clipPos(this,typeof e==`number`?Pos(e,t||0):e),null,n)}),setSelection:docMethodOp(function(e,t,n){setSimpleSelection(this,clipPos(this,e),clipPos(this,t||e),n)}),extendSelection:docMethodOp(function(e,t,n){extendSelection(this,clipPos(this,e),t&&clipPos(this,t),n)}),extendSelections:docMethodOp(function(e,t){extendSelections(this,clipPosArray(this,e),t)}),extendSelectionsBy:docMethodOp(function(e,t){var n=map(this.sel.ranges,e);extendSelections(this,clipPosArray(this,n),t)}),setSelections:docMethodOp(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Range(clipPos(this,e[i].anchor),clipPos(this,e[i].head||e[i].anchor));t??=Math.min(e.length-1,this.sel.primIndex),setSelection(this,normalizeSelection(this.cm,r,t),n)}}),addSelection:docMethodOp(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Range(clipPos(this,e),clipPos(this,t||e))),setSelection(this,normalizeSelection(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=getBetween(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=getBetween(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||`+input`)},replaceSelections:docMethodOp(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&t!=`end`&&computeReplacedSel(this,r,t),c=r.length-1;c>=0;c--)makeChange(this,r[c]);s?setSelectionReplaceHistory(this,s):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,`undo`)}),redo:docMethodOp(function(){makeChangeFromHistory(this,`redo`)}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,`undo`,!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,`redo`,!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new History(this.history),linkedDocs(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:copyHistoryArray(this.history.done),undone:copyHistoryArray(this.history.undone)}},setHistory:function(e){var t=this.history=new History(this.history);t.done=copyHistoryArray(e.done.slice(0),null,!0),t.undone=copyHistoryArray(e.undone.slice(0),null,!0)},setGutterMarker:docMethodOp(function(e,t,n){return changeLine(this,e,`gutter`,function(e){var r=e.gutterMarkers||={};return r[t]=n,!n&&isEmpty(r)&&(e.gutterMarkers=null),!0})}),clearGutter:docMethodOp(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&changeLine(t,n,`gutter`,function(){return n.gutterMarkers[e]=null,isEmpty(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e==`number`){if(!isLine(this,e)||(t=e,e=getLine(this,e),!e))return null}else if(t=lineNo(e),t==null)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:docMethodOp(function(e,t,n){return changeLine(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`;if(!e[r])e[r]=n;else if(classTest(n).test(e[r]))return!1;else e[r]+=` `+n;return!0})}),removeLineClass:docMethodOp(function(e,t,n){return changeLine(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`,i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var a=i.match(classTest(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(!a.index||o==i.length?``:` `)+i.slice(o)||null}return!0})}),addLineWidget:docMethodOp(function(e,t,n){return addLineWidget(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return markText(this,clipPos(this,e),clipPos(this,t),n,n&&n.type||`range`)},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=clipPos(this,e),markText(this,e,e,n,`bookmark`)},findMarksAt:function(e){e=clipPos(this,e);var t=[],n=getLine(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=clipPos(this,e),t=clipPos(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var c=o[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!n||n(c.marker))&&r.push(c.marker.parent||c.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),clipPos(this,Pos(n,t))},indexFromPos:function(e){e=clipPos(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Doc(getLines(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||={};var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Doc(getLines(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||=[]).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],copySharedMarkers(r,findSharedMarkers(this)),r},unlinkDoc:function(e){if(e instanceof CodeMirror&&(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),detachSharedMarkers(findSharedMarkers(this));break}}if(e.history==this.history){var n=[e.id];linkedDocs(e,function(e){return n.push(e.id)},!0),e.history=new History(null),e.history.done=copyHistoryArray(this.history.done,n),e.history.undone=copyHistoryArray(this.history.undone,n)}},iterLinkedDocs:function(e){linkedDocs(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):B(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:docMethodOp(function(e){e!=`rtl`&&(e=`ltr`),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&directionChanged(this.cm))})}),Doc.prototype.eachLine=Doc.prototype.iter;var me=0;function onDrop(e){var t=this;if(clearDragCursor(t),!(signalDOMEvent(t,e)||eventInWidget(t.display,e))){e_preventDefault(e),o&&(me=+new Date);var n=posFromMouse(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,markAsReadAndPasteIfAllFilesAreRead=function(){++s==i&&operation(t,function(){n=clipPos(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(a.filter(function(e){return e!=null}).join(t.doc.lineSeparator())),origin:`paste`};makeChange(t.doc,e),setSelectionReplaceHistory(t.doc,simpleSelection(clipPos(t.doc,n),clipPos(t.doc,changeEnd(e))))})()},readTextFromFile=function(e,n){if(t.options.allowDropFileTypes&&indexOf(t.options.allowDropFileTypes,e.type)==-1){markAsReadAndPasteIfAllFilesAreRead();return}var r=new FileReader;r.onerror=function(){return markAsReadAndPasteIfAllFilesAreRead()},r.onload=function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){markAsReadAndPasteIfAllFilesAreRead();return}a[n]=e,markAsReadAndPasteIfAllFilesAreRead()},r.readAsText(e)},c=0;c<r.length;c++)readTextFromFile(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var l=e.dataTransfer.getData(`Text`);if(l){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),setSelectionNoUndo(t.doc,simpleSelection(n,n)),u)for(var d=0;d<u.length;++d)replaceRange(t.doc,``,u[d].anchor,u[d].head,`drag`);t.replaceSelection(l,`around`,`paste`),t.display.input.focus()}}catch{}}}}function onDragStart(e,t){if(o&&(!e.state.draggingText||+new Date-me<100)){e_stop(t);return}if(!(signalDOMEvent(e,t)||eventInWidget(e.display,t))&&(t.dataTransfer.setData(`Text`,e.getSelection()),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.setDragImage&&!m)){var n=elt(`img`,null,null,`position: fixed; left: 0; top: 0;`);n.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`,f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function onDragOver(e,t){var n=posFromMouse(e,t);if(n){var r=document.createDocumentFragment();drawSelectionCursor(e,n,r),e.display.dragCursor||(e.display.dragCursor=elt(`div`,null,`CodeMirror-cursors CodeMirror-dragcursors`),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),removeChildrenAndAdd(e.display.dragCursor,r)}}function clearDragCursor(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function forEachCodeMirror(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName(`CodeMirror`),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}var he=!1;function ensureGlobalHandlers(){he||=(registerGlobalHandlers(),!0)}function registerGlobalHandlers(){var e;on(window,`resize`,function(){e??=setTimeout(function(){e=null,forEachCodeMirror(onResize)},100)}),on(window,`blur`,function(){return forEachCodeMirror(onBlur)})}function onResize(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var J={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`},Y=0;Y<10;Y++)J[Y+48]=J[Y+96]=String(Y);for(var ge=65;ge<=90;ge++)J[ge]=String.fromCharCode(ge);for(var X=1;X<=12;X++)J[X+111]=J[X+63235]=`F`+X;var Z={};Z.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`},Z.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`},Z.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`},Z.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`]},Z.default=b?Z.macDefault:Z.pcDefault;function normalizeKeyName(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw Error(`Unrecognized modifier name: `+s)}return n&&(e=`Alt-`+e),r&&(e=`Ctrl-`+e),a&&(e=`Cmd-`+e),i&&(e=`Shift-`+e),e}function normalizeKeyMap(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r==`...`){delete e[n];continue}for(var i=map(n.split(` `),normalizeKeyName),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(` `),o=r):(s=i.slice(0,a+1).join(` `),o=`...`);var c=t[s];if(!c)t[s]=o;else if(c!=o)throw Error(`Inconsistent bindings for `+s)}delete e[n]}for(var l in t)e[l]=t[l];return e}function lookupKey(e,t,n,r){t=getKeyMap(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return`nothing`;if(i===`...`)return`multi`;if(i!=null&&n(i))return`handled`;if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!=`[object Array]`)return lookupKey(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=lookupKey(e,t.fallthrough[a],n,r);if(o)return o}}}function isModifierKey(e){var t=typeof e==`string`?e:J[e.keyCode];return t==`Ctrl`||t==`Alt`||t==`Shift`||t==`Mod`}function addModifierNames(e,t,n){var r=e;return t.altKey&&r!=`Alt`&&(e=`Alt-`+e),(w?t.metaKey:t.ctrlKey)&&r!=`Ctrl`&&(e=`Ctrl-`+e),(w?t.ctrlKey:t.metaKey)&&r!=`Mod`&&(e=`Cmd-`+e),!n&&t.shiftKey&&r!=`Shift`&&(e=`Shift-`+e),e}function keyName(e,t){if(f&&e.keyCode==34&&e.char)return!1;var n=J[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),addModifierNames(n,e,t))}function getKeyMap(e){return typeof e==`string`?Z[e]:e}function deleteNearSelection(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&cmp(a.from,lst(r).to)<=0;){var o=r.pop();if(cmp(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}runInOp(e,function(){for(var t=r.length-1;t>=0;t--)replaceRange(e.doc,``,r[t].from,r[t].to,`+delete`);ensureCursorVisible(e)})}function moveCharLogically(e,t,n){var r=skipExtendingChars(e.text,t+n,n);return r<0||r>e.text.length?null:r}function moveLogically(e,t,n){var r=moveCharLogically(e,t.ch,n);return r==null?null:new Pos(t.line,r,n<0?`after`:`before`)}function endOfLine(e,t,n,r,i){if(e){t.doc.direction==`rtl`&&(i=-i);var a=getOrder(n,t.doc.direction);if(a){var o=i<0?lst(a):a[0],s=i<0==(o.level==1)?`after`:`before`,c;if(o.level>0||t.doc.direction==`rtl`){var l=prepareMeasureForLine(t,n);c=i<0?n.text.length-1:0;var u=measureCharPrepared(t,l,c).top;c=findFirst(function(e){return measureCharPrepared(t,l,e).top==u},i<0==(o.level==1)?o.from:o.to-1,c),s==`before`&&(c=moveCharLogically(n,c,1))}else c=i<0?o.to:o.from;return new Pos(r,c,s)}}return new Pos(r,i<0?n.text.length:0,i<0?`before`:`after`)}function moveVisually(e,t,n,r){var i=getOrder(t,e.doc.direction);if(!i)return moveLogically(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky=`before`):n.ch<=0&&(n.ch=0,n.sticky=`after`);var a=getBidiPartAt(i,n.ch,n.sticky),o=i[a];if(e.doc.direction==`ltr`&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return moveLogically(t,n,r);var mv=function(e,n){return moveCharLogically(t,e instanceof Pos?e.ch:e,n)},s,getWrappedLineExtent=function(n){return e.options.lineWrapping?(s||=prepareMeasureForLine(e,t),wrappedLineExtentChar(e,t,s,n)):{begin:0,end:t.text.length}},c=getWrappedLineExtent(n.sticky==`before`?mv(n,-1):n.ch);if(e.doc.direction==`rtl`||o.level==1){var l=o.level==1==r<0,u=mv(n,l?1:-1);if(u!=null&&(l?u<=o.to&&u<=c.end:u>=o.from&&u>=c.begin)){var d=l?`before`:`after`;return new Pos(n.line,u,d)}}var searchInVisualLine=function(e,t,r){for(var getRes=function(e,t){return t?new Pos(n.line,mv(e,1),`before`):new Pos(n.line,e,`after`)};e>=0&&e<i.length;e+=t){var a=i[e],o=t>0==(a.level!=1),s=o?r.begin:mv(r.end,-1);if(a.from<=s&&s<a.to||(s=o?a.from:mv(a.to,-1),r.begin<=s&&s<r.end))return getRes(s,o)}},f=searchInVisualLine(a+r,r,c);if(f)return f;var m=r>0?c.end:mv(c.begin,-1);return m!=null&&!(r>0&&m==t.text.length)&&(f=searchInVisualLine(r>0?0:i.length-1,r,getWrappedLineExtent(m)),f)?f:null}var _e={selectAll,singleSelection:function(e){return e.setSelection(e.getCursor(`anchor`),e.getCursor(`head`),k)},killLine:function(e){return deleteNearSelection(e,function(t){if(t.empty()){var n=getLine(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Pos(t.head.line+1,0)}:{from:t.head,to:Pos(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return deleteNearSelection(e,function(t){return{from:Pos(t.from().line,0),to:clipPos(e.doc,Pos(t.to().line+1,0))}})},delLineLeft:function(e){return deleteNearSelection(e,function(e){return{from:Pos(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return deleteNearSelection(e,function(t){var n=e.charCoords(t.head,`div`).top+5;return{from:e.coordsChar({left:0,top:n},`div`),to:t.from()}})},delWrappedLineRight:function(e){return deleteNearSelection(e,function(t){var n=e.charCoords(t.head,`div`).top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`);return{from:t.from(),to:r}})},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(Pos(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Pos(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return lineStart(e,t.head.line)},{origin:`+move`,bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return lineStartSmart(e,t.head)},{origin:`+move`,bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return lineEnd(e,t.head.line)},{origin:`+move`,bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`)},j)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:0,top:n},`div`)},j)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5,r=e.coordsChar({left:0,top:n},`div`);return r.ch<e.getLine(r.line).search(/\S/)?lineStartSmart(e,t.head):r},j)},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=countColumn(e.getLine(a.line),a.ch,r);t.push(spaceStr(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(`add`):e.execCommand(`insertTab`)},transposeChars:function(e){return runInOp(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=getLine(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Pos(i.line,i.ch-1)),i.ch>0)i=new Pos(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Pos(i.line,i.ch-2),i,`+transpose`);else if(i.line>e.doc.first){var o=getLine(e.doc,i.line-1).text;o&&(i=new Pos(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Pos(i.line-1,o.length-1),i,`+transpose`))}}n.push(new Range(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return runInOp(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,`+input`);t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ensureCursorVisible(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,`start`)},toggleOverwrite:function(e){return e.toggleOverwrite()}};function lineStart(e,t){var n=getLine(e.doc,t),r=visualLine(n);return r!=n&&(t=lineNo(r)),endOfLine(!0,e,r,t,1)}function lineEnd(e,t){var n=getLine(e.doc,t),r=visualLineEnd(n);return r!=n&&(t=lineNo(r)),endOfLine(!0,e,n,t,-1)}function lineStartSmart(e,t){var n=lineStart(e,t.line),r=getLine(e.doc,n.line),i=getOrder(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return Pos(n.line,o?0:a,n.sticky)}return n}function doHandleBinding(e,t,n){if(typeof t==`string`&&(t=_e[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=O}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function lookupKeyForEditor(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=lookupKey(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&lookupKey(t,e.options.extraKeys,n,e)||lookupKey(t,e.options.keyMap,n,e)}var ve=new Delayed;function dispatchKey(e,t,n,r){var i=e.state.keySeq;if(i){if(isModifierKey(t))return`handled`;if(/\'$/.test(t)?e.state.keySeq=null:ve.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),dispatchKeyInner(e,i+` `+t,n,r))return!0}return dispatchKeyInner(e,t,n,r)}function dispatchKeyInner(e,t,n,r){var i=lookupKeyForEditor(e,t,r);return i==`multi`&&(e.state.keySeq=t),i==`handled`&&signalLater(e,`keyHandled`,e,t,n),(i==`handled`||i==`multi`)&&(e_preventDefault(n),restartBlink(e)),!!i}function handleKeyBinding(e,t){var n=keyName(t,!0);return n?t.shiftKey&&!e.state.keySeq?dispatchKey(e,`Shift-`+n,t,function(t){return doHandleBinding(e,t,!0)})||dispatchKey(e,n,t,function(t){if(typeof t==`string`?/^go[A-Z]/.test(t):t.motion)return doHandleBinding(e,t)}):dispatchKey(e,n,t,function(t){return doHandleBinding(e,t)}):!1}function handleCharBinding(e,t,n){return dispatchKey(e,`'`+n+`'`,t,function(t){return doHandleBinding(e,t,!0)})}var ye=null;function onKeyDown(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=activeElt(root(t)),!signalDOMEvent(t,e))){o&&s<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=handleKeyBinding(t,e);f&&(ye=i?r:null,!i&&r==88&&!ne&&(b?e.metaKey:e.ctrlKey)&&t.replaceSelection(``,null,`cut`)),n&&!b&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand(`cut`),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&showCrossHair(t)}}function showCrossHair(e){var t=e.display.lineDiv;addClass(t,`CodeMirror-crosshair`);function up(e){(e.keyCode==18||!e.altKey)&&(rmClass(t,`CodeMirror-crosshair`),off(document,`keyup`,up),off(document,`mouseover`,up))}on(document,`keyup`,up),on(document,`mouseover`,up)}function onKeyUp(e){e.keyCode==16&&(this.doc.sel.shift=!1),signalDOMEvent(this,e)}function onKeyPress(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(eventInWidget(t.display,e)||signalDOMEvent(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ye){ye=null,e_preventDefault(e);return}if(!(f&&(!e.which||e.which<10)&&handleKeyBinding(t,e))){var i=String.fromCharCode(r??n);i!=`\b`&&(handleCharBinding(t,e,i)||t.display.input.onKeyPress(e))}}}var be=400,PastClick=function(e,t,n){this.time=e,this.pos=t,this.button=n};PastClick.prototype.compare=function(e,t,n){return this.time+be>e&&cmp(t,this.pos)==0&&n==this.button};var xe,Se;function clickRepeat(e,t){var n=+new Date;return Se&&Se.compare(n,e,t)?(xe=Se=null,`triple`):xe&&xe.compare(n,e,t)?(Se=new PastClick(n,e,t),xe=null,`double`):(xe=new PastClick(n,e,t),Se=null,`single`)}function onMouseDown(e){var t=this,n=t.display;if(!(signalDOMEvent(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,eventInWidget(n,e)){c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!clickInGutter(t,e)){var r=posFromMouse(t,e),i=e_button(e),a=r?clickRepeat(r,i):`single`;win(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&handleMappedButton(t,i,r,a,e))&&(i==1?r?leftButtonDown(t,r,a,e):e_target(e)==n.scroller&&e_preventDefault(e):i==2?(r&&extendSelection(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(T?t.display.input.onContextMenu(e):delayBlurEvent(t)))}}}function handleMappedButton(e,t,n,r,i){var a=`Click`;return r==`double`?a=`Double`+a:r==`triple`&&(a=`Triple`+a),a=(t==1?`Left`:t==2?`Middle`:`Right`)+a,dispatchKey(e,addModifierNames(a,i),i,function(t){if(typeof t==`string`&&(t=_e[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=O}finally{e.state.suppressEdits=!1}return r})}function configureMouse(e,t,n){var r=e.getOption(`configureMouse`),i=r?r(e,t,n):{};return i.unit??=(x?n.shiftKey&&n.metaKey:n.altKey)?`rectangle`:t==`single`?`char`:t==`double`?`word`:`line`,(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew??=b?n.metaKey:n.ctrlKey,i.moveOnDrag??=!(b?n.altKey:n.ctrlKey),i}function leftButtonDown(e,t,n,r){o?setTimeout(bind(ensureFocus,e),0):e.curOp.focus=activeElt(root(e));var i=configureMouse(e,n,r),a=e.doc.sel,s;e.options.dragDrop&&L&&!e.isReadOnly()&&n==`single`&&(s=a.contains(t))>-1&&(cmp((s=a.ranges[s]).from(),t)<0||t.xRel>0)&&(cmp(s.to(),t)>0||t.xRel<0)?leftButtonStartDrag(e,r,t,i):leftButtonSelect(e,r,t,i)}function leftButtonStartDrag(e,t,n,r){var i=e.display,a=!1,l=operation(e,function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:delayBlurEvent(e)),off(i.wrapper.ownerDocument,`mouseup`,l),off(i.wrapper.ownerDocument,`mousemove`,mouseMove),off(i.scroller,`dragstart`,dragStart),off(i.scroller,`drop`,l),a||(e_preventDefault(t),r.addNew||extendSelection(e.doc,n,null,null,r.extend),c&&!m||o&&s==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),mouseMove=function(e){a||=Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},dragStart=function(){return a=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,on(i.wrapper.ownerDocument,`mouseup`,l),on(i.wrapper.ownerDocument,`mousemove`,mouseMove),on(i.scroller,`dragstart`,dragStart),on(i.scroller,`drop`,l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function rangeForUnit(e,t,n){if(n==`char`)return new Range(t,t);if(n==`word`)return e.findWordAt(t);if(n==`line`)return new Range(Pos(t.line,0),clipPos(e.doc,Pos(t.line+1,0)));var r=n(e,t);return new Range(r.from,r.to)}function leftButtonSelect(e,t,n,r){o&&delayBlurEvent(e);var i=e.display,a=e.doc;e_preventDefault(t);var s,c,l=a.sel,u=l.ranges;if(r.addNew&&!r.extend?(c=a.sel.contains(n),s=c>-1?u[c]:new Range(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),r.unit==`rectangle`)r.addNew||(s=new Range(n,n)),n=posFromMouse(e,t,!0,!0),c=-1;else{var d=rangeForUnit(e,n,r.unit);s=r.extend?extendRange(s,d.anchor,d.head,r.extend):d}r.addNew?c==-1?(c=u.length,setSelection(a,normalizeSelection(e,u.concat([s]),c),{scroll:!1,origin:`*mouse`})):u.length>1&&u[c].empty()&&r.unit==`char`&&!r.extend?(setSelection(a,normalizeSelection(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:`*mouse`}),l=a.sel):replaceOneSelection(a,c,s,A):(c=0,setSelection(a,new Selection([s],0),A),l=a.sel);var f=n;function extendTo(t){if(cmp(f,t)!=0)if(f=t,r.unit==`rectangle`){for(var i=[],o=e.options.tabSize,u=countColumn(getLine(a,n.line).text,n.ch,o),d=countColumn(getLine(a,t.line).text,t.ch,o),m=Math.min(u,d),h=Math.max(u,d),g=Math.min(n.line,t.line),_=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=_;g++){var v=getLine(a,g).text,y=findColumn(v,m,o);m==h?i.push(new Range(Pos(g,y),Pos(g,y))):v.length>y&&i.push(new Range(Pos(g,y),Pos(g,findColumn(v,h,o))))}i.length||i.push(new Range(n,n)),setSelection(a,normalizeSelection(e,l.ranges.slice(0,c).concat(i),c),{origin:`*mouse`,scroll:!1}),e.scrollIntoView(t)}else{var b=s,x=rangeForUnit(e,t,r.unit),S=b.anchor,C;cmp(x.anchor,S)>0?(C=x.head,S=minPos(b.from(),x.anchor)):(C=x.anchor,S=maxPos(b.to(),x.head));var w=l.ranges.slice(0);w[c]=bidiSimplify(e,new Range(clipPos(a,S),C)),setSelection(a,normalizeSelection(e,w,c),A)}}var m=i.wrapper.getBoundingClientRect(),h=0;function extend(t){var n=++h,o=posFromMouse(e,t,!0,r.unit==`rectangle`);if(o)if(cmp(o,f)!=0){e.curOp.focus=activeElt(root(e)),extendTo(o);var s=visibleLines(i,a);(o.line>=s.to||o.line<s.from)&&setTimeout(operation(e,function(){h==n&&extend(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(operation(e,function(){h==n&&(i.scroller.scrollTop+=c,extend(t))}),50)}}function done(t){e.state.selectingText=!1,h=1/0,t&&(e_preventDefault(t),i.input.focus()),off(i.wrapper.ownerDocument,`mousemove`,g),off(i.wrapper.ownerDocument,`mouseup`,_),a.history.lastSelOrigin=null}var g=operation(e,function(e){e.buttons===0||!e_button(e)?done(e):extend(e)}),_=operation(e,done);e.state.selectingText=_,on(i.wrapper.ownerDocument,`mousemove`,g),on(i.wrapper.ownerDocument,`mouseup`,_)}function bidiSimplify(e,t){var n=t.anchor,r=t.head,i=getLine(e.doc,n.line);if(cmp(n,r)==0&&n.sticky==r.sticky)return t;var a=getOrder(i);if(!a)return t;var o=getBidiPartAt(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var c=o+(s.from==n.ch==(s.level!=1)?0:1);if(c==0||c==a.length)return t;var l;if(r.line!=n.line)l=(r.line-n.line)*(e.doc.direction==`ltr`?1:-1)>0;else{var u=getBidiPartAt(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(s.level==1?-1:1);l=u==c-1||u==c?d<0:d>0}var f=a[c+(l?-1:0)],m=l==(f.level==1),h=m?f.from:f.to,g=m?`after`:`before`;return n.ch==h&&n.sticky==g?t:new Range(new Pos(n.line,h,g),r)}function gutterEvent(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&e_preventDefault(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!hasHandler(e,n))return e_defaultPrevented(t);a-=s.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=o.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i){var u=lineAtHeight(e.doc,a),d=e.display.gutterSpecs[c];return signal(e,n,e,u,d.className,t),e_defaultPrevented(t)}}}function clickInGutter(e,t){return gutterEvent(e,t,`gutterClick`,!0)}function onContextMenu(e,t){eventInWidget(e.display,t)||contextMenuInGutter(e,t)||signalDOMEvent(e,t,`contextmenu`)||T||e.display.input.onContextMenu(t)}function contextMenuInGutter(e,t){return hasHandler(e,`gutterContextMenu`)?gutterEvent(e,t,`gutterContextMenu`,!1):!1}function themeChanged(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,``)+e.options.theme.replace(/(^|\s)\s*/g,` cm-s-`),clearCaches(e)}var Q={toString:function(){return`CodeMirror.Init`}},Ce={},we={};function defineOptions(e){var t=e.optionHandlers;function option(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Q&&i(e,t,n)}:i)}e.defineOption=option,e.Init=Q,option(`value`,``,function(e,t){return e.setValue(t)},!0),option(`mode`,null,function(e,t){e.doc.modeOption=t,loadMode(e)},!0),option(`indentUnit`,2,loadMode,!0),option(`indentWithTabs`,!1),option(`smartIndent`,!0),option(`tabSize`,4,function(e){resetModeState(e),clearCaches(e),regChange(e)},!0),option(`lineSeparator`,null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(a==-1)break;i=a+t.length,n.push(Pos(r,a))}r++});for(var i=n.length-1;i>=0;i--)replaceRange(e.doc,t,n[i],Pos(n[i].line,n[i].ch+t.length))}}),option(`specialChars`,/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=RegExp(t.source+(t.test(` `)?``:`| `),`g`),n!=Q&&e.refresh()}),option(`specialCharPlaceholder`,defaultSpecialCharPlaceholder,function(e){return e.refresh()},!0),option(`electricChars`,!0),option(`inputStyle`,y?`contenteditable`:`textarea`,function(){throw Error(`inputStyle can not (yet) be changed in a running editor`)},!0),option(`spellcheck`,!1,function(e,t){return e.getInputField().spellcheck=t},!0),option(`autocorrect`,!1,function(e,t){return e.getInputField().autocorrect=t},!0),option(`autocapitalize`,!1,function(e,t){return e.getInputField().autocapitalize=t},!0),option(`rtlMoveVisually`,!S),option(`wholeLineUpdateBefore`,!0),option(`theme`,`default`,function(e){themeChanged(e),updateGutters(e)},!0),option(`keyMap`,`default`,function(e,t,n){var r=getKeyMap(t),i=n!=Q&&getKeyMap(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),option(`extraKeys`,null),option(`configureMouse`,null),option(`lineWrapping`,!1,wrappingChanged,!0),option(`gutters`,[],function(e,t){e.display.gutterSpecs=getGutters(t,e.options.lineNumbers),updateGutters(e)},!0),option(`fixedGutter`,!0,function(e,t){e.display.gutters.style.left=t?compensateForHScroll(e.display)+`px`:`0`,e.refresh()},!0),option(`coverGutterNextToScrollbar`,!1,function(e){return updateScrollbars(e)},!0),option(`scrollbarStyle`,`native`,function(e){initScrollbars(e),updateScrollbars(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),option(`lineNumbers`,!1,function(e,t){e.display.gutterSpecs=getGutters(e.options.gutters,t),updateGutters(e)},!0),option(`firstLineNumber`,1,updateGutters,!0),option(`lineNumberFormatter`,function(e){return e},updateGutters,!0),option(`showCursorWhenSelecting`,!1,updateSelection,!0),option(`resetSelectionOnContextMenu`,!0),option(`lineWiseCopyCut`,!0),option(`pasteLinesPerSelection`,!0),option(`selectionsMayTouch`,!1),option(`readOnly`,!1,function(e,t){t==`nocursor`&&(onBlur(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),option(`screenReaderLabel`,null,function(e,t){t=t===``?null:t,e.display.input.screenReaderLabelChanged(t)}),option(`disableInput`,!1,function(e,t){t||e.display.input.reset()},!0),option(`dragDrop`,!0,dragDropChanged),option(`allowDropFileTypes`,null),option(`cursorBlinkRate`,530),option(`cursorScrollMargin`,0),option(`cursorHeight`,1,updateSelection,!0),option(`singleCursorHeightPerLine`,!0,updateSelection,!0),option(`workTime`,100),option(`workDelay`,100),option(`flattenSpans`,!0,resetModeState,!0),option(`addModeClass`,!1,resetModeState,!0),option(`pollInterval`,100),option(`undoDepth`,200,function(e,t){return e.doc.history.undoDepth=t}),option(`historyEventDelay`,1250),option(`viewportMargin`,10,function(e){return e.refresh()},!0),option(`maxHighlightLength`,1e4,resetModeState,!0),option(`moveInputWithCursor`,!0,function(e,t){t||e.display.input.resetPosition()}),option(`tabindex`,null,function(e,t){return e.display.input.getField().tabIndex=t||``}),option(`autofocus`,null),option(`direction`,`ltr`,function(e,t){return e.doc.setDirection(t)},!0),option(`phrases`,null)}function dragDropChanged(e,t,n){if(!t!=!(n&&n!=Q)){var r=e.display.dragFunctions,i=t?on:off;i(e.display.scroller,`dragstart`,r.start),i(e.display.scroller,`dragenter`,r.enter),i(e.display.scroller,`dragover`,r.over),i(e.display.scroller,`dragleave`,r.leave),i(e.display.scroller,`drop`,r.drop)}}function wrappingChanged(e){e.options.lineWrapping?(addClass(e.display.wrapper,`CodeMirror-wrap`),e.display.sizer.style.minWidth=``,e.display.sizerWidth=null):(rmClass(e.display.wrapper,`CodeMirror-wrap`),findMaxLine(e)),estimateLineHeights(e),regChange(e),clearCaches(e),setTimeout(function(){return updateScrollbars(e)},100)}function CodeMirror(e,t){var n=this;if(!(this instanceof CodeMirror))return new CodeMirror(e,t);this.options=t=t?copyObj(t):{},copyObj(Ce,t,!1);var r=t.value;typeof r==`string`?r=new Doc(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new CodeMirror.inputStyles[t.inputStyle](this),a=this.display=new Display(e,r,i,t);for(var l in a.wrapper.CodeMirror=this,themeChanged(this),t.lineWrapping&&(this.display.wrapper.className+=` CodeMirror-wrap`),initScrollbars(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 Delayed,keySeq:null,specialChars:null},t.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),registerEventHandlers(this),ensureGlobalHandlers(),startOperation(this),this.curOp.forceUpdate=!0,attachDoc(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&onFocus(n)},20):onBlur(this),we)we.hasOwnProperty(l)&&we[l](this,t[l],Q);maybeUpdateLineNumberWidth(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Te.length;++u)Te[u](this);endOperation(this),c&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering==`optimizelegibility`&&(a.lineDiv.style.textRendering=`auto`)}CodeMirror.defaults=Ce,CodeMirror.optionHandlers=we;function registerEventHandlers(e){var t=e.display;on(t.scroller,`mousedown`,operation(e,onMouseDown)),o&&s<11?on(t.scroller,`dblclick`,operation(e,function(t){if(!signalDOMEvent(e,t)){var n=posFromMouse(e,t);if(!(!n||clickInGutter(e,t)||eventInWidget(e.display,t))){e_preventDefault(t);var r=e.findWordAt(n);extendSelection(e.doc,r.anchor,r.head)}}})):on(t.scroller,`dblclick`,function(t){return signalDOMEvent(e,t)||e_preventDefault(t)}),on(t.scroller,`contextmenu`,function(t){return onContextMenu(e,t)}),on(t.input.getField(),`contextmenu`,function(n){t.scroller.contains(n.target)||onContextMenu(e,n)});var n,r={end:0};function finishTouch(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function isMouseLikeTouchEvent(e){if(e.touches.length!=1)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function farAway(e,t){if(t.left==null)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}on(t.scroller,`touchstart`,function(i){if(!signalDOMEvent(e,i)&&!isMouseLikeTouchEvent(i)&&!clickInGutter(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},i.touches.length==1&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),on(t.scroller,`touchmove`,function(){t.activeTouch&&(t.activeTouch.moved=!0)}),on(t.scroller,`touchend`,function(n){var r=t.activeTouch;if(r&&!eventInWidget(t,n)&&r.left!=null&&!r.moved&&new Date-r.start<300){var i=e.coordsChar(t.activeTouch,`page`),a=!r.prev||farAway(r,r.prev)?new Range(i,i):!r.prev.prev||farAway(r,r.prev.prev)?e.findWordAt(i):new Range(Pos(i.line,0),clipPos(e.doc,Pos(i.line+1,0)));e.setSelection(a.anchor,a.head),e.focus(),e_preventDefault(n)}finishTouch()}),on(t.scroller,`touchcancel`,finishTouch),on(t.scroller,`scroll`,function(){t.scroller.clientHeight&&(updateScrollTop(e,t.scroller.scrollTop),setScrollLeft(e,t.scroller.scrollLeft,!0),signal(e,`scroll`,e))}),on(t.scroller,`mousewheel`,function(t){return onScrollWheel(e,t)}),on(t.scroller,`DOMMouseScroll`,function(t){return onScrollWheel(e,t)}),on(t.wrapper,`scroll`,function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){signalDOMEvent(e,t)||e_stop(t)},over:function(t){signalDOMEvent(e,t)||(onDragOver(e,t),e_stop(t))},start:function(t){return onDragStart(e,t)},drop:operation(e,onDrop),leave:function(t){signalDOMEvent(e,t)||clearDragCursor(e)}};var i=t.input.getField();on(i,`keyup`,function(t){return onKeyUp.call(e,t)}),on(i,`keydown`,operation(e,onKeyDown)),on(i,`keypress`,operation(e,onKeyPress)),on(i,`focus`,function(t){return onFocus(e,t)}),on(i,`blur`,function(t){return onBlur(e,t)})}var Te=[];CodeMirror.defineInitHook=function(e){return Te.push(e)};function indentLine(e,t,n,r){var i=e.doc,a;n??=`add`,n==`smart`&&(i.mode.indent?a=getContextBefore(e,t).state:n=`prev`);var o=e.options.tabSize,s=getLine(i,t),c=countColumn(s.text,null,o);s.stateAfter&&=null;var l=s.text.match(/^\s*/)[0],u;if(!r&&!/\S/.test(s.text))u=0,n=`not`;else if(n==`smart`&&(u=i.mode.indent(a,s.text.slice(l.length),s.text),u==O||u>150)){if(!r)return;n=`prev`}n==`prev`?u=t>i.first?countColumn(getLine(i,t-1).text,null,o):0:n==`add`?u=c+e.options.indentUnit:n==`subtract`?u=c-e.options.indentUnit:typeof n==`number`&&(u=c+n),u=Math.max(0,u);var d=``,f=0;if(e.options.indentWithTabs)for(var m=Math.floor(u/o);m;--m)f+=o,d+=` `;if(f<u&&(d+=spaceStr(u-f)),d!=l)return replaceRange(i,d,Pos(t,0),Pos(t,l.length),`+input`),s.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var g=i.sel.ranges[h];if(g.head.line==t&&g.head.ch<l.length){var _=Pos(t,l.length);replaceOneSelection(i,h,new Range(_,_));break}}}var $=null;function setLastCopied(e){$=e}function applyTextInput(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||=a.sel;var o=new Date-200,s=i==`paste`||e.state.pasteIncoming>o,c=B(t),l=null;if(s&&r.ranges.length>1)if($&&$.text.join(`
13
+ `)==t){if(r.ranges.length%$.text.length==0){l=[];for(var u=0;u<$.text.length;u++)l.push(a.splitLines($.text[u]))}}else c.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=map(c,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var m=r.ranges[f],h=m.from(),g=m.to();m.empty()&&(n&&n>0?h=Pos(h.line,h.ch-n):e.state.overwrite&&!s?g=Pos(g.line,Math.min(getLine(a,g.line).text.length,g.ch+lst(c).length)):s&&$&&$.lineWise&&$.text.join(`
14
+ `)==c.join(`
15
+ `)&&(h=g=Pos(h.line,0)));var _={from:h,to:g,text:l?l[f%l.length]:c,origin:i||(s?`paste`:e.state.cutIncoming>o?`cut`:`+input`)};makeChange(e.doc,_),signalLater(e,`inputRead`,e,_)}t&&!s&&triggerElectric(e,t),ensureCursorVisible(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function handlePaste(e,t){var n=e.clipboardData&&e.clipboardData.getData(`Text`);if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&runInOp(t,function(){return applyTextInput(t,n,0,null,`paste`)}),!0}function triggerElectric(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=indentLine(e,i.head.line,`smart`);break}}else a.electricInput&&a.electricInput.test(getLine(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=indentLine(e,i.head.line,`smart`));o&&signalLater(e,`electricInput`,e,i.head.line)}}}function copyableRanges(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:Pos(i,0),head:Pos(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function disableBrowserMagic(e,t,n,r){e.setAttribute(`autocorrect`,n?`on`:`off`),e.setAttribute(`autocapitalize`,r?`on`:`off`),e.setAttribute(`spellcheck`,!!t)}function hiddenTextarea(){var e=elt(`textarea`,null,null,`position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none`),t=elt(`div`,[e],null,`overflow: hidden; position: relative; width: 3px; height: 0px;`);return c?e.style.width=`1000px`:e.setAttribute(`wrap`,`off`),_&&(e.style.border=`1px solid black`),t}function addEditorMethods(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){win(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&e!=`mode`||(r[e]=n,t.hasOwnProperty(e)&&operation(this,t[e])(this,n,i),signal(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`](getKeyMap(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:methodOp(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw Error(`Overlays may not be stateful.`);insertSorted(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,regChange(this)}),removeOverlay:methodOp(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||typeof e==`string`&&r.name==e){t.splice(n,1),this.state.modeGen++,regChange(this);return}}}),indentLine:methodOp(function(e,t,n){typeof t!=`string`&&typeof t!=`number`&&(t=t==null?this.options.smartIndent?`smart`:`prev`:t?`add`:`subtract`),isLine(this.doc,e)&&indentLine(this,e,t,n)}),indentSelection:methodOp(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(indentLine(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ensureCursorVisible(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-+!o.ch)+1;for(var c=s;c<n;++c)indentLine(this,c,e);var l=this.doc.sel.ranges;a.ch==0&&t.length==l.length&&l[r].from().ch>0&&replaceOneSelection(this.doc,r,new Range(a,l[r].to()),k)}}}),getTokenAt:function(e,t){return takeToken(this,e,t)},getLineTokens:function(e,t){return takeToken(this,Pos(e),t,!0)},getTokenTypeAt:function(e){e=clipPos(this.doc,e);var t=getLineStyles(this,getLine(this.doc,e.line)),n=0,r=(t.length-1)/2,i=e.ch,a;if(i==0)a=t[2];else for(;;){var o=n+r>>1;if((o?t[o*2-1]:0)>=i)r=o;else if(t[o*2+1]<i)n=o+1;else{a=t[o*2+2];break}}var s=a?a.indexOf(`overlay `):-1;return s<0?a:s==0?null:a.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if(typeof a[t]==`string`)i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(a,this)&&indexOf(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=clipLine(n,e??n.first+n.size-1),getContextBefore(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=e==null?r.head:typeof e==`object`?clipPos(this.doc,e):e?r.from():r.to(),cursorCoords(this,n,t||`page`)},charCoords:function(e,t){return charCoords(this,clipPos(this.doc,e),t||`page`)},coordsChar:function(e,t){return e=fromCoordSystem(this,e,t||`page`),coordsChar(this,e.left,e.top)},lineAtHeight:function(e,t){return e=fromCoordSystem(this,{top:e,left:0},t||`page`).top,lineAtHeight(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r=!1,i;if(typeof e==`number`){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,r=!0),i=getLine(this.doc,e)}else i=e;return intoCoordSystem(this,i,{top:0,left:0},t||`page`,n||r).top+(r?this.doc.height-heightAtLine(i):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=cursorCoords(this,clipPos(this.doc,e));var o=e.bottom,s=e.left;if(t.style.position=`absolute`,t.setAttribute(`cm-ignore-events`,`true`),this.display.input.setUneditable(t),a.sizer.appendChild(t),r==`over`)o=e.top;else if(r==`above`||r==`near`){var c=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);(r==`above`||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(o=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=o+`px`,t.style.left=t.style.right=``,i==`right`?(s=a.sizer.clientWidth-t.offsetWidth,t.style.right=`0px`):(i==`left`?s=0:i==`middle`&&(s=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+`px`),n&&scrollIntoView(this,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,triggerOnMouseDown:methodOp(onMouseDown),execCommand:function(e){if(_e.hasOwnProperty(e))return _e[e].call(null,this)},triggerElectric:methodOp(function(e){triggerElectric(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=clipPos(this.doc,e),o=0;o<t&&(a=findPosH(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:methodOp(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?findPosH(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},j)}),deleteH:methodOp(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(``,null,`+delete`):deleteNearSelection(this,function(n){var i=findPosH(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=clipPos(this.doc,e),s=0;s<t;++s){var c=cursorCoords(this,o,`div`);if(a==null?a=c.left:c.left=a,o=findPosV(this,c,i,n),o.hitSide)break}return o},moveV:methodOp(function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(o){if(a)return e<0?o.from():o.to();var s=cursorCoords(n,o.head,`div`);o.goalColumn!=null&&(s.left=o.goalColumn),i.push(s.left);var c=findPosV(n,s,e,t);return t==`page`&&o==r.sel.primary()&&addToScrollTop(n,charCoords(n,c,`div`).top-s.top),c},j),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]}),findWordAt:function(e){var t=this.doc,n=getLine(t,e.line).text,r=e.ch,i=e.ch;if(n){var a=this.getHelper(e,`wordChars`);(e.sticky==`before`||i==n.length)&&r?--r:++i;for(var o=n.charAt(r),s=isWordChar(o,a)?function(e){return isWordChar(e,a)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!isWordChar(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new Range(Pos(e.line,r),Pos(e.line,i))},toggleOverwrite:function(e){e!=null&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?addClass(this.display.cursorDiv,`CodeMirror-overwrite`):rmClass(this.display.cursorDiv,`CodeMirror-overwrite`),signal(this,`overwriteToggle`,this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==activeElt(root(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:methodOp(function(e,t){scrollToCoords(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-scrollGap(this)-this.display.barHeight,width:e.scrollWidth-scrollGap(this)-this.display.barWidth,clientHeight:displayHeight(this),clientWidth:displayWidth(this)}},scrollIntoView:methodOp(function(e,t){e==null?(e={from:this.doc.sel.primary().head,to:null},t??=this.options.cursorScrollMargin):typeof e==`number`?e={from:Pos(e,0),to:null}:e.from??(e={from:e,to:null}),e.to||=e.from,e.margin=t||0,e.from.line==null?scrollToCoordsRange(this,e.from,e.to,e.margin):scrollToRange(this,e)}),setSize:methodOp(function(e,t){var n=this,interpret=function(e){return typeof e==`number`||/^\d+$/.test(String(e))?e+`px`:e};e!=null&&(this.display.wrapper.style.width=interpret(e)),t!=null&&(this.display.wrapper.style.height=interpret(t)),this.options.lineWrapping&&clearLineMeasurementCache(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(e){if(e.widgets){for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){regLineChange(n,r,`widget`);break}}++r}),this.curOp.forceUpdate=!0,signal(this,`refresh`,this)}),operation:function(e){return runInOp(this,e)},startOperation:function(){return startOperation(this)},endOperation:function(){return endOperation(this)},refresh:methodOp(function(){var e=this.display.cachedTextHeight;regChange(this),this.curOp.forceUpdate=!0,clearCaches(this),scrollToCoords(this,this.doc.scrollLeft,this.doc.scrollTop),updateGutterSpace(this.display),(e==null||Math.abs(e-textHeight(this.display))>.5||this.options.lineWrapping)&&estimateLineHeights(this),signal(this,`refresh`,this)}),swapDoc:methodOp(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),attachDoc(this,e),clearCaches(this),this.display.input.reset(),scrollToCoords(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,signalLater(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}},eventMixin(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}function findPosH(e,t,n,r,i){var a=t,o=n,s=getLine(e,t.line),c=i&&e.direction==`rtl`?-n:n;function findNextLine(){var n=t.line+c;return n<e.first||n>=e.first+e.size?!1:(t=new Pos(n,t.ch,t.sticky),s=getLine(e,n))}function moveOnce(a){var o;if(r==`codepoint`){var l=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(l))o=null;else{var u=n>0?l>=55296&&l<56320:l>=56320&&l<57343;o=new Pos(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u?2:1))),-n)}}else o=i?moveVisually(e.cm,s,t,n):moveLogically(s,t,n);if(o==null)if(!a&&findNextLine())t=endOfLine(i,e.cm,s,t.line,c);else return!1;else t=o;return!0}if(r==`char`||r==`codepoint`)moveOnce();else if(r==`column`)moveOnce(!0);else if(r==`word`||r==`group`)for(var l=null,u=r==`group`,d=e.cm&&e.cm.getHelper(t,`wordChars`),f=!0;!(n<0&&!moveOnce(!f));f=!1){var m=s.text.charAt(t.ch)||`
16
+ `,h=isWordChar(m,d)?`w`:u&&m==`
17
+ `?`n`:!u||/\s/.test(m)?null:`p`;if(u&&!f&&!h&&(h=`s`),l&&l!=h){n<0&&(n=1,moveOnce(),t.sticky=`after`);break}if(h&&(l=h),n>0&&!moveOnce(!f))break}var g=skipAtomic(e,t,a,o,!0);return equalCursorPos(a,g)&&(g.hitSide=!0),g}function findPosV(e,t,n,r){var i=e.doc,a=t.left,o;if(r==`page`){var s=Math.min(e.display.wrapper.clientHeight,win(e).innerHeight||i(e).documentElement.clientHeight),c=Math.max(s-.5*textHeight(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else r==`line`&&(o=n>0?t.bottom+3:t.top-3);for(var l;l=coordsChar(e,a,o),l.outside;){if(n<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=n*5}return l}var ContentEditableInput=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Delayed,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ContentEditableInput.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,disableBrowserMagic(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function belongsToInput(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}on(i,`paste`,function(e){!belongsToInput(e)||signalDOMEvent(r,e)||handlePaste(e,r)||s<=11&&setTimeout(operation(r,function(){return t.updateFromDOM()}),20)}),on(i,`compositionstart`,function(e){t.composing={data:e.data,done:!1}}),on(i,`compositionupdate`,function(e){t.composing||={data:e.data,done:!1}}),on(i,`compositionend`,function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),on(i,`touchstart`,function(){return n.forceCompositionEnd()}),on(i,`input`,function(){t.composing||t.readFromDOMSoon()});function onCopyCut(e){if(!(!belongsToInput(e)||signalDOMEvent(r,e))){if(r.somethingSelected())setLastCopied({lineWise:!1,text:r.getSelections()}),e.type==`cut`&&r.replaceSelection(``,null,`cut`);else if(r.options.lineWiseCopyCut){var t=copyableRanges(r);setLastCopied({lineWise:!0,text:t.text}),e.type==`cut`&&r.operation(function(){r.setSelections(t.ranges,0,k),r.replaceSelection(``,null,`cut`)})}else return;if(e.clipboardData){e.clipboardData.clearData();var a=$.text.join(`
18
+ `);if(e.clipboardData.setData(`Text`,a),e.clipboardData.getData(`Text`)==a){e.preventDefault();return}}var o=hiddenTextarea(),s=o.firstChild;disableBrowserMagic(s),r.display.lineSpace.insertBefore(o,r.display.lineSpace.firstChild),s.value=$.text.join(`
19
+ `);var c=activeElt(rootNode(i));selectInput(s),setTimeout(function(){r.display.lineSpace.removeChild(o),c.focus(),c==i&&n.showPrimarySelection()},50)}}on(i,`copy`,onCopyCut),on(i,`cut`,onCopyCut)},ContentEditableInput.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute(`aria-label`,e):this.div.removeAttribute(`aria-label`)},ContentEditableInput.prototype.prepareSelection=function(){var e=prepareSelection(this.cm,!1);return e.focus=activeElt(rootNode(this.div))==this.div,e},ContentEditableInput.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ContentEditableInput.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ContentEditableInput.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var o=domToPos(t,e.anchorNode,e.anchorOffset),s=domToPos(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&s&&!s.bad&&cmp(minPos(o,s),i)==0&&cmp(maxPos(o,s),a)==0)){var c=t.display.view,l=i.line>=t.display.viewFrom&&posToDOM(t,i)||{node:c[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&posToDOM(t,a);if(!u){var d=c[c.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!l||!u){e.removeAllRanges();return}var m=e.rangeCount&&e.getRangeAt(0),h;try{h=E(l.node,l.offset,u.offset,u.node)}catch{}h&&(!n&&t.state.focused?(e.collapse(l.node,l.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),m&&e.anchorNode==null?e.addRange(m):n&&this.startGracePeriod()),this.rememberSelection()}},ContentEditableInput.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)},ContentEditableInput.prototype.showMultipleSelections=function(e){removeChildrenAndAdd(this.cm.display.cursorDiv,e.cursors),removeChildrenAndAdd(this.cm.display.selectionDiv,e.selection)},ContentEditableInput.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ContentEditableInput.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return contains(this.div,t)},ContentEditableInput.prototype.focus=function(){this.cm.options.readOnly!=`nocursor`&&((!this.selectionInEditor()||activeElt(rootNode(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ContentEditableInput.prototype.blur=function(){this.div.blur()},ContentEditableInput.prototype.getField=function(){return this.div},ContentEditableInput.prototype.supportsTouch=function(){return!0},ContentEditableInput.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):runInOp(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function poll(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,poll))}this.polling.set(this.cm.options.pollInterval,poll)},ContentEditableInput.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ContentEditableInput.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&isInGutter(e.anchorNode)){this.cm.triggerOnKeyDown({type:`keydown`,keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=domToPos(t,e.anchorNode,e.anchorOffset),r=domToPos(t,e.focusNode,e.focusOffset);n&&r&&runInOp(t,function(){setSelection(t.doc,simpleSelection(n,r),k),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},ContentEditableInput.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=Pos(r.line-1,getLine(e.doc,r.line-1).length)),i.ch==getLine(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Pos(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;r.line==t.viewFrom||(a=findViewIndex(e,r.line))==0?(o=lineNo(t.view[0].line),s=t.view[0].node):(o=lineNo(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=findViewIndex(e,i.line),l,u;if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=lineNo(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(domTextBetween(e,s,u,o,l)),f=getBetween(e.doc,Pos(o,0),Pos(l,getLine(e.doc,l).text.length));d.length>1&&f.length>1;)if(lst(d)==lst(f))d.pop(),f.pop(),l--;else if(d[0]==f[0])d.shift(),f.shift(),o++;else break;for(var m=0,h=0,g=d[0],_=f[0],v=Math.min(g.length,_.length);m<v&&g.charCodeAt(m)==_.charCodeAt(m);)++m;for(var y=lst(d),b=lst(f),x=Math.min(y.length-(d.length==1?m:0),b.length-(f.length==1?m:0));h<x&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(d.length==1&&f.length==1&&o==r.line)for(;m&&m>r.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)m--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,``),d[0]=d[0].slice(m).replace(/\u200b+$/,``);var S=Pos(o,m),C=Pos(l,f.length?lst(f).length-h:0);if(d.length>1||d[0]||cmp(S,C))return replaceRange(e.doc,d,S,C,`+input`),!0},ContentEditableInput.prototype.ensurePolled=function(){this.forceCompositionEnd()},ContentEditableInput.prototype.reset=function(){this.forceCompositionEnd()},ContentEditableInput.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ContentEditableInput.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout??=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},ContentEditableInput.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&runInOp(this.cm,function(){return regChange(e.cm)})},ContentEditableInput.prototype.setUneditable=function(e){e.contentEditable=`false`},ContentEditableInput.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||operation(this.cm,applyTextInput)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},ContentEditableInput.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!=`nocursor`)},ContentEditableInput.prototype.onContextMenu=function(){},ContentEditableInput.prototype.resetPosition=function(){},ContentEditableInput.prototype.needsContentAttribute=!0;function posToDOM(e,t){var n=findViewForLine(e,t.line);if(!n||n.hidden)return null;var r=getLine(e.doc,t.line),i=mapFromLineView(n,r,t.line),a=getOrder(r,e.doc.direction),o=`left`;a&&(o=getBidiPartAt(a,t.ch)%2?`right`:`left`);var s=nodeAndOffsetInLineMap(i.map,t.ch,o);return s.offset=s.collapse==`right`?s.end:s.start,s}function isInGutter(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function badPos(e,t){return t&&(e.bad=!0),e}function domTextBetween(e,t,n,r,i){var a=``,o=!1,s=e.doc.lineSeparator(),c=!1;function recognizeMarker(e){return function(t){return t.id==e}}function close(){o&&=(a+=s,c&&(a+=s),c=!1)}function addText(e){e&&(close(),a+=e)}function walk(t){if(t.nodeType==1){var n=t.getAttribute(`cm-text`);if(n){addText(n);return}var a=t.getAttribute(`cm-marker`),l;if(a){var u=e.findMarks(Pos(r,0),Pos(i+1,0),recognizeMarker(+a));u.length&&(l=u[0].find(0))&&addText(getBetween(e.doc,l.from,l.to).join(s));return}if(t.getAttribute(`contenteditable`)==`false`)return;var d=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&t.textContent.length==0)return;d&&close();for(var f=0;f<t.childNodes.length;f++)walk(t.childNodes[f]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),d&&(o=!0)}else t.nodeType==3&&addText(t.nodeValue.replace(/\u200b/g,``).replace(/\u00a0/g,` `))}for(;walk(t),t!=n;)t=t.nextSibling,c=!1;return a}function domToPos(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return badPos(e.clipPos(Pos(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return locateNodeInLineView(a,t,n)}}function locateNodeInLineView(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!contains(r,t))return badPos(Pos(lineNo(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?lst(e.rest):e.line;return badPos(Pos(lineNo(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,n&&=o.nodeValue.length);s.parentNode!=r;)s=s.parentNode;var c=e.measure,l=c.maps;function find(t,n,r){for(var i=-1;i<(l?l.length:0);i++)for(var a=i<0?c.map:l[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=lineNo(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+ +!!r]),Pos(u,d)}}}var u=find(o,s,n);if(u)return badPos(u,i);for(var d=s.nextSibling,f=o?o.nodeValue.length-n:0;d;d=d.nextSibling){if(u=find(d,d.firstChild,0),u)return badPos(Pos(u.line,u.ch-f),i);f+=d.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(u=find(m,m.firstChild,-1),u)return badPos(Pos(u.line,u.ch+h),i);h+=m.textContent.length}}var TextareaInput=function(e){this.cm=e,this.prevInput=``,this.pollingFast=!1,this.polling=new Delayed,this.hasSelection=!1,this.composing=null,this.resetting=!1};TextareaInput.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),_&&(i.style.width=`0px`),on(i,`input`,function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),on(i,`paste`,function(e){signalDOMEvent(r,e)||handlePaste(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function prepareCopyCut(e){if(!signalDOMEvent(r,e)){if(r.somethingSelected())setLastCopied({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var t=copyableRanges(r);setLastCopied({lineWise:!0,text:t.text}),e.type==`cut`?r.setSelections(t.ranges,null,k):(n.prevInput=``,i.value=t.text.join(`
20
+ `),selectInput(i))}else return;e.type==`cut`&&(r.state.cutIncoming=+new Date)}}on(i,`cut`,prepareCopyCut),on(i,`copy`,prepareCopyCut),on(e.scroller,`paste`,function(t){if(!(eventInWidget(e,t)||signalDOMEvent(r,t))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event(`paste`);a.clipboardData=t.clipboardData,i.dispatchEvent(a)}}),on(e.lineSpace,`selectstart`,function(t){eventInWidget(e,t)||e_preventDefault(t)}),on(i,`compositionstart`,function(){var e=r.getCursor(`from`);n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor(`to`),{className:`CodeMirror-composing`})}}),on(i,`compositionend`,function(){n.composing&&=(n.poll(),n.composing.range.clear(),null)})},TextareaInput.prototype.createField=function(e){this.wrapper=hiddenTextarea(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;disableBrowserMagic(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},TextareaInput.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute(`aria-label`,e):this.textarea.removeAttribute(`aria-label`)},TextareaInput.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=prepareSelection(e);if(e.options.moveInputWithCursor){var i=cursorCoords(e,n.sel.primary().head,`div`),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},TextareaInput.prototype.showSelection=function(e){var t=this.cm.display;removeChildrenAndAdd(t.cursorDiv,e.cursors),removeChildrenAndAdd(t.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+`px`,this.wrapper.style.left=e.teLeft+`px`)},TextareaInput.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput=``;var n=t.getSelection();this.textarea.value=n,t.state.focused&&selectInput(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=``,o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},TextareaInput.prototype.getField=function(){return this.textarea},TextareaInput.prototype.supportsTouch=function(){return!1},TextareaInput.prototype.focus=function(){if(this.cm.options.readOnly!=`nocursor`&&(!y||activeElt(rootNode(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},TextareaInput.prototype.blur=function(){this.textarea.blur()},TextareaInput.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},TextareaInput.prototype.receivedFocus=function(){this.slowPoll()},TextareaInput.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},TextareaInput.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function p(){!t.poll()&&!e?(e=!0,t.polling.set(60,p)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,p)},TextareaInput.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||te(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r=`​`),a==8666)return this.reset(),this.cm.execCommand(`undo`)}for(var c=0,l=Math.min(r.length,i.length);c<l&&r.charCodeAt(c)==i.charCodeAt(c);)++c;return runInOp(t,function(){applyTextInput(t,i.slice(c),r.length-c,null,e.composing?`*compose`:null),i.length>1e3||i.indexOf(`
21
+ `)>-1?n.value=e.prevInput=``:e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor(`to`),{className:`CodeMirror-composing`}))}),!0},TextareaInput.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},TextareaInput.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},TextareaInput.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=posFromMouse(n,e),l=r.scroller.scrollTop;if(!a||f)return;n.options.resetSelectionOnContextMenu&&n.doc.sel.contains(a)==-1&&operation(n,setSelection)(n.doc,simpleSelection(a),k);var u=i.style.cssText,d=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText=`position: static`,i.style.cssText=`position: absolute; width: 30px; height: 30px;
22
+ top: `+(e.clientY-m.top-5)+`px; left: `+(e.clientX-m.left-5)+`px;
23
+ z-index: 1000; background: `+(o?`rgba(255, 255, 255, .05)`:`transparent`)+`;
24
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var h;c&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),c&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=` `),t.contextMenuPending=rehide,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function prepareSelectAllHack(){if(i.selectionStart!=null){var e=n.somethingSelected(),a=`​`+(e?i.value:``);i.value=`⇚`,i.value=a,t.prevInput=e?``:`​`,i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function rehide(){if(t.contextMenuPending==rehide&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!o||o&&s<9)&&prepareSelectAllHack();var e=0,poll=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==`​`?operation(n,selectAll)(n):e++<10?r.detectingSelectAll=setTimeout(poll,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(poll,200)}}if(o&&s>=9&&prepareSelectAllHack(),T){e_stop(e);var mouseup=function(){off(window,`mouseup`,mouseup),setTimeout(rehide,20)};on(window,`mouseup`,mouseup)}else setTimeout(rehide,50)},TextareaInput.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e==`nocursor`,this.textarea.readOnly=!!e},TextareaInput.prototype.setUneditable=function(){},TextareaInput.prototype.needsContentAttribute=!1;function fromTextArea(e,t){if(t=t?copyObj(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=activeElt(rootNode(e));t.autofocus=n==e||e.getAttribute(`autofocus`)!=null&&n==document.body}function save(){e.value=o.getValue()}var r;if(e.form&&(on(e.form,`submit`,save),!t.leaveSubmitMethodAlone)){var i=e.form;r=i.submit;try{var a=i.submit=function(){save(),i.submit=r,i.submit(),i.submit=a}}catch{}}t.finishInit=function(n){n.save=save,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,save(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display=``,e.form&&(off(e.form,`submit`,save),!t.leaveSubmitMethodAlone&&typeof e.form.submit==`function`&&(e.form.submit=r))}},e.style.display=`none`;var o=CodeMirror(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return o}function addLegacyProps(e){e.off=off,e.on=on,e.wheelEventPixels=wheelEventPixels,e.Doc=Doc,e.splitLines=B,e.countColumn=countColumn,e.findColumn=findColumn,e.isWordChar=isWordCharBasic,e.Pass=O,e.signal=signal,e.Line=Line,e.changeEnd=changeEnd,e.scrollbarModel=le,e.Pos=Pos,e.cmpPos=cmp,e.modes=ie,e.mimeModes=V,e.resolveMode=resolveMode,e.getMode=getMode,e.modeExtensions=H,e.extendMode=extendMode,e.copyState=copyState,e.startState=startState,e.innerMode=innerMode,e.commands=_e,e.keyMap=Z,e.keyName=keyName,e.isModifierKey=isModifierKey,e.lookupKey=lookupKey,e.normalizeKeyMap=normalizeKeyMap,e.StringStream=StringStream,e.SharedTextMarker=SharedTextMarker,e.TextMarker=TextMarker,e.LineWidget=LineWidget,e.e_preventDefault=e_preventDefault,e.e_stopPropagation=e_stopPropagation,e.e_stop=e_stop,e.addClass=addClass,e.contains=contains,e.rmClass=rmClass,e.keyNames=J}defineOptions(CodeMirror),addEditorMethods(CodeMirror);var Ee=`iter insert remove copy getEditor constructor`.split(` `);for(var De in Doc.prototype)Doc.prototype.hasOwnProperty(De)&&indexOf(Ee,De)<0&&(CodeMirror.prototype[De]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Doc.prototype[De]));return eventMixin(Doc),CodeMirror.inputStyles={textarea:TextareaInput,contenteditable:ContentEditableInput},CodeMirror.defineMode=function(e){!CodeMirror.defaults.mode&&e!=`null`&&(CodeMirror.defaults.mode=e),defineMode.apply(this,arguments)},CodeMirror.defineMIME=defineMIME,CodeMirror.defineMode(`null`,function(){return{token:function(e){return e.skipToEnd()}}}),CodeMirror.defineMIME(`text/plain`,`null`),CodeMirror.defineExtension=function(e,t){CodeMirror.prototype[e]=t},CodeMirror.defineDocExtension=function(e,t){Doc.prototype[e]=t},CodeMirror.fromTextArea=fromTextArea,addLegacyProps(CodeMirror),CodeMirror.version=`5.65.21`,CodeMirror}))})),f=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`css`,function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode(`text/css`));var i=t.indentUnit,a=n.tokenHooks,o=n.documentTypes||{},s=n.mediaTypes||{},c=n.mediaFeatures||{},l=n.mediaValueKeywords||{},u=n.propertyKeywords||{},d=n.nonStandardPropertyKeywords||{},f=n.fontProperties||{},m=n.counterDescriptors||{},h=n.colorKeywords||{},g=n.valueKeywords||{},_=n.allowNested,v=n.lineComment,y=n.supportsAtComponent===!0,b=t.highlightNonStandardPropertyKeywords!==!1,x,S;function ret(e,t){return x=t,e}function tokenBase(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(r!==!1)return r}if(n==`@`)return e.eatWhile(/[\w\\\-]/),ret(`def`,e.current());if(n==`=`||(n==`~`||n==`|`)&&e.eat(`=`))return ret(null,`compare`);if(n==`"`||n==`'`)return t.tokenize=tokenString(n),t.tokenize(e,t);if(n==`#`)return e.eatWhile(/[\w\\\-]/),ret(`atom`,`hash`);if(n==`!`)return e.match(/^\s*\w*/),ret(`keyword`,`important`);if(/\d/.test(n)||n==`.`&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),ret(`number`,`unit`);if(n===`-`){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),ret(`number`,`unit`);if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?ret(`variable-2`,`variable-definition`):ret(`variable-2`,`variable`);if(e.match(/^\w+-/))return ret(`meta`,`meta`)}else if(/[,+>*\/]/.test(n))return ret(null,`select-op`);else if(n==`.`&&e.match(/^-?[_a-z][_a-z0-9-]*/i))return ret(`qualifier`,`qualifier`);else if(/[:;{}\[\]\(\)]/.test(n))return ret(null,n);else if(e.match(/^[\w-.]+(?=\()/))return/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=tokenParenthesized),ret(`variable callee`,`variable`);else if(/[\w\\\-]/.test(n))return e.eatWhile(/[\w\\\-]/),ret(`property`,`word`);else return ret(null,null)}function tokenString(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),ret(`string`,`string`)}}function tokenParenthesized(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=tokenString(`)`),ret(null,`(`)}function Context(e,t,n){this.type=e,this.indent=t,this.prev=n}function pushContext(e,t,n,r){return e.context=new Context(n,t.indentation()+(r===!1?0:i),e.context),n}function popContext(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function pass(e,t,n){return C[n.context.type](e,t,n)}function popAndPass(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return pass(e,t,n)}function wordAsValue(e){var t=e.current().toLowerCase();S=g.hasOwnProperty(t)?`atom`:h.hasOwnProperty(t)?`keyword`:`variable`}var C={};return C.top=function(e,t,n){if(e==`{`)return pushContext(n,t,`block`);if(e==`}`&&n.context.prev)return popContext(n);if(y&&/@component/i.test(e))return pushContext(n,t,`atComponentBlock`);if(/^@(-moz-)?document$/i.test(e))return pushContext(n,t,`documentTypes`);if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return pushContext(n,t,`atBlock`);if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,`restricted_atBlock_before`;if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return`keyframes`;if(e&&e.charAt(0)==`@`)return pushContext(n,t,`at`);if(e==`hash`)S=`builtin`;else if(e==`word`)S=`tag`;else if(e==`variable-definition`)return`maybeprop`;else if(e==`interpolation`)return pushContext(n,t,`interpolation`);else if(e==`:`)return`pseudo`;else if(_&&e==`(`)return pushContext(n,t,`parens`);return n.context.type},C.block=function(e,t,n){if(e==`word`){var r=t.current().toLowerCase();return u.hasOwnProperty(r)?(S=`property`,`maybeprop`):d.hasOwnProperty(r)?(S=b?`string-2`:`property`,`maybeprop`):_?(S=t.match(/^\s*:(?:\s|$)/,!1)?`property`:`tag`,`block`):(S+=` error`,`maybeprop`)}else if(e==`meta`)return`block`;else if(!_&&(e==`hash`||e==`qualifier`))return S=`error`,`block`;else return C.top(e,t,n)},C.maybeprop=function(e,t,n){return e==`:`?pushContext(n,t,`prop`):pass(e,t,n)},C.prop=function(e,t,n){if(e==`;`)return popContext(n);if(e==`{`&&_)return pushContext(n,t,`propBlock`);if(e==`}`||e==`{`)return popAndPass(e,t,n);if(e==`(`)return pushContext(n,t,`parens`);if(e==`hash`&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current()))S+=` error`;else if(e==`word`)wordAsValue(t);else if(e==`interpolation`)return pushContext(n,t,`interpolation`);return`prop`},C.propBlock=function(e,t,n){return e==`}`?popContext(n):e==`word`?(S=`property`,`maybeprop`):n.context.type},C.parens=function(e,t,n){return e==`{`||e==`}`?popAndPass(e,t,n):e==`)`?popContext(n):e==`(`?pushContext(n,t,`parens`):e==`interpolation`?pushContext(n,t,`interpolation`):(e==`word`&&wordAsValue(t),`parens`)},C.pseudo=function(e,t,n){return e==`meta`?`pseudo`:e==`word`?(S=`variable-3`,n.context.type):pass(e,t,n)},C.documentTypes=function(e,t,n){return e==`word`&&o.hasOwnProperty(t.current())?(S=`tag`,n.context.type):C.atBlock(e,t,n)},C.atBlock=function(e,t,n){if(e==`(`)return pushContext(n,t,`atBlock_parens`);if(e==`}`||e==`;`)return popAndPass(e,t,n);if(e==`{`)return popContext(n)&&pushContext(n,t,_?`block`:`top`);if(e==`interpolation`)return pushContext(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();S=r==`only`||r==`not`||r==`and`||r==`or`?`keyword`:s.hasOwnProperty(r)?`attribute`:c.hasOwnProperty(r)?`property`:l.hasOwnProperty(r)?`keyword`:u.hasOwnProperty(r)?`property`:d.hasOwnProperty(r)?b?`string-2`:`property`:g.hasOwnProperty(r)?`atom`:h.hasOwnProperty(r)?`keyword`:`error`}return n.context.type},C.atComponentBlock=function(e,t,n){return e==`}`?popAndPass(e,t,n):e==`{`?popContext(n)&&pushContext(n,t,_?`block`:`top`,!1):(e==`word`&&(S=`error`),n.context.type)},C.atBlock_parens=function(e,t,n){return e==`)`?popContext(n):e==`{`||e==`}`?popAndPass(e,t,n,2):C.atBlock(e,t,n)},C.restricted_atBlock_before=function(e,t,n){return e==`{`?pushContext(n,t,`restricted_atBlock`):e==`word`&&n.stateArg==`@counter-style`?(S=`variable`,`restricted_atBlock_before`):pass(e,t,n)},C.restricted_atBlock=function(e,t,n){return e==`}`?(n.stateArg=null,popContext(n)):e==`word`?(S=n.stateArg==`@font-face`&&!f.hasOwnProperty(t.current().toLowerCase())||n.stateArg==`@counter-style`&&!m.hasOwnProperty(t.current().toLowerCase())?`error`:`property`,`maybeprop`):`restricted_atBlock`},C.keyframes=function(e,t,n){return e==`word`?(S=`variable`,`keyframes`):e==`{`?pushContext(n,t,`top`):pass(e,t,n)},C.at=function(e,t,n){return e==`;`?popContext(n):e==`{`||e==`}`?popAndPass(e,t,n):(e==`word`?S=`tag`:e==`hash`&&(S=`builtin`),`at`)},C.interpolation=function(e,t,n){return e==`}`?popContext(n):e==`{`||e==`;`?popAndPass(e,t,n):(e==`word`?S=`variable`:e!=`variable`&&e!=`(`&&e!=`)`&&(S=`error`),`interpolation`)},{startState:function(e){return{tokenize:null,state:r?`block`:`top`,stateArg:null,context:new Context(r?`block`:`top`,e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||tokenBase)(e,t);return n&&typeof n==`object`&&(x=n[1],n=n[0]),S=n,x!=`comment`&&(t.state=C[t.state](x,e,t)),S},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),a=n.indent;return n.type==`prop`&&(r==`}`||r==`)`)&&(n=n.prev),n.prev&&(r==`}`&&(n.type==`block`||n.type==`top`||n.type==`interpolation`||n.type==`restricted_atBlock`)?(n=n.prev,a=n.indent):(r==`)`&&(n.type==`parens`||n.type==`atBlock_parens`)||r==`{`&&(n.type==`at`||n.type==`atBlock`))&&(a=Math.max(0,n.indent-i))),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:v,fold:`brace`}});function keySet(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}var t=[`domain`,`regexp`,`url`,`url-prefix`],n=keySet(t),r=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],i=keySet(r),a=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range`.split(`.`),o=keySet(a),s=[`landscape`,`portrait`,`none`,`coarse`,`fine`,`on-demand`,`hover`,`interlace`,`progressive`,`dark`,`light`,`standard`,`high`],c=keySet(s),l=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode`.split(`.`),u=keySet(l),d=`accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom`.split(`.`),f=keySet(d),m=keySet([`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`]),h=keySet([`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`]),g=`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`),_=keySet(g),v=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`),y=keySet(v),b=t.concat(r).concat(a).concat(s).concat(l).concat(d).concat(g).concat(v);e.registerHelper(`hintWords`,`css`,b);function tokenCComment(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}e.defineMIME(`text/css`,{documentTypes:n,mediaTypes:i,mediaFeatures:o,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=tokenCComment,tokenCComment(e,t)):!1}},name:`css`}),e.defineMIME(`text/x-scss`,{mediaTypes:i,mediaFeatures:o,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=tokenCComment,tokenCComment(e,t)):[`operator`,`operator`]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`]},"#":function(e){return e.eat(`{`)?[null,`interpolation`]:!1}},name:`css`,helperType:`scss`}),e.defineMIME(`text/x-less`,{mediaTypes:i,mediaFeatures:o,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=tokenCComment,tokenCComment(e,t)):[`operator`,`operator`]},"@":function(e){return e.eat(`{`)?[null,`interpolation`]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`])},"&":function(){return[`atom`,`atom`]}},name:`css`,helperType:`less`}),e.defineMIME(`text/x-gss`,{documentTypes:n,mediaTypes:i,mediaFeatures:o,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=tokenCComment,tokenCComment(e,t)):!1}},name:`css`,helperType:`gss`})})})),m=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`ecl`,function(e){function words(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}function metaHook(e,t){return t.startOfLine?(e.skipToEnd(),`meta`):!1}var t=e.indentUnit,n=words(`abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode`),r=words(`apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait`),i=words(`__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath`),a=words(`ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode`),o=words(`checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when`),s=words(`catch class do else finally for if switch try while`),c=words(`true false null`),l={"#":metaHook},u=/[+\-*&%=<>!?|\/]/,d;function tokenBase(e,t){var f=e.next();if(l[f]){var m=l[f](e,t);if(m!==!1)return m}if(f==`"`||f==`'`)return t.tokenize=tokenString(f),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(f))return d=f,null;if(/\d/.test(f))return e.eatWhile(/[\w\.]/),`number`;if(f==`/`){if(e.eat(`*`))return t.tokenize=tokenComment,tokenComment(e,t);if(e.eat(`/`))return e.skipToEnd(),`comment`}if(u.test(f))return e.eatWhile(u),`operator`;e.eatWhile(/[\w\$_]/);var h=e.current().toLowerCase();if(n.propertyIsEnumerable(h))return s.propertyIsEnumerable(h)&&(d=`newstatement`),`keyword`;if(r.propertyIsEnumerable(h))return s.propertyIsEnumerable(h)&&(d=`newstatement`),`variable`;if(i.propertyIsEnumerable(h))return s.propertyIsEnumerable(h)&&(d=`newstatement`),`variable-2`;if(a.propertyIsEnumerable(h))return s.propertyIsEnumerable(h)&&(d=`newstatement`),`variable-3`;if(o.propertyIsEnumerable(h))return s.propertyIsEnumerable(h)&&(d=`newstatement`),`builtin`;for(var g=h.length-1;g>=0&&(!isNaN(h[g])||h[g]==`_`);)--g;if(g>0){var _=h.substr(0,g+1);if(a.propertyIsEnumerable(_))return s.propertyIsEnumerable(_)&&(d=`newstatement`),`variable-3`}return c.propertyIsEnumerable(h)?`atom`:null}function tokenString(e){return function(t,n){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==e&&!r){a=!0;break}r=!r&&i==`\\`}return(a||!r)&&(n.tokenize=tokenBase),`string`}}function tokenComment(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=tokenBase;break}n=r==`*`}return`comment`}function Context(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function pushContext(e,t,n){return e.context=new Context(e.indented,t,n,null,e.context)}function popContext(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new Context((e||0)-t,0,`top`,!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??=!1,t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;d=null;var r=(t.tokenize||tokenBase)(e,t);if(r==`comment`||r==`meta`)return r;if(n.align??=!0,(d==`;`||d==`:`)&&n.type==`statement`)popContext(t);else if(d==`{`)pushContext(t,e.column(),`}`);else if(d==`[`)pushContext(t,e.column(),`]`);else if(d==`(`)pushContext(t,e.column(),`)`);else if(d==`}`){for(;n.type==`statement`;)n=popContext(t);for(n.type==`}`&&(n=popContext(t));n.type==`statement`;)n=popContext(t)}else d==n.type?popContext(t):(n.type==`}`||n.type==`top`||n.type==`statement`&&d==`newstatement`)&&pushContext(t,e.column(),`statement`);return t.startOfLine=!1,r},indent:function(e,n){if(e.tokenize!=tokenBase&&e.tokenize!=null)return 0;var r=e.context,i=n&&n.charAt(0);r.type==`statement`&&i==`}`&&(r=r.prev);var a=i==r.type;return r.type==`statement`?r.indented+(i==`{`?0:t):r.align?r.column+ +!a:r.indented+(a?0:t)},electricChars:`{}`}}),e.defineMIME(`text/x-ecl`,`ecl`)})})),h=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode(`xml`,function(r,i){var a=r.indentUnit,o={},s=i.htmlMode?t:n;for(var c in s)o[c]=s[c];for(var c in i)o[c]=i[c];var l,u;function inText(e,t){function chain(n){return t.tokenize=n,n(e,t)}var n=e.next();return n==`<`?e.eat(`!`)?e.eat(`[`)?e.match(`CDATA[`)?chain(inBlock(`atom`,`]]>`)):null:e.match(`--`)?chain(inBlock(`comment`,`-->`)):e.match(`DOCTYPE`,!0,!0)?(e.eatWhile(/[\w\._\-]/),chain(doctype(1))):null:e.eat(`?`)?(e.eatWhile(/[\w\._\-]/),t.tokenize=inBlock(`meta`,`?>`),`meta`):(l=e.eat(`/`)?`closeTag`:`openTag`,t.tokenize=inTag,`tag bracket`):n==`&`?(e.eat(`#`)?e.eat(`x`)?e.eatWhile(/[a-fA-F\d]/)&&e.eat(`;`):e.eatWhile(/[\d]/)&&e.eat(`;`):e.eatWhile(/[\w\.\-:]/)&&e.eat(`;`))?`atom`:`error`:(e.eatWhile(/[^&<]/),null)}inText.isInText=!0;function inTag(e,t){var n=e.next();if(n==`>`||n==`/`&&e.eat(`>`))return t.tokenize=inText,l=n==`>`?`endTag`:`selfcloseTag`,`tag bracket`;if(n==`=`)return l=`equals`,null;if(n==`<`){t.tokenize=inText,t.state=baseState,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+` tag error`:`tag error`}else if(/[\'\"]/.test(n))return t.tokenize=inAttribute(n),t.stringStartCol=e.column(),t.tokenize(e,t);else return e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),`word`}function inAttribute(e){var closure=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=inTag;break}return`string`};return closure.isInAttribute=!0,closure}function inBlock(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=inText;break}n.next()}return e}}function doctype(e){return function(t,n){for(var r;(r=t.next())!=null;)if(r==`<`)return n.tokenize=doctype(e+1),n.tokenize(t,n);else if(r==`>`)if(e==1){n.tokenize=inText;break}else return n.tokenize=doctype(e-1),n.tokenize(t,n);return`meta`}}function lower(e){return e&&e.toLowerCase()}function Context(e,t,n){this.prev=e.context,this.tagName=t||``,this.indent=e.indented,this.startOfLine=n,(o.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function popContext(e){e.context&&=e.context.prev}function maybePopContext(e,t){for(var n;;){if(!e.context||(n=e.context.tagName,!o.contextGrabbers.hasOwnProperty(lower(n))||!o.contextGrabbers[lower(n)].hasOwnProperty(lower(t))))return;popContext(e)}}function baseState(e,t,n){return e==`openTag`?(n.tagStart=t.column(),tagNameState):e==`closeTag`?closeTagNameState:baseState}function tagNameState(e,t,n){return e==`word`?(n.tagName=t.current(),u=`tag`,attrState):o.allowMissingTagName&&e==`endTag`?(u=`tag bracket`,attrState(e,t,n)):(u=`error`,tagNameState)}function closeTagNameState(e,t,n){if(e==`word`){var r=t.current();return n.context&&n.context.tagName!=r&&o.implicitlyClosed.hasOwnProperty(lower(n.context.tagName))&&popContext(n),n.context&&n.context.tagName==r||o.matchClosing===!1?(u=`tag`,closeState):(u=`tag error`,closeStateErr)}else if(o.allowMissingTagName&&e==`endTag`)return u=`tag bracket`,closeState(e,t,n);else return u=`error`,closeStateErr}function closeState(e,t,n){return e==`endTag`?(popContext(n),baseState):(u=`error`,closeState)}function closeStateErr(e,t,n){return u=`error`,closeState(e,t,n)}function attrState(e,t,n){if(e==`word`)return u=`attribute`,attrEqState;if(e==`endTag`||e==`selfcloseTag`){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,e==`selfcloseTag`||o.autoSelfClosers.hasOwnProperty(lower(r))?maybePopContext(n,r):(maybePopContext(n,r),n.context=new Context(n,r,i==n.indented)),baseState}return u=`error`,attrState}function attrEqState(e,t,n){return e==`equals`?attrValueState:(o.allowMissing||(u=`error`),attrState(e,t,n))}function attrValueState(e,t,n){return e==`string`?attrContinuedState:e==`word`&&o.allowUnquoted?(u=`string`,attrState):(u=`error`,attrState(e,t,n))}function attrContinuedState(e,t,n){return e==`string`?attrContinuedState:attrState(e,t,n)}return{startState:function(e){var t={tokenize:inText,state:baseState,indented:e||0,tagName:null,tagStart:null,context:null};return e!=null&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;l=null;var n=t.tokenize(e,t);return(n||l)&&n!=`comment`&&(u=null,t.state=t.state(l||n,e,t),u&&(n=u==`error`?n+` error`:u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=inTag&&t.tokenize!=inText)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return o.multilineTagIndentPastTag===!1?t.tagStart+a*(o.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(o.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;i;)if(i.tagName==s[2]){i=i.prev;break}else if(o.implicitlyClosed.hasOwnProperty(lower(i.tagName)))i=i.prev;else break;else if(s)for(;i;){var c=o.contextGrabbers[lower(i.tagName)];if(c&&c.hasOwnProperty(lower(s[2])))i=i.prev;else break}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:`<!--`,blockCommentEnd:`-->`,configuration:o.htmlMode?`html`:`xml`,helperType:o.htmlMode?`html`:`xml`,skipAttribute:function(e){e.state==attrValueState&&(e.state=attrState)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:e.type==`closeTag`}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME(`text/xml`,`xml`),e.defineMIME(`application/xml`,`xml`),e.mimeModes.hasOwnProperty(`text/html`)||e.defineMIME(`text/html`,{name:`xml`,htmlMode:!0})})})),g=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.modeInfo=[{name:`APL`,mime:`text/apl`,mode:`apl`,ext:[`dyalog`,`apl`]},{name:`PGP`,mimes:[`application/pgp`,`application/pgp-encrypted`,`application/pgp-keys`,`application/pgp-signature`],mode:`asciiarmor`,ext:[`asc`,`pgp`,`sig`]},{name:`ASN.1`,mime:`text/x-ttcn-asn`,mode:`asn.1`,ext:[`asn`,`asn1`]},{name:`Asterisk`,mime:`text/x-asterisk`,mode:`asterisk`,file:/^extensions\.conf$/i},{name:`Brainfuck`,mime:`text/x-brainfuck`,mode:`brainfuck`,ext:[`b`,`bf`]},{name:`C`,mime:`text/x-csrc`,mode:`clike`,ext:[`c`,`h`,`ino`]},{name:`C++`,mime:`text/x-c++src`,mode:`clike`,ext:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],alias:[`cpp`]},{name:`Cobol`,mime:`text/x-cobol`,mode:`cobol`,ext:[`cob`,`cpy`,`cbl`]},{name:`C#`,mime:`text/x-csharp`,mode:`clike`,ext:[`cs`],alias:[`csharp`,`cs`]},{name:`Clojure`,mime:`text/x-clojure`,mode:`clojure`,ext:[`clj`,`cljc`,`cljx`]},{name:`ClojureScript`,mime:`text/x-clojurescript`,mode:`clojure`,ext:[`cljs`]},{name:`Closure Stylesheets (GSS)`,mime:`text/x-gss`,mode:`css`,ext:[`gss`]},{name:`CMake`,mime:`text/x-cmake`,mode:`cmake`,ext:[`cmake`,`cmake.in`],file:/^CMakeLists\.txt$/},{name:`CoffeeScript`,mimes:[`application/vnd.coffeescript`,`text/coffeescript`,`text/x-coffeescript`],mode:`coffeescript`,ext:[`coffee`],alias:[`coffee`,`coffee-script`]},{name:`Common Lisp`,mime:`text/x-common-lisp`,mode:`commonlisp`,ext:[`cl`,`lisp`,`el`],alias:[`lisp`]},{name:`Cypher`,mime:`application/x-cypher-query`,mode:`cypher`,ext:[`cyp`,`cypher`]},{name:`Cython`,mime:`text/x-cython`,mode:`python`,ext:[`pyx`,`pxd`,`pxi`]},{name:`Crystal`,mime:`text/x-crystal`,mode:`crystal`,ext:[`cr`]},{name:`CSS`,mime:`text/css`,mode:`css`,ext:[`css`]},{name:`CQL`,mime:`text/x-cassandra`,mode:`sql`,ext:[`cql`]},{name:`D`,mime:`text/x-d`,mode:`d`,ext:[`d`]},{name:`Dart`,mimes:[`application/dart`,`text/x-dart`],mode:`dart`,ext:[`dart`]},{name:`diff`,mime:`text/x-diff`,mode:`diff`,ext:[`diff`,`patch`]},{name:`Django`,mime:`text/x-django`,mode:`django`},{name:`Dockerfile`,mime:`text/x-dockerfile`,mode:`dockerfile`,file:/^Dockerfile$/},{name:`DTD`,mime:`application/xml-dtd`,mode:`dtd`,ext:[`dtd`]},{name:`Dylan`,mime:`text/x-dylan`,mode:`dylan`,ext:[`dylan`,`dyl`,`intr`]},{name:`EBNF`,mime:`text/x-ebnf`,mode:`ebnf`},{name:`ECL`,mime:`text/x-ecl`,mode:`ecl`,ext:[`ecl`]},{name:`edn`,mime:`application/edn`,mode:`clojure`,ext:[`edn`]},{name:`Eiffel`,mime:`text/x-eiffel`,mode:`eiffel`,ext:[`e`]},{name:`Elm`,mime:`text/x-elm`,mode:`elm`,ext:[`elm`]},{name:`Embedded JavaScript`,mime:`application/x-ejs`,mode:`htmlembedded`,ext:[`ejs`]},{name:`Embedded Ruby`,mime:`application/x-erb`,mode:`htmlembedded`,ext:[`erb`]},{name:`Erlang`,mime:`text/x-erlang`,mode:`erlang`,ext:[`erl`]},{name:`Esper`,mime:`text/x-esper`,mode:`sql`},{name:`Factor`,mime:`text/x-factor`,mode:`factor`,ext:[`factor`]},{name:`FCL`,mime:`text/x-fcl`,mode:`fcl`},{name:`Forth`,mime:`text/x-forth`,mode:`forth`,ext:[`forth`,`fth`,`4th`]},{name:`Fortran`,mime:`text/x-fortran`,mode:`fortran`,ext:[`f`,`for`,`f77`,`f90`,`f95`]},{name:`F#`,mime:`text/x-fsharp`,mode:`mllike`,ext:[`fs`],alias:[`fsharp`]},{name:`Gas`,mime:`text/x-gas`,mode:`gas`,ext:[`s`]},{name:`Gherkin`,mime:`text/x-feature`,mode:`gherkin`,ext:[`feature`]},{name:`GitHub Flavored Markdown`,mime:`text/x-gfm`,mode:`gfm`,file:/^(readme|contributing|history)\.md$/i},{name:`Go`,mime:`text/x-go`,mode:`go`,ext:[`go`]},{name:`Groovy`,mime:`text/x-groovy`,mode:`groovy`,ext:[`groovy`,`gradle`],file:/^Jenkinsfile$/},{name:`HAML`,mime:`text/x-haml`,mode:`haml`,ext:[`haml`]},{name:`Haskell`,mime:`text/x-haskell`,mode:`haskell`,ext:[`hs`]},{name:`Haskell (Literate)`,mime:`text/x-literate-haskell`,mode:`haskell-literate`,ext:[`lhs`]},{name:`Haxe`,mime:`text/x-haxe`,mode:`haxe`,ext:[`hx`]},{name:`HXML`,mime:`text/x-hxml`,mode:`haxe`,ext:[`hxml`]},{name:`ASP.NET`,mime:`application/x-aspx`,mode:`htmlembedded`,ext:[`aspx`],alias:[`asp`,`aspx`]},{name:`HTML`,mime:`text/html`,mode:`htmlmixed`,ext:[`html`,`htm`,`handlebars`,`hbs`],alias:[`xhtml`]},{name:`HTTP`,mime:`message/http`,mode:`http`},{name:`IDL`,mime:`text/x-idl`,mode:`idl`,ext:[`pro`]},{name:`Pug`,mime:`text/x-pug`,mode:`pug`,ext:[`jade`,`pug`],alias:[`jade`]},{name:`Java`,mime:`text/x-java`,mode:`clike`,ext:[`java`]},{name:`Java Server Pages`,mime:`application/x-jsp`,mode:`htmlembedded`,ext:[`jsp`],alias:[`jsp`]},{name:`JavaScript`,mimes:[`text/javascript`,`text/ecmascript`,`application/javascript`,`application/x-javascript`,`application/ecmascript`],mode:`javascript`,ext:[`js`],alias:[`ecmascript`,`js`,`node`]},{name:`JSON`,mimes:[`application/json`,`application/x-json`],mode:`javascript`,ext:[`json`,`map`],alias:[`json5`]},{name:`JSON-LD`,mime:`application/ld+json`,mode:`javascript`,ext:[`jsonld`],alias:[`jsonld`]},{name:`JSX`,mime:`text/jsx`,mode:`jsx`,ext:[`jsx`]},{name:`Jinja2`,mime:`text/jinja2`,mode:`jinja2`,ext:[`j2`,`jinja`,`jinja2`]},{name:`Julia`,mime:`text/x-julia`,mode:`julia`,ext:[`jl`],alias:[`jl`]},{name:`Kotlin`,mime:`text/x-kotlin`,mode:`clike`,ext:[`kt`]},{name:`LESS`,mime:`text/x-less`,mode:`css`,ext:[`less`]},{name:`LiveScript`,mime:`text/x-livescript`,mode:`livescript`,ext:[`ls`],alias:[`ls`]},{name:`Lua`,mime:`text/x-lua`,mode:`lua`,ext:[`lua`]},{name:`Markdown`,mime:`text/x-markdown`,mode:`markdown`,ext:[`markdown`,`md`,`mkd`]},{name:`mIRC`,mime:`text/mirc`,mode:`mirc`},{name:`MariaDB SQL`,mime:`text/x-mariadb`,mode:`sql`},{name:`Mathematica`,mime:`text/x-mathematica`,mode:`mathematica`,ext:[`m`,`nb`,`wl`,`wls`]},{name:`Modelica`,mime:`text/x-modelica`,mode:`modelica`,ext:[`mo`]},{name:`MUMPS`,mime:`text/x-mumps`,mode:`mumps`,ext:[`mps`]},{name:`MS SQL`,mime:`text/x-mssql`,mode:`sql`},{name:`mbox`,mime:`application/mbox`,mode:`mbox`,ext:[`mbox`]},{name:`MySQL`,mime:`text/x-mysql`,mode:`sql`},{name:`Nginx`,mime:`text/x-nginx-conf`,mode:`nginx`,file:/nginx.*\.conf$/i},{name:`NSIS`,mime:`text/x-nsis`,mode:`nsis`,ext:[`nsh`,`nsi`]},{name:`NTriples`,mimes:[`application/n-triples`,`application/n-quads`,`text/n-triples`],mode:`ntriples`,ext:[`nt`,`nq`]},{name:`Objective-C`,mime:`text/x-objectivec`,mode:`clike`,ext:[`m`],alias:[`objective-c`,`objc`]},{name:`Objective-C++`,mime:`text/x-objectivec++`,mode:`clike`,ext:[`mm`],alias:[`objective-c++`,`objc++`]},{name:`OCaml`,mime:`text/x-ocaml`,mode:`mllike`,ext:[`ml`,`mli`,`mll`,`mly`]},{name:`Octave`,mime:`text/x-octave`,mode:`octave`,ext:[`m`]},{name:`Oz`,mime:`text/x-oz`,mode:`oz`,ext:[`oz`]},{name:`Pascal`,mime:`text/x-pascal`,mode:`pascal`,ext:[`p`,`pas`]},{name:`PEG.js`,mime:`null`,mode:`pegjs`,ext:[`jsonld`]},{name:`Perl`,mime:`text/x-perl`,mode:`perl`,ext:[`pl`,`pm`]},{name:`PHP`,mimes:[`text/x-php`,`application/x-httpd-php`,`application/x-httpd-php-open`],mode:`php`,ext:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`]},{name:`Pig`,mime:`text/x-pig`,mode:`pig`,ext:[`pig`]},{name:`Plain Text`,mime:`text/plain`,mode:`null`,ext:[`txt`,`text`,`conf`,`def`,`list`,`log`]},{name:`PLSQL`,mime:`text/x-plsql`,mode:`sql`,ext:[`pls`]},{name:`PostgreSQL`,mime:`text/x-pgsql`,mode:`sql`},{name:`PowerShell`,mime:`application/x-powershell`,mode:`powershell`,ext:[`ps1`,`psd1`,`psm1`]},{name:`Properties files`,mime:`text/x-properties`,mode:`properties`,ext:[`properties`,`ini`,`in`],alias:[`ini`,`properties`]},{name:`ProtoBuf`,mime:`text/x-protobuf`,mode:`protobuf`,ext:[`proto`]},{name:`Python`,mime:`text/x-python`,mode:`python`,ext:[`BUILD`,`bzl`,`py`,`pyw`],file:/^(BUCK|BUILD)$/},{name:`Puppet`,mime:`text/x-puppet`,mode:`puppet`,ext:[`pp`]},{name:`Q`,mime:`text/x-q`,mode:`q`,ext:[`q`]},{name:`R`,mime:`text/x-rsrc`,mode:`r`,ext:[`r`,`R`],alias:[`rscript`]},{name:`reStructuredText`,mime:`text/x-rst`,mode:`rst`,ext:[`rst`],alias:[`rst`]},{name:`RPM Changes`,mime:`text/x-rpm-changes`,mode:`rpm`},{name:`RPM Spec`,mime:`text/x-rpm-spec`,mode:`rpm`,ext:[`spec`]},{name:`Ruby`,mime:`text/x-ruby`,mode:`ruby`,ext:[`rb`],alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`]},{name:`Rust`,mime:`text/x-rustsrc`,mode:`rust`,ext:[`rs`]},{name:`SAS`,mime:`text/x-sas`,mode:`sas`,ext:[`sas`]},{name:`Sass`,mime:`text/x-sass`,mode:`sass`,ext:[`sass`]},{name:`Scala`,mime:`text/x-scala`,mode:`clike`,ext:[`scala`]},{name:`Scheme`,mime:`text/x-scheme`,mode:`scheme`,ext:[`scm`,`ss`]},{name:`SCSS`,mime:`text/x-scss`,mode:`css`,ext:[`scss`]},{name:`Shell`,mimes:[`text/x-sh`,`application/x-sh`],mode:`shell`,ext:[`sh`,`ksh`,`bash`],alias:[`bash`,`sh`,`zsh`],file:/^PKGBUILD$/},{name:`Sieve`,mime:`application/sieve`,mode:`sieve`,ext:[`siv`,`sieve`]},{name:`Slim`,mimes:[`text/x-slim`,`application/x-slim`],mode:`slim`,ext:[`slim`]},{name:`Smalltalk`,mime:`text/x-stsrc`,mode:`smalltalk`,ext:[`st`]},{name:`Smarty`,mime:`text/x-smarty`,mode:`smarty`,ext:[`tpl`]},{name:`Solr`,mime:`text/x-solr`,mode:`solr`},{name:`SML`,mime:`text/x-sml`,mode:`mllike`,ext:[`sml`,`sig`,`fun`,`smackspec`]},{name:`Soy`,mime:`text/x-soy`,mode:`soy`,ext:[`soy`],alias:[`closure template`]},{name:`SPARQL`,mime:`application/sparql-query`,mode:`sparql`,ext:[`rq`,`sparql`],alias:[`sparul`]},{name:`Spreadsheet`,mime:`text/x-spreadsheet`,mode:`spreadsheet`,alias:[`excel`,`formula`]},{name:`SQL`,mime:`text/x-sql`,mode:`sql`,ext:[`sql`]},{name:`SQLite`,mime:`text/x-sqlite`,mode:`sql`},{name:`Squirrel`,mime:`text/x-squirrel`,mode:`clike`,ext:[`nut`]},{name:`Stylus`,mime:`text/x-styl`,mode:`stylus`,ext:[`styl`]},{name:`Swift`,mime:`text/x-swift`,mode:`swift`,ext:[`swift`]},{name:`sTeX`,mime:`text/x-stex`,mode:`stex`},{name:`LaTeX`,mime:`text/x-latex`,mode:`stex`,ext:[`text`,`ltx`,`tex`],alias:[`tex`]},{name:`SystemVerilog`,mime:`text/x-systemverilog`,mode:`verilog`,ext:[`v`,`sv`,`svh`]},{name:`Tcl`,mime:`text/x-tcl`,mode:`tcl`,ext:[`tcl`]},{name:`Textile`,mime:`text/x-textile`,mode:`textile`,ext:[`textile`]},{name:`TiddlyWiki`,mime:`text/x-tiddlywiki`,mode:`tiddlywiki`},{name:`Tiki wiki`,mime:`text/tiki`,mode:`tiki`},{name:`TOML`,mime:`text/x-toml`,mode:`toml`,ext:[`toml`]},{name:`Tornado`,mime:`text/x-tornado`,mode:`tornado`},{name:`troff`,mime:`text/troff`,mode:`troff`,ext:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]},{name:`TTCN`,mime:`text/x-ttcn`,mode:`ttcn`,ext:[`ttcn`,`ttcn3`,`ttcnpp`]},{name:`TTCN_CFG`,mime:`text/x-ttcn-cfg`,mode:`ttcn-cfg`,ext:[`cfg`]},{name:`Turtle`,mime:`text/turtle`,mode:`turtle`,ext:[`ttl`]},{name:`TypeScript`,mime:`application/typescript`,mode:`javascript`,ext:[`ts`],alias:[`ts`]},{name:`TypeScript-JSX`,mime:`text/typescript-jsx`,mode:`jsx`,ext:[`tsx`],alias:[`tsx`]},{name:`Twig`,mime:`text/x-twig`,mode:`twig`},{name:`Web IDL`,mime:`text/x-webidl`,mode:`webidl`,ext:[`webidl`]},{name:`VB.NET`,mime:`text/x-vb`,mode:`vb`,ext:[`vb`]},{name:`VBScript`,mime:`text/vbscript`,mode:`vbscript`,ext:[`vbs`]},{name:`Velocity`,mime:`text/velocity`,mode:`velocity`,ext:[`vtl`]},{name:`Verilog`,mime:`text/x-verilog`,mode:`verilog`,ext:[`v`]},{name:`VHDL`,mime:`text/x-vhdl`,mode:`vhdl`,ext:[`vhd`,`vhdl`]},{name:`Vue.js Component`,mimes:[`script/x-vue`,`text/x-vue`],mode:`vue`,ext:[`vue`]},{name:`XML`,mimes:[`application/xml`,`text/xml`],mode:`xml`,ext:[`xml`,`xsl`,`xsd`,`svg`],alias:[`rss`,`wsdl`,`xsd`]},{name:`XQuery`,mime:`application/xquery`,mode:`xquery`,ext:[`xy`,`xquery`]},{name:`Yacas`,mime:`text/x-yacas`,mode:`yacas`,ext:[`ys`]},{name:`YAML`,mimes:[`text/x-yaml`,`text/yaml`],mode:`yaml`,ext:[`yaml`,`yml`],alias:[`yml`]},{name:`Z80`,mime:`text/x-z80`,mode:`z80`,ext:[`z80`]},{name:`mscgen`,mime:`text/x-mscgen`,mode:`mscgen`,ext:[`mscgen`,`mscin`,`msc`]},{name:`xu`,mime:`text/x-xu`,mode:`mscgen`,ext:[`xu`]},{name:`msgenny`,mime:`text/x-msgenny`,mode:`mscgen`,ext:[`msgenny`]},{name:`WebAssembly`,mime:`text/webassembly`,mode:`wast`,ext:[`wat`,`wast`]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes){for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}}if(/\+xml$/.test(t))return e.findModeByMIME(`application/xml`);if(/\+json$/.test(t))return e.findModeByMIME(`application/json`)},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext){for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf(`.`),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias){for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}})})),_=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),h(),g()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../meta`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`markdown`,function(t,n){var r=e.getMode(t,`text/html`),i=r.name==`null`;function getMode(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return i.name==`null`?null:i}n.highlightFormatting===void 0&&(n.highlightFormatting=!1),n.maxBlockquoteDepth===void 0&&(n.maxBlockquoteDepth=0),n.taskLists===void 0&&(n.taskLists=!1),n.strikethrough===void 0&&(n.strikethrough=!1),n.emoji===void 0&&(n.emoji=!1),n.fencedCodeBlockHighlighting===void 0&&(n.fencedCodeBlockHighlighting=!0),n.fencedCodeBlockDefaultMode===void 0&&(n.fencedCodeBlockDefaultMode=`text/plain`),n.xml===void 0&&(n.xml=!0),n.tokenTypeOverrides===void 0&&(n.tokenTypeOverrides={});var a={header:`header`,code:`comment`,quote:`quote`,list1:`variable-2`,list2:`variable-3`,list3:`keyword`,hr:`hr`,image:`image`,imageAltText:`image-alt-text`,imageMarker:`image-marker`,formatting:`formatting`,linkInline:`link`,linkEmail:`link`,linkText:`link`,linkHref:`string`,em:`em`,strong:`strong`,strikethrough:`strikethrough`,emoji:`builtin`};for(var o in a)a.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(a[o]=n.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,l=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,_=` `;function switchInline(e,t,n){return t.f=t.inline=n,n(e,t)}function switchBlock(e,t,n){return t.f=t.block=n,n(e,t)}function lineIsEmpty(e){return!e||!/\S/.test(e.string)}function blankLine(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==htmlBlock){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n=a.mode.name==`xml`&&a.state.tagStart===null&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=inlineNormal,t.block=blockNormal,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function blockNormal(t,r){var i=t.column()===r.indentation,o=lineIsEmpty(r.prevLine.stream),f=r.indentedCode,g=r.prevLine.hr,_=r.list!==!1,v=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var y=r.indentation;if(r.indentationDiff===null&&(r.indentationDiff=r.indentation,_)){for(r.list=null;y<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;r.list!==!1&&(r.indentationDiff=y-r.listStack[r.listStack.length-1])}var b=!o&&!g&&!r.prevLine.header&&(!_||!f)&&!r.prevLine.fencedCodeEnd,x=(r.list===!1||g||o)&&r.indentation<=v&&t.match(s),S=null;if(r.indentationDiff>=4&&(f||r.prevLine.fencedCodeEnd||r.prevLine.header||o))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=v&&(S=t.match(u))&&S[1].length<=6)return r.quote=0,r.header=S[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting=`header`),r.f=r.inline,getType(r);if(r.indentation<=v&&t.eat(`>`))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting=`quote`),t.eatSpace(),getType(r);if(!x&&!r.setext&&i&&r.indentation<=v&&(S=t.match(c))){var C=S[1]?`ol`:`ul`;return r.indentation=y+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(l,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=[`list`,`list-`+C]),getType(r)}else if(i&&r.indentation<=v&&(S=t.match(m,!0)))return r.quote=0,r.fencedEndRE=RegExp(S[1]+`+ *$`),r.localMode=n.fencedCodeBlockHighlighting&&getMode(S[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=local,n.highlightFormatting&&(r.formatting=`code-block`),r.code=-1,getType(r);else if(r.setext||(!b||!_)&&!r.quote&&r.list===!1&&!r.code&&!x&&!h.test(t.string)&&(S=t.lookAhead(1))&&(S=S.match(d)))return r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting=`header`)):(r.header=S[0].charAt(0)==`=`?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,getType(r);else if(x)return t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr;else if(t.peek()===`[`)return switchInline(t,r,footnoteLink);return switchInline(t,r,r.inline)}function htmlBlock(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);(o.mode.name==`xml`&&o.state.tagStart===null&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(`>`)>-1)&&(n.f=inlineNormal,n.block=blockNormal,n.htmlState=null)}return a}function local(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,o=r+3;if(t.fencedEndRE&&t.indentation<=o&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting=`code-block`);var s;return i||(s=getType(t)),t.localMode=t.localState=null,t.block=blockNormal,t.f=inlineNormal,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?switchBlock(e,t,t.block):s}else if(t.localMode)return t.localMode.token(e,t.localState);else return e.skipToEnd(),a.code}function getType(e){var t=[];if(e.formatting){t.push(a.formatting),typeof e.formatting==`string`&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+`-`+e.formatting[r]),e.formatting[r]===`header`&&t.push(a.formatting+`-`+e.formatting[r]+`-`+e.header),e.formatting[r]===`quote`&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+`-`+e.formatting[r]+`-`+e.quote):t.push(`error`))}if(e.taskOpen)return t.push(`meta`),t.length?t.join(` `):null;if(e.taskClosed)return t.push(`property`),t.length?t.join(` `):null;if(e.linkHref?t.push(a.linkHref,`url`):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,`link`),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+`-`+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+`-`+e.quote):t.push(a.quote+`-`+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?i===1?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push(`trailing-space-new-line`):e.trailingSpace&&t.push(`trailing-space-`+(e.trailingSpace%2?`a`:`b`)),t.length?t.join(` `):null}function handleText(e,t){if(e.match(f,!0))return getType(t)}function inlineNormal(t,i){var o=i.text(t,i);if(o!==void 0)return o;if(i.list)return i.list=null,getType(i);if(i.taskList)return t.match(l,!0)[1]===` `?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting=`task`),i.taskList=!1,getType(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting=`header`),getType(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;s===`(`&&(c=`)`),c=(c+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var u=`^\\s*(?:[^`+c+`\\\\]+|\\\\\\\\|\\\\.)`+c;if(t.match(new RegExp(u),!0))return a.linkHref}if(s==="`"){var d=i.formatting;n.highlightFormatting&&(i.formatting=`code`),t.eatWhile("`");var f=t.current().length;if(i.code==0&&(!i.quote||f==1))return i.code=f,getType(i);if(f==i.code){var m=getType(i);return i.code=0,m}else return i.formatting=d,getType(i)}else if(i.code)return getType(i);if(s===`\\`&&(t.next(),n.highlightFormatting)){var h=getType(i),_=a.formatting+`-escape`;return h?h+` `+_:_}if(s===`!`&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting=`image`),getType(i);if(s===`[`&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting=`image`),getType(i);if(s===`]`&&i.imageAltText){n.highlightFormatting&&(i.formatting=`image`);var h=getType(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=linkHref,h}if(s===`[`&&!i.image)return i.linkText&&t.match(/^.*?\]/)?getType(i):(i.linkText=!0,n.highlightFormatting&&(i.formatting=`link`),getType(i));if(s===`]`&&i.linkText){n.highlightFormatting&&(i.formatting=`link`);var h=getType(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?linkHref:inlineNormal,h}if(s===`<`&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=linkInline,n.highlightFormatting&&(i.formatting=`link`);var h=getType(i);return h?h+=` `:h=``,h+a.linkInline}if(s===`<`&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=linkInline,n.highlightFormatting&&(i.formatting=`link`);var h=getType(i);return h?h+=` `:h=``,h+a.linkEmail}if(n.xml&&s===`<`&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(`>`,t.pos);if(v!=-1){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),switchBlock(t,i,htmlBlock)}if(n.xml&&s===`<`&&t.match(/^\/\w*?>/))return i.md_inside=!1,`tag`;if(s===`*`||s===`_`){for(var b=1,x=t.pos==1?` `:t.string.charAt(t.pos-2);b<3&&t.eat(s);)b++;var S=t.peek()||` `,C=!/\s/.test(S)&&(!g.test(S)||/\s/.test(x)||g.test(x)),w=!/\s/.test(x)&&(!g.test(x)||/\s/.test(S)||g.test(S)),T=null,E=null;if(b%2&&(!i.em&&C&&(s===`*`||!w||g.test(x))?T=!0:i.em==s&&w&&(s===`*`||!C||g.test(S))&&(T=!1)),b>1&&(!i.strong&&C&&(s===`*`||!w||g.test(x))?E=!0:i.strong==s&&w&&(s===`*`||!C||g.test(S))&&(E=!1)),E!=null||T!=null){n.highlightFormatting&&(i.formatting=T==null?`strong`:E==null?`em`:`strong em`),T===!0&&(i.em=s),E===!0&&(i.strong=s);var m=getType(i);return T===!1&&(i.em=!1),E===!1&&(i.strong=!1),m}}else if(s===` `&&(t.eat(`*`)||t.eat(`_`))){if(t.peek()===` `)return getType(i);t.backUp(1)}if(n.strikethrough){if(s===`~`&&t.eatWhile(s)){if(i.strikethrough){n.highlightFormatting&&(i.formatting=`strikethrough`);var m=getType(i);return i.strikethrough=!1,m}else if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting=`strikethrough`),getType(i)}else if(s===` `&&t.match(`~~`,!0)){if(t.peek()===` `)return getType(i);t.backUp(2)}}if(n.emoji&&s===`:`&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting=`emoji`);var D=getType(i);return i.emoji=!1,D}return s===` `&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),getType(i)}function linkInline(e,t){if(e.next()===`>`){t.f=t.inline=inlineNormal,n.highlightFormatting&&(t.formatting=`link`);var r=getType(t);return r?r+=` `:r=``,r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function linkHref(e,t){if(e.eatSpace())return null;var r=e.next();return r===`(`||r===`[`?(t.f=t.inline=getLinkHrefInside(r===`(`?`)`:`]`),n.highlightFormatting&&(t.formatting=`link-string`),t.linkHref=!0,getType(t)):`error`}var v={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function getLinkHrefInside(e){return function(t,r){if(t.next()===e){r.f=r.inline=inlineNormal,n.highlightFormatting&&(r.formatting=`link-string`);var i=getType(r);return r.linkHref=!1,i}return t.match(v[e]),r.linkHref=!0,getType(r)}}function footnoteLink(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=footnoteLinkInside,e.next(),n.highlightFormatting&&(t.formatting=`link`),t.linkText=!0,getType(t)):switchInline(e,t,inlineNormal)}function footnoteLinkInside(e,t){if(e.match(`]:`,!0)){t.f=t.inline=footnoteUrl,n.highlightFormatting&&(t.formatting=`link`);var r=getType(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function footnoteUrl(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===void 0?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=inlineNormal,a.linkHref+` url`)}var y={startState:function(){return{f:blockNormal,prevLine:{stream:null},thisLine:{stream:null},block:blockNormal,htmlState:null,indentation:0,inline:inlineNormal,text:handleText,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return blankLine(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=htmlBlock)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,_).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==htmlBlock?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:y}},indent:function(t,n,i){return t.block==htmlBlock&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine,getType,blockCommentStart:`<!--`,blockCommentEnd:`-->`,closeBrackets:`()[]{}''""\`\``,fold:`markdown`};return y},`xml`),e.defineMIME(`text/markdown`,`markdown`),e.defineMIME(`text/x-markdown`,`markdown`)})})),v=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),i.overlayCur==null?i.baseCur:i.baseCur!=null&&i.overlay.combineTokens||r&&i.overlay.combineTokens==null?i.baseCur+` `+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,a;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(a=n.blankLine(e.overlay)),a==null?i:r&&i!=null?i+` `+a:a}}}})})),y=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),_(),v()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../markdown/markdown`,`../../addon/mode/overlay`],n):n(CodeMirror)})(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode(`gfm`,function(n,r){var i=0;function blankLine(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if(e.peek()==="`"){e.next();var a=e.pos;e.eatWhile("`");var o=1+e.pos-a;return n.code?o===i&&(n.code=!1):(i=o,n.code=!0),null}else if(n.code)return e.next(),null;return e.eatSpace()?(n.ateSpace=!0,null):(e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)&&(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)||e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))||e.match(t)&&e.string.slice(e.start-2,e.start)!=`](`&&(e.start==0||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,`link`):(e.next(),null)},blankLine},o={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in r)o[s]=r[s];return o.name=`markdown`,e.overlayMode(e.getMode(n,o),a)},`markdown`),e.defineMIME(`text/x-gfm`,`gfm`)})})),b=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`javascript`,function(t,n){var r=t.indentUnit,i=n.statementIndent,a=n.jsonld,o=n.json||a,s=n.trackScope!==!1,c=n.typescript,l=n.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function kw(e){return{type:e,style:`keyword`}}var e=kw(`keyword a`),t=kw(`keyword b`),n=kw(`keyword c`),r=kw(`keyword d`),i=kw(`operator`),a={type:`atom`,style:`atom`};return{if:kw(`if`),while:e,with:e,else:t,do:t,try:t,finally:t,return:r,break:r,continue:r,new:kw(`new`),delete:n,void:n,throw:n,debugger:kw(`debugger`),var:kw(`var`),const:kw(`var`),let:kw(`var`),function:kw(`function`),catch:kw(`catch`),for:kw(`for`),switch:kw(`switch`),case:kw(`case`),default:kw(`default`),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:kw(`this`),class:kw(`class`),super:kw(`atom`),yield:n,export:kw(`export`),import:kw(`import`),extends:n,await:n}}(),d=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function readRegexp(e){for(var t=!1,n,r=!1;(n=e.next())!=null;){if(!t){if(n==`/`&&!r)return;n==`[`?r=!0:r&&n==`]`&&(r=!1)}t=!t&&n==`\\`}}var m,h;function ret(e,t,n){return m=e,h=n,t}function tokenBase(e,t){var n=e.next();if(n==`"`||n==`'`)return t.tokenize=tokenString(n),t.tokenize(e,t);if(n==`.`&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return ret(`number`,`number`);if(n==`.`&&e.match(`..`))return ret(`spread`,`meta`);if(/[\[\]{}\(\),;\:\.]/.test(n))return ret(n);if(n==`=`&&e.eat(`>`))return ret(`=>`,`operator`);if(n==`0`&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return ret(`number`,`number`);if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),ret(`number`,`number`);if(n==`/`)return e.eat(`*`)?(t.tokenize=tokenComment,tokenComment(e,t)):e.eat(`/`)?(e.skipToEnd(),ret(`comment`,`comment`)):expressionAllowed(e,t,1)?(readRegexp(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),ret(`regexp`,`string-2`)):(e.eat(`=`),ret(`operator`,`operator`,e.current()));if(n=="`")return t.tokenize=tokenQuasi,tokenQuasi(e,t);if(n==`#`&&e.peek()==`!`)return e.skipToEnd(),ret(`meta`,`meta`);if(n==`#`&&e.eatWhile(l))return ret(`variable`,`property`);if(n==`<`&&e.match(`!--`)||n==`-`&&e.match(`->`)&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),ret(`comment`,`comment`);if(d.test(n))return(n!=`>`||!t.lexical||t.lexical.type!=`>`)&&(e.eat(`=`)?(n==`!`||n==`=`)&&e.eat(`=`):/[<>*+\-|&?]/.test(n)&&(e.eat(n),n==`>`&&e.eat(n))),n==`?`&&e.eat(`.`)?ret(`.`):ret(`operator`,`operator`,e.current());if(l.test(n)){e.eatWhile(l);var r=e.current();if(t.lastType!=`.`){if(u.propertyIsEnumerable(r)){var i=u[r];return ret(i.type,i.style,r)}if(r==`async`&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return ret(`async`,`keyword`,r)}return ret(`variable`,`variable`,r)}}function tokenString(e){return function(t,n){var r=!1,i;if(a&&t.peek()==`@`&&t.match(f))return n.tokenize=tokenBase,ret(`jsonld-keyword`,`meta`);for(;(i=t.next())!=null&&!(i==e&&!r);)r=!r&&i==`\\`;return r||(n.tokenize=tokenBase),ret(`string`,`string`)}}function tokenComment(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=tokenBase;break}n=r==`*`}return ret(`comment`,`comment`)}function tokenQuasi(e,t){for(var n=!1,r;(r=e.next())!=null;){if(!n&&(r=="`"||r==`$`&&e.eat(`{`))){t.tokenize=tokenBase;break}n=!n&&r==`\\`}return ret(`quasi`,`string-2`,e.current())}var g=`([{}])`;function findFatArrow(e,t){t.fatArrowAt&&=null;var n=e.string.indexOf(`=>`,e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),u=g.indexOf(s);if(u>=0&&u<3){if(!i){++o;break}if(--i==0){s==`(`&&(a=!0);break}}else if(u>=3&&u<6)++i;else if(l.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(o==0)return;if(e.string.charAt(o-1)==s&&e.string.charAt(o-2)!=`\\`){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function JSLexical(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,r!=null&&(this.align=r)}function inScope(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function parseJS(e,t,n,r,i){var a=e.cc;for(v.state=e,v.stream=i,v.marked=null,v.cc=a,v.style=t,e.lexical.hasOwnProperty(`align`)||(e.lexical.align=!0);;)if((a.length?a.pop():o?expression:statement)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return v.marked?v.marked:n==`variable`&&inScope(e,r)?`variable-2`:t}}var v={state:null,column:null,marked:null,cc:null};function pass(){for(var e=arguments.length-1;e>=0;e--)v.cc.push(arguments[e])}function cont(){return pass.apply(null,arguments),!0}function inList(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function register(e){var t=v.state;if(v.marked=`def`,s){if(t.context){if(t.lexical.info==`var`&&t.context&&t.context.block){var r=registerVarScoped(e,t.context);if(r!=null){t.context=r;return}}else if(!inList(e,t.localVars)){t.localVars=new Var(e,t.localVars);return}}n.globalVars&&!inList(e,t.globalVars)&&(t.globalVars=new Var(e,t.globalVars))}}function registerVarScoped(e,t){if(!t)return null;if(t.block){var n=registerVarScoped(e,t.prev);return n?n==t.prev?t:new Context(n,t.vars,!0):null}else if(inList(e,t.vars))return t;else return new Context(t.prev,new Var(e,t.vars),!1)}function isModifier(e){return e==`public`||e==`private`||e==`protected`||e==`abstract`||e==`readonly`}function Context(e,t,n){this.prev=e,this.vars=t,this.block=n}function Var(e,t){this.name=e,this.next=t}var y=new Var(`this`,new Var(`arguments`,null));function pushcontext(){v.state.context=new Context(v.state.context,v.state.localVars,!1),v.state.localVars=y}function pushblockcontext(){v.state.context=new Context(v.state.context,v.state.localVars,!0),v.state.localVars=null}pushcontext.lex=pushblockcontext.lex=!0;function popcontext(){v.state.localVars=v.state.context.vars,v.state.context=v.state.context.prev}popcontext.lex=!0;function pushlex(e,t){var result=function(){var n=v.state,r=n.indented;if(n.lexical.type==`stat`)r=n.lexical.indented;else for(var i=n.lexical;i&&i.type==`)`&&i.align;i=i.prev)r=i.indented;n.lexical=new JSLexical(r,v.stream.column(),e,null,n.lexical,t)};return result.lex=!0,result}function poplex(){var e=v.state;e.lexical.prev&&(e.lexical.type==`)`&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}poplex.lex=!0;function expect(e){function exp(t){return t==e?cont():e==`;`||t==`}`||t==`)`||t==`]`?pass():cont(exp)}return exp}function statement(e,t){return e==`var`?cont(pushlex(`vardef`,t),vardef,expect(`;`),poplex):e==`keyword a`?cont(pushlex(`form`),parenExpr,statement,poplex):e==`keyword b`?cont(pushlex(`form`),statement,poplex):e==`keyword d`?v.stream.match(/^\s*$/,!1)?cont():cont(pushlex(`stat`),maybeexpression,expect(`;`),poplex):e==`debugger`?cont(expect(`;`)):e==`{`?cont(pushlex(`}`),pushblockcontext,block,poplex,popcontext):e==`;`?cont():e==`if`?(v.state.lexical.info==`else`&&v.state.cc[v.state.cc.length-1]==poplex&&v.state.cc.pop()(),cont(pushlex(`form`),parenExpr,statement,poplex,maybeelse)):e==`function`?cont(functiondef):e==`for`?cont(pushlex(`form`),pushblockcontext,forspec,statement,popcontext,poplex):e==`class`||c&&t==`interface`?(v.marked=`keyword`,cont(pushlex(`form`,e==`class`?e:t),className,poplex)):e==`variable`?c&&t==`declare`?(v.marked=`keyword`,cont(statement)):c&&(t==`module`||t==`enum`||t==`type`)&&v.stream.match(/^\s*\w/,!1)?(v.marked=`keyword`,t==`enum`?cont(enumdef):t==`type`?cont(typename,expect(`operator`),typeexpr,expect(`;`)):cont(pushlex(`form`),pattern,expect(`{`),pushlex(`}`),block,poplex,poplex)):c&&t==`namespace`?(v.marked=`keyword`,cont(pushlex(`form`),expression,statement,poplex)):c&&t==`abstract`?(v.marked=`keyword`,cont(statement)):cont(pushlex(`stat`),maybelabel):e==`switch`?cont(pushlex(`form`),parenExpr,expect(`{`),pushlex(`}`,`switch`),pushblockcontext,block,poplex,poplex,popcontext):e==`case`?cont(expression,expect(`:`)):e==`default`?cont(expect(`:`)):e==`catch`?cont(pushlex(`form`),pushcontext,maybeCatchBinding,statement,poplex,popcontext):e==`export`?cont(pushlex(`stat`),afterExport,poplex):e==`import`?cont(pushlex(`stat`),afterImport,poplex):e==`async`?cont(statement):t==`@`?cont(expression,statement):pass(pushlex(`stat`),expression,expect(`;`),poplex)}function maybeCatchBinding(e){if(e==`(`)return cont(funarg,expect(`)`))}function expression(e,t){return expressionInner(e,t,!1)}function expressionNoComma(e,t){return expressionInner(e,t,!0)}function parenExpr(e){return e==`(`?cont(pushlex(`)`),maybeexpression,expect(`)`),poplex):pass()}function expressionInner(e,t,n){if(v.state.fatArrowAt==v.stream.start){var r=n?arrowBodyNoComma:arrowBody;if(e==`(`)return cont(pushcontext,pushlex(`)`),commasep(funarg,`)`),poplex,expect(`=>`),r,popcontext);if(e==`variable`)return pass(pushcontext,pattern,expect(`=>`),r,popcontext)}var i=n?maybeoperatorNoComma:maybeoperatorComma;return _.hasOwnProperty(e)?cont(i):e==`function`?cont(functiondef,i):e==`class`||c&&t==`interface`?(v.marked=`keyword`,cont(pushlex(`form`),classExpression,poplex)):e==`keyword c`||e==`async`?cont(n?expressionNoComma:expression):e==`(`?cont(pushlex(`)`),maybeexpression,expect(`)`),poplex,i):e==`operator`||e==`spread`?cont(n?expressionNoComma:expression):e==`[`?cont(pushlex(`]`),arrayLiteral,poplex,i):e==`{`?contCommasep(objprop,`}`,null,i):e==`quasi`?pass(quasi,i):e==`new`?cont(maybeTarget(n)):cont()}function maybeexpression(e){return e.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeoperatorComma(e,t){return e==`,`?cont(maybeexpression):maybeoperatorNoComma(e,t,!1)}function maybeoperatorNoComma(e,t,n){var r=n==0?maybeoperatorComma:maybeoperatorNoComma,i=n==0?expression:expressionNoComma;if(e==`=>`)return cont(pushcontext,n?arrowBodyNoComma:arrowBody,popcontext);if(e==`operator`)return/\+\+|--/.test(t)||c&&t==`!`?cont(r):c&&t==`<`&&v.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?cont(pushlex(`>`),commasep(typeexpr,`>`),poplex,r):t==`?`?cont(expression,expect(`:`),i):cont(i);if(e==`quasi`)return pass(quasi,r);if(e!=`;`){if(e==`(`)return contCommasep(expressionNoComma,`)`,`call`,r);if(e==`.`)return cont(property,r);if(e==`[`)return cont(pushlex(`]`),maybeexpression,expect(`]`),poplex,r);if(c&&t==`as`)return v.marked=`keyword`,cont(typeexpr,r);if(e==`regexp`)return v.state.lastType=v.marked=`operator`,v.stream.backUp(v.stream.pos-v.stream.start-1),cont(i)}}function quasi(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?cont(maybeexpression,continueQuasi):cont(quasi):pass()}function continueQuasi(e){if(e==`}`)return v.marked=`string-2`,v.state.tokenize=tokenQuasi,cont(quasi)}function arrowBody(e){return findFatArrow(v.stream,v.state),pass(e==`{`?statement:expression)}function arrowBodyNoComma(e){return findFatArrow(v.stream,v.state),pass(e==`{`?statement:expressionNoComma)}function maybeTarget(e){return function(t){return t==`.`?cont(e?targetNoComma:target):t==`variable`&&c?cont(maybeTypeArgs,e?maybeoperatorNoComma:maybeoperatorComma):pass(e?expressionNoComma:expression)}}function target(e,t){if(t==`target`)return v.marked=`keyword`,cont(maybeoperatorComma)}function targetNoComma(e,t){if(t==`target`)return v.marked=`keyword`,cont(maybeoperatorNoComma)}function maybelabel(e){return e==`:`?cont(poplex,statement):pass(maybeoperatorComma,expect(`;`),poplex)}function property(e){if(e==`variable`)return v.marked=`property`,cont()}function objprop(e,t){if(e==`async`)return v.marked=`property`,cont(objprop);if(e==`variable`||v.style==`keyword`){if(v.marked=`property`,t==`get`||t==`set`)return cont(getterSetter);var n;return c&&v.state.fatArrowAt==v.stream.start&&(n=v.stream.match(/^\s*:\s*/,!1))&&(v.state.fatArrowAt=v.stream.pos+n[0].length),cont(afterprop)}else if(e==`number`||e==`string`)return v.marked=a?`property`:v.style+` property`,cont(afterprop);else if(e==`jsonld-keyword`)return cont(afterprop);else if(c&&isModifier(t))return v.marked=`keyword`,cont(objprop);else if(e==`[`)return cont(expression,maybetype,expect(`]`),afterprop);else if(e==`spread`)return cont(expressionNoComma,afterprop);else if(t==`*`)return v.marked=`keyword`,cont(objprop);else if(e==`:`)return pass(afterprop)}function getterSetter(e){return e==`variable`?(v.marked=`property`,cont(functiondef)):pass(afterprop)}function afterprop(e){if(e==`:`)return cont(expressionNoComma);if(e==`(`)return pass(functiondef)}function commasep(e,t,n){function proceed(r,i){if(n?n.indexOf(r)>-1:r==`,`){var a=v.state.lexical;return a.info==`call`&&(a.pos=(a.pos||0)+1),cont(function(n,r){return n==t||r==t?pass():pass(e)},proceed)}return r==t||i==t?cont():n&&n.indexOf(`;`)>-1?pass(e):cont(expect(t))}return function(n,r){return n==t||r==t?cont():pass(e,proceed)}}function contCommasep(e,t,n){for(var r=3;r<arguments.length;r++)v.cc.push(arguments[r]);return cont(pushlex(t,n),commasep(e,t),poplex)}function block(e){return e==`}`?cont():pass(statement,block)}function maybetype(e,t){if(c){if(e==`:`)return cont(typeexpr);if(t==`?`)return cont(maybetype)}}function maybetypeOrIn(e,t){if(c&&(e==`:`||t==`in`))return cont(typeexpr)}function mayberettype(e){if(c&&e==`:`)return v.stream.match(/^\s*\w+\s+is\b/,!1)?cont(expression,isKW,typeexpr):cont(typeexpr)}function isKW(e,t){if(t==`is`)return v.marked=`keyword`,cont()}function typeexpr(e,t){if(t==`keyof`||t==`typeof`||t==`infer`||t==`readonly`)return v.marked=`keyword`,cont(t==`typeof`?expressionNoComma:typeexpr);if(e==`variable`||t==`void`)return v.marked=`type`,cont(afterType);if(t==`|`||t==`&`)return cont(typeexpr);if(e==`string`||e==`number`||e==`atom`)return cont(afterType);if(e==`[`)return cont(pushlex(`]`),commasep(typeexpr,`]`,`,`),poplex,afterType);if(e==`{`)return cont(pushlex(`}`),typeprops,poplex,afterType);if(e==`(`)return cont(commasep(typearg,`)`),maybeReturnType,afterType);if(e==`<`)return cont(commasep(typeexpr,`>`),typeexpr);if(e==`quasi`)return pass(quasiType,afterType)}function maybeReturnType(e){if(e==`=>`)return cont(typeexpr)}function typeprops(e){return e.match(/[\}\)\]]/)?cont():e==`,`||e==`;`?cont(typeprops):pass(typeprop,typeprops)}function typeprop(e,t){if(e==`variable`||v.style==`keyword`)return v.marked=`property`,cont(typeprop);if(t==`?`||e==`number`||e==`string`)return cont(typeprop);if(e==`:`)return cont(typeexpr);if(e==`[`)return cont(expect(`variable`),maybetypeOrIn,expect(`]`),typeprop);if(e==`(`)return pass(functiondecl,typeprop);if(!e.match(/[;\}\)\],]/))return cont()}function quasiType(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?cont(typeexpr,continueQuasiType):cont(quasiType):pass()}function continueQuasiType(e){if(e==`}`)return v.marked=`string-2`,v.state.tokenize=tokenQuasi,cont(quasiType)}function typearg(e,t){return e==`variable`&&v.stream.match(/^\s*[?:]/,!1)||t==`?`?cont(typearg):e==`:`?cont(typeexpr):e==`spread`?cont(typearg):pass(typeexpr)}function afterType(e,t){if(t==`<`)return cont(pushlex(`>`),commasep(typeexpr,`>`),poplex,afterType);if(t==`|`||e==`.`||t==`&`)return cont(typeexpr);if(e==`[`)return cont(typeexpr,expect(`]`),afterType);if(t==`extends`||t==`implements`)return v.marked=`keyword`,cont(typeexpr);if(t==`?`)return cont(typeexpr,expect(`:`),typeexpr)}function maybeTypeArgs(e,t){if(t==`<`)return cont(pushlex(`>`),commasep(typeexpr,`>`),poplex,afterType)}function typeparam(){return pass(typeexpr,maybeTypeDefault)}function maybeTypeDefault(e,t){if(t==`=`)return cont(typeexpr)}function vardef(e,t){return t==`enum`?(v.marked=`keyword`,cont(enumdef)):pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(e,t){if(c&&isModifier(t))return v.marked=`keyword`,cont(pattern);if(e==`variable`)return register(t),cont();if(e==`spread`)return cont(pattern);if(e==`[`)return contCommasep(eltpattern,`]`);if(e==`{`)return contCommasep(proppattern,`}`)}function proppattern(e,t){return e==`variable`&&!v.stream.match(/^\s*:/,!1)?(register(t),cont(maybeAssign)):(e==`variable`&&(v.marked=`property`),e==`spread`?cont(pattern):e==`}`?pass():e==`[`?cont(expression,expect(`]`),expect(`:`),proppattern):cont(expect(`:`),pattern,maybeAssign))}function eltpattern(){return pass(pattern,maybeAssign)}function maybeAssign(e,t){if(t==`=`)return cont(expressionNoComma)}function vardefCont(e){if(e==`,`)return cont(vardef)}function maybeelse(e,t){if(e==`keyword b`&&t==`else`)return cont(pushlex(`form`,`else`),statement,poplex)}function forspec(e,t){if(t==`await`)return cont(forspec);if(e==`(`)return cont(pushlex(`)`),forspec1,poplex)}function forspec1(e){return e==`var`?cont(vardef,forspec2):e==`variable`?cont(forspec2):pass(forspec2)}function forspec2(e,t){return e==`)`?cont():e==`;`?cont(forspec2):t==`in`||t==`of`?(v.marked=`keyword`,cont(expression,forspec2)):pass(expression,forspec2)}function functiondef(e,t){if(t==`*`)return v.marked=`keyword`,cont(functiondef);if(e==`variable`)return register(t),cont(functiondef);if(e==`(`)return cont(pushcontext,pushlex(`)`),commasep(funarg,`)`),poplex,mayberettype,statement,popcontext);if(c&&t==`<`)return cont(pushlex(`>`),commasep(typeparam,`>`),poplex,functiondef)}function functiondecl(e,t){if(t==`*`)return v.marked=`keyword`,cont(functiondecl);if(e==`variable`)return register(t),cont(functiondecl);if(e==`(`)return cont(pushcontext,pushlex(`)`),commasep(funarg,`)`),poplex,mayberettype,popcontext);if(c&&t==`<`)return cont(pushlex(`>`),commasep(typeparam,`>`),poplex,functiondecl)}function typename(e,t){if(e==`keyword`||e==`variable`)return v.marked=`type`,cont(typename);if(t==`<`)return cont(pushlex(`>`),commasep(typeparam,`>`),poplex)}function funarg(e,t){return t==`@`&&cont(expression,funarg),e==`spread`?cont(funarg):c&&isModifier(t)?(v.marked=`keyword`,cont(funarg)):c&&e==`this`?cont(maybetype,maybeAssign):pass(pattern,maybetype,maybeAssign)}function classExpression(e,t){return e==`variable`?className(e,t):classNameAfter(e,t)}function className(e,t){if(e==`variable`)return register(t),cont(classNameAfter)}function classNameAfter(e,t){if(t==`<`)return cont(pushlex(`>`),commasep(typeparam,`>`),poplex,classNameAfter);if(t==`extends`||t==`implements`||c&&e==`,`)return t==`implements`&&(v.marked=`keyword`),cont(c?typeexpr:expression,classNameAfter);if(e==`{`)return cont(pushlex(`}`),classBody,poplex)}function classBody(e,t){if(e==`async`||e==`variable`&&(t==`static`||t==`get`||t==`set`||c&&isModifier(t))&&v.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return v.marked=`keyword`,cont(classBody);if(e==`variable`||v.style==`keyword`)return v.marked=`property`,cont(classfield,classBody);if(e==`number`||e==`string`)return cont(classfield,classBody);if(e==`[`)return cont(expression,maybetype,expect(`]`),classfield,classBody);if(t==`*`)return v.marked=`keyword`,cont(classBody);if(c&&e==`(`)return pass(functiondecl,classBody);if(e==`;`||e==`,`)return cont(classBody);if(e==`}`)return cont();if(t==`@`)return cont(expression,classBody)}function classfield(e,t){if(t==`!`||t==`?`)return cont(classfield);if(e==`:`)return cont(typeexpr,maybeAssign);if(t==`=`)return cont(expressionNoComma);var n=v.state.lexical.prev;return pass(n&&n.info==`interface`?functiondecl:functiondef)}function afterExport(e,t){return t==`*`?(v.marked=`keyword`,cont(maybeFrom,expect(`;`))):t==`default`?(v.marked=`keyword`,cont(expression,expect(`;`))):e==`{`?cont(commasep(exportField,`}`),maybeFrom,expect(`;`)):pass(statement)}function exportField(e,t){if(t==`as`)return v.marked=`keyword`,cont(expect(`variable`));if(e==`variable`)return pass(expressionNoComma,exportField)}function afterImport(e){return e==`string`?cont():e==`(`?pass(expression):e==`.`?pass(maybeoperatorComma):pass(importSpec,maybeMoreImports,maybeFrom)}function importSpec(e,t){return e==`{`?contCommasep(importSpec,`}`):(e==`variable`&&register(t),t==`*`&&(v.marked=`keyword`),cont(maybeAs))}function maybeMoreImports(e){if(e==`,`)return cont(importSpec,maybeMoreImports)}function maybeAs(e,t){if(t==`as`)return v.marked=`keyword`,cont(importSpec)}function maybeFrom(e,t){if(t==`from`)return v.marked=`keyword`,cont(expression)}function arrayLiteral(e){return e==`]`?cont():pass(commasep(expressionNoComma,`]`))}function enumdef(){return pass(pushlex(`form`),pattern,expect(`{`),pushlex(`}`),commasep(enummember,`}`),poplex,poplex)}function enummember(){return pass(pattern,maybeAssign)}function isContinuedStatement(e,t){return e.lastType==`operator`||e.lastType==`,`||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function expressionAllowed(e,t,n){return t.tokenize==tokenBase&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||t.lastType==`quasi`&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return{startState:function(e){var t={tokenize:tokenBase,lastType:`sof`,cc:[],lexical:new JSLexical((e||0)-r,0,`block`,!1),localVars:n.localVars,context:n.localVars&&new Context(null,null,!1),indented:e||0};return n.globalVars&&typeof n.globalVars==`object`&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty(`align`)||(t.lexical.align=!1),t.indented=e.indentation(),findFatArrow(e,t)),t.tokenize!=tokenComment&&e.eatSpace())return null;var n=t.tokenize(e,t);return m==`comment`?n:(t.lastType=m==`operator`&&(h==`++`||h==`--`)?`incdec`:m,parseJS(t,n,m,h,e))},indent:function(t,a){if(t.tokenize==tokenComment||t.tokenize==tokenQuasi)return e.Pass;if(t.tokenize!=tokenBase)return 0;var o=a&&a.charAt(0),s=t.lexical,c;if(!/^\s*else\b/.test(a))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==poplex)s=s.prev;else if(u!=maybeelse&&u!=popcontext)break}for(;(s.type==`stat`||s.type==`form`)&&(o==`}`||(c=t.cc[t.cc.length-1])&&(c==maybeoperatorComma||c==maybeoperatorNoComma)&&!/^[,\.=+\-*:?[\(]/.test(a));)s=s.prev;i&&s.type==`)`&&s.prev.type==`stat`&&(s=s.prev);var d=s.type,f=o==d;return d==`vardef`?s.indented+(t.lastType==`operator`||t.lastType==`,`?s.info.length+1:0):d==`form`&&o==`{`?s.indented:d==`form`?s.indented+r:d==`stat`?s.indented+(isContinuedStatement(t,a)?i||r:0):s.info==`switch`&&!f&&n.doubleIndentSwitch!=0?s.indented+(/^(?:case|default)\b/.test(a)?r:2*r):s.align?s.column+ +!f:s.indented+(f?0:r)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:o?null:`/*`,blockCommentEnd:o?null:`*/`,blockCommentContinue:o?null:` * `,lineComment:o?null:`//`,fold:`brace`,closeBrackets:`()[]{}''""\`\``,helperType:o?`json`:`javascript`,jsonldMode:a,jsonMode:o,expressionAllowed,skipExpression:function(t){parseJS(t,`atom`,`atom`,`true`,new e.StringStream(``,2,null))}}}),e.registerHelper(`wordChars`,`javascript`,/[\w$]/),e.defineMIME(`text/javascript`,`javascript`),e.defineMIME(`text/ecmascript`,`javascript`),e.defineMIME(`application/javascript`,`javascript`),e.defineMIME(`application/x-javascript`,`javascript`),e.defineMIME(`application/ecmascript`,`javascript`),e.defineMIME(`application/json`,{name:`javascript`,json:!0}),e.defineMIME(`application/x-json`,{name:`javascript`,json:!0}),e.defineMIME(`application/manifest+json`,{name:`javascript`,json:!0}),e.defineMIME(`application/ld+json`,{name:`javascript`,jsonld:!0}),e.defineMIME(`text/typescript`,{name:`javascript`,typescript:!0}),e.defineMIME(`application/typescript`,{name:`javascript`,typescript:!0})})})),x=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),h(),b(),f()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../javascript/javascript`,`../css/css`],n):n(CodeMirror)})(function(e){"use strict";var t={script:[[`lang`,/(javascript|babel)/i,`javascript`],[`type`,/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,`javascript`],[`type`,/./,`text/plain`],[null,null,`javascript`]],style:[[`lang`,/^css$/i,`css`],[`type`,/^(text\/)?(x-)?(stylesheet|css)$/i,`css`],[`type`,/./,`text/plain`],[null,null,`css`]]};function maybeBackup(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var n={};function getAttrRegexp(e){return n[e]||(n[e]=RegExp(`\\s+`+e+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function getAttrValue(e,t){var n=e.match(getAttrRegexp(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:``}function getTagRegexp(e,t){return RegExp((t?`^`:``)+`</\\s*`+e+`\\s*>`,`i`)}function addTags(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}function findMatchingMode(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(getAttrValue(t,r[0])))return r[2]}}e.defineMode(`htmlmixed`,function(n,r){var i=e.getMode(n,{name:`xml`,htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag,allowMissingTagName:r.allowMissingTagName}),a={},o=r&&r.tags,s=r&&r.scriptTypes;if(addTags(t,a),o&&addTags(o,a),s)for(var c=s.length-1;c>=0;c--)a.script.unshift([`type`,s[c].matches,s[c].mode]);function html(t,r){var o=i.token(t,r.htmlState),s=/\btag\b/.test(o),c;if(s&&!/[<>\s\/]/.test(t.current())&&(c=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&a.hasOwnProperty(c))r.inTag=c+` `;else if(r.inTag&&s&&/>$/.test(t.current())){var l=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var u=t.current()==`>`&&findMatchingMode(a[l[1]],l[2]),d=e.getMode(n,u),f=getTagRegexp(l[1],!0),m=getTagRegexp(l[1],!1);r.token=function(e,t){return e.match(f,!1)?(t.token=html,t.localState=t.localMode=null,null):maybeBackup(e,m,t.localMode.token(e,t.localState))},r.localMode=d,r.localState=e.startState(d,i.indent(r.htmlState,``,``))}else r.inTag&&(r.inTag+=t.current(),t.eol()&&(r.inTag+=` `));return o}return{startState:function(){return{token:html,inTag:null,localMode:null,localState:null,htmlState:e.startState(i)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(i,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?i.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||i}}}},`xml`,`javascript`,`css`),e.defineMIME(`text/html`,`htmlmixed`)})})),S=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`sql`,function(r,i){var a=i.client||{},o=i.atoms||{false:!0,true:!0,null:!0},s=i.builtin||set(n),c=i.keywords||set(t),l=i.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=i.support||{},d=i.hooks||{},f=i.dateSQL||{date:!0,time:!0,timestamp:!0},m=i.backslashStringEscapes!==!1,h=i.brackets||/^[\{}\(\)\[\]]/,g=i.punctuation||/^[;.,:]/;function tokenBase(e,t){var n=e.next();if(d[n]){var r=d[n](e,t);if(r!==!1)return r}if(u.hexNumber&&(n==`0`&&e.match(/^[xX][0-9a-fA-F]+/)||(n==`x`||n==`X`)&&e.match(/^'[0-9a-fA-F]*'/))||u.binaryNumber&&((n==`b`||n==`B`)&&e.match(/^'[01]*'/)||n==`0`&&e.match(/^b[01]+/)))return`number`;if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&e.match(/^\.(?!\.)/),`number`;if(n==`?`&&(e.eatSpace()||e.eol()||e.eat(`;`)))return`variable-3`;if(n==`'`||n==`"`&&u.doubleQuote)return t.tokenize=tokenLiteral(n),t.tokenize(e,t);if((u.nCharCast&&(n==`n`||n==`N`)||u.charsetCast&&n==`_`&&e.match(/[a-z][a-z0-9]*/i))&&(e.peek()==`'`||e.peek()==`"`))return`keyword`;if(u.escapeConstant&&(n==`e`||n==`E`)&&(e.peek()==`'`||e.peek()==`"`&&u.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=tokenLiteral(e.next(),!0))(e,t)},`keyword`;if(u.commentSlashSlash&&n==`/`&&e.eat(`/`)||u.commentHash&&n==`#`||n==`-`&&e.eat(`-`)&&(!u.commentSpaceRequired||e.eat(` `)))return e.skipToEnd(),`comment`;if(n==`/`&&e.eat(`*`))return t.tokenize=tokenComment(1),t.tokenize(e,t);if(n==`.`){if(u.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return`number`;if(e.match(/^\.+/))return null;if(e.match(/^[\w\d_$#]+/))return`variable-2`}else if(l.test(n))return e.eatWhile(l),`operator`;else if(h.test(n))return`bracket`;else if(g.test(n))return e.eatWhile(g),`punctuation`;else if(n==`{`&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return`number`;else{e.eatWhile(/^[_\w\d]/);var i=e.current().toLowerCase();return f.hasOwnProperty(i)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?`number`:o.hasOwnProperty(i)?`atom`:s.hasOwnProperty(i)?`type`:c.hasOwnProperty(i)?`keyword`:a.hasOwnProperty(i)?`builtin`:null}}function tokenLiteral(e,t){return function(n,r){for(var i=!1,a;(a=n.next())!=null;){if(a==e&&!i){r.tokenize=tokenBase;break}i=(m||t)&&!i&&a==`\\`}return`string`}}function tokenComment(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?r[1]==`/*`?n.tokenize=tokenComment(e+1):e>1?n.tokenize=tokenComment(e-1):n.tokenize=tokenBase:t.skipToEnd(),`comment`}}function pushContext(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function popContext(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:tokenBase,context:null}},token:function(e,t){if(e.sol()&&t.context&&t.context.align==null&&(t.context.align=!1),t.tokenize==tokenBase&&e.eatSpace())return null;var n=t.tokenize(e,t);if(n==`comment`)return n;t.context&&t.context.align==null&&(t.context.align=!0);var r=e.current();return r==`(`?pushContext(e,t,`)`):r==`[`?pushContext(e,t,`]`):t.context&&t.context.type==r&&popContext(t),n},indent:function(t,n){var i=t.context;if(!i)return e.Pass;var a=n.charAt(0)==i.type;return i.align?i.col+ +!a:i.indent+(a?0:r.indentUnit)},blockCommentStart:`/*`,blockCommentEnd:`*/`,lineComment:u.commentSlashSlash?`//`:u.commentHash?`#`:`--`,closeBrackets:`()[]{}''""\`\``,config:i}});function hookIdentifier(e){for(var t;(t=e.next())!=null;)if(t=="`"&&!e.eat("`"))return`variable-2`;return e.backUp(e.current().length-1),e.eatWhile(/\w/)?`variable-2`:null}function hookIdentifierDoublequote(e){for(var t;(t=e.next())!=null;)if(t==`"`&&!e.eat(`"`))return`variable-2`;return e.backUp(e.current().length-1),e.eatWhile(/\w/)?`variable-2`:null}function hookVar(e){return e.eat(`@`)&&(e.match(`session.`),e.match(`local.`),e.match(`global.`)),e.eat(`'`)?(e.match(/^.*'/),`variable-2`):e.eat(`"`)?(e.match(/^.*"/),`variable-2`):e.eat("`")?(e.match(/^.*`/),`variable-2`):e.match(/^[0-9a-zA-Z$\.\_]+/)?`variable-2`:null}function hookClient(e){return e.eat(`N`)?`atom`:e.match(/^[a-zA-Z.#!?]/)?`variable-2`:null}var t=`alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit `;function set(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var n=`bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric`;e.defineMIME(`text/x-sql`,{name:`sql`,keywords:set(t+`begin`),builtin:set(n),atoms:set(`false true null unknown`),dateSQL:set(`date time timestamp`),support:set(`doubleQuote binaryNumber hexNumber`)}),e.defineMIME(`text/x-mssql`,{name:`sql`,client:set(`$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id`),keywords:set(t+`begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with`),builtin:set(`bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table `),atoms:set(`is not null like and or in left right between inner outer join all any some cross unpivot pivot exists`),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:set(`date datetimeoffset datetime2 smalldatetime datetime time`),hooks:{"@":hookVar}}),e.defineMIME(`text/x-mysql`,{name:`sql`,client:set(`charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee`),keywords:set(t+`accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat`),builtin:set(`bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric`),atoms:set(`false true null unknown`),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:set(`date time timestamp`),support:set(`decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired`),hooks:{"@":hookVar,"`":hookIdentifier,"\\":hookClient}}),e.defineMIME(`text/x-mariadb`,{name:`sql`,client:set(`charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee`),keywords:set(t+`accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat`),builtin:set(`bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric`),atoms:set(`false true null unknown`),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:set(`date time timestamp`),support:set(`decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired`),hooks:{"@":hookVar,"`":hookIdentifier,"\\":hookClient}}),e.defineMIME(`text/x-sqlite`,{name:`sql`,client:set(`auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width`),keywords:set(t+`abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without`),builtin:set(`bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real`),atoms:set(`null current_date current_time current_timestamp`),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:set(`date time timestamp datetime`),support:set(`decimallessFloat zerolessFloat`),identifierQuote:`"`,hooks:{"@":hookVar,":":hookVar,"?":hookVar,$:hookVar,'"':hookIdentifierDoublequote,"`":hookIdentifier}}),e.defineMIME(`text/x-cassandra`,{name:`sql`,client:{},keywords:set(`add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime`),builtin:set(`ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint`),atoms:set(`false true infinity NaN`),operatorChars:/^[<>=]/,dateSQL:{},support:set(`commentSlashSlash decimallessFloat`),hooks:{}}),e.defineMIME(`text/x-plsql`,{name:`sql`,client:set(`appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap`),keywords:set(`abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work`),builtin:set(`abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml`),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:set(`date time timestamp`),support:set(`doubleQuote nCharCast zerolessFloat binaryNumber hexNumber`)}),e.defineMIME(`text/x-hive`,{name:`sql`,keywords:set(`select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year`),builtin:set(`bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar`),atoms:set(`false true null unknown`),operatorChars:/^[*+\-%<>!=]/,dateSQL:set(`date timestamp`),support:set(`doubleQuote binaryNumber hexNumber`)}),e.defineMIME(`text/x-pgsql`,{name:`sql`,client:set(`source`),keywords:set(t+`a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone`),builtin:set(`bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml`),atoms:set(`false true null unknown`),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,identifierQuote:`"`,hooks:{'"':hookIdentifierDoublequote},dateSQL:set(`date time timestamp`),support:set(`decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant`)}),e.defineMIME(`text/x-gql`,{name:`sql`,keywords:set(`ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where`),atoms:set(`false true`),builtin:set(`blob datetime first key __key__ string integer double boolean null`),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME(`text/x-gpsql`,{name:`sql`,client:set(`source`),keywords:set(`abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone`),builtin:set(`bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml`),atoms:set(`false true null unknown`),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:set(`date time timestamp`),support:set(`decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast`)}),e.defineMIME(`text/x-sparksql`,{name:`sql`,keywords:set(`add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with`),builtin:set(`abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with`),atoms:set(`false true null`),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:set(`date time timestamp`),support:set(`doubleQuote zerolessFloat`)}),e.defineMIME(`text/x-esper`,{name:`sql`,client:set(`source`),keywords:set(`alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window`),builtin:{},atoms:set(`false true null`),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:set(`time`),support:set(`decimallessFloat zerolessFloat binaryNumber hexNumber`)}),e.defineMIME(`text/x-trino`,{name:`sql`,keywords:set(`abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with`),builtin:set(`array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone`),atoms:set(`false true null unknown`),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:set(`date time timestamp zone`),support:set(`decimallessFloat zerolessFloat hexNumber`)})})})),C=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`yaml`,function(){var e=RegExp(`\\b((`+[`true`,`false`,`on`,`off`,`yes`,`no`].join(`)|(`)+`))$`,`i`);return{token:function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,r==`#`&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),`comment`;if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return`string`;if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),`string`;if(n.literal&&=!1,t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(`---`)||t.match(`...`))return`def`;if(t.match(/\s*-\s+/))return`meta`}if(t.match(/^(\{|\}|\[|\])/))return r==`{`?n.inlinePairs++:r==`}`?n.inlinePairs--:r==`[`?n.inlineList++:n.inlineList--,`meta`;if(n.inlineList>0&&!i&&r==`,`)return t.next(),`meta`;if(n.inlinePairs>0&&!i&&r==`,`)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),`meta`;if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,`meta`;if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return`variable-2`;if(n.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return`number`;if(t.match(e))return`keyword`}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),`atom`):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,`meta`):(n.pairStart=!1,n.escaped=r==`\\`,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:`#`,fold:`indent`}}),e.defineMIME(`text/x-yaml`,`yaml`),e.defineMIME(`text/yaml`,`yaml`)})}));f(),m(),h(),y(),b(),x(),S(),C();var w=__toESM(d(),1);w.default.defineMode(`dot`,function(e){let t=/--|->|=|;/,n=/[\[\]{}]/;return{startState(){return{indent_level:0}},token(e,r){switch(e.eatSpace(),r.looking_for){case`multiline-comment`:return e.match(/.*\*\//)?r.looking_for=null:e.skipToEnd(),`comment`;case`property`:return e.match(`=`)?`variable-3`:(e.match(/\w+/),r.looking_for=null,`string-2`);case`graphname`:if(r.looking_for=null,e.match(/{\W*$/))return r.indent_level+=1,`bracket`;if(e.match(`{`))return`bracket`;if(e.match(/[^\W]+/))return`variable-2`;default:return e.match(/{\W*$/)?(r.indent_level+=1,`bracket`):e.match(/}\W*$/)?(--r.indent_level,`bracket`):e.match(n)?`bracket`:e.match(/".*"/)?`string`:e.match(/\w+=[\"\w]+/,!1)?(r.looking_for=`property`,e.match(/[^=]+/),`attribute`):e.match(t)?`variable-3`:e.match(/(di)?graph[^{\w]+/)?(r.looking_for=`graphname`,`keyword`):e.match(/\/\/|#/)?(e.skipToEnd(),`comment`):e.match(/\/\*.*\*\//)?`comment`:e.match(`/*`)?(r.looking_for=`multiline-comment`,`comment`):(e.match(/\w+/)||e.skipToEnd(),`variable`)}},indent(t,n){return t.indent_level*(e.indentUnit||2)},closeBrackets:{pairs:`[]{}""`},lineComment:/(\/\/|#)/,blockCommentStart:`/*`,blockCommentEnd:`*/`}}),w.default.defineMIME(`text/x-dot`,`dot`),w.default.defineMode(`markdown`,function(e,t){var n=w.default.getMode(e,`text/html`),r=n.name==`null`;t.defaultMode===void 0&&(t.defaultMode=``);function getMode(n){if(n=n===``?t.defaultMode:n,w.default.findModeByName){var r=w.default.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=w.default.getMode(e,n);return i.name==`null`?null:i}t.highlightFormatting===void 0&&(t.highlightFormatting=!1),t.maxBlockquoteDepth===void 0&&(t.maxBlockquoteDepth=0),t.taskLists===void 0&&(t.taskLists=!1),t.strikethrough===void 0&&(t.strikethrough=!1),t.emoji===void 0&&(t.emoji=!1),t.fencedCodeBlockHighlighting===void 0&&(t.fencedCodeBlockHighlighting=!0),t.xml===void 0&&(t.xml=!0),t.tokenTypeOverrides===void 0&&(t.tokenTypeOverrides={});var i={header:`header`,code:`comment`,quote:`quote`,list1:`variable-2`,list2:`variable-3`,list3:`keyword`,hr:`hr`,image:`image`,imageAltText:`image-alt-text`,imageMarker:`image-marker`,formatting:`formatting`,linkInline:`link`,linkEmail:`link`,linkText:`link`,linkHref:`string`,em:`em`,strong:`strong`,strikethrough:`strikethrough`,emoji:`builtin`};for(var a in i)i.hasOwnProperty(a)&&t.tokenTypeOverrides[a]&&(i[a]=t.tokenTypeOverrides[a]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,l=t.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,u=/^ *(?:\={1,}|-{1,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,h=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,g=` `;function switchInline(e,t,n){return t.f=t.inline=n,n(e,t)}function switchBlock(e,t,n){return t.f=t.block=n,n(e,t)}function lineIsEmpty(e){return!e||!/\S/.test(e.string)}function blankLine(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==htmlBlock){var t=r;if(!t){var i=w.default.innerMode(n,e.htmlState);t=i.mode.name==`xml`&&i.state.tagStart===null&&!i.state.context&&i.state.tokenize.isInText}t&&(e.f=inlineNormal,e.block=blockNormal,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function blockNormal(e,n){var r=e.column()===n.indentation,a=lineIsEmpty(n.prevLine.stream),d=n.indentedCode,h=n.prevLine.hr,g=n.list!==!1,_=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var v=n.indentation;if(n.indentationDiff===null&&(n.indentationDiff=n.indentation,g)){for(n.list=null;v<n.listStack[n.listStack.length-1];)n.listStack.pop(),n.listStack.length?n.indentation=n.listStack[n.listStack.length-1]:n.list=!1;n.list!==!1&&(n.indentationDiff=v-n.listStack[n.listStack.length-1])}var y=!a&&!h&&!n.prevLine.header&&(!g||!d)&&!n.prevLine.fencedCodeEnd,b=(n.list===!1||h||a)&&n.indentation<=_&&e.match(o),x=null;if(n.indentationDiff>=4&&(d||n.prevLine.fencedCodeEnd||n.prevLine.header||a))return e.skipToEnd(),n.indentedCode=!0,i.code;if(e.eatSpace())return null;if(r&&n.indentation<=_&&(x=e.match(l))&&x[1].length<=6)return n.quote=0,n.header=x[1].length,n.thisLine.header=!0,t.highlightFormatting&&(n.formatting=`header`),n.f=n.inline,getType(n);if(n.indentation<=_&&e.eat(`>`))return n.quote=r?1:n.quote+1,t.highlightFormatting&&(n.formatting=`quote`),e.eatSpace(),getType(n);if(!b&&!n.setext&&r&&n.indentation<=_&&(x=e.match(s))){var S=x[1]?`ol`:`ul`;return n.indentation=v+e.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,t.taskLists&&e.match(c,!1)&&(n.taskList=!0),n.f=n.inline,t.highlightFormatting&&(n.formatting=[`list`,`list-`+S]),getType(n)}else if(r&&n.indentation<=_&&(x=e.match(f,!0)))return n.quote=0,n.fencedEndRE=RegExp(x[1]+`+ *$`),n.localMode=t.fencedCodeBlockHighlighting&&getMode(x[2]),n.localMode&&(n.localState=w.default.startState(n.localMode)),n.f=n.block=local,t.highlightFormatting&&(n.formatting=`code-block`),n.code=-1,getType(n);else if(n.setext||(!y||!g)&&!n.quote&&n.list===!1&&!n.code&&!b&&!m.test(e.string)&&(x=e.lookAhead(1))&&(x=x.match(u)))return n.setext?(n.header=n.setext,n.setext=0,e.skipToEnd(),t.highlightFormatting&&(n.formatting=`header`)):(n.header=x[0].charAt(0)==`=`?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,getType(n);else if(b)return e.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,i.hr;else if(e.peek()===`[`)return switchInline(e,n,footnoteLink);return switchInline(e,n,n.inline)}function htmlBlock(e,t){var i=n.token(e,t.htmlState);if(!r){var a=w.default.innerMode(n,t.htmlState);(a.mode.name==`xml`&&a.state.tagStart===null&&!a.state.context&&a.state.tokenize.isInText||t.md_inside&&e.current().indexOf(`>`)>-1)&&(t.f=inlineNormal,t.block=blockNormal,t.htmlState=null)}return i}function local(e,n){var r=n.listStack[n.listStack.length-1]||0,a=n.indentation<r,o=r+3;if(n.fencedEndRE&&n.indentation<=o&&(a||e.match(n.fencedEndRE))){t.highlightFormatting&&(n.formatting=`code-block`);var s;return a||(s=getType(n)),n.localMode=n.localState=null,n.block=blockNormal,n.f=inlineNormal,n.fencedEndRE=null,n.code=0,n.thisLine.fencedCodeEnd=!0,a?switchBlock(e,n,n.block):s}else if(n.localMode)return n.localMode.token(e,n.localState);else return e.skipToEnd(),i.code}function getType(e){var n=[];if(e.formatting){n.push(i.formatting),typeof e.formatting==`string`&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)n.push(i.formatting+`-`+e.formatting[r]),e.formatting[r]===`header`&&n.push(i.formatting+`-`+e.formatting[r]+`-`+e.header),e.formatting[r]===`quote`&&(!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?n.push(i.formatting+`-`+e.formatting[r]+`-`+e.quote):n.push(`error`))}if(e.taskOpen)return n.push(`meta`),n.length?n.join(` `):null;if(e.taskClosed)return n.push(`property`),n.length?n.join(` `):null;if(e.linkHref?n.push(i.linkHref,`url`):(e.strong&&n.push(i.strong),e.em&&n.push(i.em),e.strikethrough&&n.push(i.strikethrough),e.emoji&&n.push(i.emoji),e.linkText&&n.push(i.linkText),e.code&&n.push(i.code),e.image&&n.push(i.image),e.imageAltText&&n.push(i.imageAltText,`link`),e.imageMarker&&n.push(i.imageMarker)),e.header&&n.push(i.header,i.header+`-`+e.header),e.quote&&(n.push(i.quote),!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?n.push(i.quote+`-`+e.quote):n.push(i.quote+`-`+t.maxBlockquoteDepth)),e.list!==!1){var a=(e.listStack.length-1)%3;a?a===1?n.push(i.list2):n.push(i.list3):n.push(i.list1)}return e.trailingSpaceNewLine?n.push(`trailing-space-new-line`):e.trailingSpace&&n.push(`trailing-space-`+(e.trailingSpace%2?`a`:`b`)),n.length?n.join(` `):null}function handleText(e,t){if(e.match(d,!0))return getType(t)}function inlineNormal(e,r){var a=r.text(e,r);if(a!==void 0)return a;if(r.list)return r.list=null,getType(r);if(r.taskList)return e.match(c,!0)[1]===` `?r.taskOpen=!0:r.taskClosed=!0,t.highlightFormatting&&(r.formatting=`task`),r.taskList=!1,getType(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&e.match(/^#+$/,!0))return t.highlightFormatting&&(r.formatting=`header`),getType(r);var o=e.next();if(r.linkTitle){r.linkTitle=!1;var s=o;o===`(`&&(s=`)`),s=(s+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var l=`^\\s*(?:[^`+s+`\\\\]+|\\\\\\\\|\\\\.)`+s;if(e.match(new RegExp(l),!0))return i.linkHref}if(o==="`"){var u=r.formatting;t.highlightFormatting&&(r.formatting=`code`),e.eatWhile("`");var d=e.current().length;if(r.code==0&&(!r.quote||d==1))return r.code=d,getType(r);if(d==r.code){var f=getType(r);return r.code=0,f}else return r.formatting=u,getType(r)}else if(r.code)return getType(r);if(o===`\\`&&(e.next(),t.highlightFormatting)){var m=getType(r),g=i.formatting+`-escape`;return m?m+` `+g:g}if(o===`!`&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,t.highlightFormatting&&(r.formatting=`image`),getType(r);if(o===`[`&&r.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,t.highlightFormatting&&(r.formatting=`image`),getType(r);if(o===`]`&&r.imageAltText){t.highlightFormatting&&(r.formatting=`image`);var m=getType(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=linkHref,m}if(o===`[`&&!r.image)return r.linkText&&e.match(/^.*?\]/)?getType(r):(r.linkText=!0,t.highlightFormatting&&(r.formatting=`link`),getType(r));if(o===`]`&&r.linkText){t.highlightFormatting&&(r.formatting=`link`);var m=getType(r);return r.linkText=!1,r.inline=r.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?linkHref:inlineNormal,m}if(o===`<`&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=linkInline,t.highlightFormatting&&(r.formatting=`link`);var m=getType(r);return m?m+=` `:m=``,m+i.linkInline}if(o===`<`&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=linkInline,t.highlightFormatting&&(r.formatting=`link`);var m=getType(r);return m?m+=` `:m=``,m+i.linkEmail}if(t.xml&&o===`<`&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _=e.string.indexOf(`>`,e.pos);if(_!=-1){var v=e.string.substring(e.start,_);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(r.md_inside=!0)}return e.backUp(1),r.htmlState=w.default.startState(n),switchBlock(e,r,htmlBlock)}if(t.xml&&o===`<`&&e.match(/^\/\w*?>/))return r.md_inside=!1,`tag`;if(o===`*`||o===`_`){for(var y=1,b=e.pos==1?` `:e.string.charAt(e.pos-2);y<3&&e.eat(o);)y++;var x=e.peek()||` `,S=!/\s/.test(x)&&(!h.test(x)||/\s/.test(b)||h.test(b)),C=!/\s/.test(b)&&(!h.test(b)||/\s/.test(x)||h.test(x)),T=null,E=null;if(y%2&&(!r.em&&S&&(o===`*`||!C||h.test(b))?T=!0:r.em==o&&C&&(o===`*`||!S||h.test(x))&&(T=!1)),y>1&&(!r.strong&&S&&(o===`*`||!C||h.test(b))?E=!0:r.strong==o&&C&&(o===`*`||!S||h.test(x))&&(E=!1)),E!=null||T!=null){t.highlightFormatting&&(r.formatting=T==null?`strong`:E==null?`em`:`strong em`),T===!0&&(r.em=o),E===!0&&(r.strong=o);var f=getType(r);return T===!1&&(r.em=!1),E===!1&&(r.strong=!1),f}}else if(o===` `&&(e.eat(`*`)||e.eat(`_`))){if(e.peek()===` `)return getType(r);e.backUp(1)}if(t.strikethrough){if(o===`~`&&e.eatWhile(o)){if(r.strikethrough){t.highlightFormatting&&(r.formatting=`strikethrough`);var f=getType(r);return r.strikethrough=!1,f}else if(e.match(/^[^\s]/,!1))return r.strikethrough=!0,t.highlightFormatting&&(r.formatting=`strikethrough`),getType(r)}else if(o===` `&&e.match(/^~~/,!0)){if(e.peek()===` `)return getType(r);e.backUp(2)}}if(t.emoji&&o===`:`&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,t.highlightFormatting&&(r.formatting=`emoji`);var D=getType(r);return r.emoji=!1,D}return o===` `&&(e.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),getType(r)}function linkInline(e,n){if(e.next()===`>`){n.f=n.inline=inlineNormal,t.highlightFormatting&&(n.formatting=`link`);var r=getType(n);return r?r+=` `:r=``,r+i.linkInline}return e.match(/^[^>]+/,!0),i.linkInline}function linkHref(e,n){if(e.eatSpace())return null;var r=e.next();return r===`(`||r===`[`?(n.f=n.inline=getLinkHrefInside(r===`(`?`)`:`]`),t.highlightFormatting&&(n.formatting=`link-string`),n.linkHref=!0,getType(n)):`error`}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function getLinkHrefInside(e){return function(n,r){if(n.next()===e){r.f=r.inline=inlineNormal,t.highlightFormatting&&(r.formatting=`link-string`);var i=getType(r);return r.linkHref=!1,i}return n.match(_[e]),r.linkHref=!0,getType(r)}}function footnoteLink(e,n){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(n.f=footnoteLinkInside,e.next(),t.highlightFormatting&&(n.formatting=`link`),n.linkText=!0,getType(n)):switchInline(e,n,inlineNormal)}function footnoteLinkInside(e,n){if(e.match(/^\]:/,!0)){n.f=n.inline=footnoteUrl,t.highlightFormatting&&(n.formatting=`link`);var r=getType(n);return n.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),i.linkText}function footnoteUrl(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===void 0?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=inlineNormal,i.linkHref+` url`)}var v={startState:function(){return{f:blockNormal,prevLine:{stream:null},thisLine:{stream:null},block:blockNormal,htmlState:null,indentation:0,inline:inlineNormal,text:handleText,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&w.default.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?w.default.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return blankLine(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=htmlBlock)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,g).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==htmlBlock?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:v}},indent:function(e,t,r){return e.block==htmlBlock&&n.indent?n.indent(e.htmlState,t,r):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,t,r):w.default.Pass},blankLine,getType,blockCommentStart:`<!--`,blockCommentEnd:`-->`,closeBrackets:`()[]{}''""\`\``,fold:`markdown`};return v},`xml`),w.default.defineMIME(`text/markdown`,`markdown`),w.default.defineMIME(`text/x-markdown`,`markdown`);var T=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";function bracketFolding(t){return function(n,r){var i=r.line,a=n.getLine(i);function findOpening(t){for(var o,s=r.ch,c=0;;){var l=s<=0?-1:a.lastIndexOf(t[0],s-1);if(l==-1){if(c==1)break;c=1,s=a.length;continue}if(c==1&&l<r.ch)break;if(o=n.getTokenTypeAt(e.Pos(i,l+1)),!/^(comment|string)/.test(o))return{ch:l+1,tokenType:o,pair:t};s=l-1}}function findRange(t){var r=1,a=n.lastLine(),o,s=t.ch,c;outer:for(var l=i;l<=a;++l)for(var u=n.getLine(l),d=l==i?s:0;;){var f=u.indexOf(t.pair[0],d),m=u.indexOf(t.pair[1],d);if(f<0&&(f=u.length),m<0&&(m=u.length),d=Math.min(f,m),d==u.length)break;if(n.getTokenTypeAt(e.Pos(l,d+1))==t.tokenType){if(d==f)++r;else if(!--r){o=l,c=d;break outer}}++d}return o==null||i==o?null:{from:e.Pos(i,s),to:e.Pos(o,c)}}for(var o=[],s=0;s<t.length;s++){var c=findOpening(t[s]);c&&o.push(c)}o.sort(function(e,t){return e.ch-t.ch});for(var s=0;s<o.length;s++){var l=findRange(o[s]);if(l)return l}return null}}e.registerHelper(`fold`,`brace`,bracketFolding([[`{`,`}`],[`[`,`]`]])),e.registerHelper(`fold`,`brace-paren`,bracketFolding([[`{`,`}`],[`[`,`]`],[`(`,`)`]])),e.registerHelper(`fold`,`import`,function(t,n){function hasImport(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),r.type!=`keyword`||r.string!=`import`)return null;for(var i=n,a=Math.min(t.lastLine(),n+10);i<=a;++i){var o=t.getLine(i).indexOf(`;`);if(o!=-1)return{startCh:r.end,end:e.Pos(i,o)}}}var r=n.line,i=hasImport(r),a;if(!i||hasImport(r-1)||(a=hasImport(r-2))&&a.end.line==r-1)return null;for(var o=i.end;;){var s=hasImport(o.line+1);if(s==null)break;o=s.end}return{from:t.clipPos(e.Pos(r,i.startCh+1)),to:o}}),e.registerHelper(`fold`,`include`,function(t,n){function hasInclude(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),r.type==`meta`&&r.string.slice(0,8)==`#include`)return r.start+8}var r=n.line,i=hasInclude(r);if(i==null||hasInclude(r-1)!=null)return null;for(var a=r;hasInclude(a+1)!=null;)++a;return{from:e.Pos(r,i+1),to:t.clipPos(e.Pos(a))}})})})),E=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.registerGlobalHelper(`fold`,`comment`,function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,a=r.blockCommentEnd;if(!(!i||!a)){for(var o=n.line,s=t.getLine(o),c,l=n.ch,u=0;;){var d=l<=0?-1:s.lastIndexOf(i,l-1);if(d==-1){if(u==1)return;u=1,l=s.length;continue}if(u==1&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(o,d+1)))&&(d==0||s.slice(d-a.length,d)==a||!/comment/.test(t.getTokenTypeAt(e.Pos(o,d))))){c=d+i.length;break}l=d-1}var f=1,m=t.lastLine(),h,g;outer:for(var _=o;_<=m;++_)for(var v=t.getLine(_),y=_==o?c:0;;){var b=v.indexOf(i,y),x=v.indexOf(a,y);if(b<0&&(b=v.length),x<0&&(x=v.length),y=Math.min(b,x),y==v.length)break;if(y==b)++f;else if(!--f){h=_,g=y;break outer}++y}if(!(h==null||o==h&&g==c))return{from:e.Pos(o,c),to:e.Pos(h,g)}}})})})),D=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";function doFold(t,n,r,i){if(r&&r.call){var a=r;r=null}else var a=getOption(t,r,`rangeFinder`);typeof n==`number`&&(n=e.Pos(n,0));var o=getOption(t,r,`minFoldSize`);function getRange(e){var r=a(t,n);if(!r||r.to.line-r.from.line<o)return null;if(i===`fold`)return r;for(var s=t.findMarksAt(r.from),c=0;c<s.length;++c)if(s[c].__isFold){if(!e)return null;r.cleared=!0,s[c].clear()}return r}var s=getRange(!0);if(getOption(t,r,`scanUp`))for(;!s&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),s=getRange(!1);if(!(!s||s.cleared||i===`unfold`)){var c=makeWidget(t,r,s);e.on(c,`mousedown`,function(t){l.clear(),e.e_preventDefault(t)});var l=t.markText(s.from,s.to,{replacedWith:c,clearOnEnter:getOption(t,r,`clearOnEnter`),__isFold:!0});l.on(`clear`,function(n,r){e.signal(t,`unfold`,t,n,r)}),e.signal(t,`fold`,t,s.from,s.to)}}function makeWidget(e,t,n){var r=getOption(e,t,`widget`);if(typeof r==`function`&&(r=r(n.from,n.to)),typeof r==`string`){var i=document.createTextNode(r);r=document.createElement(`span`),r.appendChild(i),r.className=`CodeMirror-foldmarker`}else r&&=r.cloneNode(!0);return r}e.newFoldFunction=function(e,t){return function(n,r){doFold(n,r,{rangeFinder:e,widget:t})}},e.defineExtension(`foldCode`,function(e,t,n){doFold(this,e,t,n)}),e.defineExtension(`isFolded`,function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,`fold`)},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},`unfold`)},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},`fold`)})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},`unfold`)})},e.registerHelper(`fold`,`combine`,function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}}),e.registerHelper(`fold`,`auto`,function(e,t){for(var n=e.getHelpers(t,`fold`),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var t={rangeFinder:e.fold.auto,widget:`↔`,minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption(`foldOptions`,null);function getOption(e,n,r){if(n&&n[r]!==void 0)return n[r];var i=e.options.foldOptions;return i&&i[r]!==void 0?i[r]:t[r]}e.defineExtension(`foldOption`,function(e,t){return getOption(this,e,t)})})})),O=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),D()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./foldcode`],n):n(CodeMirror)})(function(e){"use strict";e.defineOption(`foldGutter`,!1,function(t,n,r){r&&r!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off(`gutterClick`,onGutterClick),t.off(`changes`,onChange),t.off(`viewportChange`,onViewportChange),t.off(`fold`,onFold),t.off(`unfold`,onFold),t.off(`swapDoc`,onChange),t.off(`optionChange`,optionChange)),n&&(t.state.foldGutter=new State(parseOptions(n)),updateInViewport(t),t.on(`gutterClick`,onGutterClick),t.on(`changes`,onChange),t.on(`viewportChange`,onViewportChange),t.on(`fold`,onFold),t.on(`unfold`,onFold),t.on(`swapDoc`,onChange),t.on(`optionChange`,optionChange))});var t=e.Pos;function State(e){this.options=e,this.from=this.to=0}function parseOptions(e){return e===!0&&(e={}),e.gutter??=`CodeMirror-foldgutter`,e.indicatorOpen??=`CodeMirror-foldgutter-open`,e.indicatorFolded??=`CodeMirror-foldgutter-folded`,e}function isFolded(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var a=r[i].find(-1);if(a&&a.line===n)return r[i]}}function marker(e){if(typeof e==`string`){var t=document.createElement(`div`);return t.className=e+` CodeMirror-guttermarker-subtle`,t}else return e.cloneNode(!0)}function updateFoldInfo(e,n,r){var i=e.state.foldGutter.options,a=n-1,o=e.foldOption(i,`minFoldSize`),s=e.foldOption(i,`rangeFinder`),c=typeof i.indicatorFolded==`string`&&classTest(i.indicatorFolded),l=typeof i.indicatorOpen==`string`&&classTest(i.indicatorOpen);e.eachLine(n,r,function(n){++a;var r=null,u=n.gutterMarkers;if(u&&=u[i.gutter],isFolded(e,a)){if(c&&u&&c.test(u.className))return;r=marker(i.indicatorFolded)}else{var d=t(a,0),f=s&&s(e,d);if(f&&f.to.line-f.from.line>=o){if(l&&u&&l.test(u.className))return;r=marker(i.indicatorOpen)}}!r&&!u||e.setGutterMarker(n,i.gutter,r)})}function classTest(e){return RegExp(`(^|\\s)`+e+`(?:$|\\s)\\s*`)}function updateInViewport(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){updateFoldInfo(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function onGutterClick(e,n,r){var i=e.state.foldGutter;if(i){var a=i.options;if(r==a.gutter){var o=isFolded(e,n);o?o.clear():e.foldCode(t(n,0),a)}}}function optionChange(e,t){t==`mode`&&onChange(e)}function onChange(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){updateInViewport(e)},n.foldOnChangeTimeSpan||600)}}function onViewportChange(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?updateInViewport(e):e.operation(function(){n.from<t.from&&(updateFoldInfo(e,n.from,t.from),t.from=n.from),n.to>t.to&&(updateFoldInfo(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function onFold(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&updateFoldInfo(e,r,r+1)}}})})),k=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";function lineIndent(t,n){var r=t.getLine(n),i=r.search(/\S/);return i==-1||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,i+1)))?-1:e.countColumn(r,null,t.getOption(`tabSize`))}e.registerHelper(`fold`,`indent`,function(t,n){var r=lineIndent(t,n.line);if(!(r<0)){for(var i=null,a=n.line+1,o=t.lastLine();a<=o;++a){var s=lineIndent(t,a);if(s!=-1)if(s>r)i=a;else break}if(i)return{from:e.Pos(n.line,t.getLine(n.line).length),to:e.Pos(i,t.getLine(i).length)}}})})})),A=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";var t=e.Pos;function cmp(e,t){return e.line-t.line||e.ch-t.ch}var n=`A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`,r=n+`-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040`,i=RegExp(`<(/?)([`+n+`][`+r+`]*)`,`g`);function Iter(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function tagAt(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function nextLine(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function prevLine(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function toTagEnd(e){for(;;){var t=e.text.indexOf(`>`,e.ch);if(t==-1){if(nextLine(e))continue;return}if(!tagAt(e,t+1)){e.ch=t+1;continue}var n=e.text.lastIndexOf(`/`,t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?`selfClose`:`regular`}}function toTagStart(e){for(;;){var t=e.ch?e.text.lastIndexOf(`<`,e.ch-1):-1;if(t==-1){if(prevLine(e))continue;return}if(!tagAt(e,t+1)){e.ch=t;continue}i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}}function toNextTag(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(nextLine(e))continue;return}if(!tagAt(e,t.index+1)){e.ch=t.index+1;continue}return e.ch=t.index+t[0].length,t}}function toPrevTag(e){for(;;){var t=e.ch?e.text.lastIndexOf(`>`,e.ch-1):-1;if(t==-1){if(prevLine(e))continue;return}if(!tagAt(e,t+1)){e.ch=t;continue}var n=e.text.lastIndexOf(`/`,t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?`selfClose`:`regular`}}function findMatchingClose(e,n){for(var r=[];;){var i=toNextTag(e),a,o=e.line,s=e.ch-(i?i[0].length:0);if(!i||!(a=toTagEnd(e)))return;if(a!=`selfClose`)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!n||n==i[2]))return{tag:i[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(i[2])}}function findMatchingOpen(e,n){for(var r=[];;){var i=toPrevTag(e);if(!i)return;if(i==`selfClose`){toTagStart(e);continue}var a=e.line,o=e.ch,s=toTagStart(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==s[2]){r.length=c;break}if(c<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}}e.registerHelper(`fold`,`xml`,function(e,n){for(var r=new Iter(e,n.line,0);;){var i=toNextTag(r);if(!i||r.line!=n.line)return;var a=toTagEnd(r);if(!a)return;if(!i[1]&&a!=`selfClose`){var o=t(r.line,r.ch),s=findMatchingClose(r,i[2]);return s&&cmp(s.from,o)>0?{from:o,to:s.from}:null}}}),e.findMatchingTag=function(e,n,r){var i=new Iter(e,n.line,n.ch,r);if(!(i.text.indexOf(`>`)==-1&&i.text.indexOf(`<`)==-1)){var a=toTagEnd(i),o=a&&t(i.line,i.ch),s=a&&toTagStart(i);if(!(!a||!s||cmp(i,n)>0)){var c={from:t(i.line,i.ch),to:o,tag:s[2]};return a==`selfClose`?{open:c,close:null,at:`open`}:s[1]?{open:findMatchingOpen(i,s[2]),close:c,at:`close`}:(i=new Iter(e,o.line,o.ch,r),{open:c,close:findMatchingClose(i,s[2]),at:`open`})}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new Iter(e,t.line,t.ch,n);;){var a=findMatchingOpen(i,r);if(!a)break;var o=findMatchingClose(new Iter(e,t.line,t.ch,n),a.tag);if(o)return{open:a,close:o}}},e.scanForClosingTag=function(e,t,n,r){return findMatchingClose(new Iter(e,t.line,t.ch,r?{from:0,to:r}:null),n)}})}));T(),E(),D(),O(),k(),A();var j=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){function dialogDiv(t,n,r){var i=t.getWrapperElement(),a=i.appendChild(document.createElement(`div`));return r?a.className=`CodeMirror-dialog CodeMirror-dialog-bottom`:a.className=`CodeMirror-dialog CodeMirror-dialog-top`,typeof n==`string`?a.innerHTML=n:a.appendChild(n),e.addClass(i,`dialog-opened`),a}function closeNotification(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension(`openDialog`,function(t,n,r){r||={},closeNotification(this,null);var i=dialogDiv(this,t,r.bottom),a=!1,o=this;function close(t){if(typeof t==`string`)s.value=t;else{if(a)return;a=!0,e.rmClass(i.parentNode,`dialog-opened`),i.parentNode.removeChild(i),o.focus(),r.onClose&&r.onClose(i)}}var s=i.getElementsByTagName(`input`)[0],c;return s?(s.focus(),r.value&&(s.value=r.value,r.selectValueOnOpen!==!1&&s.select()),r.onInput&&e.on(s,`input`,function(e){r.onInput(e,s.value,close)}),r.onKeyUp&&e.on(s,`keyup`,function(e){r.onKeyUp(e,s.value,close)}),e.on(s,`keydown`,function(t){r&&r.onKeyDown&&r.onKeyDown(t,s.value,close)||((t.keyCode==27||r.closeOnEnter!==!1&&t.keyCode==13)&&(s.blur(),e.e_stop(t),close()),t.keyCode==13&&n(s.value,t))}),r.closeOnBlur!==!1&&e.on(i,`focusout`,function(e){e.relatedTarget!==null&&close()})):(c=i.getElementsByTagName(`button`)[0])&&(e.on(c,`click`,function(){close(),o.focus()}),r.closeOnBlur!==!1&&e.on(c,`blur`,close),c.focus()),close}),e.defineExtension(`openConfirm`,function(t,n,r){closeNotification(this,null);var i=dialogDiv(this,t,r&&r.bottom),a=i.getElementsByTagName(`button`),o=!1,s=this,c=1;function close(){o||(o=!0,e.rmClass(i.parentNode,`dialog-opened`),i.parentNode.removeChild(i),s.focus())}a[0].focus();for(var l=0;l<a.length;++l){var u=a[l];(function(t){e.on(u,`click`,function(n){e.e_preventDefault(n),close(),t&&t(s)})})(n[l]),e.on(u,`blur`,function(){--c,setTimeout(function(){c<=0&&close()},200)}),e.on(u,`focus`,function(){++c})}}),e.defineExtension(`openNotification`,function(t,n){closeNotification(this,close);var r=dialogDiv(this,t,n&&n.bottom),i=!1,a,o=n&&n.duration!==void 0?n.duration:5e3;function close(){i||(i=!0,clearTimeout(a),e.rmClass(r.parentNode,`dialog-opened`),r.parentNode.removeChild(r))}return e.on(r,`click`,function(t){e.e_preventDefault(t),close()}),o&&(a=setTimeout(close,o)),close})})})),M=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),j()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){"use strict";e.defineOption(`search`,{bottom:!1});function dialog(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function getJumpDialog(e){return e.phrase(`Jump to line:`)+` <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">`+e.phrase(`(Use line:column or scroll% syntax)`)+`</span>`}function interpretLine(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var t=e.getCursor();dialog(e,getJumpDialog(e),e.phrase(`Jump to line:`),t.line+1+`:`+t.ch,function(n){if(n){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(n))e.setCursor(interpretLine(e,r[1]),Number(r[2]));else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(n)){var i=Math.round(e.lineCount()*Number(r[1])/100);/^[-+]/.test(r[1])&&(i=t.line+i+1),e.setCursor(i-1,t.ch)}else (r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(n))&&e.setCursor(interpretLine(e,r[1]),t.ch)}})},e.keyMap.default[`Alt-G`]=`jumpToLine`})})),N=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";var t=e.Pos;function regexpFlags(e){return e.flags??(e.ignoreCase?`i`:``)+(e.global?`g`:``)+(e.multiline?`m`:``)}function ensureFlags(e,t){for(var n=regexpFlags(e),r=n,i=0;i<t.length;i++)r.indexOf(t.charAt(i))==-1&&(r+=t.charAt(i));return n==r?e:new RegExp(e.source,r)}function maybeMultiline(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function searchRegexpForward(e,n,r){n=ensureFlags(n,`g`);for(var i=r.line,a=r.ch,o=e.lastLine();i<=o;i++,a=0){n.lastIndex=a;var s=e.getLine(i),c=n.exec(s);if(c)return{from:t(i,c.index),to:t(i,c.index+c[0].length),match:c}}}function searchRegexpForwardMultiline(e,n,r){if(!maybeMultiline(n))return searchRegexpForward(e,n,r);n=ensureFlags(n,`gm`);for(var i,a=1,o=r.line,s=e.lastLine();o<=s;){for(var c=0;c<a&&!(o>s);c++){var l=e.getLine(o++);i=i==null?l:i+`
25
+ `+l}a*=2,n.lastIndex=r.ch;var u=n.exec(i);if(u){var d=i.slice(0,u.index).split(`
26
+ `),f=u[0].split(`
27
+ `),m=r.line+d.length-1,h=d[d.length-1].length;return{from:t(m,h),to:t(m+f.length-1,f.length==1?h+f[0].length:f[f.length-1].length),match:u}}}}function lastMatchIn(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var a=t.exec(e);if(!a)break;var o=a.index+a[0].length;if(o>e.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function searchRegexpBackward(e,n,r){n=ensureFlags(n,`g`);for(var i=r.line,a=r.ch,o=e.firstLine();i>=o;i--,a=-1){var s=e.getLine(i),c=lastMatchIn(s,n,a<0?0:s.length-a);if(c)return{from:t(i,c.index),to:t(i,c.index+c[0].length),match:c}}}function searchRegexpBackwardMultiline(e,n,r){if(!maybeMultiline(n))return searchRegexpBackward(e,n,r);n=ensureFlags(n,`gm`);for(var i,a=1,o=e.getLine(r.line).length-r.ch,s=r.line,c=e.firstLine();s>=c;){for(var l=0;l<a&&s>=c;l++){var u=e.getLine(s--);i=i==null?u:u+`
28
+ `+i}a*=2;var d=lastMatchIn(i,n,o);if(d){var f=i.slice(0,d.index).split(`
29
+ `),m=d[0].split(`
30
+ `),h=s+f.length,g=f[f.length-1].length;return{from:t(h,g),to:t(h+m.length-1,m.length==1?g+m[0].length:m[m.length-1].length),match:d}}}}var doFold,noFold;String.prototype.normalize?(doFold=function(e){return e.normalize(`NFD`).toLowerCase()},noFold=function(e){return e.normalize(`NFD`)}):(doFold=function(e){return e.toLowerCase()},noFold=function(e){return e});function adjustPos(e,t,n,r){if(e.length==t.length)return n;for(var i=0,a=n+Math.max(0,e.length-t.length);;){if(i==a)return i;var o=i+a>>1,s=r(e.slice(0,o)).length;if(s==n)return o;s>n?a=o:i=o+1}}function searchStringForward(e,n,r,i){if(!n.length)return null;var a=i?doFold:noFold,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.lastLine()+1-o.length;s<=l;s++,c=0){var u=e.getLine(s).slice(c),d=a(u);if(o.length==1){var f=d.indexOf(o[0]);if(f==-1)continue search;var r=adjustPos(u,d,f,a)+c;return{from:t(s,adjustPos(u,d,f,a)+c),to:t(s,adjustPos(u,d,f+o[0].length,a)+c)}}else{var m=d.length-o[0].length;if(d.slice(m)!=o[0])continue search;for(var h=1;h<o.length-1;h++)if(a(e.getLine(s+h))!=o[h])continue search;var g=e.getLine(s+o.length-1),_=a(g),v=o[o.length-1];if(_.slice(0,v.length)!=v)continue search;return{from:t(s,adjustPos(u,d,m,a)+c),to:t(s+o.length-1,adjustPos(g,_,v.length,a))}}}}function searchStringBackward(e,n,r,i){if(!n.length)return null;var a=i?doFold:noFold,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.firstLine()-1+o.length;s>=l;s--,c=-1){var u=e.getLine(s);c>-1&&(u=u.slice(0,c));var d=a(u);if(o.length==1){var f=d.lastIndexOf(o[0]);if(f==-1)continue search;return{from:t(s,adjustPos(u,d,f,a)),to:t(s,adjustPos(u,d,f+o[0].length,a))}}else{var m=o[o.length-1];if(d.slice(0,m.length)!=m)continue search;for(var h=1,r=s-o.length+1;h<o.length-1;h++)if(a(e.getLine(r+h))!=o[h])continue search;var g=e.getLine(s+1-o.length),_=a(g);if(_.slice(_.length-o[0].length)!=o[0])continue search;return{from:t(s+1-o.length,adjustPos(g,_,g.length-o[0].length,a)),to:t(s,adjustPos(u,d,m.length,a))}}}}function SearchCursor(e,n,r,i){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,r=r?e.clipPos(r):t(0,0),this.pos={from:r,to:r};var a;typeof i==`object`?a=i.caseFold:(a=i,i=null),typeof n==`string`?(a??=!1,this.matches=function(t,r){return(t?searchStringBackward:searchStringForward)(e,n,r,a)}):(n=ensureFlags(n,`gm`),!i||i.multiline!==!1?this.matches=function(t,r){return(t?searchRegexpBackwardMultiline:searchRegexpForwardMultiline)(e,n,r)}:this.matches=function(t,r){return(t?searchRegexpBackward:searchRegexpForward)(e,n,r)})}SearchCursor.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var r=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=t(r.line,r.ch),n?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||``).length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||``).length&&(r.ch=0,r.line++)),e.cmpPos(r,this.doc.clipPos(r))!=0))return this.atOccurrence=!1;var i=this.matches(n,r);if(this.afterEmptyMatch=i&&e.cmpPos(i.from,i.to)==0,i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var a=t(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:a,to:a},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(i.length==1?this.pos.from.ch:0))}}},e.defineExtension(`getSearchCursor`,function(e,t,n){return new SearchCursor(this.doc,e,t,n)}),e.defineDocExtension(`getSearchCursor`,function(e,t,n){return new SearchCursor(this,e,t,n)}),e.defineExtension(`selectMatches`,function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor(`from`),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor(`to`))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})})),P=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d(),N(),j()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./searchcursor`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){"use strict";e.defineOption(`search`,{bottom:!1});function searchOverlay(e,t){return typeof e==`string`?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),t?`gi`:`g`):e.global||(e=new RegExp(e.source,e.ignoreCase?`gi`:`g`)),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,`searching`;n?t.pos=n.index:t.skipToEnd()}}}function SearchState(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function getSearchState(e){return e.state.search||(e.state.search=new SearchState)}function queryCaseInsensitive(e){return typeof e==`string`&&e==e.toLowerCase()}function getSearchCursor(e,t,n){return e.getSearchCursor(t,n,{caseFold:queryCaseInsensitive(t),multiline:!0})}function persistentDialog(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){clearSearch(e)},onKeyDown:i,bottom:e.options.search.bottom})}function dialog(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function confirmDialog(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function parseString(e){return e.replace(/\\([nrt\\])/g,function(e,t){return t==`n`?`
31
+ `:t==`r`?`\r`:t==`t`?` `:t==`\\`?`\\`:e})}function parseQuery(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf(`i`)==-1?``:`i`)}catch{}else e=parseString(e);return(typeof e==`string`?e==``:e.test(``))&&(e=/x^/),e}function startSearch(e,t,n){t.queryText=n,t.query=parseQuery(n),e.removeOverlay(t.overlay,queryCaseInsensitive(t.query)),t.overlay=searchOverlay(t.query,queryCaseInsensitive(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&=(t.annotate.clear(),null),t.annotate=e.showMatchesOnScrollbar(t.query,queryCaseInsensitive(t.query)))}function doSearch(t,n,r,i){var a=getSearchState(t);if(a.query)return findNext(t,n);var o=t.getSelection()||a.lastQuery;if(o instanceof RegExp&&o.source==`x^`&&(o=null),r&&t.openDialog){var s=null,searchNext=function(n,r){e.e_stop(r),n&&(n!=a.queryText&&(startSearch(t,a,n),a.posFrom=a.posTo=t.getCursor()),s&&(s.style.opacity=1),findNext(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(`.CodeMirror-dialog`))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,`window`).top&&((s=r).style.opacity=.4)}))};persistentDialog(t,getQueryDialog(t),o,searchNext,function(n,r){var i=e.keyName(n),a=t.getOption(`extraKeys`),o=a&&a[i]||e.keyMap[t.getOption(`keyMap`)][i];o==`findNext`||o==`findPrev`||o==`findPersistentNext`||o==`findPersistentPrev`?(e.e_stop(n),startSearch(t,getSearchState(t),r),t.execCommand(o)):(o==`find`||o==`findPersistent`)&&(e.e_stop(n),searchNext(r,n))}),i&&o&&(startSearch(t,a,o),findNext(t,n))}else dialog(t,getQueryDialog(t),`Search for:`,o,function(e){e&&!a.query&&t.operation(function(){startSearch(t,a,e),a.posFrom=a.posTo=t.getCursor(),findNext(t,n)})})}function findNext(t,n,r){t.operation(function(){var i=getSearchState(t),a=getSearchCursor(t,i.query,n?i.posFrom:i.posTo);!a.find(n)&&(a=getSearchCursor(t,i.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!a.find(n))||(t.setSelection(a.from(),a.to()),t.scrollIntoView({from:a.from(),to:a.to()},20),i.posFrom=a.from(),i.posTo=a.to(),r&&r(a.from(),a.to()))})}function clearSearch(e){e.operation(function(){var t=getSearchState(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&=(t.annotate.clear(),null))})}function el(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var a=arguments[i];n.appendChild(typeof a==`string`?document.createTextNode(a):a)}return n}function getQueryDialog(e){var t=el(`label`,{className:`CodeMirror-search-label`},e.phrase(`Search:`),el(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`,id:`CodeMirror-search-field`}));return t.setAttribute(`for`,`CodeMirror-search-field`),el(``,null,t,` `,el(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function getReplaceQueryDialog(e){return el(``,null,` `,el(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}),` `,el(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function getReplacementQueryDialog(e){return el(``,null,el(`span`,{className:`CodeMirror-search-label`},e.phrase(`With:`)),` `,el(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}))}function getDoReplaceConfirm(e){return el(``,null,el(`span`,{className:`CodeMirror-search-label`},e.phrase(`Replace?`)),` `,el(`button`,{},e.phrase(`Yes`)),` `,el(`button`,{},e.phrase(`No`)),` `,el(`button`,{},e.phrase(`All`)),` `,el(`button`,{},e.phrase(`Stop`)))}function replaceAll(e,t,n){e.operation(function(){for(var r=getSearchCursor(e,t);r.findNext();)if(typeof t!=`string`){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function replace(e,t){if(!e.getOption(`readOnly`)){var n=e.getSelection()||getSearchState(e).lastQuery,r=t?e.phrase(`Replace all:`):e.phrase(`Replace:`);dialog(e,el(``,null,el(`span`,{className:`CodeMirror-search-label`},r),getReplaceQueryDialog(e)),r,n,function(n){n&&(n=parseQuery(n),dialog(e,getReplacementQueryDialog(e),e.phrase(`Replace with:`),``,function(r){if(r=parseString(r),t)replaceAll(e,n,r);else{clearSearch(e);var i=getSearchCursor(e,n,e.getCursor(`from`)),advance=function(){var t=i.from(),a;!(a=i.findNext())&&(i=getSearchCursor(e,n),!(a=i.findNext())||t&&i.from().line==t.line&&i.from().ch==t.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),confirmDialog(e,getDoReplaceConfirm(e),e.phrase(`Replace?`),[function(){doReplace(a)},advance,function(){replaceAll(e,n,r)}]))},doReplace=function(e){i.replace(typeof n==`string`?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),advance()};advance()}}))})}}e.commands.find=function(e){clearSearch(e),doSearch(e)},e.commands.findPersistent=function(e){clearSearch(e),doSearch(e,!1,!0)},e.commands.findPersistentNext=function(e){doSearch(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){doSearch(e,!0,!0,!0)},e.commands.findNext=doSearch,e.commands.findPrev=function(e){doSearch(e,!0)},e.commands.clearSearch=clearSearch,e.commands.replace=replace,e.commands.replaceAll=function(e){replace(e,!0)}})})),F=__commonJSMin(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(d()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";var t=`CodeMirror-hint`,n=`CodeMirror-hint-active`;e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension(`showHint`,function(t){t=parseOptions(this,this.getCursor(`start`),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var r=0;r<n.length;r++)if(n[r].head.line!=n[r].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new Completion(this,t);i.options.hint&&(e.signal(this,`startCompletion`,this),i.update(!0))}}),e.defineExtension(`closeHint`,function(){this.state.completionActive&&this.state.completionActive.close()});function Completion(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor(`start`),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on(`cursorActivity`,this.activityFunc=function(){n.cursorActivity()})}}var r=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;Completion.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off(`cursorActivity`,this.activityFunc),this.widget&&this.data&&e.signal(this.data,`close`),this.widget&&this.widget.close(),e.signal(this.cm,`endCompletion`,this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation(function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(getText(r),r.from||t.from,r.to||t.to,`complete`),e.signal(t,`pick`,r),i.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&=(i(this.debounce),0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var a=this;this.debounce=r(function(){a.update()}),this.widget&&this.widget.disable()}},update:function(e){if(this.tick!=null){var t=this,n=++this.tick;fetchHints(this.options.hint,this.cm,this.options,function(r){t.tick==n&&t.finishUpdate(r,e)})}},finishUpdate:function(t,n){this.data&&e.signal(this.data,`update`);var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&t.list.length==1?this.pick(t,0):(this.widget=new Widget(this,t),e.signal(t,`shown`)))}};function parseOptions(e,t,n){var r=e.options.hintOptions,i={};for(var o in a)i[o]=a[o];if(r)for(var o in r)r[o]!==void 0&&(i[o]=r[o]);if(n)for(var o in n)n[o]!==void 0&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function getText(e){return typeof e==`string`?e:e.text}function buildKeyMap(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n[`Ctrl-P`]=function(){t.moveFocus(-1)},n[`Ctrl-N`]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function addBinding(e,r){i[e]=typeof r==`string`?n.hasOwnProperty(r)?n[r]:r:function(e){return r(e,t)}}if(r)for(var a in r)r.hasOwnProperty(a)&&addBinding(a,r[a]);var o=e.options.extraKeys;if(o)for(var a in o)o.hasOwnProperty(a)&&addBinding(a,o[a]);return i}function getHintElement(e,t){for(;t&&t!=e;){if(t.nodeName.toUpperCase()===`LI`&&t.parentNode==e)return t;t=t.parentNode}}function Widget(r,i){this.id=`cm-complete-`+Math.floor(Math.random(1e6)),this.completion=r,this.data=i,this.picked=!1;var a=this,o=r.cm,s=o.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,l=this.hints=s.createElement(`ul`);l.setAttribute(`role`,`listbox`),l.setAttribute(`aria-expanded`,`true`),l.id=this.id,l.className=`CodeMirror-hints `+r.cm.options.theme,this.selectedHint=i.selectedHint||0;for(var u=i.list,d=0;d<u.length;++d){var f=l.appendChild(s.createElement(`li`)),m=u[d],h=t+(d==this.selectedHint?` `+n:``);m.className!=null&&(h=m.className+` `+h),f.className=h,d==this.selectedHint&&f.setAttribute(`aria-selected`,`true`),f.id=this.id+`-`+d,f.setAttribute(`role`,`option`),m.render?m.render(f,i,m):f.appendChild(s.createTextNode(m.displayText||getText(m))),f.hintId=d}var g=r.options.container||s.body,_=o.cursorCoords(r.options.alignWithWord?i.from:null),v=_.left,y=_.bottom,b=!0,x=0,S=0;if(g!==s.body){var C=[`absolute`,`relative`,`fixed`].indexOf(c.getComputedStyle(g).position)===-1?g.offsetParent:g,w=C.getBoundingClientRect(),T=s.body.getBoundingClientRect();x=w.left-T.left-C.scrollLeft,S=w.top-T.top-C.scrollTop}l.style.left=v-x+`px`,l.style.top=y-S+`px`;var E=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),D=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);g.appendChild(l),o.getInputField().setAttribute(`aria-autocomplete`,`list`),o.getInputField().setAttribute(`aria-owns`,this.id),o.getInputField().setAttribute(`aria-activedescendant`,this.id+`-`+this.selectedHint);var O=r.options.moveOnOverlap?l.getBoundingClientRect():new DOMRect,k=r.options.paddingForScrollbar?l.scrollHeight>l.clientHeight+1:!1,A;if(setTimeout(function(){A=o.getScrollInfo()}),O.bottom-D>0){var j=O.bottom-O.top,M=O.top-(_.bottom-_.top)-2;D-O.top<M?(j>M&&(l.style.height=(j=M)+`px`),l.style.top=(y=_.top-j)-S+`px`,b=!1):l.style.height=D-O.top-2+`px`}var N=O.right-E;if(k&&(N+=o.display.nativeBarWidth),N>0&&(O.right-O.left>E&&(l.style.width=E-5+`px`,N-=O.right-O.left-E),l.style.left=(v=Math.max(_.left-N-x,0))+`px`),k)for(var P=l.firstChild;P;P=P.nextSibling)P.style.paddingRight=o.display.nativeBarWidth+`px`;if(o.addKeyMap(this.keyMap=buildKeyMap(r,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:u.length,close:function(){r.close()},pick:function(){a.pick()},data:i})),r.options.closeOnUnfocus){var F;o.on(`blur`,this.onBlur=function(){F=setTimeout(function(){r.close()},100)}),o.on(`focus`,this.onFocus=function(){clearTimeout(F)})}o.on(`scroll`,this.onScroll=function(){var e=o.getScrollInfo(),t=o.getWrapperElement().getBoundingClientRect();A||=o.getScrollInfo();var n=y+A.top-e.top,i=n-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(b||(i+=l.offsetHeight),i<=t.top||i>=t.bottom)return r.close();l.style.top=n+`px`,l.style.left=v+A.left-e.left+`px`}),e.on(l,`dblclick`,function(e){var t=getHintElement(l,e.target||e.srcElement);t&&t.hintId!=null&&(a.changeActive(t.hintId),a.pick())}),e.on(l,`click`,function(e){var t=getHintElement(l,e.target||e.srcElement);t&&t.hintId!=null&&(a.changeActive(t.hintId),r.options.completeOnSingleClick&&a.pick())}),e.on(l,`mousedown`,function(){setTimeout(function(){o.focus()},20)});var I=this.getSelectedHintRange();return(I.from!==0||I.to!==0)&&this.scrollToActive(),e.signal(i,`select`,u[this.selectedHint],l.childNodes[this.selectedHint]),!0}Widget.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute(`aria-activedescendant`),e.removeAttribute(`aria-owns`);var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off(`blur`,this.onBlur),t.off(`focus`,this.onFocus)),t.off(`scroll`,this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(` `+n,``),i.removeAttribute(`aria-selected`)),i=this.hints.childNodes[this.selectedHint=t],i.className+=` `+n,i.setAttribute(`aria-selected`,`true`),this.completion.cm.getInputField().setAttribute(`aria-activedescendant`,i.id),this.scrollToActive(),e.signal(this.data,`select`,this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}};function applicableHelpers(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function fetchHints(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function resolveAutoHints(t,n){var r=t.getHelpers(n,`hint`),i;if(r.length){var resolved=function(e,t,n){var i=applicableHelpers(e,r);function run(r){if(r==i.length)return t(null);fetchHints(i[r],e,n,function(e){e&&e.list.length>0?t(e):run(r+1)})}run(0)};return resolved.async=!0,resolved.supportsSelection=!0,resolved}else if(i=t.getHelper(t.getCursor(),`hintWords`))return function(t){return e.hint.fromList(t,{words:i})};else if(e.hint.anyword)return function(t,n){return e.hint.anyword(t,n)};else return function(){}}e.registerHelper(`hint`,`auto`,{resolve:resolveAutoHints}),e.registerHelper(`hint`,`fromList`,function(t,n){var r=t.getCursor(),i=t.getTokenAt(r),a,o=e.Pos(r.line,i.start),s=r;i.start<r.ch&&/\w/.test(i.string.charAt(r.ch-i.start-1))?a=i.string.substr(0,r.ch-i.start):(a=``,o=r);for(var c=[],l=0;l<n.words.length;l++){var u=n.words[l];u.slice(0,a.length)==a&&c.push(u)}if(c.length)return{list:c,from:o,to:s}}),e.commands.autocomplete=e.showHint;var a={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption(`hintOptions`,null)})}));j(),M(),N(),P(),F();var Editor=class extends t.HTMLWidget{_codemirror;_markedText=[];_initialText=``;options(){return{gutters:this.guttersOption(),readOnly:this.readOnly(),lineNumbers:!0,tabSize:2}}_options=new Map;option(e,t){if(this._codemirror)return arguments.length<2?this._codemirror.getOption(e):(this._codemirror.setOption(e,t),this);if(arguments.length<2)return this._options.get(e);this._options.set(e,t)}guttersOption(){let e=[`CodeMirror-linenumbers`];return this.gutterMarkerWidth()>0&&e.unshift({className:`CodeMirror-guttermarker`,style:`width:${this.gutterMarkerWidth()}px;`}),e}addGutterMarker(e,n,r=null,i=null,a=null,o=()=>{},s=()=>{},c=e=>{}){let l=this._codemirror.getLineHandle(e),u=document.createElement(`div`);u.textContent=n,u.style.paddingLeft=`3px`,u.style.paddingRight=`3px`,u.style.color=t.Palette.textColor(r),i!==null&&(u.style.fontFamily=i),a!==null&&(u.style.fontSize=a),u.style.backgroundColor=r,u.style.textAlign=this.markerTextAlign(),this._codemirror.setGutterMarker(l,`CodeMirror-guttermarker`,u),u.onmouseenter=o,u.onmouseleave=s,u.onclick=c}removeGutterMarker(e){let t=this._codemirror.getLineHandle(e);this._codemirror.setGutterMarker(t,`CodeMirror-guttermarker`,null)}hasFocus(){return this._codemirror.hasFocus()}text(e){if(this._codemirror){let t=this._codemirror.getDoc();return arguments.length?(t.setValue(e),this):t.getValue()}return arguments.length?(this._initialText=e,this):this._initialText}highlight(e,t,n=`cm-marked-text`){return typeof e==`number`&&(e=this.positionAt(e)),typeof t==`number`&&(t=this.positionAt(t)),this._codemirror&&this._markedText.push(this._codemirror.markText(e,t,{className:n})),this}highlightInfo(e,t){return this.highlight(e,t,`cm-marked-info`),this}highlightWarning(e,t){return this.highlight(e,t,`cm-marked-warning`),this}highlightError(e,t){return this.highlight(e,t,`cm-marked-error`),this}addLineClass(e){return this._codemirror.addLineClass(this._codemirror.getLineHandle(e.lineNum),e.where??`background`,e.cssClass),this}removeLineClass(e){return this._codemirror.removeLineClass(this._codemirror.getLineHandle(e.lineNum),e.where??`background`,e.cssClass),this}removeAllHighlight(){for(let e of this._markedText)e.clear();return this._markedText=[],this}positionAt(e){return this._codemirror.posFromIndex(e)}getLineLength(e){return this._codemirror.doc.getLine(e)?.length||0}highlightSubstring(e){let t=this.text().split(e).slice(0,-1),n=0;t.forEach(t=>{n+=t.length,this.highlight(this.positionAt(n),this.positionAt(n+e.length)),n+=e.length})}setCursor(e,t,n=!0){this._codemirror.setCursor(e,t),n&&setTimeout(()=>{this._codemirror.focus()},0)}enter(e,t){super.enter(e,t),this._codemirror=w.default.fromTextArea(t.append(`textarea`).node(),this.options()),this._codemirror.on(`changes`,(e,t)=>{this.changes(t)}),this._options.forEach((e,t)=>{this._codemirror.setOption(t,e)}),this.text(this._initialText)}update(e,t){super.update(e,t);let n=this._codemirror.getOption(`extraKeys`)??{};this.showHints()?n[`Ctrl-Space`]=`autocomplete`:delete n[`Ctrl-Space`],this._codemirror.setOption(`readOnly`,this.readOnly()),this._codemirror.setOption(`gutters`,this.guttersOption()),this._codemirror.setOption(`extraKeys`,n),this._codemirror.setOption(`hintOptions`,this.showHints()?{hint:(e,t)=>this.fetchHints(e,t)}:{}),this._codemirror.setSize(this.width()-2,this.height()-2),this._codemirror.refresh()}changes(e){}fetchHints(e,t){return Promise.resolve(null)}setOption(e,t){this._codemirror.setOption(e,t)}};Editor.prototype._class+=` codemirror_Editor`,Editor.prototype.publish(`markerTextAlign`,`right`,`string`,`Gutter marker text alignment`,[`left`,`center`,`right`]),Editor.prototype.publish(`readOnly`,!1,`boolean`,`If true, the contents will be uneditable`),Editor.prototype.publish(`gutterMarkerWidth`,0,`number`,`Width of gutter marker column displayed to the left of line numbers (pixels)`),Editor.prototype.publish(`showHints`,!1,`boolean`,`Show autocomplete hints on ctrl+space`);var CSSEditor=class extends Editor{options(){return{...super.options(),mode:`text/css`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}css(e){return arguments.length?(this.text(e),this):this.text()}};CSSEditor.prototype._class+=` codemirror_CSSEditor`;var DOTEditor=class extends Editor{options(){return{...super.options(),mode:`text/x-dot`}}dot(e){return arguments.length?(this.text(e),this):this.text()}};DOTEditor.prototype._class+=` codemirror_DOTEditor`;var ECLEditor=class extends Editor{options(){return{...super.options(),mode:`text/x-ecl`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}ecl(e){return arguments.length?(this.text(e),this):this.text()}};ECLEditor.prototype._class+=` codemirror_ECLEditor`;var HTMLEditor=class extends Editor{options(){return{...super.options(),mode:`htmlmixed`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}html(e){return arguments.length?(this.text(e),this):this.text()}};HTMLEditor.prototype._class+=` codemirror_HTMLEditor`;var JSEditor=class extends Editor{options(){return{...super.options(),mode:`text/javascript`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}javascript(e){return arguments.length?(this.text(e),this):this.text()}};JSEditor.prototype._class+=` codemirror_JSEditor`;var JSONEditor=class extends Editor{options(){return{...super.options(),mode:`application/json`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}json(e){return arguments.length?(this.text(JSON.stringify(e,null,` `)),this):JSON.parse(this.text())}};JSONEditor.prototype._class+=` codemirror_JSONEditor`;var MarkdownEditor=class extends Editor{options(){return{...super.options(),mode:`text/x-gfm`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}markdown(e){return arguments.length?(this.text(e),this):this.text()}};MarkdownEditor.prototype._class+=` codemirror_MarkdownEditor`;var ObservableMarkdownEditor=class extends MarkdownEditor{options(){return{...super.options(),mode:{name:`text/x-gfm`,defaultMode:`javascript`}}}};ObservableMarkdownEditor.prototype._class+=` codemirror_ObservableMarkdownEditor`;var XMLEditor=class extends Editor{options(){return{...super.options(),mode:`application/xml`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}xml(e){return arguments.length?(this.text(e),this):this.text()}};XMLEditor.prototype._class+=` codemirror_XMLEditor`;var SQLEditor=class extends Editor{options(){return{...super.options(),mode:`text/x-pgsql`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}sql(e){return arguments.length?(this.text(e),this):this.text()}};SQLEditor.prototype._class+=` codemirror_SQLEditor`;var YAMLEditor=class extends Editor{options(){return{...super.options(),mode:`text/x-yaml`,foldGutter:!0,gutters:[`CodeMirror-linenumbers`,`CodeMirror-foldgutter`]}}yaml(e){return arguments.length?(this.text(e),this):this.text()}};YAMLEditor.prototype._class+=` codemirror_YAMLEditor`,e.BUILD_VERSION=u,e.CSSEditor=CSSEditor,e.DOTEditor=DOTEditor,e.ECLEditor=ECLEditor,e.Editor=Editor,e.HTMLEditor=HTMLEditor,e.JSEditor=JSEditor,e.JSONEditor=JSONEditor,e.MarkdownEditor=MarkdownEditor,e.ObservableMarkdownEditor=ObservableMarkdownEditor,e.PKG_NAME=c,e.PKG_VERSION=l,e.SQLEditor=SQLEditor,e.XMLEditor=XMLEditor,e.YAMLEditor=YAMLEditor});
2
32
  //# sourceMappingURL=index.umd.cjs.map
3
- !function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode('.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;inset:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"▾"}.CodeMirror-foldgutter-folded:after{content:"▸"}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.codemirror_Editor{border-style:solid;border-width:1px;border-color:#d3d3d3}.codemirror_Editor .cm-marked-text{background-color:#ff0}.codemirror_Editor .cm-marked-info,.codemirror_Editor .cm-marked-error,.codemirror_Editor .cm-marked-warning{display:inline-block;position:relative;background-position:left bottom;background-repeat:repeat-x}.codemirror_Editor .cm-marked-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHElEQVQYV2NkgIP//xkYGBkZIXwIB0SDCQgHAgDEXAgCKU2DPwAAAABJRU5ErkJggg==)}.codemirror_Editor .cm-marked-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/DAz/GRkYGBlBfBgHTMM4MJUAzFoIAuwf4BEAAAAASUVORK5CYII=)}.codemirror_Editor .cm-marked-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/Sxn+M0YzMDKC+DAOmIZxYCoBKQkLp8ga+UwAAAAASUVORK5CYII=)}.codemirror_ECLEditor .cm-s-default span.cm-comment{color:green}.codemirror_ECLEditor .cm-s-default span.cm-keyword{color:#00f}.codemirror_ECLEditor .cm-s-default span.cm-variable{font-weight:700;color:navy}.codemirror_ECLEditor .cm-s-default span.cm-variable-2,.codemirror_ECLEditor .cm-s-default span.cm-variable-3{color:maroon}.codemirror_ECLEditor .cm-s-default span.cm-builtin{color:purple}.codemirror_ECLEditor .cm-s-default span.cm-string{color:gray}.codemirror_ECLEditor .cm-s-default span.cm-number,.cm-s-default span.cm-atom{color:#000}.codemirror_ECLEditor .cm-s-default span.cm-meta{color:#004080}.codemirror_ECLEditor .ErrorLine{background:#c00!important;color:#fff!important}.codemirror_ECLEditor .WarningLine{background:#ff9!important}.codemirror_ECLEditor .highlightline{background:#e8f2ff!important}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
33
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.CodeMirror{color:#000;direction:ltr;height:300px;font-family:monospace}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{white-space:nowrap;background-color:#f7f7f7;border-right:1px solid #ddd}.CodeMirror-linenumber{text-align:right;color:#999;white-space:nowrap;min-width:20px;padding:0 3px 0 5px}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;width:auto;border:0!important}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span::-moz-selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:#0000}@keyframes blink{0%{}50%{background-color:#0000}to{}}.cm-tab{-webkit-text-decoration:inherit;text-decoration:inherit;display:inline-block}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute;top:0;bottom:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;position:relative;overflow:hidden}.CodeMirror-scroll{z-index:0;outline:none;height:100%;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;position:relative;overflow:scroll!important}.CodeMirror-sizer{border-right:50px solid #0000;position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{z-index:6;outline:none;display:none;position:absolute}.CodeMirror-vscrollbar{top:0;right:0;overflow:hidden scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow:scroll hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{z-index:3;min-height:100%;position:absolute;top:0;left:0}.CodeMirror-gutter{white-space:normal;vertical-align:top;height:100%;margin-bottom:-50px;display:inline-block}.CodeMirror-gutter-wrapper{z-index:4;position:absolute;background:0 0!important;border:none!important}.CodeMirror-gutter-background{z-index:4;position:absolute;top:0;bottom:0}.CodeMirror-gutter-elt{cursor:default;z-index:4;position:absolute}.CodeMirror-gutter-wrapper ::selection{background-color:#0000}.CodeMirror-gutter-wrapper ::selection{background-color:#0000}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{font-family:inherit;font-size:inherit;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual;background:0 0;border-width:0;border-radius:0;margin:0;position:relative;overflow:visible}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{z-index:0;position:absolute;inset:0}.CodeMirror-linewidget{z-index:2;padding:.1px;position:relative}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{visibility:hidden;width:100%;height:0;position:absolute;overflow:hidden}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;z-index:3;position:relative}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection{background:#d7d4f0}.CodeMirror-line>span::selection{background:#d7d4f0}.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection{background:#d7d4f0}.CodeMirror-line>span::-moz-selection{background:#d7d4f0}.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-foldmarker{color:#00f;text-shadow:1px 1px 2px #b9f,-1px -1px 2px #b9f,1px -1px 2px #b9f,-1px 1px 2px #b9f;cursor:pointer;font-family:arial;line-height:.3}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"▾"}.CodeMirror-foldgutter-folded:after{content:"▸"}.CodeMirror-dialog{background:inherit;z-index:15;color:inherit;padding:.1em .8em;position:absolute;left:0;right:0;overflow:hidden}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{width:20em;color:inherit;background:0 0;border:none;outline:none;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{z-index:10;box-sizing:border-box;background:#fff;border:1px solid silver;border-radius:3px;max-height:20em;margin:0;padding:2px;font-family:monospace;font-size:90%;list-style:none;position:absolute;overflow:hidden auto;box-shadow:2px 3px 5px #0003}.CodeMirror-hint{white-space:pre;color:#000;cursor:pointer;border-radius:2px;margin:0;padding:0 4px}li.CodeMirror-hint-active{color:#fff;background:#08f}.codemirror_Editor{border:1px solid #d3d3d3}.codemirror_Editor .cm-marked-text{background-color:#ff0}.codemirror_Editor .cm-marked-info,.codemirror_Editor .cm-marked-error,.codemirror_Editor .cm-marked-warning{background-position:0 100%;background-repeat:repeat-x;display:inline-block;position:relative}.codemirror_Editor .cm-marked-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHElEQVQYV2NkgIP//xkYGBkZIXwIB0SDCQgHAgDEXAgCKU2DPwAAAABJRU5ErkJggg==)}.codemirror_Editor .cm-marked-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/DAz/GRkYGBlBfBgHTMM4MJUAzFoIAuwf4BEAAAAASUVORK5CYII=)}.codemirror_Editor .cm-marked-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/Sxn+M0YzMDKC+DAOmIZxYCoBKQkLp8ga+UwAAAAASUVORK5CYII=)}.codemirror_ECLEditor .cm-s-default span.cm-comment{color:green}.codemirror_ECLEditor .cm-s-default span.cm-keyword{color:#00f}.codemirror_ECLEditor .cm-s-default span.cm-variable{color:navy;font-weight:700}.codemirror_ECLEditor .cm-s-default span.cm-variable-2,.codemirror_ECLEditor .cm-s-default span.cm-variable-3{color:maroon}.codemirror_ECLEditor .cm-s-default span.cm-builtin{color:purple}.codemirror_ECLEditor .cm-s-default span.cm-string{color:gray}.codemirror_ECLEditor .cm-s-default span.cm-number,.cm-s-default span.cm-atom{color:#000}.codemirror_ECLEditor .cm-s-default span.cm-meta{color:#004080}.codemirror_ECLEditor .ErrorLine{color:#fff!important;background:#c00!important}.codemirror_ECLEditor .WarningLine{background:#ff9!important}.codemirror_ECLEditor .highlightline{background:#e8f2ff!important}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();