blob: 28ffcbccac52a5a4e62f4c3b62102bcf5f9f6c13 [file] [log] [blame]
import{c as Lu,d as Tu,g as Au}from"./utils-a5e1dbae-143be013.js";import{g as wl,j as Ou,o as Sl,O as Nu,i as Pu,K as Du,k as Mu,I as cl,c as Fu}from"./app-9073a2e6.js";var Cl={exports:{}};(function(ze,Ge){(function(b,K){ze.exports=K()})(Lu,function(){var b=navigator.userAgent,K=navigator.platform,R=/gecko\/\d/i.test(b),V=/MSIE \d/.test(b),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),B=/Edge\/(\d+)/.exec(b),I=V||$||B,X=I&&(V?document.documentMode||6:+(B||$)[1]),A=!B&&/WebKit\//.test(b),H=A&&/Qt\/\d+\.\d+/.test(b),C=!B&&/Chrome\/(\d+)/.exec(b),D=C&&+C[1],W=/Opera\//.test(b),J=/Apple Computer/.test(navigator.vendor),M=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(b),w=/PhantomJS/.test(b),v=J&&(/Mobile\/\w+/.test(b)||navigator.maxTouchPoints>2),g=/Android/.test(b),u=v||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(b),p=v||/Mac/.test(K),m=/\bCrOS\b/.test(b),k=/win/i.test(K),d=W&&b.match(/Version\/(\d*\.\d*)/);d&&(d=Number(d[1])),d&&d>=15&&(W=!1,A=!0);var L=p&&(H||W&&(d==null||d<12.11)),F=R||I&&X>=9;function N(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var U=function(e,t){var n=e.className,r=N(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 O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function _(e,t){return O(e).appendChild(t)}function c(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 o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Z(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var Y;document.createRange?Y=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:Y=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 re(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 ue(e){var t;try{t=e.activeElement}catch{t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function fe(e,t){var n=e.className;N(t).test(n)||(e.className+=(n?" ":"")+t)}function Ce(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!N(n[r]).test(t)&&(t+=" "+n[r]);return t}var Ie=function(e){e.select()};v?Ie=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:I&&(Ie=function(e){try{e.select()}catch{}});function Te(e){return e.display.wrapper.ownerDocument}function Qe(e){return Te(e).defaultView}function qe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function pe(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function ce(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}var ye=function(){this.id=null,this.f=null,this.time=0,this.handler=qe(this.onTimeout,this)};ye.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ye.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 ke(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var we=50,me={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},Bt={origin:"*mouse"},Ht={origin:"+move"};function Lt(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(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,i+=n-i%n,r=o+1,i>=t)return r}}var Oe=[""];function je(e){for(;Oe.length<=e;)Oe.push(be(Oe)+" ");return Oe[e]}function be(e){return e[e.length-1]}function kt(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function mr(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function Fe(){}function z(e,t){var n;return Object.create?n=Object.create(e):(Fe.prototype=e,n=new Fe),t&&pe(t,n),n}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function j(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&j(e)?!0:t.test(e):j(e)}function ft(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Pr=/[\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 $r(e){return e.charCodeAt(0)>=768&&Pr.test(e)}function zt(e,t,n){for(;(n<0?t>0:t<e.length)&&$r(e.charAt(t));)t+=n;return t}function Re(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 yr(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),a.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var Rt=null;function Ot(e,t,n){var r;Rt=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&&n=="before"?r=i:Rt=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:Rt=i)}return r??Rt}var vi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(f,y,x){this.level=f,this.from=y,this.to=x}return function(f,y){var x=y=="ltr"?"L":"R";if(f.length==0||y=="ltr"&&!r.test(f))return!1;for(var E=f.length,P=[],q=0;q<E;++q)P.push(n(f.charCodeAt(q)));for(var Q=0,ee=x;Q<E;++Q){var ne=P[Q];ne=="m"?P[Q]=ee:ee=ne}for(var ae=0,ie=x;ae<E;++ae){var le=P[ae];le=="1"&&ie=="r"?P[ae]="n":o.test(le)&&(ie=le,le=="r"&&(P[ae]="R"))}for(var de=1,he=P[0];de<E-1;++de){var xe=P[de];xe=="+"&&he=="1"&&P[de+1]=="1"?P[de]="1":xe==","&&he==P[de+1]&&(he=="1"||he=="n")&&(P[de]=he),he=xe}for(var Me=0;Me<E;++Me){var rt=P[Me];if(rt==",")P[Me]="N";else if(rt=="%"){var He=void 0;for(He=Me+1;He<E&&P[He]=="%";++He);for(var Ct=Me&&P[Me-1]=="!"||He<E&&P[He]=="1"?"1":"N",yt=Me;yt<He;++yt)P[yt]=Ct;Me=He-1}}for(var Ye=0,bt=x;Ye<E;++Ye){var ot=P[Ye];bt=="L"&&ot=="1"?P[Ye]="L":o.test(ot)&&(bt=ot)}for(var Ve=0;Ve<E;++Ve)if(i.test(P[Ve])){var Ze=void 0;for(Ze=Ve+1;Ze<E&&i.test(P[Ze]);++Ze);for(var _e=(Ve?P[Ve-1]:x)=="L",xt=(Ze<E?P[Ze]:x)=="L",Jr=_e==xt?_e?"L":"R":x,gr=Ve;gr<Ze;++gr)P[gr]=Jr;Ve=Ze-1}for(var ut=[],jt,nt=0;nt<E;)if(a.test(P[nt])){var uo=nt;for(++nt;nt<E&&a.test(P[nt]);++nt);ut.push(new s(0,uo,nt))}else{var nr=nt,Or=ut.length,Nr=y=="rtl"?1:0;for(++nt;nt<E&&P[nt]!="L";++nt);for(var pt=nr;pt<nt;)if(l.test(P[pt])){nr<pt&&(ut.splice(Or,0,new s(1,nr,pt)),Or+=Nr);var Vr=pt;for(++pt;pt<nt&&l.test(P[pt]);++pt);ut.splice(Or,0,new s(2,Vr,pt)),Or+=Nr,nr=pt}else++pt;nr<nt&&ut.splice(Or,0,new s(1,nr,nt))}return y=="ltr"&&(ut[0].level==1&&(jt=f.match(/^\s+/))&&(ut[0].from=jt[0].length,ut.unshift(new s(0,0,jt[0].length))),be(ut).level==1&&(jt=f.match(/\s+$/))&&(be(ut).to-=jt[0].length,ut.push(new s(0,E-jt[0].length,E)))),y=="rtl"?ut.reverse():ut}}();function Nt(e,t){var n=e.order;return n==null&&(n=e.order=vi(e.text,t)),n}var Fn=[],oe=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]||Fn).concat(n)}};function en(e,t){return e._handlers&&e._handlers[t]||Fn}function at(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=ke(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ee(e,t){var n=en(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 Ke(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ee(e,n||t.type,e,t),tn(t)||t.codemirrorIgnore}function En(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)ke(n,t[r])==-1&&n.push(t[r])}function ct(e,t){return en(e,t).length>0}function ht(e){e.prototype.on=function(t,n){oe(this,t,n)},e.prototype.off=function(t,n){at(this,t,n)}}function lt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function br(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function tn(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Yt(e){lt(e),br(e)}function vt(e){return e.target||e.srcElement}function rn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),p&&e.ctrlKey&&t==1&&(t=3),t}var gi=function(){if(I&&X<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),Pt;function mi(e){if(Pt==null){var t=c("span","​");_(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(I&&X<8))}var n=Pt?c("span","​"):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var Dr;function Wn(e){if(Dr!=null)return Dr;var t=_(e,document.createTextNode("AخA")),n=Y(t,0,1).getBoundingClientRect(),r=Y(t,1,2).getBoundingClientRect();return O(e),!n||n.left==n.right?!1:Dr=r.right-n.right<3}var nn=`
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(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/)},ir=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},Kt=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ut=null;function In(e){if(Ut!=null)return Ut;var t=_(e,c("span","x")),n=t.getBoundingClientRect(),r=Y(t,0,1).getBoundingClientRect();return Ut=Math.abs(n.left-r.left)>1}var Mt={},or={};function Bn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Mt[e]=t}function Mr(e,t){or[e]=t}function wt(e){if(typeof e=="string"&&or.hasOwnProperty(e))e=or[e];else if(e&&typeof e.name=="string"&&or.hasOwnProperty(e.name)){var t=or[e.name];typeof t=="string"&&(t={name:t}),e=z(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return wt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return wt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Zt(e,t){t=wt(t);var n=Mt[t.name];if(!n)return Zt(e,"text/plain");var r=n(e,t);if(ar.hasOwnProperty(t.name)){var i=ar[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var ar={};function Hn(e,t){var n=ar.hasOwnProperty(e)?ar[e]:ar[e]={};pe(t,n)}function Qt(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 lr(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 on(e,t,n){return e.startState?e.startState(t,n):!0}var Ue=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};Ue.prototype.eol=function(){return this.pos>=this.string.length},Ue.prototype.sol=function(){return this.pos==this.lineStart},Ue.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ue.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ue.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Ue.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ue.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ue.prototype.skipToEnd=function(){this.pos=this.string.length},Ue.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ue.prototype.backUp=function(e){this.pos-=e},Ue.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.indentation=function(){return ce(this.string,null,this.tabSize)-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(a){return n?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Ue.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ue.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ue.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ue.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function se(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Jt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var a=o.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function Fr(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Dt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ne(e){if(e.parent==null)return null;for(var t=e.parent,n=ke(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 _t(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],s=l.height;if(t<s)break;t-=s}return n+a}function h(e,t){return t>=e.first&&t<e.first+e.size}function S(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function T(e,t,n){if(n===void 0&&(n=null),!(this instanceof T))return new T(e,t,n);this.line=e,this.ch=t,this.sticky=n}function G(e,t){return e.line-t.line||e.ch-t.ch}function ve(e,t){return e.sticky==t.sticky&&G(e,t)==0}function Le(e){return T(e.line,e.ch)}function Ae(e,t){return G(e,t)<0?t:e}function Je(e,t){return G(e,t)<0?e:t}function Tt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.line<e.first)return T(e.first,0);var n=e.first+e.size-1;return t.line>n?T(n,se(e,n).text.length):Tl(t,se(e,t.line).text.length)}function Tl(e,t){var n=e.ch;return n==null||n>t?T(e.line,t):n<0?T(e.line,0):e}function ho(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ge(e,t[r]);return n}var zn=function(e,t){this.state=e,this.lookAhead=t},Gt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Gt.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}},Gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Gt.fromSaved=function(e,t,n){return t instanceof zn?new Gt(e,Qt(e.mode,t.state),n,t.lookAhead):new Gt(e,Qt(e.mode,t),n)},Gt.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(t,this.maxLookAhead):t};function po(e,t,n,r){var i=[e.state.modeGen],o={};xo(e,t.text,e.doc.mode,n,function(f,y){return i.push(f,y)},o,r);for(var a=n.state,l=function(f){n.baseTokens=i;var y=e.state.overlays[f],x=1,E=0;n.state=!0,xo(e,t.text,y.mode,n,function(P,q){for(var Q=x;E<P;){var ee=i[x];ee>P&&i.splice(x,1,P,i[x+1],ee),x+=2,E=Math.min(P,ee)}if(q)if(y.opaque)i.splice(Q,x-Q,P,"overlay "+q),x=Q+2;else for(;Q<x;Q+=2){var ne=i[Q+1];i[Q+1]=(ne?ne+" ":"")+"overlay "+q}},o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=an(e,Ne(t)),i=t.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,r.state),o=po(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 an(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Gt(r,!0,t);var o=Al(e,t,n),a=o>r.first&&se(r,o-1).stateAfter,l=a?Gt.fromSaved(r,a,o):new Gt(r,on(r.mode),o);return r.iter(o,t,function(s){yi(e,s.text,l);var f=l.line;s.stateAfter=f==t-1||f%5==0||f>=i.viewFrom&&f<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function yi(e,t,n,r){var i=e.doc.mode,o=new Ue(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&go(i,n.state);!o.eol();)bi(i,o,n.state),o.start=o.pos}function go(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=lr(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function bi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=lr(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.")}var mo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yo(e,t,n,r){var i=e.doc,o=i.mode,a;t=ge(i,t);var l=se(i,t.line),s=an(e,t.line,n),f=new Ue(l.text,e.options.tabSize,s),y;for(r&&(y=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,a=bi(o,f,s.state),r&&y.push(new mo(f,a,Qt(i.mode,s.state)));return r?y:new mo(f,a,s.state)}function bo(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]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xo(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,f=null,y=new Ue(t,e.options.tabSize,r),x,E=e.options.addModeClass&&[null];for(t==""&&bo(go(n,r.state),o);!y.eol();){if(y.pos>e.options.maxHighlightLength?(l=!1,a&&yi(e,t,r,y.pos),y.pos=t.length,x=null):x=bo(bi(n,y,r.state,E),o),E){var P=E[0].name;P&&(x="m-"+(x?P+" "+x:P))}if(!l||f!=x){for(;s<y.start;)s=Math.min(y.start,s+5e3),i(s,f);f=x}y.start=y.pos}for(;s<y.pos;){var q=Math.min(y.pos,s+5e3);i(q,f),s=q}}function Al(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=se(o,l-1),f=s.stateAfter;if(f&&(!n||l+(f instanceof zn?f.lookAhead:0)<=o.modeFrontier))return l;var y=ce(s.text,null,e.options.tabSize);(i==null||r>y)&&(i=l-1,r=y)}return i}function Ol(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=se(e,r).stateAfter;if(i&&(!(i instanceof zn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var ko=!1,Vt=!1;function Nl(){ko=!0}function Pl(){Vt=!0}function Rn(e,t,n){this.marker=e,this.from=t,this.to=n}function ln(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Dl(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ml(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 Fl(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Rn(a,o.from,s?null:o.to))}}return r}function El(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Rn(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function xi(e,t){if(t.full)return null;var n=h(e,t.from.line)&&se(e,t.from.line).markedSpans,r=h(e,t.to.line)&&se(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=G(t.from,t.to)==0,l=Fl(n,i,a),s=El(r,o,a),f=t.text.length==1,y=be(t.text).length+(f?i:0);if(l)for(var x=0;x<l.length;++x){var E=l[x];if(E.to==null){var P=ln(s,E.marker);P?f&&(E.to=P.to==null?null:P.to+y):E.to=i}}if(s)for(var q=0;q<s.length;++q){var Q=s[q];if(Q.to!=null&&(Q.to+=y),Q.from==null){var ee=ln(l,Q.marker);ee||(Q.from=y,f&&(l||(l=[])).push(Q))}else Q.from+=y,f&&(l||(l=[])).push(Q)}l&&(l=wo(l)),s&&s!=l&&(s=wo(s));var ne=[l];if(!f){var ae=t.text.length-2,ie;if(ae>0&&l)for(var le=0;le<l.length;++le)l[le].to==null&&(ie||(ie=[])).push(new Rn(l[le].marker,null,null));for(var de=0;de<ae;++de)ne.push(ie);ne.push(s)}return ne}function wo(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 Wl(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(P){if(P.markedSpans)for(var q=0;q<P.markedSpans.length;++q){var Q=P.markedSpans[q].marker;Q.readOnly&&(!r||ke(r,Q)==-1)&&(r||(r=[])).push(Q)}}),!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 f=i[s];if(!(G(f.to,l.from)<0||G(f.from,l.to)>0)){var y=[s,1],x=G(f.from,l.from),E=G(f.to,l.to);(x<0||!a.inclusiveLeft&&!x)&&y.push({from:f.from,to:l.from}),(E>0||!a.inclusiveRight&&!E)&&y.push({from:l.to,to:f.to}),i.splice.apply(i,y),s+=y.length-3}}return i}function So(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Co(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Kn(e){return e.inclusiveLeft?-1:0}function Un(e){return e.inclusiveRight?1:0}function ki(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=G(r.from,i.from)||Kn(e)-Kn(t);if(o)return-o;var a=G(r.to,i.to)||Un(e)-Un(t);return a||t.id-e.id}function Lo(e,t){var n=Vt&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||ki(r,i.marker)<0)&&(r=i.marker);return r}function To(e){return Lo(e,!0)}function _n(e){return Lo(e,!1)}function Il(e,t){var n=Vt&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||ki(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=se(e,t),a=Vt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var f=s.marker.find(0),y=G(f.from,n)||Kn(s.marker)-Kn(i),x=G(f.to,r)||Un(s.marker)-Un(i);if(!(y>=0&&x<=0||y<=0&&x>=0)&&(y<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?G(f.to,n)>=0:G(f.to,n)>0)||y>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?G(f.from,r)<=0:G(f.from,r)<0)))return!0}}}function Ft(e){for(var t;t=To(e);)e=t.find(-1,!0).line;return e}function Bl(e){for(var t;t=_n(e);)e=t.find(1,!0).line;return e}function Hl(e){for(var t,n;t=_n(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function wi(e,t){var n=se(e,t),r=Ft(n);return n==r?t:Ne(r)}function Oo(e,t){if(t>e.lastLine())return t;var n=se(e,t),r;if(!sr(e,n))return t;for(;r=_n(n);)n=r.find(1,!0).line;return Ne(n)+1}function sr(e,t){var n=Vt&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Si(e,t,r))return!0}}}function Si(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Si(e,r.line,ln(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],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Si(e,t,i))return!0}function $t(e){e=Ft(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 o=n.parent;o;n=o,o=n.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 Gn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=To(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=_n(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Ci(e){var t=e.display,n=e.doc;t.maxLine=se(n,n.first),t.maxLineLength=Gn(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Gn(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Er=function(e,t,n){this.text=e,Co(this,t),this.height=n?n(this):1};Er.prototype.lineNo=function(){return Ne(this)},ht(Er);function zl(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),So(e),Co(e,n);var i=r?r(e):1;i!=e.height&&Dt(e,i)}function Rl(e){e.parent=null,So(e)}var Kl={},Ul={};function No(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ul:Kl;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Po(e,t){var n=Z("span",null,null,A?"padding-right: .1px":null),r={pre:Z("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=Gl,Wn(e.display.measure)&&(a=Nt(o,e.doc.direction))&&(r.addToken=Xl(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&Ne(o);jl(o,r,vo(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Ce(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Ce(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(mi(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(A){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 Ee(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ce(r.pre.className,r.textClass||"")),r}function _l(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Gl(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?ql(t,e.trailingSpace):t,s=e.cm.state.specialChars,f=!1,y;if(!s.test(t))e.col+=t.length,y=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,y),I&&X<9&&(f=!0),e.pos+=t.length;else{y=document.createDocumentFragment();for(var x=0;;){s.lastIndex=x;var E=s.exec(t),P=E?E.index-x:t.length-x;if(P){var q=document.createTextNode(l.slice(x,x+P));I&&X<9?y.appendChild(c("span",[q])):y.appendChild(q),e.map.push(e.pos,e.pos+P,q),e.col+=P,e.pos+=P}if(!E)break;x+=P+1;var Q=void 0;if(E[0]==" "){var ee=e.cm.options.tabSize,ne=ee-e.col%ee;Q=y.appendChild(c("span",je(ne),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=ne}else E[0]=="\r"||E[0]==`
`?(Q=y.appendChild(c("span",E[0]=="\r"?"␍":"␤","cm-invalidchar")),Q.setAttribute("cm-text",E[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(E[0]),Q.setAttribute("cm-text",E[0]),I&&X<9?y.appendChild(c("span",[Q])):y.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||f||o||a){var ae=n||"";r&&(ae+=r),i&&(ae+=i);var ie=c("span",[y],ae,o);if(a)for(var le in a)a.hasOwnProperty(le)&&le!="style"&&le!="class"&&ie.setAttribute(le,a[le]);return e.content.appendChild(ie)}e.content.appendChild(y)}}function ql(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||e.charCodeAt(i+1)==32)&&(o=" "),r+=o,n=o==" "}return r}function Xl(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var f=n.pos,y=f+r.length;;){for(var x=void 0,E=0;E<t.length&&(x=t[E],!(x.to>f&&x.from<=f));E++);if(x.to>=y)return e(n,r,i,o,a,l,s);e(n,r.slice(0,x.to-f),i,o,null,l,s),o=null,r=r.slice(x.to-f),f=x.to}}}function Do(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 jl(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;a<n.length;a+=2)t.addToken(t,i.slice(o,o=n[a]),No(n[a+1],t.cm.options));return}for(var l=i.length,s=0,f=1,y="",x,E,P=0,q,Q,ee,ne,ae;;){if(P==s){q=Q=ee=E="",ae=null,ne=null,P=1/0;for(var ie=[],le=void 0,de=0;de<r.length;++de){var he=r[de],xe=he.marker;if(xe.type=="bookmark"&&he.from==s&&xe.widgetNode)ie.push(xe);else if(he.from<=s&&(he.to==null||he.to>s||xe.collapsed&&he.to==s&&he.from==s)){if(he.to!=null&&he.to!=s&&P>he.to&&(P=he.to,Q=""),xe.className&&(q+=" "+xe.className),xe.css&&(E=(E?E+";":"")+xe.css),xe.startStyle&&he.from==s&&(ee+=" "+xe.startStyle),xe.endStyle&&he.to==P&&(le||(le=[])).push(xe.endStyle,he.to),xe.title&&((ae||(ae={})).title=xe.title),xe.attributes)for(var Me in xe.attributes)(ae||(ae={}))[Me]=xe.attributes[Me];xe.collapsed&&(!ne||ki(ne.marker,xe)<0)&&(ne=he)}else he.from>s&&P>he.from&&(P=he.from)}if(le)for(var rt=0;rt<le.length;rt+=2)le[rt+1]==P&&(Q+=" "+le[rt]);if(!ne||ne.from==s)for(var He=0;He<ie.length;++He)Do(t,0,ie[He]);if(ne&&(ne.from||0)==s){if(Do(t,(ne.to==null?l+1:ne.to)-s,ne.marker,ne.from==null),ne.to==null)return;ne.to==s&&(ne=!1)}}if(s>=l)break;for(var Ct=Math.min(l,P);;){if(y){var yt=s+y.length;if(!ne){var Ye=yt>Ct?y.slice(0,Ct-s):y;t.addToken(t,Ye,x?x+q:q,ee,s+Ye.length==P?Q:"",E,ae)}if(yt>=Ct){y=y.slice(Ct-s),s=Ct;break}s=yt,ee=""}y=i.slice(o,o=n[f++]),x=No(n[f++],t.cm.options)}}}function Mo(e,t,n){this.line=t,this.rest=Hl(t),this.size=this.rest?Ne(be(this.rest))-n+1:1,this.node=this.text=null,this.hidden=sr(e,t)}function qn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new Mo(e.doc,se(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Wr=null;function Yl(e){Wr?Wr.ops.push(e):e.ownsGroup=Wr={ops:[e],delayedCallbacks:[]}}function Zl(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 Ql(e,t){var n=e.ownsGroup;if(n)try{Zl(n)}finally{Wr=null,t(n)}}var sn=null;function $e(e,t){var n=en(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Wr?i=Wr.delayedCallbacks:sn?i=sn:(i=sn=[],setTimeout(Jl,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function Jl(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function Fo(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?$l(e,t):o=="gutter"?Wo(e,t,n,r):o=="class"?Li(e,t):o=="widget"&&es(e,t,r)}t.changes=null}function un(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),I&&X<8&&(e.node.style.zIndex=2)),e.node}function Vl(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=un(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Eo(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Po(e,t)}function $l(e,t){var n=t.text.className,r=Eo(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,Li(e,t)):n&&(t.text.className=n)}function Li(e,t){Vl(e,t),t.line.wrapClass?un(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 Wo(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=un(t);t.gutterBackground=c("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=un(t),l=t.gutter=c("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(c("div",S(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 f=e.display.gutterSpecs[s].className,y=o.hasOwnProperty(f)&&o[f];y&&l.appendChild(c("div",[y],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}function es(e,t,n){t.alignable&&(t.alignable=null);for(var r=N("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Io(e,t,n)}function ts(e,t,n,r){var i=Eo(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Li(e,t),Wo(e,t,n,r),Io(e,t,r),t.node}function Io(e,t,n){if(Bo(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Bo(e,t.rest[r],t,n,!1)}function Bo(e,t,n,r,i){if(t.widgets)for(var o=un(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],f=c("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),rs(s,f,n,r),e.display.input.setUneditable(f),i&&s.above?o.insertBefore(f,n.gutter||n.text):o.appendChild(f),$e(s,"redraw")}}function rs(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 fn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!re(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;"),_(t.display.measure,c("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function er(e,t){for(var n=vt(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 Xn(e){return e.lineSpace.offsetTop}function Ti(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ho(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=_(e.measure,c("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 qt(e){return we-e.display.nativeBarWidth}function xr(e){return e.display.scroller.clientWidth-qt(e)-e.display.barWidth}function Ai(e){return e.display.scroller.clientHeight-qt(e)-e.display.barHeight}function ns(e,t,n){var r=e.options.lineWrapping,i=r&&xr(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],f=a[l+1];Math.abs(s.bottom-f.bottom)>2&&o.push((s.bottom+f.top)/2-n.top)}}o.push(n.bottom-n.top)}}function zo(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(Ne(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function is(e,t){t=Ft(t);var n=Ne(t),r=e.display.externalMeasured=new Mo(e.doc,t,n);r.lineN=n;var i=r.built=Po(e,r);return r.text=i.pre,_(e.display.lineMeasure,i.pre),r}function Ro(e,t,n,r){return Xt(e,Ir(e,t),n,r)}function Oi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Sr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Ir(e,t){var n=Ne(t),r=Oi(e,n);r&&!r.text?r=null:r&&r.changes&&(Fo(e,r,n,Fi(e)),e.curOp.forceUpdate=!0),r||(r=is(e,t));var i=zo(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Xt(e,t,n,r,i){t.before&&(n=-1);var o=n+(r||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ns(e,t.view,t.rect),t.hasHeights=!0),a=as(e,t,n,r),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Ko={left:0,right:0,top:0,bottom:0};function Uo(e,t,n){for(var r,i,o,a,l,s,f=0;f<e.length;f+=3)if(l=e[f],s=e[f+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(f==e.length-3||t==s&&e[f+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(r=e[f+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),n=="left"&&i==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],a="left";if(n=="right"&&i==s-l)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)r=e[(f+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function os(e,t){var n=Ko;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 as(e,t,n,r){var i=Uo(t.map,n,r),o=i.node,a=i.start,l=i.end,s=i.collapse,f;if(o.nodeType==3){for(var y=0;y<4;y++){for(;a&&$r(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&$r(t.line.text.charAt(i.coverStart+l));)++l;if(I&&X<9&&a==0&&l==i.coverEnd-i.coverStart?f=o.parentNode.getBoundingClientRect():f=os(Y(o,a,l).getClientRects(),r),f.left||f.right||a==0)break;l=a,a=a-1,s="right"}I&&X<11&&(f=ls(e.display.measure,f))}else{a>0&&(s=r="right");var x;e.options.lineWrapping&&(x=o.getClientRects()).length>1?f=x[r=="right"?x.length-1:0]:f=o.getBoundingClientRect()}if(I&&X<9&&!a&&(!f||!f.left&&!f.right)){var E=o.parentNode.getClientRects()[0];E?f={left:E.left,right:E.left+Hr(e.display),top:E.top,bottom:E.bottom}:f=Ko}for(var P=f.top-t.rect.top,q=f.bottom-t.rect.top,Q=(P+q)/2,ee=t.view.measure.heights,ne=0;ne<ee.length-1&&!(Q<ee[ne]);ne++);var ae=ne?ee[ne-1]:0,ie=ee[ne],le={left:(s=="right"?f.right:f.left)-t.rect.left,right:(s=="left"?f.left:f.right)-t.rect.left,top:ae,bottom:ie};return!f.left&&!f.right&&(le.bogus=!0),e.options.singleCursorHeightPerLine||(le.rtop=P,le.rbottom=q),le}function ls(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!In(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 _o(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 Go(e){e.display.externalMeasure=null,O(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)_o(e.display.view[t])}function cn(e){Go(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function qo(e){return C&&g?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Xo(e){return C&&g?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Ni(e){var t=Ft(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=fn(n[i]));return r}function jn(e,t,n,r,i){if(!i){var o=Ni(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var a=$t(t);if(r=="local"?a+=Xn(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:Xo(Te(e)));var s=l.left+(r=="window"?0:qo(Te(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function jo(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=qo(Te(e)),i-=Xo(Te(e));else if(n=="local"||!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 Yn(e,t,n,r,i){return r||(r=se(e.doc,t.line)),jn(e,r,Ro(e,r,t.ch,i),n)}function Et(e,t,n,r,i,o){r=r||se(e.doc,t.line),i||(i=Ir(e,r));function a(q,Q){var ee=Xt(e,i,q,Q?"right":"left",o);return Q?ee.left=ee.right:ee.right=ee.left,jn(e,r,ee,n)}var l=Nt(r,e.doc.direction),s=t.ch,f=t.sticky;if(s>=r.text.length?(s=r.text.length,f="before"):s<=0&&(s=0,f="after"),!l)return a(f=="before"?s-1:s,f=="before");function y(q,Q,ee){var ne=l[Q],ae=ne.level==1;return a(ee?q-1:q,ae!=ee)}var x=Ot(l,s,f),E=Rt,P=y(s,x,f=="before");return E!=null&&(P.other=y(s,E,f!="before")),P}function Yo(e,t){var n=0;t=ge(e.doc,t),e.options.lineWrapping||(n=Hr(e.display)*t.ch);var r=se(e.doc,t.line),i=$t(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Pi(e,t,n,r,i){var o=T(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Di(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Pi(r.first,0,null,-1,-1);var i=_t(r,n),o=r.first+r.size-1;if(i>o)return Pi(r.first+r.size-1,se(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=se(r,i);;){var l=ss(e,a,i,t,n),s=Il(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var f=s.find(1);if(f.line==i)return f;a=se(r,i=f.line)}}function Zo(e,t,n,r){r-=Ni(t);var i=t.text.length,o=Re(function(a){return Xt(e,n,a-1).bottom<=r},i,0);return i=Re(function(a){return Xt(e,n,a).top>r},o,i),{begin:o,end:i}}function Qo(e,t,n,r){n||(n=Ir(e,t));var i=jn(e,t,Xt(e,n,r),"line").top;return Zo(e,t,n,i)}function Mi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ss(e,t,n,r,i){i-=$t(t);var o=Ir(e,t),a=Ni(t),l=0,s=t.text.length,f=!0,y=Nt(t,e.doc.direction);if(y){var x=(e.options.lineWrapping?fs:us)(e,t,n,o,y,r,i);f=x.level!=1,l=f?x.from:x.to-1,s=f?x.to:x.from-1}var E=null,P=null,q=Re(function(de){var he=Xt(e,o,de);return he.top+=a,he.bottom+=a,Mi(he,r,i,!1)?(he.top<=i&&he.left<=r&&(E=de,P=he),!0):!1},l,s),Q,ee,ne=!1;if(P){var ae=r-P.left<P.right-r,ie=ae==f;q=E+(ie?0:1),ee=ie?"after":"before",Q=ae?P.left:P.right}else{!f&&(q==s||q==l)&&q++,ee=q==0?"after":q==t.text.length?"before":Xt(e,o,q-(f?1:0)).bottom+a<=i==f?"after":"before";var le=Et(e,T(n,q,ee),"line",t,o);Q=le.left,ne=i<le.top?-1:i>=le.bottom?1:0}return q=zt(t.text,q,1),Pi(n,q,ee,ne,r-Q)}function us(e,t,n,r,i,o,a){var l=Re(function(x){var E=i[x],P=E.level!=1;return Mi(Et(e,T(n,P?E.to:E.from,P?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var f=s.level!=1,y=Et(e,T(n,f?s.from:s.to,f?"after":"before"),"line",t,r);Mi(y,o,a,!0)&&y.top>a&&(s=i[l-1])}return s}function fs(e,t,n,r,i,o,a){var l=Zo(e,t,r,a),s=l.begin,f=l.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var y=null,x=null,E=0;E<i.length;E++){var P=i[E];if(!(P.from>=f||P.to<=s)){var q=P.level!=1,Q=Xt(e,r,q?Math.min(f,P.to)-1:Math.max(s,P.from)).right,ee=Q<o?o-Q+1e9:Q-o;(!y||x>ee)&&(y=P,x=ee)}}return y||(y=i[i.length-1]),y.from<s&&(y={from:s,to:y.to,level:y.level}),y.to>f&&(y={from:y.from,to:f,level:y.level}),y}var kr;function Br(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kr==null){kr=c("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kr.appendChild(document.createTextNode("x")),kr.appendChild(c("br"));kr.appendChild(document.createTextNode("x"))}_(e.measure,kr);var n=kr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function Hr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t],"CodeMirror-line-like");_(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Fi(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:Ei(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ei(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Jo(e){var t=Br(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Hr(e.display)-3);return function(i){if(sr(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 Wi(e){var t=e.doc,n=Jo(e);t.iter(function(r){var i=n(r);i!=r.height&&Dt(r,i)})}function wr(e,t,n,r){var i=e.display;if(!n&&vt(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch{return null}var s=Di(e,o,a),f;if(r&&s.xRel>0&&(f=se(e.doc,s.line).text).length==s.ch){var y=ce(f,f.length,e.options.tabSize)-f.length;s=T(s.line,Math.max(0,Math.round((o-Ho(e.display).left)/Hr(e.display))-y))}return s}function Sr(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 gt(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(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)Vt&&wi(e.doc,t)<i.viewTo&&fr(e);else if(n<=i.viewFrom)Vt&&Oo(e.doc,n+r)>i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=Zn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=Zn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var l=Zn(e,t,t,-1),s=Zn(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(qn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):fr(e)}var f=i.externalMeasured;f&&(n<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(i.externalMeasured=null))}function ur(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[Sr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);ke(a,n)==-1&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,t,n,r){var i=Sr(e,t),o,a=e.display.view;if(!Vt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;wi(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function cs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=qn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=qn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Sr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(qn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Sr(e,n)))),r.viewTo=n}function Vo(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 hn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function $o(e,t){t===void 0&&(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 f=s.empty();if(a){var y=a(e,s);y&&Ii(e,y,i)}else(f||e.options.showCursorWhenSelecting)&&Ii(e,s.head,i);f||hs(e,s,o)}}return r}function Ii(e,t,n){var r=Et(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(c("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=Yn(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(c("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=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function hs(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Ho(e.display),l=a.left,s=Math.max(r.sizerWidth,xr(e)-r.sizer.offsetLeft)-a.right,f=i.direction=="ltr";function y(ie,le,de,he){le<0&&(le=0),le=Math.round(le),he=Math.round(he),o.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+ie+`px;
top: `+le+"px; width: "+(de??s-ie)+`px;
height: `+(he-le)+"px"))}function x(ie,le,de){var he=se(i,ie),xe=he.text.length,Me,rt;function He(Ye,bt){return Yn(e,T(ie,Ye),"div",he,bt)}function Ct(Ye,bt,ot){var Ve=Qo(e,he,null,Ye),Ze=bt=="ltr"==(ot=="after")?"left":"right",_e=ot=="after"?Ve.begin:Ve.end-(/\s/.test(he.text.charAt(Ve.end-1))?2:1);return He(_e,Ze)[Ze]}var yt=Nt(he,i.direction);return yr(yt,le||0,de??xe,function(Ye,bt,ot,Ve){var Ze=ot=="ltr",_e=He(Ye,Ze?"left":"right"),xt=He(bt-1,Ze?"right":"left"),Jr=le==null&&Ye==0,gr=de==null&&bt==xe,ut=Ve==0,jt=!yt||Ve==yt.length-1;if(xt.top-_e.top<=3){var nt=(f?Jr:gr)&&ut,uo=(f?gr:Jr)&&jt,nr=nt?l:(Ze?_e:xt).left,Or=uo?s:(Ze?xt:_e).right;y(nr,_e.top,Or-nr,_e.bottom)}else{var Nr,pt,Vr,fo;Ze?(Nr=f&&Jr&&ut?l:_e.left,pt=f?s:Ct(Ye,ot,"before"),Vr=f?l:Ct(bt,ot,"after"),fo=f&&gr&&jt?s:xt.right):(Nr=f?Ct(Ye,ot,"before"):l,pt=!f&&Jr&&ut?s:_e.right,Vr=!f&&gr&&jt?l:xt.left,fo=f?Ct(bt,ot,"after"):s),y(Nr,_e.top,pt-Nr,_e.bottom),_e.bottom<xt.top&&y(l,_e.bottom,null,xt.top),y(Vr,xt.top,fo-Vr,xt.bottom)}(!Me||Qn(_e,Me)<0)&&(Me=_e),Qn(xt,Me)<0&&(Me=xt),(!rt||Qn(_e,rt)<0)&&(rt=_e),Qn(xt,rt)<0&&(rt=xt)}),{start:Me,end:rt}}var E=t.from(),P=t.to();if(E.line==P.line)x(E.line,E.ch,P.ch);else{var q=se(i,E.line),Q=se(i,P.line),ee=Ft(q)==Ft(Q),ne=x(E.line,E.ch,ee?q.text.length+1:null).end,ae=x(P.line,ee?0:null,P.ch).start;ee&&(ne.top<ae.top-2?(y(ne.right,ne.top,null,ne.bottom),y(l,ae.top,ae.left,ae.bottom)):y(ne.right,ne.top,ae.left-ne.right,ne.bottom)),ne.bottom<ae.top&&y(l,ne.bottom,null,ae.top)}n.appendChild(o)}function Bi(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()||zr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ea(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||zi(e))}function Hi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&zr(e))},100)}function zi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ee(e,"focus",e,t),e.state.focused=!0,fe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),A&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Bi(e))}function zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ee(e,"blur",e,t),e.state.focused=!1,U(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Jn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,a=0;a<t.view.length;a++){var l=t.view[a],s=e.options.lineWrapping,f=void 0,y=0;if(!l.hidden){if(i+=l.line.height,I&&X<8){var x=l.node.offsetTop+l.node.offsetHeight;f=x-n,n=x}else{var E=l.node.getBoundingClientRect();f=E.bottom-E.top,!s&&l.text.firstChild&&(y=l.text.firstChild.getBoundingClientRect().right-E.left-1)}var P=l.line.height-f;if((P>.005||P<-.005)&&(i<r&&(o-=P),Dt(l.line,f),ta(l.line),l.rest))for(var q=0;q<l.rest.length;q++)ta(l.rest[q]);if(y>e.display.sizerWidth){var Q=Math.ceil(y/Hr(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ta(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 Vn(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=_t(t,r),a=_t(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=_t(t,$t(se(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=_t(t,$t(se(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function ds(e,t){if(!Ke(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),i!=null&&!w){var a=c("div","​",null,`position: absolute;
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
height: `+(t.bottom-t.top+qt(e)+n.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function ps(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?T(t.line,t.ch+1,"before"):t,t=t.ch?T(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Et(e,t),s=!n||n==t?l:Et(e,n);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};var f=Ri(e,i),y=e.doc.scrollTop,x=e.doc.scrollLeft;if(f.scrollTop!=null&&(pn(e,f.scrollTop),Math.abs(e.doc.scrollTop-y)>1&&(a=!0)),f.scrollLeft!=null&&(Cr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-x)>1&&(a=!0)),!a)break}return i}function vs(e,t){var n=Ri(e,t);n.scrollTop!=null&&pn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function Ri(e,t){var n=e.display,r=Br(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ai(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Ti(n),s=t.top<r,f=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var y=Math.min(t.top,(f?l:t.bottom)-o);y!=i&&(a.scrollTop=y)}var x=e.options.fixedGutter?0:n.gutters.offsetWidth,E=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-x,P=xr(e)-n.gutters.offsetWidth,q=t.right-t.left>P;return q&&(t.right=t.left+P),t.left<10?a.scrollLeft=0:t.left<E?a.scrollLeft=Math.max(0,t.left+x-(q?0:10)):t.right>P+E-3&&(a.scrollLeft=t.right+(q?0:10)-P),a}function Ki(e,t){t!=null&&($n(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){$n(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function dn(e,t,n){(t!=null||n!=null)&&$n(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function gs(e,t){$n(e),e.curOp.scrollToPos=t}function $n(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Yo(e,t.from),r=Yo(e,t.to);ra(e,n,r,t.margin)}}function ra(e,t,n,r){var i=Ri(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});dn(e,i.scrollLeft,i.scrollTop)}function pn(e,t){Math.abs(e.doc.scrollTop-t)<2||(R||_i(e,{top:t}),na(e,t,!0),R&&_i(e),mn(e,100))}function na(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 Cr(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,sa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function vn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ti(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+qt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Lr=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),oe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),oe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,I&&X<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Lr.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&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Lr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Lr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Lr.prototype.zeroWidthHack=function(){var e=p&&!M?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new ye,this.disableVert=new ye},Lr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Lr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gn=function(){};gn.prototype.update=function(){return{bottom:0,right:0}},gn.prototype.setScrollLeft=function(){},gn.prototype.setScrollTop=function(){},gn.prototype.clear=function(){};function Kr(e,t){t||(t=vn(e));var n=e.display.barWidth,r=e.display.barHeight;ia(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Jn(e),ia(e,vn(e)),n=e.display.barWidth,r=e.display.barHeight}function ia(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 oa={native:Lr,null:gn};function aa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new oa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),oe(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"?Cr(e,t):pn(e,t)},e),e.display.scrollbars.addClass&&fe(e.display.wrapper,e.display.scrollbars.addClass)}var ms=0;function Tr(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:++ms,markArrays:null},Yl(e.curOp)}function Ar(e){var t=e.curOp;t&&Ql(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;ys(n)})}function ys(e){for(var t=e.ops,n=0;n<t.length;n++)bs(t[n]);for(var r=0;r<t.length;r++)xs(t[r]);for(var i=0;i<t.length;i++)ks(t[i]);for(var o=0;o<t.length;o++)ws(t[o]);for(var a=0;a<t.length;a++)Ss(t[a])}function bs(e){var t=e.cm,n=t.display;Ls(t),e.updateMaxLine&&Ci(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 ei(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function xs(e){e.updatedDisplay=e.mustUpdate&&Ui(e.cm,e.update)}function ks(e){var t=e.cm,n=t.display;e.updatedDisplay&&Jn(t),e.barMeasure=vn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ro(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+qt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-xr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ws(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Cr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==ue(Te(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Kr(t,e.barMeasure),e.updatedDisplay&&qi(t,e.barMeasure),e.selectionChanged&&Bi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ea(e.cm)}function Ss(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&la(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&na(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Cr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=ps(t,ge(r,e.scrollToPos.from),ge(r,e.scrollToPos.to),e.scrollToPos.margin);ds(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Ee(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Ee(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ee(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function St(e,t){if(e.curOp)return t();Tr(e);try{return t()}finally{Ar(e)}}function et(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Tr(e);try{return t.apply(e,arguments)}finally{Ar(e)}}}function dt(e){return function(){if(this.curOp)return e.apply(this,arguments);Tr(this);try{return e.apply(this,arguments)}finally{Ar(this)}}}function tt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Tr(t);try{return e.apply(this,arguments)}finally{Ar(t)}}}function mn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,qe(Cs,e))}function Cs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=an(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?Qt(t.mode,r.state):null,s=po(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var f=o.styleClasses,y=s.classes;y?o.styleClasses=y:f&&(o.styleClasses=null);for(var x=!a||a.length!=o.styles.length||f!=y&&(!f||!y||f.bgClass!=y.bgClass||f.textClass!=y.textClass),E=0;!x&&E<a.length;++E)x=a[E]!=o.styles[E];x&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yi(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return mn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&St(e,function(){for(var o=0;o<i.length;o++)ur(e,i[o],"text")})}}var ei=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Vn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=xr(e),this.force=n,this.dims=Fi(e),this.events=[]};ei.prototype.signal=function(e,t){ct(e,t)&&this.events.push(arguments)},ei.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ee.apply(null,this.events[e])};function Ls(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qt(e)+"px",t.scrollbarsClipped=!0)}function Ts(e){if(e.hasFocus())return null;var t=ue(Te(e));if(!t||!re(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=Qe(e).getSelection();r.anchorNode&&r.extend&&re(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function As(e){if(!(!e||!e.activeElt||e.activeElt==ue(e.activeElt.ownerDocument))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&re(document.body,e.anchorNode)&&re(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 Ui(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return fr(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&&Vo(e)==0)return!1;ua(e)&&(fr(e),t.dims=Fi(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)),Vt&&(o=wi(e.doc,o),a=Oo(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;cs(e,o,a),n.viewOffset=$t(se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Vo(e);if(!l&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var f=Ts(e);return s>4&&(n.lineDiv.style.display="none"),Os(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,As(f),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,mn(e,400)),n.updateLineNumbers=null,!0}function la(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==xr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Ti(e.display)-Ai(e),n.top)}),t.visible=Vn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Vn(e.display,e.doc,n));if(!Ui(e,t))break;Jn(e);var i=vn(e);hn(e),Kr(e,i),qi(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 _i(e,t){var n=new ei(e,t);if(Ui(e,n)){Jn(e),la(e,n);var r=vn(e);hn(e),Kr(e,r),qi(e,r),n.finish()}}function Os(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(q){var Q=q.nextSibling;return A&&p&&e.display.currentWheelTarget==q?q.style.display="none":q.parentNode.removeChild(q),Q}for(var s=r.view,f=r.viewFrom,y=0;y<s.length;y++){var x=s[y];if(!x.hidden)if(!x.node||x.node.parentNode!=o){var E=ts(e,x,f,n);o.insertBefore(E,a)}else{for(;a!=x.node;)a=l(a);var P=i&&t!=null&&t<=f&&x.lineNumber;x.changes&&(ke(x.changes,"gutter")>-1&&(P=!1),Fo(e,x,f,n)),P&&(O(x.lineNumber),x.lineNumber.appendChild(document.createTextNode(S(e.options,f)))),a=x.node.nextSibling}f+=x.size}for(;a;)a=l(a)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",$e(e,"gutterChanged",e)}function qi(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+qt(e)+"px"}function sa(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ei(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 ua(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=S(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(c("div",[c("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",Gi(e.display),!0}return!1}function Xi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function fa(e){var t=e.gutters,n=e.gutterSpecs;O(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(c("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Gi(e)}function yn(e){fa(e.display),gt(e),sa(e)}function Ns(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Z("div",null,"CodeMirror-code"),i.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=c("div",null,"CodeMirror-cursors"),i.measure=c("div",null,"CodeMirror-measure"),i.lineMeasure=c("div",null,"CodeMirror-measure"),i.lineSpace=Z("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Z("div",[i.lineSpace],"CodeMirror-lines");i.mover=c("div",[o],null,"position: relative"),i.sizer=c("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=c("div",null,null,"position: absolute; height: "+we+"px; width: 1px;"),i.gutters=c("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=c("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=c("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),C&&D>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),I&&X<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!A&&!(R&&u)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Xi(r.gutters,r.lineNumbers),fa(i),n.init(i)}var ti=0,tr=null;I?tr=-.53:R?tr=15:C?tr=-.7:J&&(tr=-1/3);function ca(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==null&&(n=e.wheelDelta),{x:t,y:n}}function Ps(e){var t=ca(e);return t.x*=tr,t.y*=tr,t}function ha(e,t){C&&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 n=ca(t),r=n.x,i=n.y,o=tr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var a=e.display,l=a.scroller,s=l.scrollWidth>l.clientWidth,f=l.scrollHeight>l.clientHeight;if(r&&s||i&&f){if(i&&p&&A){e:for(var y=t.target,x=a.view;y!=l;y=y.parentNode)for(var E=0;E<x.length;E++)if(x[E].node==y){e.display.currentWheelTarget=y;break e}}if(r&&!R&&!W&&o!=null){i&&f&&pn(e,Math.max(0,l.scrollTop+i*o)),Cr(e,Math.max(0,l.scrollLeft+r*o)),(!i||i&&f)&&lt(t),a.wheelStartX=null;return}if(i&&o!=null){var P=i*o,q=e.doc.scrollTop,Q=q+a.wrapper.clientHeight;P<0?q=Math.max(0,q+P-50):Q=Math.min(e.doc.height,Q+P+50),_i(e,{top:q,bottom:Q})}ti<20&&t.deltaMode!==0&&(a.wheelStartX==null?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=r,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX!=null){var ee=l.scrollLeft-a.wheelStartX,ne=l.scrollTop-a.wheelStartY,ae=ne&&a.wheelDY&&ne/a.wheelDY||ee&&a.wheelDX&&ee/a.wheelDX;a.wheelStartX=a.wheelStartY=null,ae&&(tr=(tr*ti+ae)/(ti+1),++ti)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}var At=function(e,t){this.ranges=e,this.primIndex=t};At.prototype.primary=function(){return this.ranges[this.primIndex]},At.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(!ve(n.anchor,r.anchor)||!ve(n.head,r.head))return!1}return!0},At.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Pe(Le(this.ranges[t].anchor),Le(this.ranges[t].head));return new At(e,this.primIndex)},At.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},At.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(G(t,r.from())>=0&&G(e,r.to())<=0)return n}return-1};var Pe=function(e,t){this.anchor=e,this.head=t};Pe.prototype.from=function(){return Je(this.anchor,this.head)},Pe.prototype.to=function(){return Ae(this.anchor,this.head)},Pe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Wt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(E,P){return G(E.from(),P.from())}),n=ke(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=G(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var f=Je(l.from(),a.from()),y=Ae(l.to(),a.to()),x=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Pe(x?y:f,x?f:y))}}return new At(t,n)}function cr(e,t){return new At([new Pe(e,t||e)],0)}function hr(e){return e.text?T(e.from.line+e.text.length-1,be(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function da(e,t){if(G(e,t.from)<0)return e;if(G(e,t.to)<=0)return hr(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+=hr(t).ch-t.to.ch),T(n,r)}function ji(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Pe(da(i.anchor,t),da(i.head,t)))}return Wt(e.cm,n,e.sel.primIndex)}function pa(e,t,n){return e.line==t.line?T(n.line,e.ch-t.ch+n.ch):T(n.line+(e.line-t.line),e.ch)}function Ds(e,t,n){for(var r=[],i=T(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=pa(l.from,i,o),f=pa(hr(l),i,o);if(i=l.to,o=f,n=="around"){var y=e.sel.ranges[a],x=G(y.head,y.anchor)<0;r[a]=new Pe(x?f:s,x?s:f)}else r[a]=new Pe(s,s)}return new At(r,e.sel.primIndex)}function Yi(e){e.doc.mode=Zt(e.options,e.doc.modeOption),bn(e)}function bn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,mn(e,100),e.state.modeGen++,e.curOp&&gt(e)}function va(e,t){return t.from.ch==0&&t.to.ch==0&&be(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Zi(e,t,n,r){function i(ae){return n?n[ae]:null}function o(ae,ie,le){zl(ae,ie,le,r),$e(ae,"change",ae,t)}function a(ae,ie){for(var le=[],de=ae;de<ie;++de)le.push(new Er(f[de],i(de),r));return le}var l=t.from,s=t.to,f=t.text,y=se(e,l.line),x=se(e,s.line),E=be(f),P=i(f.length-1),q=s.line-l.line;if(t.full)e.insert(0,a(0,f.length)),e.remove(f.length,e.size-f.length);else if(va(e,t)){var Q=a(0,f.length-1);o(x,x.text,P),q&&e.remove(l.line,q),Q.length&&e.insert(l.line,Q)}else if(y==x)if(f.length==1)o(y,y.text.slice(0,l.ch)+E+y.text.slice(s.ch),P);else{var ee=a(1,f.length-1);ee.push(new Er(E+y.text.slice(s.ch),P,r)),o(y,y.text.slice(0,l.ch)+f[0],i(0)),e.insert(l.line+1,ee)}else if(f.length==1)o(y,y.text.slice(0,l.ch)+f[0]+x.text.slice(s.ch),i(0)),e.remove(l.line+1,q);else{o(y,y.text.slice(0,l.ch)+f[0],i(0)),o(x,E+x.text.slice(s.ch),P);var ne=a(1,f.length-1);q>1&&e.remove(l.line+1,q-1),e.insert(l.line+1,ne)}$e(e,"change",e,t)}function dr(e,t,n){function r(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var f=a&&s.sharedHist;n&&!f||(t(s.doc,f),r(s.doc,i,f))}}}r(e,null,!0)}function ga(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Wi(e),Yi(e),ma(e),e.options.direction=t.direction,e.options.lineWrapping||Ci(e),e.options.mode=t.modeOption,gt(e)}function ma(e){(e.doc.direction=="rtl"?fe:U)(e.display.lineDiv,"CodeMirror-rtl")}function Ms(e){St(e,function(){ma(e),gt(e)})}function ri(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 Qi(e,t){var n={from:Le(t.from),to:hr(t),text:Jt(e,t.from,t.to)};return xa(e,n,t.from.line,t.to.line+1),dr(e,function(r){return xa(r,n,t.from.line,t.to.line+1)},!0),n}function ya(e){for(;e.length;){var t=be(e);if(t.ranges)e.pop();else break}}function Fs(e,t){if(t)return ya(e.done),be(e.done);if(e.done.length&&!be(e.done).ranges)return be(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),be(e.done)}function ba(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=Fs(i,i.lastOp==r)))l=be(a.changes),G(t.from,t.to)==0&&G(t.from,l.to)==0?l.to=hr(t):a.changes.push(Qi(e,t));else{var s=be(i.done);for((!s||!s.ranges)&&ni(e.sel,i.done),a={changes:[Qi(e,t)],generation:i.generation},i.done.push(a);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=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ee(e,"historyAdded")}function Es(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 Ws(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||Es(e,o,be(i.done),t))?i.done[i.done.length-1]=t:ni(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ya(i.undone)}function ni(e,t){var n=be(t);n&&n.ranges&&n.equals(e)||t.push(e)}function xa(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(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function Is(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 Bs(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Is(n[i]));return r}function ka(e,t){var n=Bs(e,t),r=xi(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],f=0;f<o.length;++f)if(o[f].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Ur(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?At.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var f=a[s],y=void 0;if(l.push({from:f.from,to:f.to,text:f.text}),t)for(var x in f)(y=x.match(/^spans_(\d+)$/))&&ke(t,Number(y[1]))>-1&&(be(l)[x]=f[x],delete f[x])}}return r}function Ji(e,t,n,r){if(r){var i=e.anchor;if(n){var o=G(t,i)<0;o!=G(n,i)<0?(i=t,t=n):o!=G(t,n)<0&&(t=n)}return new Pe(i,t)}else return new Pe(n||t,t)}function ii(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),st(e,new At([Ji(e.sel.primary(),t,n,i)],0),r)}function wa(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]=Ji(e.sel.ranges[o],t[o],null,i);var a=Wt(e.cm,r,e.sel.primIndex);st(e,a,n)}function Vi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,st(e,Wt(e.cm,i,e.sel.primIndex),r)}function Sa(e,t,n,r){st(e,cr(t,n),r)}function Hs(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new Pe(ge(e,i[o].anchor),ge(e,i[o].head))},origin:n&&n.origin};return Ee(e,"beforeSelectionChange",e,r),e.cm&&Ee(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Wt(e.cm,r.ranges,r.ranges.length-1):t}function Ca(e,t,n){var r=e.history.done,i=be(r);i&&i.ranges?(r[r.length-1]=t,oi(e,t,n)):st(e,t,n)}function st(e,t,n){oi(e,t,n),Ws(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function oi(e,t,n){(ct(e,"beforeSelectionChange")||e.cm&&ct(e.cm,"beforeSelectionChange"))&&(t=Hs(e,t,n));var r=n&&n.bias||(G(t.primary().head,e.sel.primary().head)<0?-1:1);La(e,Aa(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Rr(e.cm)}function La(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,En(e.cm)),$e(e,"cursorActivity",e))}function Ta(e){La(e,Aa(e,e.sel,null,!1))}function Aa(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=ai(e,a.anchor,l&&l.anchor,n,r),f=a.head==a.anchor?s:ai(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||f!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Pe(s,f))}return i?Wt(e.cm,i,t.primIndex):t}function _r(e,t,n,r,i){var o=se(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,f="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,y="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(f?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(y?l.to>=t.ch:l.to>t.ch))){if(i&&(Ee(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var x=s.find(r<0?1:-1),E=void 0;if((r<0?y:f)&&(x=Oa(e,x,-r,x&&x.line==t.line?o:null)),x&&x.line==t.line&&(E=G(x,n))&&(r<0?E<0:E>0))return _r(e,x,t,r,i)}var P=s.find(r<0?-1:1);return(r<0?f:y)&&(P=Oa(e,P,r,P.line==t.line?o:null)),P?_r(e,P,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,a=_r(e,t,n,o,i)||!i&&_r(e,t,n,o,!0)||_r(e,t,n,-o,i)||!i&&_r(e,t,n,-o,!0);return a||(e.cantEdit=!0,T(e.first,0))}function Oa(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?ge(e,T(t.line-1)):null:n>0&&t.ch==(r||se(e,t.line)).text.length?t.line<e.first+e.size-1?T(t.line+1,0):null:new T(t.line,t.ch+n)}function Na(e){e.setSelection(T(e.firstLine(),0),T(e.lastLine()),We)}function Pa(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(i,o,a,l){i&&(r.from=ge(e,i)),o&&(r.to=ge(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),Ee(e,"beforeChange",e,r),e.cm&&Ee(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 Gr(e,t,n){if(e.cm){if(!e.cm.curOp)return et(e.cm,Gr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((ct(e,"beforeChange")||e.cm&&ct(e.cm,"beforeChange"))&&(t=Pa(e,t,!0),!t))){var r=ko&&!n&&Wl(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Da(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Da(e,t)}}function Da(e,t){if(!(t.text.length==1&&t.text[0]==""&&G(t.from,t.to)==0)){var n=ji(e,t);ba(e,t,n,e.cm?e.cm.curOp.id:NaN),xn(e,t,n,xi(e,t));var r=[];dr(e,function(i,o){!o&&ke(r,i.history)==-1&&(Wa(i.history,t),r.push(i.history)),xn(i,t,null,xi(i,t))})}}function li(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,f=0;f<l.length&&(o=l[f],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));f++);if(f!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(ni(o,s),n&&!o.equals(e.sel)){st(e,o,{clearRedo:!1});return}a=o}else if(r){l.push(o);return}else break;var y=[];ni(a,s),s.push({changes:y,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var x=ct(e,"beforeChange")||e.cm&&ct(e.cm,"beforeChange"),E=function(Q){var ee=o.changes[Q];if(ee.origin=t,x&&!Pa(e,ee,!1))return l.length=0,{};y.push(Qi(e,ee));var ne=Q?ji(e,ee):be(l);xn(e,ee,ne,ka(e,ee)),!Q&&e.cm&&e.cm.scrollIntoView({from:ee.from,to:hr(ee)});var ae=[];dr(e,function(ie,le){!le&&ke(ae,ie.history)==-1&&(Wa(ie.history,ee),ae.push(ie.history)),xn(ie,ee,null,ka(ie,ee))})},P=o.changes.length-1;P>=0;--P){var q=E(P);if(q)return q.v}}}}function Ma(e,t){if(t!=0&&(e.first+=t,e.sel=new At(kt(e.sel.ranges,function(i){return new Pe(T(i.anchor.line+t,i.anchor.ch),T(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){gt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)ur(e.cm,r,"gutter")}}function xn(e,t,n,r){if(e.cm&&!e.cm.curOp)return et(e.cm,xn)(e,t,n,r);if(t.to.line<e.first){Ma(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);Ma(e,i),t={from:T(e.first,0),to:T(t.to.line+i,t.to.ch),text:[be(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:T(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Jt(e,t.from,t.to),n||(n=ji(e,t)),e.cm?zs(e.cm,t,r):Zi(e,t,r),oi(e,n,We),e.cantEdit&&ai(e,T(e.firstLine(),0))&&(e.cantEdit=!1)}}function zs(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=Ne(Ft(se(r,o.line))),r.iter(s,a.line+1,function(P){if(P==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&En(e),Zi(r,t,n,Jo(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(P){var q=Gn(P);q>i.maxLineLength&&(i.maxLine=P,i.maxLineLength=q,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Ol(r,o.line),mn(e,400);var f=t.text.length-(a.line-o.line)-1;t.full?gt(e):o.line==a.line&&t.text.length==1&&!va(e.doc,t)?ur(e,o.line,"text"):gt(e,o.line,a.line+1,f);var y=ct(e,"changes"),x=ct(e,"change");if(x||y){var E={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};x&&$e(e,"change",e,E),y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(E)}e.display.selForContextMenu=null}function qr(e,t,n,r,i){var o;r||(r=n),G(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Gr(e,{from:n,to:r,text:t,origin:i})}function Fa(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Ea(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(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Fa(o.ranges[l].anchor,t,n,r),Fa(o.ranges[l].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var f=o.changes[s];if(n<f.from.line)f.from=T(f.from.line+r,f.from.ch),f.to=T(f.to.line+r,f.to.ch);else if(t<=f.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function Wa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Ea(e.done,n,r,i),Ea(e.undone,n,r,i)}function kn(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=se(e,Tt(e,t)):i=Ne(t),i==null?null:(r(o,i)&&e.cm&&ur(e.cm,i,n),o)}function wn(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}wn.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,Rl(i),$e(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 Sn(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}Sn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof wn))){var l=[];this.collapse(l),this.children=[new wn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new wn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Sn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=ke(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Sn(e.children);r.parent=e,e.children=[r,n],e=r}n.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],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var Cn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Cn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ne(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 o=fn(this);Dt(n,Math.max(0,n.height-o)),e&&(St(e,function(){Ia(e,n,-o),ur(e,r,"widget")}),$e(e,"lineWidgetCleared",e,this,r))}},Cn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=fn(this)-t;i&&(sr(this.doc,r)||Dt(r,r.height+i),n&&St(n,function(){n.curOp.forceUpdate=!0,Ia(n,r,i),$e(n,"lineWidgetChanged",n,e,Ne(r))}))},ht(Cn);function Ia(e,t,n){$t(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ki(e,n)}function Rs(e,t,n,r){var i=new Cn(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),kn(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!sr(e,a)){var s=$t(a)<e.scrollTop;Dt(a,a.height+fn(i)),s&&Ki(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&$e(o,"lineWidgetAdded",o,i,typeof t=="number"?t:Ne(t)),i}var Ba=0,pr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ba};pr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Tr(e),ct(this,"clear")){var n=this.find();n&&$e(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=ln(a.markedSpans,this);e&&!this.collapsed?ur(e,Ne(a),"text"):e&&(l.to!=null&&(i=Ne(a)),l.from!=null&&(r=Ne(a))),a.markedSpans=Dl(a.markedSpans,l),l.from==null&&this.collapsed&&!sr(this.doc,a)&&e&&Dt(a,Br(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var f=Ft(this.lines[s]),y=Gn(f);y>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=y,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&gt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ta(e.doc)),e&&$e(e,"markerCleared",e,this,r,i),t&&Ar(e),this.parent&&this.parent.clear()}},pr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=ln(o.markedSpans,this);if(a.from!=null&&(n=T(t?o:Ne(o),a.from),e==-1))return n;if(a.to!=null&&(r=T(t?o:Ne(o),a.to),e==1))return r}return n&&{from:n,to:r}},pr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||St(r,function(){var i=t.line,o=Ne(t.line),a=Oi(r,o);if(a&&(_o(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!sr(n.doc,i)&&n.height!=null){var l=n.height;n.height=null;var s=fn(n)-l;s&&Dt(i,i.height+s)}$e(r,"markerChanged",r,e)})},pr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ke(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},pr.prototype.detachLine=function(e){if(this.lines.splice(ke(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ht(pr);function Xr(e,t,n,r,i){if(r&&r.shared)return Ks(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return et(e.cm,Xr)(e,t,n,r,i);var o=new pr(e,i),a=G(t,n);if(r&&pe(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Z("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ao(e,t.line,t,n,o)||t.line!=n.line&&Ao(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pl()}o.addToHistory&&ba(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,f;if(e.iter(l,n.line+1,function(x){s&&o.collapsed&&!s.options.lineWrapping&&Ft(x)==s.display.maxLine&&(f=!0),o.collapsed&&l!=t.line&&Dt(x,0),Ml(x,new Rn(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(x){sr(e,x)&&Dt(x,0)}),o.clearOnEnter&&oe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Nl(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ba,o.atomic=!0),s){if(f&&(s.curOp.updateMaxLine=!0),o.collapsed)gt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var y=t.line;y<=n.line;y++)ur(s,y,"text");o.atomic&&Ta(s.doc),$e(s,"markerAdded",s,o)}return o}var Ln=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Ln.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();$e(this,"clear")}},Ln.prototype.find=function(e,t){return this.primary.find(e,t)},ht(Ln);function Ks(e,t,n,r,i){r=pe(r),r.shared=!1;var o=[Xr(e,t,n,r,i)],a=o[0],l=r.widgetNode;return dr(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(Xr(s,ge(s,t),ge(s,n),r,i));for(var f=0;f<s.linked.length;++f)if(s.linked[f].isParent)return;a=be(o)}),new Ln(o,a)}function Ha(e){return e.findMarks(T(e.first,0),e.clipPos(T(e.lastLine())),function(t){return t.parent})}function Us(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(G(o,a)){var l=Xr(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function _s(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];dr(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];ke(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var Gs=0,mt=function(e,t,n,r,i){if(!(this instanceof mt))return new mt(e,t,n,r,i);n==null&&(n=0),Sn.call(this,[new wn([new Er("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=T(n,0);this.sel=cr(o),this.history=new ri(null),this.id=++Gs,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Zi(this,{from:o,to:o,text:e}),st(this,cr(o),We)};mt.prototype=z(Sn.prototype,{constructor:mt,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=Fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:tt(function(e){var t=T(this.first,0),n=this.first+this.size-1;Gr(this,{from:t,to:T(n,se(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&dn(this.cm,0,0),st(this,cr(t),We)}),replaceRange:function(e,t,n,r){t=ge(this,t),n=n?ge(this,n):t,qr(this,e,t,n,r)},getRange:function(e,t,n){var r=Jt(this,ge(this,e),ge(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(h(this,e))return se(this,e)},getLineNumber:function(e){return Ne(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=se(this,e)),Ft(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ge(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:tt(function(e,t,n){Sa(this,ge(this,typeof e=="number"?T(e,t||0):e),null,n)}),setSelection:tt(function(e,t,n){Sa(this,ge(this,e),ge(this,t||e),n)}),extendSelection:tt(function(e,t,n){ii(this,ge(this,e),t&&ge(this,t),n)}),extendSelections:tt(function(e,t){wa(this,ho(this,e),t)}),extendSelectionsBy:tt(function(e,t){var n=kt(this.sel.ranges,e);wa(this,ho(this,n),t)}),setSelections:tt(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Pe(ge(this,e[i].anchor),ge(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),st(this,Wt(this.cm,r,t),n)}}),addSelection:tt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Pe(ge(this,e),ge(this,t||e))),st(this,Wt(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=Jt(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=Jt(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:tt(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&&t!="end"&&Ds(this,r,t),s=r.length-1;s>=0;s--)Gr(this,r[s]);l?Ca(this,l):this.cm&&Rr(this.cm)}),undo:tt(function(){li(this,"undo")}),redo:tt(function(){li(this,"redo")}),undoSelection:tt(function(){li(this,"undo",!0)}),redoSelection:tt(function(){li(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 ri(this.history),dr(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:Ur(this.history.done),undone:Ur(this.history.undone)}},setHistory:function(e){var t=this.history=new ri(this.history);t.done=Ur(e.done.slice(0),null,!0),t.undone=Ur(e.undone.slice(0),null,!0)},setGutterMarker:tt(function(e,t,n){return kn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&ft(i)&&(r.gutterMarkers=null),!0})}),clearGutter:tt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&kn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,ft(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!h(this,e)||(t=e,e=se(this,e),!e))return null}else if(t=Ne(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:tt(function(e,t,n){return kn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(N(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:tt(function(e,t,n){return kn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var a=o.match(N(n));if(!a)return!1;var l=a.index+a[0].length;r[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:tt(function(e,t,n){return Rs(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Xr(this,ge(this,e),ge(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=ge(this,e),Xr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ge(this,e);var t=[],n=se(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=ge(this,e),t=ge(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];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.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 o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),ge(this,T(n,t))},indexFromPos:function(e){e=ge(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(r){t+=r.text.length+n}),t},copy:function(e){var t=new mt(Fr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new mt(Fr(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}],Us(r,Ha(this)),r},unlinkDoc:function(e){if(e instanceof Be&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),_s(Ha(this));break}}if(e.history==this.history){var r=[e.id];dr(e,function(i){return r.push(i.id)},!0),e.history=new ri(null),e.history.done=Ur(this.history.done,r),e.history.undone=Ur(this.history.undone,r)}},iterLinkedDocs:function(e){dr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):nn(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:tt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Ms(this.cm))})}),mt.prototype.eachLine=mt.prototype.iter;var za=0;function qs(e){var t=this;if(Ra(t),!(Ke(t,e)||er(t.display,e))){lt(e),I&&(za=+new Date);var n=wr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&et(t,function(){n=ge(t.doc,n);var P={from:n,to:n,text:t.doc.splitLines(o.filter(function(q){return q!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gr(t.doc,P),Ca(t.doc,cr(ge(t.doc,n),ge(t.doc,hr(P))))})()},s=function(P,q){if(t.options.allowDropFileTypes&&ke(t.options.allowDropFileTypes,P.type)==-1){l();return}var Q=new FileReader;Q.onerror=function(){return l()},Q.onload=function(){var ee=Q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ee)){l();return}o[q]=ee,l()},Q.readAsText(P)},f=0;f<r.length;f++)s(r[f],f);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 y=e.dataTransfer.getData("Text");if(y){var x;if(t.state.draggingText&&!t.state.draggingText.copy&&(x=t.listSelections()),oi(t.doc,cr(n,n)),x)for(var E=0;E<x.length;++E)qr(t.doc,"",x[E].anchor,x[E].head,"drag");t.replaceSelection(y,"around","paste"),t.display.input.focus()}}catch{}}}}function Xs(e,t){if(I&&(!e.state.draggingText||+new Date-za<100)){Yt(t);return}if(!(Ke(e,t)||er(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!J)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",W&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),W&&n.parentNode.removeChild(n)}}function js(e,t){var n=wr(e,t);if(n){var r=document.createDocumentFragment();Ii(e,n,r),e.display.dragCursor||(e.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),_(e.display.dragCursor,r)}}function Ra(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ka(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 o=0;o<n.length;o++)e(n[o])})}}var Ua=!1;function Ys(){Ua||(Zs(),Ua=!0)}function Zs(){var e;oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ka(Qs)},100))}),oe(window,"blur",function(){return Ka(zr)})}function Qs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var vr={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"},Tn=0;Tn<10;Tn++)vr[Tn+48]=vr[Tn+96]=String(Tn);for(var si=65;si<=90;si++)vr[si]=String.fromCharCode(si);for(var An=1;An<=12;An++)vr[An+111]=vr[An+63235]="F"+An;var rr={};rr.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"},rr.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"},rr.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"},rr.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"]},rr.default=p?rr.macDefault:rr.pcDefault;function Js(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Vs(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=kt(n.split(" "),Js),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)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[n]}for(var f in t)e[f]=t[f];return e}function jr(e,t,n,r){t=ui(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 jr(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=jr(e,t.fallthrough[o],n,r);if(a)return a}}}function _a(e){var t=typeof e=="string"?e:vr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Ga(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(L?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(L?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function qa(e,t){if(W&&e.keyCode==34&&e.char)return!1;var n=vr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Ga(n,e,t))}function ui(e){return typeof e=="string"?rr[e]:e}function Yr(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&G(o.from,be(r).to)<=0;){var a=r.pop();if(G(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}St(e,function(){for(var l=r.length-1;l>=0;l--)qr(e.doc,"",r[l].from,r[l].to,"+delete");Rr(e)})}function $i(e,t,n){var r=zt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function eo(e,t,n){var r=$i(e,t.ch,n);return r==null?null:new T(t.line,r,n<0?"after":"before")}function to(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Nt(n,t.doc.direction);if(o){var a=i<0?be(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",f;if(a.level>0||t.doc.direction=="rtl"){var y=Ir(t,n);f=i<0?n.text.length-1:0;var x=Xt(t,y,f).top;f=Re(function(E){return Xt(t,y,E).top==x},i<0==(a.level==1)?a.from:a.to-1,f),s=="before"&&(f=$i(n,f,1))}else f=i<0?a.to:a.from;return new T(r,f,s)}}return new T(r,i<0?n.text.length:0,i<0?"before":"after")}function $s(e,t,n,r){var i=Nt(t,e.doc.direction);if(!i)return eo(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 o=Ot(i,n.ch,n.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return eo(t,n,r);var l=function(ne,ae){return $i(t,ne instanceof T?ne.ch:ne,ae)},s,f=function(ne){return e.options.lineWrapping?(s=s||Ir(e,t),Qo(e,t,s,ne)):{begin:0,end:t.text.length}},y=f(n.sticky=="before"?l(n,-1):n.ch);if(e.doc.direction=="rtl"||a.level==1){var x=a.level==1==r<0,E=l(n,x?1:-1);if(E!=null&&(x?E<=a.to&&E<=y.end:E>=a.from&&E>=y.begin)){var P=x?"before":"after";return new T(n.line,E,P)}}var q=function(ne,ae,ie){for(var le=function(Me,rt){return rt?new T(n.line,l(Me,1),"before"):new T(n.line,Me,"after")};ne>=0&&ne<i.length;ne+=ae){var de=i[ne],he=ae>0==(de.level!=1),xe=he?ie.begin:l(ie.end,-1);if(de.from<=xe&&xe<de.to||(xe=he?de.from:l(de.to,-1),ie.begin<=xe&&xe<ie.end))return le(xe,he)}},Q=q(o+r,r,y);if(Q)return Q;var ee=r>0?y.end:l(y.begin,-1);return ee!=null&&!(r>0&&ee==t.text.length)&&(Q=q(r>0?0:i.length-1,r,f(ee)),Q)?Q:null}var On={selectAll:Na,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),We)},killLine:function(e){return Yr(e,function(t){if(t.empty()){var n=se(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:T(t.head.line+1,0)}:{from:t.head,to:T(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Yr(e,function(t){return{from:T(t.from().line,0),to:ge(e.doc,T(t.to().line+1,0))}})},delLineLeft:function(e){return Yr(e,function(t){return{from:T(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Yr(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Yr(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(T(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(T(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Xa(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ja(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return eu(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")},Ht)},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")},Ht)},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/)?ja(e,t.head):r},Ht)},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 o=n[i].from(),a=ce(e.getLine(o.line),o.ch,r);t.push(je(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return St(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=se(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new T(i.line,i.ch-1)),i.ch>0)i=new T(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),T(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=se(e.doc,i.line-1).text;a&&(i=new T(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),T(i.line-1,a.length-1),i,"+transpose"))}}n.push(new Pe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return St(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);Rr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xa(e,t){var n=se(e.doc,t),r=Ft(n);return r!=n&&(t=Ne(r)),to(!0,e,r,t,1)}function eu(e,t){var n=se(e.doc,t),r=Bl(n);return r!=n&&(t=Ne(r)),to(!0,e,n,t,-1)}function ja(e,t){var n=Xa(e,t.line),r=se(e.doc,n.line),i=Nt(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return T(n.line,a?0:o,n.sticky)}return n}function fi(e,t,n){if(typeof t=="string"&&(t=On[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)!=me}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function tu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=jr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&jr(t,e.options.extraKeys,n,e)||jr(t,e.options.keyMap,n,e)}var ru=new ye;function Nn(e,t,n,r){var i=e.state.keySeq;if(i){if(_a(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ru.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Ya(e,i+" "+t,n,r))return!0}return Ya(e,t,n,r)}function Ya(e,t,n,r){var i=tu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&$e(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(lt(n),Bi(e)),!!i}function Za(e,t){var n=qa(t,!0);return n?t.shiftKey&&!e.state.keySeq?Nn(e,"Shift-"+n,t,function(r){return fi(e,r,!0)})||Nn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return fi(e,r)}):Nn(e,n,t,function(r){return fi(e,r)}):!1}function nu(e,t,n){return Nn(e,"'"+n+"'",t,function(r){return fi(e,r,!0)})}var ro=null;function Qa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ue(Te(t)),!Ke(t,e))){I&&X<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Za(t,e);W&&(ro=r?n:null,!r&&n==88&&!Kt&&(p?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),R&&!p&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&iu(t)}}function iu(e){var t=e.display.lineDiv;fe(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(U(t,"CodeMirror-crosshair"),at(document,"keyup",n),at(document,"mouseover",n))}oe(document,"keyup",n),oe(document,"mouseover",n)}function Ja(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,e)}function Va(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(er(t.display,e)||Ke(t,e)||e.ctrlKey&&!e.altKey||p&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(W&&n==ro){ro=null,lt(e);return}if(!(W&&(!e.which||e.which<10)&&Za(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(nu(t,e,i)||t.display.input.onKeyPress(e))}}}var ou=400,no=function(e,t,n){this.time=e,this.pos=t,this.button=n};no.prototype.compare=function(e,t,n){return this.time+ou>e&&G(t,this.pos)==0&&n==this.button};var Pn,Dn;function au(e,t){var n=+new Date;return Dn&&Dn.compare(n,e,t)?(Pn=Dn=null,"triple"):Pn&&Pn.compare(n,e,t)?(Dn=new no(n,e,t),Pn=null,"double"):(Pn=new no(n,e,t),Dn=null,"single")}function $a(e){var t=this,n=t.display;if(!(Ke(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,er(n,e)){A||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!io(t,e)){var r=wr(t,e),i=rn(e),o=r?au(r,i):"single";Qe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&lu(t,i,r,o,e))&&(i==1?r?uu(t,r,o,e):vt(e)==n.scroller&&lt(e):i==2?(r&&ii(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(F?t.display.input.onContextMenu(e):Hi(t)))}}}function lu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,Nn(e,Ga(o,i),i,function(a){if(typeof a=="string"&&(a=On[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=me}finally{e.state.suppressEdits=!1}return l})}function su(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=m?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=p?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(p?n.altKey:n.ctrlKey)),i}function uu(e,t,n,r){I?setTimeout(qe(ea,e),0):e.curOp.focus=ue(Te(e));var i=su(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&gi&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(G((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(G(a.to(),t)>0||t.xRel<0)?fu(e,r,t,i):cu(e,r,t,i)}function fu(e,t,n,r){var i=e.display,o=!1,a=et(e,function(f){A&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hi(e)),at(i.wrapper.ownerDocument,"mouseup",a),at(i.wrapper.ownerDocument,"mousemove",l),at(i.scroller,"dragstart",s),at(i.scroller,"drop",a),o||(lt(f),r.addNew||ii(e.doc,n,null,null,r.extend),A&&!J||I&&X==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(f){o=o||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},s=function(){return o=!0};A&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,oe(i.wrapper.ownerDocument,"mouseup",a),oe(i.wrapper.ownerDocument,"mousemove",l),oe(i.scroller,"dragstart",s),oe(i.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function el(e,t,n){if(n=="char")return new Pe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Pe(T(t.line,0),ge(e.doc,T(t.line+1,0)));var r=n(e,t);return new Pe(r.from,r.to)}function cu(e,t,n,r){I&&Hi(e);var i=e.display,o=e.doc;lt(t);var a,l,s=o.sel,f=s.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),l>-1?a=f[l]:a=new Pe(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new Pe(n,n)),n=wr(e,t,!0,!0),l=-1;else{var y=el(e,n,r.unit);r.extend?a=Ji(a,y.anchor,y.head,r.extend):a=y}r.addNew?l==-1?(l=f.length,st(o,Wt(e,f.concat([a]),l),{scroll:!1,origin:"*mouse"})):f.length>1&&f[l].empty()&&r.unit=="char"&&!r.extend?(st(o,Wt(e,f.slice(0,l).concat(f.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Vi(o,l,a,Bt):(l=0,st(o,new At([a],0),Bt),s=o.sel);var x=n;function E(ie){if(G(x,ie)!=0)if(x=ie,r.unit=="rectangle"){for(var le=[],de=e.options.tabSize,he=ce(se(o,n.line).text,n.ch,de),xe=ce(se(o,ie.line).text,ie.ch,de),Me=Math.min(he,xe),rt=Math.max(he,xe),He=Math.min(n.line,ie.line),Ct=Math.min(e.lastLine(),Math.max(n.line,ie.line));He<=Ct;He++){var yt=se(o,He).text,Ye=Lt(yt,Me,de);Me==rt?le.push(new Pe(T(He,Ye),T(He,Ye))):yt.length>Ye&&le.push(new Pe(T(He,Ye),T(He,Lt(yt,rt,de))))}le.length||le.push(new Pe(n,n)),st(o,Wt(e,s.ranges.slice(0,l).concat(le),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ie)}else{var bt=a,ot=el(e,ie,r.unit),Ve=bt.anchor,Ze;G(ot.anchor,Ve)>0?(Ze=ot.head,Ve=Je(bt.from(),ot.anchor)):(Ze=ot.anchor,Ve=Ae(bt.to(),ot.head));var _e=s.ranges.slice(0);_e[l]=hu(e,new Pe(ge(o,Ve),Ze)),st(o,Wt(e,_e,l),Bt)}}var P=i.wrapper.getBoundingClientRect(),q=0;function Q(ie){var le=++q,de=wr(e,ie,!0,r.unit=="rectangle");if(de)if(G(de,x)!=0){e.curOp.focus=ue(Te(e)),E(de);var he=Vn(i,o);(de.line>=he.to||de.line<he.from)&&setTimeout(et(e,function(){q==le&&Q(ie)}),150)}else{var xe=ie.clientY<P.top?-20:ie.clientY>P.bottom?20:0;xe&&setTimeout(et(e,function(){q==le&&(i.scroller.scrollTop+=xe,Q(ie))}),50)}}function ee(ie){e.state.selectingText=!1,q=1/0,ie&&(lt(ie),i.input.focus()),at(i.wrapper.ownerDocument,"mousemove",ne),at(i.wrapper.ownerDocument,"mouseup",ae),o.history.lastSelOrigin=null}var ne=et(e,function(ie){ie.buttons===0||!rn(ie)?ee(ie):Q(ie)}),ae=et(e,ee);e.state.selectingText=ae,oe(i.wrapper.ownerDocument,"mousemove",ne),oe(i.wrapper.ownerDocument,"mouseup",ae)}function hu(e,t){var n=t.anchor,r=t.head,i=se(e.doc,n.line);if(G(n,r)==0&&n.sticky==r.sticky)return t;var o=Nt(i);if(!o)return t;var a=Ot(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s=a+(l.from==n.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var f;if(r.line!=n.line)f=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var y=Ot(o,r.ch,r.sticky),x=y-a||(r.ch-n.ch)*(l.level==1?-1:1);y==s-1||y==s?f=x<0:f=x>0}var E=o[s+(f?-1:0)],P=f==(E.level==1),q=P?E.from:E.to,Q=P?"after":"before";return n.ch==q&&n.sticky==Q?t:new Pe(new T(n.line,q,Q),r)}function tl(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{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&lt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ct(e,n))return tn(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var f=a.gutters.childNodes[s];if(f&&f.getBoundingClientRect().right>=i){var y=_t(e.doc,o),x=e.display.gutterSpecs[s];return Ee(e,n,e,y,x.className,t),tn(t)}}}function io(e,t){return tl(e,t,"gutterClick",!0)}function rl(e,t){er(e.display,t)||du(e,t)||Ke(e,t,"contextmenu")||F||e.display.input.onContextMenu(t)}function du(e,t){return ct(e,"gutterContextMenu")?tl(e,t,"gutterContextMenu",!1):!1}function nl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),cn(e)}var Zr={toString:function(){return"CodeMirror.Init"}},il={},ci={};function pu(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(l,s,f){f!=Zr&&o(l,s,f)}:o)}e.defineOption=n,e.Init=Zr,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Yi(r)},!0),n("indentUnit",2,Yi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){bn(r),cn(r),gt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],a=r.doc.first;r.doc.iter(function(s){for(var f=0;;){var y=s.text.indexOf(i,f);if(y==-1)break;f=y+i.length,o.push(T(a,y))}a++});for(var l=o.length-1;l>=0;l--)qr(r.doc,i,o[l],T(o[l].line,o[l].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=Zr&&r.refresh()}),n("specialCharPlaceholder",_l,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!k),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){nl(r),yn(r)},!0),n("keyMap","default",function(r,i,o){var a=ui(i),l=o!=Zr&&ui(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,gu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Xi(i,r.options.lineNumbers),yn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ei(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Kr(r)},!0),n("scrollbarStyle","native",function(r){aa(r),Kr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Xi(r.options.gutters,i),yn(r)},!0),n("firstLineNumber",1,yn,!0),n("lineNumberFormatter",function(r){return r},yn,!0),n("showCursorWhenSelecting",!1,hn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(zr(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,vu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,hn,!0),n("singleCursorHeightPerLine",!0,hn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bn,!0),n("addModeClass",!1,bn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,bn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function vu(e,t,n){var r=n&&n!=Zr;if(!t!=!r){var i=e.display.dragFunctions,o=t?oe:at;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function gu(e){e.options.lineWrapping?(fe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(U(e.display.wrapper,"CodeMirror-wrap"),Ci(e)),Wi(e),gt(e),cn(e),setTimeout(function(){return Kr(e)},100)}function Be(e,t){var n=this;if(!(this instanceof Be))return new Be(e,t);this.options=t=t?pe(t):{},pe(il,t,!1);var r=t.value;typeof r=="string"?r=new mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Be.inputStyles[t.inputStyle](this),o=this.display=new Ns(e,r,i,t);o.wrapper.CodeMirror=this,nl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),aa(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 ye,keySeq:null,specialChars:null},t.autofocus&&!u&&o.input.focus(),I&&X<11&&setTimeout(function(){return n.display.input.reset(!0)},20),mu(this),Ys(),Tr(this),this.curOp.forceUpdate=!0,ga(this,r),t.autofocus&&!u||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&zi(n)},20):zr(this);for(var a in ci)ci.hasOwnProperty(a)&&ci[a](this,t[a],Zr);ua(this),t.finishInit&&t.finishInit(this);for(var l=0;l<oo.length;++l)oo[l](this);Ar(this),A&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Be.defaults=il,Be.optionHandlers=ci;function mu(e){var t=e.display;oe(t.scroller,"mousedown",et(e,$a)),I&&X<11?oe(t.scroller,"dblclick",et(e,function(s){if(!Ke(e,s)){var f=wr(e,s);if(!(!f||io(e,s)||er(e.display,s))){lt(s);var y=e.findWordAt(f);ii(e.doc,y.anchor,y.head)}}})):oe(t.scroller,"dblclick",function(s){return Ke(e,s)||lt(s)}),oe(t.scroller,"contextmenu",function(s){return rl(e,s)}),oe(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||rl(e,s)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var f=s.touches[0];return f.radiusX<=1&&f.radiusY<=1}function a(s,f){if(f.left==null)return!0;var y=f.left-s.left,x=f.top-s.top;return y*y+x*x>20*20}oe(t.scroller,"touchstart",function(s){if(!Ke(e,s)&&!o(s)&&!io(e,s)){t.input.ensurePolled(),clearTimeout(n);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),oe(t.scroller,"touchend",function(s){var f=t.activeTouch;if(f&&!er(t,s)&&f.left!=null&&!f.moved&&new Date-f.start<300){var y=e.coordsChar(t.activeTouch,"page"),x;!f.prev||a(f,f.prev)?x=new Pe(y,y):!f.prev.prev||a(f,f.prev.prev)?x=e.findWordAt(y):x=new Pe(T(y.line,0),ge(e.doc,T(y.line+1,0))),e.setSelection(x.anchor,x.head),e.focus(),lt(s)}i()}),oe(t.scroller,"touchcancel",i),oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(pn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),oe(t.scroller,"mousewheel",function(s){return ha(e,s)}),oe(t.scroller,"DOMMouseScroll",function(s){return ha(e,s)}),oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ke(e,s)||Yt(s)},over:function(s){Ke(e,s)||(js(e,s),Yt(s))},start:function(s){return Xs(e,s)},drop:et(e,qs),leave:function(s){Ke(e,s)||Ra(e)}};var l=t.input.getField();oe(l,"keyup",function(s){return Ja.call(e,s)}),oe(l,"keydown",et(e,Qa)),oe(l,"keypress",et(e,Va)),oe(l,"focus",function(s){return zi(e,s)}),oe(l,"blur",function(s){return zr(e,s)})}var oo=[];Be.defineInitHook=function(e){return oo.push(e)};function Mn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=an(e,t).state:n="prev");var a=e.options.tabSize,l=se(i,t),s=ce(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var f=l.text.match(/^\s*/)[0],y;if(!r&&!/\S/.test(l.text))y=0,n="not";else if(n=="smart"&&(y=i.mode.indent(o,l.text.slice(f.length),l.text),y==me||y>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?y=ce(se(i,t-1).text,null,a):y=0:n=="add"?y=s+e.options.indentUnit:n=="subtract"?y=s-e.options.indentUnit:typeof n=="number"&&(y=s+n),y=Math.max(0,y);var x="",E=0;if(e.options.indentWithTabs)for(var P=Math.floor(y/a);P;--P)E+=a,x+=" ";if(E<y&&(x+=je(y-E)),x!=f)return qr(i,x,T(t,0),T(t,f.length),"+input"),l.stateAfter=null,!0;for(var q=0;q<i.sel.ranges.length;q++){var Q=i.sel.ranges[q];if(Q.head.line==t&&Q.head.ch<f.length){var ee=T(t,f.length);Vi(i,q,new Pe(ee,ee));break}}}var It=null;function hi(e){It=e}function ao(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=nn(t),f=null;if(l&&r.ranges.length>1)if(It&&It.text.join(`
`)==t){if(r.ranges.length%It.text.length==0){f=[];for(var y=0;y<It.text.length;y++)f.push(o.splitLines(It.text[y]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=kt(s,function(ne){return[ne]}));for(var x=e.curOp.updateInput,E=r.ranges.length-1;E>=0;E--){var P=r.ranges[E],q=P.from(),Q=P.to();P.empty()&&(n&&n>0?q=T(q.line,q.ch-n):e.state.overwrite&&!l?Q=T(Q.line,Math.min(se(o,Q.line).text.length,Q.ch+be(s).length)):l&&It&&It.lineWise&&It.text.join(`
`)==s.join(`
`)&&(q=Q=T(q.line,0)));var ee={from:q,to:Q,text:f?f[E%f.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Gr(e.doc,ee),$e(e,"inputRead",e,ee)}t&&!l&&al(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=x),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ol(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&St(t,function(){return ao(t,n,0,null,"paste")}),!0}function al(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=Mn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Mn(e,i.head.line,"smart"));a&&$e(e,"electricInput",e,i.head.line)}}}function ll(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:T(i,0),head:T(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function lo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function sl(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return A?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),t}function yu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){Qe(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,a=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&&et(this,t[r])(this,i,a),Ee(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](ui(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:dt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");mr(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,gt(this)}),removeOverlay:dt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==r||typeof r=="string"&&a.name==r){i.splice(o,1),this.state.modeGen++,gt(this);return}}}),indentLine:dt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),h(this.doc,r)&&Mn(this,r,i,o)}),indentSelection:dt(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Mn(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Rr(this));else{var s=l.from(),f=l.to(),y=Math.max(o,s.line);o=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var x=y;x<o;++x)Mn(this,x,r);var E=this.doc.sel.ranges;s.ch==0&&i.length==E.length&&E[a].from().ch>0&&Vi(this.doc,a,new Pe(s,E[a].to()),We)}}}),getTokenAt:function(r,i){return yo(this,r,i)},getLineTokens:function(r,i){return yo(this,T(r),i,!0)},getTokenTypeAt:function(r){r=ge(this.doc,r);var i=vo(this,se(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var f=o+a>>1;if((f?i[f*2-1]:0)>=l)a=f;else if(i[f*2+1]<l)o=f+1;else{s=i[f*2+2];break}}var y=s?s.indexOf("overlay "):-1;return y<0?s:y==0?null:s.slice(0,y-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var a=n[i],l=this.getModeAt(r);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var f=a[l[i][s]];f&&o.push(f)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var y=0;y<a._global.length;y++){var x=a._global[y];x.pred(l,this)&&ke(o,x.val)==-1&&o.push(x.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=Tt(o,r??o.first+o.size-1),an(this,r+1,i).state},cursorCoords:function(r,i){var o,a=this.doc.sel.primary();return r==null?o=a.head:typeof r=="object"?o=ge(this.doc,r):o=r?a.from():a.to(),Et(this,o,i||"page")},charCoords:function(r,i){return Yn(this,ge(this.doc,r),i||"page")},coordsChar:function(r,i){return r=jo(this,r,i||"page"),Di(this,r.left,r.top)},lineAtHeight:function(r,i){return r=jo(this,{top:r,left:0},i||"page").top,_t(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var a=!1,l;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,a=!0),l=se(this.doc,r)}else l=r;return jn(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-$t(l):0)},defaultTextHeight:function(){return Br(this.display)},defaultCharWidth:function(){return Hr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,a,l){var s=this.display;r=Et(this,ge(this.doc,r));var f=r.bottom,y=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")f=r.top;else if(a=="above"||a=="near"){var x=Math.max(s.wrapper.clientHeight,this.doc.height),E=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>x)&&r.top>i.offsetHeight?f=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=x&&(f=r.bottom),y+i.offsetWidth>E&&(y=E-i.offsetWidth)}i.style.top=f+"px",i.style.left=i.style.right="",l=="right"?(y=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?y=0:l=="middle"&&(y=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=y+"px"),o&&vs(this,{left:y,top:f,right:y+i.offsetWidth,bottom:f+i.offsetHeight})},triggerOnKeyDown:dt(Qa),triggerOnKeyPress:dt(Va),triggerOnKeyUp:Ja,triggerOnMouseDown:dt($a),execCommand:function(r){if(On.hasOwnProperty(r))return On[r].call(null,this)},triggerElectric:dt(function(r){al(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=ge(this.doc,r),f=0;f<i&&(s=so(this.doc,s,l,o,a),!s.hitSide);++f);return s},moveH:dt(function(r,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?so(o.doc,a.head,r,i,o.options.rtlMoveVisually):r<0?a.from():a.to()},Ht)}),deleteH:dt(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Yr(this,function(l){var s=so(a,l.head,r,i,!1);return r<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(r,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var f=ge(this.doc,r),y=0;y<i;++y){var x=Et(this,f,"div");if(s==null?s=x.left:x.left=s,f=ul(this,x,l,o),f.hitSide)break}return f},moveV:dt(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(y){if(s)return r<0?y.from():y.to();var x=Et(o,y.head,"div");y.goalColumn!=null&&(x.left=y.goalColumn),l.push(x.left);var E=ul(o,x,r,i);return i=="page"&&y==a.sel.primary()&&Ki(o,Yn(o,E,"div").top-x.top),E},Ht),l.length)for(var f=0;f<a.sel.ranges.length;f++)a.sel.ranges[f].goalColumn=l[f]}),findWordAt:function(r){var i=this.doc,o=se(i,r.line).text,a=r.ch,l=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||l==o.length)&&a?--a:++l;for(var f=o.charAt(a),y=Se(f,s)?function(x){return Se(x,s)}:/\s/.test(f)?function(x){return/\s/.test(x)}:function(x){return!/\s/.test(x)&&!Se(x)};a>0&&y(o.charAt(a-1));)--a;for(;l<o.length&&y(o.charAt(l));)++l}return new Pe(T(r.line,a),T(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?fe(this.display.cursorDiv,"CodeMirror-overwrite"):U(this.display.cursorDiv,"CodeMirror-overwrite"),Ee(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ue(Te(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dt(function(r,i){dn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-qt(this)-this.display.barHeight,width:r.scrollWidth-qt(this)-this.display.barWidth,clientHeight:Ai(this),clientWidth:xr(this)}},scrollIntoView:dt(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:T(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?gs(this,r):ra(this,r.from,r.to,r.margin)}),setSize:dt(function(r,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=a(r)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&Go(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var f=0;f<s.widgets.length;f++)if(s.widgets[f].noHScroll){ur(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Ee(this,"refresh",this)}),operation:function(r){return St(this,r)},startOperation:function(){return Tr(this)},endOperation:function(){return Ar(this)},refresh:dt(function(){var r=this.display.cachedTextHeight;gt(this),this.curOp.forceUpdate=!0,cn(this),dn(this,this.doc.scrollLeft,this.doc.scrollTop),Gi(this.display),(r==null||Math.abs(r-Br(this.display))>.5||this.options.lineWrapping)&&Wi(this),Ee(this,"refresh",this)}),swapDoc:dt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ga(this,r),cn(this),this.display.input.reset(),dn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,$e(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ht(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,a){e.registerHelper(r,i,a),n[r]._global.push({pred:o,val:a})}}function so(e,t,n,r,i){var o=t,a=n,l=se(e,t.line),s=i&&e.direction=="rtl"?-n:n;function f(){var ae=t.line+s;return ae<e.first||ae>=e.first+e.size?!1:(t=new T(ae,t.ch,t.sticky),l=se(e,ae))}function y(ae){var ie;if(r=="codepoint"){var le=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(le))ie=null;else{var de=n>0?le>=55296&&le<56320:le>=56320&&le<57343;ie=new T(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(de?2:1))),-n)}}else i?ie=$s(e.cm,l,t,n):ie=eo(l,t,n);if(ie==null)if(!ae&&f())t=to(i,e.cm,l,t.line,s);else return!1;else t=ie;return!0}if(r=="char"||r=="codepoint")y();else if(r=="column")y(!0);else if(r=="word"||r=="group")for(var x=null,E=r=="group",P=e.cm&&e.cm.getHelper(t,"wordChars"),q=!0;!(n<0&&!y(!q));q=!1){var Q=l.text.charAt(t.ch)||`
`,ee=Se(Q,P)?"w":E&&Q==`
`?"n":!E||/\s/.test(Q)?null:"p";if(E&&!q&&!ee&&(ee="s"),x&&x!=ee){n<0&&(n=1,y(),t.sticky="after");break}if(ee&&(x=ee),n>0&&!y(!q))break}var ne=ai(e,t,o,a,!0);return ve(o,ne)&&(ne.hitSide=!0),ne}function ul(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,Qe(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Br(e.display),3);a=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(a=n>0?t.bottom+3:t.top-3);for(var f;f=Di(e,o,a),!!f.outside;){if(n<0?a<=0:a>=i.height){f.hitSide=!0;break}a+=n*5}return f}var De=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ye,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};De.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,lo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}oe(i,"paste",function(l){!o(l)||Ke(r,l)||ol(l,r)||X<=11&&setTimeout(et(r,function(){return t.updateFromDOM()}),20)}),oe(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),oe(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),oe(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),oe(i,"touchstart",function(){return n.forceCompositionEnd()}),oe(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Ke(r,l))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ll(r);hi({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,We),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var f=It.text.join(`
`);if(l.clipboardData.setData("Text",f),l.clipboardData.getData("Text")==f){l.preventDefault();return}}var y=sl(),x=y.firstChild;lo(x),r.display.lineSpace.insertBefore(y,r.display.lineSpace.firstChild),x.value=It.text.join(`
`);var E=ue(i.ownerDocument);Ie(x),setTimeout(function(){r.display.lineSpace.removeChild(y),E.focus(),E==i&&n.showPrimarySelection()},50)}}oe(i,"copy",a),oe(i,"cut",a)},De.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},De.prototype.prepareSelection=function(){var e=$o(this.cm,!1);return e.focus=ue(this.div.ownerDocument)==this.div,e},De.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},De.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},De.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=di(t,e.anchorNode,e.anchorOffset),a=di(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&G(Je(o,a),r)==0&&G(Ae(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&fl(t,r)||{node:l[0].measure.map[2],offset:0},f=i.line<t.display.viewTo&&fl(t,i);if(!f){var y=l[l.length-1].measure,x=y.maps?y.maps[y.maps.length-1]:y.map;f={node:x[x.length-1],offset:x[x.length-2]-x[x.length-3]}}if(!s||!f){e.removeAllRanges();return}var E=e.rangeCount&&e.getRangeAt(0),P;try{P=Y(s.node,s.offset,f.offset,f.node)}catch{}P&&(!R&&t.state.focused?(e.collapse(s.node,s.offset),P.collapsed||(e.removeAllRanges(),e.addRange(P))):(e.removeAllRanges(),e.addRange(P)),E&&e.anchorNode==null?e.addRange(E):R&&this.startGracePeriod()),this.rememberSelection()}},De.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)},De.prototype.showMultipleSelections=function(e){_(this.cm.display.cursorDiv,e.cursors),_(this.cm.display.selectionDiv,e.selection)},De.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},De.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return re(this.div,t)},De.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ue(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},De.prototype.blur=function(){this.div.blur()},De.prototype.getField=function(){return this.div},De.prototype.supportsTouch=function(){return!0},De.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):St(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},De.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},De.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(g&&C&&this.cm.display.gutterSpecs.length&&bu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=di(t,e.anchorNode,e.anchorOffset),r=di(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){st(t.doc,cr(n,r),We),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},De.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=T(r.line-1,se(e.doc,r.line-1).length)),i.ch==se(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=T(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=Sr(e,r.line))==0?(a=Ne(t.view[0].line),l=t.view[0].node):(a=Ne(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=Sr(e,i.line),f,y;if(s==t.view.length-1?(f=t.viewTo-1,y=t.lineDiv.lastChild):(f=Ne(t.view[s+1].line)-1,y=t.view[s+1].node.previousSibling),!l)return!1;for(var x=e.doc.splitLines(xu(e,l,y,a,f)),E=Jt(e.doc,T(a,0),T(f,se(e.doc,f).text.length));x.length>1&&E.length>1;)if(be(x)==be(E))x.pop(),E.pop(),f--;else if(x[0]==E[0])x.shift(),E.shift(),a++;else break;for(var P=0,q=0,Q=x[0],ee=E[0],ne=Math.min(Q.length,ee.length);P<ne&&Q.charCodeAt(P)==ee.charCodeAt(P);)++P;for(var ae=be(x),ie=be(E),le=Math.min(ae.length-(x.length==1?P:0),ie.length-(E.length==1?P:0));q<le&&ae.charCodeAt(ae.length-q-1)==ie.charCodeAt(ie.length-q-1);)++q;if(x.length==1&&E.length==1&&a==r.line)for(;P&&P>r.ch&&ae.charCodeAt(ae.length-q-1)==ie.charCodeAt(ie.length-q-1);)P--,q++;x[x.length-1]=ae.slice(0,ae.length-q).replace(/^\u200b+/,""),x[0]=x[0].slice(P).replace(/\u200b+$/,"");var de=T(a,P),he=T(f,E.length?be(E).length-q:0);if(x.length>1||x[0]||G(de,he))return qr(e.doc,x,de,he,"+input"),!0},De.prototype.ensurePolled=function(){this.forceCompositionEnd()},De.prototype.reset=function(){this.forceCompositionEnd()},De.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},De.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},De.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&St(this.cm,function(){return gt(e.cm)})},De.prototype.setUneditable=function(e){e.contentEditable="false"},De.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||et(this.cm,ao)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},De.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},De.prototype.onContextMenu=function(){},De.prototype.resetPosition=function(){},De.prototype.needsContentAttribute=!0;function fl(e,t){var n=Oi(e,t.line);if(!n||n.hidden)return null;var r=se(e.doc,t.line),i=zo(n,r,t.line),o=Nt(r,e.doc.direction),a="left";if(o){var l=Ot(o,t.ch);a=l%2?"right":"left"}var s=Uo(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function bu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Qr(e,t){return t&&(e.bad=!0),e}function xu(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function f(P){return function(q){return q.id==P}}function y(){a&&(o+=l,s&&(o+=l),a=s=!1)}function x(P){P&&(y(),o+=P)}function E(P){if(P.nodeType==1){var q=P.getAttribute("cm-text");if(q){x(q);return}var Q=P.getAttribute("cm-marker"),ee;if(Q){var ne=e.findMarks(T(r,0),T(i+1,0),f(+Q));ne.length&&(ee=ne[0].find(0))&&x(Jt(e.doc,ee.from,ee.to).join(l));return}if(P.getAttribute("contenteditable")=="false")return;var ae=/^(pre|div|p|li|table|br)$/i.test(P.nodeName);if(!/^br$/i.test(P.nodeName)&&P.textContent.length==0)return;ae&&y();for(var ie=0;ie<P.childNodes.length;ie++)E(P.childNodes[ie]);/^(pre|p)$/i.test(P.nodeName)&&(s=!0),ae&&(a=!0)}else P.nodeType==3&&x(P.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;E(t),t!=n;)t=t.nextSibling,s=!1;return o}function di(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Qr(e.clipPos(T(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 ku(o,t,n)}}function ku(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!re(r,t))return Qr(T(Ne(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?be(e.rest):e.line;return Qr(T(Ne(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=e.measure,f=s.maps;function y(ee,ne,ae){for(var ie=-1;ie<(f?f.length:0);ie++)for(var le=ie<0?s.map:f[ie],de=0;de<le.length;de+=3){var he=le[de+2];if(he==ee||he==ne){var xe=Ne(ie<0?e.line:e.rest[ie]),Me=le[de]+ae;return(ae<0||he!=ee)&&(Me=le[de+(ae?1:0)]),T(xe,Me)}}}var x=y(a,l,n);if(x)return Qr(x,i);for(var E=l.nextSibling,P=a?a.nodeValue.length-n:0;E;E=E.nextSibling){if(x=y(E,E.firstChild,0),x)return Qr(T(x.line,x.ch-P),i);P+=E.textContent.length}for(var q=l.previousSibling,Q=n;q;q=q.previousSibling){if(x=y(q,q.firstChild,-1),x)return Qr(T(x.line,x.ch+Q),i);Q+=q.textContent.length}}var Xe=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ye,this.hasSelection=!1,this.composing=null,this.resetting=!1};Xe.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),v&&(i.style.width="0px"),oe(i,"input",function(){I&&X>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),oe(i,"paste",function(a){Ke(r,a)||ol(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!Ke(r,a)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=ll(r);hi({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,We):(n.prevInput="",i.value=l.text.join(`
`),Ie(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}oe(i,"cut",o),oe(i,"copy",o),oe(e.scroller,"paste",function(a){if(!(er(e,a)||Ke(r,a))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),oe(e.lineSpace,"selectstart",function(a){er(e,a)||lt(a)}),oe(i,"compositionstart",function(){var a=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:a,range:r.markText(a,r.getCursor("to"),{className:"CodeMirror-composing"})}}),oe(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Xe.prototype.createField=function(e){this.wrapper=sl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;lo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Xe.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xe.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=$o(e);if(e.options.moveInputWithCursor){var i=Et(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},Xe.prototype.showSelection=function(e){var t=this.cm,n=t.display;_(n.cursorDiv,e.cursors),_(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xe.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&&Ie(this.textarea),I&&X>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",I&&X>=9&&(this.hasSelection=null));this.resetting=!1}},Xe.prototype.getField=function(){return this.textarea},Xe.prototype.supportsTouch=function(){return!1},Xe.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||ue(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},Xe.prototype.blur=function(){this.textarea.blur()},Xe.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xe.prototype.receivedFocus=function(){this.slowPoll()},Xe.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Xe.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},Xe.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ir(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(I&&X>=9&&this.hasSelection===i||p&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return St(t,function(){ao(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xe.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xe.prototype.onKeyPress=function(){I&&X>=9&&(this.hasSelection=null),this.fastPoll()},Xe.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=wr(n,e),a=r.scroller.scrollTop;if(!o||W)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&et(n,st)(n.doc,cr(o),We);var s=i.style.cssText,f=t.wrapper.style.cssText,y=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-y.top-5)+"px; left: "+(e.clientX-y.left-5)+`px;
z-index: 1000; background: `+(I?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var x;A&&(x=i.ownerDocument.defaultView.scrollY),r.input.focus(),A&&i.ownerDocument.defaultView.scrollTo(null,x),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=P,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function E(){if(i.selectionStart!=null){var Q=n.somethingSelected(),ee="​"+(Q?i.value:"");i.value="⇚",i.value=ee,t.prevInput=Q?"":"​",i.selectionStart=1,i.selectionEnd=ee.length,r.selForContextMenu=n.doc.sel}}function P(){if(t.contextMenuPending==P&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=s,I&&X<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!I||I&&X<9)&&E();var Q=0,ee=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?et(n,Na)(n):Q++<10?r.detectingSelectAll=setTimeout(ee,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ee,200)}}if(I&&X>=9&&E(),F){Yt(e);var q=function(){at(window,"mouseup",q),setTimeout(P,20)};oe(window,"mouseup",q)}else setTimeout(P,50)},Xe.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xe.prototype.setUneditable=function(){},Xe.prototype.needsContentAttribute=!1;function wu(e,t){if(t=t?pe(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=ue(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(oe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(at(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Be(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function Su(e){e.off=at,e.on=oe,e.wheelEventPixels=Ps,e.Doc=mt,e.splitLines=nn,e.countColumn=ce,e.findColumn=Lt,e.isWordChar=j,e.Pass=me,e.signal=Ee,e.Line=Er,e.changeEnd=hr,e.scrollbarModel=oa,e.Pos=T,e.cmpPos=G,e.modes=Mt,e.mimeModes=or,e.resolveMode=wt,e.getMode=Zt,e.modeExtensions=ar,e.extendMode=Hn,e.copyState=Qt,e.startState=on,e.innerMode=lr,e.commands=On,e.keyMap=rr,e.keyName=qa,e.isModifierKey=_a,e.lookupKey=jr,e.normalizeKeyMap=Vs,e.StringStream=Ue,e.SharedTextMarker=Ln,e.TextMarker=pr,e.LineWidget=Cn,e.e_preventDefault=lt,e.e_stopPropagation=br,e.e_stop=Yt,e.addClass=fe,e.contains=re,e.rmClass=U,e.keyNames=vr}pu(Be),yu(Be);var Cu="iter insert remove copy getEditor constructor".split(" ");for(var pi in mt.prototype)mt.prototype.hasOwnProperty(pi)&&ke(Cu,pi)<0&&(Be.prototype[pi]=function(e){return function(){return e.apply(this.doc,arguments)}}(mt.prototype[pi]));return ht(mt),Be.inputStyles={textarea:Xe,contenteditable:De},Be.defineMode=function(e){!Be.defaults.mode&&e!="null"&&(Be.defaults.mode=e),Bn.apply(this,arguments)},Be.defineMIME=Mr,Be.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Be.defineMIME("text/plain","null"),Be.defineExtension=function(e,t){Be.prototype[e]=t},Be.defineDocExtension=function(e,t){mt.prototype[e]=t},Be.fromTextArea=wu,Su(Be),Be.version="5.65.13",Be})})(Cl);var it=Cl.exports;const Eu=Au(it);var Wu={exports:{}};(function(ze,Ge){(function(b){b(it)})(function(b){b.defineMode("javascript",function(K,R){var V=K.indentUnit,$=R.statementIndent,B=R.jsonld,I=R.json||B,X=R.trackScope!==!1,A=R.typescript,H=R.wordCharacters||/[\w$\xa1-\uffff]/,C=function(){function h(Je){return{type:Je,style:"keyword"}}var S=h("keyword a"),T=h("keyword b"),G=h("keyword c"),ve=h("keyword d"),Le=h("operator"),Ae={type:"atom",style:"atom"};return{if:h("if"),while:S,with:S,else:T,do:T,try:T,finally:T,return:ve,break:ve,continue:ve,new:h("new"),delete:G,void:G,throw:G,debugger:h("debugger"),var:h("var"),const:h("var"),let:h("var"),function:h("function"),catch:h("catch"),for:h("for"),switch:h("switch"),case:h("case"),default:h("default"),in:Le,typeof:Le,instanceof:Le,true:Ae,false:Ae,null:Ae,undefined:Ae,NaN:Ae,Infinity:Ae,this:h("this"),class:h("class"),super:h("atom"),yield:G,export:h("export"),import:h("import"),extends:G,await:G}}(),D=/[+\-*&%=<>!?|~^@]/,W=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function J(h){for(var S=!1,T,G=!1;(T=h.next())!=null;){if(!S){if(T=="/"&&!G)return;T=="["?G=!0:G&&T=="]"&&(G=!1)}S=!S&&T=="\\"}}var M,w;function v(h,S,T){return M=h,w=T,S}function g(h,S){var T=h.next();if(T=='"'||T=="'")return S.tokenize=u(T),S.tokenize(h,S);if(T=="."&&h.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if(T=="."&&h.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(T))return v(T);if(T=="="&&h.eat(">"))return v("=>","operator");if(T=="0"&&h.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(T))return h.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if(T=="/")return h.eat("*")?(S.tokenize=p,p(h,S)):h.eat("/")?(h.skipToEnd(),v("comment","comment")):_t(h,S,1)?(J(h),h.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(h.eat("="),v("operator","operator",h.current()));if(T=="`")return S.tokenize=m,m(h,S);if(T=="#"&&h.peek()=="!")return h.skipToEnd(),v("meta","meta");if(T=="#"&&h.eatWhile(H))return v("variable","property");if(T=="<"&&h.match("!--")||T=="-"&&h.match("->")&&!/\S/.test(h.string.slice(0,h.start)))return h.skipToEnd(),v("comment","comment");if(D.test(T))return(T!=">"||!S.lexical||S.lexical.type!=">")&&(h.eat("=")?(T=="!"||T=="=")&&h.eat("="):/[<>*+\-|&?]/.test(T)&&(h.eat(T),T==">"&&h.eat(T))),T=="?"&&h.eat(".")?v("."):v("operator","operator",h.current());if(H.test(T)){h.eatWhile(H);var G=h.current();if(S.lastType!="."){if(C.propertyIsEnumerable(G)){var ve=C[G];return v(ve.type,ve.style,G)}if(G=="async"&&h.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",G)}return v("variable","variable",G)}}function u(h){return function(S,T){var G=!1,ve;if(B&&S.peek()=="@"&&S.match(W))return T.tokenize=g,v("jsonld-keyword","meta");for(;(ve=S.next())!=null&&!(ve==h&&!G);)G=!G&&ve=="\\";return G||(T.tokenize=g),v("string","string")}}function p(h,S){for(var T=!1,G;G=h.next();){if(G=="/"&&T){S.tokenize=g;break}T=G=="*"}return v("comment","comment")}function m(h,S){for(var T=!1,G;(G=h.next())!=null;){if(!T&&(G=="`"||G=="$"&&h.eat("{"))){S.tokenize=g;break}T=!T&&G=="\\"}return v("quasi","string-2",h.current())}var k="([{}])";function d(h,S){S.fatArrowAt&&(S.fatArrowAt=null);var T=h.string.indexOf("=>",h.start);if(!(T<0)){if(A){var G=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(h.string.slice(h.start,T));G&&(T=G.index)}for(var ve=0,Le=!1,Ae=T-1;Ae>=0;--Ae){var Je=h.string.charAt(Ae),Tt=k.indexOf(Je);if(Tt>=0&&Tt<3){if(!ve){++Ae;break}if(--ve==0){Je=="("&&(Le=!0);break}}else if(Tt>=3&&Tt<6)++ve;else if(H.test(Je))Le=!0;else if(/["'\/`]/.test(Je))for(;;--Ae){if(Ae==0)return;var ge=h.string.charAt(Ae-1);if(ge==Je&&h.string.charAt(Ae-2)!="\\"){Ae--;break}}else if(Le&&!ve){++Ae;break}}Le&&!ve&&(S.fatArrowAt=Ae)}}var L={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function F(h,S,T,G,ve,Le){this.indented=h,this.column=S,this.type=T,this.prev=ve,this.info=Le,G!=null&&(this.align=G)}function N(h,S){if(!X)return!1;for(var T=h.localVars;T;T=T.next)if(T.name==S)return!0;for(var G=h.context;G;G=G.prev)for(var T=G.vars;T;T=T.next)if(T.name==S)return!0}function U(h,S,T,G,ve){var Le=h.cc;for(O.state=h,O.stream=ve,O.marked=null,O.cc=Le,O.style=S,h.lexical.hasOwnProperty("align")||(h.lexical.align=!0);;){var Ae=Le.length?Le.pop():I?me:ke;if(Ae(T,G)){for(;Le.length&&Le[Le.length-1].lex;)Le.pop()();return O.marked?O.marked:T=="variable"&&N(h,G)?"variable-2":S}}}var O={state:null,column:null,marked:null,cc:null};function _(){for(var h=arguments.length-1;h>=0;h--)O.cc.push(arguments[h])}function c(){return _.apply(null,arguments),!0}function Z(h,S){for(var T=S;T;T=T.next)if(T.name==h)return!0;return!1}function Y(h){var S=O.state;if(O.marked="def",!!X){if(S.context){if(S.lexical.info=="var"&&S.context&&S.context.block){var T=re(h,S.context);if(T!=null){S.context=T;return}}else if(!Z(h,S.localVars)){S.localVars=new Ce(h,S.localVars);return}}R.globalVars&&!Z(h,S.globalVars)&&(S.globalVars=new Ce(h,S.globalVars))}}function re(h,S){if(S)if(S.block){var T=re(h,S.prev);return T?T==S.prev?S:new fe(T,S.vars,!0):null}else return Z(h,S.vars)?S:new fe(S.prev,new Ce(h,S.vars),!1);else return null}function ue(h){return h=="public"||h=="private"||h=="protected"||h=="abstract"||h=="readonly"}function fe(h,S,T){this.prev=h,this.vars=S,this.block=T}function Ce(h,S){this.name=h,this.next=S}var Ie=new Ce("this",new Ce("arguments",null));function Te(){O.state.context=new fe(O.state.context,O.state.localVars,!1),O.state.localVars=Ie}function Qe(){O.state.context=new fe(O.state.context,O.state.localVars,!0),O.state.localVars=null}Te.lex=Qe.lex=!0;function qe(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}qe.lex=!0;function pe(h,S){var T=function(){var G=O.state,ve=G.indented;if(G.lexical.type=="stat")ve=G.lexical.indented;else for(var Le=G.lexical;Le&&Le.type==")"&&Le.align;Le=Le.prev)ve=Le.indented;G.lexical=new F(ve,O.stream.column(),h,null,G.lexical,S)};return T.lex=!0,T}function ce(){var h=O.state;h.lexical.prev&&(h.lexical.type==")"&&(h.indented=h.lexical.indented),h.lexical=h.lexical.prev)}ce.lex=!0;function ye(h){function S(T){return T==h?c():h==";"||T=="}"||T==")"||T=="]"?_():c(S)}return S}function ke(h,S){return h=="var"?c(pe("vardef",S),Yt,ye(";"),ce):h=="keyword a"?c(pe("form"),Bt,ke,ce):h=="keyword b"?c(pe("form"),ke,ce):h=="keyword d"?O.stream.match(/^\s*$/,!1)?c():c(pe("stat"),Lt,ye(";"),ce):h=="debugger"?c(ye(";")):h=="{"?c(pe("}"),Qe,Rt,ce,qe):h==";"?c():h=="if"?(O.state.lexical.info=="else"&&O.state.cc[O.state.cc.length-1]==ce&&O.state.cc.pop()(),c(pe("form"),Bt,ke,ce,Dr)):h=="function"?c(Kt):h=="for"?c(pe("form"),Qe,Wn,ke,qe,ce):h=="class"||A&&S=="interface"?(O.marked="keyword",c(pe("form",h=="class"?h:S),Bn,ce)):h=="variable"?A&&S=="declare"?(O.marked="keyword",c(ke)):A&&(S=="module"||S=="enum"||S=="type")&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword",S=="enum"?c(Fr):S=="type"?c(In,ye("operator"),oe,ye(";")):c(pe("form"),vt,ye("{"),pe("}"),Rt,ce,ce)):A&&S=="namespace"?(O.marked="keyword",c(pe("form"),me,ke,ce)):A&&S=="abstract"?(O.marked="keyword",c(ke)):c(pe("stat"),Se):h=="switch"?c(pe("form"),Bt,ye("{"),pe("}","switch"),Qe,Rt,ce,ce,qe):h=="case"?c(me,ye(":")):h=="default"?c(ye(":")):h=="catch"?c(pe("form"),Te,we,ke,ce,qe):h=="export"?c(pe("stat"),ar,ce):h=="import"?c(pe("stat"),Qt,ce):h=="async"?c(ke):S=="@"?c(me,ke):_(pe("stat"),me,ye(";"),ce)}function we(h){if(h=="(")return c(Mt,ye(")"))}function me(h,S){return Ht(h,S,!1)}function We(h,S){return Ht(h,S,!0)}function Bt(h){return h!="("?_():c(pe(")"),Lt,ye(")"),ce)}function Ht(h,S,T){if(O.state.fatArrowAt==O.stream.start){var G=T?Fe:mr;if(h=="(")return c(Te,pe(")"),Re(Mt,")"),ce,ye("=>"),G,qe);if(h=="variable")return _(Te,vt,ye("=>"),G,qe)}var ve=T?je:Oe;return L.hasOwnProperty(h)?c(ve):h=="function"?c(Kt,ve):h=="class"||A&&S=="interface"?(O.marked="keyword",c(pe("form"),or,ce)):h=="keyword c"||h=="async"?c(T?We:me):h=="("?c(pe(")"),Lt,ye(")"),ce,ve):h=="operator"||h=="spread"?c(T?We:me):h=="["?c(pe("]"),Jt,ce,ve):h=="{"?yr(Pr,"}",null,ve):h=="quasi"?_(be,ve):h=="new"?c(z(T)):c()}function Lt(h){return h.match(/[;\}\)\],]/)?_():_(me)}function Oe(h,S){return h==","?c(Lt):je(h,S,!1)}function je(h,S,T){var G=T==!1?Oe:je,ve=T==!1?me:We;if(h=="=>")return c(Te,T?Fe:mr,qe);if(h=="operator")return/\+\+|--/.test(S)||A&&S=="!"?c(G):A&&S=="<"&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?c(pe(">"),Re(oe,">"),ce,G):S=="?"?c(me,ye(":"),ve):c(ve);if(h=="quasi")return _(be,G);if(h!=";"){if(h=="(")return yr(We,")","call",G);if(h==".")return c(ft,G);if(h=="[")return c(pe("]"),Lt,ye("]"),ce,G);if(A&&S=="as")return O.marked="keyword",c(oe,G);if(h=="regexp")return O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),c(ve)}}function be(h,S){return h!="quasi"?_():S.slice(S.length-2)!="${"?c(be):c(Lt,kt)}function kt(h){if(h=="}")return O.marked="string-2",O.state.tokenize=m,c(be)}function mr(h){return d(O.stream,O.state),_(h=="{"?ke:me)}function Fe(h){return d(O.stream,O.state),_(h=="{"?ke:We)}function z(h){return function(S){return S=="."?c(h?j:te):S=="variable"&&A?c(lt,h?je:Oe):_(h?We:me)}}function te(h,S){if(S=="target")return O.marked="keyword",c(Oe)}function j(h,S){if(S=="target")return O.marked="keyword",c(je)}function Se(h){return h==":"?c(ce,ke):_(Oe,ye(";"),ce)}function ft(h){if(h=="variable")return O.marked="property",c()}function Pr(h,S){if(h=="async")return O.marked="property",c(Pr);if(h=="variable"||O.style=="keyword"){if(O.marked="property",S=="get"||S=="set")return c($r);var T;return A&&O.state.fatArrowAt==O.stream.start&&(T=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+T[0].length),c(zt)}else{if(h=="number"||h=="string")return O.marked=B?"property":O.style+" property",c(zt);if(h=="jsonld-keyword")return c(zt);if(A&&ue(S))return O.marked="keyword",c(Pr);if(h=="[")return c(me,Ot,ye("]"),zt);if(h=="spread")return c(We,zt);if(S=="*")return O.marked="keyword",c(Pr);if(h==":")return _(zt)}}function $r(h){return h!="variable"?_(zt):(O.marked="property",c(Kt))}function zt(h){if(h==":")return c(We);if(h=="(")return _(Kt)}function Re(h,S,T){function G(ve,Le){if(T?T.indexOf(ve)>-1:ve==","){var Ae=O.state.lexical;return Ae.info=="call"&&(Ae.pos=(Ae.pos||0)+1),c(function(Je,Tt){return Je==S||Tt==S?_():_(h)},G)}return ve==S||Le==S?c():T&&T.indexOf(";")>-1?_(h):c(ye(S))}return function(ve,Le){return ve==S||Le==S?c():_(h,G)}}function yr(h,S,T){for(var G=3;G<arguments.length;G++)O.cc.push(arguments[G]);return c(pe(S,T),Re(h,S),ce)}function Rt(h){return h=="}"?c():_(ke,Rt)}function Ot(h,S){if(A){if(h==":")return c(oe);if(S=="?")return c(Ot)}}function vi(h,S){if(A&&(h==":"||S=="in"))return c(oe)}function Nt(h){if(A&&h==":")return O.stream.match(/^\s*\w+\s+is\b/,!1)?c(me,Fn,oe):c(oe)}function Fn(h,S){if(S=="is")return O.marked="keyword",c()}function oe(h,S){if(S=="keyof"||S=="typeof"||S=="infer"||S=="readonly")return O.marked="keyword",c(S=="typeof"?We:oe);if(h=="variable"||S=="void")return O.marked="type",c(ht);if(S=="|"||S=="&")return c(oe);if(h=="string"||h=="number"||h=="atom")return c(ht);if(h=="[")return c(pe("]"),Re(oe,"]",","),ce,ht);if(h=="{")return c(pe("}"),at,ce,ht);if(h=="(")return c(Re(ct,")"),en,ht);if(h=="<")return c(Re(oe,">"),oe);if(h=="quasi")return _(Ke,ht)}function en(h){if(h=="=>")return c(oe)}function at(h){return h.match(/[\}\)\]]/)?c():h==","||h==";"?c(at):_(Ee,at)}function Ee(h,S){if(h=="variable"||O.style=="keyword")return O.marked="property",c(Ee);if(S=="?"||h=="number"||h=="string")return c(Ee);if(h==":")return c(oe);if(h=="[")return c(ye("variable"),vi,ye("]"),Ee);if(h=="(")return _(Ut,Ee);if(!h.match(/[;\}\)\],]/))return c()}function Ke(h,S){return h!="quasi"?_():S.slice(S.length-2)!="${"?c(Ke):c(oe,En)}function En(h){if(h=="}")return O.marked="string-2",O.state.tokenize=m,c(Ke)}function ct(h,S){return h=="variable"&&O.stream.match(/^\s*[?:]/,!1)||S=="?"?c(ct):h==":"?c(oe):h=="spread"?c(ct):_(oe)}function ht(h,S){if(S=="<")return c(pe(">"),Re(oe,">"),ce,ht);if(S=="|"||h=="."||S=="&")return c(oe);if(h=="[")return c(oe,ye("]"),ht);if(S=="extends"||S=="implements")return O.marked="keyword",c(oe);if(S=="?")return c(oe,ye(":"),oe)}function lt(h,S){if(S=="<")return c(pe(">"),Re(oe,">"),ce,ht)}function br(){return _(oe,tn)}function tn(h,S){if(S=="=")return c(oe)}function Yt(h,S){return S=="enum"?(O.marked="keyword",c(Fr)):_(vt,Ot,Pt,mi)}function vt(h,S){if(A&&ue(S))return O.marked="keyword",c(vt);if(h=="variable")return Y(S),c();if(h=="spread")return c(vt);if(h=="[")return yr(gi,"]");if(h=="{")return yr(rn,"}")}function rn(h,S){return h=="variable"&&!O.stream.match(/^\s*:/,!1)?(Y(S),c(Pt)):(h=="variable"&&(O.marked="property"),h=="spread"?c(vt):h=="}"?_():h=="["?c(me,ye("]"),ye(":"),rn):c(ye(":"),vt,Pt))}function gi(){return _(vt,Pt)}function Pt(h,S){if(S=="=")return c(We)}function mi(h){if(h==",")return c(Yt)}function Dr(h,S){if(h=="keyword b"&&S=="else")return c(pe("form","else"),ke,ce)}function Wn(h,S){if(S=="await")return c(Wn);if(h=="(")return c(pe(")"),nn,ce)}function nn(h){return h=="var"?c(Yt,ir):h=="variable"?c(ir):_(ir)}function ir(h,S){return h==")"?c():h==";"?c(ir):S=="in"||S=="of"?(O.marked="keyword",c(me,ir)):_(me,ir)}function Kt(h,S){if(S=="*")return O.marked="keyword",c(Kt);if(h=="variable")return Y(S),c(Kt);if(h=="(")return c(Te,pe(")"),Re(Mt,")"),ce,Nt,ke,qe);if(A&&S=="<")return c(pe(">"),Re(br,">"),ce,Kt)}function Ut(h,S){if(S=="*")return O.marked="keyword",c(Ut);if(h=="variable")return Y(S),c(Ut);if(h=="(")return c(Te,pe(")"),Re(Mt,")"),ce,Nt,qe);if(A&&S=="<")return c(pe(">"),Re(br,">"),ce,Ut)}function In(h,S){if(h=="keyword"||h=="variable")return O.marked="type",c(In);if(S=="<")return c(pe(">"),Re(br,">"),ce)}function Mt(h,S){return S=="@"&&c(me,Mt),h=="spread"?c(Mt):A&&ue(S)?(O.marked="keyword",c(Mt)):A&&h=="this"?c(Ot,Pt):_(vt,Ot,Pt)}function or(h,S){return h=="variable"?Bn(h,S):Mr(h,S)}function Bn(h,S){if(h=="variable")return Y(S),c(Mr)}function Mr(h,S){if(S=="<")return c(pe(">"),Re(br,">"),ce,Mr);if(S=="extends"||S=="implements"||A&&h==",")return S=="implements"&&(O.marked="keyword"),c(A?oe:me,Mr);if(h=="{")return c(pe("}"),wt,ce)}function wt(h,S){if(h=="async"||h=="variable"&&(S=="static"||S=="get"||S=="set"||A&&ue(S))&&O.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return O.marked="keyword",c(wt);if(h=="variable"||O.style=="keyword")return O.marked="property",c(Zt,wt);if(h=="number"||h=="string")return c(Zt,wt);if(h=="[")return c(me,Ot,ye("]"),Zt,wt);if(S=="*")return O.marked="keyword",c(wt);if(A&&h=="(")return _(Ut,wt);if(h==";"||h==",")return c(wt);if(h=="}")return c();if(S=="@")return c(me,wt)}function Zt(h,S){if(S=="!"||S=="?")return c(Zt);if(h==":")return c(oe,Pt);if(S=="=")return c(We);var T=O.state.lexical.prev,G=T&&T.info=="interface";return _(G?Ut:Kt)}function ar(h,S){return S=="*"?(O.marked="keyword",c(se,ye(";"))):S=="default"?(O.marked="keyword",c(me,ye(";"))):h=="{"?c(Re(Hn,"}"),se,ye(";")):_(ke)}function Hn(h,S){if(S=="as")return O.marked="keyword",c(ye("variable"));if(h=="variable")return _(We,Hn)}function Qt(h){return h=="string"?c():h=="("?_(me):h=="."?_(Oe):_(lr,on,se)}function lr(h,S){return h=="{"?yr(lr,"}"):(h=="variable"&&Y(S),S=="*"&&(O.marked="keyword"),c(Ue))}function on(h){if(h==",")return c(lr,on)}function Ue(h,S){if(S=="as")return O.marked="keyword",c(lr)}function se(h,S){if(S=="from")return O.marked="keyword",c(me)}function Jt(h){return h=="]"?c():_(Re(We,"]"))}function Fr(){return _(pe("form"),vt,ye("{"),pe("}"),Re(Dt,"}"),ce,ce)}function Dt(){return _(vt,Pt)}function Ne(h,S){return h.lastType=="operator"||h.lastType==","||D.test(S.charAt(0))||/[,.]/.test(S.charAt(0))}function _t(h,S,T){return S.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(S.lastType)||S.lastType=="quasi"&&/\{\s*$/.test(h.string.slice(0,h.pos-(T||0)))}return{startState:function(h){var S={tokenize:g,lastType:"sof",cc:[],lexical:new F((h||0)-V,0,"block",!1),localVars:R.localVars,context:R.localVars&&new fe(null,null,!1),indented:h||0};return R.globalVars&&typeof R.globalVars=="object"&&(S.globalVars=R.globalVars),S},token:function(h,S){if(h.sol()&&(S.lexical.hasOwnProperty("align")||(S.lexical.align=!1),S.indented=h.indentation(),d(h,S)),S.tokenize!=p&&h.eatSpace())return null;var T=S.tokenize(h,S);return M=="comment"?T:(S.lastType=M=="operator"&&(w=="++"||w=="--")?"incdec":M,U(S,T,M,w,h))},indent:function(h,S){if(h.tokenize==p||h.tokenize==m)return b.Pass;if(h.tokenize!=g)return 0;var T=S&&S.charAt(0),G=h.lexical,ve;if(!/^\s*else\b/.test(S))for(var Le=h.cc.length-1;Le>=0;--Le){var Ae=h.cc[Le];if(Ae==ce)G=G.prev;else if(Ae!=Dr&&Ae!=qe)break}for(;(G.type=="stat"||G.type=="form")&&(T=="}"||(ve=h.cc[h.cc.length-1])&&(ve==Oe||ve==je)&&!/^[,\.=+\-*:?[\(]/.test(S));)G=G.prev;$&&G.type==")"&&G.prev.type=="stat"&&(G=G.prev);var Je=G.type,Tt=T==Je;return Je=="vardef"?G.indented+(h.lastType=="operator"||h.lastType==","?G.info.length+1:0):Je=="form"&&T=="{"?G.indented:Je=="form"?G.indented+V:Je=="stat"?G.indented+(Ne(h,S)?$||V:0):G.info=="switch"&&!Tt&&R.doubleIndentSwitch!=!1?G.indented+(/^(?:case|default)\b/.test(S)?V:2*V):G.align?G.column+(Tt?0:1):G.indented+(Tt?0:V)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:I?null:"/*",blockCommentEnd:I?null:"*/",blockCommentContinue:I?null:" * ",lineComment:I?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:I?"json":"javascript",jsonldMode:B,jsonMode:I,expressionAllowed:_t,skipExpression:function(h){U(h,"atom","atom","true",new b.StringStream("",2,null))}}}),b.registerHelper("wordChars","javascript",/[\w$]/),b.defineMIME("text/javascript","javascript"),b.defineMIME("text/ecmascript","javascript"),b.defineMIME("application/javascript","javascript"),b.defineMIME("application/x-javascript","javascript"),b.defineMIME("application/ecmascript","javascript"),b.defineMIME("application/json",{name:"javascript",json:!0}),b.defineMIME("application/x-json",{name:"javascript",json:!0}),b.defineMIME("application/manifest+json",{name:"javascript",json:!0}),b.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),b.defineMIME("text/typescript",{name:"javascript",typescript:!0}),b.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Iu=Wu.exports,Bu={exports:{}};(function(ze,Ge){(function(b){b(it)})(function(b){b.defineMode("css",function(F,N){var U=N.inline;N.propertyKeywords||(N=b.resolveMode("text/css"));var O=F.indentUnit,_=N.tokenHooks,c=N.documentTypes||{},Z=N.mediaTypes||{},Y=N.mediaFeatures||{},re=N.mediaValueKeywords||{},ue=N.propertyKeywords||{},fe=N.nonStandardPropertyKeywords||{},Ce=N.fontProperties||{},Ie=N.counterDescriptors||{},Te=N.colorKeywords||{},Qe=N.valueKeywords||{},qe=N.allowNested,pe=N.lineComment,ce=N.supportsAtComponent===!0,ye=F.highlightNonStandardPropertyKeywords!==!1,ke,we;function me(z,te){return ke=te,z}function We(z,te){var j=z.next();if(_[j]){var Se=_[j](z,te);if(Se!==!1)return Se}if(j=="@")return z.eatWhile(/[\w\\\-]/),me("def",z.current());if(j=="="||(j=="~"||j=="|")&&z.eat("="))return me(null,"compare");if(j=='"'||j=="'")return te.tokenize=Bt(j),te.tokenize(z,te);if(j=="#")return z.eatWhile(/[\w\\\-]/),me("atom","hash");if(j=="!")return z.match(/^\s*\w*/),me("keyword","important");if(/\d/.test(j)||j=="."&&z.eat(/\d/))return z.eatWhile(/[\w.%]/),me("number","unit");if(j==="-"){if(/[\d.]/.test(z.peek()))return z.eatWhile(/[\w.%]/),me("number","unit");if(z.match(/^-[\w\\\-]*/))return z.eatWhile(/[\w\\\-]/),z.match(/^\s*:/,!1)?me("variable-2","variable-definition"):me("variable-2","variable");if(z.match(/^\w+-/))return me("meta","meta")}else return/[,+>*\/]/.test(j)?me(null,"select-op"):j=="."&&z.match(/^-?[_a-z][_a-z0-9-]*/i)?me("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(j)?me(null,j):z.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(z.current())&&(te.tokenize=Ht),me("variable callee","variable")):/[\w\\\-]/.test(j)?(z.eatWhile(/[\w\\\-]/),me("property","word")):me(null,null)}function Bt(z){return function(te,j){for(var Se=!1,ft;(ft=te.next())!=null;){if(ft==z&&!Se){z==")"&&te.backUp(1);break}Se=!Se&&ft=="\\"}return(ft==z||!Se&&z!=")")&&(j.tokenize=null),me("string","string")}}function Ht(z,te){return z.next(),z.match(/^\s*[\"\')]/,!1)?te.tokenize=null:te.tokenize=Bt(")"),me(null,"(")}function Lt(z,te,j){this.type=z,this.indent=te,this.prev=j}function Oe(z,te,j,Se){return z.context=new Lt(j,te.indentation()+(Se===!1?0:O),z.context),j}function je(z){return z.context.prev&&(z.context=z.context.prev),z.context.type}function be(z,te,j){return Fe[j.context.type](z,te,j)}function kt(z,te,j,Se){for(var ft=Se||1;ft>0;ft--)j.context=j.context.prev;return be(z,te,j)}function mr(z){var te=z.current().toLowerCase();Qe.hasOwnProperty(te)?we="atom":Te.hasOwnProperty(te)?we="keyword":we="variable"}var Fe={};return Fe.top=function(z,te,j){if(z=="{")return Oe(j,te,"block");if(z=="}"&&j.context.prev)return je(j);if(ce&&/@component/i.test(z))return Oe(j,te,"atComponentBlock");if(/^@(-moz-)?document$/i.test(z))return Oe(j,te,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(z))return Oe(j,te,"atBlock");if(/^@(font-face|counter-style)/i.test(z))return j.stateArg=z,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(z))return"keyframes";if(z&&z.charAt(0)=="@")return Oe(j,te,"at");if(z=="hash")we="builtin";else if(z=="word")we="tag";else{if(z=="variable-definition")return"maybeprop";if(z=="interpolation")return Oe(j,te,"interpolation");if(z==":")return"pseudo";if(qe&&z=="(")return Oe(j,te,"parens")}return j.context.type},Fe.block=function(z,te,j){if(z=="word"){var Se=te.current().toLowerCase();return ue.hasOwnProperty(Se)?(we="property","maybeprop"):fe.hasOwnProperty(Se)?(we=ye?"string-2":"property","maybeprop"):qe?(we=te.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(we+=" error","maybeprop")}else return z=="meta"?"block":!qe&&(z=="hash"||z=="qualifier")?(we="error","block"):Fe.top(z,te,j)},Fe.maybeprop=function(z,te,j){return z==":"?Oe(j,te,"prop"):be(z,te,j)},Fe.prop=function(z,te,j){if(z==";")return je(j);if(z=="{"&&qe)return Oe(j,te,"propBlock");if(z=="}"||z=="{")return kt(z,te,j);if(z=="(")return Oe(j,te,"parens");if(z=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(te.current()))we+=" error";else if(z=="word")mr(te);else if(z=="interpolation")return Oe(j,te,"interpolation");return"prop"},Fe.propBlock=function(z,te,j){return z=="}"?je(j):z=="word"?(we="property","maybeprop"):j.context.type},Fe.parens=function(z,te,j){return z=="{"||z=="}"?kt(z,te,j):z==")"?je(j):z=="("?Oe(j,te,"parens"):z=="interpolation"?Oe(j,te,"interpolation"):(z=="word"&&mr(te),"parens")},Fe.pseudo=function(z,te,j){return z=="meta"?"pseudo":z=="word"?(we="variable-3",j.context.type):be(z,te,j)},Fe.documentTypes=function(z,te,j){return z=="word"&&c.hasOwnProperty(te.current())?(we="tag",j.context.type):Fe.atBlock(z,te,j)},Fe.atBlock=function(z,te,j){if(z=="(")return Oe(j,te,"atBlock_parens");if(z=="}"||z==";")return kt(z,te,j);if(z=="{")return je(j)&&Oe(j,te,qe?"block":"top");if(z=="interpolation")return Oe(j,te,"interpolation");if(z=="word"){var Se=te.current().toLowerCase();Se=="only"||Se=="not"||Se=="and"||Se=="or"?we="keyword":Z.hasOwnProperty(Se)?we="attribute":Y.hasOwnProperty(Se)?we="property":re.hasOwnProperty(Se)?we="keyword":ue.hasOwnProperty(Se)?we="property":fe.hasOwnProperty(Se)?we=ye?"string-2":"property":Qe.hasOwnProperty(Se)?we="atom":Te.hasOwnProperty(Se)?we="keyword":we="error"}return j.context.type},Fe.atComponentBlock=function(z,te,j){return z=="}"?kt(z,te,j):z=="{"?je(j)&&Oe(j,te,qe?"block":"top",!1):(z=="word"&&(we="error"),j.context.type)},Fe.atBlock_parens=function(z,te,j){return z==")"?je(j):z=="{"||z=="}"?kt(z,te,j,2):Fe.atBlock(z,te,j)},Fe.restricted_atBlock_before=function(z,te,j){return z=="{"?Oe(j,te,"restricted_atBlock"):z=="word"&&j.stateArg=="@counter-style"?(we="variable","restricted_atBlock_before"):be(z,te,j)},Fe.restricted_atBlock=function(z,te,j){return z=="}"?(j.stateArg=null,je(j)):z=="word"?(j.stateArg=="@font-face"&&!Ce.hasOwnProperty(te.current().toLowerCase())||j.stateArg=="@counter-style"&&!Ie.hasOwnProperty(te.current().toLowerCase())?we="error":we="property","maybeprop"):"restricted_atBlock"},Fe.keyframes=function(z,te,j){return z=="word"?(we="variable","keyframes"):z=="{"?Oe(j,te,"top"):be(z,te,j)},Fe.at=function(z,te,j){return z==";"?je(j):z=="{"||z=="}"?kt(z,te,j):(z=="word"?we="tag":z=="hash"&&(we="builtin"),"at")},Fe.interpolation=function(z,te,j){return z=="}"?je(j):z=="{"||z==";"?kt(z,te,j):(z=="word"?we="variable":z!="variable"&&z!="("&&z!=")"&&(we="error"),"interpolation")},{startState:function(z){return{tokenize:null,state:U?"block":"top",stateArg:null,context:new Lt(U?"block":"top",z||0,null)}},token:function(z,te){if(!te.tokenize&&z.eatSpace())return null;var j=(te.tokenize||We)(z,te);return j&&typeof j=="object"&&(ke=j[1],j=j[0]),we=j,ke!="comment"&&(te.state=Fe[te.state](ke,z,te)),we},indent:function(z,te){var j=z.context,Se=te&&te.charAt(0),ft=j.indent;return j.type=="prop"&&(Se=="}"||Se==")")&&(j=j.prev),j.prev&&(Se=="}"&&(j.type=="block"||j.type=="top"||j.type=="interpolation"||j.type=="restricted_atBlock")?(j=j.prev,ft=j.indent):(Se==")"&&(j.type=="parens"||j.type=="atBlock_parens")||Se=="{"&&(j.type=="at"||j.type=="atBlock"))&&(ft=Math.max(0,j.indent-O))),ft},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:pe,fold:"brace"}});function K(F){for(var N={},U=0;U<F.length;++U)N[F[U].toLowerCase()]=!0;return N}var R=["domain","regexp","url","url-prefix"],V=K(R),$=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],B=K($),I=["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"],X=K(I),A=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],H=K(A),C=["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"],D=K(C),W=["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"],J=K(W),M=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],w=K(M),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],g=K(v),u=["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"],p=K(u),m=["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"],k=K(m),d=R.concat($).concat(I).concat(A).concat(C).concat(W).concat(u).concat(m);b.registerHelper("hintWords","css",d);function L(F,N){for(var U=!1,O;(O=F.next())!=null;){if(U&&O=="/"){N.tokenize=null;break}U=O=="*"}return["comment","comment"]}b.defineMIME("text/css",{documentTypes:V,mediaTypes:B,mediaFeatures:X,mediaValueKeywords:H,propertyKeywords:D,nonStandardPropertyKeywords:J,fontProperties:w,counterDescriptors:g,colorKeywords:p,valueKeywords:k,tokenHooks:{"/":function(F,N){return F.eat("*")?(N.tokenize=L,L(F,N)):!1}},name:"css"}),b.defineMIME("text/x-scss",{mediaTypes:B,mediaFeatures:X,mediaValueKeywords:H,propertyKeywords:D,nonStandardPropertyKeywords:J,colorKeywords:p,valueKeywords:k,fontProperties:w,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(F,N){return F.eat("/")?(F.skipToEnd(),["comment","comment"]):F.eat("*")?(N.tokenize=L,L(F,N)):["operator","operator"]},":":function(F){return F.match(/^\s*\{/,!1)?[null,null]:!1},$:function(F){return F.match(/^[\w-]+/),F.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(F){return F.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),b.defineMIME("text/x-less",{mediaTypes:B,mediaFeatures:X,mediaValueKeywords:H,propertyKeywords:D,nonStandardPropertyKeywords:J,colorKeywords:p,valueKeywords:k,fontProperties:w,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(F,N){return F.eat("/")?(F.skipToEnd(),["comment","comment"]):F.eat("*")?(N.tokenize=L,L(F,N)):["operator","operator"]},"@":function(F){return F.eat("{")?[null,"interpolation"]:F.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(F.eatWhile(/[\w\\\-]/),F.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),b.defineMIME("text/x-gss",{documentTypes:V,mediaTypes:B,mediaFeatures:X,propertyKeywords:D,nonStandardPropertyKeywords:J,fontProperties:w,counterDescriptors:g,colorKeywords:p,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(F,N){return F.eat("*")?(N.tokenize=L,L(F,N)):!1}},name:"css",helperType:"gss"})})})();var Hu=Bu.exports,hl={exports:{}},dl;function zu(){return dl||(dl=1,function(ze,Ge){(function(b){b(it)})(function(b){var K={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},R={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};b.defineMode("xml",function(V,$){var B=V.indentUnit,I={},X=$.htmlMode?K:R;for(var A in X)I[A]=X[A];for(var A in $)I[A]=$[A];var H,C;function D(c,Z){function Y(fe){return Z.tokenize=fe,fe(c,Z)}var re=c.next();if(re=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?Y(M("atom","]]>")):null:c.match("--")?Y(M("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),Y(w(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),Z.tokenize=M("meta","?>"),"meta"):(H=c.eat("/")?"closeTag":"openTag",Z.tokenize=W,"tag bracket");if(re=="&"){var ue;return c.eat("#")?c.eat("x")?ue=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):ue=c.eatWhile(/[\d]/)&&c.eat(";"):ue=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),ue?"atom":"error"}else return c.eatWhile(/[^&<]/),null}D.isInText=!0;function W(c,Z){var Y=c.next();if(Y==">"||Y=="/"&&c.eat(">"))return Z.tokenize=D,H=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return H="equals",null;if(Y=="<"){Z.tokenize=D,Z.state=m,Z.tagName=Z.tagStart=null;var re=Z.tokenize(c,Z);return re?re+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(Z.tokenize=J(Y),Z.stringStartCol=c.column(),Z.tokenize(c,Z)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function J(c){var Z=function(Y,re){for(;!Y.eol();)if(Y.next()==c){re.tokenize=W;break}return"string"};return Z.isInAttribute=!0,Z}function M(c,Z){return function(Y,re){for(;!Y.eol();){if(Y.match(Z)){re.tokenize=D;break}Y.next()}return c}}function w(c){return function(Z,Y){for(var re;(re=Z.next())!=null;){if(re=="<")return Y.tokenize=w(c+1),Y.tokenize(Z,Y);if(re==">")if(c==1){Y.tokenize=D;break}else return Y.tokenize=w(c-1),Y.tokenize(Z,Y)}return"meta"}}function v(c){return c&&c.toLowerCase()}function g(c,Z,Y){this.prev=c.context,this.tagName=Z||"",this.indent=c.indented,this.startOfLine=Y,(I.doNotIndent.hasOwnProperty(Z)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function u(c){c.context&&(c.context=c.context.prev)}function p(c,Z){for(var Y;;){if(!c.context||(Y=c.context.tagName,!I.contextGrabbers.hasOwnProperty(v(Y))||!I.contextGrabbers[v(Y)].hasOwnProperty(v(Z))))return;u(c)}}function m(c,Z,Y){return c=="openTag"?(Y.tagStart=Z.column(),k):c=="closeTag"?d:m}function k(c,Z,Y){return c=="word"?(Y.tagName=Z.current(),C="tag",N):I.allowMissingTagName&&c=="endTag"?(C="tag bracket",N(c,Z,Y)):(C="error",k)}function d(c,Z,Y){if(c=="word"){var re=Z.current();return Y.context&&Y.context.tagName!=re&&I.implicitlyClosed.hasOwnProperty(v(Y.context.tagName))&&u(Y),Y.context&&Y.context.tagName==re||I.matchClosing===!1?(C="tag",L):(C="tag error",F)}else return I.allowMissingTagName&&c=="endTag"?(C="tag bracket",L(c,Z,Y)):(C="error",F)}function L(c,Z,Y){return c!="endTag"?(C="error",L):(u(Y),m)}function F(c,Z,Y){return C="error",L(c,Z,Y)}function N(c,Z,Y){if(c=="word")return C="attribute",U;if(c=="endTag"||c=="selfcloseTag"){var re=Y.tagName,ue=Y.tagStart;return Y.tagName=Y.tagStart=null,c=="selfcloseTag"||I.autoSelfClosers.hasOwnProperty(v(re))?p(Y,re):(p(Y,re),Y.context=new g(Y,re,ue==Y.indented)),m}return C="error",N}function U(c,Z,Y){return c=="equals"?O:(I.allowMissing||(C="error"),N(c,Z,Y))}function O(c,Z,Y){return c=="string"?_:c=="word"&&I.allowUnquoted?(C="string",N):(C="error",N(c,Z,Y))}function _(c,Z,Y){return c=="string"?_:N(c,Z,Y)}return{startState:function(c){var Z={tokenize:D,state:m,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(Z.baseIndent=c),Z},token:function(c,Z){if(!Z.tagName&&c.sol()&&(Z.indented=c.indentation()),c.eatSpace())return null;H=null;var Y=Z.tokenize(c,Z);return(Y||H)&&Y!="comment"&&(C=null,Z.state=Z.state(H||Y,c,Z),C&&(Y=C=="error"?Y+" error":C)),Y},indent:function(c,Z,Y){var re=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+B;if(re&&re.noIndent)return b.Pass;if(c.tokenize!=W&&c.tokenize!=D)return Y?Y.match(/^(\s*)/)[0].length:0;if(c.tagName)return I.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+B*(I.multilineTagIndentFactor||1);if(I.alignCDATA&&/<!\[CDATA\[/.test(Z))return 0;var ue=Z&&/^<(\/)?([\w_:\.-]*)/.exec(Z);if(ue&&ue[1])for(;re;)if(re.tagName==ue[2]){re=re.prev;break}else if(I.implicitlyClosed.hasOwnProperty(v(re.tagName)))re=re.prev;else break;else if(ue)for(;re;){var fe=I.contextGrabbers[v(re.tagName)];if(fe&&fe.hasOwnProperty(v(ue[2])))re=re.prev;else break}for(;re&&re.prev&&!re.startOfLine;)re=re.prev;return re?re.indent+B:c.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:I.htmlMode?"html":"xml",helperType:I.htmlMode?"html":"xml",skipAttribute:function(c){c.state==O&&(c.state=N)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var Z=[],Y=c.context;Y;Y=Y.prev)Z.push(Y.tagName);return Z.reverse()}}}),b.defineMIME("text/xml","xml"),b.defineMIME("application/xml","xml"),b.mimeModes.hasOwnProperty("text/html")||b.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),hl.exports}(function(ze,Ge){(function(b){b(it,zu(),Iu,Hu)})(function(b){var K={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 R(H,C,D){var W=H.current(),J=W.search(C);return J>-1?H.backUp(W.length-J):W.match(/<\/?$/)&&(H.backUp(W.length),H.match(C,!1)||H.match(W)),D}var V={};function $(H){var C=V[H];return C||(V[H]=new RegExp("\\s+"+H+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function B(H,C){var D=H.match($(C));return D?/^\s*(.*?)\s*$/.exec(D[2])[1]:""}function I(H,C){return new RegExp((C?"^":"")+"</\\s*"+H+"\\s*>","i")}function X(H,C){for(var D in H)for(var W=C[D]||(C[D]=[]),J=H[D],M=J.length-1;M>=0;M--)W.unshift(J[M])}function A(H,C){for(var D=0;D<H.length;D++){var W=H[D];if(!W[0]||W[1].test(B(C,W[0])))return W[2]}}b.defineMode("htmlmixed",function(H,C){var D=b.getMode(H,{name:"xml",htmlMode:!0,multilineTagIndentFactor:C.multilineTagIndentFactor,multilineTagIndentPastTag:C.multilineTagIndentPastTag,allowMissingTagName:C.allowMissingTagName}),W={},J=C&&C.tags,M=C&&C.scriptTypes;if(X(K,W),J&&X(J,W),M)for(var w=M.length-1;w>=0;w--)W.script.unshift(["type",M[w].matches,M[w].mode]);function v(g,u){var p=D.token(g,u.htmlState),m=/\btag\b/.test(p),k;if(m&&!/[<>\s\/]/.test(g.current())&&(k=u.htmlState.tagName&&u.htmlState.tagName.toLowerCase())&&W.hasOwnProperty(k))u.inTag=k+" ";else if(u.inTag&&m&&/>$/.test(g.current())){var d=/^([\S]+) (.*)/.exec(u.inTag);u.inTag=null;var L=g.current()==">"&&A(W[d[1]],d[2]),F=b.getMode(H,L),N=I(d[1],!0),U=I(d[1],!1);u.token=function(O,_){return O.match(N,!1)?(_.token=v,_.localState=_.localMode=null,null):R(O,U,_.localMode.token(O,_.localState))},u.localMode=F,u.localState=b.startState(F,D.indent(u.htmlState,"",""))}else u.inTag&&(u.inTag+=g.current(),g.eol()&&(u.inTag+=" "));return p}return{startState:function(){var g=b.startState(D);return{token:v,inTag:null,localMode:null,localState:null,htmlState:g}},copyState:function(g){var u;return g.localState&&(u=b.copyState(g.localMode,g.localState)),{token:g.token,inTag:g.inTag,localMode:g.localMode,localState:u,htmlState:b.copyState(D,g.htmlState)}},token:function(g,u){return u.token(g,u)},indent:function(g,u,p){return!g.localMode||/^\s*<\//.test(u)?D.indent(g.htmlState,u,p):g.localMode.indent?g.localMode.indent(g.localState,u,p):b.Pass},innerMode:function(g){return{state:g.localState||g.htmlState,mode:g.localMode||D}}}},"xml","javascript","css"),b.defineMIME("text/html","htmlmixed")})})();(function(ze,Ge){(function(b){b(it)})(function(b){var K={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},R=b.Pos;b.defineOption("autoCloseBrackets",!1,function(w,v,g){g&&g!=b.Init&&(w.removeKeyMap($),w.state.closeBrackets=null),v&&(B(V(v,"pairs")),w.state.closeBrackets=v,w.addKeyMap($))});function V(w,v){return v=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[v]!=null?w[v]:K[v]}var $={Backspace:A,Enter:H};function B(w){for(var v=0;v<w.length;v++){var g=w.charAt(v),u="'"+g+"'";$[u]||($[u]=I(g))}}B(K.pairs+"`");function I(w){return function(v){return W(v,w)}}function X(w){var v=w.state.closeBrackets;if(!v||v.override)return v;var g=w.getModeAt(w.getCursor());return g.closeBrackets||v}function A(w){var v=X(w);if(!v||w.getOption("disableInput"))return b.Pass;for(var g=V(v,"pairs"),u=w.listSelections(),p=0;p<u.length;p++){if(!u[p].empty())return b.Pass;var m=J(w,u[p].head);if(!m||g.indexOf(m)%2!=0)return b.Pass}for(var p=u.length-1;p>=0;p--){var k=u[p].head;w.replaceRange("",R(k.line,k.ch-1),R(k.line,k.ch+1),"+delete")}}function H(w){var v=X(w),g=v&&V(v,"explode");if(!g||w.getOption("disableInput"))return b.Pass;for(var u=w.listSelections(),p=0;p<u.length;p++){if(!u[p].empty())return b.Pass;var m=J(w,u[p].head);if(!m||g.indexOf(m)%2!=0)return b.Pass}w.operation(function(){var k=w.lineSeparator()||`
`;w.replaceSelection(k+k,null),C(w,-1),u=w.listSelections();for(var d=0;d<u.length;d++){var L=u[d].head.line;w.indentLine(L,null,!0),w.indentLine(L+1,null,!0)}})}function C(w,v){for(var g=[],u=w.listSelections(),p=0,m=0;m<u.length;m++){var k=u[m];k.head==w.getCursor()&&(p=m);var d=k.head.ch||v>0?{line:k.head.line,ch:k.head.ch+v}:{line:k.head.line-1};g.push({anchor:d,head:d})}w.setSelections(g,p)}function D(w){var v=b.cmpPos(w.anchor,w.head)>0;return{anchor:new R(w.anchor.line,w.anchor.ch+(v?-1:1)),head:new R(w.head.line,w.head.ch+(v?1:-1))}}function W(w,v){var g=X(w);if(!g||w.getOption("disableInput"))return b.Pass;var u=V(g,"pairs"),p=u.indexOf(v);if(p==-1)return b.Pass;for(var m=V(g,"closeBefore"),k=V(g,"triples"),d=u.charAt(p+1)==v,L=w.listSelections(),F=p%2==0,N,U=0;U<L.length;U++){var O=L[U],_=O.head,c,Z=w.getRange(_,R(_.line,_.ch+1));if(F&&!O.empty())c="surround";else if((d||!F)&&Z==v)d&&M(w,_)?c="both":k.indexOf(v)>=0&&w.getRange(_,R(_.line,_.ch+3))==v+v+v?c="skipThree":c="skip";else if(d&&_.ch>1&&k.indexOf(v)>=0&&w.getRange(R(_.line,_.ch-2),_)==v+v){if(_.ch>2&&/\bstring/.test(w.getTokenTypeAt(R(_.line,_.ch-2))))return b.Pass;c="addFour"}else if(d){var Y=_.ch==0?" ":w.getRange(R(_.line,_.ch-1),_);if(!b.isWordChar(Z)&&Y!=v&&!b.isWordChar(Y))c="both";else return b.Pass}else if(F&&(Z.length===0||/\s/.test(Z)||m.indexOf(Z)>-1))c="both";else return b.Pass;if(!N)N=c;else if(N!=c)return b.Pass}var re=p%2?u.charAt(p-1):v,ue=p%2?v:u.charAt(p+1);w.operation(function(){if(N=="skip")C(w,1);else if(N=="skipThree")C(w,3);else if(N=="surround"){for(var fe=w.getSelections(),Ce=0;Ce<fe.length;Ce++)fe[Ce]=re+fe[Ce]+ue;w.replaceSelections(fe,"around"),fe=w.listSelections().slice();for(var Ce=0;Ce<fe.length;Ce++)fe[Ce]=D(fe[Ce]);w.setSelections(fe)}else N=="both"?(w.replaceSelection(re+ue,null),w.triggerElectric(re+ue),C(w,-1)):N=="addFour"&&(w.replaceSelection(re+re+re+re,"before"),C(w,1))})}function J(w,v){var g=w.getRange(R(v.line,v.ch-1),R(v.line,v.ch+1));return g.length==2?g:null}function M(w,v){var g=w.getTokenAt(R(v.line,v.ch+1));return/\bstring/.test(g.type)&&g.start==v.ch&&(v.ch==0||!/\bstring/.test(w.getTokenTypeAt(v)))}})})();var pl={exports:{}},vl;function Ru(){return vl||(vl=1,function(ze,Ge){(function(b){b(it)})(function(b){var K=b.Pos;function R(v,g){return v.line-g.line||v.ch-g.ch}var V="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",$=V+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B=new RegExp("<(/?)(["+V+"]["+$+"]*)","g");function I(v,g,u,p){this.line=g,this.ch=u,this.cm=v,this.text=v.getLine(g),this.min=p?Math.max(p.from,v.firstLine()):v.firstLine(),this.max=p?Math.min(p.to-1,v.lastLine()):v.lastLine()}function X(v,g){var u=v.cm.getTokenTypeAt(K(v.line,g));return u&&/\btag\b/.test(u)}function A(v){if(!(v.line>=v.max))return v.ch=0,v.text=v.cm.getLine(++v.line),!0}function H(v){if(!(v.line<=v.min))return v.text=v.cm.getLine(--v.line),v.ch=v.text.length,!0}function C(v){for(;;){var g=v.text.indexOf(">",v.ch);if(g==-1){if(A(v))continue;return}if(!X(v,g+1)){v.ch=g+1;continue}var u=v.text.lastIndexOf("/",g),p=u>-1&&!/\S/.test(v.text.slice(u+1,g));return v.ch=g+1,p?"selfClose":"regular"}}function D(v){for(;;){var g=v.ch?v.text.lastIndexOf("<",v.ch-1):-1;if(g==-1){if(H(v))continue;return}if(!X(v,g+1)){v.ch=g;continue}B.lastIndex=g,v.ch=g;var u=B.exec(v.text);if(u&&u.index==g)return u}}function W(v){for(;;){B.lastIndex=v.ch;var g=B.exec(v.text);if(!g){if(A(v))continue;return}if(!X(v,g.index+1)){v.ch=g.index+1;continue}return v.ch=g.index+g[0].length,g}}function J(v){for(;;){var g=v.ch?v.text.lastIndexOf(">",v.ch-1):-1;if(g==-1){if(H(v))continue;return}if(!X(v,g+1)){v.ch=g;continue}var u=v.text.lastIndexOf("/",g),p=u>-1&&!/\S/.test(v.text.slice(u+1,g));return v.ch=g+1,p?"selfClose":"regular"}}function M(v,g){for(var u=[];;){var p=W(v),m,k=v.line,d=v.ch-(p?p[0].length:0);if(!p||!(m=C(v)))return;if(m!="selfClose")if(p[1]){for(var L=u.length-1;L>=0;--L)if(u[L]==p[2]){u.length=L;break}if(L<0&&(!g||g==p[2]))return{tag:p[2],from:K(k,d),to:K(v.line,v.ch)}}else u.push(p[2])}}function w(v,g){for(var u=[];;){var p=J(v);if(!p)return;if(p=="selfClose"){D(v);continue}var m=v.line,k=v.ch,d=D(v);if(!d)return;if(d[1])u.push(d[2]);else{for(var L=u.length-1;L>=0;--L)if(u[L]==d[2]){u.length=L;break}if(L<0&&(!g||g==d[2]))return{tag:d[2],from:K(v.line,v.ch),to:K(m,k)}}}}b.registerHelper("fold","xml",function(v,g){for(var u=new I(v,g.line,0);;){var p=W(u);if(!p||u.line!=g.line)return;var m=C(u);if(!m)return;if(!p[1]&&m!="selfClose"){var k=K(u.line,u.ch),d=M(u,p[2]);return d&&R(d.from,k)>0?{from:k,to:d.from}:null}}}),b.findMatchingTag=function(v,g,u){var p=new I(v,g.line,g.ch,u);if(!(p.text.indexOf(">")==-1&&p.text.indexOf("<")==-1)){var m=C(p),k=m&&K(p.line,p.ch),d=m&&D(p);if(!(!m||!d||R(p,g)>0)){var L={from:K(p.line,p.ch),to:k,tag:d[2]};return m=="selfClose"?{open:L,close:null,at:"open"}:d[1]?{open:w(p,d[2]),close:L,at:"close"}:(p=new I(v,k.line,k.ch,u),{open:L,close:M(p,d[2]),at:"open"})}}},b.findEnclosingTag=function(v,g,u,p){for(var m=new I(v,g.line,g.ch,u);;){var k=w(m,p);if(!k)break;var d=new I(v,g.line,g.ch,u),L=M(d,k.tag);if(L)return{open:k,close:L}}},b.scanForClosingTag=function(v,g,u,p){var m=new I(v,g.line,g.ch,p?{from:0,to:p}:null);return M(m,u)}})}()),pl.exports}(function(ze,Ge){(function(b){b(it,Ru())})(function(b){b.defineOption("autoCloseTags",!1,function(A,H,C){if(C!=b.Init&&C&&A.removeKeyMap("autoCloseTags"),!!H){var D={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(D["'/'"]=function(W){return B(W)}),(typeof H!="object"||H.whenOpening!==!1)&&(D["'>'"]=function(W){return V(W)}),A.addKeyMap(D)}});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],R=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function V(A){if(A.getOption("disableInput"))return b.Pass;for(var H=A.listSelections(),C=[],D=A.getOption("autoCloseTags"),W=0;W<H.length;W++){if(!H[W].empty())return b.Pass;var J=H[W].head,M=A.getTokenAt(J),w=b.innerMode(A.getMode(),M.state),v=w.state,g=w.mode.xmlCurrentTag&&w.mode.xmlCurrentTag(v),u=g&&g.name;if(!u)return b.Pass;var p=w.mode.configuration=="html",m=typeof D=="object"&&D.dontCloseTags||p&&K,k=typeof D=="object"&&D.indentTags||p&&R;M.end>J.ch&&(u=u.slice(0,u.length-M.end+J.ch));var d=u.toLowerCase();if(!u||M.type=="string"&&(M.end!=J.ch||!/[\"\']/.test(M.string.charAt(M.string.length-1))||M.string.length==1)||M.type=="tag"&&g.close||M.string.indexOf("/")==J.ch-M.start-1||m&&I(m,d)>-1||X(A,w.mode.xmlCurrentContext&&w.mode.xmlCurrentContext(v)||[],u,J,!0))return b.Pass;var L=typeof D=="object"&&D.emptyTags;if(L&&I(L,u)>-1){C[W]={text:"/>",newPos:b.Pos(J.line,J.ch+2)};continue}var F=k&&I(k,d)>-1;C[W]={indent:F,text:">"+(F?`
`:"")+"</"+u+">",newPos:F?b.Pos(J.line+1,0):b.Pos(J.line,J.ch+1)}}for(var N=typeof D=="object"&&D.dontIndentOnAutoClose,W=H.length-1;W>=0;W--){var U=C[W];A.replaceRange(U.text,H[W].head,H[W].anchor,"+insert");var O=A.listSelections().slice(0);O[W]={head:U.newPos,anchor:U.newPos},A.setSelections(O),!N&&U.indent&&(A.indentLine(U.newPos.line,null,!0),A.indentLine(U.newPos.line+1,null,!0))}}function $(A,H){for(var C=A.listSelections(),D=[],W=H?"/":"</",J=A.getOption("autoCloseTags"),M=typeof J=="object"&&J.dontIndentOnSlash,w=0;w<C.length;w++){if(!C[w].empty())return b.Pass;var v=C[w].head,g=A.getTokenAt(v),u=b.innerMode(A.getMode(),g.state),p=u.state;if(H&&(g.type=="string"||g.string.charAt(0)!="<"||g.start!=v.ch-1))return b.Pass;var m,k=u.mode.name!="xml"&&A.getMode().name=="htmlmixed";if(k&&u.mode.name=="javascript")m=W+"script";else if(k&&u.mode.name=="css")m=W+"style";else{var d=u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(p),L=d.length?d[d.length-1]:"";if(!d||d.length&&X(A,d,L,v))return b.Pass;m=W+L}A.getLine(v.line).charAt(g.end)!=">"&&(m+=">"),D[w]=m}if(A.replaceSelections(D),C=A.listSelections(),!M)for(var w=0;w<C.length;w++)(w==C.length-1||C[w].head.line<C[w+1].head.line)&&A.indentLine(C[w].head.line)}function B(A){return A.getOption("disableInput")?b.Pass:$(A,!0)}b.commands.closeTag=function(A){return $(A)};function I(A,H){if(A.indexOf)return A.indexOf(H);for(var C=0,D=A.length;C<D;++C)if(A[C]==H)return C;return-1}function X(A,H,C,D,W){if(!b.scanForClosingTag)return!1;var J=Math.min(A.lastLine()+1,D.line+500),M=b.scanForClosingTag(A,D,null,J);if(!M||M.tag!=C)return!1;for(var w=W?1:0,v=H.length-1;v>=0&&H[v]==C;v--)++w;D=M.to;for(var v=1;v<w;v++){var g=b.scanForClosingTag(A,D,null,J);if(!g||g.tag!=C)return!1;D=g.to}return!0}})})();(function(ze,Ge){(function(b){b(it)})(function(b){var K={},R=/[^\s\u00a0]/,V=b.Pos,$=b.cmpPos;function B(A){var H=A.search(R);return H==-1?0:H}b.commands.toggleComment=function(A){A.toggleComment()},b.defineExtension("toggleComment",function(A){A||(A=K);for(var H=this,C=1/0,D=this.listSelections(),W=null,J=D.length-1;J>=0;J--){var M=D[J].from(),w=D[J].to();M.line>=C||(w.line>=C&&(w=V(C,0)),C=M.line,W==null?H.uncomment(M,w,A)?W="un":(H.lineComment(M,w,A),W="line"):W=="un"?H.uncomment(M,w,A):H.lineComment(M,w,A))}});function I(A,H,C){return/\bstring\b/.test(A.getTokenTypeAt(V(H.line,0)))&&!/^[\'\"\`]/.test(C)}function X(A,H){var C=A.getMode();return C.useInnerComments===!1||!C.innerMode?C:A.getModeAt(H)}b.defineExtension("lineComment",function(A,H,C){C||(C=K);var D=this,W=X(D,A),J=D.getLine(A.line);if(!(J==null||I(D,A,J))){var M=C.lineComment||W.lineComment;if(!M){(C.blockCommentStart||W.blockCommentStart)&&(C.fullLines=!0,D.blockComment(A,H,C));return}var w=Math.min(H.ch!=0||H.line==A.line?H.line+1:H.line,D.lastLine()+1),v=C.padding==null?" ":C.padding,g=C.commentBlankLines||A.line==H.line;D.operation(function(){if(C.indent){for(var u=null,p=A.line;p<w;++p){var m=D.getLine(p),k=m.search(R)===-1?m:m.slice(0,B(m));(u==null||u.length>k.length)&&(u=k)}for(var p=A.line;p<w;++p){var m=D.getLine(p),d=u.length;!g&&!R.test(m)||(m.slice(0,d)!=u&&(d=B(m)),D.replaceRange(u+M+v,V(p,0),V(p,d)))}}else for(var p=A.line;p<w;++p)(g||R.test(D.getLine(p)))&&D.replaceRange(M+v,V(p,0))})}}),b.defineExtension("blockComment",function(A,H,C){C||(C=K);var D=this,W=X(D,A),J=C.blockCommentStart||W.blockCommentStart,M=C.blockCommentEnd||W.blockCommentEnd;if(!J||!M){(C.lineComment||W.lineComment)&&C.fullLines!=!1&&D.lineComment(A,H,C);return}if(!/\bcomment\b/.test(D.getTokenTypeAt(V(A.line,0)))){var w=Math.min(H.line,D.lastLine());w!=A.line&&H.ch==0&&R.test(D.getLine(w))&&--w;var v=C.padding==null?" ":C.padding;A.line>w||D.operation(function(){if(C.fullLines!=!1){var g=R.test(D.getLine(w));D.replaceRange(v+M,V(w)),D.replaceRange(J+v,V(A.line,0));var u=C.blockCommentLead||W.blockCommentLead;if(u!=null)for(var p=A.line+1;p<=w;++p)(p!=w||g)&&D.replaceRange(u+v,V(p,0))}else{var m=$(D.getCursor("to"),H)==0,k=!D.somethingSelected();D.replaceRange(M,H),m&&D.setSelection(k?H:D.getCursor("from"),H),D.replaceRange(J,A)}})}}),b.defineExtension("uncomment",function(A,H,C){C||(C=K);var D=this,W=X(D,A),J=Math.min(H.ch!=0||H.line==A.line?H.line:H.line-1,D.lastLine()),M=Math.min(A.line,J),w=C.lineComment||W.lineComment,v=[],g=C.padding==null?" ":C.padding,u;e:{if(!w)break e;for(var p=M;p<=J;++p){var m=D.getLine(p),k=m.indexOf(w);if(k>-1&&!/comment/.test(D.getTokenTypeAt(V(p,k+1)))&&(k=-1),k==-1&&R.test(m)||k>-1&&R.test(m.slice(0,k)))break e;v.push(m)}if(D.operation(function(){for(var fe=M;fe<=J;++fe){var Ce=v[fe-M],Ie=Ce.indexOf(w),Te=Ie+w.length;Ie<0||(Ce.slice(Te,Te+g.length)==g&&(Te+=g.length),u=!0,D.replaceRange("",V(fe,Ie),V(fe,Te)))}}),u)return!0}var d=C.blockCommentStart||W.blockCommentStart,L=C.blockCommentEnd||W.blockCommentEnd;if(!d||!L)return!1;var F=C.blockCommentLead||W.blockCommentLead,N=D.getLine(M),U=N.indexOf(d);if(U==-1)return!1;var O=J==M?N:D.getLine(J),_=O.indexOf(L,J==M?U+d.length:0),c=V(M,U+1),Z=V(J,_+1);if(_==-1||!/comment/.test(D.getTokenTypeAt(c))||!/comment/.test(D.getTokenTypeAt(Z))||D.getRange(c,Z,`
`).indexOf(L)>-1)return!1;var Y=N.lastIndexOf(d,A.ch),re=Y==-1?-1:N.slice(0,A.ch).indexOf(L,Y+d.length);if(Y!=-1&&re!=-1&&re+L.length!=A.ch)return!1;re=O.indexOf(L,H.ch);var ue=O.slice(H.ch).lastIndexOf(d,re-H.ch);return Y=re==-1||ue==-1?-1:H.ch+ue,re!=-1&&Y!=-1&&Y!=H.ch?!1:(D.operation(function(){D.replaceRange("",V(J,_-(g&&O.slice(_-g.length,_)==g?g.length:0)),V(J,_+L.length));var fe=U+d.length;if(g&&N.slice(fe,fe+g.length)==g&&(fe+=g.length),D.replaceRange("",V(M,U),V(M,fe)),F)for(var Ce=M+1;Ce<=J;++Ce){var Ie=D.getLine(Ce),Te=Ie.indexOf(F);if(!(Te==-1||R.test(Ie.slice(0,Te)))){var Qe=Te+F.length;g&&Ie.slice(Qe,Qe+g.length)==g&&(Qe+=g.length),D.replaceRange("",V(Ce,Te),V(Ce,Qe))}}}),!0)})})})();var Ku={exports:{}};(function(ze,Ge){(function(b){b(it)})(function(b){function K(B,I,X,A){if(X&&X.call){var H=X;X=null}else var H=$(B,X,"rangeFinder");typeof I=="number"&&(I=b.Pos(I,0));var C=$(B,X,"minFoldSize");function D(w){var v=H(B,I);if(!v||v.to.line-v.from.line<C)return null;if(A==="fold")return v;for(var g=B.findMarksAt(v.from),u=0;u<g.length;++u)if(g[u].__isFold){if(!w)return null;v.cleared=!0,g[u].clear()}return v}var W=D(!0);if($(B,X,"scanUp"))for(;!W&&I.line>B.firstLine();)I=b.Pos(I.line-1,0),W=D(!1);if(!(!W||W.cleared||A==="unfold")){var J=R(B,X,W);b.on(J,"mousedown",function(w){M.clear(),b.e_preventDefault(w)});var M=B.markText(W.from,W.to,{replacedWith:J,clearOnEnter:$(B,X,"clearOnEnter"),__isFold:!0});M.on("clear",function(w,v){b.signal(B,"unfold",B,w,v)}),b.signal(B,"fold",B,W.from,W.to)}}function R(B,I,X){var A=$(B,I,"widget");if(typeof A=="function"&&(A=A(X.from,X.to)),typeof A=="string"){var H=document.createTextNode(A);A=document.createElement("span"),A.appendChild(H),A.className="CodeMirror-foldmarker"}else A&&(A=A.cloneNode(!0));return A}b.newFoldFunction=function(B,I){return function(X,A){K(X,A,{rangeFinder:B,widget:I})}},b.defineExtension("foldCode",function(B,I,X){K(this,B,I,X)}),b.defineExtension("isFolded",function(B){for(var I=this.findMarksAt(B),X=0;X<I.length;++X)if(I[X].__isFold)return!0}),b.commands.toggleFold=function(B){B.foldCode(B.getCursor())},b.commands.fold=function(B){B.foldCode(B.getCursor(),null,"fold")},b.commands.unfold=function(B){B.foldCode(B.getCursor(),{scanUp:!1},"unfold")},b.commands.foldAll=function(B){B.operation(function(){for(var I=B.firstLine(),X=B.lastLine();I<=X;I++)B.foldCode(b.Pos(I,0),{scanUp:!1},"fold")})},b.commands.unfoldAll=function(B){B.operation(function(){for(var I=B.firstLine(),X=B.lastLine();I<=X;I++)B.foldCode(b.Pos(I,0),{scanUp:!1},"unfold")})},b.registerHelper("fold","combine",function(){var B=Array.prototype.slice.call(arguments,0);return function(I,X){for(var A=0;A<B.length;++A){var H=B[A](I,X);if(H)return H}}}),b.registerHelper("fold","auto",function(B,I){for(var X=B.getHelpers(I,"fold"),A=0;A<X.length;A++){var H=X[A](B,I);if(H)return H}});var V={rangeFinder:b.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};b.defineOption("foldOptions",null);function $(B,I,X){if(I&&I[X]!==void 0)return I[X];var A=B.options.foldOptions;return A&&A[X]!==void 0?A[X]:V[X]}b.defineExtension("foldOption",function(B,I){return $(this,B,I)})})})();var Uu=Ku.exports;(function(ze,Ge){(function(b){b(it,Uu)})(function(b){b.defineOption("foldGutter",!1,function(M,w,v){v&&v!=b.Init&&(M.clearGutter(M.state.foldGutter.options.gutter),M.state.foldGutter=null,M.off("gutterClick",H),M.off("changes",D),M.off("viewportChange",W),M.off("fold",J),M.off("unfold",J),M.off("swapDoc",D),M.off("optionChange",C)),w&&(M.state.foldGutter=new R(V(w)),A(M),M.on("gutterClick",H),M.on("changes",D),M.on("viewportChange",W),M.on("fold",J),M.on("unfold",J),M.on("swapDoc",D),M.on("optionChange",C))});var K=b.Pos;function R(M){this.options=M,this.from=this.to=0}function V(M){return M===!0&&(M={}),M.gutter==null&&(M.gutter="CodeMirror-foldgutter"),M.indicatorOpen==null&&(M.indicatorOpen="CodeMirror-foldgutter-open"),M.indicatorFolded==null&&(M.indicatorFolded="CodeMirror-foldgutter-folded"),M}function $(M,w){for(var v=M.findMarks(K(w,0),K(w+1,0)),g=0;g<v.length;++g)if(v[g].__isFold){var u=v[g].find(-1);if(u&&u.line===w)return v[g]}}function B(M){if(typeof M=="string"){var w=document.createElement("div");return w.className=M+" CodeMirror-guttermarker-subtle",w}else return M.cloneNode(!0)}function I(M,w,v){var g=M.state.foldGutter.options,u=w-1,p=M.foldOption(g,"minFoldSize"),m=M.foldOption(g,"rangeFinder"),k=typeof g.indicatorFolded=="string"&&X(g.indicatorFolded),d=typeof g.indicatorOpen=="string"&&X(g.indicatorOpen);M.eachLine(w,v,function(L){++u;var F=null,N=L.gutterMarkers;if(N&&(N=N[g.gutter]),$(M,u)){if(k&&N&&k.test(N.className))return;F=B(g.indicatorFolded)}else{var U=K(u,0),O=m&&m(M,U);if(O&&O.to.line-O.from.line>=p){if(d&&N&&d.test(N.className))return;F=B(g.indicatorOpen)}}!F&&!N||M.setGutterMarker(L,g.gutter,F)})}function X(M){return new RegExp("(^|\\s)"+M+"(?:$|\\s)\\s*")}function A(M){var w=M.getViewport(),v=M.state.foldGutter;v&&(M.operation(function(){I(M,w.from,w.to)}),v.from=w.from,v.to=w.to)}function H(M,w,v){var g=M.state.foldGutter;if(g){var u=g.options;if(v==u.gutter){var p=$(M,w);p?p.clear():M.foldCode(K(w,0),u)}}}function C(M,w){w=="mode"&&D(M)}function D(M){var w=M.state.foldGutter;if(w){var v=w.options;w.from=w.to=0,clearTimeout(w.changeUpdate),w.changeUpdate=setTimeout(function(){A(M)},v.foldOnChangeTimeSpan||600)}}function W(M){var w=M.state.foldGutter;if(w){var v=w.options;clearTimeout(w.changeUpdate),w.changeUpdate=setTimeout(function(){var g=M.getViewport();w.from==w.to||g.from-w.to>20||w.from-g.to>20?A(M):M.operation(function(){g.from<w.from&&(I(M,g.from,w.from),w.from=g.from),g.to>w.to&&(I(M,w.to,g.to),w.to=g.to)})},v.updateViewportTimeSpan||400)}}function J(M,w){var v=M.state.foldGutter;if(v){var g=w.line;g>=v.from&&g<v.to&&I(M,g,g+1)}}})})();(function(ze,Ge){(function(b){b(it)})(function(b){function K(R){return function(V,$){var B=$.line,I=V.getLine(B);function X(J){for(var M,w=$.ch,v=0;;){var g=w<=0?-1:I.lastIndexOf(J[0],w-1);if(g==-1){if(v==1)break;v=1,w=I.length;continue}if(v==1&&g<$.ch)break;if(M=V.getTokenTypeAt(b.Pos(B,g+1)),!/^(comment|string)/.test(M))return{ch:g+1,tokenType:M,pair:J};w=g-1}}function A(J){var M=1,w=V.lastLine(),v,g=J.ch,u;e:for(var p=B;p<=w;++p)for(var m=V.getLine(p),k=p==B?g:0;;){var d=m.indexOf(J.pair[0],k),L=m.indexOf(J.pair[1],k);if(d<0&&(d=m.length),L<0&&(L=m.length),k=Math.min(d,L),k==m.length)break;if(V.getTokenTypeAt(b.Pos(p,k+1))==J.tokenType){if(k==d)++M;else if(!--M){v=p,u=k;break e}}++k}return v==null||B==v?null:{from:b.Pos(B,g),to:b.Pos(v,u)}}for(var H=[],C=0;C<R.length;C++){var D=X(R[C]);D&&H.push(D)}H.sort(function(J,M){return J.ch-M.ch});for(var C=0;C<H.length;C++){var W=A(H[C]);if(W)return W}return null}}b.registerHelper("fold","brace",K([["{","}"],["[","]"]])),b.registerHelper("fold","brace-paren",K([["{","}"],["[","]"],["(",")"]])),b.registerHelper("fold","import",function(R,V){function $(C){if(C<R.firstLine()||C>R.lastLine())return null;var D=R.getTokenAt(b.Pos(C,1));if(/\S/.test(D.string)||(D=R.getTokenAt(b.Pos(C,D.end+1))),D.type!="keyword"||D.string!="import")return null;for(var W=C,J=Math.min(R.lastLine(),C+10);W<=J;++W){var M=R.getLine(W),w=M.indexOf(";");if(w!=-1)return{startCh:D.end,end:b.Pos(W,w)}}}var B=V.line,I=$(B),X;if(!I||$(B-1)||(X=$(B-2))&&X.end.line==B-1)return null;for(var A=I.end;;){var H=$(A.line+1);if(H==null)break;A=H.end}return{from:R.clipPos(b.Pos(B,I.startCh+1)),to:A}}),b.registerHelper("fold","include",function(R,V){function $(H){if(H<R.firstLine()||H>R.lastLine())return null;var C=R.getTokenAt(b.Pos(H,1));if(/\S/.test(C.string)||(C=R.getTokenAt(b.Pos(H,C.end+1))),C.type=="meta"&&C.string.slice(0,8)=="#include")return C.start+8}var B=V.line,I=$(B);if(I==null||$(B-1)!=null)return null;for(var X=B;;){var A=$(X+1);if(A==null)break;++X}return{from:b.Pos(B,I+1),to:R.clipPos(b.Pos(X))}})})})();(function(ze,Ge){(function(b){b(it)})(function(b){function K(R,V){var $=R.getLine(V),B=$.search(/\S/);return B==-1||/\bcomment\b/.test(R.getTokenTypeAt(b.Pos(V,B+1)))?-1:b.countColumn($,null,R.getOption("tabSize"))}b.registerHelper("fold","indent",function(R,V){var $=K(R,V.line);if(!($<0)){for(var B=null,I=V.line+1,X=R.lastLine();I<=X;++I){var A=K(R,I);if(A!=-1)if(A>$)B=I;else break}if(B)return{from:b.Pos(V.line,R.getLine(V.line).length),to:b.Pos(B,R.getLine(B).length)}}})})})();(function(ze,Ge){(function(b){b(it)})(function(b){b.registerGlobalHelper("fold","comment",function(K){return K.blockCommentStart&&K.blockCommentEnd},function(K,R){var V=K.getModeAt(R),$=V.blockCommentStart,B=V.blockCommentEnd;if(!(!$||!B)){for(var I=R.line,X=K.getLine(I),A,H=R.ch,C=0;;){var D=H<=0?-1:X.lastIndexOf($,H-1);if(D==-1){if(C==1)return;C=1,H=X.length;continue}if(C==1&&D<R.ch)return;if(/comment/.test(K.getTokenTypeAt(b.Pos(I,D+1)))&&(D==0||X.slice(D-B.length,D)==B||!/comment/.test(K.getTokenTypeAt(b.Pos(I,D))))){A=D+$.length;break}H=D-1}var W=1,J=K.lastLine(),M,w;e:for(var v=I;v<=J;++v)for(var g=K.getLine(v),u=v==I?A:0;;){var p=g.indexOf($,u),m=g.indexOf(B,u);if(p<0&&(p=g.length),m<0&&(m=g.length),u=Math.min(p,m),u==g.length)break;if(u==p)++W;else if(!--W){M=v,w=u;break e}++u}if(!(M==null||I==M&&w==A))return{from:b.Pos(I,A),to:b.Pos(M,w)}}})})})();var gl={exports:{}},ml;function co(){return ml||(ml=1,function(ze,Ge){(function(b){b(it)})(function(b){var K=b.Pos;function R(v){var g=v.flags;return g??(v.ignoreCase?"i":"")+(v.global?"g":"")+(v.multiline?"m":"")}function V(v,g){for(var u=R(v),p=u,m=0;m<g.length;m++)p.indexOf(g.charAt(m))==-1&&(p+=g.charAt(m));return u==p?v:new RegExp(v.source,p)}function $(v){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(v.source)}function B(v,g,u){g=V(g,"g");for(var p=u.line,m=u.ch,k=v.lastLine();p<=k;p++,m=0){g.lastIndex=m;var d=v.getLine(p),L=g.exec(d);if(L)return{from:K(p,L.index),to:K(p,L.index+L[0].length),match:L}}}function I(v,g,u){if(!$(g))return B(v,g,u);g=V(g,"gm");for(var p,m=1,k=u.line,d=v.lastLine();k<=d;){for(var L=0;L<m&&!(k>d);L++){var F=v.getLine(k++);p=p==null?F:p+`
`+F}m=m*2,g.lastIndex=u.ch;var N=g.exec(p);if(N){var U=p.slice(0,N.index).split(`
`),O=N[0].split(`
`),_=u.line+U.length-1,c=U[U.length-1].length;return{from:K(_,c),to:K(_+O.length-1,O.length==1?c+O[0].length:O[O.length-1].length),match:N}}}}function X(v,g,u){for(var p,m=0;m<=v.length;){g.lastIndex=m;var k=g.exec(v);if(!k)break;var d=k.index+k[0].length;if(d>v.length-u)break;(!p||d>p.index+p[0].length)&&(p=k),m=k.index+1}return p}function A(v,g,u){g=V(g,"g");for(var p=u.line,m=u.ch,k=v.firstLine();p>=k;p--,m=-1){var d=v.getLine(p),L=X(d,g,m<0?0:d.length-m);if(L)return{from:K(p,L.index),to:K(p,L.index+L[0].length),match:L}}}function H(v,g,u){if(!$(g))return A(v,g,u);g=V(g,"gm");for(var p,m=1,k=v.getLine(u.line).length-u.ch,d=u.line,L=v.firstLine();d>=L;){for(var F=0;F<m&&d>=L;F++){var N=v.getLine(d--);p=p==null?N:N+`
`+p}m*=2;var U=X(p,g,k);if(U){var O=p.slice(0,U.index).split(`
`),_=U[0].split(`
`),c=d+O.length,Z=O[O.length-1].length;return{from:K(c,Z),to:K(c+_.length-1,_.length==1?Z+_[0].length:_[_.length-1].length),match:U}}}}var C,D;String.prototype.normalize?(C=function(v){return v.normalize("NFD").toLowerCase()},D=function(v){return v.normalize("NFD")}):(C=function(v){return v.toLowerCase()},D=function(v){return v});function W(v,g,u,p){if(v.length==g.length)return u;for(var m=0,k=u+Math.max(0,v.length-g.length);;){if(m==k)return m;var d=m+k>>1,L=p(v.slice(0,d)).length;if(L==u)return d;L>u?k=d:m=d+1}}function J(v,g,u,p){if(!g.length)return null;var m=p?C:D,k=m(g).split(/\r|\n\r?/);e:for(var d=u.line,L=u.ch,F=v.lastLine()+1-k.length;d<=F;d++,L=0){var N=v.getLine(d).slice(L),U=m(N);if(k.length==1){var O=U.indexOf(k[0]);if(O==-1)continue e;var u=W(N,U,O,m)+L;return{from:K(d,W(N,U,O,m)+L),to:K(d,W(N,U,O+k[0].length,m)+L)}}else{var _=U.length-k[0].length;if(U.slice(_)!=k[0])continue e;for(var c=1;c<k.length-1;c++)if(m(v.getLine(d+c))!=k[c])continue e;var Z=v.getLine(d+k.length-1),Y=m(Z),re=k[k.length-1];if(Y.slice(0,re.length)!=re)continue e;return{from:K(d,W(N,U,_,m)+L),to:K(d+k.length-1,W(Z,Y,re.length,m))}}}}function M(v,g,u,p){if(!g.length)return null;var m=p?C:D,k=m(g).split(/\r|\n\r?/);e:for(var d=u.line,L=u.ch,F=v.firstLine()-1+k.length;d>=F;d--,L=-1){var N=v.getLine(d);L>-1&&(N=N.slice(0,L));var U=m(N);if(k.length==1){var O=U.lastIndexOf(k[0]);if(O==-1)continue e;return{from:K(d,W(N,U,O,m)),to:K(d,W(N,U,O+k[0].length,m))}}else{var _=k[k.length-1];if(U.slice(0,_.length)!=_)continue e;for(var c=1,u=d-k.length+1;c<k.length-1;c++)if(m(v.getLine(u+c))!=k[c])continue e;var Z=v.getLine(d+1-k.length),Y=m(Z);if(Y.slice(Y.length-k[0].length)!=k[0])continue e;return{from:K(d+1-k.length,W(Z,Y,Z.length-k[0].length,m)),to:K(d,W(N,U,_.length,m))}}}}function w(v,g,u,p){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=v,u=u?v.clipPos(u):K(0,0),this.pos={from:u,to:u};var m;typeof p=="object"?m=p.caseFold:(m=p,p=null),typeof g=="string"?(m==null&&(m=!1),this.matches=function(k,d){return(k?M:J)(v,g,d,m)}):(g=V(g,"gm"),!p||p.multiline!==!1?this.matches=function(k,d){return(k?H:I)(v,g,d)}:this.matches=function(k,d){return(k?A:B)(v,g,d)})}w.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(v){var g=this.doc.clipPos(v?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(g=K(g.line,g.ch),v?(g.ch--,g.ch<0&&(g.line--,g.ch=(this.doc.getLine(g.line)||"").length)):(g.ch++,g.ch>(this.doc.getLine(g.line)||"").length&&(g.ch=0,g.line++)),b.cmpPos(g,this.doc.clipPos(g))!=0))return this.atOccurrence=!1;var u=this.matches(v,g);if(this.afterEmptyMatch=u&&b.cmpPos(u.from,u.to)==0,u)return this.pos=u,this.atOccurrence=!0,this.pos.match||!0;var p=K(v?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:p,to:p},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(v,g){if(this.atOccurrence){var u=b.splitLines(v);this.doc.replaceRange(u,this.pos.from,this.pos.to,g),this.pos.to=K(this.pos.from.line+u.length-1,u[u.length-1].length+(u.length==1?this.pos.from.ch:0))}}},b.defineExtension("getSearchCursor",function(v,g,u){return new w(this.doc,v,g,u)}),b.defineDocExtension("getSearchCursor",function(v,g,u){return new w(this,v,g,u)}),b.defineExtension("selectMatches",function(v,g){for(var u=[],p=this.getSearchCursor(v,this.getCursor("from"),g);p.findNext()&&!(b.cmpPos(p.to(),this.getCursor("to"))>0);)u.push({anchor:p.from(),head:p.to()});u.length&&this.setSelections(u,0)})})}()),gl.exports}var yl={exports:{}},bl;function Ll(){return bl||(bl=1,function(ze,Ge){(function(b){b(it)})(function(b){function K(V,$,B){var I=V.getWrapperElement(),X;return X=I.appendChild(document.createElement("div")),B?X.className="CodeMirror-dialog CodeMirror-dialog-bottom":X.className="CodeMirror-dialog CodeMirror-dialog-top",typeof $=="string"?X.innerHTML=$:X.appendChild($),b.addClass(I,"dialog-opened"),X}function R(V,$){V.state.currentNotificationClose&&V.state.currentNotificationClose(),V.state.currentNotificationClose=$}b.defineExtension("openDialog",function(V,$,B){B||(B={}),R(this,null);var I=K(this,V,B.bottom),X=!1,A=this;function H(W){if(typeof W=="string")C.value=W;else{if(X)return;X=!0,b.rmClass(I.parentNode,"dialog-opened"),I.parentNode.removeChild(I),A.focus(),B.onClose&&B.onClose(I)}}var C=I.getElementsByTagName("input")[0],D;return C?(C.focus(),B.value&&(C.value=B.value,B.selectValueOnOpen!==!1&&C.select()),B.onInput&&b.on(C,"input",function(W){B.onInput(W,C.value,H)}),B.onKeyUp&&b.on(C,"keyup",function(W){B.onKeyUp(W,C.value,H)}),b.on(C,"keydown",function(W){B&&B.onKeyDown&&B.onKeyDown(W,C.value,H)||((W.keyCode==27||B.closeOnEnter!==!1&&W.keyCode==13)&&(C.blur(),b.e_stop(W),H()),W.keyCode==13&&$(C.value,W))}),B.closeOnBlur!==!1&&b.on(I,"focusout",function(W){W.relatedTarget!==null&&H()})):(D=I.getElementsByTagName("button")[0])&&(b.on(D,"click",function(){H(),A.focus()}),B.closeOnBlur!==!1&&b.on(D,"blur",H),D.focus()),H}),b.defineExtension("openConfirm",function(V,$,B){R(this,null);var I=K(this,V,B&&B.bottom),X=I.getElementsByTagName("button"),A=!1,H=this,C=1;function D(){A||(A=!0,b.rmClass(I.parentNode,"dialog-opened"),I.parentNode.removeChild(I),H.focus())}X[0].focus();for(var W=0;W<X.length;++W){var J=X[W];(function(M){b.on(J,"click",function(w){b.e_preventDefault(w),D(),M&&M(H)})})($[W]),b.on(J,"blur",function(){--C,setTimeout(function(){C<=0&&D()},200)}),b.on(J,"focus",function(){++C})}}),b.defineExtension("openNotification",function(V,$){R(this,H);var B=K(this,V,$&&$.bottom),I=!1,X,A=$&&typeof $.duration<"u"?$.duration:5e3;function H(){I||(I=!0,clearTimeout(X),b.rmClass(B.parentNode,"dialog-opened"),B.parentNode.removeChild(B))}return b.on(B,"click",function(C){b.e_preventDefault(C),H()}),A&&(X=setTimeout(H,A)),H})})}()),yl.exports}(function(ze,Ge){(function(b){b(it,co(),Ll())})(function(b){b.defineOption("search",{bottom:!1});function K(d,L){return typeof d=="string"?d=new RegExp(d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),L?"gi":"g"):d.global||(d=new RegExp(d.source,d.ignoreCase?"gi":"g")),{token:function(F){d.lastIndex=F.pos;var N=d.exec(F.string);if(N&&N.index==F.pos)return F.pos+=N[0].length||1,"searching";N?F.pos=N.index:F.skipToEnd()}}}function R(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function V(d){return d.state.search||(d.state.search=new R)}function $(d){return typeof d=="string"&&d==d.toLowerCase()}function B(d,L,F){return d.getSearchCursor(L,F,{caseFold:$(L),multiline:!0})}function I(d,L,F,N,U){d.openDialog(L,N,{value:F,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){M(d)},onKeyDown:U,bottom:d.options.search.bottom})}function X(d,L,F,N,U){d.openDialog?d.openDialog(L,U,{value:N,selectValueOnOpen:!0,bottom:d.options.search.bottom}):U(prompt(F,N))}function A(d,L,F,N){d.openConfirm?d.openConfirm(L,N):confirm(F)&&N[0]()}function H(d){return d.replace(/\\([nrt\\])/g,function(L,F){return F=="n"?`
`:F=="r"?"\r":F=="t"?" ":F=="\\"?"\\":L})}function C(d){var L=d.match(/^\/(.*)\/([a-z]*)$/);if(L)try{d=new RegExp(L[1],L[2].indexOf("i")==-1?"":"i")}catch{}else d=H(d);return(typeof d=="string"?d=="":d.test(""))&&(d=/x^/),d}function D(d,L,F){L.queryText=F,L.query=C(F),d.removeOverlay(L.overlay,$(L.query)),L.overlay=K(L.query,$(L.query)),d.addOverlay(L.overlay),d.showMatchesOnScrollbar&&(L.annotate&&(L.annotate.clear(),L.annotate=null),L.annotate=d.showMatchesOnScrollbar(L.query,$(L.query)))}function W(d,L,F,N){var U=V(d);if(U.query)return J(d,L);var O=d.getSelection()||U.lastQuery;if(O instanceof RegExp&&O.source=="x^"&&(O=null),F&&d.openDialog){var _=null,c=function(Z,Y){b.e_stop(Y),Z&&(Z!=U.queryText&&(D(d,U,Z),U.posFrom=U.posTo=d.getCursor()),_&&(_.style.opacity=1),J(d,Y.shiftKey,function(re,ue){var fe;ue.line<3&&document.querySelector&&(fe=d.display.wrapper.querySelector(".CodeMirror-dialog"))&&fe.getBoundingClientRect().bottom-4>d.cursorCoords(ue,"window").top&&((_=fe).style.opacity=.4)}))};I(d,v(d),O,c,function(Z,Y){var re=b.keyName(Z),ue=d.getOption("extraKeys"),fe=ue&&ue[re]||b.keyMap[d.getOption("keyMap")][re];fe=="findNext"||fe=="findPrev"||fe=="findPersistentNext"||fe=="findPersistentPrev"?(b.e_stop(Z),D(d,V(d),Y),d.execCommand(fe)):(fe=="find"||fe=="findPersistent")&&(b.e_stop(Z),c(Y,Z))}),N&&O&&(D(d,U,O),J(d,L))}else X(d,v(d),"Search for:",O,function(Z){Z&&!U.query&&d.operation(function(){D(d,U,Z),U.posFrom=U.posTo=d.getCursor(),J(d,L)})})}function J(d,L,F){d.operation(function(){var N=V(d),U=B(d,N.query,L?N.posFrom:N.posTo);!U.find(L)&&(U=B(d,N.query,L?b.Pos(d.lastLine()):b.Pos(d.firstLine(),0)),!U.find(L))||(d.setSelection(U.from(),U.to()),d.scrollIntoView({from:U.from(),to:U.to()},20),N.posFrom=U.from(),N.posTo=U.to(),F&&F(U.from(),U.to()))})}function M(d){d.operation(function(){var L=V(d);L.lastQuery=L.query,L.query&&(L.query=L.queryText=null,d.removeOverlay(L.overlay),L.annotate&&(L.annotate.clear(),L.annotate=null))})}function w(d,L){var F=d?document.createElement(d):document.createDocumentFragment();for(var N in L)F[N]=L[N];for(var U=2;U<arguments.length;U++){var O=arguments[U];F.appendChild(typeof O=="string"?document.createTextNode(O):O)}return F}function v(d){var L=w("label",{className:"CodeMirror-search-label"},d.phrase("Search:"),w("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return L.setAttribute("for","CodeMirror-search-field"),w("",null,L," ",w("span",{style:"color: #666",className:"CodeMirror-search-hint"},d.phrase("(Use /re/ syntax for regexp search)")))}function g(d){return w("",null," ",w("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",w("span",{style:"color: #666",className:"CodeMirror-search-hint"},d.phrase("(Use /re/ syntax for regexp search)")))}function u(d){return w("",null,w("span",{className:"CodeMirror-search-label"},d.phrase("With:"))," ",w("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function p(d){return w("",null,w("span",{className:"CodeMirror-search-label"},d.phrase("Replace?"))," ",w("button",{},d.phrase("Yes"))," ",w("button",{},d.phrase("No"))," ",w("button",{},d.phrase("All"))," ",w("button",{},d.phrase("Stop")))}function m(d,L,F){d.operation(function(){for(var N=B(d,L);N.findNext();)if(typeof L!="string"){var U=d.getRange(N.from(),N.to()).match(L);N.replace(F.replace(/\$(\d)/g,function(O,_){return U[_]}))}else N.replace(F)})}function k(d,L){if(!d.getOption("readOnly")){var F=d.getSelection()||V(d).lastQuery,N=L?d.phrase("Replace all:"):d.phrase("Replace:"),U=w("",null,w("span",{className:"CodeMirror-search-label"},N),g(d));X(d,U,N,F,function(O){O&&(O=C(O),X(d,u(d),d.phrase("Replace with:"),"",function(_){if(_=H(_),L)m(d,O,_);else{M(d);var c=B(d,O,d.getCursor("from")),Z=function(){var re=c.from(),ue;!(ue=c.findNext())&&(c=B(d,O),!(ue=c.findNext())||re&&c.from().line==re.line&&c.from().ch==re.ch)||(d.setSelection(c.from(),c.to()),d.scrollIntoView({from:c.from(),to:c.to()}),A(d,p(d),d.phrase("Replace?"),[function(){Y(ue)},Z,function(){m(d,O,_)}]))},Y=function(re){c.replace(typeof O=="string"?_:_.replace(/\$(\d)/g,function(ue,fe){return re[fe]})),Z()};Z()}}))})}}b.commands.find=function(d){M(d),W(d)},b.commands.findPersistent=function(d){M(d),W(d,!1,!0)},b.commands.findPersistentNext=function(d){W(d,!1,!0,!0)},b.commands.findPersistentPrev=function(d){W(d,!0,!0,!0)},b.commands.findNext=W,b.commands.findPrev=function(d){W(d,!0)},b.commands.clearSearch=M,b.commands.replace=k,b.commands.replaceAll=function(d){k(d,!0)}})})();co();Ll();var xl={exports:{}},kl;function _u(){return kl||(kl=1,function(ze,Ge){(function(b){b(it)})(function(b){var K=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),R=b.Pos,V={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function $(C){return C&&C.bracketRegex||/[(){}[\]]/}function B(C,D,W){var J=C.getLineHandle(D.line),M=D.ch-1,w=W&&W.afterCursor;w==null&&(w=/(^| )cm-fat-cursor($| )/.test(C.getWrapperElement().className));var v=$(W),g=!w&&M>=0&&v.test(J.text.charAt(M))&&V[J.text.charAt(M)]||v.test(J.text.charAt(M+1))&&V[J.text.charAt(++M)];if(!g)return null;var u=g.charAt(1)==">"?1:-1;if(W&&W.strict&&u>0!=(M==D.ch))return null;var p=C.getTokenTypeAt(R(D.line,M+1)),m=I(C,R(D.line,M+(u>0?1:0)),u,p,W);return m==null?null:{from:R(D.line,M),to:m&&m.pos,match:m&&m.ch==g.charAt(0),forward:u>0}}function I(C,D,W,J,M){for(var w=M&&M.maxScanLineLength||1e4,v=M&&M.maxScanLines||1e3,g=[],u=$(M),p=W>0?Math.min(D.line+v,C.lastLine()+1):Math.max(C.firstLine()-1,D.line-v),m=D.line;m!=p;m+=W){var k=C.getLine(m);if(k){var d=W>0?0:k.length-1,L=W>0?k.length:-1;if(!(k.length>w))for(m==D.line&&(d=D.ch-(W<0?1:0));d!=L;d+=W){var F=k.charAt(d);if(u.test(F)&&(J===void 0||(C.getTokenTypeAt(R(m,d+1))||"")==(J||""))){var N=V[F];if(N&&N.charAt(1)==">"==W>0)g.push(F);else if(g.length)g.pop();else return{pos:R(m,d),ch:F}}}}}return m-W==(W>0?C.lastLine():C.firstLine())?!1:null}function X(C,D,W){for(var J=C.state.matchBrackets.maxHighlightLineLength||1e3,M=W&&W.highlightNonMatching,w=[],v=C.listSelections(),g=0;g<v.length;g++){var u=v[g].empty()&&B(C,v[g].head,W);if(u&&(u.match||M!==!1)&&C.getLine(u.from.line).length<=J){var p=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";w.push(C.markText(u.from,R(u.from.line,u.from.ch+1),{className:p})),u.to&&C.getLine(u.to.line).length<=J&&w.push(C.markText(u.to,R(u.to.line,u.to.ch+1),{className:p}))}}if(w.length){K&&C.state.focused&&C.focus();var m=function(){C.operation(function(){for(var k=0;k<w.length;k++)w[k].clear()})};if(D)setTimeout(m,800);else return m}}function A(C){C.operation(function(){C.state.matchBrackets.currentlyHighlighted&&(C.state.matchBrackets.currentlyHighlighted(),C.state.matchBrackets.currentlyHighlighted=null),C.state.matchBrackets.currentlyHighlighted=X(C,!1,C.state.matchBrackets)})}function H(C){C.state.matchBrackets&&C.state.matchBrackets.currentlyHighlighted&&(C.state.matchBrackets.currentlyHighlighted(),C.state.matchBrackets.currentlyHighlighted=null)}b.defineOption("matchBrackets",!1,function(C,D,W){W&&W!=b.Init&&(C.off("cursorActivity",A),C.off("focus",A),C.off("blur",H),H(C)),D&&(C.state.matchBrackets=typeof D=="object"?D:{},C.on("cursorActivity",A),C.on("focus",A),C.on("blur",H))}),b.defineExtension("matchBrackets",function(){X(this,!0)}),b.defineExtension("findMatchingBracket",function(C,D,W){return(W||typeof D=="boolean")&&(W?(W.strict=D,D=W):D=D?{strict:!0}:null),B(this,C,D)}),b.defineExtension("scanForBracket",function(C,D,W,J){return I(this,C,D,W,J)})})}()),xl.exports}(function(ze,Ge){(function(b){b(it,co(),_u())})(function(b){var K=b.commands,R=b.Pos;function V(u,p,m){if(m<0&&p.ch==0)return u.clipPos(R(p.line-1));var k=u.getLine(p.line);if(m>0&&p.ch>=k.length)return u.clipPos(R(p.line+1,0));for(var d="start",L,F=p.ch,N=F,U=m<0?0:k.length,O=0;N!=U;N+=m,O++){var _=k.charAt(m<0?N-1:N),c=_!="_"&&b.isWordChar(_)?"w":"o";if(c=="w"&&_.toUpperCase()==_&&(c="W"),d=="start")c!="o"?(d="in",L=c):F=N+m;else if(d=="in"&&L!=c){if(L=="w"&&c=="W"&&m<0&&N--,L=="W"&&c=="w"&&m>0)if(N==F+1){L="w";continue}else N--;break}}return R(p.line,N)}function $(u,p){u.extendSelectionsBy(function(m){return u.display.shift||u.doc.extend||m.empty()?V(u.doc,m.head,p):p<0?m.from():m.to()})}K.goSubwordLeft=function(u){$(u,-1)},K.goSubwordRight=function(u){$(u,1)},K.scrollLineUp=function(u){var p=u.getScrollInfo();if(!u.somethingSelected()){var m=u.lineAtHeight(p.top+p.clientHeight,"local");u.getCursor().line>=m&&u.execCommand("goLineUp")}u.scrollTo(null,p.top-u.defaultTextHeight())},K.scrollLineDown=function(u){var p=u.getScrollInfo();if(!u.somethingSelected()){var m=u.lineAtHeight(p.top,"local")+1;u.getCursor().line<=m&&u.execCommand("goLineDown")}u.scrollTo(null,p.top+u.defaultTextHeight())},K.splitSelectionByLine=function(u){for(var p=u.listSelections(),m=[],k=0;k<p.length;k++)for(var d=p[k].from(),L=p[k].to(),F=d.line;F<=L.line;++F)L.line>d.line&&F==L.line&&L.ch==0||m.push({anchor:F==d.line?d:R(F,0),head:F==L.line?L:R(F)});u.setSelections(m,0)},K.singleSelectionTop=function(u){var p=u.listSelections()[0];u.setSelection(p.anchor,p.head,{scroll:!1})},K.selectLine=function(u){for(var p=u.listSelections(),m=[],k=0;k<p.length;k++){var d=p[k];m.push({anchor:R(d.from().line,0),head:R(d.to().line+1,0)})}u.setSelections(m)};function B(u,p){if(u.isReadOnly())return b.Pass;u.operation(function(){for(var m=u.listSelections().length,k=[],d=-1,L=0;L<m;L++){var F=u.listSelections()[L].head;if(!(F.line<=d)){var N=R(F.line+(p?0:1),0);u.replaceRange(`
`,N,null,"+insertLine"),u.indentLine(N.line,null,!0),k.push({head:N,anchor:N}),d=F.line+1}}u.setSelections(k)}),u.execCommand("indentAuto")}K.insertLineAfter=function(u){return B(u,!1)},K.insertLineBefore=function(u){return B(u,!0)};function I(u,p){for(var m=p.ch,k=m,d=u.getLine(p.line);m&&b.isWordChar(d.charAt(m-1));)--m;for(;k<d.length&&b.isWordChar(d.charAt(k));)++k;return{from:R(p.line,m),to:R(p.line,k),word:d.slice(m,k)}}K.selectNextOccurrence=function(u){var p=u.getCursor("from"),m=u.getCursor("to"),k=u.state.sublimeFindFullWord==u.doc.sel;if(b.cmpPos(p,m)==0){var d=I(u,p);if(!d.word)return;u.setSelection(d.from,d.to),k=!0}else{var L=u.getRange(p,m),F=k?new RegExp("\\b"+L+"\\b"):L,N=u.getSearchCursor(F,m),U=N.findNext();if(U||(N=u.getSearchCursor(F,R(u.firstLine(),0)),U=N.findNext()),!U||A(u.listSelections(),N.from(),N.to()))return;u.addSelection(N.from(),N.to())}k&&(u.state.sublimeFindFullWord=u.doc.sel)},K.skipAndSelectNextOccurrence=function(u){var p=u.getCursor("anchor"),m=u.getCursor("head");K.selectNextOccurrence(u),b.cmpPos(p,m)!=0&&u.doc.setSelections(u.doc.listSelections().filter(function(k){return k.anchor!=p||k.head!=m}))};function X(u,p){for(var m=u.listSelections(),k=[],d=0;d<m.length;d++){var L=m[d],F=u.findPosV(L.anchor,p,"line",L.anchor.goalColumn),N=u.findPosV(L.head,p,"line",L.head.goalColumn);F.goalColumn=L.anchor.goalColumn!=null?L.anchor.goalColumn:u.cursorCoords(L.anchor,"div").left,N.goalColumn=L.head.goalColumn!=null?L.head.goalColumn:u.cursorCoords(L.head,"div").left;var U={anchor:F,head:N};k.push(L),k.push(U)}u.setSelections(k)}K.addCursorToPrevLine=function(u){X(u,-1)},K.addCursorToNextLine=function(u){X(u,1)};function A(u,p,m){for(var k=0;k<u.length;k++)if(b.cmpPos(u[k].from(),p)==0&&b.cmpPos(u[k].to(),m)==0)return!0;return!1}var H="(){}[]";function C(u){for(var p=u.listSelections(),m=[],k=0;k<p.length;k++){var d=p[k],L=d.head,F=u.scanForBracket(L,-1);if(!F)return!1;for(;;){var N=u.scanForBracket(L,1);if(!N)return!1;if(N.ch==H.charAt(H.indexOf(F.ch)+1)){var U=R(F.pos.line,F.pos.ch+1);if(b.cmpPos(U,d.from())==0&&b.cmpPos(N.pos,d.to())==0){if(F=u.scanForBracket(F.pos,-1),!F)return!1}else{m.push({anchor:U,head:N.pos});break}}L=R(N.pos.line,N.pos.ch+1)}}return u.setSelections(m),!0}K.selectScope=function(u){C(u)||u.execCommand("selectAll")},K.selectBetweenBrackets=function(u){if(!C(u))return b.Pass};function D(u){return u?/\bpunctuation\b/.test(u)?u:void 0:null}K.goToBracket=function(u){u.extendSelectionsBy(function(p){var m=u.scanForBracket(p.head,1,D(u.getTokenTypeAt(p.head)));if(m&&b.cmpPos(m.pos,p.head)!=0)return m.pos;var k=u.scanForBracket(p.head,-1,D(u.getTokenTypeAt(R(p.head.line,p.head.ch+1))));return k&&R(k.pos.line,k.pos.ch+1)||p.head})},K.swapLineUp=function(u){if(u.isReadOnly())return b.Pass;for(var p=u.listSelections(),m=[],k=u.firstLine()-1,d=[],L=0;L<p.length;L++){var F=p[L],N=F.from().line-1,U=F.to().line;d.push({anchor:R(F.anchor.line-1,F.anchor.ch),head:R(F.head.line-1,F.head.ch)}),F.to().ch==0&&!F.empty()&&--U,N>k?m.push(N,U):m.length&&(m[m.length-1]=U),k=U}u.operation(function(){for(var O=0;O<m.length;O+=2){var _=m[O],c=m[O+1],Z=u.getLine(_);u.replaceRange("",R(_,0),R(_+1,0),"+swapLine"),c>u.lastLine()?u.replaceRange(`
`+Z,R(u.lastLine()),null,"+swapLine"):u.replaceRange(Z+`
`,R(c,0),null,"+swapLine")}u.setSelections(d),u.scrollIntoView()})},K.swapLineDown=function(u){if(u.isReadOnly())return b.Pass;for(var p=u.listSelections(),m=[],k=u.lastLine()+1,d=p.length-1;d>=0;d--){var L=p[d],F=L.to().line+1,N=L.from().line;L.to().ch==0&&!L.empty()&&F--,F<k?m.push(F,N):m.length&&(m[m.length-1]=N),k=N}u.operation(function(){for(var U=m.length-2;U>=0;U-=2){var O=m[U],_=m[U+1],c=u.getLine(O);O==u.lastLine()?u.replaceRange("",R(O-1),R(O),"+swapLine"):u.replaceRange("",R(O,0),R(O+1,0),"+swapLine"),u.replaceRange(c+`
`,R(_,0),null,"+swapLine")}u.scrollIntoView()})},K.toggleCommentIndented=function(u){u.toggleComment({indent:!0})},K.joinLines=function(u){for(var p=u.listSelections(),m=[],k=0;k<p.length;k++){for(var d=p[k],L=d.from(),F=L.line,N=d.to().line;k<p.length-1&&p[k+1].from().line==N;)N=p[++k].to().line;m.push({start:F,end:N,anchor:!d.empty()&&L})}u.operation(function(){for(var U=0,O=[],_=0;_<m.length;_++){for(var c=m[_],Z=c.anchor&&R(c.anchor.line-U,c.anchor.ch),Y,re=c.start;re<=c.end;re++){var ue=re-U;re==c.end&&(Y=R(ue,u.getLine(ue).length+1)),ue<u.lastLine()&&(u.replaceRange(" ",R(ue),R(ue+1,/^\s*/.exec(u.getLine(ue+1))[0].length)),++U)}O.push({anchor:Z||Y,head:Y})}u.setSelections(O,0)})},K.duplicateLine=function(u){u.operation(function(){for(var p=u.listSelections().length,m=0;m<p;m++){var k=u.listSelections()[m];k.empty()?u.replaceRange(u.getLine(k.head.line)+`
`,R(k.head.line,0)):u.replaceRange(u.getRange(k.from(),k.to()),k.from())}u.scrollIntoView()})};function W(u,p,m){if(u.isReadOnly())return b.Pass;for(var k=u.listSelections(),d=[],L,F=0;F<k.length;F++){var N=k[F];if(!N.empty()){for(var U=N.from().line,O=N.to().line;F<k.length-1&&k[F+1].from().line==O;)O=k[++F].to().line;k[F].to().ch||O--,d.push(U,O)}}d.length?L=!0:d.push(u.firstLine(),u.lastLine()),u.operation(function(){for(var _=[],c=0;c<d.length;c+=2){var Z=d[c],Y=d[c+1],re=R(Z,0),ue=R(Y),fe=u.getRange(re,ue,!1);p?fe.sort(function(Ce,Ie){return Ce<Ie?-m:Ce==Ie?0:m}):fe.sort(function(Ce,Ie){var Te=Ce.toUpperCase(),Qe=Ie.toUpperCase();return Te!=Qe&&(Ce=Te,Ie=Qe),Ce<Ie?-m:Ce==Ie?0:m}),u.replaceRange(fe,re,ue),L&&_.push({anchor:re,head:R(Y+1,0)})}L&&u.setSelections(_,0)})}K.sortLines=function(u){W(u,!0,1)},K.reverseSortLines=function(u){W(u,!0,-1)},K.sortLinesInsensitive=function(u){W(u,!1,1)},K.reverseSortLinesInsensitive=function(u){W(u,!1,-1)},K.nextBookmark=function(u){var p=u.state.sublimeBookmarks;if(p)for(;p.length;){var m=p.shift(),k=m.find();if(k)return p.push(m),u.setSelection(k.from,k.to)}},K.prevBookmark=function(u){var p=u.state.sublimeBookmarks;if(p)for(;p.length;){p.unshift(p.pop());var m=p[p.length-1].find();if(!m)p.pop();else return u.setSelection(m.from,m.to)}},K.toggleBookmark=function(u){for(var p=u.listSelections(),m=u.state.sublimeBookmarks||(u.state.sublimeBookmarks=[]),k=0;k<p.length;k++){for(var d=p[k].from(),L=p[k].to(),F=p[k].empty()?u.findMarksAt(d):u.findMarks(d,L),N=0;N<F.length;N++)if(F[N].sublimeBookmark){F[N].clear();for(var U=0;U<m.length;U++)m[U]==F[N]&&m.splice(U--,1);break}N==F.length&&m.push(u.markText(d,L,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},K.clearBookmarks=function(u){var p=u.state.sublimeBookmarks;if(p)for(var m=0;m<p.length;m++)p[m].clear();p.length=0},K.selectBookmarks=function(u){var p=u.state.sublimeBookmarks,m=[];if(p)for(var k=0;k<p.length;k++){var d=p[k].find();d?m.push({anchor:d.from,head:d.to}):p.splice(k--,0)}m.length&&u.setSelections(m,0)};function J(u,p){u.operation(function(){for(var m=u.listSelections(),k=[],d=[],L=0;L<m.length;L++){var F=m[L];F.empty()?(k.push(L),d.push("")):d.push(p(u.getRange(F.from(),F.to())))}u.replaceSelections(d,"around","case");for(var L=k.length-1,N;L>=0;L--){var F=m[k[L]];if(!(N&&b.cmpPos(F.head,N)>0)){var U=I(u,F.head);N=U.from,u.replaceRange(p(U.word),U.from,U.to)}}})}K.smartBackspace=function(u){if(u.somethingSelected())return b.Pass;u.operation(function(){for(var p=u.listSelections(),m=u.getOption("indentUnit"),k=p.length-1;k>=0;k--){var d=p[k].head,L=u.getRange({line:d.line,ch:0},d),F=b.countColumn(L,null,u.getOption("tabSize")),N=u.findPosH(d,-1,"char",!1);if(L&&!/\S/.test(L)&&F%m==0){var U=new R(d.line,b.findColumn(L,F-m,m));U.ch!=d.ch&&(N=U)}u.replaceRange("",N,d,"+delete")}})},K.delLineRight=function(u){u.operation(function(){for(var p=u.listSelections(),m=p.length-1;m>=0;m--)u.replaceRange("",p[m].anchor,R(p[m].to().line),"+delete");u.scrollIntoView()})},K.upcaseAtCursor=function(u){J(u,function(p){return p.toUpperCase()})},K.downcaseAtCursor=function(u){J(u,function(p){return p.toLowerCase()})},K.setSublimeMark=function(u){u.state.sublimeMark&&u.state.sublimeMark.clear(),u.state.sublimeMark=u.setBookmark(u.getCursor())},K.selectToSublimeMark=function(u){var p=u.state.sublimeMark&&u.state.sublimeMark.find();p&&u.setSelection(u.getCursor(),p)},K.deleteToSublimeMark=function(u){var p=u.state.sublimeMark&&u.state.sublimeMark.find();if(p){var m=u.getCursor(),k=p;if(b.cmpPos(m,k)>0){var d=k;k=m,m=d}u.state.sublimeKilled=u.getRange(m,k),u.replaceRange("",m,k)}},K.swapWithSublimeMark=function(u){var p=u.state.sublimeMark&&u.state.sublimeMark.find();p&&(u.state.sublimeMark.clear(),u.state.sublimeMark=u.setBookmark(u.getCursor()),u.setCursor(p))},K.sublimeYank=function(u){u.state.sublimeKilled!=null&&u.replaceSelection(u.state.sublimeKilled,null,"paste")},K.showInCenter=function(u){var p=u.cursorCoords(null,"local");u.scrollTo(null,(p.top+p.bottom)/2-u.getScrollInfo().clientHeight/2)};function M(u){var p=u.getCursor("from"),m=u.getCursor("to");if(b.cmpPos(p,m)==0){var k=I(u,p);if(!k.word)return;p=k.from,m=k.to}return{from:p,to:m,query:u.getRange(p,m),word:k}}function w(u,p){var m=M(u);if(m){var k=m.query,d=u.getSearchCursor(k,p?m.to:m.from);(p?d.findNext():d.findPrevious())?u.setSelection(d.from(),d.to()):(d=u.getSearchCursor(k,p?R(u.firstLine(),0):u.clipPos(R(u.lastLine()))),(p?d.findNext():d.findPrevious())?u.setSelection(d.from(),d.to()):m.word&&u.setSelection(m.from,m.to))}}K.findUnder=function(u){w(u,!0)},K.findUnderPrevious=function(u){w(u,!1)},K.findAllUnder=function(u){var p=M(u);if(p){for(var m=u.getSearchCursor(p.query),k=[],d=-1;m.findNext();)k.push({anchor:m.from(),head:m.to()}),m.from().line<=p.from.line&&m.from().ch<=p.from.ch&&d++;u.setSelections(k,d)}};var v=b.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},b.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},b.normalizeKeyMap(v.pcSublime);var g=v.default==v.macDefault;v.sublime=g?v.macSublime:v.pcSublime})})();const Gu=wl({__name:"CodeMirror",props:{mode:{default:"htmlmixed"},value:{default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(ze,{emit:Ge}){const b=ze,K=Pu(),R=Du("autoresize");return Mu(()=>{const V=b.readonly?{}:{autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],keyMap:"sublime"},$=Eu(K.value,{value:"",mode:b.mode,readOnly:b.readonly,tabSize:2,lineWrapping:!0,lineNumbers:!0,...V});$.on("change",()=>{Ge("change",$.getValue())}),cl(()=>{const B=$.getValue();b.value!==B&&$.setValue(b.value)}),cl(()=>{$.setOption("mode",b.mode)}),setTimeout(()=>{$.refresh()},50),R&&window.addEventListener("resize",Tu(()=>{$.refresh()}))}),(V,$)=>(Sl(),Fu("div",{class:"editor",ref_key:"el",ref:K},null,512))}}),ju=wl({editorType:"codemirror",__name:"CodeMirrorEditor",props:{value:{},filename:{},readonly:{type:Boolean},mode:{}},emits:["change"],setup(ze,{emit:Ge}){const b=ze,K=$=>{Ge("change",$)},R={css:"css",html:"htmlmixed",js:{name:"javascript"},json:{name:"javascript",json:!0},ts:{name:"javascript",typescript:!0},vue:"htmlmixed"},V=Ou(()=>{const{mode:$,filename:B}=b,I=R[$||B.split(".").pop()];return B.lastIndexOf(".")!==-1&&I?I:R.js});return($,B)=>(Sl(),Nu(Gu,{onChange:K,value:$.value,mode:V.value},null,8,["value","mode"]))}});export{ju as default};