forked from Gitlink/gitea_hat
98 lines
321 KiB
JavaScript
98 lines
321 KiB
JavaScript
(self.webpackChunkgitea=self.webpackChunkgitea||[]).push([["easymde"],{"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(ft,_e,Ce){"use strict";var q=Ce("./node_modules/typo-js/typo.js");function Q(I){if(I=I||{},typeof I.codeMirrorInstance!="function"||typeof I.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),I.codeMirrorInstance.defineMode("spell-checker",function(z){if(!Q.aff_loading){Q.aff_loading=!0;var w=new XMLHttpRequest;w.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),w.onload=function(){w.readyState===4&&w.status===200&&(Q.aff_data=w.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new q("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},w.send(null)}if(!Q.dic_loading){Q.dic_loading=!0;var S=new XMLHttpRequest;S.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),S.onload=function(){S.readyState===4&&S.status===200&&(Q.dic_data=S.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new q("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},S.send(null)}var B='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',Y={token:function(G){var j=G.peek(),fe="";if(B.includes(j))return G.next(),null;for(;(j=G.peek())!=null&&!B.includes(j);)fe+=j,G.next();return Q.typo&&!Q.typo.check(fe)?"spell-error":null}},$=I.codeMirrorInstance.getMode(z,z.backdrop||"text/plain");return I.codeMirrorInstance.overlayMode($,Y,!0)})}Q.num_loaded=0,Q.aff_loading=!1,Q.dic_loading=!1,Q.aff_data="",Q.dic_data="",Q.typo,ft.exports=Q},"./node_modules/codemirror/addon/display/autorefresh.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("autoRefresh",!1,function(z,w){z.state.autoRefresh&&(I(z,z.state.autoRefresh),z.state.autoRefresh=null),w&&z.display.wrapper.offsetHeight==0&&Q(z,z.state.autoRefresh={delay:w.delay||250})});function Q(z,w){function S(){z.display.wrapper.offsetHeight?(I(z,w),z.display.lastWrapHeight!=z.display.wrapper.clientHeight&&z.refresh()):w.timeout=setTimeout(S,w.delay)}w.timeout=setTimeout(S,w.delay),w.hurry=function(){clearTimeout(w.timeout),w.timeout=setTimeout(S,50)},q.on(window,"mouseup",w.hurry),q.on(window,"keyup",w.hurry)}function I(z,w){clearTimeout(w.timeout),q.off(window,"mouseup",w.hurry),q.off(window,"keyup",w.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("fullScreen",!1,function(z,w,S){S==q.Init&&(S=!1),!S!=!w&&(w?Q(z):I(z))});function Q(z){var w=z.getWrapperElement();z.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:w.style.width,height:w.style.height},w.style.width="",w.style.height="auto",w.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",z.refresh()}function I(z){var w=z.getWrapperElement();w.className=w.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var S=z.state.fullScreenRestore;w.style.width=S.width,w.style.height=S.height,window.scrollTo(S.scrollLeft,S.scrollTop),z.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){q.defineOption("placeholder","",function(Y,$,G){var j=G&&G!=q.Init;if($&&!j)Y.on("blur",w),Y.on("change",S),Y.on("swapDoc",S),q.on(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose=function(){z(Y)}),S(Y);else if(!$&&j){Y.off("blur",w),Y.off("change",S),Y.off("swapDoc",S),q.off(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose),Q(Y);var fe=Y.getWrapperElement();fe.className=fe.className.replace(" CodeMirror-empty","")}$&&!Y.hasFocus()&&w(Y)});function Q(Y){Y.state.placeholder&&(Y.state.placeholder.parentNode.removeChild(Y.state.placeholder),Y.state.placeholder=null)}function I(Y){Q(Y);var $=Y.state.placeholder=document.createElement("pre");$.style.cssText="height: 0; overflow: visible",$.style.direction=Y.getOption("direction"),$.className="CodeMirror-placeholder CodeMirror-line-like";var G=Y.getOption("placeholder");typeof G=="string"&&(G=document.createTextNode(G)),$.appendChild(G),Y.display.lineSpace.insertBefore($,Y.display.lineSpace.firstChild)}function z(Y){setTimeout(function(){var $=!1;if(Y.lineCount()==1){var G=Y.getInputField();$=G.nodeName=="TEXTAREA"?!Y.getLine(0).length:!/[^\u200b]/.test(G.querySelector(".CodeMirror-line").textContent)}$?I(Y):Q(Y)},20)}function w(Y){B(Y)&&I(Y)}function S(Y){var $=Y.getWrapperElement(),G=B(Y);$.className=$.className.replace(" CodeMirror-empty","")+(G?" CodeMirror-empty":""),G?I(Y):Q(Y)}function B(Y){return Y.lineCount()===1&&Y.getLine(0)===""}})},"./node_modules/codemirror/addon/edit/continuelist.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";var Q=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,I=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,z=/[*+-]\s/;q.commands.newlineAndIndentContinueMarkdownList=function(S){if(S.getOption("disableInput"))return q.Pass;for(var B=S.listSelections(),Y=[],$=0;$<B.length;$++){var G=B[$].head,j=S.getStateAfter(G.line),fe=q.innerMode(S.getMode(),j);if(fe.mode.name!=="markdown"&&fe.mode.helperType!=="markdown"){S.execCommand("newlineAndIndent");return}else j=fe.state;var ue=j.list!==!1,pe=j.quote!==0,ge=S.getLine(G.line),be=Q.exec(ge),U=/^\s*$/.test(ge.slice(0,G.ch));if(!B[$].empty()||!ue&&!pe||!be||U){S.execCommand("newlineAndIndent");return}if(I.test(ge)){var O=pe&&/>\s*$/.test(ge),ee=!/>\s*$/.test(ge);(O||ee)&&S.replaceRange("",{line:G.line,ch:0},{line:G.line,ch:G.ch+1}),Y[$]=`
|
|
`}else{var ne=be[1],X=be[5],se=!(z.test(be[2])||be[2].indexOf(">")>=0),oe=se?parseInt(be[3],10)+1+be[4]:be[2].replace("x"," ");Y[$]=`
|
|
`+ne+oe+X,se&&w(S,G)}}S.replaceSelections(Y)};function w(S,B){var Y=B.line,$=0,G=0,j=Q.exec(S.getLine(Y)),fe=j[1];do{$+=1;var ue=Y+$,pe=S.getLine(ue),ge=Q.exec(pe);if(ge){var be=ge[1],U=parseInt(j[3],10)+$-G,O=parseInt(ge[3],10),ee=O;if(fe===be&&!isNaN(O))U===O&&(ee=O+1),U>O&&(ee=U+1),S.replaceRange(pe.replace(Q,be+ee+ge[4]+ge[5]),{line:ue,ch:0},{line:ue,ch:pe.length});else{if(fe.length>be.length||fe.length<be.length&&$===1)return;G+=1}}}while(ge)}})},"./node_modules/codemirror/addon/mode/overlay.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.overlayMode=function(Q,I,z){return{startState:function(){return{base:q.startState(Q),overlay:q.startState(I),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(w){return{base:q.copyState(Q,w.base),overlay:q.copyState(I,w.overlay),basePos:w.basePos,baseCur:null,overlayPos:w.overlayPos,overlayCur:null}},token:function(w,S){return(w!=S.streamSeen||Math.min(S.basePos,S.overlayPos)<w.start)&&(S.streamSeen=w,S.basePos=S.overlayPos=w.start),w.start==S.basePos&&(S.baseCur=Q.token(w,S.base),S.basePos=w.pos),w.start==S.overlayPos&&(w.pos=w.start,S.overlayCur=I.token(w,S.overlay),S.overlayPos=w.pos),w.pos=Math.min(S.basePos,S.overlayPos),S.overlayCur==null?S.baseCur:S.baseCur!=null&&S.overlay.combineTokens||z&&S.overlay.combineTokens==null?S.baseCur+" "+S.overlayCur:S.overlayCur},indent:Q.indent&&function(w,S,B){return Q.indent(w.base,S,B)},electricChars:Q.electricChars,innerMode:function(w){return{state:w.base,mode:Q}},blankLine:function(w){var S,B;return Q.blankLine&&(S=Q.blankLine(w.base)),I.blankLine&&(B=I.blankLine(w.overlay)),B==null?S:z&&S!=null?S+" "+B:B}}}})},"./node_modules/codemirror/addon/search/searchcursor.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";var Q=q.Pos;function I(U){var O=U.flags;return O!=null?O:(U.ignoreCase?"i":"")+(U.global?"g":"")+(U.multiline?"m":"")}function z(U,O){for(var ee=I(U),ne=ee,X=0;X<O.length;X++)ne.indexOf(O.charAt(X))==-1&&(ne+=O.charAt(X));return ee==ne?U:new RegExp(U.source,ne)}function w(U){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(U.source)}function S(U,O,ee){O=z(O,"g");for(var ne=ee.line,X=ee.ch,se=U.lastLine();ne<=se;ne++,X=0){O.lastIndex=X;var oe=U.getLine(ne),ae=O.exec(oe);if(ae)return{from:Q(ne,ae.index),to:Q(ne,ae.index+ae[0].length),match:ae}}}function B(U,O,ee){if(!w(O))return S(U,O,ee);O=z(O,"gm");for(var ne,X=1,se=ee.line,oe=U.lastLine();se<=oe;){for(var ae=0;ae<X&&!(se>oe);ae++){var ze=U.getLine(se++);ne=ne==null?ze:ne+`
|
|
`+ze}X=X*2,O.lastIndex=ee.ch;var ie=O.exec(ne);if(ie){var Le=ne.slice(0,ie.index).split(`
|
|
`),Z=ie[0].split(`
|
|
`),Re=ee.line+Le.length-1,R=Le[Le.length-1].length;return{from:Q(Re,R),to:Q(Re+Z.length-1,Z.length==1?R+Z[0].length:Z[Z.length-1].length),match:ie}}}}function Y(U,O,ee){for(var ne,X=0;X<=U.length;){O.lastIndex=X;var se=O.exec(U);if(!se)break;var oe=se.index+se[0].length;if(oe>U.length-ee)break;(!ne||oe>ne.index+ne[0].length)&&(ne=se),X=se.index+1}return ne}function $(U,O,ee){O=z(O,"g");for(var ne=ee.line,X=ee.ch,se=U.firstLine();ne>=se;ne--,X=-1){var oe=U.getLine(ne),ae=Y(oe,O,X<0?0:oe.length-X);if(ae)return{from:Q(ne,ae.index),to:Q(ne,ae.index+ae[0].length),match:ae}}}function G(U,O,ee){if(!w(O))return $(U,O,ee);O=z(O,"gm");for(var ne,X=1,se=U.getLine(ee.line).length-ee.ch,oe=ee.line,ae=U.firstLine();oe>=ae;){for(var ze=0;ze<X&&oe>=ae;ze++){var ie=U.getLine(oe--);ne=ne==null?ie:ie+`
|
|
`+ne}X*=2;var Le=Y(ne,O,se);if(Le){var Z=ne.slice(0,Le.index).split(`
|
|
`),Re=Le[0].split(`
|
|
`),R=oe+Z.length,le=Z[Z.length-1].length;return{from:Q(R,le),to:Q(R+Re.length-1,Re.length==1?le+Re[0].length:Re[Re.length-1].length),match:Le}}}}var j,fe;String.prototype.normalize?(j=function(U){return U.normalize("NFD").toLowerCase()},fe=function(U){return U.normalize("NFD")}):(j=function(U){return U.toLowerCase()},fe=function(U){return U});function ue(U,O,ee,ne){if(U.length==O.length)return ee;for(var X=0,se=ee+Math.max(0,U.length-O.length);;){if(X==se)return X;var oe=X+se>>1,ae=ne(U.slice(0,oe)).length;if(ae==ee)return oe;ae>ee?se=oe:X=oe+1}}function pe(U,O,ee,ne){if(!O.length)return null;var X=ne?j:fe,se=X(O).split(/\r|\n\r?/);e:for(var oe=ee.line,ae=ee.ch,ze=U.lastLine()+1-se.length;oe<=ze;oe++,ae=0){var ie=U.getLine(oe).slice(ae),Le=X(ie);if(se.length==1){var Z=Le.indexOf(se[0]);if(Z==-1)continue e;var ee=ue(ie,Le,Z,X)+ae;return{from:Q(oe,ue(ie,Le,Z,X)+ae),to:Q(oe,ue(ie,Le,Z+se[0].length,X)+ae)}}else{var Re=Le.length-se[0].length;if(Le.slice(Re)!=se[0])continue e;for(var R=1;R<se.length-1;R++)if(X(U.getLine(oe+R))!=se[R])continue e;var le=U.getLine(oe+se.length-1),J=X(le),ke=se[se.length-1];if(J.slice(0,ke.length)!=ke)continue e;return{from:Q(oe,ue(ie,Le,Re,X)+ae),to:Q(oe+se.length-1,ue(le,J,ke.length,X))}}}}function ge(U,O,ee,ne){if(!O.length)return null;var X=ne?j:fe,se=X(O).split(/\r|\n\r?/);e:for(var oe=ee.line,ae=ee.ch,ze=U.firstLine()-1+se.length;oe>=ze;oe--,ae=-1){var ie=U.getLine(oe);ae>-1&&(ie=ie.slice(0,ae));var Le=X(ie);if(se.length==1){var Z=Le.lastIndexOf(se[0]);if(Z==-1)continue e;return{from:Q(oe,ue(ie,Le,Z,X)),to:Q(oe,ue(ie,Le,Z+se[0].length,X))}}else{var Re=se[se.length-1];if(Le.slice(0,Re.length)!=Re)continue e;for(var R=1,ee=oe-se.length+1;R<se.length-1;R++)if(X(U.getLine(ee+R))!=se[R])continue e;var le=U.getLine(oe+1-se.length),J=X(le);if(J.slice(J.length-se[0].length)!=se[0])continue e;return{from:Q(oe+1-se.length,ue(le,J,le.length-se[0].length,X)),to:Q(oe,ue(ie,Le,Re.length,X))}}}}function be(U,O,ee,ne){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=U,ee=ee?U.clipPos(ee):Q(0,0),this.pos={from:ee,to:ee};var X;typeof ne=="object"?X=ne.caseFold:(X=ne,ne=null),typeof O=="string"?(X==null&&(X=!1),this.matches=function(se,oe){return(se?ge:pe)(U,O,oe,X)}):(O=z(O,"gm"),!ne||ne.multiline!==!1?this.matches=function(se,oe){return(se?G:B)(U,O,oe)}:this.matches=function(se,oe){return(se?$:S)(U,O,oe)})}be.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(U){var O=this.doc.clipPos(U?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(O=Q(O.line,O.ch),U?(O.ch--,O.ch<0&&(O.line--,O.ch=(this.doc.getLine(O.line)||"").length)):(O.ch++,O.ch>(this.doc.getLine(O.line)||"").length&&(O.ch=0,O.line++)),q.cmpPos(O,this.doc.clipPos(O))!=0))return this.atOccurrence=!1;var ee=this.matches(U,O);if(this.afterEmptyMatch=ee&&q.cmpPos(ee.from,ee.to)==0,ee)return this.pos=ee,this.atOccurrence=!0,this.pos.match||!0;var ne=Q(U?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:ne,to:ne},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(U,O){if(!!this.atOccurrence){var ee=q.splitLines(U);this.doc.replaceRange(ee,this.pos.from,this.pos.to,O),this.pos.to=Q(this.pos.from.line+ee.length-1,ee[ee.length-1].length+(ee.length==1?this.pos.from.ch:0))}}},q.defineExtension("getSearchCursor",function(U,O,ee){return new be(this.doc,U,O,ee)}),q.defineDocExtension("getSearchCursor",function(U,O,ee){return new be(this,U,O,ee)}),q.defineExtension("selectMatches",function(U,O){for(var ee=[],ne=this.getSearchCursor(U,this.getCursor("from"),O);ne.findNext()&&!(q.cmpPos(ne.to(),this.getCursor("to"))>0);)ee.push({anchor:ne.from(),head:ne.to()});ee.length&&this.setSelections(ee,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("styleSelectedText",!1,function(j,fe,ue){var pe=ue&&ue!=q.Init;fe&&!pe?(j.state.markedSelection=[],j.state.markedSelectionStyle=typeof fe=="string"?fe:"CodeMirror-selectedtext",$(j),j.on("cursorActivity",Q),j.on("change",I)):!fe&&pe&&(j.off("cursorActivity",Q),j.off("change",I),Y(j),j.state.markedSelection=j.state.markedSelectionStyle=null)});function Q(j){j.state.markedSelection&&j.operation(function(){G(j)})}function I(j){j.state.markedSelection&&j.state.markedSelection.length&&j.operation(function(){Y(j)})}var z=8,w=q.Pos,S=q.cmpPos;function B(j,fe,ue,pe){if(S(fe,ue)!=0)for(var ge=j.state.markedSelection,be=j.state.markedSelectionStyle,U=fe.line;;){var O=U==fe.line?fe:w(U,0),ee=U+z,ne=ee>=ue.line,X=ne?ue:w(ee,0),se=j.markText(O,X,{className:be});if(pe==null?ge.push(se):ge.splice(pe++,0,se),ne)break;U=ee}}function Y(j){for(var fe=j.state.markedSelection,ue=0;ue<fe.length;++ue)fe[ue].clear();fe.length=0}function $(j){Y(j);for(var fe=j.listSelections(),ue=0;ue<fe.length;ue++)B(j,fe[ue].from(),fe[ue].to())}function G(j){if(!j.somethingSelected())return Y(j);if(j.listSelections().length>1)return $(j);var fe=j.getCursor("start"),ue=j.getCursor("end"),pe=j.state.markedSelection;if(!pe.length)return B(j,fe,ue);var ge=pe[0].find(),be=pe[pe.length-1].find();if(!ge||!be||ue.line-fe.line<=z||S(fe,be.to)>=0||S(ue,ge.from)<=0)return $(j);for(;S(fe,ge.from)>0;)pe.shift().clear(),ge=pe[0].find();for(S(fe,ge.from)<0&&(ge.to.line-fe.line<z?(pe.shift().clear(),B(j,fe,ge.to,0)):B(j,fe,ge.from,0));S(ue,be.to)<0;)pe.pop().clear(),be=pe[pe.length-1].find();S(ue,be.to)>0&&(ue.line-be.from.line<z?(pe.pop().clear(),B(j,be.from,ue)):B(j,be.to,ue))}})},"./node_modules/codemirror/lib/codemirror.js":function(ft){(function(_e,Ce){ft.exports=Ce()})(this,function(){"use strict";var _e=navigator.userAgent,Ce=navigator.platform,q=/gecko\/\d/i.test(_e),Q=/MSIE \d/.test(_e),I=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_e),z=/Edge\/(\d+)/.exec(_e),w=Q||I||z,S=w&&(Q?document.documentMode||6:+(z||I)[1]),B=!z&&/WebKit\//.test(_e),Y=B&&/Qt\/\d+\.\d+/.test(_e),$=!z&&/Chrome\/(\d+)/.exec(_e),G=$&&+$[1],j=/Opera\//.test(_e),fe=/Apple Computer/.test(navigator.vendor),ue=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(_e),pe=/PhantomJS/.test(_e),ge=fe&&(/Mobile\/\w+/.test(_e)||navigator.maxTouchPoints>2),be=/Android/.test(_e),U=ge||be||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(_e),O=ge||/Mac/.test(Ce),ee=/\bCrOS\b/.test(_e),ne=/win/i.test(Ce),X=j&&_e.match(/Version\/(\d*\.\d*)/);X&&(X=Number(X[1])),X&&X>=15&&(j=!1,B=!0);var se=O&&(Y||j&&(X==null||X<12.11)),oe=q||w&&S>=9;function ae(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ze=function(e,t){var n=e.className,r=ae(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 ie(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Le(e,t){return ie(e).appendChild(t)}function Z(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function Re(e,t,n,r){var i=Z(e,t,n,r);return i.setAttribute("role","presentation"),i}var R;document.createRange?R=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:R=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function le(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 J(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ke(e,t){var n=e.className;ae(t).test(n)||(e.className+=(n?" ":"")+t)}function $e(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!ae(n[r]).test(t)&&(t+=" "+n[r]);return t}var ct=function(e){e.select()};ge?ct=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(ct=function(e){try{e.select()}catch(t){}});function et(e){return e.display.wrapper.ownerDocument}function v(e){return et(e).defaultView}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function De(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 Ie(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,l=i||0;;){var o=e.indexOf(" ",a);if(o<0||o>=t)return l+(t-a);l+=o-a,l+=n-l%n,a=o+1}}var Ae=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};Ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ae.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 We(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var wt=50,at={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},we={origin:"*mouse"},je={origin:"+move"};function Je(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var l=a-r;if(a==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var Et=[""];function Wt(e){for(;Et.length<=e;)Et.push(Pe(Et)+" ");return Et[e]}function Pe(e){return e[e.length-1]}function yt(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function _t(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function Dt(){}function _(e,t){var n;return Object.create?n=Object.create(e):(Dt.prototype=e,n=new Dt),t&&De(t,n),n}var E=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function M(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||E.test(e))}function h(e,t){return t?t.source.indexOf("\\w")>-1&&M(e)?!0:t.test(e):M(e)}function d(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var b=/[\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 y(e){return e.charCodeAt(0)>=768&&b.test(e)}function P(e,t,n){for(;(n<0?t>0:t<e.length)&&y(e.charAt(t));)t+=n;return t}function A(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function xe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var l=e[a];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var s=null;function p(e,t,n){var r;s=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:s=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:s=i)}return r!=null?r:s}var x=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]/,a=/[LRr]/,l=/[Lb1n]/,o=/[1n]/;function u(f,g,m){this.level=f,this.from=g,this.to=m}return function(f,g){var m=g=="ltr"?"L":"R";if(f.length==0||g=="ltr"&&!r.test(f))return!1;for(var L=f.length,k=[],W=0;W<L;++W)k.push(n(f.charCodeAt(W)));for(var K=0,re=m;K<L;++K){var ce=k[K];ce=="m"?k[K]=re:re=ce}for(var de=0,he=m;de<L;++de){var me=k[de];me=="1"&&he=="r"?k[de]="n":a.test(me)&&(he=me,me=="r"&&(k[de]="R"))}for(var Ee=1,Fe=k[0];Ee<L-1;++Ee){var He=k[Ee];He=="+"&&Fe=="1"&&k[Ee+1]=="1"?k[Ee]="1":He==","&&Fe==k[Ee+1]&&(Fe=="1"||Fe=="n")&&(k[Ee]=Fe),Fe=He}for(var Qe=0;Qe<L;++Qe){var mt=k[Qe];if(mt==",")k[Qe]="N";else if(mt=="%"){var tt=void 0;for(tt=Qe+1;tt<L&&k[tt]=="%";++tt);for(var Ht=Qe&&k[Qe-1]=="!"||tt<L&&k[tt]=="1"?"1":"N",Bt=Qe;Bt<tt;++Bt)k[Bt]=Ht;Qe=tt-1}}for(var ut=0,Mt=m;ut<L;++ut){var Ct=k[ut];Mt=="L"&&Ct=="1"?k[ut]="L":a.test(Ct)&&(Mt=Ct)}for(var dt=0;dt<L;++dt)if(i.test(k[dt])){var st=void 0;for(st=dt+1;st<L&&i.test(k[st]);++st);for(var nt=(dt?k[dt-1]:m)=="L",Nt=(st<L?k[st]:m)=="L",Qr=nt==Nt?nt?"L":"R":m,vr=dt;vr<st;++vr)k[vr]=Qr;dt=st-1}for(var St=[],$t,xt=0;xt<L;)if(l.test(k[xt])){var ia=xt;for(++xt;xt<L&&l.test(k[xt]);++xt);St.push(new u(0,ia,xt))}else{var lr=xt,Er=St.length,Lr=g=="rtl"?1:0;for(++xt;xt<L&&k[xt]!="L";++xt);for(var At=lr;At<xt;)if(o.test(k[At])){lr<At&&(St.splice(Er,0,new u(1,lr,At)),Er+=Lr);var Jr=At;for(++At;At<xt&&o.test(k[At]);++At);St.splice(Er,0,new u(2,Jr,At)),Er+=Lr,lr=At}else++At;lr<xt&&St.splice(Er,0,new u(1,lr,xt))}return g=="ltr"&&(St[0].level==1&&($t=f.match(/^\s+/))&&(St[0].from=$t[0].length,St.unshift(new u(0,0,$t[0].length))),Pe(St).level==1&&($t=f.match(/\s+$/))&&(Pe(St).to-=$t[0].length,St.push(new u(0,L-$t[0].length,L)))),g=="rtl"?St.reverse():St}}();function C(e,t){var n=e.order;return n==null&&(n=e.order=x(e.text,t)),n}var T=[],D=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]||T).concat(n)}};function N(e,t){return e._handlers&&e._handlers[t]||T}function F(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=We(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function H(e,t){var n=N(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 te(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),H(e,n||t.type,e,t),Ue(t)||t.codemirrorIgnore}function ye(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)We(n,t[r])==-1&&n.push(t[r])}function Te(e,t){return N(e,t).length>0}function Be(e){e.prototype.on=function(t,n){D(this,t,n)},e.prototype.off=function(t,n){F(this,t,n)}}function ve(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function qe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ue(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){ve(e),qe(e)}function Ge(e){return e.target||e.srcElement}function lt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),O&&e.ctrlKey&&t==1&&(t=3),t}var ht=function(){if(w&&S<9)return!1;var e=Z("div");return"draggable"in e||"dragDrop"in e}(),bt;function Vt(e){if(bt==null){var t=Z("span","\u200B");Le(e,Z("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(bt=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&S<8))}var n=bt?Z("span","\u200B"):Z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var Rt;function Tr(e){if(Rt!=null)return Rt;var t=Le(e,document.createTextNode("A\u062EA")),n=R(t,0,1).getBoundingClientRect(),r=R(t,1,2).getBoundingClientRect();return ie(e),!n||n.left==n.right?!1:Rt=r.right-n.right<3}var Br=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},En=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ui=function(){var e=Z("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),mr=null;function si(e){if(mr!=null)return mr;var t=Le(e,Z("span","x")),n=t.getBoundingClientRect(),r=R(t,0,1).getBoundingClientRect();return mr=Math.abs(n.left-r.left)>1}var $r={},rt={};function or(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$r[e]=t}function Ut(e,t){rt[e]=t}function It(e){if(typeof e=="string"&&rt.hasOwnProperty(e))e=rt[e];else if(e&&typeof e.name=="string"&&rt.hasOwnProperty(e.name)){var t=rt[e.name];typeof t=="string"&&(t={name:t}),e=_(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return It("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return It("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function jt(e,t){t=It(t);var n=$r[t.name];if(!n)return jt(e,"text/plain");var r=n(e,t);if(Pt.hasOwnProperty(t.name)){var i=Pt[t.name];for(var a in i)!i.hasOwnProperty(a)||(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var Pt={};function Ln(e,t){var n=Pt.hasOwnProperty(e)?Pt[e]:Pt[e]={};De(t,n)}function er(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 Mr(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 la(e,t,n){return e.startState?e.startState(t,n):!0}var ot=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};ot.prototype.eol=function(){return this.pos>=this.string.length},ot.prototype.sol=function(){return this.pos==this.lineStart},ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ot.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},ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ot.prototype.skipToEnd=function(){this.pos=this.string.length},ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ot.prototype.backUp=function(e){this.pos-=e},ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ie(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ie(this.string,this.lineStart,this.tabSize):0)},ot.prototype.indentation=function(){return Ie(this.string,null,this.tabSize)-(this.lineStart?Ie(this.string,this.lineStart,this.tabSize):0)},ot.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ot.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],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function xr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(a){var l=a.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function fi(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Yt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(e.parent==null)return null;for(var t=e.parent,n=We(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 yr(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var o=e.lines[l],u=o.height;if(t<u)break;t-=u}return n+l}function Vr(e,t){return t>=e.first&&t<e.first+e.size}function ci(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function V(e,t,n){if(n===void 0&&(n=null),!(this instanceof V))return new V(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Me(e,t){return e.line-t.line||e.ch-t.ch}function hi(e,t){return e.sticky==t.sticky&&Me(e,t)==0}function di(e){return V(e.line,e.ch)}function Tn(e,t){return Me(e,t)<0?t:e}function Bn(e,t){return Me(e,t)<0?e:t}function oa(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ne(e,t){if(t.line<e.first)return V(e.first,0);var n=e.first+e.size-1;return t.line>n?V(n,Se(e,n).text.length):oo(t,Se(e,t.line).text.length)}function oo(e,t){var n=e.ch;return n==null||n>t?V(e.line,t):n<0?V(e.line,0):e}function ua(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ne(e,t[r]);return n}var Mn=function(e,t){this.state=e,this.lookAhead=t},Zt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Zt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Zt.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}},Zt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Zt.fromSaved=function(e,t,n){return t instanceof Mn?new Zt(e,er(e.mode,t.state),n,t.lookAhead):new Zt(e,er(e.mode,t),n)},Zt.prototype.save=function(e){var t=e!==!1?er(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Mn(t,this.maxLookAhead):t};function sa(e,t,n,r){var i=[e.state.modeGen],a={};ga(e,t.text,e.doc.mode,n,function(f,g){return i.push(f,g)},a,r);for(var l=n.state,o=function(f){n.baseTokens=i;var g=e.state.overlays[f],m=1,L=0;n.state=!0,ga(e,t.text,g.mode,n,function(k,W){for(var K=m;L<k;){var re=i[m];re>k&&i.splice(m,1,k,i[m+1],re),m+=2,L=Math.min(k,re)}if(!!W)if(g.opaque)i.splice(K,m-K,k,"overlay "+W),m=K+2;else for(;K<m;K+=2){var ce=i[K+1];i[K+1]=(ce?ce+" ":"")+"overlay "+W}},a),n.state=l,n.baseTokens=null,n.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)o(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function fa(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=en(e,Ye(t)),i=t.text.length>e.options.maxHighlightLength&&er(e.doc.mode,r.state),a=sa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function en(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Zt(r,!0,t);var a=uo(e,t,n),l=a>r.first&&Se(r,a-1).stateAfter,o=l?Zt.fromSaved(r,l,a):new Zt(r,la(r.mode),a);return r.iter(a,t,function(u){pi(e,u.text,o);var f=o.line;u.stateAfter=f==t-1||f%5==0||f>=i.viewFrom&&f<i.viewTo?o.save():null,o.nextLine()}),n&&(r.modeFrontier=o.line),o}function pi(e,t,n,r){var i=e.doc.mode,a=new ot(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==""&&ca(i,n.state);!a.eol();)gi(i,a,n.state),a.start=a.pos}function ca(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var n=Mr(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function gi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Mr(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ha=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function da(e,t,n,r){var i=e.doc,a=i.mode,l;t=Ne(i,t);var o=Se(i,t.line),u=en(e,t.line,n),f=new ot(o.text,e.options.tabSize,u),g;for(r&&(g=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,l=gi(a,f,u.state),r&&g.push(new ha(f,l,er(i.mode,u.state)));return r?g:new ha(f,l,u.state)}function pa(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 ga(e,t,n,r,i,a,l){var o=n.flattenSpans;o==null&&(o=e.options.flattenSpans);var u=0,f=null,g=new ot(t,e.options.tabSize,r),m,L=e.options.addModeClass&&[null];for(t==""&&pa(ca(n,r.state),a);!g.eol();){if(g.pos>e.options.maxHighlightLength?(o=!1,l&&pi(e,t,r,g.pos),g.pos=t.length,m=null):m=pa(gi(n,g,r.state,L),a),L){var k=L[0].name;k&&(m="m-"+(m?k+" "+m:k))}if(!o||f!=m){for(;u<g.start;)u=Math.min(g.start,u+5e3),i(u,f);f=m}g.start=g.pos}for(;u<g.pos;){var W=Math.min(g.pos,u+5e3);i(W,f),u=W}}function uo(e,t,n){for(var r,i,a=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),o=t;o>l;--o){if(o<=a.first)return a.first;var u=Se(a,o-1),f=u.stateAfter;if(f&&(!n||o+(f instanceof Mn?f.lookAhead:0)<=a.modeFrontier))return o;var g=Ie(u.text,null,e.options.tabSize);(i==null||r>g)&&(i=o-1,r=g)}return i}function so(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 Mn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var va=!1,tr=!1;function fo(){va=!0}function co(){tr=!0}function Nn(e,t,n){this.marker=e,this.from=t,this.to=n}function tn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function ho(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function po(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 go(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],l=a.marker,o=a.from==null||(l.inclusiveLeft?a.from<=t:a.from<t);if(o||a.from==t&&l.type=="bookmark"&&(!n||!a.marker.insertLeft)){var u=a.to==null||(l.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new Nn(l,a.from,u?null:a.to))}}return r}function vo(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],l=a.marker,o=a.to==null||(l.inclusiveRight?a.to>=t:a.to>t);if(o||a.from==t&&l.type=="bookmark"&&(!n||a.marker.insertLeft)){var u=a.from==null||(l.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new Nn(l,u?null:a.from-t,a.to==null?null:a.to-t))}}return r}function vi(e,t){if(t.full)return null;var n=Vr(e,t.from.line)&&Se(e,t.from.line).markedSpans,r=Vr(e,t.to.line)&&Se(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,l=Me(t.from,t.to)==0,o=go(n,i,l),u=vo(r,a,l),f=t.text.length==1,g=Pe(t.text).length+(f?i:0);if(o)for(var m=0;m<o.length;++m){var L=o[m];if(L.to==null){var k=tn(u,L.marker);k?f&&(L.to=k.to==null?null:k.to+g):L.to=i}}if(u)for(var W=0;W<u.length;++W){var K=u[W];if(K.to!=null&&(K.to+=g),K.from==null){var re=tn(o,K.marker);re||(K.from=g,f&&(o||(o=[])).push(K))}else K.from+=g,f&&(o||(o=[])).push(K)}o&&(o=ma(o)),u&&u!=o&&(u=ma(u));var ce=[o];if(!f){var de=t.text.length-2,he;if(de>0&&o)for(var me=0;me<o.length;++me)o[me].to==null&&(he||(he=[])).push(new Nn(o[me].marker,null,null));for(var Ee=0;Ee<de;++Ee)ce.push(he);ce.push(u)}return ce}function ma(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 mo(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(k){if(k.markedSpans)for(var W=0;W<k.markedSpans.length;++W){var K=k.markedSpans[W].marker;K.readOnly&&(!r||We(r,K)==-1)&&(r||(r=[])).push(K)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var l=r[a],o=l.find(0),u=0;u<i.length;++u){var f=i[u];if(!(Me(f.to,o.from)<0||Me(f.from,o.to)>0)){var g=[u,1],m=Me(f.from,o.from),L=Me(f.to,o.to);(m<0||!l.inclusiveLeft&&!m)&&g.push({from:f.from,to:o.from}),(L>0||!l.inclusiveRight&&!L)&&g.push({from:o.to,to:f.to}),i.splice.apply(i,g),u+=g.length-3}}return i}function xa(e){var t=e.markedSpans;if(!!t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ya(e,t){if(!!t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function In(e){return e.inclusiveLeft?-1:0}function On(e){return e.inclusiveRight?1:0}function mi(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=Me(r.from,i.from)||In(e)-In(t);if(a)return-a;var l=Me(r.to,i.to)||On(e)-On(t);return l||t.id-e.id}function Da(e,t){var n=tr&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||mi(r,i.marker)<0)&&(r=i.marker);return r}function ba(e){return Da(e,!0)}function Hn(e){return Da(e,!1)}function xo(e,t){var n=tr&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||mi(r,a.marker)<0)&&(r=a.marker)}return r}function Ca(e,t,n,r,i){var a=Se(e,t),l=tr&&a.markedSpans;if(l)for(var o=0;o<l.length;++o){var u=l[o];if(!!u.marker.collapsed){var f=u.marker.find(0),g=Me(f.from,n)||In(u.marker)-In(i),m=Me(f.to,r)||On(u.marker)-On(i);if(!(g>=0&&m<=0||g<=0&&m>=0)&&(g<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?Me(f.to,n)>=0:Me(f.to,n)>0)||g>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?Me(f.from,r)<=0:Me(f.from,r)<0)))return!0}}}function qt(e){for(var t;t=ba(e);)e=t.find(-1,!0).line;return e}function yo(e){for(var t;t=Hn(e);)e=t.find(1,!0).line;return e}function Do(e){for(var t,n;t=Hn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function xi(e,t){var n=Se(e,t),r=qt(n);return n==r?t:Ye(r)}function wa(e,t){if(t>e.lastLine())return t;var n=Se(e,t),r;if(!ur(e,n))return t;for(;r=Hn(n);)n=r.find(1,!0).line;return Ye(n)+1}function ur(e,t){var n=tr&&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&&yi(e,t,r))return!0}}}function yi(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return yi(e,r.line,tn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&yi(e,t,i))return!0}function rr(e){e=qt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var l=0;l<a.children.length;++l){var o=a.children[l];if(o==n)break;t+=o.height}return t}function _n(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=ba(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Hn(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function Di(e){var t=e.display,n=e.doc;t.maxLine=Se(n,n.first),t.maxLineLength=_n(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=_n(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Nr=function(e,t,n){this.text=e,ya(this,t),this.height=n?n(this):1};Nr.prototype.lineNo=function(){return Ye(this)},Be(Nr);function bo(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xa(e),ya(e,n);var i=r?r(e):1;i!=e.height&&Yt(e,i)}function Co(e){e.parent=null,xa(e)}var wo={},ko={};function ka(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ko:wo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Sa(e,t){var n=Re("span",null,null,B?"padding-right: .1px":null),r={pre:Re("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Fo,Tr(e.display.measure)&&(l=C(a,e.doc.direction))&&(r.addToken=Eo(r.addToken,l)),r.map=[];var o=t!=e.display.externalMeasured&&Ye(a);Lo(a,r,fa(e,a,o)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=$e(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=$e(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Vt(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(B){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return H(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=$e(r.pre.className,r.textClass||"")),r}function So(e){var t=Z("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fo(e,t,n,r,i,a,l){if(!!t){var o=e.splitSpaces?Ao(t,e.trailingSpace):t,u=e.cm.state.specialChars,f=!1,g;if(!u.test(t))e.col+=t.length,g=document.createTextNode(o),e.map.push(e.pos,e.pos+t.length,g),w&&S<9&&(f=!0),e.pos+=t.length;else{g=document.createDocumentFragment();for(var m=0;;){u.lastIndex=m;var L=u.exec(t),k=L?L.index-m:t.length-m;if(k){var W=document.createTextNode(o.slice(m,m+k));w&&S<9?g.appendChild(Z("span",[W])):g.appendChild(W),e.map.push(e.pos,e.pos+k,W),e.col+=k,e.pos+=k}if(!L)break;m+=k+1;var K=void 0;if(L[0]==" "){var re=e.cm.options.tabSize,ce=re-e.col%re;K=g.appendChild(Z("span",Wt(ce),"cm-tab")),K.setAttribute("role","presentation"),K.setAttribute("cm-text"," "),e.col+=ce}else L[0]=="\r"||L[0]==`
|
|
`?(K=g.appendChild(Z("span",L[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),K.setAttribute("cm-text",L[0]),e.col+=1):(K=e.cm.options.specialCharPlaceholder(L[0]),K.setAttribute("cm-text",L[0]),w&&S<9?g.appendChild(Z("span",[K])):g.appendChild(K),e.col+=1);e.map.push(e.pos,e.pos+1,K),e.pos++}}if(e.trailingSpace=o.charCodeAt(t.length-1)==32,n||r||i||f||a||l){var de=n||"";r&&(de+=r),i&&(de+=i);var he=Z("span",[g],de,a);if(l)for(var me in l)l.hasOwnProperty(me)&&me!="style"&&me!="class"&&he.setAttribute(me,l[me]);return e.content.appendChild(he)}e.content.appendChild(g)}}function Ao(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),r+=a,n=a==" "}return r}function Eo(e,t){return function(n,r,i,a,l,o,u){i=i?i+" cm-force-border":"cm-force-border";for(var f=n.pos,g=f+r.length;;){for(var m=void 0,L=0;L<t.length&&(m=t[L],!(m.to>f&&m.from<=f));L++);if(m.to>=g)return e(n,r,i,a,l,o,u);e(n,r.slice(0,m.to-f),i,a,null,o,u),a=null,r=r.slice(m.to-f),f=m.to}}}function Fa(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Lo(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(a,a=n[l]),ka(n[l+1],t.cm.options));return}for(var o=i.length,u=0,f=1,g="",m,L,k=0,W,K,re,ce,de;;){if(k==u){W=K=re=L="",de=null,ce=null,k=1/0;for(var he=[],me=void 0,Ee=0;Ee<r.length;++Ee){var Fe=r[Ee],He=Fe.marker;if(He.type=="bookmark"&&Fe.from==u&&He.widgetNode)he.push(He);else if(Fe.from<=u&&(Fe.to==null||Fe.to>u||He.collapsed&&Fe.to==u&&Fe.from==u)){if(Fe.to!=null&&Fe.to!=u&&k>Fe.to&&(k=Fe.to,K=""),He.className&&(W+=" "+He.className),He.css&&(L=(L?L+";":"")+He.css),He.startStyle&&Fe.from==u&&(re+=" "+He.startStyle),He.endStyle&&Fe.to==k&&(me||(me=[])).push(He.endStyle,Fe.to),He.title&&((de||(de={})).title=He.title),He.attributes)for(var Qe in He.attributes)(de||(de={}))[Qe]=He.attributes[Qe];He.collapsed&&(!ce||mi(ce.marker,He)<0)&&(ce=Fe)}else Fe.from>u&&k>Fe.from&&(k=Fe.from)}if(me)for(var mt=0;mt<me.length;mt+=2)me[mt+1]==k&&(K+=" "+me[mt]);if(!ce||ce.from==u)for(var tt=0;tt<he.length;++tt)Fa(t,0,he[tt]);if(ce&&(ce.from||0)==u){if(Fa(t,(ce.to==null?o+1:ce.to)-u,ce.marker,ce.from==null),ce.to==null)return;ce.to==u&&(ce=!1)}}if(u>=o)break;for(var Ht=Math.min(o,k);;){if(g){var Bt=u+g.length;if(!ce){var ut=Bt>Ht?g.slice(0,Ht-u):g;t.addToken(t,ut,m?m+W:W,re,u+ut.length==k?K:"",L,de)}if(Bt>=Ht){g=g.slice(Ht-u),u=Ht;break}u=Bt,re=""}g=i.slice(a,a=n[f++]),m=ka(n[f++],t.cm.options)}}}function Aa(e,t,n){this.line=t,this.rest=Do(t),this.size=this.rest?Ye(Pe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ur(e,t)}function zn(e,t,n){for(var r=[],i,a=t;a<n;a=i){var l=new Aa(e.doc,Se(e.doc,a),a);i=a+l.size,r.push(l)}return r}var Ir=null;function To(e){Ir?Ir.ops.push(e):e.ownsGroup=Ir={ops:[e],delayedCallbacks:[]}}function Bo(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 Mo(e,t){var n=e.ownsGroup;if(!!n)try{Bo(n)}finally{Ir=null,t(n)}}var rn=null;function pt(e,t){var n=N(e,t);if(!!n.length){var r=Array.prototype.slice.call(arguments,2),i;Ir?i=Ir.delayedCallbacks:rn?i=rn:(i=rn=[],setTimeout(No,0));for(var a=function(o){i.push(function(){return n[o].apply(null,r)})},l=0;l<n.length;++l)a(l)}}function No(){var e=rn;rn=null;for(var t=0;t<e.length;++t)e[t]()}function Ea(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Oo(e,t):a=="gutter"?Ta(e,t,n,r):a=="class"?bi(e,t):a=="widget"&&Ho(e,t,r)}t.changes=null}function nn(e){return e.node==e.text&&(e.node=Z("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&S<8&&(e.node.style.zIndex=2)),e.node}function Io(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=nn(t);t.background=r.insertBefore(Z("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function La(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Sa(e,t)}function Oo(e,t){var n=t.text.className,r=La(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,bi(e,t)):n&&(t.text.className=n)}function bi(e,t){Io(e,t),t.line.wrapClass?nn(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 Ta(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=nn(t);t.gutterBackground=Z("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=nn(t),o=t.gutter=Z("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(o.setAttribute("aria-hidden","true"),e.display.input.setUneditable(o),l.insertBefore(o,t.text),t.line.gutterClass&&(o.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=o.appendChild(Z("div",ci(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var f=e.display.gutterSpecs[u].className,g=a.hasOwnProperty(f)&&a[f];g&&o.appendChild(Z("div",[g],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}function Ho(e,t,n){t.alignable&&(t.alignable=null);for(var r=ae("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Ba(e,t,n)}function _o(e,t,n,r){var i=La(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),bi(e,t),Ta(e,t,n,r),Ba(e,t,r),t.node}function Ba(e,t,n){if(Ma(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Ma(e,t.rest[r],t,n,!1)}function Ma(e,t,n,r,i){if(!!t.widgets)for(var a=nn(n),l=0,o=t.widgets;l<o.length;++l){var u=o[l],f=Z("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),zo(u,f,n,r),e.display.input.setUneditable(f),i&&u.above?a.insertBefore(f,n.gutter||n.text):a.appendChild(f),pt(u,"redraw")}}function zo(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 an(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!le(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;"),Le(t.display.measure,Z("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function nr(e,t){for(var n=Ge(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 Rn(e){return e.lineSpace.offsetTop}function Ci(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Le(e.measure,Z("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 wt-e.display.nativeBarWidth}function Dr(e){return e.display.scroller.clientWidth-Qt(e)-e.display.barWidth}function wi(e){return e.display.scroller.clientHeight-Qt(e)-e.display.barHeight}function Ro(e,t,n){var r=e.options.lineWrapping,i=r&&Dr(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),o=0;o<l.length-1;o++){var u=l[o],f=l[o+1];Math.abs(u.bottom-f.bottom)>2&&a.push((u.bottom+f.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Ia(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(Ye(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Po(e,t){t=qt(t);var n=Ye(t),r=e.display.externalMeasured=new Aa(e.doc,t,n);r.lineN=n;var i=r.built=Sa(e,r);return r.text=i.pre,Le(e.display.lineMeasure,i.pre),r}function Oa(e,t,n,r){return Jt(e,Or(e,t),n,r)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[wr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Or(e,t){var n=Ye(t),r=ki(e,n);r&&!r.text?r=null:r&&r.changes&&(Ea(e,r,n,Li(e)),e.curOp.forceUpdate=!0),r||(r=Po(e,t));var i=Ia(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Jt(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||""),l;return t.cache.hasOwnProperty(a)?l=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ro(e,t.view,t.rect),t.hasHeights=!0),l=Uo(e,t,n,r),l.bogus||(t.cache[a]=l)),{left:l.left,right:l.right,top:i?l.rtop:l.top,bottom:i?l.rbottom:l.bottom}}var Ha={left:0,right:0,top:0,bottom:0};function _a(e,t,n){for(var r,i,a,l,o,u,f=0;f<e.length;f+=3)if(o=e[f],u=e[f+1],t<o?(i=0,a=1,l="left"):t<u?(i=t-o,a=i+1):(f==e.length-3||t==u&&e[f+3]>t)&&(a=u-o,i=a-1,t>=u&&(l="right")),i!=null){if(r=e[f+2],o==u&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],l="left";if(n=="right"&&i==u-o)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)r=e[(f+=3)+2],l="right";break}return{node:r,start:i,end:a,collapse:l,coverStart:o,coverEnd:u}}function Wo(e,t){var n=Ha;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 Uo(e,t,n,r){var i=_a(t.map,n,r),a=i.node,l=i.start,o=i.end,u=i.collapse,f;if(a.nodeType==3){for(var g=0;g<4;g++){for(;l&&y(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+o<i.coverEnd&&y(t.line.text.charAt(i.coverStart+o));)++o;if(w&&S<9&&l==0&&o==i.coverEnd-i.coverStart?f=a.parentNode.getBoundingClientRect():f=Wo(R(a,l,o).getClientRects(),r),f.left||f.right||l==0)break;o=l,l=l-1,u="right"}w&&S<11&&(f=jo(e.display.measure,f))}else{l>0&&(u=r="right");var m;e.options.lineWrapping&&(m=a.getClientRects()).length>1?f=m[r=="right"?m.length-1:0]:f=a.getBoundingClientRect()}if(w&&S<9&&!l&&(!f||!f.left&&!f.right)){var L=a.parentNode.getClientRects()[0];L?f={left:L.left,right:L.left+_r(e.display),top:L.top,bottom:L.bottom}:f=Ha}for(var k=f.top-t.rect.top,W=f.bottom-t.rect.top,K=(k+W)/2,re=t.view.measure.heights,ce=0;ce<re.length-1&&!(K<re[ce]);ce++);var de=ce?re[ce-1]:0,he=re[ce],me={left:(u=="right"?f.right:f.left)-t.rect.left,right:(u=="left"?f.left:f.right)-t.rect.left,top:de,bottom:he};return!f.left&&!f.right&&(me.bogus=!0),e.options.singleCursorHeightPerLine||(me.rtop=k,me.rbottom=W),me}function jo(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!si(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 za(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 Ra(e){e.display.externalMeasure=null,ie(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)za(e.display.view[t])}function ln(e){Ra(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pa(e){return $&&be?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Wa(e){return $&&be?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Si(e){var t=qt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=an(n[i]));return r}function Pn(e,t,n,r,i){if(!i){var a=Si(t);n.top+=a,n.bottom+=a}if(r=="line")return n;r||(r="local");var l=rr(t);if(r=="local"?l+=Rn(e.display):l-=e.display.viewOffset,r=="page"||r=="window"){var o=e.display.lineSpace.getBoundingClientRect();l+=o.top+(r=="window"?0:Wa(et(e)));var u=o.left+(r=="window"?0:Pa(et(e)));n.left+=u,n.right+=u}return n.top+=l,n.bottom+=l,n}function Ua(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=Pa(et(e)),i-=Wa(et(e));else if(n=="local"||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Wn(e,t,n,r,i){return r||(r=Se(e.doc,t.line)),Pn(e,r,Oa(e,r,t.ch,i),n)}function Gt(e,t,n,r,i,a){r=r||Se(e.doc,t.line),i||(i=Or(e,r));function l(W,K){var re=Jt(e,i,W,K?"right":"left",a);return K?re.left=re.right:re.right=re.left,Pn(e,r,re,n)}var o=C(r,e.doc.direction),u=t.ch,f=t.sticky;if(u>=r.text.length?(u=r.text.length,f="before"):u<=0&&(u=0,f="after"),!o)return l(f=="before"?u-1:u,f=="before");function g(W,K,re){var ce=o[K],de=ce.level==1;return l(re?W-1:W,de!=re)}var m=p(o,u,f),L=s,k=g(u,m,f=="before");return L!=null&&(k.other=g(u,L,f!="before")),k}function ja(e,t){var n=0;t=Ne(e.doc,t),e.options.lineWrapping||(n=_r(e.display)*t.ch);var r=Se(e.doc,t.line),i=rr(r)+Rn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Fi(e,t,n,r,i){var a=V(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Ai(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Fi(r.first,0,null,-1,-1);var i=yr(r,n),a=r.first+r.size-1;if(i>a)return Fi(r.first+r.size-1,Se(r,a).text.length,null,1,1);t<0&&(t=0);for(var l=Se(r,i);;){var o=qo(e,l,i,t,n),u=xo(l,o.ch+(o.xRel>0||o.outside>0?1:0));if(!u)return o;var f=u.find(1);if(f.line==i)return f;l=Se(r,i=f.line)}}function qa(e,t,n,r){r-=Si(t);var i=t.text.length,a=A(function(l){return Jt(e,n,l-1).bottom<=r},i,0);return i=A(function(l){return Jt(e,n,l).top>r},a,i),{begin:a,end:i}}function Ga(e,t,n,r){n||(n=Or(e,t));var i=Pn(e,t,Jt(e,n,r),"line").top;return qa(e,t,n,i)}function Ei(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function qo(e,t,n,r,i){i-=rr(t);var a=Or(e,t),l=Si(t),o=0,u=t.text.length,f=!0,g=C(t,e.doc.direction);if(g){var m=(e.options.lineWrapping?Ko:Go)(e,t,n,a,g,r,i);f=m.level!=1,o=f?m.from:m.to-1,u=f?m.to:m.from-1}var L=null,k=null,W=A(function(Ee){var Fe=Jt(e,a,Ee);return Fe.top+=l,Fe.bottom+=l,Ei(Fe,r,i,!1)?(Fe.top<=i&&Fe.left<=r&&(L=Ee,k=Fe),!0):!1},o,u),K,re,ce=!1;if(k){var de=r-k.left<k.right-r,he=de==f;W=L+(he?0:1),re=he?"after":"before",K=de?k.left:k.right}else{!f&&(W==u||W==o)&&W++,re=W==0?"after":W==t.text.length?"before":Jt(e,a,W-(f?1:0)).bottom+l<=i==f?"after":"before";var me=Gt(e,V(n,W,re),"line",t,a);K=me.left,ce=i<me.top?-1:i>=me.bottom?1:0}return W=P(t.text,W,1),Fi(n,W,re,ce,r-K)}function Go(e,t,n,r,i,a,l){var o=A(function(m){var L=i[m],k=L.level!=1;return Ei(Gt(e,V(n,k?L.to:L.from,k?"before":"after"),"line",t,r),a,l,!0)},0,i.length-1),u=i[o];if(o>0){var f=u.level!=1,g=Gt(e,V(n,f?u.from:u.to,f?"after":"before"),"line",t,r);Ei(g,a,l,!0)&&g.top>l&&(u=i[o-1])}return u}function Ko(e,t,n,r,i,a,l){var o=qa(e,t,r,l),u=o.begin,f=o.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var g=null,m=null,L=0;L<i.length;L++){var k=i[L];if(!(k.from>=f||k.to<=u)){var W=k.level!=1,K=Jt(e,r,W?Math.min(f,k.to)-1:Math.max(u,k.from)).right,re=K<a?a-K+1e9:K-a;(!g||m>re)&&(g=k,m=re)}}return g||(g=i[i.length-1]),g.from<u&&(g={from:u,to:g.to,level:g.level}),g.to>f&&(g={from:g.from,to:f,level:g.level}),g}var br;function Hr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(br==null){br=Z("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)br.appendChild(document.createTextNode("x")),br.appendChild(Z("br"));br.appendChild(document.createTextNode("x"))}Le(e.measure,br);var n=br.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),ie(e.measure),n||1}function _r(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=Z("span","xxxxxxxxxx"),n=Z("pre",[t],"CodeMirror-line-like");Le(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Li(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,l=0;a;a=a.nextSibling,++l){var o=e.display.gutterSpecs[l].className;n[o]=a.offsetLeft+a.clientLeft+i,r[o]=a.clientWidth}return{fixedPos:Ti(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ti(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ka(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/_r(e.display)-3);return function(i){if(ur(e.doc,i))return 0;var a=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(a+=i.widgets[l].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function Bi(e){var t=e.doc,n=Ka(e);t.iter(function(r){var i=n(r);i!=r.height&&Yt(r,i)})}function Cr(e,t,n,r){var i=e.display;if(!n&&Ge(t).getAttribute("cm-not-content")=="true")return null;var a,l,o=i.lineSpace.getBoundingClientRect();try{a=t.clientX-o.left,l=t.clientY-o.top}catch(m){return null}var u=Ai(e,a,l),f;if(r&&u.xRel>0&&(f=Se(e.doc,u.line).text).length==u.ch){var g=Ie(f,f.length,e.options.tabSize)-f.length;u=V(u.line,Math.max(0,Math.round((a-Na(e.display).left)/_r(e.display))-g))}return u}function wr(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 Lt(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)tr&&xi(e.doc,t)<i.viewTo&&fr(e);else if(n<=i.viewFrom)tr&&wa(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 a=Un(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var l=Un(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):fr(e)}else{var o=Un(e,t,t,-1),u=Un(e,n,n+r,1);o&&u?(i.view=i.view.slice(0,o.index).concat(zn(e,o.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):fr(e)}var f=i.externalMeasured;f&&(n<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(i.externalMeasured=null))}function sr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[wr(e,t)];if(a.node!=null){var l=a.changes||(a.changes=[]);We(l,n)==-1&&l.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Un(e,t,n,r){var i=wr(e,t),a,l=e.display.view;if(!tr||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var o=e.display.viewFrom,u=0;u<i;u++)o+=l[u].size;if(o!=t){if(r>0){if(i==l.length-1)return null;a=o+l[i].size-t,i++}else a=o-t;t+=a,n+=a}for(;xi(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Xo(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=zn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=zn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(wr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(zn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,wr(e,n)))),r.viewTo=n}function Xa(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 on(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ya(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var o=0;o<n.sel.ranges.length;o++)if(!(!t&&o==n.sel.primIndex)){var u=n.sel.ranges[o];if(!(u.from().line>=e.display.viewTo||u.to().line<e.display.viewFrom)){var f=u.empty();if(l){var g=l(e,u);g&&Mi(e,g,i)}else(f||e.options.showCursorWhenSelecting)&&Mi(e,u.head,i);f||Yo(e,u,a)}}return r}function Mi(e,t,n){var r=Gt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(Z("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Wn(e,t,"div",null,null),l=a.right-a.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(r.other){var o=n.appendChild(Z("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function jn(e,t){return e.top-t.top||e.left-t.left}function Yo(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),l=Na(e.display),o=l.left,u=Math.max(r.sizerWidth,Dr(e)-r.sizer.offsetLeft)-l.right,f=i.direction=="ltr";function g(he,me,Ee,Fe){me<0&&(me=0),me=Math.round(me),Fe=Math.round(Fe),a.appendChild(Z("div",null,"CodeMirror-selected","position: absolute; left: "+he+`px;
|
|
top: `+me+"px; width: "+(Ee==null?u-he:Ee)+`px;
|
|
height: `+(Fe-me)+"px"))}function m(he,me,Ee){var Fe=Se(i,he),He=Fe.text.length,Qe,mt;function tt(ut,Mt){return Wn(e,V(he,ut),"div",Fe,Mt)}function Ht(ut,Mt,Ct){var dt=Ga(e,Fe,null,ut),st=Mt=="ltr"==(Ct=="after")?"left":"right",nt=Ct=="after"?dt.begin:dt.end-(/\s/.test(Fe.text.charAt(dt.end-1))?2:1);return tt(nt,st)[st]}var Bt=C(Fe,i.direction);return xe(Bt,me||0,Ee==null?He:Ee,function(ut,Mt,Ct,dt){var st=Ct=="ltr",nt=tt(ut,st?"left":"right"),Nt=tt(Mt-1,st?"right":"left"),Qr=me==null&&ut==0,vr=Ee==null&&Mt==He,St=dt==0,$t=!Bt||dt==Bt.length-1;if(Nt.top-nt.top<=3){var xt=(f?Qr:vr)&&St,ia=(f?vr:Qr)&&$t,lr=xt?o:(st?nt:Nt).left,Er=ia?u:(st?Nt:nt).right;g(lr,nt.top,Er-lr,nt.bottom)}else{var Lr,At,Jr,aa;st?(Lr=f&&Qr&&St?o:nt.left,At=f?u:Ht(ut,Ct,"before"),Jr=f?o:Ht(Mt,Ct,"after"),aa=f&&vr&&$t?u:Nt.right):(Lr=f?Ht(ut,Ct,"before"):o,At=!f&&Qr&&St?u:nt.right,Jr=!f&&vr&&$t?o:Nt.left,aa=f?Ht(Mt,Ct,"after"):u),g(Lr,nt.top,At-Lr,nt.bottom),nt.bottom<Nt.top&&g(o,nt.bottom,null,Nt.top),g(Jr,Nt.top,aa-Jr,Nt.bottom)}(!Qe||jn(nt,Qe)<0)&&(Qe=nt),jn(Nt,Qe)<0&&(Qe=Nt),(!mt||jn(nt,mt)<0)&&(mt=nt),jn(Nt,mt)<0&&(mt=Nt)}),{start:Qe,end:mt}}var L=t.from(),k=t.to();if(L.line==k.line)m(L.line,L.ch,k.ch);else{var W=Se(i,L.line),K=Se(i,k.line),re=qt(W)==qt(K),ce=m(L.line,L.ch,re?W.text.length+1:null).end,de=m(k.line,re?0:null,k.ch).start;re&&(ce.top<de.top-2?(g(ce.right,ce.top,null,ce.bottom),g(o,de.top,de.left,de.bottom)):g(ce.right,ce.top,de.left-ce.right,ce.bottom)),ce.bottom<de.top&&g(o,ce.bottom,null,de.top)}n.appendChild(a)}function Ni(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 Za(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Oi(e))}function Ii(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&zr(e))},100)}function Oi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(H(e,"focus",e,t),e.state.focused=!0,ke(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),B&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ni(e))}function zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(H(e,"blur",e,t),e.state.focused=!1,ze(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function qn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l<t.view.length;l++){var o=t.view[l],u=e.options.lineWrapping,f=void 0,g=0;if(!o.hidden){if(i+=o.line.height,w&&S<8){var m=o.node.offsetTop+o.node.offsetHeight;f=m-n,n=m}else{var L=o.node.getBoundingClientRect();f=L.bottom-L.top,!u&&o.text.firstChild&&(g=o.text.firstChild.getBoundingClientRect().right-L.left-1)}var k=o.line.height-f;if((k>.005||k<-.005)&&(i<r&&(a-=k),Yt(o.line,f),Qa(o.line),o.rest))for(var W=0;W<o.rest.length;W++)Qa(o.rest[W]);if(g>e.display.sizerWidth){var K=Math.ceil(g/_r(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Qa(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 Gn(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Rn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=yr(t,r),l=yr(t,i);if(n&&n.ensure){var o=n.ensure.from.line,u=n.ensure.to.line;o<a?(a=o,l=yr(t,rr(Se(t,o))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=l&&(a=yr(t,rr(Se(t,u))-e.wrapper.clientHeight),l=u)}return{from:a,to:Math.max(l,a+1)}}function Zo(e,t){if(!te(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!pe){var l=Z("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-n.viewOffset-Rn(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(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function Qo(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?V(t.line,t.ch+1,"before"):t,t=t.ch?V(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,o=Gt(e,t),u=!n||n==t?o:Gt(e,n);i={left:Math.min(o.left,u.left),top:Math.min(o.top,u.top)-r,right:Math.max(o.left,u.left),bottom:Math.max(o.bottom,u.bottom)+r};var f=Hi(e,i),g=e.doc.scrollTop,m=e.doc.scrollLeft;if(f.scrollTop!=null&&(sn(e,f.scrollTop),Math.abs(e.doc.scrollTop-g)>1&&(l=!0)),f.scrollLeft!=null&&(kr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-m)>1&&(l=!0)),!l)break}return i}function Jo(e,t){var n=Hi(e,t);n.scrollTop!=null&&sn(e,n.scrollTop),n.scrollLeft!=null&&kr(e,n.scrollLeft)}function Hi(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=wi(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var o=e.doc.height+Ci(n),u=t.top<r,f=t.bottom>o-r;if(t.top<i)l.scrollTop=u?0:t.top;else if(t.bottom>i+a){var g=Math.min(t.top,(f?o:t.bottom)-a);g!=i&&(l.scrollTop=g)}var m=e.options.fixedGutter?0:n.gutters.offsetWidth,L=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-m,k=Dr(e)-n.gutters.offsetWidth,W=t.right-t.left>k;return W&&(t.right=t.left+k),t.left<10?l.scrollLeft=0:t.left<L?l.scrollLeft=Math.max(0,t.left+m-(W?0:10)):t.right>k+L-3&&(l.scrollLeft=t.right+(W?0:10)-k),l}function _i(e,t){t!=null&&(Kn(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){Kn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function un(e,t,n){(t!=null||n!=null)&&Kn(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function $o(e,t){Kn(e),e.curOp.scrollToPos=t}function Kn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ja(e,t.from),r=ja(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=Hi(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});un(e,i.scrollLeft,i.scrollTop)}function sn(e,t){Math.abs(e.doc.scrollTop-t)<2||(q||Ri(e,{top:t}),$a(e,t,!0),q&&Ri(e),hn(e,100))}function $a(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 kr(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,nl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ci(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 Sr=function(e,t,n){this.cm=n;var r=this.vert=Z("div",[Z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Z("div",[Z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),D(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),D(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&S<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Sr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sr.prototype.zeroWidthHack=function(){var e=O&&!ue?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ae,this.disableVert=new Ae},Sr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Sr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var cn=function(){};cn.prototype.update=function(){return{bottom:0,right:0}},cn.prototype.setScrollLeft=function(){},cn.prototype.setScrollTop=function(){},cn.prototype.clear=function(){};function Pr(e,t){t||(t=fn(e));var n=e.display.barWidth,r=e.display.barHeight;Va(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&qn(e),Va(e,fn(e)),n=e.display.barWidth,r=e.display.barHeight}function Va(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 el={native:Sr,null:cn};function tl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new el[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),D(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"?kr(e,t):sn(e,t)},e),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)}var Vo=0;function Fr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vo,markArrays:null},To(e.curOp)}function Ar(e){var t=e.curOp;t&&Mo(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;eu(n)})}function eu(e){for(var t=e.ops,n=0;n<t.length;n++)tu(t[n]);for(var r=0;r<t.length;r++)ru(t[r]);for(var i=0;i<t.length;i++)nu(t[i]);for(var a=0;a<t.length;a++)iu(t[a]);for(var l=0;l<t.length;l++)au(t[l])}function tu(e){var t=e.cm,n=t.display;ou(t),e.updateMaxLine&&Di(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 Xn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ru(e){e.updatedDisplay=e.mustUpdate&&zi(e.cm,e.update)}function nu(e){var t=e.cm,n=t.display;e.updatedDisplay&&qn(t),e.barMeasure=fn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Oa(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-Dr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function iu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&kr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==J(et(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Pr(t,e.barMeasure),e.updatedDisplay&&Wi(t,e.barMeasure),e.selectionChanged&&Ni(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Za(e.cm)}function au(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&rl(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&$a(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&kr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Qo(t,Ne(r,e.scrollToPos.from),Ne(r,e.scrollToPos.to),e.scrollToPos.margin);Zo(t,i)}var a=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(a)for(var o=0;o<a.length;++o)a[o].lines.length||H(a[o],"hide");if(l)for(var u=0;u<l.length;++u)l[u].lines.length&&H(l[u],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&H(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ot(e,t){if(e.curOp)return t();Fr(e);try{return t()}finally{Ar(e)}}function gt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Fr(e);try{return t.apply(e,arguments)}finally{Ar(e)}}}function Ft(e){return function(){if(this.curOp)return e.apply(this,arguments);Fr(this);try{return e.apply(this,arguments)}finally{Ar(this)}}}function vt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Fr(t);try{return e.apply(this,arguments)}finally{Ar(t)}}}function hn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(lu,e))}function lu(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=en(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var l=a.styles,o=a.text.length>e.options.maxHighlightLength?er(t.mode,r.state):null,u=sa(e,a,r,!0);o&&(r.state=o),a.styles=u.styles;var f=a.styleClasses,g=u.classes;g?a.styleClasses=g:f&&(a.styleClasses=null);for(var m=!l||l.length!=a.styles.length||f!=g&&(!f||!g||f.bgClass!=g.bgClass||f.textClass!=g.textClass),L=0;!m&&L<l.length;++L)m=l[L]!=a.styles[L];m&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pi(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return hn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ot(e,function(){for(var a=0;a<i.length;a++)sr(e,i[a],"text")})}}var Xn=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Gn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Dr(e),this.force=n,this.dims=Li(e),this.events=[]};Xn.prototype.signal=function(e,t){Te(e,t)&&this.events.push(arguments)},Xn.prototype.finish=function(){for(var e=0;e<this.events.length;e++)H.apply(null,this.events[e])};function ou(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 uu(e){if(e.hasFocus())return null;var t=J(et(e));if(!t||!le(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=v(e).getSelection();r.anchorNode&&r.extend&&le(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function su(e){if(!(!e||!e.activeElt||e.activeElt==J(e.activeElt.ownerDocument))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&le(document.body,e.anchorNode)&&le(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 zi(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&&Xa(e)==0)return!1;il(e)&&(fr(e),t.dims=Li(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),tr&&(a=xi(e.doc,a),l=wa(e.doc,l));var o=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Xo(e,a,l),n.viewOffset=rr(Se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Xa(e);if(!o&&u==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var f=uu(e);return u>4&&(n.lineDiv.style.display="none"),fu(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,su(f),ie(n.cursorDiv),ie(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,o&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,hn(e,400)),n.updateLineNumbers=null,!0}function rl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Dr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Ci(e.display)-wi(e),n.top)}),t.visible=Gn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Gn(e.display,e.doc,n));if(!zi(e,t))break;qn(e);var i=fn(e);on(e),Pr(e,i),Wi(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 Ri(e,t){var n=new Xn(e,t);if(zi(e,n)){qn(e),rl(e,n);var r=fn(e);on(e),Pr(e,r),Wi(e,r),n.finish()}}function fu(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,l=a.firstChild;function o(W){var K=W.nextSibling;return B&&O&&e.display.currentWheelTarget==W?W.style.display="none":W.parentNode.removeChild(W),K}for(var u=r.view,f=r.viewFrom,g=0;g<u.length;g++){var m=u[g];if(!m.hidden)if(!m.node||m.node.parentNode!=a){var L=_o(e,m,f,n);a.insertBefore(L,l)}else{for(;l!=m.node;)l=o(l);var k=i&&t!=null&&t<=f&&m.lineNumber;m.changes&&(We(m.changes,"gutter")>-1&&(k=!1),Ea(e,m,f,n)),k&&(ie(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(ci(e.options,f)))),l=m.node.nextSibling}f+=m.size}for(;l;)l=o(l)}function Pi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",pt(e,"gutterChanged",e)}function Wi(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 nl(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ti(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=a),n[l].gutterBackground&&(n[l].gutterBackground.style.left=a));var o=n[l].alignable;if(o)for(var u=0;u<o.length;u++)o[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function il(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ci(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(Z("div",[Z("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,l=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Pi(e.display),!0}return!1}function Ui(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],l=null;if(typeof a!="string"&&(l=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:a,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function al(e){var t=e.gutters,n=e.gutterSpecs;ie(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,l=i.style,o=t.appendChild(Z("div",null,"CodeMirror-gutter "+a));l&&(o.style.cssText=l),a=="CodeMirror-linenumbers"&&(e.lineGutter=o,o.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Pi(e)}function dn(e){al(e.display),Lt(e),nl(e)}function cu(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=Z("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=Z("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Re("div",null,"CodeMirror-code"),i.selectionDiv=Z("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=Z("div",null,"CodeMirror-cursors"),i.measure=Z("div",null,"CodeMirror-measure"),i.lineMeasure=Z("div",null,"CodeMirror-measure"),i.lineSpace=Re("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=Re("div",[i.lineSpace],"CodeMirror-lines");i.mover=Z("div",[a],null,"position: relative"),i.sizer=Z("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=Z("div",null,null,"position: absolute; height: "+wt+"px; width: 1px;"),i.gutters=Z("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=Z("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=Z("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),w&&S<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!B&&!(q&&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=Ui(r.gutters,r.lineNumbers),al(i),n.init(i)}var Yn=0,ir=null;w?ir=-.53:q?ir=15:$?ir=-.7:fe&&(ir=-1/3);function ll(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 hu(e){var t=ll(e);return t.x*=ir,t.y*=ir,t}function ol(e,t){$&&G==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=ll(t),r=n.x,i=n.y,a=ir;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,a=1);var l=e.display,o=l.scroller,u=o.scrollWidth>o.clientWidth,f=o.scrollHeight>o.clientHeight;if(!!(r&&u||i&&f)){if(i&&O&&B){e:for(var g=t.target,m=l.view;g!=o;g=g.parentNode)for(var L=0;L<m.length;L++)if(m[L].node==g){e.display.currentWheelTarget=g;break e}}if(r&&!q&&!j&&a!=null){i&&f&&sn(e,Math.max(0,o.scrollTop+i*a)),kr(e,Math.max(0,o.scrollLeft+r*a)),(!i||i&&f)&&ve(t),l.wheelStartX=null;return}if(i&&a!=null){var k=i*a,W=e.doc.scrollTop,K=W+l.wrapper.clientHeight;k<0?W=Math.max(0,W+k-50):K=Math.min(e.doc.height,K+k+50),Ri(e,{top:W,bottom:K})}Yn<20&&t.deltaMode!==0&&(l.wheelStartX==null?(l.wheelStartX=o.scrollLeft,l.wheelStartY=o.scrollTop,l.wheelDX=r,l.wheelDY=i,setTimeout(function(){if(l.wheelStartX!=null){var re=o.scrollLeft-l.wheelStartX,ce=o.scrollTop-l.wheelStartY,de=ce&&l.wheelDY&&ce/l.wheelDY||re&&l.wheelDX&&re/l.wheelDX;l.wheelStartX=l.wheelStartY=null,de&&(ir=(ir*Yn+de)/(Yn+1),++Yn)}},200)):(l.wheelDX+=r,l.wheelDY+=i))}}var zt=function(e,t){this.ranges=e,this.primIndex=t};zt.prototype.primary=function(){return this.ranges[this.primIndex]},zt.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(!hi(n.anchor,r.anchor)||!hi(n.head,r.head))return!1}return!0},zt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Xe(di(this.ranges[t].anchor),di(this.ranges[t].head));return new zt(e,this.primIndex)},zt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},zt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Me(t,r.from())>=0&&Me(e,r.to())<=0)return n}return-1};var Xe=function(e,t){this.anchor=e,this.head=t};Xe.prototype.from=function(){return Bn(this.anchor,this.head)},Xe.prototype.to=function(){return Tn(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(L,k){return Me(L.from(),k.from())}),n=We(t,i);for(var a=1;a<t.length;a++){var l=t[a],o=t[a-1],u=Me(o.to(),l.from());if(r&&!l.empty()?u>0:u>=0){var f=Bn(o.from(),l.from()),g=Tn(o.to(),l.to()),m=o.empty()?l.from()==l.head:o.from()==o.head;a<=n&&--n,t.splice(--a,2,new Xe(m?g:f,m?f:g))}}return new zt(t,n)}function cr(e,t){return new zt([new Xe(e,t||e)],0)}function hr(e){return e.text?V(e.from.line+e.text.length-1,Pe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ul(e,t){if(Me(e,t.from)<0)return e;if(Me(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),V(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 Xe(ul(i.anchor,t),ul(i.head,t)))}return Kt(e.cm,n,e.sel.primIndex)}function sl(e,t,n){return e.line==t.line?V(n.line,e.ch-t.ch+n.ch):V(n.line+(e.line-t.line),e.ch)}function du(e,t,n){for(var r=[],i=V(e.first,0),a=i,l=0;l<t.length;l++){var o=t[l],u=sl(o.from,i,a),f=sl(hr(o),i,a);if(i=o.to,a=f,n=="around"){var g=e.sel.ranges[l],m=Me(g.head,g.anchor)<0;r[l]=new Xe(m?f:u,m?u:f)}else r[l]=new Xe(u,u)}return new zt(r,e.sel.primIndex)}function qi(e){e.doc.mode=jt(e.options,e.doc.modeOption),pn(e)}function pn(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,hn(e,100),e.state.modeGen++,e.curOp&&Lt(e)}function fl(e,t){return t.from.ch==0&&t.to.ch==0&&Pe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Gi(e,t,n,r){function i(de){return n?n[de]:null}function a(de,he,me){bo(de,he,me,r),pt(de,"change",de,t)}function l(de,he){for(var me=[],Ee=de;Ee<he;++Ee)me.push(new Nr(f[Ee],i(Ee),r));return me}var o=t.from,u=t.to,f=t.text,g=Se(e,o.line),m=Se(e,u.line),L=Pe(f),k=i(f.length-1),W=u.line-o.line;if(t.full)e.insert(0,l(0,f.length)),e.remove(f.length,e.size-f.length);else if(fl(e,t)){var K=l(0,f.length-1);a(m,m.text,k),W&&e.remove(o.line,W),K.length&&e.insert(o.line,K)}else if(g==m)if(f.length==1)a(g,g.text.slice(0,o.ch)+L+g.text.slice(u.ch),k);else{var re=l(1,f.length-1);re.push(new Nr(L+g.text.slice(u.ch),k,r)),a(g,g.text.slice(0,o.ch)+f[0],i(0)),e.insert(o.line+1,re)}else if(f.length==1)a(g,g.text.slice(0,o.ch)+f[0]+m.text.slice(u.ch),i(0)),e.remove(o.line+1,W);else{a(g,g.text.slice(0,o.ch)+f[0],i(0)),a(m,L+m.text.slice(u.ch),k);var ce=l(1,f.length-1);W>1&&e.remove(o.line+1,W-1),e.insert(o.line+1,ce)}pt(e,"change",e,t)}function dr(e,t,n){function r(i,a,l){if(i.linked)for(var o=0;o<i.linked.length;++o){var u=i.linked[o];if(u.doc!=a){var f=l&&u.sharedHist;n&&!f||(t(u.doc,f),r(u.doc,i,f))}}}r(e,null,!0)}function cl(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Bi(e),qi(e),hl(e),e.options.direction=t.direction,e.options.lineWrapping||Di(e),e.options.mode=t.modeOption,Lt(e)}function hl(e){(e.doc.direction=="rtl"?ke:ze)(e.display.lineDiv,"CodeMirror-rtl")}function pu(e){Ot(e,function(){hl(e),Lt(e)})}function Zn(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 Ki(e,t){var n={from:di(t.from),to:hr(t),text:xr(e,t.from,t.to)};return gl(e,n,t.from.line,t.to.line+1),dr(e,function(r){return gl(r,n,t.from.line,t.to.line+1)},!0),n}function dl(e){for(;e.length;){var t=Pe(e);if(t.ranges)e.pop();else break}}function gu(e,t){if(t)return dl(e.done),Pe(e.done);if(e.done.length&&!Pe(e.done).ranges)return Pe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Pe(e.done)}function pl(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,l,o;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=gu(i,i.lastOp==r)))o=Pe(l.changes),Me(t.from,t.to)==0&&Me(t.from,o.to)==0?o.to=hr(t):l.changes.push(Ki(e,t));else{var u=Pe(i.done);for((!u||!u.ranges)&&Qn(e.sel,i.done),l={changes:[Ki(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||H(e,"historyAdded")}function vu(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function mu(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||vu(e,a,Pe(i.done),t))?i.done[i.done.length-1]=t:Qn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&dl(i.undone)}function Qn(e,t){var n=Pe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function gl(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=l.markedSpans),++a})}function xu(e){if(!e)return null;for(var t,n=0;n<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 yu(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(xu(n[i]));return r}function vl(e,t){var n=yu(e,t),r=vi(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],l=r[i];if(a&&l){e:for(var o=0;o<l.length;++o){for(var u=l[o],f=0;f<a.length;++f)if(a[f].marker==u.marker)continue e;a.push(u)}}else l&&(n[i]=l)}return n}function Wr(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?zt.prototype.deepCopy.call(a):a);continue}var l=a.changes,o=[];r.push({changes:o});for(var u=0;u<l.length;++u){var f=l[u],g=void 0;if(o.push({from:f.from,to:f.to,text:f.text}),t)for(var m in f)(g=m.match(/^spans_(\d+)$/))&&We(t,Number(g[1]))>-1&&(Pe(o)[m]=f[m],delete f[m])}}return r}function Xi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=Me(t,i)<0;a!=Me(n,i)<0?(i=t,t=n):a!=Me(t,n)<0&&(t=n)}return new Xe(i,t)}else return new Xe(n||t,t)}function Jn(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),kt(e,new zt([Xi(e.sel.primary(),t,n,i)],0),r)}function ml(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Xi(e.sel.ranges[a],t[a],null,i);var l=Kt(e.cm,r,e.sel.primIndex);kt(e,l,n)}function Yi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,kt(e,Kt(e.cm,i,e.sel.primIndex),r)}function xl(e,t,n,r){kt(e,cr(t,n),r)}function Du(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new Xe(Ne(e,i[a].anchor),Ne(e,i[a].head))},origin:n&&n.origin};return H(e,"beforeSelectionChange",e,r),e.cm&&H(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Kt(e.cm,r.ranges,r.ranges.length-1):t}function yl(e,t,n){var r=e.history.done,i=Pe(r);i&&i.ranges?(r[r.length-1]=t,$n(e,t,n)):kt(e,t,n)}function kt(e,t,n){$n(e,t,n),mu(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function $n(e,t,n){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(t=Du(e,t,n));var r=n&&n.bias||(Me(t.primary().head,e.sel.primary().head)<0?-1:1);Dl(e,Cl(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Rr(e.cm)}function Dl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),pt(e,"cursorActivity",e))}function bl(e){Dl(e,Cl(e,e.sel,null,!1))}function Cl(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var l=t.ranges[a],o=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Vn(e,l.anchor,o&&o.anchor,n,r),f=l.head==l.anchor?u:Vn(e,l.head,o&&o.head,n,r);(i||u!=l.anchor||f!=l.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new Xe(u,f))}return i?Kt(e.cm,i,t.primIndex):t}function Ur(e,t,n,r,i){var a=Se(e,t.line);if(a.markedSpans)for(var l=0;l<a.markedSpans.length;++l){var o=a.markedSpans[l],u=o.marker,f="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,g="selectRight"in u?!u.selectRight:u.inclusiveRight;if((o.from==null||(f?o.from<=t.ch:o.from<t.ch))&&(o.to==null||(g?o.to>=t.ch:o.to>t.ch))){if(i&&(H(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--l;continue}else break;if(!u.atomic)continue;if(n){var m=u.find(r<0?1:-1),L=void 0;if((r<0?g:f)&&(m=wl(e,m,-r,m&&m.line==t.line?a:null)),m&&m.line==t.line&&(L=Me(m,n))&&(r<0?L<0:L>0))return Ur(e,m,t,r,i)}var k=u.find(r<0?-1:1);return(r<0?f:g)&&(k=wl(e,k,r,k.line==t.line?a:null)),k?Ur(e,k,t,r,i):null}}return t}function Vn(e,t,n,r,i){var a=r||1,l=Ur(e,t,n,a,i)||!i&&Ur(e,t,n,a,!0)||Ur(e,t,n,-a,i)||!i&&Ur(e,t,n,-a,!0);return l||(e.cantEdit=!0,V(e.first,0))}function wl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ne(e,V(t.line-1)):null:n>0&&t.ch==(r||Se(e,t.line)).text.length?t.line<e.first+e.size-1?V(t.line+1,0):null:new V(t.line,t.ch+n)}function kl(e){e.setSelection(V(e.firstLine(),0),V(e.lastLine()),Ke)}function Sl(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,a,l,o){i&&(r.from=Ne(e,i)),a&&(r.to=Ne(e,a)),l&&(r.text=l),o!==void 0&&(r.origin=o)}),H(e,"beforeChange",e,r),e.cm&&H(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 jr(e,t,n){if(e.cm){if(!e.cm.curOp)return gt(e.cm,jr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(t=Sl(e,t,!0),!t))){var r=va&&!n&&mo(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Fl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Fl(e,t)}}function Fl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Me(t.from,t.to)==0)){var n=ji(e,t);pl(e,t,n,e.cm?e.cm.curOp.id:NaN),gn(e,t,n,vi(e,t));var r=[];dr(e,function(i,a){!a&&We(r,i.history)==-1&&(Tl(i.history,t),r.push(i.history)),gn(i,t,null,vi(i,t))})}}function ei(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,l=e.sel,o=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,f=0;f<o.length&&(a=o[f],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));f++);if(f!=o.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=o.pop(),a.ranges){if(Qn(a,u),n&&!a.equals(e.sel)){kt(e,a,{clearRedo:!1});return}l=a}else if(r){o.push(a);return}else break;var g=[];Qn(l,u),u.push({changes:g,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var m=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),L=function(K){var re=a.changes[K];if(re.origin=t,m&&!Sl(e,re,!1))return o.length=0,{};g.push(Ki(e,re));var ce=K?ji(e,re):Pe(o);gn(e,re,ce,vl(e,re)),!K&&e.cm&&e.cm.scrollIntoView({from:re.from,to:hr(re)});var de=[];dr(e,function(he,me){!me&&We(de,he.history)==-1&&(Tl(he.history,re),de.push(he.history)),gn(he,re,null,vl(he,re))})},k=a.changes.length-1;k>=0;--k){var W=L(k);if(W)return W.v}}}}function Al(e,t){if(t!=0&&(e.first+=t,e.sel=new zt(yt(e.sel.ranges,function(i){return new Xe(V(i.anchor.line+t,i.anchor.ch),V(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Lt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)sr(e.cm,r,"gutter")}}function gn(e,t,n,r){if(e.cm&&!e.cm.curOp)return gt(e.cm,gn)(e,t,n,r);if(t.to.line<e.first){Al(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);Al(e,i),t={from:V(e.first,0),to:V(t.to.line+i,t.to.ch),text:[Pe(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:V(a,Se(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=xr(e,t.from,t.to),n||(n=ji(e,t)),e.cm?bu(e.cm,t,r):Gi(e,t,r),$n(e,n,Ke),e.cantEdit&&Vn(e,V(e.firstLine(),0))&&(e.cantEdit=!1)}}function bu(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,o=!1,u=a.line;e.options.lineWrapping||(u=Ye(qt(Se(r,a.line))),r.iter(u,l.line+1,function(k){if(k==i.maxLine)return o=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ye(e),Gi(r,t,n,Ka(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(k){var W=_n(k);W>i.maxLineLength&&(i.maxLine=k,i.maxLineLength=W,i.maxLineChanged=!0,o=!1)}),o&&(e.curOp.updateMaxLine=!0)),so(r,a.line),hn(e,400);var f=t.text.length-(l.line-a.line)-1;t.full?Lt(e):a.line==l.line&&t.text.length==1&&!fl(e.doc,t)?sr(e,a.line,"text"):Lt(e,a.line,l.line+1,f);var g=Te(e,"changes"),m=Te(e,"change");if(m||g){var L={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};m&&pt(e,"change",e,L),g&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(L)}e.display.selForContextMenu=null}function qr(e,t,n,r,i){var a;r||(r=n),Me(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),jr(e,{from:n,to:r,text:t,origin:i})}function El(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Ll(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],l=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var o=0;o<a.ranges.length;o++)El(a.ranges[o].anchor,t,n,r),El(a.ranges[o].head,t,n,r);continue}for(var u=0;u<a.changes.length;++u){var f=a.changes[u];if(n<f.from.line)f.from=V(f.from.line+r,f.from.ch),f.to=V(f.to.line+r,f.to.ch);else if(t<=f.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}function Tl(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Ll(e.done,n,r,i),Ll(e.undone,n,r,i)}function vn(e,t,n,r){var i=t,a=t;return typeof t=="number"?a=Se(e,oa(e,t)):i=Ye(t),i==null?null:(r(a,i)&&e.cm&&sr(e.cm,i,n),a)}function mn(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}mn.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,Co(i),pt(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 xn(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}xn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),l=r.height;if(r.removeInner(e,a),this.height-=l-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof mn))){var o=[];this.collapse(o),this.children=[new mn(o)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,o=l;o<i.lines.length;){var u=new mn(i.lines.slice(o,o+=25));i.height-=u.height,this.children.splice(++r,0,u),u.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new xn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=We(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new xn(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],a=i.chunkSize();if(e<a){var l=Math.min(t,a-e);if(i.iterN(e,l,n))return!0;if((t-=l)==0)break;e=0}else e-=a}}};var yn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};yn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=an(this);Yt(n,Math.max(0,n.height-a)),e&&(Ot(e,function(){Bl(e,n,-a),sr(e,r,"widget")}),pt(e,"lineWidgetCleared",e,this,r))}},yn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=an(this)-t;!i||(ur(this.doc,r)||Yt(r,r.height+i),n&&Ot(n,function(){n.curOp.forceUpdate=!0,Bl(n,r,i),pt(n,"lineWidgetChanged",n,e,Ye(r))}))},Be(yn);function Bl(e,t,n){rr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_i(e,n)}function Cu(e,t,n,r){var i=new yn(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),vn(e,t,"widget",function(l){var o=l.widgets||(l.widgets=[]);if(i.insertAt==null?o.push(i):o.splice(Math.min(o.length,Math.max(0,i.insertAt)),0,i),i.line=l,a&&!ur(e,l)){var u=rr(l)<e.scrollTop;Yt(l,l.height+an(i)),u&&_i(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&pt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:Ye(t)),i}var Ml=0,pr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ml};pr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Fr(e),Te(this,"clear")){var n=this.find();n&&pt(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var l=this.lines[a],o=tn(l.markedSpans,this);e&&!this.collapsed?sr(e,Ye(l),"text"):e&&(o.to!=null&&(i=Ye(l)),o.from!=null&&(r=Ye(l))),l.markedSpans=ho(l.markedSpans,o),o.from==null&&this.collapsed&&!ur(this.doc,l)&&e&&Yt(l,Hr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var f=qt(this.lines[u]),g=_n(f);g>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=g,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Lt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bl(e.doc)),e&&pt(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 a=this.lines[i],l=tn(a.markedSpans,this);if(l.from!=null&&(n=V(t?a:Ye(a),l.from),e==-1))return n;if(l.to!=null&&(r=V(t?a:Ye(a),l.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||Ot(r,function(){var i=t.line,a=Ye(t.line),l=ki(r,a);if(l&&(za(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ur(n.doc,i)&&n.height!=null){var o=n.height;n.height=null;var u=an(n)-o;u&&Yt(i,i.height+u)}pt(r,"markerChanged",r,e)})},pr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||We(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},pr.prototype.detachLine=function(e){if(this.lines.splice(We(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Be(pr);function Gr(e,t,n,r,i){if(r&&r.shared)return wu(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return gt(e.cm,Gr)(e,t,n,r,i);var a=new pr(e,i),l=Me(t,n);if(r&&De(r,a,!1),l>0||l==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Re("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Ca(e,t.line,t,n,a)||t.line!=n.line&&Ca(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");co()}a.addToHistory&&pl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var o=t.line,u=e.cm,f;if(e.iter(o,n.line+1,function(m){u&&a.collapsed&&!u.options.lineWrapping&&qt(m)==u.display.maxLine&&(f=!0),a.collapsed&&o!=t.line&&Yt(m,0),po(m,new Nn(a,o==t.line?t.ch:null,o==n.line?n.ch:null),e.cm&&e.cm.curOp),++o}),a.collapsed&&e.iter(t.line,n.line+1,function(m){ur(e,m)&&Yt(m,0)}),a.clearOnEnter&&D(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(fo(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ml,a.atomic=!0),u){if(f&&(u.curOp.updateMaxLine=!0),a.collapsed)Lt(u,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var g=t.line;g<=n.line;g++)sr(u,g,"text");a.atomic&&bl(u.doc),pt(u,"markerAdded",u,a)}return a}var Dn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Dn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();pt(this,"clear")}},Dn.prototype.find=function(e,t){return this.primary.find(e,t)},Be(Dn);function wu(e,t,n,r,i){r=De(r),r.shared=!1;var a=[Gr(e,t,n,r,i)],l=a[0],o=r.widgetNode;return dr(e,function(u){o&&(r.widgetNode=o.cloneNode(!0)),a.push(Gr(u,Ne(u,t),Ne(u,n),r,i));for(var f=0;f<u.linked.length;++f)if(u.linked[f].isParent)return;l=Pe(a)}),new Dn(a,l)}function Nl(e){return e.findMarks(V(e.first,0),e.clipPos(V(e.lastLine())),function(t){return t.parent})}function ku(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),l=e.clipPos(i.to);if(Me(a,l)){var o=Gr(e,a,l,r.primary,r.primary.type);r.markers.push(o),o.parent=r}}}function Su(e){for(var t=function(r){var i=e[r],a=[i.primary.doc];dr(i.primary.doc,function(u){return a.push(u)});for(var l=0;l<i.markers.length;l++){var o=i.markers[l];We(a,o.doc)==-1&&(o.parent=null,i.markers.splice(l--,1))}},n=0;n<e.length;n++)t(n)}var Fu=0,Tt=function(e,t,n,r,i){if(!(this instanceof Tt))return new Tt(e,t,n,r,i);n==null&&(n=0),xn.call(this,[new mn([new Nr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=V(n,0);this.sel=cr(a),this.history=new Zn(null),this.id=++Fu,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Gi(this,{from:a,to:a,text:e}),kt(this,cr(a),Ke)};Tt.prototype=_(xn.prototype,{constructor:Tt,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=fi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:vt(function(e){var t=V(this.first,0),n=this.first+this.size-1;jr(this,{from:t,to:V(n,Se(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&un(this.cm,0,0),kt(this,cr(t),Ke)}),replaceRange:function(e,t,n,r){t=Ne(this,t),n=n?Ne(this,n):t,qr(this,e,t,n,r)},getRange:function(e,t,n){var r=xr(this,Ne(this,e),Ne(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(Vr(this,e))return Se(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Se(this,e)),qt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ne(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:vt(function(e,t,n){xl(this,Ne(this,typeof e=="number"?V(e,t||0):e),null,n)}),setSelection:vt(function(e,t,n){xl(this,Ne(this,e),Ne(this,t||e),n)}),extendSelection:vt(function(e,t,n){Jn(this,Ne(this,e),t&&Ne(this,t),n)}),extendSelections:vt(function(e,t){ml(this,ua(this,e),t)}),extendSelectionsBy:vt(function(e,t){var n=yt(this.sel.ranges,e);ml(this,ua(this,n),t)}),setSelections:vt(function(e,t,n){if(!!e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Xe(Ne(this,e[i].anchor),Ne(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),kt(this,Kt(this.cm,r,t),n)}}),addSelection:vt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Xe(Ne(this,e),Ne(this,t||e))),kt(this,Kt(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=xr(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=xr(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:vt(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var l=i.ranges[a];r[a]={from:l.from(),to:l.to(),text:this.splitLines(e[a]),origin:n}}for(var o=t&&t!="end"&&du(this,r,t),u=r.length-1;u>=0;u--)jr(this,r[u]);o?yl(this,o):this.cm&&Rr(this.cm)}),undo:vt(function(){ei(this,"undo")}),redo:vt(function(){ei(this,"redo")}),undoSelection:vt(function(){ei(this,"undo",!0)}),redoSelection:vt(function(){ei(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 Zn(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:Wr(this.history.done),undone:Wr(this.history.undone)}},setHistory:function(e){var t=this.history=new Zn(this.history);t.done=Wr(e.done.slice(0),null,!0),t.undone=Wr(e.undone.slice(0),null,!0)},setGutterMarker:vt(function(e,t,n){return vn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&d(i)&&(r.gutterMarkers=null),!0})}),clearGutter:vt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&vn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,d(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Vr(this,e)||(t=e,e=Se(this,e),!e))return null}else if(t=Ye(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:vt(function(e,t,n){return vn(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(ae(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:vt(function(e,t,n){return vn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=r[i];if(a)if(n==null)r[i]=null;else{var l=a.match(ae(n));if(!l)return!1;var o=l.index+l[0].length;r[i]=a.slice(0,l.index)+(!l.index||o==a.length?"":" ")+a.slice(o)||null}else return!1;return!0})}),addLineWidget:vt(function(e,t,n){return Cu(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Gr(this,Ne(this,e),Ne(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=Ne(this,e),Gr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Ne(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=Ne(this,e),t=Ne(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var l=a.markedSpans;if(l)for(var o=0;o<l.length;o++){var u=l[o];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!n||n(u.marker))&&r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),Ne(this,V(n,t))},indexFromPos:function(e){e=Ne(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 Tt(fi(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 Tt(fi(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}],ku(r,Nl(this)),r},unlinkDoc:function(e){if(e instanceof Ve&&(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),Su(Nl(this));break}}if(e.history==this.history){var r=[e.id];dr(e,function(i){return r.push(i.id)},!0),e.history=new Zn(null),e.history.done=Wr(this.history.done,r),e.history.undone=Wr(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):Br(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:vt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pu(this.cm))})}),Tt.prototype.eachLine=Tt.prototype.iter;var Il=0;function Au(e){var t=this;if(Ol(t),!(te(t,e)||nr(t.display,e))){ve(e),w&&(Il=+new Date);var n=Cr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),l=0,o=function(){++l==i&>(t,function(){n=Ne(t.doc,n);var k={from:n,to:n,text:t.doc.splitLines(a.filter(function(W){return W!=null}).join(t.doc.lineSeparator())),origin:"paste"};jr(t.doc,k),yl(t.doc,cr(Ne(t.doc,n),Ne(t.doc,hr(k))))})()},u=function(k,W){if(t.options.allowDropFileTypes&&We(t.options.allowDropFileTypes,k.type)==-1){o();return}var K=new FileReader;K.onerror=function(){return o()},K.onload=function(){var re=K.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(re)){o();return}a[W]=re,o()},K.readAsText(k)},f=0;f<r.length;f++)u(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 g=e.dataTransfer.getData("Text");if(g){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),$n(t.doc,cr(n,n)),m)for(var L=0;L<m.length;++L)qr(t.doc,"",m[L].anchor,m[L].head,"drag");t.replaceSelection(g,"around","paste"),t.display.input.focus()}}catch(k){}}}}function Eu(e,t){if(w&&(!e.state.draggingText||+new Date-Il<100)){Oe(t);return}if(!(te(e,t)||nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fe)){var n=Z("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",j&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),j&&n.parentNode.removeChild(n)}}function Lu(e,t){var n=Cr(e,t);if(!!n){var r=document.createDocumentFragment();Mi(e,n,r),e.display.dragCursor||(e.display.dragCursor=Z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Le(e.display.dragCursor,r)}}function Ol(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hl(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 a=0;a<n.length;a++)e(n[a])})}}var _l=!1;function Tu(){_l||(Bu(),_l=!0)}function Bu(){var e;D(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hl(Mu)},100))}),D(window,"blur",function(){return Hl(zr)})}function Mu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var gr={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"},bn=0;bn<10;bn++)gr[bn+48]=gr[bn+96]=String(bn);for(var ti=65;ti<=90;ti++)gr[ti]=String.fromCharCode(ti);for(var Cn=1;Cn<=12;Cn++)gr[Cn+111]=gr[Cn+63235]="F"+Cn;var ar={};ar.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"},ar.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"},ar.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"},ar.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"]},ar.default=O?ar.macDefault:ar.pcDefault;function Nu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,l=0;l<t.length-1;l++){var o=t[l];if(/^(cmd|meta|m)$/i.test(o))a=!0;else if(/^a(lt)?$/i.test(o))n=!0;else if(/^(c|ctrl|control)$/i.test(o))r=!0;else if(/^s(hift)?$/i.test(o))i=!0;else throw new Error("Unrecognized modifier name: "+o)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Iu(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=yt(n.split(" "),Nu),a=0;a<i.length;a++){var l=void 0,o=void 0;a==i.length-1?(o=i.join(" "),l=r):(o=i.slice(0,a+1).join(" "),l="...");var u=t[o];if(!u)t[o]=l;else if(u!=l)throw new Error("Inconsistent bindings for "+o)}delete e[n]}for(var f in t)e[f]=t[f];return e}function Kr(e,t,n,r){t=ri(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 Kr(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var l=Kr(e,t.fallthrough[a],n,r);if(l)return l}}}function zl(e){var t=typeof e=="string"?e:gr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Rl(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(se?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(se?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Pl(e,t){if(j&&e.keyCode==34&&e.char)return!1;var n=gr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Rl(n,e,t))}function ri(e){return typeof e=="string"?ar[e]:e}function Xr(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&Me(a.from,Pe(r).to)<=0;){var l=r.pop();if(Me(l.from,a.from)<0){a.from=l.from;break}}r.push(a)}Ot(e,function(){for(var o=r.length-1;o>=0;o--)qr(e.doc,"",r[o].from,r[o].to,"+delete");Rr(e)})}function Zi(e,t,n){var r=P(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qi(e,t,n){var r=Zi(e,t.ch,n);return r==null?null:new V(t.line,r,n<0?"after":"before")}function Ji(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=C(n,t.doc.direction);if(a){var l=i<0?Pe(a):a[0],o=i<0==(l.level==1),u=o?"after":"before",f;if(l.level>0||t.doc.direction=="rtl"){var g=Or(t,n);f=i<0?n.text.length-1:0;var m=Jt(t,g,f).top;f=A(function(L){return Jt(t,g,L).top==m},i<0==(l.level==1)?l.from:l.to-1,f),u=="before"&&(f=Zi(n,f,1))}else f=i<0?l.to:l.from;return new V(r,f,u)}}return new V(r,i<0?n.text.length:0,i<0?"before":"after")}function Ou(e,t,n,r){var i=C(t,e.doc.direction);if(!i)return Qi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=p(i,n.ch,n.sticky),l=i[a];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return Qi(t,n,r);var o=function(ce,de){return Zi(t,ce instanceof V?ce.ch:ce,de)},u,f=function(ce){return e.options.lineWrapping?(u=u||Or(e,t),Ga(e,t,u,ce)):{begin:0,end:t.text.length}},g=f(n.sticky=="before"?o(n,-1):n.ch);if(e.doc.direction=="rtl"||l.level==1){var m=l.level==1==r<0,L=o(n,m?1:-1);if(L!=null&&(m?L<=l.to&&L<=g.end:L>=l.from&&L>=g.begin)){var k=m?"before":"after";return new V(n.line,L,k)}}var W=function(ce,de,he){for(var me=function(Qe,mt){return mt?new V(n.line,o(Qe,1),"before"):new V(n.line,Qe,"after")};ce>=0&&ce<i.length;ce+=de){var Ee=i[ce],Fe=de>0==(Ee.level!=1),He=Fe?he.begin:o(he.end,-1);if(Ee.from<=He&&He<Ee.to||(He=Fe?Ee.from:o(Ee.to,-1),he.begin<=He&&He<he.end))return me(He,Fe)}},K=W(a+r,r,g);if(K)return K;var re=r>0?g.end:o(g.begin,-1);return re!=null&&!(r>0&&re==t.text.length)&&(K=W(r>0?0:i.length-1,r,f(re)),K)?K:null}var wn={selectAll:kl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ke)},killLine:function(e){return Xr(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:V(t.head.line+1,0)}:{from:t.head,to:V(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xr(e,function(t){return{from:V(t.from().line,0),to:Ne(e.doc,V(t.to().line+1,0))}})},delLineLeft:function(e){return Xr(e,function(t){return{from:V(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Xr(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 Xr(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(V(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(V(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Wl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ul(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Hu(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")},je)},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")},je)},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/)?Ul(e,t.head):r},je)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),l=Ie(e.getLine(a.line),a.ch,r);t.push(Wt(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ot(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(!!t[r].empty()){var i=t[r].head,a=Se(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new V(i.line,i.ch-1)),i.ch>0)i=new V(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),V(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Se(e.doc,i.line-1).text;l&&(i=new V(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),V(i.line-1,l.length-1),i,"+transpose"))}}n.push(new Xe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ot(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 Wl(e,t){var n=Se(e.doc,t),r=qt(n);return r!=n&&(t=Ye(r)),Ji(!0,e,r,t,1)}function Hu(e,t){var n=Se(e.doc,t),r=yo(n);return r!=n&&(t=Ye(r)),Ji(!0,e,n,t,-1)}function Ul(e,t){var n=Wl(e,t.line),r=Se(e.doc,n.line),i=C(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=a&&t.ch;return V(n.line,l?0:a,n.sticky)}return n}function ni(e,t,n){if(typeof t=="string"&&(t=wn[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)!=at}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function _u(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Kr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Kr(t,e.options.extraKeys,n,e)||Kr(t,e.options.keyMap,n,e)}var zu=new Ae;function kn(e,t,n,r){var i=e.state.keySeq;if(i){if(zl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:zu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),jl(e,i+" "+t,n,r))return!0}return jl(e,t,n,r)}function jl(e,t,n,r){var i=_u(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&pt(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ve(n),Ni(e)),!!i}function ql(e,t){var n=Pl(t,!0);return n?t.shiftKey&&!e.state.keySeq?kn(e,"Shift-"+n,t,function(r){return ni(e,r,!0)})||kn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ni(e,r)}):kn(e,n,t,function(r){return ni(e,r)}):!1}function Ru(e,t,n){return kn(e,"'"+n+"'",t,function(r){return ni(e,r,!0)})}var $i=null;function Gl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=J(et(t)),!te(t,e))){w&&S<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=ql(t,e);j&&($i=r?n:null,!r&&n==88&&!ui&&(O?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),q&&!O&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Pu(t)}}function Pu(e){var t=e.display.lineDiv;ke(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(ze(t,"CodeMirror-crosshair"),F(document,"keyup",n),F(document,"mouseover",n))}D(document,"keyup",n),D(document,"mouseover",n)}function Kl(e){e.keyCode==16&&(this.doc.sel.shift=!1),te(this,e)}function Xl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(nr(t.display,e)||te(t,e)||e.ctrlKey&&!e.altKey||O&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(j&&n==$i){$i=null,ve(e);return}if(!(j&&(!e.which||e.which<10)&&ql(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(Ru(t,e,i)||t.display.input.onKeyPress(e))}}}var Wu=400,Vi=function(e,t,n){this.time=e,this.pos=t,this.button=n};Vi.prototype.compare=function(e,t,n){return this.time+Wu>e&&Me(t,this.pos)==0&&n==this.button};var Sn,Fn;function Uu(e,t){var n=+new Date;return Fn&&Fn.compare(n,e,t)?(Sn=Fn=null,"triple"):Sn&&Sn.compare(n,e,t)?(Fn=new Vi(n,e,t),Sn=null,"double"):(Sn=new Vi(n,e,t),Fn=null,"single")}function Yl(e){var t=this,n=t.display;if(!(te(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,nr(n,e)){B||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!ea(t,e)){var r=Cr(t,e),i=lt(e),a=r?Uu(r,i):"single";v(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ju(t,i,r,a,e))&&(i==1?r?Gu(t,r,a,e):Ge(e)==n.scroller&&ve(e):i==2?(r&&Jn(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(oe?t.display.input.onContextMenu(e):Ii(t)))}}}function ju(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,kn(e,Rl(a,i),i,function(l){if(typeof l=="string"&&(l=wn[l]),!l)return!1;var o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),o=l(e,n)!=at}finally{e.state.suppressEdits=!1}return o})}function qu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=ee?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=O?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(O?n.altKey:n.ctrlKey)),i}function Gu(e,t,n,r){w?setTimeout(c(Za,e),0):e.curOp.focus=J(et(e));var i=qu(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&ht&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(Me((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(Me(l.to(),t)>0||t.xRel<0)?Ku(e,r,t,i):Xu(e,r,t,i)}function Ku(e,t,n,r){var i=e.display,a=!1,l=gt(e,function(f){B&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ii(e)),F(i.wrapper.ownerDocument,"mouseup",l),F(i.wrapper.ownerDocument,"mousemove",o),F(i.scroller,"dragstart",u),F(i.scroller,"drop",l),a||(ve(f),r.addNew||Jn(e.doc,n,null,null,r.extend),B&&!fe||w&&S==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),o=function(f){a=a||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},u=function(){return a=!0};B&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,D(i.wrapper.ownerDocument,"mouseup",l),D(i.wrapper.ownerDocument,"mousemove",o),D(i.scroller,"dragstart",u),D(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Zl(e,t,n){if(n=="char")return new Xe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Xe(V(t.line,0),Ne(e.doc,V(t.line+1,0)));var r=n(e,t);return new Xe(r.from,r.to)}function Xu(e,t,n,r){w&&Ii(e);var i=e.display,a=e.doc;ve(t);var l,o,u=a.sel,f=u.ranges;if(r.addNew&&!r.extend?(o=a.sel.contains(n),o>-1?l=f[o]:l=new Xe(n,n)):(l=a.sel.primary(),o=a.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Xe(n,n)),n=Cr(e,t,!0,!0),o=-1;else{var g=Zl(e,n,r.unit);r.extend?l=Xi(l,g.anchor,g.head,r.extend):l=g}r.addNew?o==-1?(o=f.length,kt(a,Kt(e,f.concat([l]),o),{scroll:!1,origin:"*mouse"})):f.length>1&&f[o].empty()&&r.unit=="char"&&!r.extend?(kt(a,Kt(e,f.slice(0,o).concat(f.slice(o+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Yi(a,o,l,we):(o=0,kt(a,new zt([l],0),we),u=a.sel);var m=n;function L(he){if(Me(m,he)!=0)if(m=he,r.unit=="rectangle"){for(var me=[],Ee=e.options.tabSize,Fe=Ie(Se(a,n.line).text,n.ch,Ee),He=Ie(Se(a,he.line).text,he.ch,Ee),Qe=Math.min(Fe,He),mt=Math.max(Fe,He),tt=Math.min(n.line,he.line),Ht=Math.min(e.lastLine(),Math.max(n.line,he.line));tt<=Ht;tt++){var Bt=Se(a,tt).text,ut=Je(Bt,Qe,Ee);Qe==mt?me.push(new Xe(V(tt,ut),V(tt,ut))):Bt.length>ut&&me.push(new Xe(V(tt,ut),V(tt,Je(Bt,mt,Ee))))}me.length||me.push(new Xe(n,n)),kt(a,Kt(e,u.ranges.slice(0,o).concat(me),o),{origin:"*mouse",scroll:!1}),e.scrollIntoView(he)}else{var Mt=l,Ct=Zl(e,he,r.unit),dt=Mt.anchor,st;Me(Ct.anchor,dt)>0?(st=Ct.head,dt=Bn(Mt.from(),Ct.anchor)):(st=Ct.anchor,dt=Tn(Mt.to(),Ct.head));var nt=u.ranges.slice(0);nt[o]=Yu(e,new Xe(Ne(a,dt),st)),kt(a,Kt(e,nt,o),we)}}var k=i.wrapper.getBoundingClientRect(),W=0;function K(he){var me=++W,Ee=Cr(e,he,!0,r.unit=="rectangle");if(!!Ee)if(Me(Ee,m)!=0){e.curOp.focus=J(et(e)),L(Ee);var Fe=Gn(i,a);(Ee.line>=Fe.to||Ee.line<Fe.from)&&setTimeout(gt(e,function(){W==me&&K(he)}),150)}else{var He=he.clientY<k.top?-20:he.clientY>k.bottom?20:0;He&&setTimeout(gt(e,function(){W==me&&(i.scroller.scrollTop+=He,K(he))}),50)}}function re(he){e.state.selectingText=!1,W=1/0,he&&(ve(he),i.input.focus()),F(i.wrapper.ownerDocument,"mousemove",ce),F(i.wrapper.ownerDocument,"mouseup",de),a.history.lastSelOrigin=null}var ce=gt(e,function(he){he.buttons===0||!lt(he)?re(he):K(he)}),de=gt(e,re);e.state.selectingText=de,D(i.wrapper.ownerDocument,"mousemove",ce),D(i.wrapper.ownerDocument,"mouseup",de)}function Yu(e,t){var n=t.anchor,r=t.head,i=Se(e.doc,n.line);if(Me(n,r)==0&&n.sticky==r.sticky)return t;var a=C(i);if(!a)return t;var l=p(a,n.ch,n.sticky),o=a[l];if(o.from!=n.ch&&o.to!=n.ch)return t;var u=l+(o.from==n.ch==(o.level!=1)?0:1);if(u==0||u==a.length)return t;var f;if(r.line!=n.line)f=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var g=p(a,r.ch,r.sticky),m=g-l||(r.ch-n.ch)*(o.level==1?-1:1);g==u-1||g==u?f=m<0:f=m>0}var L=a[u+(f?-1:0)],k=f==(L.level==1),W=k?L.from:L.to,K=k?"after":"before";return n.ch==W&&n.sticky==K?t:new Xe(new V(n.line,W,K),r)}function Ql(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(L){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ve(t);var l=e.display,o=l.lineDiv.getBoundingClientRect();if(a>o.bottom||!Te(e,n))return Ue(t);a-=o.top-l.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var f=l.gutters.childNodes[u];if(f&&f.getBoundingClientRect().right>=i){var g=yr(e.doc,a),m=e.display.gutterSpecs[u];return H(e,n,e,g,m.className,t),Ue(t)}}}function ea(e,t){return Ql(e,t,"gutterClick",!0)}function Jl(e,t){nr(e.display,t)||Zu(e,t)||te(e,t,"contextmenu")||oe||e.display.input.onContextMenu(t)}function Zu(e,t){return Te(e,"gutterContextMenu")?Ql(e,t,"gutterContextMenu",!1):!1}function $l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ln(e)}var Yr={toString:function(){return"CodeMirror.Init"}},Vl={},ii={};function Qu(e){var t=e.optionHandlers;function n(r,i,a,l){e.defaults[r]=i,a&&(t[r]=l?function(o,u,f){f!=Yr&&a(o,u,f)}:a)}e.defineOption=n,e.Init=Yr,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,qi(r)},!0),n("indentUnit",2,qi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){pn(r),ln(r),Lt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],l=r.doc.first;r.doc.iter(function(u){for(var f=0;;){var g=u.text.indexOf(i,f);if(g==-1)break;f=g+i.length,a.push(V(l,g))}l++});for(var o=a.length-1;o>=0;o--)qr(r.doc,i,a[o],V(a[o].line,a[o].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,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Yr&&r.refresh()}),n("specialCharPlaceholder",So,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",!ne),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){$l(r),dn(r)},!0),n("keyMap","default",function(r,i,a){var l=ri(i),o=a!=Yr&&ri(a);o&&o.detach&&o.detach(r,l),l.attach&&l.attach(r,o||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,$u,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ui(i,r.options.lineNumbers),dn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ti(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Pr(r)},!0),n("scrollbarStyle","native",function(r){tl(r),Pr(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=Ui(r.options.gutters,i),dn(r)},!0),n("firstLineNumber",1,dn,!0),n("lineNumberFormatter",function(r){return r},dn,!0),n("showCursorWhenSelecting",!1,on,!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,Ju),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,on,!0),n("singleCursorHeightPerLine",!0,on,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,pn,!0),n("addModeClass",!1,pn,!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,pn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Ju(e,t,n){var r=n&&n!=Yr;if(!t!=!r){var i=e.display.dragFunctions,a=t?D:F;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function $u(e){e.options.lineWrapping?(ke(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ze(e.display.wrapper,"CodeMirror-wrap"),Di(e)),Bi(e),Lt(e),ln(e),setTimeout(function(){return Pr(e)},100)}function Ve(e,t){var n=this;if(!(this instanceof Ve))return new Ve(e,t);this.options=t=t?De(t):{},De(Vl,t,!1);var r=t.value;typeof r=="string"?r=new Tt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ve.inputStyles[t.inputStyle](this),a=this.display=new cu(e,r,i,t);a.wrapper.CodeMirror=this,$l(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),tl(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 Ae,keySeq:null,specialChars:null},t.autofocus&&!U&&a.input.focus(),w&&S<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vu(this),Tu(),Fr(this),this.curOp.forceUpdate=!0,cl(this,r),t.autofocus&&!U||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Oi(n)},20):zr(this);for(var l in ii)ii.hasOwnProperty(l)&&ii[l](this,t[l],Yr);il(this),t.finishInit&&t.finishInit(this);for(var o=0;o<ta.length;++o)ta[o](this);Ar(this),B&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Ve.defaults=Vl,Ve.optionHandlers=ii;function Vu(e){var t=e.display;D(t.scroller,"mousedown",gt(e,Yl)),w&&S<11?D(t.scroller,"dblclick",gt(e,function(u){if(!te(e,u)){var f=Cr(e,u);if(!(!f||ea(e,u)||nr(e.display,u))){ve(u);var g=e.findWordAt(f);Jn(e.doc,g.anchor,g.head)}}})):D(t.scroller,"dblclick",function(u){return te(e,u)||ve(u)}),D(t.scroller,"contextmenu",function(u){return Jl(e,u)}),D(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||Jl(e,u)});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 a(u){if(u.touches.length!=1)return!1;var f=u.touches[0];return f.radiusX<=1&&f.radiusY<=1}function l(u,f){if(f.left==null)return!0;var g=f.left-u.left,m=f.top-u.top;return g*g+m*m>20*20}D(t.scroller,"touchstart",function(u){if(!te(e,u)&&!a(u)&&!ea(e,u)){t.input.ensurePolled(),clearTimeout(n);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),D(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),D(t.scroller,"touchend",function(u){var f=t.activeTouch;if(f&&!nr(t,u)&&f.left!=null&&!f.moved&&new Date-f.start<300){var g=e.coordsChar(t.activeTouch,"page"),m;!f.prev||l(f,f.prev)?m=new Xe(g,g):!f.prev.prev||l(f,f.prev.prev)?m=e.findWordAt(g):m=new Xe(V(g.line,0),Ne(e.doc,V(g.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),ve(u)}i()}),D(t.scroller,"touchcancel",i),D(t.scroller,"scroll",function(){t.scroller.clientHeight&&(sn(e,t.scroller.scrollTop),kr(e,t.scroller.scrollLeft,!0),H(e,"scroll",e))}),D(t.scroller,"mousewheel",function(u){return ol(e,u)}),D(t.scroller,"DOMMouseScroll",function(u){return ol(e,u)}),D(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){te(e,u)||Oe(u)},over:function(u){te(e,u)||(Lu(e,u),Oe(u))},start:function(u){return Eu(e,u)},drop:gt(e,Au),leave:function(u){te(e,u)||Ol(e)}};var o=t.input.getField();D(o,"keyup",function(u){return Kl.call(e,u)}),D(o,"keydown",gt(e,Gl)),D(o,"keypress",gt(e,Xl)),D(o,"focus",function(u){return Oi(e,u)}),D(o,"blur",function(u){return zr(e,u)})}var ta=[];Ve.defineInitHook=function(e){return ta.push(e)};function An(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=en(e,t).state:n="prev");var l=e.options.tabSize,o=Se(i,t),u=Ie(o.text,null,l);o.stateAfter&&(o.stateAfter=null);var f=o.text.match(/^\s*/)[0],g;if(!r&&!/\S/.test(o.text))g=0,n="not";else if(n=="smart"&&(g=i.mode.indent(a,o.text.slice(f.length),o.text),g==at||g>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?g=Ie(Se(i,t-1).text,null,l):g=0:n=="add"?g=u+e.options.indentUnit:n=="subtract"?g=u-e.options.indentUnit:typeof n=="number"&&(g=u+n),g=Math.max(0,g);var m="",L=0;if(e.options.indentWithTabs)for(var k=Math.floor(g/l);k;--k)L+=l,m+=" ";if(L<g&&(m+=Wt(g-L)),m!=f)return qr(i,m,V(t,0),V(t,f.length),"+input"),o.stateAfter=null,!0;for(var W=0;W<i.sel.ranges.length;W++){var K=i.sel.ranges[W];if(K.head.line==t&&K.head.ch<f.length){var re=V(t,f.length);Yi(i,W,new Xe(re,re));break}}}var Xt=null;function ai(e){Xt=e}function ra(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var l=+new Date-200,o=i=="paste"||e.state.pasteIncoming>l,u=Br(t),f=null;if(o&&r.ranges.length>1)if(Xt&&Xt.text.join(`
|
|
`)==t){if(r.ranges.length%Xt.text.length==0){f=[];for(var g=0;g<Xt.text.length;g++)f.push(a.splitLines(Xt.text[g]))}}else u.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=yt(u,function(ce){return[ce]}));for(var m=e.curOp.updateInput,L=r.ranges.length-1;L>=0;L--){var k=r.ranges[L],W=k.from(),K=k.to();k.empty()&&(n&&n>0?W=V(W.line,W.ch-n):e.state.overwrite&&!o?K=V(K.line,Math.min(Se(a,K.line).text.length,K.ch+Pe(u).length)):o&&Xt&&Xt.lineWise&&Xt.text.join(`
|
|
`)==u.join(`
|
|
`)&&(W=K=V(W.line,0)));var re={from:W,to:K,text:f?f[L%f.length]:u,origin:i||(o?"paste":e.state.cutIncoming>l?"cut":"+input")};jr(e.doc,re),pt(e,"inputRead",e,re)}t&&!o&&to(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function eo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Ot(t,function(){return ra(t,n,0,null,"paste")}),!0}function to(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var o=0;o<a.electricChars.length;o++)if(t.indexOf(a.electricChars.charAt(o))>-1){l=An(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=An(e,i.head.line,"smart"));l&&pt(e,"electricInput",e,i.head.line)}}}function ro(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:V(i,0),head:V(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function no(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function io(){var e=Z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=Z("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return B?e.style.width="1000px":e.setAttribute("wrap","off"),ge&&(e.style.border="1px solid black"),no(e),t}function es(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){v(this).focus(),this.display.input.focus()},setOption:function(r,i){var a=this.options,l=a[r];a[r]==i&&r!="mode"||(a[r]=i,t.hasOwnProperty(r)&>(this,t[r])(this,i,l),H(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"](ri(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==r||i[a].name==r)return i.splice(a,1),!0},addOverlay:Ft(function(r,i){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");_t(this.state.overlays,{mode:a,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,Lt(this)}),removeOverlay:Ft(function(r){for(var i=this.state.overlays,a=0;a<i.length;++a){var l=i[a].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(a,1),this.state.modeGen++,Lt(this);return}}}),indentLine:Ft(function(r,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Vr(this.doc,r)&&An(this,r,i,a)}),indentSelection:Ft(function(r){for(var i=this.doc.sel.ranges,a=-1,l=0;l<i.length;l++){var o=i[l];if(o.empty())o.head.line>a&&(An(this,o.head.line,r,!0),a=o.head.line,l==this.doc.sel.primIndex&&Rr(this));else{var u=o.from(),f=o.to(),g=Math.max(a,u.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var m=g;m<a;++m)An(this,m,r);var L=this.doc.sel.ranges;u.ch==0&&i.length==L.length&&L[l].from().ch>0&&Yi(this.doc,l,new Xe(u,L[l].to()),Ke)}}}),getTokenAt:function(r,i){return da(this,r,i)},getLineTokens:function(r,i){return da(this,V(r),i,!0)},getTokenTypeAt:function(r){r=Ne(this.doc,r);var i=fa(this,Se(this.doc,r.line)),a=0,l=(i.length-1)/2,o=r.ch,u;if(o==0)u=i[2];else for(;;){var f=a+l>>1;if((f?i[f*2-1]:0)>=o)l=f;else if(i[f*2+1]<o)a=f+1;else{u=i[f*2+2];break}}var g=u?u.indexOf("overlay "):-1;return g<0?u:g==0?null:u.slice(0,g-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 a=[];if(!n.hasOwnProperty(i))return a;var l=n[i],o=this.getModeAt(r);if(typeof o[i]=="string")l[o[i]]&&a.push(l[o[i]]);else if(o[i])for(var u=0;u<o[i].length;u++){var f=l[o[i][u]];f&&a.push(f)}else o.helperType&&l[o.helperType]?a.push(l[o.helperType]):l[o.name]&&a.push(l[o.name]);for(var g=0;g<l._global.length;g++){var m=l._global[g];m.pred(o,this)&&We(a,m.val)==-1&&a.push(m.val)}return a},getStateAfter:function(r,i){var a=this.doc;return r=oa(a,r==null?a.first+a.size-1:r),en(this,r+1,i).state},cursorCoords:function(r,i){var a,l=this.doc.sel.primary();return r==null?a=l.head:typeof r=="object"?a=Ne(this.doc,r):a=r?l.from():l.to(),Gt(this,a,i||"page")},charCoords:function(r,i){return Wn(this,Ne(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Ua(this,r,i||"page"),Ai(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Ua(this,{top:r,left:0},i||"page").top,yr(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,a){var l=!1,o;if(typeof r=="number"){var u=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>u&&(r=u,l=!0),o=Se(this.doc,r)}else o=r;return Pn(this,o,{top:0,left:0},i||"page",a||l).top+(l?this.doc.height-rr(o):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return _r(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,l,o){var u=this.display;r=Gt(this,Ne(this.doc,r));var f=r.bottom,g=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),l=="over")f=r.top;else if(l=="above"||l=="near"){var m=Math.max(u.wrapper.clientHeight,this.doc.height),L=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>m)&&r.top>i.offsetHeight?f=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=m&&(f=r.bottom),g+i.offsetWidth>L&&(g=L-i.offsetWidth)}i.style.top=f+"px",i.style.left=i.style.right="",o=="right"?(g=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(o=="left"?g=0:o=="middle"&&(g=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=g+"px"),a&&Jo(this,{left:g,top:f,right:g+i.offsetWidth,bottom:f+i.offsetHeight})},triggerOnKeyDown:Ft(Gl),triggerOnKeyPress:Ft(Xl),triggerOnKeyUp:Kl,triggerOnMouseDown:Ft(Yl),execCommand:function(r){if(wn.hasOwnProperty(r))return wn[r].call(null,this)},triggerElectric:Ft(function(r){to(this,r)}),findPosH:function(r,i,a,l){var o=1;i<0&&(o=-1,i=-i);for(var u=Ne(this.doc,r),f=0;f<i&&(u=na(this.doc,u,o,a,l),!u.hitSide);++f);return u},moveH:Ft(function(r,i){var a=this;this.extendSelectionsBy(function(l){return a.display.shift||a.doc.extend||l.empty()?na(a.doc,l.head,r,i,a.options.rtlMoveVisually):r<0?l.from():l.to()},je)}),deleteH:Ft(function(r,i){var a=this.doc.sel,l=this.doc;a.somethingSelected()?l.replaceSelection("",null,"+delete"):Xr(this,function(o){var u=na(l,o.head,r,i,!1);return r<0?{from:u,to:o.head}:{from:o.head,to:u}})}),findPosV:function(r,i,a,l){var o=1,u=l;i<0&&(o=-1,i=-i);for(var f=Ne(this.doc,r),g=0;g<i;++g){var m=Gt(this,f,"div");if(u==null?u=m.left:m.left=u,f=ao(this,m,o,a),f.hitSide)break}return f},moveV:Ft(function(r,i){var a=this,l=this.doc,o=[],u=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(g){if(u)return r<0?g.from():g.to();var m=Gt(a,g.head,"div");g.goalColumn!=null&&(m.left=g.goalColumn),o.push(m.left);var L=ao(a,m,r,i);return i=="page"&&g==l.sel.primary()&&_i(a,Wn(a,L,"div").top-m.top),L},je),o.length)for(var f=0;f<l.sel.ranges.length;f++)l.sel.ranges[f].goalColumn=o[f]}),findWordAt:function(r){var i=this.doc,a=Se(i,r.line).text,l=r.ch,o=r.ch;if(a){var u=this.getHelper(r,"wordChars");(r.sticky=="before"||o==a.length)&&l?--l:++o;for(var f=a.charAt(l),g=h(f,u)?function(m){return h(m,u)}:/\s/.test(f)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!h(m)};l>0&&g(a.charAt(l-1));)--l;for(;o<a.length&&g(a.charAt(o));)++o}return new Xe(V(r.line,l),V(r.line,o))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ke(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),H(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==J(et(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ft(function(r,i){un(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:wi(this),clientWidth:Dr(this)}},scrollIntoView:Ft(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:V(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?$o(this,r):Ja(this,r.from,r.to,r.margin)}),setSize:Ft(function(r,i){var a=this,l=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};r!=null&&(this.display.wrapper.style.width=l(r)),i!=null&&(this.display.wrapper.style.height=l(i)),this.options.lineWrapping&&Ra(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(u){if(u.widgets){for(var f=0;f<u.widgets.length;f++)if(u.widgets[f].noHScroll){sr(a,o,"widget");break}}++o}),this.curOp.forceUpdate=!0,H(this,"refresh",this)}),operation:function(r){return Ot(this,r)},startOperation:function(){return Fr(this)},endOperation:function(){return Ar(this)},refresh:Ft(function(){var r=this.display.cachedTextHeight;Lt(this),this.curOp.forceUpdate=!0,ln(this),un(this,this.doc.scrollLeft,this.doc.scrollTop),Pi(this.display),(r==null||Math.abs(r-Hr(this.display))>.5||this.options.lineWrapping)&&Bi(this),H(this,"refresh",this)}),swapDoc:Ft(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),cl(this,r),ln(this),this.display.input.reset(),un(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,pt(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}},Be(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,l){e.registerHelper(r,i,l),n[r]._global.push({pred:a,val:l})}}function na(e,t,n,r,i){var a=t,l=n,o=Se(e,t.line),u=i&&e.direction=="rtl"?-n:n;function f(){var de=t.line+u;return de<e.first||de>=e.first+e.size?!1:(t=new V(de,t.ch,t.sticky),o=Se(e,de))}function g(de){var he;if(r=="codepoint"){var me=o.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(me))he=null;else{var Ee=n>0?me>=55296&&me<56320:me>=56320&&me<57343;he=new V(t.line,Math.max(0,Math.min(o.text.length,t.ch+n*(Ee?2:1))),-n)}}else i?he=Ou(e.cm,o,t,n):he=Qi(o,t,n);if(he==null)if(!de&&f())t=Ji(i,e.cm,o,t.line,u);else return!1;else t=he;return!0}if(r=="char"||r=="codepoint")g();else if(r=="column")g(!0);else if(r=="word"||r=="group")for(var m=null,L=r=="group",k=e.cm&&e.cm.getHelper(t,"wordChars"),W=!0;!(n<0&&!g(!W));W=!1){var K=o.text.charAt(t.ch)||`
|
|
`,re=h(K,k)?"w":L&&K==`
|
|
`?"n":!L||/\s/.test(K)?null:"p";if(L&&!W&&!re&&(re="s"),m&&m!=re){n<0&&(n=1,g(),t.sticky="after");break}if(re&&(m=re),n>0&&!g(!W))break}var ce=Vn(e,t,a,l,!0);return hi(a,ce)&&(ce.hitSide=!0),ce}function ao(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var o=Math.min(e.display.wrapper.clientHeight,v(e).innerHeight||i(e).documentElement.clientHeight),u=Math.max(o-.5*Hr(e.display),3);l=(n>0?t.bottom:t.top)+n*u}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var f;f=Ai(e,a,l),!!f.outside;){if(n<0?l<=0:l>=i.height){f.hitSide=!0;break}l+=n*5}return f}var Ze=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ze.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,no(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(o){for(var u=o.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}D(i,"paste",function(o){!a(o)||te(r,o)||eo(o,r)||S<=11&&setTimeout(gt(r,function(){return t.updateFromDOM()}),20)}),D(i,"compositionstart",function(o){t.composing={data:o.data,done:!1}}),D(i,"compositionupdate",function(o){t.composing||(t.composing={data:o.data,done:!1})}),D(i,"compositionend",function(o){t.composing&&(o.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),D(i,"touchstart",function(){return n.forceCompositionEnd()}),D(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(o){if(!(!a(o)||te(r,o))){if(r.somethingSelected())ai({lineWise:!1,text:r.getSelections()}),o.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var u=ro(r);ai({lineWise:!0,text:u.text}),o.type=="cut"&&r.operation(function(){r.setSelections(u.ranges,0,Ke),r.replaceSelection("",null,"cut")})}else return;if(o.clipboardData){o.clipboardData.clearData();var f=Xt.text.join(`
|
|
`);if(o.clipboardData.setData("Text",f),o.clipboardData.getData("Text")==f){o.preventDefault();return}}var g=io(),m=g.firstChild;r.display.lineSpace.insertBefore(g,r.display.lineSpace.firstChild),m.value=Xt.text.join(`
|
|
`);var L=J(i.ownerDocument);ct(m),setTimeout(function(){r.display.lineSpace.removeChild(g),L.focus(),L==i&&n.showPrimarySelection()},50)}}D(i,"copy",l),D(i,"cut",l)},Ze.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ze.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=J(this.div.ownerDocument)==this.div,e},Ze.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ze.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ze.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 a=li(t,e.anchorNode,e.anchorOffset),l=li(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&l&&!l.bad&&Me(Bn(a,l),r)==0&&Me(Tn(a,l),i)==0)){var o=t.display.view,u=r.line>=t.display.viewFrom&&lo(t,r)||{node:o[0].measure.map[2],offset:0},f=i.line<t.display.viewTo&&lo(t,i);if(!f){var g=o[o.length-1].measure,m=g.maps?g.maps[g.maps.length-1]:g.map;f={node:m[m.length-1],offset:m[m.length-2]-m[m.length-3]}}if(!u||!f){e.removeAllRanges();return}var L=e.rangeCount&&e.getRangeAt(0),k;try{k=R(u.node,u.offset,f.offset,f.node)}catch(W){}k&&(!q&&t.state.focused?(e.collapse(u.node,u.offset),k.collapsed||(e.removeAllRanges(),e.addRange(k))):(e.removeAllRanges(),e.addRange(k)),L&&e.anchorNode==null?e.addRange(L):q&&this.startGracePeriod()),this.rememberSelection()}},Ze.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)},Ze.prototype.showMultipleSelections=function(e){Le(this.cm.display.cursorDiv,e.cursors),Le(this.cm.display.selectionDiv,e.selection)},Ze.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ze.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return le(this.div,t)},Ze.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||J(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ze.prototype.blur=function(){this.div.blur()},Ze.prototype.getField=function(){return this.div},Ze.prototype.supportsTouch=function(){return!0},Ze.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ot(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)},Ze.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ze.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(be&&$&&this.cm.display.gutterSpecs.length&&ts(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=li(t,e.anchorNode,e.anchorOffset),r=li(t,e.focusNode,e.focusOffset);n&&r&&Ot(t,function(){kt(t.doc,cr(n,r),Ke),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ze.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=V(r.line-1,Se(e.doc,r.line-1).length)),i.ch==Se(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=V(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,l,o;r.line==t.viewFrom||(a=wr(e,r.line))==0?(l=Ye(t.view[0].line),o=t.view[0].node):(l=Ye(t.view[a].line),o=t.view[a-1].node.nextSibling);var u=wr(e,i.line),f,g;if(u==t.view.length-1?(f=t.viewTo-1,g=t.lineDiv.lastChild):(f=Ye(t.view[u+1].line)-1,g=t.view[u+1].node.previousSibling),!o)return!1;for(var m=e.doc.splitLines(rs(e,o,g,l,f)),L=xr(e.doc,V(l,0),V(f,Se(e.doc,f).text.length));m.length>1&&L.length>1;)if(Pe(m)==Pe(L))m.pop(),L.pop(),f--;else if(m[0]==L[0])m.shift(),L.shift(),l++;else break;for(var k=0,W=0,K=m[0],re=L[0],ce=Math.min(K.length,re.length);k<ce&&K.charCodeAt(k)==re.charCodeAt(k);)++k;for(var de=Pe(m),he=Pe(L),me=Math.min(de.length-(m.length==1?k:0),he.length-(L.length==1?k:0));W<me&&de.charCodeAt(de.length-W-1)==he.charCodeAt(he.length-W-1);)++W;if(m.length==1&&L.length==1&&l==r.line)for(;k&&k>r.ch&&de.charCodeAt(de.length-W-1)==he.charCodeAt(he.length-W-1);)k--,W++;m[m.length-1]=de.slice(0,de.length-W).replace(/^\u200b+/,""),m[0]=m[0].slice(k).replace(/\u200b+$/,"");var Ee=V(l,k),Fe=V(f,L.length?Pe(L).length-W:0);if(m.length>1||m[0]||Me(Ee,Fe))return qr(e.doc,m,Ee,Fe,"+input"),!0},Ze.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ze.prototype.reset=function(){this.forceCompositionEnd()},Ze.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ze.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))},Ze.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ot(this.cm,function(){return Lt(e.cm)})},Ze.prototype.setUneditable=function(e){e.contentEditable="false"},Ze.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||gt(this.cm,ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ze.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ze.prototype.onContextMenu=function(){},Ze.prototype.resetPosition=function(){},Ze.prototype.needsContentAttribute=!0;function lo(e,t){var n=ki(e,t.line);if(!n||n.hidden)return null;var r=Se(e.doc,t.line),i=Ia(n,r,t.line),a=C(r,e.doc.direction),l="left";if(a){var o=p(a,t.ch);l=o%2?"right":"left"}var u=_a(i.map,t.ch,l);return u.offset=u.collapse=="right"?u.end:u.start,u}function ts(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Zr(e,t){return t&&(e.bad=!0),e}function rs(e,t,n,r,i){var a="",l=!1,o=e.doc.lineSeparator(),u=!1;function f(k){return function(W){return W.id==k}}function g(){l&&(a+=o,u&&(a+=o),l=u=!1)}function m(k){k&&(g(),a+=k)}function L(k){if(k.nodeType==1){var W=k.getAttribute("cm-text");if(W){m(W);return}var K=k.getAttribute("cm-marker"),re;if(K){var ce=e.findMarks(V(r,0),V(i+1,0),f(+K));ce.length&&(re=ce[0].find(0))&&m(xr(e.doc,re.from,re.to).join(o));return}if(k.getAttribute("contenteditable")=="false")return;var de=/^(pre|div|p|li|table|br)$/i.test(k.nodeName);if(!/^br$/i.test(k.nodeName)&&k.textContent.length==0)return;de&&g();for(var he=0;he<k.childNodes.length;he++)L(k.childNodes[he]);/^(pre|p)$/i.test(k.nodeName)&&(u=!0),de&&(l=!0)}else k.nodeType==3&&m(k.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;L(t),t!=n;)t=t.nextSibling,u=!1;return a}function li(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Zr(e.clipPos(V(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return ns(a,t,n)}}function ns(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!le(r,t))return Zr(V(Ye(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?Pe(e.rest):e.line;return Zr(V(Ye(a),a.text.length),i)}var l=t.nodeType==3?t:null,o=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,n&&(n=l.nodeValue.length));o.parentNode!=r;)o=o.parentNode;var u=e.measure,f=u.maps;function g(re,ce,de){for(var he=-1;he<(f?f.length:0);he++)for(var me=he<0?u.map:f[he],Ee=0;Ee<me.length;Ee+=3){var Fe=me[Ee+2];if(Fe==re||Fe==ce){var He=Ye(he<0?e.line:e.rest[he]),Qe=me[Ee]+de;return(de<0||Fe!=re)&&(Qe=me[Ee+(de?1:0)]),V(He,Qe)}}}var m=g(l,o,n);if(m)return Zr(m,i);for(var L=o.nextSibling,k=l?l.nodeValue.length-n:0;L;L=L.nextSibling){if(m=g(L,L.firstChild,0),m)return Zr(V(m.line,m.ch-k),i);k+=L.textContent.length}for(var W=o.previousSibling,K=n;W;W=W.previousSibling){if(m=g(W,W.firstChild,-1),m)return Zr(V(m.line,m.ch+K),i);K+=W.textContent.length}}var it=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ae,this.hasSelection=!1,this.composing=null,this.resetting=!1};it.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),ge&&(i.style.width="0px"),D(i,"input",function(){w&&S>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),D(i,"paste",function(l){te(r,l)||eo(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(l){if(!te(r,l)){if(r.somethingSelected())ai({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var o=ro(r);ai({lineWise:!0,text:o.text}),l.type=="cut"?r.setSelections(o.ranges,null,Ke):(n.prevInput="",i.value=o.text.join(`
|
|
`),ct(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}D(i,"cut",a),D(i,"copy",a),D(e.scroller,"paste",function(l){if(!(nr(e,l)||te(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var o=new Event("paste");o.clipboardData=l.clipboardData,i.dispatchEvent(o)}}),D(e.lineSpace,"selectstart",function(l){nr(e,l)||ve(l)}),D(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),D(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},it.prototype.createField=function(e){this.wrapper=io(),this.textarea=this.wrapper.firstChild},it.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},it.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=Gt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},it.prototype.showSelection=function(e){var t=this.cm,n=t.display;Le(n.cursorDiv,e.cursors),Le(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},it.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&&ct(this.textarea),w&&S>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",w&&S>=9&&(this.hasSelection=null));this.resetting=!1}},it.prototype.getField=function(){return this.textarea},it.prototype.supportsTouch=function(){return!1},it.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!U||J(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},it.prototype.blur=function(){this.textarea.blur()},it.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},it.prototype.receivedFocus=function(){this.slowPoll()},it.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},it.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)},it.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||En(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(w&&S>=9&&this.hasSelection===i||O&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,o=Math.min(r.length,i.length);l<o&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Ot(t,function(){ra(t,i.slice(l),r.length-l,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},it.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},it.prototype.onKeyPress=function(){w&&S>=9&&(this.hasSelection=null),this.fastPoll()},it.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Cr(n,e),l=r.scroller.scrollTop;if(!a||j)return;var o=n.options.resetSelectionOnContextMenu;o&&n.doc.sel.contains(a)==-1&>(n,kt)(n.doc,cr(a),Ke);var u=i.style.cssText,f=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+`px;
|
|
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;B&&(m=i.ownerDocument.defaultView.scrollY),r.input.focus(),B&&i.ownerDocument.defaultView.scrollTo(null,m),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=k,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function L(){if(i.selectionStart!=null){var K=n.somethingSelected(),re="\u200B"+(K?i.value:"");i.value="\u21DA",i.value=re,t.prevInput=K?"":"\u200B",i.selectionStart=1,i.selectionEnd=re.length,r.selForContextMenu=n.doc.sel}}function k(){if(t.contextMenuPending==k&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=u,w&&S<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!w||w&&S<9)&&L();var K=0,re=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,kl)(n):K++<10?r.detectingSelectAll=setTimeout(re,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(re,200)}}if(w&&S>=9&&L(),oe){Oe(e);var W=function(){F(window,"mouseup",W),setTimeout(k,20)};D(window,"mouseup",W)}else setTimeout(k,50)},it.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},it.prototype.setUneditable=function(){},it.prototype.needsContentAttribute=!1;function is(e,t){if(t=t?De(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=J(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=o.getValue()}var i;if(e.form&&(D(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch(u){}}t.finishInit=function(u){u.save=r,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,r(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(F(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var o=Ve(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return o}function as(e){e.off=F,e.on=D,e.wheelEventPixels=hu,e.Doc=Tt,e.splitLines=Br,e.countColumn=Ie,e.findColumn=Je,e.isWordChar=M,e.Pass=at,e.signal=H,e.Line=Nr,e.changeEnd=hr,e.scrollbarModel=el,e.Pos=V,e.cmpPos=Me,e.modes=$r,e.mimeModes=rt,e.resolveMode=It,e.getMode=jt,e.modeExtensions=Pt,e.extendMode=Ln,e.copyState=er,e.startState=la,e.innerMode=Mr,e.commands=wn,e.keyMap=ar,e.keyName=Pl,e.isModifierKey=zl,e.lookupKey=Kr,e.normalizeKeyMap=Iu,e.StringStream=ot,e.SharedTextMarker=Dn,e.TextMarker=pr,e.LineWidget=yn,e.e_preventDefault=ve,e.e_stopPropagation=qe,e.e_stop=Oe,e.addClass=ke,e.contains=le,e.rmClass=ze,e.keyNames=gr}Qu(Ve),es(Ve);var ls="iter insert remove copy getEditor constructor".split(" ");for(var oi in Tt.prototype)Tt.prototype.hasOwnProperty(oi)&&We(ls,oi)<0&&(Ve.prototype[oi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Tt.prototype[oi]));return Be(Tt),Ve.inputStyles={textarea:it,contenteditable:Ze},Ve.defineMode=function(e){!Ve.defaults.mode&&e!="null"&&(Ve.defaults.mode=e),or.apply(this,arguments)},Ve.defineMIME=Ut,Ve.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ve.defineMIME("text/plain","null"),Ve.defineExtension=function(e,t){Ve.prototype[e]=t},Ve.defineDocExtension=function(e,t){Tt.prototype[e]=t},Ve.fromTextArea=is,as(Ve),Ve.version="5.65.8",Ve})},"./node_modules/codemirror/mode/gfm/gfm.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"),Ce("./node_modules/codemirror/mode/markdown/markdown.js"),Ce("./node_modules/codemirror/addon/mode/overlay.js"))})(function(q){"use strict";var Q=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;q.defineMode("gfm",function(I,z){var w=0;function S(G){return G.code=!1,null}var B={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(G){return{code:G.code,codeBlock:G.codeBlock,ateSpace:G.ateSpace}},token:function(G,j){if(j.combineTokens=null,j.codeBlock)return G.match(/^```+/)?(j.codeBlock=!1,null):(G.skipToEnd(),null);if(G.sol()&&(j.code=!1),G.sol()&&G.match(/^```+/))return G.skipToEnd(),j.codeBlock=!0,null;if(G.peek()==="`"){G.next();var fe=G.pos;G.eatWhile("`");var ue=1+G.pos-fe;return j.code?ue===w&&(j.code=!1):(w=ue,j.code=!0),null}else if(j.code)return G.next(),null;if(G.eatSpace())return j.ateSpace=!0,null;if((G.sol()||j.ateSpace)&&(j.ateSpace=!1,z.gitHubSpice!==!1)){if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return j.combineTokens=!0,"link";if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return j.combineTokens=!0,"link"}return G.match(Q)&&G.string.slice(G.start-2,G.start)!="]("&&(G.start==0||/\W/.test(G.string.charAt(G.start-1)))?(j.combineTokens=!0,"link"):(G.next(),null)},blankLine:S},Y={taskLists:!0,strikethrough:!0,emoji:!0};for(var $ in z)Y[$]=z[$];return Y.name="markdown",q.overlayMode(q.getMode(I,Y),B)},"markdown"),q.defineMIME("text/x-gfm","gfm")})},"./node_modules/codemirror/mode/markdown/markdown.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"),Ce("./node_modules/codemirror/mode/xml/xml.js"),Ce("./node_modules/codemirror/mode/meta.js"))})(function(q){"use strict";q.defineMode("markdown",function(Q,I){var z=q.getMode(Q,"text/html"),w=z.name=="null";function S(v){if(q.findModeByName){var c=q.findModeByName(v);c&&(v=c.mime||c.mimes[0])}var De=q.getMode(Q,v);return De.name=="null"?null:De}I.highlightFormatting===void 0&&(I.highlightFormatting=!1),I.maxBlockquoteDepth===void 0&&(I.maxBlockquoteDepth=0),I.taskLists===void 0&&(I.taskLists=!1),I.strikethrough===void 0&&(I.strikethrough=!1),I.emoji===void 0&&(I.emoji=!1),I.fencedCodeBlockHighlighting===void 0&&(I.fencedCodeBlockHighlighting=!0),I.fencedCodeBlockDefaultMode===void 0&&(I.fencedCodeBlockDefaultMode="text/plain"),I.xml===void 0&&(I.xml=!0),I.tokenTypeOverrides===void 0&&(I.tokenTypeOverrides={});var B={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Y in B)B.hasOwnProperty(Y)&&I.tokenTypeOverrides[Y]&&(B[Y]=I.tokenTypeOverrides[Y]);var $=/^([*\-_])(?:\s*\1){2,}\s*$/,G=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,j=/^\[(x| )\](?=\s)/i,fe=I.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,pe=/^[^#!\[\]*_\\<>` "'(~:]+/,ge=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,be=/^\s*\[[^\]]+?\]:.*$/,U=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,O=" ";function ee(v,c,De){return c.f=c.inline=De,De(v,c)}function ne(v,c,De){return c.f=c.block=De,De(v,c)}function X(v){return!v||!/\S/.test(v.string)}function se(v){if(v.linkTitle=!1,v.linkHref=!1,v.linkText=!1,v.em=!1,v.strong=!1,v.strikethrough=!1,v.quote=0,v.indentedCode=!1,v.f==ae){var c=w;if(!c){var De=q.innerMode(z,v.htmlState);c=De.mode.name=="xml"&&De.state.tagStart===null&&!De.state.context&&De.state.tokenize.isInText}c&&(v.f=Z,v.block=oe,v.htmlState=null)}return v.trailingSpace=0,v.trailingSpaceNewLine=!1,v.prevLine=v.thisLine,v.thisLine={stream:null},null}function oe(v,c){var De=v.column()===c.indentation,Ie=X(c.prevLine.stream),Ae=c.indentedCode,We=c.prevLine.hr,wt=c.list!==!1,at=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var Ke=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,wt)){for(c.list=null;Ke<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=Ke-c.listStack[c.listStack.length-1])}var we=!Ie&&!We&&!c.prevLine.header&&(!wt||!Ae)&&!c.prevLine.fencedCodeEnd,je=(c.list===!1||We||Ie)&&c.indentation<=at&&v.match($),Je=null;if(c.indentationDiff>=4&&(Ae||c.prevLine.fencedCodeEnd||c.prevLine.header||Ie))return v.skipToEnd(),c.indentedCode=!0,B.code;if(v.eatSpace())return null;if(De&&c.indentation<=at&&(Je=v.match(fe))&&Je[1].length<=6)return c.quote=0,c.header=Je[1].length,c.thisLine.header=!0,I.highlightFormatting&&(c.formatting="header"),c.f=c.inline,ie(c);if(c.indentation<=at&&v.eat(">"))return c.quote=De?1:c.quote+1,I.highlightFormatting&&(c.formatting="quote"),v.eatSpace(),ie(c);if(!je&&!c.setext&&De&&c.indentation<=at&&(Je=v.match(G))){var Et=Je[1]?"ol":"ul";return c.indentation=Ke+v.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,I.taskLists&&v.match(j,!1)&&(c.taskList=!0),c.f=c.inline,I.highlightFormatting&&(c.formatting=["list","list-"+Et]),ie(c)}else{if(De&&c.indentation<=at&&(Je=v.match(ge,!0)))return c.quote=0,c.fencedEndRE=new RegExp(Je[1]+"+ *$"),c.localMode=I.fencedCodeBlockHighlighting&&S(Je[2]||I.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=q.startState(c.localMode)),c.f=c.block=ze,I.highlightFormatting&&(c.formatting="code-block"),c.code=-1,ie(c);if(c.setext||(!we||!wt)&&!c.quote&&c.list===!1&&!c.code&&!je&&!be.test(v.string)&&(Je=v.lookAhead(1))&&(Je=Je.match(ue)))return c.setext?(c.header=c.setext,c.setext=0,v.skipToEnd(),I.highlightFormatting&&(c.formatting="header")):(c.header=Je[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,ie(c);if(je)return v.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,B.hr;if(v.peek()==="[")return ee(v,c,ke)}return ee(v,c,c.inline)}function ae(v,c){var De=z.token(v,c.htmlState);if(!w){var Ie=q.innerMode(z,c.htmlState);(Ie.mode.name=="xml"&&Ie.state.tagStart===null&&!Ie.state.context&&Ie.state.tokenize.isInText||c.md_inside&&v.current().indexOf(">")>-1)&&(c.f=Z,c.block=oe,c.htmlState=null)}return De}function ze(v,c){var De=c.listStack[c.listStack.length-1]||0,Ie=c.indentation<De,Ae=De+3;if(c.fencedEndRE&&c.indentation<=Ae&&(Ie||v.match(c.fencedEndRE))){I.highlightFormatting&&(c.formatting="code-block");var We;return Ie||(We=ie(c)),c.localMode=c.localState=null,c.block=oe,c.f=Z,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,Ie?ne(v,c,c.block):We}else return c.localMode?c.localMode.token(v,c.localState):(v.skipToEnd(),B.code)}function ie(v){var c=[];if(v.formatting){c.push(B.formatting),typeof v.formatting=="string"&&(v.formatting=[v.formatting]);for(var De=0;De<v.formatting.length;De++)c.push(B.formatting+"-"+v.formatting[De]),v.formatting[De]==="header"&&c.push(B.formatting+"-"+v.formatting[De]+"-"+v.header),v.formatting[De]==="quote"&&(!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=v.quote?c.push(B.formatting+"-"+v.formatting[De]+"-"+v.quote):c.push("error"))}if(v.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(v.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(v.linkHref?c.push(B.linkHref,"url"):(v.strong&&c.push(B.strong),v.em&&c.push(B.em),v.strikethrough&&c.push(B.strikethrough),v.emoji&&c.push(B.emoji),v.linkText&&c.push(B.linkText),v.code&&c.push(B.code),v.image&&c.push(B.image),v.imageAltText&&c.push(B.imageAltText,"link"),v.imageMarker&&c.push(B.imageMarker)),v.header&&c.push(B.header,B.header+"-"+v.header),v.quote&&(c.push(B.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=v.quote?c.push(B.quote+"-"+v.quote):c.push(B.quote+"-"+I.maxBlockquoteDepth)),v.list!==!1){var Ie=(v.listStack.length-1)%3;Ie?Ie===1?c.push(B.list2):c.push(B.list3):c.push(B.list1)}return v.trailingSpaceNewLine?c.push("trailing-space-new-line"):v.trailingSpace&&c.push("trailing-space-"+(v.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Le(v,c){if(v.match(pe,!0))return ie(c)}function Z(v,c){var De=c.text(v,c);if(typeof De!="undefined")return De;if(c.list)return c.list=null,ie(c);if(c.taskList){var Ie=v.match(j,!0)[1]===" ";return Ie?c.taskOpen=!0:c.taskClosed=!0,I.highlightFormatting&&(c.formatting="task"),c.taskList=!1,ie(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&v.match(/^#+$/,!0))return I.highlightFormatting&&(c.formatting="header"),ie(c);var Ae=v.next();if(c.linkTitle){c.linkTitle=!1;var We=Ae;Ae==="("&&(We=")"),We=(We+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var wt="^\\s*(?:[^"+We+"\\\\]+|\\\\\\\\|\\\\.)"+We;if(v.match(new RegExp(wt),!0))return B.linkHref}if(Ae==="`"){var at=c.formatting;I.highlightFormatting&&(c.formatting="code"),v.eatWhile("`");var Ke=v.current().length;if(c.code==0&&(!c.quote||Ke==1))return c.code=Ke,ie(c);if(Ke==c.code){var we=ie(c);return c.code=0,we}else return c.formatting=at,ie(c)}else if(c.code)return ie(c);if(Ae==="\\"&&(v.next(),I.highlightFormatting)){var je=ie(c),Je=B.formatting+"-escape";return je?je+" "+Je:Je}if(Ae==="!"&&v.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,I.highlightFormatting&&(c.formatting="image"),ie(c);if(Ae==="["&&c.imageMarker&&v.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,I.highlightFormatting&&(c.formatting="image"),ie(c);if(Ae==="]"&&c.imageAltText){I.highlightFormatting&&(c.formatting="image");var je=ie(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=R,je}if(Ae==="["&&!c.image)return c.linkText&&v.match(/^.*?\]/)||(c.linkText=!0,I.highlightFormatting&&(c.formatting="link")),ie(c);if(Ae==="]"&&c.linkText){I.highlightFormatting&&(c.formatting="link");var je=ie(c);return c.linkText=!1,c.inline=c.f=v.match(/\(.*?\)| ?\[.*?\]/,!1)?R:Z,je}if(Ae==="<"&&v.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=Re,I.highlightFormatting&&(c.formatting="link");var je=ie(c);return je?je+=" ":je="",je+B.linkInline}if(Ae==="<"&&v.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=Re,I.highlightFormatting&&(c.formatting="link");var je=ie(c);return je?je+=" ":je="",je+B.linkEmail}if(I.xml&&Ae==="<"&&v.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Et=v.string.indexOf(">",v.pos);if(Et!=-1){var Wt=v.string.substring(v.start,Et);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Wt)&&(c.md_inside=!0)}return v.backUp(1),c.htmlState=q.startState(z),ne(v,c,ae)}if(I.xml&&Ae==="<"&&v.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(Ae==="*"||Ae==="_"){for(var Pe=1,yt=v.pos==1?" ":v.string.charAt(v.pos-2);Pe<3&&v.eat(Ae);)Pe++;var _t=v.peek()||" ",Dt=!/\s/.test(_t)&&(!U.test(_t)||/\s/.test(yt)||U.test(yt)),_=!/\s/.test(yt)&&(!U.test(yt)||/\s/.test(_t)||U.test(_t)),E=null,M=null;if(Pe%2&&(!c.em&&Dt&&(Ae==="*"||!_||U.test(yt))?E=!0:c.em==Ae&&_&&(Ae==="*"||!Dt||U.test(_t))&&(E=!1)),Pe>1&&(!c.strong&&Dt&&(Ae==="*"||!_||U.test(yt))?M=!0:c.strong==Ae&&_&&(Ae==="*"||!Dt||U.test(_t))&&(M=!1)),M!=null||E!=null){I.highlightFormatting&&(c.formatting=E==null?"strong":M==null?"em":"strong em"),E===!0&&(c.em=Ae),M===!0&&(c.strong=Ae);var we=ie(c);return E===!1&&(c.em=!1),M===!1&&(c.strong=!1),we}}else if(Ae===" "&&(v.eat("*")||v.eat("_"))){if(v.peek()===" ")return ie(c);v.backUp(1)}if(I.strikethrough){if(Ae==="~"&&v.eatWhile(Ae)){if(c.strikethrough){I.highlightFormatting&&(c.formatting="strikethrough");var we=ie(c);return c.strikethrough=!1,we}else if(v.match(/^[^\s]/,!1))return c.strikethrough=!0,I.highlightFormatting&&(c.formatting="strikethrough"),ie(c)}else if(Ae===" "&&v.match("~~",!0)){if(v.peek()===" ")return ie(c);v.backUp(2)}}if(I.emoji&&Ae===":"&&v.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,I.highlightFormatting&&(c.formatting="emoji");var h=ie(c);return c.emoji=!1,h}return Ae===" "&&(v.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),ie(c)}function Re(v,c){var De=v.next();if(De===">"){c.f=c.inline=Z,I.highlightFormatting&&(c.formatting="link");var Ie=ie(c);return Ie?Ie+=" ":Ie="",Ie+B.linkInline}return v.match(/^[^>]+/,!0),B.linkInline}function R(v,c){if(v.eatSpace())return null;var De=v.next();return De==="("||De==="["?(c.f=c.inline=J(De==="("?")":"]"),I.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,ie(c)):"error"}var le={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function J(v){return function(c,De){var Ie=c.next();if(Ie===v){De.f=De.inline=Z,I.highlightFormatting&&(De.formatting="link-string");var Ae=ie(De);return De.linkHref=!1,Ae}return c.match(le[v]),De.linkHref=!0,ie(De)}}function ke(v,c){return v.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=$e,v.next(),I.highlightFormatting&&(c.formatting="link"),c.linkText=!0,ie(c)):ee(v,c,Z)}function $e(v,c){if(v.match("]:",!0)){c.f=c.inline=ct,I.highlightFormatting&&(c.formatting="link");var De=ie(c);return c.linkText=!1,De}return v.match(/^([^\]\\]|\\.)+/,!0),B.linkText}function ct(v,c){return v.eatSpace()?null:(v.match(/^[^\s]+/,!0),v.peek()===void 0?c.linkTitle=!0:v.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=Z,B.linkHref+" url")}var et={startState:function(){return{f:oe,prevLine:{stream:null},thisLine:{stream:null},block:oe,htmlState:null,indentation:0,inline:Z,text:Le,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(v){return{f:v.f,prevLine:v.prevLine,thisLine:v.thisLine,block:v.block,htmlState:v.htmlState&&q.copyState(z,v.htmlState),indentation:v.indentation,localMode:v.localMode,localState:v.localMode?q.copyState(v.localMode,v.localState):null,inline:v.inline,text:v.text,formatting:!1,linkText:v.linkText,linkTitle:v.linkTitle,linkHref:v.linkHref,code:v.code,em:v.em,strong:v.strong,strikethrough:v.strikethrough,emoji:v.emoji,header:v.header,setext:v.setext,hr:v.hr,taskList:v.taskList,list:v.list,listStack:v.listStack.slice(0),quote:v.quote,indentedCode:v.indentedCode,trailingSpace:v.trailingSpace,trailingSpaceNewLine:v.trailingSpaceNewLine,md_inside:v.md_inside,fencedEndRE:v.fencedEndRE}},token:function(v,c){if(c.formatting=!1,v!=c.thisLine.stream){if(c.header=0,c.hr=!1,v.match(/^\s*$/,!0))return se(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:v},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=ae)){var De=v.match(/^\s*/,!0)[0].replace(/\t/g,O).length;if(c.indentation=De,c.indentationDiff=null,De>0)return null}}return c.f(v,c)},innerMode:function(v){return v.block==ae?{state:v.htmlState,mode:z}:v.localState?{state:v.localState,mode:v.localMode}:{state:v,mode:et}},indent:function(v,c,De){return v.block==ae&&z.indent?z.indent(v.htmlState,c,De):v.localState&&v.localMode.indent?v.localMode.indent(v.localState,c,De):q.Pass},blankLine:se,getType:ie,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return et},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},"./node_modules/codemirror/mode/meta.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Q=0;Q<q.modeInfo.length;Q++){var I=q.modeInfo[Q];I.mimes&&(I.mime=I.mimes[0])}q.findModeByMIME=function(z){z=z.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var S=q.modeInfo[w];if(S.mime==z)return S;if(S.mimes){for(var B=0;B<S.mimes.length;B++)if(S.mimes[B]==z)return S}}if(/\+xml$/.test(z))return q.findModeByMIME("application/xml");if(/\+json$/.test(z))return q.findModeByMIME("application/json")},q.findModeByExtension=function(z){z=z.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var S=q.modeInfo[w];if(S.ext){for(var B=0;B<S.ext.length;B++)if(S.ext[B]==z)return S}}},q.findModeByFileName=function(z){for(var w=0;w<q.modeInfo.length;w++){var S=q.modeInfo[w];if(S.file&&S.file.test(z))return S}var B=z.lastIndexOf("."),Y=B>-1&&z.substring(B+1,z.length);if(Y)return q.findModeByExtension(Y)},q.findModeByName=function(z){z=z.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var S=q.modeInfo[w];if(S.name.toLowerCase()==z)return S;if(S.alias){for(var B=0;B<S.alias.length;B++)if(S.alias[B].toLowerCase()==z)return S}}}})},"./node_modules/codemirror/mode/xml/xml.js":function(ft,_e,Ce){(function(q){q(Ce("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";var Q={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},I={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(z,w){var S=z.indentUnit,B={},Y=w.htmlMode?Q:I;for(var $ in Y)B[$]=Y[$];for(var $ in w)B[$]=w[$];var G,j;function fe(R,le){function J(ct){return le.tokenize=ct,ct(R,le)}var ke=R.next();if(ke=="<")return R.eat("!")?R.eat("[")?R.match("CDATA[")?J(ge("atom","]]>")):null:R.match("--")?J(ge("comment","-->")):R.match("DOCTYPE",!0,!0)?(R.eatWhile(/[\w\._\-]/),J(be(1))):null:R.eat("?")?(R.eatWhile(/[\w\._\-]/),le.tokenize=ge("meta","?>"),"meta"):(G=R.eat("/")?"closeTag":"openTag",le.tokenize=ue,"tag bracket");if(ke=="&"){var $e;return R.eat("#")?R.eat("x")?$e=R.eatWhile(/[a-fA-F\d]/)&&R.eat(";"):$e=R.eatWhile(/[\d]/)&&R.eat(";"):$e=R.eatWhile(/[\w\.\-:]/)&&R.eat(";"),$e?"atom":"error"}else return R.eatWhile(/[^&<]/),null}fe.isInText=!0;function ue(R,le){var J=R.next();if(J==">"||J=="/"&&R.eat(">"))return le.tokenize=fe,G=J==">"?"endTag":"selfcloseTag","tag bracket";if(J=="=")return G="equals",null;if(J=="<"){le.tokenize=fe,le.state=X,le.tagName=le.tagStart=null;var ke=le.tokenize(R,le);return ke?ke+" tag error":"tag error"}else return/[\'\"]/.test(J)?(le.tokenize=pe(J),le.stringStartCol=R.column(),le.tokenize(R,le)):(R.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function pe(R){var le=function(J,ke){for(;!J.eol();)if(J.next()==R){ke.tokenize=ue;break}return"string"};return le.isInAttribute=!0,le}function ge(R,le){return function(J,ke){for(;!J.eol();){if(J.match(le)){ke.tokenize=fe;break}J.next()}return R}}function be(R){return function(le,J){for(var ke;(ke=le.next())!=null;){if(ke=="<")return J.tokenize=be(R+1),J.tokenize(le,J);if(ke==">")if(R==1){J.tokenize=fe;break}else return J.tokenize=be(R-1),J.tokenize(le,J)}return"meta"}}function U(R){return R&&R.toLowerCase()}function O(R,le,J){this.prev=R.context,this.tagName=le||"",this.indent=R.indented,this.startOfLine=J,(B.doNotIndent.hasOwnProperty(le)||R.context&&R.context.noIndent)&&(this.noIndent=!0)}function ee(R){R.context&&(R.context=R.context.prev)}function ne(R,le){for(var J;;){if(!R.context||(J=R.context.tagName,!B.contextGrabbers.hasOwnProperty(U(J))||!B.contextGrabbers[U(J)].hasOwnProperty(U(le))))return;ee(R)}}function X(R,le,J){return R=="openTag"?(J.tagStart=le.column(),se):R=="closeTag"?oe:X}function se(R,le,J){return R=="word"?(J.tagName=le.current(),j="tag",ie):B.allowMissingTagName&&R=="endTag"?(j="tag bracket",ie(R,le,J)):(j="error",se)}function oe(R,le,J){if(R=="word"){var ke=le.current();return J.context&&J.context.tagName!=ke&&B.implicitlyClosed.hasOwnProperty(U(J.context.tagName))&&ee(J),J.context&&J.context.tagName==ke||B.matchClosing===!1?(j="tag",ae):(j="tag error",ze)}else return B.allowMissingTagName&&R=="endTag"?(j="tag bracket",ae(R,le,J)):(j="error",ze)}function ae(R,le,J){return R!="endTag"?(j="error",ae):(ee(J),X)}function ze(R,le,J){return j="error",ae(R,le,J)}function ie(R,le,J){if(R=="word")return j="attribute",Le;if(R=="endTag"||R=="selfcloseTag"){var ke=J.tagName,$e=J.tagStart;return J.tagName=J.tagStart=null,R=="selfcloseTag"||B.autoSelfClosers.hasOwnProperty(U(ke))?ne(J,ke):(ne(J,ke),J.context=new O(J,ke,$e==J.indented)),X}return j="error",ie}function Le(R,le,J){return R=="equals"?Z:(B.allowMissing||(j="error"),ie(R,le,J))}function Z(R,le,J){return R=="string"?Re:R=="word"&&B.allowUnquoted?(j="string",ie):(j="error",ie(R,le,J))}function Re(R,le,J){return R=="string"?Re:ie(R,le,J)}return{startState:function(R){var le={tokenize:fe,state:X,indented:R||0,tagName:null,tagStart:null,context:null};return R!=null&&(le.baseIndent=R),le},token:function(R,le){if(!le.tagName&&R.sol()&&(le.indented=R.indentation()),R.eatSpace())return null;G=null;var J=le.tokenize(R,le);return(J||G)&&J!="comment"&&(j=null,le.state=le.state(G||J,R,le),j&&(J=j=="error"?J+" error":j)),J},indent:function(R,le,J){var ke=R.context;if(R.tokenize.isInAttribute)return R.tagStart==R.indented?R.stringStartCol+1:R.indented+S;if(ke&&ke.noIndent)return q.Pass;if(R.tokenize!=ue&&R.tokenize!=fe)return J?J.match(/^(\s*)/)[0].length:0;if(R.tagName)return B.multilineTagIndentPastTag!==!1?R.tagStart+R.tagName.length+2:R.tagStart+S*(B.multilineTagIndentFactor||1);if(B.alignCDATA&&/<!\[CDATA\[/.test(le))return 0;var $e=le&&/^<(\/)?([\w_:\.-]*)/.exec(le);if($e&&$e[1])for(;ke;)if(ke.tagName==$e[2]){ke=ke.prev;break}else if(B.implicitlyClosed.hasOwnProperty(U(ke.tagName)))ke=ke.prev;else break;else if($e)for(;ke;){var ct=B.contextGrabbers[U(ke.tagName)];if(ct&&ct.hasOwnProperty(U($e[2])))ke=ke.prev;else break}for(;ke&&ke.prev&&!ke.startOfLine;)ke=ke.prev;return ke?ke.indent+S:R.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:B.htmlMode?"html":"xml",helperType:B.htmlMode?"html":"xml",skipAttribute:function(R){R.state==Z&&(R.state=ie)},xmlCurrentTag:function(R){return R.tagName?{name:R.tagName,close:R.type=="closeTag"}:null},xmlCurrentContext:function(R){for(var le=[],J=R.context;J;J=J.prev)le.push(J.tagName);return le.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"./node_modules/easymde/src/js/codemirror/tablist.js":function(ft,_e,Ce){var q=Ce("./node_modules/codemirror/lib/codemirror.js");q.commands.tabAndIndentMarkdownList=function(Q){var I=Q.listSelections(),z=I[0].head,w=Q.getStateAfter(z.line),S=w.list!==!1;if(S){Q.execCommand("indentMore");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var B=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(B)}},q.commands.shiftTabAndUnindentMarkdownList=function(Q){var I=Q.listSelections(),z=I[0].head,w=Q.getStateAfter(z.line),S=w.list!==!1;if(S){Q.execCommand("indentLess");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var B=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(B)}}},"./node_modules/easymde/src/js/easymde.js":function(ft,_e,Ce){"use strict";var q=Ce("./node_modules/codemirror/lib/codemirror.js");Ce("./node_modules/codemirror/addon/edit/continuelist.js"),Ce("./node_modules/easymde/src/js/codemirror/tablist.js"),Ce("./node_modules/codemirror/addon/display/fullscreen.js"),Ce("./node_modules/codemirror/mode/markdown/markdown.js"),Ce("./node_modules/codemirror/addon/mode/overlay.js"),Ce("./node_modules/codemirror/addon/display/placeholder.js"),Ce("./node_modules/codemirror/addon/display/autorefresh.js"),Ce("./node_modules/codemirror/addon/selection/mark-selection.js"),Ce("./node_modules/codemirror/addon/search/searchcursor.js"),Ce("./node_modules/codemirror/mode/gfm/gfm.js"),Ce("./node_modules/codemirror/mode/xml/xml.js");var Q=Ce("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),I=Ce("./node_modules/marked/lib/marked.cjs").TU,z=/Mac/.test(navigator.platform),w=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),S={toggleBold:ae,toggleItalic:ze,drawLink:v,toggleHeadingSmaller:Re,toggleHeadingBigger:R,drawImage:c,toggleBlockquote:Z,toggleOrderedList:ct,toggleUnorderedList:$e,toggleCodeBlock:Le,togglePreview:we,toggleStrikethrough:ie,toggleHeading1:le,toggleHeading2:J,toggleHeading3:ke,cleanBlock:et,drawTable:Ae,drawHorizontalRule:We,undo:wt,redo:at,toggleSideBySide:Ke,toggleFullScreen:oe},B={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Y=function(s){for(var p in S)if(S[p]===s)return p;return null},$=function(){var s=!1;return function(p){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(p)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(p.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s};function G(s){for(var p;(p=w.exec(s))!==null;){var x=p[0];if(x.indexOf("target=")===-1){var C=x.replace(/>$/,' target="_blank">');s=s.replace(x,C)}}return s}function j(s){for(var p=new DOMParser,x=p.parseFromString(s,"text/html"),C=x.getElementsByTagName("li"),T=0;T<C.length;T++)for(var D=C[T],N=0;N<D.children.length;N++){var F=D.children[N];F instanceof HTMLInputElement&&F.type==="checkbox"&&(D.style.marginLeft="-1.5em",D.style.listStyleType="none")}return x.documentElement.innerHTML}function fe(s){return z?s=s.replace("Ctrl","Cmd"):s=s.replace("Cmd","Ctrl"),s}var ue={};function pe(s){return ue[s]||(ue[s]=new RegExp("\\s*"+s+"(\\s*)","g"))}function ge(s,p){if(!(!s||!p)){var x=pe(p);s.className.match(x)||(s.className+=" "+p)}}function be(s,p){if(!(!s||!p)){var x=pe(p);!s.className.match(x)||(s.className=s.className.replace(x,"$1"))}}function U(s,p,x,C){var T=O(s,!1,p,x,"button",C);T.className+=" easymde-dropdown",T.onclick=function(){T.focus()};var D=document.createElement("div");D.className="easymde-dropdown-content";for(var N=0;N<s.children.length;N++){var F=s.children[N],H;typeof F=="string"&&F in E?H=O(E[F],!0,p,x,"button",C):H=O(F,!0,p,x,"button",C),H.addEventListener("click",function(te){te.stopPropagation()},!1),D.appendChild(H)}return T.appendChild(D),T}function O(s,p,x,C,T,D){s=s||{};var N=document.createElement(T);if(s.attributes)for(var F in s.attributes)Object.prototype.hasOwnProperty.call(s.attributes,F)&&N.setAttribute(F,s.attributes[F]);N.className=s.name,N.setAttribute("type",T),x=x==null?!0:x,s.name&&s.name in C&&(S[s.name]=s.action),s.title&&x&&(N.title=ne(s.title,s.action,C),z&&(N.title=N.title.replace("Ctrl","\u2318"),N.title=N.title.replace("Alt","\u2325"))),s.noDisable&&N.classList.add("no-disable"),s.noMobile&&N.classList.add("no-mobile");var H=[];typeof s.className!="undefined"&&(H=s.className.split(" "));for(var te=[],ye=0;ye<H.length;ye++){var Te=H[ye];Te.match(/^fa([srlb]|(-[\w-]*)|$)/)?te.push(Te):N.classList.add(Te)}N.tabIndex=-1;for(var Be=document.createElement("i"),ve=0;ve<te.length;ve++){var qe=te[ve];Be.classList.add(qe)}return N.appendChild(Be),typeof s.icon!="undefined"&&(N.innerHTML=s.icon),s.action&&p&&(typeof s.action=="function"?N.onclick=function(Ue){Ue.preventDefault(),s.action(D)}:typeof s.action=="string"&&(N.onclick=function(Ue){Ue.preventDefault(),window.open(s.action,"_blank")})),N}function ee(){var s=document.createElement("i");return s.className="separator",s.innerHTML="|",s}function ne(s,p,x){var C,T=s;return p&&(C=Y(p),x[C]&&(T+=" ("+fe(x[C])+")")),T}function X(s,p){p=p||s.getCursor("start");var x=s.getTokenAt(p);if(!x.type)return{};for(var C=x.type.split(" "),T={},D,N,F=0;F<C.length;F++)D=C[F],D==="strong"?T.bold=!0:D==="variable-2"?(N=s.getLine(p.line),/^\s*\d+\.\s/.test(N)?T["ordered-list"]=!0:T["unordered-list"]=!0):D==="atom"?T.quote=!0:D==="em"?T.italic=!0:D==="quote"?T.quote=!0:D==="strikethrough"?T.strikethrough=!0:D==="comment"?T.code=!0:D==="link"?T.link=!0:D==="tag"?T.image=!0:D.match(/^header(-[1-6])?$/)&&(T[D.replace("header","heading")]=!0);return T}var se="";function oe(s){var p=s.codemirror;p.setOption("fullScreen",!p.getOption("fullScreen")),p.getOption("fullScreen")?(se=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=se;var x=p.getWrapperElement(),C=x.nextSibling;if(/editor-preview-active-side/.test(C.className))if(s.options.sideBySideFullscreen===!1){var T=x.parentNode;p.getOption("fullScreen")?be(T,"sided--no-fullscreen"):ge(T,"sided--no-fullscreen")}else Ke(s);if(s.options.onToggleFullScreen&&s.options.onToggleFullScreen(p.getOption("fullScreen")||!1),typeof s.options.maxHeight!="undefined"&&(p.getOption("fullScreen")?(p.getScrollerElement().style.removeProperty("height"),C.style.removeProperty("height")):(p.getScrollerElement().style.height=s.options.maxHeight,s.setPreviewMaxHeight())),/fullscreen/.test(s.toolbar_div.className)?s.toolbar_div.className=s.toolbar_div.className.replace(/\s*fullscreen\b/,""):s.toolbar_div.className+=" fullscreen",s.toolbarElements&&s.toolbarElements.fullscreen){var D=s.toolbarElements.fullscreen;/active/.test(D.className)?D.className=D.className.replace(/\s*active\s*/g,""):D.className+=" active"}}function ae(s){Wt(s,"bold",s.options.blockStyles.bold)}function ze(s){Wt(s,"italic",s.options.blockStyles.italic)}function ie(s){Wt(s,"strikethrough","~~")}function Le(s){var p=s.options.blockStyles.code;function x(rt){if(typeof rt!="object")throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof rt+": "+rt;return rt.styles&&rt.styles[2]&&rt.styles[2].indexOf("formatting-code-block")!==-1}function C(rt){return rt.state.base.base||rt.state.base}function T(rt,or,Ut,It,jt){Ut=Ut||rt.getLineHandle(or),It=It||rt.getTokenAt({line:or,ch:1}),jt=jt||!!Ut.text&&rt.getTokenAt({line:or,ch:Ut.text.length-1});var Pt=It.type?It.type.split(" "):[];return jt&&C(jt).indentedCode?"indented":Pt.indexOf("comment")===-1?!1:C(It).fencedChars||C(jt).fencedChars||x(Ut)?"fenced":"single"}function D(rt,or,Ut,It){var jt=or.line+1,Pt=Ut.line+1,Ln=or.line!==Ut.line,er=It+`
|
|
`,Mr=`
|
|
`+It;Ln&&Pt++,Ln&&Ut.ch===0&&(Mr=It+`
|
|
`,Pt--),je(rt,!1,[er,Mr]),rt.setSelection({line:jt,ch:0},{line:Pt,ch:0})}var N=s.codemirror,F=N.getCursor("start"),H=N.getCursor("end"),te=N.getTokenAt({line:F.line,ch:F.ch||1}),ye=N.getLineHandle(F.line),Te=T(N,F.line,ye,te),Be,ve,qe;if(Te==="single"){var Ue=ye.text.slice(0,F.ch).replace("`",""),Oe=ye.text.slice(F.ch).replace("`","");N.replaceRange(Ue+Oe,{line:F.line,ch:0},{line:F.line,ch:99999999999999}),F.ch--,F!==H&&H.ch--,N.setSelection(F,H),N.focus()}else if(Te==="fenced")if(F.line!==H.line||F.ch!==H.ch){for(Be=F.line;Be>=0&&(ye=N.getLineHandle(Be),!x(ye));Be--);var Ge=N.getTokenAt({line:Be,ch:1}),lt=C(Ge).fencedChars,ht,bt,Vt,Rt;x(N.getLineHandle(F.line))?(ht="",bt=F.line):x(N.getLineHandle(F.line-1))?(ht="",bt=F.line-1):(ht=lt+`
|
|
`,bt=F.line),x(N.getLineHandle(H.line))?(Vt="",Rt=H.line,H.ch===0&&(Rt+=1)):H.ch!==0&&x(N.getLineHandle(H.line+1))?(Vt="",Rt=H.line+1):(Vt=lt+`
|
|
`,Rt=H.line+1),H.ch===0&&(Rt-=1),N.operation(function(){N.replaceRange(Vt,{line:Rt,ch:0},{line:Rt+(Vt?0:1),ch:0}),N.replaceRange(ht,{line:bt,ch:0},{line:bt+(ht?0:1),ch:0})}),N.setSelection({line:bt+(ht?1:0),ch:0},{line:Rt+(ht?1:-1),ch:0}),N.focus()}else{var Tr=F.line;if(x(N.getLineHandle(F.line))&&(T(N,F.line+1)==="fenced"?(Be=F.line,Tr=F.line+1):(ve=F.line,Tr=F.line-1)),Be===void 0)for(Be=Tr;Be>=0&&(ye=N.getLineHandle(Be),!x(ye));Be--);if(ve===void 0)for(qe=N.lineCount(),ve=Tr;ve<qe&&(ye=N.getLineHandle(ve),!x(ye));ve++);N.operation(function(){N.replaceRange("",{line:Be,ch:0},{line:Be+1,ch:0}),N.replaceRange("",{line:ve-1,ch:0},{line:ve,ch:0})}),N.focus()}else if(Te==="indented"){if(F.line!==H.line||F.ch!==H.ch)Be=F.line,ve=H.line,H.ch===0&&ve--;else{for(Be=F.line;Be>=0;Be--)if(ye=N.getLineHandle(Be),!ye.text.match(/^\s*$/)&&T(N,Be,ye)!=="indented"){Be+=1;break}for(qe=N.lineCount(),ve=F.line;ve<qe;ve++)if(ye=N.getLineHandle(ve),!ye.text.match(/^\s*$/)&&T(N,ve,ye)!=="indented"){ve-=1;break}}var Br=N.getLineHandle(ve+1),En=Br&&N.getTokenAt({line:ve+1,ch:Br.text.length-1}),ui=En&&C(En).indentedCode;ui&&N.replaceRange(`
|
|
`,{line:ve+1,ch:0});for(var mr=Be;mr<=ve;mr++)N.indentLine(mr,"subtract");N.focus()}else{var si=F.line===H.line&&F.ch===H.ch&&F.ch===0,$r=F.line!==H.line;si||$r?D(N,F,H,p):je(N,!1,["`","`"])}}function Z(s){var p=s.codemirror;Et(p,"quote")}function Re(s){var p=s.codemirror;Je(p,"smaller")}function R(s){var p=s.codemirror;Je(p,"bigger")}function le(s){var p=s.codemirror;Je(p,void 0,1)}function J(s){var p=s.codemirror;Je(p,void 0,2)}function ke(s){var p=s.codemirror;Je(p,void 0,3)}function $e(s){var p=s.codemirror,x="*";["-","+","*"].includes(s.options.unorderedListStyle)&&(x=s.options.unorderedListStyle),Et(p,"unordered-list",x)}function ct(s){var p=s.codemirror;Et(p,"ordered-list")}function et(s){var p=s.codemirror;Pe(p)}function v(s){var p=s.codemirror,x=X(p),C=s.options,T="https://";if(C.promptURLs&&(T=prompt(C.promptTexts.link,"https://"),!T))return!1;je(p,x.link,C.insertTexts.link,T)}function c(s){var p=s.codemirror,x=X(p),C=s.options,T="https://";if(C.promptURLs&&(T=prompt(C.promptTexts.image,"https://"),!T))return!1;je(p,x.image,C.insertTexts.image,T)}function De(s){s.openBrowseFileWindow()}function Ie(s,p){var x=s.codemirror,C=X(x),T=s.options,D=p.substr(p.lastIndexOf("/")+1),N=D.substring(D.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg"].includes(N))je(x,C.image,T.insertTexts.uploadedImage,p);else{var F=T.insertTexts.link;F[0]="["+D,je(x,C.link,F,p)}s.updateStatusBar("upload-image",s.options.imageTexts.sbOnUploaded.replace("#image_name#",D)),setTimeout(function(){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit)},1e3)}function Ae(s){var p=s.codemirror,x=X(p),C=s.options;je(p,x.table,C.insertTexts.table)}function We(s){var p=s.codemirror,x=X(p),C=s.options;je(p,x.image,C.insertTexts.horizontalRule)}function wt(s){var p=s.codemirror;p.undo(),p.focus()}function at(s){var p=s.codemirror;p.redo(),p.focus()}function Ke(s){var p=s.codemirror,x=p.getWrapperElement(),C=x.nextSibling,T=s.toolbarElements&&s.toolbarElements["side-by-side"],D=!1,N=x.parentNode;/editor-preview-active-side/.test(C.className)?(s.options.sideBySideFullscreen===!1&&be(N,"sided--no-fullscreen"),C.className=C.className.replace(/\s*editor-preview-active-side\s*/g,""),T&&(T.className=T.className.replace(/\s*active\s*/g,"")),x.className=x.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){p.getOption("fullScreen")||(s.options.sideBySideFullscreen===!1?ge(N,"sided--no-fullscreen"):oe(s)),C.className+=" editor-preview-active-side"},1),T&&(T.className+=" active"),x.className+=" CodeMirror-sided",D=!0);var F=x.lastChild;if(/editor-preview-active/.test(F.className)){F.className=F.className.replace(/\s*editor-preview-active\s*/g,"");var H=s.toolbarElements.preview,te=s.toolbar_div;H.className=H.className.replace(/\s*active\s*/g,""),te.className=te.className.replace(/\s*disabled-for-preview*/g,"")}var ye=function(){var Be=s.options.previewRender(s.value(),C);Be!=null&&(C.innerHTML=Be)};if(p.sideBySideRenderingFunction||(p.sideBySideRenderingFunction=ye),D){var Te=s.options.previewRender(s.value(),C);Te!=null&&(C.innerHTML=Te),p.on("update",p.sideBySideRenderingFunction)}else p.off("update",p.sideBySideRenderingFunction);p.refresh()}function we(s){var p=s.codemirror,x=p.getWrapperElement(),C=s.toolbar_div,T=s.options.toolbar?s.toolbarElements.preview:!1,D=x.lastChild,N=p.getWrapperElement().nextSibling;if(/editor-preview-active-side/.test(N.className)&&Ke(s),!D||!/editor-preview-full/.test(D.className)){if(D=document.createElement("div"),D.className="editor-preview-full",s.options.previewClass)if(Array.isArray(s.options.previewClass))for(var F=0;F<s.options.previewClass.length;F++)D.className+=" "+s.options.previewClass[F];else typeof s.options.previewClass=="string"&&(D.className+=" "+s.options.previewClass);x.appendChild(D)}/editor-preview-active/.test(D.className)?(D.className=D.className.replace(/\s*editor-preview-active\s*/g,""),T&&(T.className=T.className.replace(/\s*active\s*/g,""),C.className=C.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){D.className+=" editor-preview-active"},1),T&&(T.className+=" active",C.className+=" disabled-for-preview")),D.innerHTML=s.options.previewRender(s.value(),D)}function je(s,p,x,C){if(!/editor-preview-active/.test(s.getWrapperElement().lastChild.className)){var T,D=x[0],N=x[1],F={},H={};Object.assign(F,s.getCursor("start")),Object.assign(H,s.getCursor("end")),C&&(D=D.replace("#url#",C),N=N.replace("#url#",C)),p?(T=s.getLine(F.line),D=T.slice(0,F.ch),N=T.slice(F.ch),s.replaceRange(D+N,{line:F.line,ch:0})):(T=s.getSelection(),s.replaceSelection(D+T+N),F.ch+=D.length,F!==H&&(H.ch+=D.length)),s.setSelection(F,H),s.focus()}}function Je(s,p,x){if(!/editor-preview-active/.test(s.getWrapperElement().lastChild.className)){for(var C=s.getCursor("start"),T=s.getCursor("end"),D=C.line;D<=T.line;D++)(function(N){var F=s.getLine(N),H=F.search(/[^#]/);p!==void 0?H<=0?p=="bigger"?F="###### "+F:F="# "+F:H==6&&p=="smaller"?F=F.substr(7):H==1&&p=="bigger"?F=F.substr(2):p=="bigger"?F=F.substr(1):F="#"+F:x==1?H<=0?F="# "+F:H==x?F=F.substr(H+1):F="# "+F.substr(H+1):x==2?H<=0?F="## "+F:H==x?F=F.substr(H+1):F="## "+F.substr(H+1):H<=0?F="### "+F:H==x?F=F.substr(H+1):F="### "+F.substr(H+1),s.replaceRange(F,{line:N,ch:0},{line:N,ch:99999999999999})})(D);s.focus()}}function Et(s,p,x){if(!/editor-preview-active/.test(s.getWrapperElement().lastChild.className)){for(var C=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,T=/^\s*/,D=X(s),N=s.getCursor("start"),F=s.getCursor("end"),H={quote:/^(\s*)>\s+/,"unordered-list":C,"ordered-list":C},te=function(qe,Ue){var Oe={quote:">","unordered-list":x,"ordered-list":"%%i."};return Oe[qe].replace("%%i",Ue)},ye=function(qe,Ue){var Oe={quote:">","unordered-list":"\\"+x,"ordered-list":"\\d+."},Ge=new RegExp(Oe[qe]);return Ue&&Ge.test(Ue)},Te=function(qe,Ue,Oe){var Ge=C.exec(Ue),lt=te(qe,Be);return Ge!==null?(ye(qe,Ge[2])&&(lt=""),Ue=Ge[1]+lt+Ge[3]+Ue.replace(T,"").replace(H[qe],"$1")):Oe==!1&&(Ue=lt+" "+Ue),Ue},Be=1,ve=N.line;ve<=F.line;ve++)(function(qe){var Ue=s.getLine(qe);D[p]?Ue=Ue.replace(H[p],"$1"):(p=="unordered-list"&&(Ue=Te("ordered-list",Ue,!0)),Ue=Te(p,Ue,!1),Be+=1),s.replaceRange(Ue,{line:qe,ch:0},{line:qe,ch:99999999999999})})(ve);s.focus()}}function Wt(s,p,x,C){if(!/editor-preview-active/.test(s.codemirror.getWrapperElement().lastChild.className)){C=typeof C=="undefined"?x:C;var T=s.codemirror,D=X(T),N,F=x,H=C,te=T.getCursor("start"),ye=T.getCursor("end");D[p]?(N=T.getLine(te.line),F=N.slice(0,te.ch),H=N.slice(te.ch),p=="bold"?(F=F.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),H=H.replace(/(\*\*|__)/,"")):p=="italic"?(F=F.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),H=H.replace(/(\*|_)/,"")):p=="strikethrough"&&(F=F.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),H=H.replace(/(\*\*|~~)/,"")),T.replaceRange(F+H,{line:te.line,ch:0},{line:te.line,ch:99999999999999}),p=="bold"||p=="strikethrough"?(te.ch-=2,te!==ye&&(ye.ch-=2)):p=="italic"&&(te.ch-=1,te!==ye&&(ye.ch-=1))):(N=T.getSelection(),p=="bold"?(N=N.split("**").join(""),N=N.split("__").join("")):p=="italic"?(N=N.split("*").join(""),N=N.split("_").join("")):p=="strikethrough"&&(N=N.split("~~").join("")),T.replaceSelection(F+N+H),te.ch+=x.length,ye.ch=te.ch+N.length),T.setSelection(te,ye),T.focus()}}function Pe(s){if(!/editor-preview-active/.test(s.getWrapperElement().lastChild.className))for(var p=s.getCursor("start"),x=s.getCursor("end"),C,T=p.line;T<=x.line;T++)C=s.getLine(T),C=C.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),s.replaceRange(C,{line:T,ch:0},{line:T,ch:99999999999999})}function yt(s,p){if(Math.abs(s)<1024)return""+s+p[0];var x=0;do s/=1024,++x;while(Math.abs(s)>=1024&&x<p.length);return""+s.toFixed(1)+p[x]}function _t(s,p){for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(p[x]instanceof Array?s[x]=p[x].concat(s[x]instanceof Array?s[x]:[]):p[x]!==null&&typeof p[x]=="object"&&p[x].constructor===Object?s[x]=_t(s[x]||{},p[x]):s[x]=p[x]);return s}function Dt(s){for(var p=1;p<arguments.length;p++)s=_t(s,arguments[p]);return s}function _(s){var p=/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,x=s.match(p),C=0;if(x===null)return C;for(var T=0;T<x.length;T++)x[T].charCodeAt(0)>=19968?C+=x[T].length:C+=1;return C}var E={bold:{name:"bold",action:ae,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:ze,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:ie,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:Re,className:"fa fa-header fa-heading",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Re,className:"fa fa-header fa-heading header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:R,className:"fa fa-header fa-heading header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:le,className:"fa fa-header fa-heading header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:J,className:"fa fa-header fa-heading header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:ke,className:"fa fa-header fa-heading header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:Le,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:Z,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:$e,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:ct,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:et,className:"fa fa-eraser",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:v,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:c,className:"fa fa-image",title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:De,className:"fa fa-image",title:"Import an image"},table:{name:"table",action:Ae,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:We,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:we,className:"fa fa-eye",noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:Ke,className:"fa fa-columns",noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:oe,className:"fa fa-arrows-alt",noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:"fa fa-question-circle",noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:wt,className:"fa fa-undo",noDisable:!0,title:"Undo"},redo:{name:"redo",action:at,className:"fa fa-repeat fa-redo",noDisable:!0,title:"Redo"}},M={link:["[","](#url#)"],image:[""],uploadedImage:["",""],table:["",`
|
|
|
|
| Column 1 | Column 2 | Column 3 |
|
|
| -------- | -------- | -------- |
|
|
| Text | Text | Text |
|
|
|
|
`],horizontalRule:["",`
|
|
|
|
-----
|
|
|
|
`]},h={link:"URL for the link:",image:"URL of the image:"},d={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},b={bold:"**",code:"```",italic:"*"},y={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},P={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
|
|
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function A(s){s=s||{},s.parent=this;var p=!0;if(s.autoDownloadFontAwesome===!1&&(p=!1),s.autoDownloadFontAwesome!==!0)for(var x=document.styleSheets,C=0;C<x.length;C++)!x[C].href||x[C].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(p=!1);if(p){var T=document.createElement("link");T.rel="stylesheet",T.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(T)}if(s.element)this.element=s.element;else if(s.element===null){console.log("EasyMDE: Error. No element was found.");return}if(s.toolbar===void 0){s.toolbar=[];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(D.indexOf("separator-")!=-1&&s.toolbar.push("|"),(E[D].default===!0||s.showIcons&&s.showIcons.constructor===Array&&s.showIcons.indexOf(D)!=-1)&&s.toolbar.push(D))}if(Object.prototype.hasOwnProperty.call(s,"previewClass")||(s.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(s,"status")||(s.status=["autosave","lines","words","cursor"],s.uploadImage&&s.status.unshift("upload-image")),s.previewRender||(s.previewRender=function(F){return this.parent.markdown(F)}),s.parsingConfig=Dt({highlightFormatting:!0},s.parsingConfig||{}),s.insertTexts=Dt({},M,s.insertTexts||{}),s.promptTexts=Dt({},h,s.promptTexts||{}),s.blockStyles=Dt({},b,s.blockStyles||{}),s.autosave!=null&&(s.autosave.timeFormat=Dt({},d,s.autosave.timeFormat||{})),s.shortcuts=Dt({},B,s.shortcuts||{}),s.maxHeight=s.maxHeight||void 0,s.direction=s.direction||"ltr",typeof s.maxHeight!="undefined"?s.minHeight=s.maxHeight:s.minHeight=s.minHeight||"300px",s.errorCallback=s.errorCallback||function(F){alert(F)},s.uploadImage=s.uploadImage||!1,s.imageMaxSize=s.imageMaxSize||2097152,s.imageAccept=s.imageAccept||"image/png, image/jpeg",s.imageTexts=Dt({},y,s.imageTexts||{}),s.errorMessages=Dt({},P,s.errorMessages||{}),s.autosave!=null&&s.autosave.unique_id!=null&&s.autosave.unique_id!=""&&(s.autosave.uniqueId=s.autosave.unique_id),s.overlayMode&&s.overlayMode.combine===void 0&&(s.overlayMode.combine=!0),this.options=s,this.render(),s.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(s.initialValue),s.uploadImage){var N=this;this.codemirror.on("dragenter",function(F,H){N.updateStatusBar("upload-image",N.options.imageTexts.sbOnDragEnter),H.stopPropagation(),H.preventDefault()}),this.codemirror.on("dragend",function(F,H){N.updateStatusBar("upload-image",N.options.imageTexts.sbInit),H.stopPropagation(),H.preventDefault()}),this.codemirror.on("dragleave",function(F,H){N.updateStatusBar("upload-image",N.options.imageTexts.sbInit),H.stopPropagation(),H.preventDefault()}),this.codemirror.on("dragover",function(F,H){N.updateStatusBar("upload-image",N.options.imageTexts.sbOnDragEnter),H.stopPropagation(),H.preventDefault()}),this.codemirror.on("drop",function(F,H){H.stopPropagation(),H.preventDefault(),s.imageUploadFunction?N.uploadImagesUsingCustomFunction(s.imageUploadFunction,H.dataTransfer.files):N.uploadImages(H.dataTransfer.files)}),this.codemirror.on("paste",function(F,H){s.imageUploadFunction?N.uploadImagesUsingCustomFunction(s.imageUploadFunction,H.clipboardData.files):N.uploadImages(H.clipboardData.files)})}}A.prototype.uploadImages=function(s,p,x){if(s.length!==0){for(var C=[],T=0;T<s.length;T++)C.push(s[T].name),this.uploadImage(s[T],p,x);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",C.join(", ")))}},A.prototype.uploadImagesUsingCustomFunction=function(s,p){if(p.length!==0){for(var x=[],C=0;C<p.length;C++)x.push(p[C].name),this.uploadImageUsingCustomFunction(s,p[C]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",x.join(", ")))}},A.prototype.updateStatusBar=function(s,p){if(!!this.gui.statusbar){var x=this.gui.statusbar.getElementsByClassName(s);x.length===1?this.gui.statusbar.getElementsByClassName(s)[0].textContent=p:x.length===0?console.log("EasyMDE: status bar item "+s+" was not found."):console.log("EasyMDE: Several status bar items named "+s+" was found.")}},A.prototype.markdown=function(s){if(I){var p;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?p=this.options.renderingConfig.markedOptions:p={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?p.breaks=!1:p.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var x=this.options.renderingConfig.hljs||window.hljs;x&&(p.highlight=function(T,D){return D&&x.getLanguage(D)?x.highlight(D,T).value:x.highlightAuto(T).value})}I.setOptions(p);var C=I.parse(s);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(C=this.options.renderingConfig.sanitizerFunction.call(this,C)),C=G(C),C=j(C),C}},A.prototype.render=function(s){if(s||(s=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===s)return;this.element=s;var p=this.options,x=this,C={};for(var T in p.shortcuts)p.shortcuts[T]!==null&&S[T]!==null&&function(Oe){C[fe(p.shortcuts[Oe])]=function(){var Ge=S[Oe];typeof Ge=="function"?Ge(x):typeof Ge=="string"&&window.open(Ge,"_blank")}}(T);C.Enter="newlineAndIndentContinueMarkdownList",C.Tab="tabAndIndentMarkdownList",C["Shift-Tab"]="shiftTabAndUnindentMarkdownList",C.Esc=function(Oe){Oe.getOption("fullScreen")&&oe(x)},this.documentOnKeyDown=function(Oe){Oe=Oe||window.event,Oe.keyCode==27&&x.codemirror.getOption("fullScreen")&&oe(x)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var D,N;p.overlayMode?(q.defineMode("overlay-mode",function(Oe){return q.overlayMode(q.getMode(Oe,p.spellChecker!==!1?"spell-checker":"gfm"),p.overlayMode.mode,p.overlayMode.combine)}),D="overlay-mode",N=p.parsingConfig,N.gitHubSpice=!1):(D=p.parsingConfig,D.name="gfm",D.gitHubSpice=!1),p.spellChecker!==!1&&(D="spell-checker",N=p.parsingConfig,N.name="gfm",N.gitHubSpice=!1,typeof p.spellChecker=="function"?p.spellChecker({codeMirrorInstance:q}):Q({codeMirrorInstance:q}));function F(Oe,Ge,lt){return{addNew:!1}}if(this.codemirror=q.fromTextArea(s,{mode:D,backdrop:N,theme:p.theme!=null?p.theme:"easymde",tabSize:p.tabSize!=null?p.tabSize:2,indentUnit:p.tabSize!=null?p.tabSize:2,indentWithTabs:p.indentWithTabs!==!1,lineNumbers:p.lineNumbers===!0,autofocus:p.autofocus===!0,extraKeys:C,direction:p.direction,lineWrapping:p.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:p.placeholder||s.getAttribute("placeholder")||"",styleSelectedText:p.styleSelectedText!=null?p.styleSelectedText:!$(),scrollbarStyle:p.scrollbarStyle!=null?p.scrollbarStyle:"native",configureMouse:F,inputStyle:p.inputStyle!=null?p.inputStyle:$()?"contenteditable":"textarea",spellcheck:p.nativeSpellcheck!=null?p.nativeSpellcheck:!0,autoRefresh:p.autoRefresh!=null?p.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=p.minHeight,typeof p.maxHeight!="undefined"&&(this.codemirror.getScrollerElement().style.height=p.maxHeight),p.forceSync===!0){var H=this.codemirror;H.on("change",function(){H.save()})}this.gui={};var te=document.createElement("div");te.classList.add("EasyMDEContainer");var ye=this.codemirror.getWrapperElement();ye.parentNode.insertBefore(te,ye),te.appendChild(ye),p.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),p.status!==!1&&(this.gui.statusbar=this.createStatusbar()),p.autosave!=null&&p.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(x._autosave_timeout),x._autosave_timeout=setTimeout(function(){x.autosave()},x.options.autosave.submit_delay||x.options.autosave.delay||1e3)}));function Te(Oe,Ge){var lt,ht=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return Oe<ht?lt=Ge+"px":lt=Ge/Oe*100+"%",lt}var Be=this;function ve(Oe,Ge){Oe.setAttribute("data-img-src",Ge.url),Oe.setAttribute("style","--bg-image:url("+Ge.url+");--width:"+Ge.naturalWidth+"px;--height:"+Te(Ge.naturalWidth,Ge.naturalHeight)),Be.codemirror.setSize()}function qe(){!p.previewImagesInEditor||te.querySelectorAll(".cm-image-marker").forEach(function(Oe){var Ge=Oe.parentElement;if(!!Ge.innerText.match(/^!\[.*?\]\(.*\)/g)&&!Ge.hasAttribute("data-img-src")){var lt=Ge.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),lt&<.length>=2){var ht=lt[1];if(window.EMDEimagesCache[ht])ve(Ge,window.EMDEimagesCache[ht]);else{var bt=document.createElement("img");bt.onload=function(){window.EMDEimagesCache[ht]={naturalWidth:bt.naturalWidth,naturalHeight:bt.naturalHeight,url:ht},ve(Ge,window.EMDEimagesCache[ht])},bt.src=ht}}}})}this.codemirror.on("update",function(){qe()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var Ue=this.codemirror;setTimeout(function(){Ue.refresh()}.bind(Ue),0)},A.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function xe(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(s){return!1}else return!1;return!0}A.prototype.autosave=function(){if(xe()){var s=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(s.element.form!=null&&s.element.form!=null&&s.element.form.addEventListener("submit",function(){clearTimeout(s.autosaveTimeoutId),s.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+s.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var p=s.value();p!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,p):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var x=document.getElementById("autosaved");if(x!=null&&x!=null&&x!=""){var C=new Date,T=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(C),D=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;x.innerHTML=D+T}}else console.log("EasyMDE: localStorage not available, cannot autosave")},A.prototype.clearAutosavedValue=function(){if(xe()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},A.prototype.openBrowseFileWindow=function(s,p){var x=this,C=this.gui.toolbar.getElementsByClassName("imageInput")[0];C.click();function T(D){x.options.imageUploadFunction?x.uploadImagesUsingCustomFunction(x.options.imageUploadFunction,D.target.files):x.uploadImages(D.target.files,s,p),C.removeEventListener("change",T)}C.addEventListener("change",T)},A.prototype.uploadImage=function(s,p,x){var C=this;p=p||function(te){Ie(C,te)};function T(H){C.updateStatusBar("upload-image",H),setTimeout(function(){C.updateStatusBar("upload-image",C.options.imageTexts.sbInit)},1e4),x&&typeof x=="function"&&x(H),C.options.errorCallback(H)}function D(H){var te=C.options.imageTexts.sizeUnits.split(",");return H.replace("#image_name#",s.name).replace("#image_size#",yt(s.size,te)).replace("#image_max_size#",yt(C.options.imageMaxSize,te))}if(s.size>this.options.imageMaxSize){T(D(this.options.errorMessages.fileTooLarge));return}var N=new FormData;N.append("image",s),C.options.imageCSRFToken&&N.append("csrfmiddlewaretoken",C.options.imageCSRFToken);var F=new XMLHttpRequest;F.upload.onprogress=function(H){if(H.lengthComputable){var te=""+Math.round(H.loaded*100/H.total);C.updateStatusBar("upload-image",C.options.imageTexts.sbProgress.replace("#file_name#",s.name).replace("#progress#",te))}},F.open("POST",this.options.imageUploadEndpoint),F.onload=function(){try{var H=JSON.parse(this.responseText)}catch(te){console.error("EasyMDE: The server did not return a valid json."),T(D(C.options.errorMessages.importError));return}this.status===200&&H&&!H.error&&H.data&&H.data.filePath?p((C.options.imagePathAbsolute?"":window.location.origin+"/")+H.data.filePath):H.error&&H.error in C.options.errorMessages?T(D(C.options.errorMessages[H.error])):H.error?T(D(H.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),T(D(C.options.errorMessages.importError)))},F.onerror=function(H){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+H.target.status+" ("+H.target.statusText+")"),T(C.options.errorMessages.importError)},F.send(N)},A.prototype.uploadImageUsingCustomFunction=function(s,p){var x=this;function C(N){Ie(x,N)}function T(N){var F=D(N);x.updateStatusBar("upload-image",F),setTimeout(function(){x.updateStatusBar("upload-image",x.options.imageTexts.sbInit)},1e4),x.options.errorCallback(F)}function D(N){var F=x.options.imageTexts.sizeUnits.split(",");return N.replace("#image_name#",p.name).replace("#image_size#",yt(p.size,F)).replace("#image_max_size#",yt(x.options.imageMaxSize,F))}s.apply(this,[p,C,T])},A.prototype.setPreviewMaxHeight=function(){var s=this.codemirror,p=s.getWrapperElement(),x=p.nextSibling,C=parseInt(window.getComputedStyle(p).paddingTop),T=parseInt(window.getComputedStyle(p).borderTopWidth),D=parseInt(this.options.maxHeight),N=D+C*2+T*2,F=N.toString()+"px";x.style.height=F},A.prototype.createSideBySide=function(){var s=this.codemirror,p=s.getWrapperElement(),x=p.nextSibling;if(!x||!/editor-preview-side/.test(x.className)){if(x=document.createElement("div"),x.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var C=0;C<this.options.previewClass.length;C++)x.className+=" "+this.options.previewClass[C];else typeof this.options.previewClass=="string"&&(x.className+=" "+this.options.previewClass);p.parentNode.insertBefore(x,p.nextSibling)}if(typeof this.options.maxHeight!="undefined"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return x;var T=!1,D=!1;return s.on("scroll",function(N){if(T){T=!1;return}D=!0;var F=N.getScrollInfo().height-N.getScrollInfo().clientHeight,H=parseFloat(N.getScrollInfo().top)/F,te=(x.scrollHeight-x.clientHeight)*H;x.scrollTop=te}),x.onscroll=function(){if(D){D=!1;return}T=!0;var N=x.scrollHeight-x.clientHeight,F=parseFloat(x.scrollTop)/N,H=(s.getScrollInfo().height-s.getScrollInfo().clientHeight)*F;s.scrollTo(0,H)},x},A.prototype.createToolbar=function(s){if(s=s||this.options.toolbar,!(!s||s.length===0)){var p;for(p=0;p<s.length;p++)E[s[p]]!=null&&(s[p]=E[s[p]]);var x=document.createElement("div");x.className="editor-toolbar";var C=this,T={};for(C.toolbar=s,p=0;p<s.length;p++)if(!(s[p].name=="guide"&&C.options.toolbarGuideIcon===!1)&&!(C.options.hideIcons&&C.options.hideIcons.indexOf(s[p].name)!=-1)&&!((s[p].name=="fullscreen"||s[p].name=="side-by-side")&&$())){if(s[p]==="|"){for(var D=!1,N=p+1;N<s.length;N++)s[N]!=="|"&&(!C.options.hideIcons||C.options.hideIcons.indexOf(s[N].name)==-1)&&(D=!0);if(!D)continue}(function(te){var ye;if(te==="|"?ye=ee():te.children?ye=U(te,C.options.toolbarTips,C.options.shortcuts,C):ye=O(te,!0,C.options.toolbarTips,C.options.shortcuts,"button",C),T[te.name||te]=ye,x.appendChild(ye),te.name==="upload-image"){var Te=document.createElement("input");Te.className="imageInput",Te.type="file",Te.multiple=!0,Te.name="image",Te.accept=C.options.imageAccept,Te.style.display="none",Te.style.opacity=0,x.appendChild(Te)}})(s[p])}C.toolbar_div=x,C.toolbarElements=T;var F=this.codemirror;F.on("cursorActivity",function(){var te=X(F);for(var ye in T)(function(Te){var Be=T[Te];te[Te]?Be.className+=" active":Te!="fullscreen"&&Te!="side-by-side"&&(Be.className=Be.className.replace(/\s*active\s*/g,""))})(ye)});var H=F.getWrapperElement();return H.parentNode.insertBefore(x,H),x}},A.prototype.createStatusbar=function(s){s=s||this.options.status;var p=this.options,x=this.codemirror;if(!(!s||s.length===0)){var C=[],T,D,N,F;for(T=0;T<s.length;T++)if(D=void 0,N=void 0,F=void 0,typeof s[T]=="object")C.push({className:s[T].className,defaultValue:s[T].defaultValue,onUpdate:s[T].onUpdate,onActivity:s[T].onActivity});else{var H=s[T];H==="words"?(F=function(ve){ve.innerHTML=_(x.getValue())},D=function(ve){ve.innerHTML=_(x.getValue())}):H==="lines"?(F=function(ve){ve.innerHTML=x.lineCount()},D=function(ve){ve.innerHTML=x.lineCount()}):H==="cursor"?(F=function(ve){ve.innerHTML="1:1"},N=function(ve){var qe=x.getCursor(),Ue=qe.line+1,Oe=qe.ch+1;ve.innerHTML=Ue+":"+Oe}):H==="autosave"?F=function(ve){p.autosave!=null&&p.autosave.enabled===!0&&ve.setAttribute("id","autosaved")}:H==="upload-image"&&(F=function(ve){ve.innerHTML=p.imageTexts.sbInit}),C.push({className:H,defaultValue:F,onUpdate:D,onActivity:N})}var te=document.createElement("div");for(te.className="editor-statusbar",T=0;T<C.length;T++){var ye=C[T],Te=document.createElement("span");Te.className=ye.className,typeof ye.defaultValue=="function"&&ye.defaultValue(Te),typeof ye.onUpdate=="function"&&this.codemirror.on("update",function(ve,qe){return function(){qe.onUpdate(ve)}}(Te,ye)),typeof ye.onActivity=="function"&&this.codemirror.on("cursorActivity",function(ve,qe){return function(){qe.onActivity(ve)}}(Te,ye)),te.appendChild(Te)}var Be=this.codemirror.getWrapperElement();return Be.parentNode.insertBefore(te,Be.nextSibling),te}},A.prototype.value=function(s){var p=this.codemirror;if(s===void 0)return p.getValue();if(p.getDoc().setValue(s),this.isPreviewActive()){var x=p.getWrapperElement(),C=x.lastChild;C.innerHTML=this.options.previewRender(s,C)}return this},A.toggleBold=ae,A.toggleItalic=ze,A.toggleStrikethrough=ie,A.toggleBlockquote=Z,A.toggleHeadingSmaller=Re,A.toggleHeadingBigger=R,A.toggleHeading1=le,A.toggleHeading2=J,A.toggleHeading3=ke,A.toggleCodeBlock=Le,A.toggleUnorderedList=$e,A.toggleOrderedList=ct,A.cleanBlock=et,A.drawLink=v,A.drawImage=c,A.drawUploadedImage=De,A.drawTable=Ae,A.drawHorizontalRule=We,A.undo=wt,A.redo=at,A.togglePreview=we,A.toggleSideBySide=Ke,A.toggleFullScreen=oe,A.prototype.toggleBold=function(){ae(this)},A.prototype.toggleItalic=function(){ze(this)},A.prototype.toggleStrikethrough=function(){ie(this)},A.prototype.toggleBlockquote=function(){Z(this)},A.prototype.toggleHeadingSmaller=function(){Re(this)},A.prototype.toggleHeadingBigger=function(){R(this)},A.prototype.toggleHeading1=function(){le(this)},A.prototype.toggleHeading2=function(){J(this)},A.prototype.toggleHeading3=function(){ke(this)},A.prototype.toggleCodeBlock=function(){Le(this)},A.prototype.toggleUnorderedList=function(){$e(this)},A.prototype.toggleOrderedList=function(){ct(this)},A.prototype.cleanBlock=function(){et(this)},A.prototype.drawLink=function(){v(this)},A.prototype.drawImage=function(){c(this)},A.prototype.drawUploadedImage=function(){De(this)},A.prototype.drawTable=function(){Ae(this)},A.prototype.drawHorizontalRule=function(){We(this)},A.prototype.undo=function(){wt(this)},A.prototype.redo=function(){at(this)},A.prototype.togglePreview=function(){we(this)},A.prototype.toggleSideBySide=function(){Ke(this)},A.prototype.toggleFullScreen=function(){oe(this)},A.prototype.isPreviewActive=function(){var s=this.codemirror,p=s.getWrapperElement(),x=p.lastChild;return/editor-preview-active/.test(x.className)},A.prototype.isSideBySideActive=function(){var s=this.codemirror,p=s.getWrapperElement(),x=p.nextSibling;return/editor-preview-active-side/.test(x.className)},A.prototype.isFullscreenActive=function(){var s=this.codemirror;return s.getOption("fullScreen")},A.prototype.getState=function(){var s=this.codemirror;return X(s)},A.prototype.toTextArea=function(){var s=this.codemirror,p=s.getWrapperElement(),x=p.parentNode;x&&(this.gui.toolbar&&x.removeChild(this.gui.toolbar),this.gui.statusbar&&x.removeChild(this.gui.statusbar),this.gui.sideBySide&&x.removeChild(this.gui.sideBySide)),x.parentNode.insertBefore(p,x),x.remove(),s.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},ft.exports=A},"./node_modules/typo-js/typo.js":function(ft,_e,Ce){var q="/",Q;(function(){"use strict";Q=function(I,z,w,S){S=S||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=S.flags||{},this.memoized={},this.loaded=!1;var B=this,Y,$,G,j,fe;I&&(B.dictionary=I,z&&w?be():typeof window!="undefined"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(S.dictionaryPath?Y=S.dictionaryPath:Y="typo/dictionaries",z||ue(chrome.extension.getURL(Y+"/"+I+"/"+I+".aff"),pe),w||ue(chrome.extension.getURL(Y+"/"+I+"/"+I+".dic"),ge)):(S.dictionaryPath?Y=S.dictionaryPath:Y=q+"/dictionaries",z||ue(Y+"/"+I+"/"+I+".aff",pe),w||ue(Y+"/"+I+"/"+I+".dic",ge)));function ue(U,O){var ee=B._readFile(U,null,S.asyncLoad);S.asyncLoad?ee.then(function(ne){O(ne)}):O(ee)}function pe(U){z=U,w&&be()}function ge(U){w=U,z&&be()}function be(){for(B.rules=B._parseAFF(z),B.compoundRuleCodes={},$=0,j=B.compoundRules.length;$<j;$++){var U=B.compoundRules[$];for(G=0,fe=U.length;G<fe;G++)B.compoundRuleCodes[U[G]]=[]}"ONLYINCOMPOUND"in B.flags&&(B.compoundRuleCodes[B.flags.ONLYINCOMPOUND]=[]),B.dictionaryTable=B._parseDIC(w);for($ in B.compoundRuleCodes)B.compoundRuleCodes[$].length===0&&delete B.compoundRuleCodes[$];for($=0,j=B.compoundRules.length;$<j;$++){var O=B.compoundRules[$],ee="";for(G=0,fe=O.length;G<fe;G++){var ne=O[G];ne in B.compoundRuleCodes?ee+="("+B.compoundRuleCodes[ne].join("|")+")":ee+=ne}B.compoundRules[$]=new RegExp(ee,"i")}B.loaded=!0,S.asyncLoad&&S.loadedCallback&&S.loadedCallback(B)}return this},Q.prototype={load:function(I){for(var z in I)I.hasOwnProperty(z)&&(this[z]=I[z]);return this},_readFile:function(I,z,w){if(z=z||"utf8",typeof XMLHttpRequest!="undefined"){var S,B=new XMLHttpRequest;return B.open("GET",I,w),w&&(S=new Promise(function($,G){B.onload=function(){B.status===200?$(B.responseText):G(B.statusText)},B.onerror=function(){G(B.statusText)}})),B.overrideMimeType&&B.overrideMimeType("text/plain; charset="+z),B.send(null),w?S:B.responseText}else{var Y=Ce("?b2fd");try{if(Y.existsSync(I))return Y.readFileSync(I,z);console.log("Path "+I+" does not exist.")}catch($){return console.log($),""}}},_parseAFF:function(I){var z={},w,S,B,Y,$,G,j,fe,ue=I.split(/\r?\n/);for($=0,j=ue.length;$<j;$++)if(w=this._removeAffixComments(ue[$]),w=w.trim(),!!w){var pe=w.split(/\s+/),ge=pe[0];if(ge=="PFX"||ge=="SFX"){var be=pe[1],U=pe[2];B=parseInt(pe[3],10);var O=[];for(G=$+1,fe=$+1+B;G<fe;G++){S=ue[G],Y=S.split(/\s+/);var ee=Y[2],ne=Y[3].split("/"),X=ne[0];X==="0"&&(X="");var se=this.parseRuleCodes(ne[1]),oe=Y[4],ae={};ae.add=X,se.length>0&&(ae.continuationClasses=se),oe!=="."&&(ge==="SFX"?ae.match=new RegExp(oe+"$"):ae.match=new RegExp("^"+oe)),ee!="0"&&(ge==="SFX"?ae.remove=new RegExp(ee+"$"):ae.remove=ee),O.push(ae)}z[be]={type:ge,combineable:U=="Y",entries:O},$+=B}else if(ge==="COMPOUNDRULE"){for(B=parseInt(pe[1],10),G=$+1,fe=$+1+B;G<fe;G++)w=ue[G],Y=w.split(/\s+/),this.compoundRules.push(Y[1]);$+=B}else ge==="REP"?(Y=w.split(/\s+/),Y.length===3&&this.replacementTable.push([Y[1],Y[2]])):this.flags[ge]=pe[1]}return z},_removeAffixComments:function(I){return I.match(/^\s*#/,"")?"":I},_parseDIC:function(I){I=this._removeDicComments(I);var z=I.split(/\r?\n/),w={};function S(Z,Re){w.hasOwnProperty(Z)||(w[Z]=null),Re.length>0&&(w[Z]===null&&(w[Z]=[]),w[Z].push(Re))}for(var B=1,Y=z.length;B<Y;B++){var $=z[B];if(!!$){var G=$.split("/",2),j=G[0];if(G.length>1){var fe=this.parseRuleCodes(G[1]);(!("NEEDAFFIX"in this.flags)||fe.indexOf(this.flags.NEEDAFFIX)==-1)&&S(j,fe);for(var ue=0,pe=fe.length;ue<pe;ue++){var ge=fe[ue],be=this.rules[ge];if(be)for(var U=this._applyRule(j,be),O=0,ee=U.length;O<ee;O++){var ne=U[O];if(S(ne,[]),be.combineable)for(var X=ue+1;X<pe;X++){var se=fe[X],oe=this.rules[se];if(oe&&oe.combineable&&be.type!=oe.type)for(var ae=this._applyRule(ne,oe),ze=0,ie=ae.length;ze<ie;ze++){var Le=ae[ze];S(Le,[])}}}ge in this.compoundRuleCodes&&this.compoundRuleCodes[ge].push(j)}}else S(j.trim(),[])}}return w},_removeDicComments:function(I){return I=I.replace(/^\t.*$/mg,""),I},parseRuleCodes:function(I){if(I)if("FLAG"in this.flags){if(this.flags.FLAG==="long"){for(var z=[],w=0,S=I.length;w<S;w+=2)z.push(I.substr(w,2));return z}else if(this.flags.FLAG==="num")return I.split(",")}else return I.split("");else return[]},_applyRule:function(I,z){for(var w=z.entries,S=[],B=0,Y=w.length;B<Y;B++){var $=w[B];if(!$.match||I.match($.match)){var G=I;if($.remove&&(G=G.replace($.remove,"")),z.type==="SFX"?G=G+$.add:G=$.add+G,S.push(G),"continuationClasses"in $)for(var j=0,fe=$.continuationClasses.length;j<fe;j++){var ue=this.rules[$.continuationClasses[j]];ue&&(S=S.concat(this._applyRule(G,ue)))}}}return S},check:function(I){if(!this.loaded)throw"Dictionary not loaded.";var z=I.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(z))return!0;if(z.toUpperCase()===z){var w=z[0]+z.substring(1).toLowerCase();if(this.hasFlag(w,"KEEPCASE"))return!1;if(this.checkExact(w)||this.checkExact(z.toLowerCase()))return!0}var S=z[0].toLowerCase()+z.substring(1);if(S!==z){if(this.hasFlag(S,"KEEPCASE"))return!1;if(this.checkExact(S))return!0}return!1},checkExact:function(I){if(!this.loaded)throw"Dictionary not loaded.";var z=this.dictionaryTable[I],w,S;if(typeof z=="undefined"){if("COMPOUNDMIN"in this.flags&&I.length>=this.flags.COMPOUNDMIN){for(w=0,S=this.compoundRules.length;w<S;w++)if(I.match(this.compoundRules[w]))return!0}}else{if(z===null)return!0;if(typeof z=="object"){for(w=0,S=z.length;w<S;w++)if(!this.hasFlag(I,"ONLYINCOMPOUND",z[w]))return!0}}return!1},hasFlag:function(I,z,w){if(!this.loaded)throw"Dictionary not loaded.";return!!(z in this.flags&&(typeof w=="undefined"&&(w=Array.prototype.concat.apply([],this.dictionaryTable[I])),w&&w.indexOf(this.flags[z])!==-1))},alphabet:"",suggest:function(I,z){if(!this.loaded)throw"Dictionary not loaded.";if(z=z||5,this.memoized.hasOwnProperty(I)){var w=this.memoized[I].limit;if(z<=w||this.memoized[I].suggestions.length<w)return this.memoized[I].suggestions.slice(0,z)}if(this.check(I))return[];for(var S=0,B=this.replacementTable.length;S<B;S++){var Y=this.replacementTable[S];if(I.indexOf(Y[0])!==-1){var $=I.replace(Y[0],Y[1]);if(this.check($))return[$]}}var G=this;G.alphabet="abcdefghijklmnopqrstuvwxyz";function j(ue,pe){var ge={},be,U,O,ee,ne,X,se=G.alphabet.length;if(typeof ue=="string"){var oe=ue;ue={},ue[oe]=!0}for(var oe in ue)for(be=0,ee=oe.length+1;be<ee;be++){var ae=[oe.substring(0,be),oe.substring(be)];if(ae[1]&&(X=ae[0]+ae[1].substring(1),(!pe||G.check(X))&&(X in ge?ge[X]+=1:ge[X]=1)),ae[1].length>1&&ae[1][1]!==ae[1][0]&&(X=ae[0]+ae[1][1]+ae[1][0]+ae[1].substring(2),(!pe||G.check(X))&&(X in ge?ge[X]+=1:ge[X]=1)),ae[1]){var ze=ae[1].substring(0,1).toUpperCase()===ae[1].substring(0,1)?"uppercase":"lowercase";for(U=0;U<se;U++){var ie=G.alphabet[U];ze==="uppercase"&&(ie=ie.toUpperCase()),ie!=ae[1].substring(0,1)&&(X=ae[0]+ie+ae[1].substring(1),(!pe||G.check(X))&&(X in ge?ge[X]+=1:ge[X]=1))}}if(ae[1])for(U=0;U<se;U++){var ze=ae[0].substring(-1).toUpperCase()===ae[0].substring(-1)&&ae[1].substring(0,1).toUpperCase()===ae[1].substring(0,1)?"uppercase":"lowercase",ie=G.alphabet[U];ze==="uppercase"&&(ie=ie.toUpperCase()),X=ae[0]+ie+ae[1],(!pe||G.check(X))&&(X in ge?ge[X]+=1:ge[X]=1)}}return ge}function fe(ue){var pe=j(ue),ge=j(pe,!0),be=ge;for(var U in pe)!G.check(U)||(U in be?be[U]+=pe[U]:be[U]=pe[U]);var O,ee,ne=[];for(O in be)be.hasOwnProperty(O)&&ne.push([O,be[O]]);function X(ze,ie){var Le=ze[1],Z=ie[1];return Le<Z?-1:Le>Z?1:ie[0].localeCompare(ze[0])}ne.sort(X).reverse();var se=[],oe="lowercase";ue.toUpperCase()===ue?oe="uppercase":ue.substr(0,1).toUpperCase()+ue.substr(1).toLowerCase()===ue&&(oe="capitalized");var ae=z;for(O=0;O<Math.min(ae,ne.length);O++)oe==="uppercase"?ne[O][0]=ne[O][0].toUpperCase():oe==="capitalized"&&(ne[O][0]=ne[O][0].substr(0,1).toUpperCase()+ne[O][0].substr(1)),!G.hasFlag(ne[O][0],"NOSUGGEST")&&se.indexOf(ne[O][0])==-1?se.push(ne[O][0]):ae++;return se}return this.memoized[I]={suggestions:fe(I),limit:z},this.memoized[I].suggestions}}})(),ft.exports=Q},"?b2fd":function(){},"./node_modules/marked/lib/marked.cjs":function(ft,_e){"use strict";var Ce;Ce={value:!0};function q(_,E){for(var M=0;M<E.length;M++){var h=E[M];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function Q(_,E,M){return E&&q(_.prototype,E),M&&q(_,M),Object.defineProperty(_,"prototype",{writable:!1}),_}function I(_,E){if(!!_){if(typeof _=="string")return z(_,E);var M=Object.prototype.toString.call(_).slice(8,-1);if(M==="Object"&&_.constructor&&(M=_.constructor.name),M==="Map"||M==="Set")return Array.from(_);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return z(_,E)}}function z(_,E){(E==null||E>_.length)&&(E=_.length);for(var M=0,h=new Array(E);M<E;M++)h[M]=_[M];return h}function w(_,E){var M=typeof Symbol!="undefined"&&_[Symbol.iterator]||_["@@iterator"];if(M)return(M=M.call(_)).next.bind(M);if(Array.isArray(_)||(M=I(_))||E&&_&&typeof _.length=="number"){M&&(_=M);var h=0;return function(){return h>=_.length?{done:!0}:{done:!1,value:_[h++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}_e.ce=S();function B(_){_e.ce=_}var Y=/[&<>"']/,$=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,j=/[<>"']|&(?!#?\w+;)/g,fe={"&":"&","<":"<",">":">",'"':""","'":"'"},ue=function(E){return fe[E]};function pe(_,E){if(E){if(Y.test(_))return _.replace($,ue)}else if(G.test(_))return _.replace(j,ue);return _}var ge=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function be(_){return _.replace(ge,function(E,M){return M=M.toLowerCase(),M==="colon"?":":M.charAt(0)==="#"?M.charAt(1)==="x"?String.fromCharCode(parseInt(M.substring(2),16)):String.fromCharCode(+M.substring(1)):""})}var U=/(^|[^\[])\^/g;function O(_,E){_=typeof _=="string"?_:_.source,E=E||"";var M={replace:function(d,b){return b=b.source||b,b=b.replace(U,"$1"),_=_.replace(d,b),M},getRegex:function(){return new RegExp(_,E)}};return M}var ee=/[^\w:]/g,ne=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function X(_,E,M){if(_){var h;try{h=decodeURIComponent(be(M)).replace(ee,"").toLowerCase()}catch(d){return null}if(h.indexOf("javascript:")===0||h.indexOf("vbscript:")===0||h.indexOf("data:")===0)return null}E&&!ne.test(M)&&(M=ie(E,M));try{M=encodeURI(M).replace(/%25/g,"%")}catch(d){return null}return M}var se={},oe=/^[^:]+:\/*[^/]*$/,ae=/^([^:]+:)[\s\S]*$/,ze=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(_,E){se[" "+_]||(oe.test(_)?se[" "+_]=_+"/":se[" "+_]=R(_,"/",!0)),_=se[" "+_];var M=_.indexOf(":")===-1;return E.substring(0,2)==="//"?M?E:_.replace(ae,"$1")+E:E.charAt(0)==="/"?M?E:_.replace(ze,"$1")+E:_+E}var Le={exec:function(){}};function Z(_){for(var E=1,M,h;E<arguments.length;E++){M=arguments[E];for(h in M)Object.prototype.hasOwnProperty.call(M,h)&&(_[h]=M[h])}return _}function Re(_,E){var M=_.replace(/\|/g,function(b,y,P){for(var A=!1,xe=y;--xe>=0&&P[xe]==="\\";)A=!A;return A?"|":" |"}),h=M.split(/ \|/),d=0;if(h[0].trim()||h.shift(),h.length>0&&!h[h.length-1].trim()&&h.pop(),h.length>E)h.splice(E);else for(;h.length<E;)h.push("");for(;d<h.length;d++)h[d]=h[d].trim().replace(/\\\|/g,"|");return h}function R(_,E,M){var h=_.length;if(h===0)return"";for(var d=0;d<h;){var b=_.charAt(h-d-1);if(b===E&&!M)d++;else if(b!==E&&M)d++;else break}return _.slice(0,h-d)}function le(_,E){if(_.indexOf(E[1])===-1)return-1;for(var M=_.length,h=0,d=0;d<M;d++)if(_[d]==="\\")d++;else if(_[d]===E[0])h++;else if(_[d]===E[1]&&(h--,h<0))return d;return-1}function J(_){_&&_.sanitize&&!_.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ke(_,E){if(E<1)return"";for(var M="";E>1;)E&1&&(M+=_),E>>=1,_+=_;return M+_}function $e(_,E,M,h){var d=E.href,b=E.title?pe(E.title):null,y=_[1].replace(/\\([\[\]])/g,"$1");if(_[0].charAt(0)!=="!"){h.state.inLink=!0;var P={type:"link",raw:M,href:d,title:b,text:y,tokens:h.inlineTokens(y,[])};return h.state.inLink=!1,P}return{type:"image",raw:M,href:d,title:b,text:pe(y)}}function ct(_,E){var M=_.match(/^(\s+)(?:```)/);if(M===null)return E;var h=M[1];return E.split(`
|
|
`).map(function(d){var b=d.match(/^\s+/);if(b===null)return d;var y=b[0];return y.length>=h.length?d.slice(h.length):d}).join(`
|
|
`)}var et=function(){function _(M){this.options=M||_e.ce}var E=_.prototype;return E.space=function(h){var d=this.rules.block.newline.exec(h);if(d&&d[0].length>0)return{type:"space",raw:d[0]}},E.code=function(h){var d=this.rules.block.code.exec(h);if(d){var b=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?b:R(b,`
|
|
`)}}},E.fences=function(h){var d=this.rules.block.fences.exec(h);if(d){var b=d[0],y=ct(b,d[3]||"");return{type:"code",raw:b,lang:d[2]?d[2].trim():d[2],text:y}}},E.heading=function(h){var d=this.rules.block.heading.exec(h);if(d){var b=d[2].trim();if(/#$/.test(b)){var y=R(b,"#");(this.options.pedantic||!y||/ $/.test(y))&&(b=y.trim())}var P={type:"heading",raw:d[0],depth:d[1].length,text:b,tokens:[]};return this.lexer.inline(P.text,P.tokens),P}},E.hr=function(h){var d=this.rules.block.hr.exec(h);if(d)return{type:"hr",raw:d[0]}},E.blockquote=function(h){var d=this.rules.block.blockquote.exec(h);if(d){var b=d[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:d[0],tokens:this.lexer.blockTokens(b,[]),text:b}}},E.list=function(h){var d=this.rules.block.list.exec(h);if(d){var b,y,P,A,xe,s,p,x,C,T,D,N,F=d[1].trim(),H=F.length>1,te={type:"list",raw:"",ordered:H,start:H?+F.slice(0,-1):"",loose:!1,items:[]};F=H?"\\d{1,9}\\"+F.slice(-1):"\\"+F,this.options.pedantic&&(F=H?F:"[*+-]");for(var ye=new RegExp("^( {0,3}"+F+")((?:[ ][^\\n]*)?(?:\\n|$))");h&&(N=!1,!(!(d=ye.exec(h))||this.rules.block.hr.test(h)));){if(b=d[0],h=h.substring(b.length),x=d[2].split(`
|
|
`,1)[0],C=h.split(`
|
|
`,1)[0],this.options.pedantic?(A=2,D=x.trimLeft()):(A=d[2].search(/[^ ]/),A=A>4?1:A,D=x.slice(A),A+=d[1].length),s=!1,!x&&/^ *$/.test(C)&&(b+=C+`
|
|
`,h=h.substring(C.length+1),N=!0),!N)for(var Te=new RegExp("^ {0,"+Math.min(3,A-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Be=new RegExp("^ {0,"+Math.min(3,A-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");h&&(T=h.split(`
|
|
`,1)[0],x=T,this.options.pedantic&&(x=x.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Te.test(x)||Be.test(h)));){if(x.search(/[^ ]/)>=A||!x.trim())D+=`
|
|
`+x.slice(A);else if(!s)D+=`
|
|
`+x;else break;!s&&!x.trim()&&(s=!0),b+=T+`
|
|
`,h=h.substring(T.length+1)}te.loose||(p?te.loose=!0:/\n *\n *$/.test(b)&&(p=!0)),this.options.gfm&&(y=/^\[[ xX]\] /.exec(D),y&&(P=y[0]!=="[ ] ",D=D.replace(/^\[[ xX]\] +/,""))),te.items.push({type:"list_item",raw:b,task:!!y,checked:P,loose:!1,text:D}),te.raw+=b}te.items[te.items.length-1].raw=b.trimRight(),te.items[te.items.length-1].text=D.trimRight(),te.raw=te.raw.trimRight();var ve=te.items.length;for(xe=0;xe<ve;xe++){this.lexer.state.top=!1,te.items[xe].tokens=this.lexer.blockTokens(te.items[xe].text,[]);var qe=te.items[xe].tokens.filter(function(Oe){return Oe.type==="space"}),Ue=qe.every(function(Oe){for(var Ge=Oe.raw.split(""),lt=0,ht=w(Ge),bt;!(bt=ht()).done;){var Vt=bt.value;if(Vt===`
|
|
`&&(lt+=1),lt>1)return!0}return!1});!te.loose&&qe.length&&Ue&&(te.loose=!0,te.items[xe].loose=!0)}return te}},E.html=function(h){var d=this.rules.block.html.exec(h);if(d){var b={type:"html",raw:d[0],pre:!this.options.sanitizer&&(d[1]==="pre"||d[1]==="script"||d[1]==="style"),text:d[0]};return this.options.sanitize&&(b.type="paragraph",b.text=this.options.sanitizer?this.options.sanitizer(d[0]):pe(d[0]),b.tokens=[],this.lexer.inline(b.text,b.tokens)),b}},E.def=function(h){var d=this.rules.block.def.exec(h);if(d){d[3]&&(d[3]=d[3].substring(1,d[3].length-1));var b=d[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:b,raw:d[0],href:d[2],title:d[3]}}},E.table=function(h){var d=this.rules.block.table.exec(h);if(d){var b={type:"table",header:Re(d[1]).map(function(p){return{text:p}}),align:d[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:d[3]&&d[3].trim()?d[3].replace(/\n[ \t]*$/,"").split(`
|
|
`):[]};if(b.header.length===b.align.length){b.raw=d[0];var y=b.align.length,P,A,xe,s;for(P=0;P<y;P++)/^ *-+: *$/.test(b.align[P])?b.align[P]="right":/^ *:-+: *$/.test(b.align[P])?b.align[P]="center":/^ *:-+ *$/.test(b.align[P])?b.align[P]="left":b.align[P]=null;for(y=b.rows.length,P=0;P<y;P++)b.rows[P]=Re(b.rows[P],b.header.length).map(function(p){return{text:p}});for(y=b.header.length,A=0;A<y;A++)b.header[A].tokens=[],this.lexer.inline(b.header[A].text,b.header[A].tokens);for(y=b.rows.length,A=0;A<y;A++)for(s=b.rows[A],xe=0;xe<s.length;xe++)s[xe].tokens=[],this.lexer.inline(s[xe].text,s[xe].tokens);return b}}},E.lheading=function(h){var d=this.rules.block.lheading.exec(h);if(d){var b={type:"heading",raw:d[0],depth:d[2].charAt(0)==="="?1:2,text:d[1],tokens:[]};return this.lexer.inline(b.text,b.tokens),b}},E.paragraph=function(h){var d=this.rules.block.paragraph.exec(h);if(d){var b={type:"paragraph",raw:d[0],text:d[1].charAt(d[1].length-1)===`
|
|
`?d[1].slice(0,-1):d[1],tokens:[]};return this.lexer.inline(b.text,b.tokens),b}},E.text=function(h){var d=this.rules.block.text.exec(h);if(d){var b={type:"text",raw:d[0],text:d[0],tokens:[]};return this.lexer.inline(b.text,b.tokens),b}},E.escape=function(h){var d=this.rules.inline.escape.exec(h);if(d)return{type:"escape",raw:d[0],text:pe(d[1])}},E.tag=function(h){var d=this.rules.inline.tag.exec(h);if(d)return!this.lexer.state.inLink&&/^<a /i.test(d[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(d[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(d[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(d[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:d[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(d[0]):pe(d[0]):d[0]}},E.link=function(h){var d=this.rules.inline.link.exec(h);if(d){var b=d[2].trim();if(!this.options.pedantic&&/^</.test(b)){if(!/>$/.test(b))return;var y=R(b.slice(0,-1),"\\");if((b.length-y.length)%2===0)return}else{var P=le(d[2],"()");if(P>-1){var A=d[0].indexOf("!")===0?5:4,xe=A+d[1].length+P;d[2]=d[2].substring(0,P),d[0]=d[0].substring(0,xe).trim(),d[3]=""}}var s=d[2],p="";if(this.options.pedantic){var x=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);x&&(s=x[1],p=x[3])}else p=d[3]?d[3].slice(1,-1):"";return s=s.trim(),/^</.test(s)&&(this.options.pedantic&&!/>$/.test(b)?s=s.slice(1):s=s.slice(1,-1)),$e(d,{href:s&&s.replace(this.rules.inline._escapes,"$1"),title:p&&p.replace(this.rules.inline._escapes,"$1")},d[0],this.lexer)}},E.reflink=function(h,d){var b;if((b=this.rules.inline.reflink.exec(h))||(b=this.rules.inline.nolink.exec(h))){var y=(b[2]||b[1]).replace(/\s+/g," ");if(y=d[y.toLowerCase()],!y||!y.href){var P=b[0].charAt(0);return{type:"text",raw:P,text:P}}return $e(b,y,b[0],this.lexer)}},E.emStrong=function(h,d,b){b===void 0&&(b="");var y=this.rules.inline.emStrong.lDelim.exec(h);if(!!y&&!(y[3]&&b.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var P=y[1]||y[2]||"";if(!P||P&&(b===""||this.rules.inline.punctuation.exec(b))){var A=y[0].length-1,xe,s,p=A,x=0,C=y[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(C.lastIndex=0,d=d.slice(-1*h.length+A);(y=C.exec(d))!=null;)if(xe=y[1]||y[2]||y[3]||y[4]||y[5]||y[6],!!xe){if(s=xe.length,y[3]||y[4]){p+=s;continue}else if((y[5]||y[6])&&A%3&&!((A+s)%3)){x+=s;continue}if(p-=s,!(p>0)){if(s=Math.min(s,s+p+x),Math.min(A,s)%2){var T=h.slice(1,A+y.index+s);return{type:"em",raw:h.slice(0,A+y.index+s+1),text:T,tokens:this.lexer.inlineTokens(T,[])}}var D=h.slice(2,A+y.index+s-1);return{type:"strong",raw:h.slice(0,A+y.index+s+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}}}}},E.codespan=function(h){var d=this.rules.inline.code.exec(h);if(d){var b=d[2].replace(/\n/g," "),y=/[^ ]/.test(b),P=/^ /.test(b)&&/ $/.test(b);return y&&P&&(b=b.substring(1,b.length-1)),b=pe(b,!0),{type:"codespan",raw:d[0],text:b}}},E.br=function(h){var d=this.rules.inline.br.exec(h);if(d)return{type:"br",raw:d[0]}},E.del=function(h){var d=this.rules.inline.del.exec(h);if(d)return{type:"del",raw:d[0],text:d[2],tokens:this.lexer.inlineTokens(d[2],[])}},E.autolink=function(h,d){var b=this.rules.inline.autolink.exec(h);if(b){var y,P;return b[2]==="@"?(y=pe(this.options.mangle?d(b[1]):b[1]),P="mailto:"+y):(y=pe(b[1]),P=y),{type:"link",raw:b[0],text:y,href:P,tokens:[{type:"text",raw:y,text:y}]}}},E.url=function(h,d){var b;if(b=this.rules.inline.url.exec(h)){var y,P;if(b[2]==="@")y=pe(this.options.mangle?d(b[0]):b[0]),P="mailto:"+y;else{var A;do A=b[0],b[0]=this.rules.inline._backpedal.exec(b[0])[0];while(A!==b[0]);y=pe(b[0]),b[1]==="www."?P="http://"+y:P=y}return{type:"link",raw:b[0],text:y,href:P,tokens:[{type:"text",raw:y,text:y}]}}},E.inlineText=function(h,d){var b=this.rules.inline.text.exec(h);if(b){var y;return this.lexer.state.inRawBlock?y=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):pe(b[0]):b[0]:y=pe(this.options.smartypants?d(b[0]):b[0]),{type:"text",raw:b[0],text:y}}},_}(),v={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};v._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,v._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,v.def=O(v.def).replace("label",v._label).replace("title",v._title).getRegex(),v.bullet=/(?:[*+-]|\d{1,9}[.)])/,v.listItemStart=O(/^( *)(bull) */).replace("bull",v.bullet).getRegex(),v.list=O(v.list).replace(/bull/g,v.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+v.def.source+")").getRegex(),v._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",v._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,v.html=O(v.html,"i").replace("comment",v._comment).replace("tag",v._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v.paragraph=O(v._paragraph).replace("hr",v.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v._tag).getRegex(),v.blockquote=O(v.blockquote).replace("paragraph",v.paragraph).getRegex(),v.normal=Z({},v),v.gfm=Z({},v.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),v.gfm.table=O(v.gfm.table).replace("hr",v.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v._tag).getRegex(),v.gfm.paragraph=O(v._paragraph).replace("hr",v.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",v.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v._tag).getRegex(),v.pedantic=Z({},v.normal,{html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",v._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Le,paragraph:O(v.normal._paragraph).replace("hr",v.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",v.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var c={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Le,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Le,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};c._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",c.punctuation=O(c.punctuation).replace(/punctuation/g,c._punctuation).getRegex(),c.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,c.escapedEmSt=/\\\*|\\_/g,c._comment=O(v._comment).replace("(?:-->|$)","-->").getRegex(),c.emStrong.lDelim=O(c.emStrong.lDelim).replace(/punct/g,c._punctuation).getRegex(),c.emStrong.rDelimAst=O(c.emStrong.rDelimAst,"g").replace(/punct/g,c._punctuation).getRegex(),c.emStrong.rDelimUnd=O(c.emStrong.rDelimUnd,"g").replace(/punct/g,c._punctuation).getRegex(),c._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,c._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,c._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,c.autolink=O(c.autolink).replace("scheme",c._scheme).replace("email",c._email).getRegex(),c._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,c.tag=O(c.tag).replace("comment",c._comment).replace("attribute",c._attribute).getRegex(),c._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,c._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,c._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,c.link=O(c.link).replace("label",c._label).replace("href",c._href).replace("title",c._title).getRegex(),c.reflink=O(c.reflink).replace("label",c._label).replace("ref",v._label).getRegex(),c.nolink=O(c.nolink).replace("ref",v._label).getRegex(),c.reflinkSearch=O(c.reflinkSearch,"g").replace("reflink",c.reflink).replace("nolink",c.nolink).getRegex(),c.normal=Z({},c),c.pedantic=Z({},c.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",c._label).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",c._label).getRegex()}),c.gfm=Z({},c.normal,{escape:O(c.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),c.gfm.url=O(c.gfm.url,"i").replace("email",c.gfm._extended_email).getRegex(),c.breaks=Z({},c.gfm,{br:O(c.br).replace("{2,}","*").getRegex(),text:O(c.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function De(_){return _.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ie(_){var E="",M,h,d=_.length;for(M=0;M<d;M++)h=_.charCodeAt(M),Math.random()>.5&&(h="x"+h.toString(16)),E+="&#"+h+";";return E}var Ae=function(){function _(M){this.tokens=[],this.tokens.links=Object.create(null),this.options=M||_e.ce,this.options.tokenizer=this.options.tokenizer||new et,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var h={block:v.normal,inline:c.normal};this.options.pedantic?(h.block=v.pedantic,h.inline=c.pedantic):this.options.gfm&&(h.block=v.gfm,this.options.breaks?h.inline=c.breaks:h.inline=c.gfm),this.tokenizer.rules=h}_.lex=function(h,d){var b=new _(d);return b.lex(h)},_.lexInline=function(h,d){var b=new _(d);return b.inlineTokens(h)};var E=_.prototype;return E.lex=function(h){h=h.replace(/\r\n|\r/g,`
|
|
`),this.blockTokens(h,this.tokens);for(var d;d=this.inlineQueue.shift();)this.inlineTokens(d.src,d.tokens);return this.tokens},E.blockTokens=function(h,d){var b=this;d===void 0&&(d=[]),this.options.pedantic?h=h.replace(/\t/g," ").replace(/^ +$/gm,""):h=h.replace(/^( *)(\t+)/gm,function(p,x,C){return x+" ".repeat(C.length)});for(var y,P,A,xe;h;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(p){return(y=p.call({lexer:b},h,d))?(h=h.substring(y.raw.length),d.push(y),!0):!1}))){if(y=this.tokenizer.space(h)){h=h.substring(y.raw.length),y.raw.length===1&&d.length>0?d[d.length-1].raw+=`
|
|
`:d.push(y);continue}if(y=this.tokenizer.code(h)){h=h.substring(y.raw.length),P=d[d.length-1],P&&(P.type==="paragraph"||P.type==="text")?(P.raw+=`
|
|
`+y.raw,P.text+=`
|
|
`+y.text,this.inlineQueue[this.inlineQueue.length-1].src=P.text):d.push(y);continue}if(y=this.tokenizer.fences(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.heading(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.hr(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.blockquote(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.list(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.html(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.def(h)){h=h.substring(y.raw.length),P=d[d.length-1],P&&(P.type==="paragraph"||P.type==="text")?(P.raw+=`
|
|
`+y.raw,P.text+=`
|
|
`+y.raw,this.inlineQueue[this.inlineQueue.length-1].src=P.text):this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.lheading(h)){h=h.substring(y.raw.length),d.push(y);continue}if(A=h,this.options.extensions&&this.options.extensions.startBlock&&function(){var p=1/0,x=h.slice(1),C=void 0;b.options.extensions.startBlock.forEach(function(T){C=T.call({lexer:this},x),typeof C=="number"&&C>=0&&(p=Math.min(p,C))}),p<1/0&&p>=0&&(A=h.substring(0,p+1))}(),this.state.top&&(y=this.tokenizer.paragraph(A))){P=d[d.length-1],xe&&P.type==="paragraph"?(P.raw+=`
|
|
`+y.raw,P.text+=`
|
|
`+y.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=P.text):d.push(y),xe=A.length!==h.length,h=h.substring(y.raw.length);continue}if(y=this.tokenizer.text(h)){h=h.substring(y.raw.length),P=d[d.length-1],P&&P.type==="text"?(P.raw+=`
|
|
`+y.raw,P.text+=`
|
|
`+y.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=P.text):d.push(y);continue}if(h){var s="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,d},E.inline=function(h,d){this.inlineQueue.push({src:h,tokens:d})},E.inlineTokens=function(h,d){var b=this;d===void 0&&(d=[]);var y,P,A,xe=h,s,p,x;if(this.tokens.links){var C=Object.keys(this.tokens.links);if(C.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(xe))!=null;)C.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(xe=xe.slice(0,s.index)+"["+ke("a",s[0].length-2)+"]"+xe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(xe))!=null;)xe=xe.slice(0,s.index)+"["+ke("a",s[0].length-2)+"]"+xe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(xe))!=null;)xe=xe.slice(0,s.index)+"++"+xe.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;h;)if(p||(x=""),p=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(D){return(y=D.call({lexer:b},h,d))?(h=h.substring(y.raw.length),d.push(y),!0):!1}))){if(y=this.tokenizer.escape(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.tag(h)){h=h.substring(y.raw.length),P=d[d.length-1],P&&y.type==="text"&&P.type==="text"?(P.raw+=y.raw,P.text+=y.text):d.push(y);continue}if(y=this.tokenizer.link(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.reflink(h,this.tokens.links)){h=h.substring(y.raw.length),P=d[d.length-1],P&&y.type==="text"&&P.type==="text"?(P.raw+=y.raw,P.text+=y.text):d.push(y);continue}if(y=this.tokenizer.emStrong(h,xe,x)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.codespan(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.br(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.del(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.autolink(h,Ie)){h=h.substring(y.raw.length),d.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(h,Ie))){h=h.substring(y.raw.length),d.push(y);continue}if(A=h,this.options.extensions&&this.options.extensions.startInline&&function(){var D=1/0,N=h.slice(1),F=void 0;b.options.extensions.startInline.forEach(function(H){F=H.call({lexer:this},N),typeof F=="number"&&F>=0&&(D=Math.min(D,F))}),D<1/0&&D>=0&&(A=h.substring(0,D+1))}(),y=this.tokenizer.inlineText(A,De)){h=h.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(x=y.raw.slice(-1)),p=!0,P=d[d.length-1],P&&P.type==="text"?(P.raw+=y.raw,P.text+=y.text):d.push(y);continue}if(h){var T="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(T);break}else throw new Error(T)}}return d},Q(_,null,[{key:"rules",get:function(){return{block:v,inline:c}}}]),_}(),We=function(){function _(M){this.options=M||_e.ce}var E=_.prototype;return E.code=function(h,d,b){var y=(d||"").match(/\S*/)[0];if(this.options.highlight){var P=this.options.highlight(h,y);P!=null&&P!==h&&(b=!0,h=P)}return h=h.replace(/\n$/,"")+`
|
|
`,y?'<pre><code class="'+this.options.langPrefix+pe(y,!0)+'">'+(b?h:pe(h,!0))+`</code></pre>
|
|
`:"<pre><code>"+(b?h:pe(h,!0))+`</code></pre>
|
|
`},E.blockquote=function(h){return`<blockquote>
|
|
`+h+`</blockquote>
|
|
`},E.html=function(h){return h},E.heading=function(h,d,b,y){if(this.options.headerIds){var P=this.options.headerPrefix+y.slug(b);return"<h"+d+' id="'+P+'">'+h+"</h"+d+`>
|
|
`}return"<h"+d+">"+h+"</h"+d+`>
|
|
`},E.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},E.list=function(h,d,b){var y=d?"ol":"ul",P=d&&b!==1?' start="'+b+'"':"";return"<"+y+P+`>
|
|
`+h+"</"+y+`>
|
|
`},E.listitem=function(h){return"<li>"+h+`</li>
|
|
`},E.checkbox=function(h){return"<input "+(h?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},E.paragraph=function(h){return"<p>"+h+`</p>
|
|
`},E.table=function(h,d){return d&&(d="<tbody>"+d+"</tbody>"),`<table>
|
|
<thead>
|
|
`+h+`</thead>
|
|
`+d+`</table>
|
|
`},E.tablerow=function(h){return`<tr>
|
|
`+h+`</tr>
|
|
`},E.tablecell=function(h,d){var b=d.header?"th":"td",y=d.align?"<"+b+' align="'+d.align+'">':"<"+b+">";return y+h+("</"+b+`>
|
|
`)},E.strong=function(h){return"<strong>"+h+"</strong>"},E.em=function(h){return"<em>"+h+"</em>"},E.codespan=function(h){return"<code>"+h+"</code>"},E.br=function(){return this.options.xhtml?"<br/>":"<br>"},E.del=function(h){return"<del>"+h+"</del>"},E.link=function(h,d,b){if(h=X(this.options.sanitize,this.options.baseUrl,h),h===null)return b;var y='<a href="'+pe(h)+'"';return d&&(y+=' title="'+d+'"'),y+=">"+b+"</a>",y},E.image=function(h,d,b){if(h=X(this.options.sanitize,this.options.baseUrl,h),h===null)return b;var y='<img src="'+h+'" alt="'+b+'"';return d&&(y+=' title="'+d+'"'),y+=this.options.xhtml?"/>":">",y},E.text=function(h){return h},_}(),wt=function(){function _(){}var E=_.prototype;return E.strong=function(h){return h},E.em=function(h){return h},E.codespan=function(h){return h},E.del=function(h){return h},E.html=function(h){return h},E.text=function(h){return h},E.link=function(h,d,b){return""+b},E.image=function(h,d,b){return""+b},E.br=function(){return""},_}(),at=function(){function _(){this.seen={}}var E=_.prototype;return E.serialize=function(h){return h.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},E.getNextSafeSlug=function(h,d){var b=h,y=0;if(this.seen.hasOwnProperty(b)){y=this.seen[h];do y++,b=h+"-"+y;while(this.seen.hasOwnProperty(b))}return d||(this.seen[h]=y,this.seen[b]=0),b},E.slug=function(h,d){d===void 0&&(d={});var b=this.serialize(h);return this.getNextSafeSlug(b,d.dryrun)},_}(),Ke=function(){function _(M){this.options=M||_e.ce,this.options.renderer=this.options.renderer||new We,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wt,this.slugger=new at}_.parse=function(h,d){var b=new _(d);return b.parse(h)},_.parseInline=function(h,d){var b=new _(d);return b.parseInline(h)};var E=_.prototype;return E.parse=function(h,d){d===void 0&&(d=!0);var b="",y,P,A,xe,s,p,x,C,T,D,N,F,H,te,ye,Te,Be,ve,qe,Ue=h.length;for(y=0;y<Ue;y++){if(D=h[y],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[D.type]&&(qe=this.options.extensions.renderers[D.type].call({parser:this},D),qe!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(D.type))){b+=qe||"";continue}switch(D.type){case"space":continue;case"hr":{b+=this.renderer.hr();continue}case"heading":{b+=this.renderer.heading(this.parseInline(D.tokens),D.depth,be(this.parseInline(D.tokens,this.textRenderer)),this.slugger);continue}case"code":{b+=this.renderer.code(D.text,D.lang,D.escaped);continue}case"table":{for(C="",x="",xe=D.header.length,P=0;P<xe;P++)x+=this.renderer.tablecell(this.parseInline(D.header[P].tokens),{header:!0,align:D.align[P]});for(C+=this.renderer.tablerow(x),T="",xe=D.rows.length,P=0;P<xe;P++){for(p=D.rows[P],x="",s=p.length,A=0;A<s;A++)x+=this.renderer.tablecell(this.parseInline(p[A].tokens),{header:!1,align:D.align[A]});T+=this.renderer.tablerow(x)}b+=this.renderer.table(C,T);continue}case"blockquote":{T=this.parse(D.tokens),b+=this.renderer.blockquote(T);continue}case"list":{for(N=D.ordered,F=D.start,H=D.loose,xe=D.items.length,T="",P=0;P<xe;P++)ye=D.items[P],Te=ye.checked,Be=ye.task,te="",ye.task&&(ve=this.renderer.checkbox(Te),H?ye.tokens.length>0&&ye.tokens[0].type==="paragraph"?(ye.tokens[0].text=ve+" "+ye.tokens[0].text,ye.tokens[0].tokens&&ye.tokens[0].tokens.length>0&&ye.tokens[0].tokens[0].type==="text"&&(ye.tokens[0].tokens[0].text=ve+" "+ye.tokens[0].tokens[0].text)):ye.tokens.unshift({type:"text",text:ve}):te+=ve),te+=this.parse(ye.tokens,H),T+=this.renderer.listitem(te,Be,Te);b+=this.renderer.list(T,N,F);continue}case"html":{b+=this.renderer.html(D.text);continue}case"paragraph":{b+=this.renderer.paragraph(this.parseInline(D.tokens));continue}case"text":{for(T=D.tokens?this.parseInline(D.tokens):D.text;y+1<Ue&&h[y+1].type==="text";)D=h[++y],T+=`
|
|
`+(D.tokens?this.parseInline(D.tokens):D.text);b+=d?this.renderer.paragraph(T):T;continue}default:{var Oe='Token with "'+D.type+'" type was not found.';if(this.options.silent){console.error(Oe);return}else throw new Error(Oe)}}}return b},E.parseInline=function(h,d){d=d||this.renderer;var b="",y,P,A,xe=h.length;for(y=0;y<xe;y++){if(P=h[y],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[P.type]&&(A=this.options.extensions.renderers[P.type].call({parser:this},P),A!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(P.type))){b+=A||"";continue}switch(P.type){case"escape":{b+=d.text(P.text);break}case"html":{b+=d.html(P.text);break}case"link":{b+=d.link(P.href,P.title,this.parseInline(P.tokens,d));break}case"image":{b+=d.image(P.href,P.title,P.text);break}case"strong":{b+=d.strong(this.parseInline(P.tokens,d));break}case"em":{b+=d.em(this.parseInline(P.tokens,d));break}case"codespan":{b+=d.codespan(P.text);break}case"br":{b+=d.br();break}case"del":{b+=d.del(this.parseInline(P.tokens,d));break}case"text":{b+=d.text(P.text);break}default:{var s='Token with "'+P.type+'" type was not found.';if(this.options.silent){console.error(s);return}else throw new Error(s)}}}return b},_}();function we(_,E,M){if(typeof _=="undefined"||_===null)throw new Error("marked(): input parameter is undefined or null");if(typeof _!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_)+", string expected");if(typeof E=="function"&&(M=E,E=null),E=Z({},we.defaults,E||{}),J(E),M){var h=E.highlight,d;try{d=Ae.lex(_,E)}catch(A){return M(A)}var b=function(xe){var s;if(!xe)try{E.walkTokens&&we.walkTokens(d,E.walkTokens),s=Ke.parse(d,E)}catch(p){xe=p}return E.highlight=h,xe?M(xe):M(null,s)};if(!h||h.length<3||(delete E.highlight,!d.length))return b();var y=0;we.walkTokens(d,function(A){A.type==="code"&&(y++,setTimeout(function(){h(A.text,A.lang,function(xe,s){if(xe)return b(xe);s!=null&&s!==A.text&&(A.text=s,A.escaped=!0),y--,y===0&&b()})},0))}),y===0&&b();return}try{var P=Ae.lex(_,E);return E.walkTokens&&we.walkTokens(P,E.walkTokens),Ke.parse(P,E)}catch(A){if(A.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,E.silent)return"<p>An error occurred:</p><pre>"+pe(A.message+"",!0)+"</pre>";throw A}}we.options=we.setOptions=function(_){return Z(we.defaults,_),B(we.defaults),we},we.getDefaults=S,we.defaults=_e.ce,we.use=function(){for(var _=arguments.length,E=new Array(_),M=0;M<_;M++)E[M]=arguments[M];var h=Z.apply(void 0,[{}].concat(E)),d=we.defaults.extensions||{renderers:{},childTokens:{}},b;E.forEach(function(y){if(y.extensions&&(b=!0,y.extensions.forEach(function(A){if(!A.name)throw new Error("extension name required");if(A.renderer){var xe=d.renderers?d.renderers[A.name]:null;xe?d.renderers[A.name]=function(){for(var s=arguments.length,p=new Array(s),x=0;x<s;x++)p[x]=arguments[x];var C=A.renderer.apply(this,p);return C===!1&&(C=xe.apply(this,p)),C}:d.renderers[A.name]=A.renderer}if(A.tokenizer){if(!A.level||A.level!=="block"&&A.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");d[A.level]?d[A.level].unshift(A.tokenizer):d[A.level]=[A.tokenizer],A.start&&(A.level==="block"?d.startBlock?d.startBlock.push(A.start):d.startBlock=[A.start]:A.level==="inline"&&(d.startInline?d.startInline.push(A.start):d.startInline=[A.start]))}A.childTokens&&(d.childTokens[A.name]=A.childTokens)})),y.renderer&&function(){var A=we.defaults.renderer||new We,xe=function(x){var C=A[x];A[x]=function(){for(var T=arguments.length,D=new Array(T),N=0;N<T;N++)D[N]=arguments[N];var F=y.renderer[x].apply(A,D);return F===!1&&(F=C.apply(A,D)),F}};for(var s in y.renderer)xe(s);h.renderer=A}(),y.tokenizer&&function(){var A=we.defaults.tokenizer||new et,xe=function(x){var C=A[x];A[x]=function(){for(var T=arguments.length,D=new Array(T),N=0;N<T;N++)D[N]=arguments[N];var F=y.tokenizer[x].apply(A,D);return F===!1&&(F=C.apply(A,D)),F}};for(var s in y.tokenizer)xe(s);h.tokenizer=A}(),y.walkTokens){var P=we.defaults.walkTokens;h.walkTokens=function(A){y.walkTokens.call(this,A),P&&P.call(this,A)}}b&&(h.extensions=d),we.setOptions(h)})},we.walkTokens=function(_,E){for(var M=function(){var y=d.value;switch(E.call(we,y),y.type){case"table":{for(var P=w(y.header),A;!(A=P()).done;){var xe=A.value;we.walkTokens(xe.tokens,E)}for(var s=w(y.rows),p;!(p=s()).done;)for(var x=p.value,C=w(x),T;!(T=C()).done;){var D=T.value;we.walkTokens(D.tokens,E)}break}case"list":{we.walkTokens(y.items,E);break}default:we.defaults.extensions&&we.defaults.extensions.childTokens&&we.defaults.extensions.childTokens[y.type]?we.defaults.extensions.childTokens[y.type].forEach(function(N){we.walkTokens(y[N],E)}):y.tokens&&we.walkTokens(y.tokens,E)}},h=w(_),d;!(d=h()).done;)M()},we.parseInline=function(_,E){if(typeof _=="undefined"||_===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof _!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(_)+", string expected");E=Z({},we.defaults,E||{}),J(E);try{var M=Ae.lexInline(_,E);return E.walkTokens&&we.walkTokens(M,E.walkTokens),Ke.parseInline(M,E)}catch(h){if(h.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,E.silent)return"<p>An error occurred:</p><pre>"+pe(h.message+"",!0)+"</pre>";throw h}},we.Parser=Ke,we.parser=Ke.parse,we.Renderer=We,we.TextRenderer=wt,we.Lexer=Ae,we.lexer=Ae.lex,we.Tokenizer=et,we.Slugger=at,we.parse=we;var je=we.options,Je=we.setOptions,Et=we.use,Wt=we.walkTokens,Pe=we.parseInline,yt=we,_t=Ke.parse,Dt=Ae.lex;Ce=Ae,Ce=Ke,Ce=We,Ce=at,Ce=wt,Ce=et,Ce=S,Ce=Dt,_e.TU=we,Ce=je,Ce=yt,Ce=Pe,Ce=_t,Ce=Je,Ce=Et,Ce=Wt}}]);
|