PHP 8.2.31
Preview: codemirror.min.js Size: 605.62 KB
/home/nshryvcy/blissfulnepal.com/wp-includes/js/codemirror/codemirror.min.js

/*! This file is auto-generated from CodeMirror - v5.65.20

CodeMirror, copyright (c) by Marijn Haverbeke and others
Distributed under an MIT license: http://codemirror.net/LICENSE

This is CodeMirror (http://codemirror.net), a code editor
implemented in JavaScript on top of the browser's DOM.

You can find some technical background for some of the code below
at http://marijnhaverbeke.nl/blog/#cm-internals .
*/(()=>{var e={7829(e,t,n){!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function a(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(r(t.line,0)))&&!/^[\'\"\`]/.test(n)}function s(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,o=this.listSelections(),a=null,s=o.length-1;s>=0;s--){var l=o[s].from(),c=o[s].to();l.line>=i||(c.line>=i&&(c=r(i,0)),i=l.line,null==a?n.uncomment(l,c,e)?a="un":(n.lineComment(l,c,e),a="line"):"un"==a?n.uncomment(l,c,e):n.lineComment(l,c,e))}})),e.defineExtension("lineComment",(function(e,i,l){l||(l=t);var c=this,u=s(c,e),d=c.getLine(e.line);if(null!=d&&!a(c,e,d)){var f=l.lineComment||u.lineComment;if(f){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),h=null==l.padding?" ":l.padding,m=l.commentBlankLines||e.line==i.line;c.operation((function(){if(l.indent){for(var t=null,i=e.line;i<p;++i){var a=-1===(s=c.getLine(i)).search(n)?s:s.slice(0,o(s));(null==t||t.length>a.length)&&(t=a)}for(i=e.line;i<p;++i){var s=c.getLine(i),u=t.length;(m||n.test(s))&&(s.slice(0,u)!=t&&(u=o(s)),c.replaceRange(t+f+h,r(i,0),r(i,u)))}}else for(i=e.line;i<p;++i)(m||n.test(c.getLine(i)))&&c.replaceRange(f+h,r(i,0))}))}else(l.blockCommentStart||u.blockCommentStart)&&(l.fullLines=!0,c.blockComment(e,i,l))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=t);var l=this,c=s(l,e),u=a.blockCommentStart||c.blockCommentStart,d=a.blockCommentEnd||c.blockCommentEnd;if(u&&d){if(!/\bcomment\b/.test(l.getTokenTypeAt(r(e.line,0)))){var f=Math.min(o.line,l.lastLine());f!=e.line&&0==o.ch&&n.test(l.getLine(f))&&--f;var p=null==a.padding?" ":a.padding;e.line>f||l.operation((function(){if(0!=a.fullLines){var t=n.test(l.getLine(f));l.replaceRange(p+d,r(f)),l.replaceRange(u+p,r(e.line,0));var s=a.blockCommentLead||c.blockCommentLead;if(null!=s)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&l.replaceRange(s+p,r(h,0))}else{var m=0==i(l.getCursor("to"),o),g=!l.somethingSelected();l.replaceRange(d,o),m&&l.setSelection(g?o:l.getCursor("from"),o),l.replaceRange(u,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&l.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var a,l=this,c=s(l,e),u=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,l.lastLine()),d=Math.min(e.line,u),f=o.lineComment||c.lineComment,p=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=d;m<=u;++m){var g=l.getLine(m),v=g.indexOf(f);if(v>-1&&!/comment/.test(l.getTokenTypeAt(r(m,v+1)))&&(v=-1),-1==v&&n.test(g))break e;if(v>-1&&n.test(g.slice(0,v)))break e;p.push(g)}if(l.operation((function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),a=!0,l.replaceRange("",r(e,n),r(e,i)))}})),a)return!0}var y=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!y||!b)return!1;var x=o.blockCommentLead||c.blockCommentLead,k=l.getLine(d),w=k.indexOf(y);if(-1==w)return!1;var _=u==d?k:l.getLine(u),C=_.indexOf(b,u==d?w+y.length:0),S=r(d,w+1),M=r(u,C+1);if(-1==C||!/comment/.test(l.getTokenTypeAt(S))||!/comment/.test(l.getTokenTypeAt(M))||l.getRange(S,M,"\n").indexOf(b)>-1)return!1;var L=k.lastIndexOf(y,e.ch),T=-1==L?-1:k.slice(0,e.ch).indexOf(b,L+y.length);if(-1!=L&&-1!=T&&T+b.length!=e.ch)return!1;T=_.indexOf(b,i.ch);var A=_.slice(i.ch).lastIndexOf(y,T-i.ch);return L=-1==T||-1==A?-1:i.ch+A,(-1==T||-1==L||L==i.ch)&&(l.operation((function(){l.replaceRange("",r(u,C-(h&&_.slice(C-h.length,C)==h?h.length:0)),r(u,C+b.length));var e=w+y.length;if(h&&k.slice(e,e+h.length)==h&&(e+=h.length),l.replaceRange("",r(d,w),r(d,e)),x)for(var t=d+1;t<=u;++t){var i=l.getLine(t),o=i.indexOf(x);if(-1!=o&&!n.test(i.slice(0,o))){var a=o+x.length;h&&i.slice(a,a+h.length)==h&&(a+=h.length),l.replaceRange("",r(t,o),r(t,a))}}})),!0)}))}(n(5237))},998(e,t,n){!function(e){var t=/\S/g,n=String.prototype.repeat||function(e){return Array(e+1).join(this)};function r(t){if(t.getOption("disableInput"))return e.Pass;for(var r,a=t.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(c)))return e.Pass;var u=t.getModeAt(c);if(r){if(r!=u)return e.Pass}else r=u;var d,f,p=null,h=r.blockCommentStart,m=r.lineComment;if(h&&r.blockCommentContinue){var g=(d=t.getLine(c.line)).lastIndexOf(r.blockCommentEnd,c.ch-r.blockCommentEnd.length);if(-1!=g&&g==c.ch-r.blockCommentEnd.length||m&&(f=d.lastIndexOf(m,c.ch-1))>-1&&/\bcomment\b/.test(t.getTokenTypeAt({line:c.line,ch:f+1})));else if(c.ch>=h.length&&(f=d.lastIndexOf(h,c.ch-h.length))>-1&&f>g)if(i(0,d)>=f)p=d.slice(0,f);else{var v,y=t.options.tabSize;f=e.countColumn(d,f,y),p=t.options.indentWithTabs?n.call("\t",v=Math.floor(f/y))+n.call(" ",f-y*v):n.call(" ",f)}else(f=d.indexOf(r.blockCommentContinue))>-1&&f<=c.ch&&f<=i(0,d)&&(p=d.slice(0,f));null!=p&&(p+=r.blockCommentContinue)}if(null==p&&m&&o(t))if(null==d&&(d=t.getLine(c.line)),f=d.indexOf(m),c.ch||f){if(f>-1&&i(0,d)>=f){if(!(p=i(c.ch,d)>-1)){var b=t.getLine(c.line+1)||"",x=b.indexOf(m);p=x>-1&&i(0,b)>=x||null}p&&(p=d.slice(0,f)+m+d.slice(f+m.length).match(/^\s*/)[0])}}else p="";if(null==p)return e.Pass;s[l]="\n"+p}t.operation((function(){for(var e=a.length-1;e>=0;e--)t.replaceRange(s[e],a[e].from(),a[e].to(),"+insert")}))}function i(e,n){t.lastIndex=e;var r=t.exec(n);return r?r.index:-1}function o(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,(function(t,n,i){if(i&&i!=e.Init&&t.removeKeyMap("continueComment"),n){var o="Enter";"string"==typeof n?o=n:"object"==typeof n&&n.key&&(o=n.key);var a={name:"continueComment"};a[o]=r,t.addKeyMap(a)}}))}(n(5237))},8527(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];!function(t){e.on(p,"click",(function(n){e.e_preventDefault(n),d(),t&&t(c)}))}(i[f]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&d()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(r,i){n(this,c);var o,a=t(this,r,i&&i.bottom),s=!1,l=i&&void 0!==i.duration?i.duration:5e3;function c(){s||(s=!0,clearTimeout(o),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(t){e.e_preventDefault(t),c()})),l&&(o=setTimeout(c,l)),c}))}(n(5237))},6865(e,t,n){!function(e){"use strict";function t(t,r){function i(){t.display.wrapper.offsetHeight?(n(t,r),t.display.lastWrapHeight!=t.display.wrapper.clientHeight&&t.refresh()):r.timeout=setTimeout(i,r.delay)}r.timeout=setTimeout(i,r.delay),r.hurry=function(){clearTimeout(r.timeout),r.timeout=setTimeout(i,50)},e.on(window,"mouseup",r.hurry),e.on(window,"keyup",r.hurry)}function n(t,n){clearTimeout(n.timeout),e.off(window,"mouseup",n.hurry),e.off(window,"keyup",n.hurry)}e.defineOption("autoRefresh",!1,(function(e,r){e.state.autoRefresh&&(n(e,e.state.autoRefresh),e.state.autoRefresh=null),r&&0==e.display.wrapper.offsetHeight&&t(e,e.state.autoRefresh={delay:r.delay||250})}))}(n(5237))},7374(e,t,n){!function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))}))}(n(5237))},9981(e,t,n){!function(e){function t(e,t,n,r){this.cm=e,this.node=t,this.options=n,this.height=r,this.cleared=!1}function n(e){var t=e.getWrapperElement(),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r=parseInt(n.height),i=e.state.panels={setHeight:t.style.height,panels:[],wrapper:document.createElement("div")},o=e.hasFocus(),a=e.getScrollInfo();t.parentNode.insertBefore(i.wrapper,t),i.wrapper.appendChild(t),e.scrollTo(a.left,a.top),o&&e.focus(),e._setSize=e.setSize,null!=r&&(e.setSize=function(t,n){if(n||(n=i.wrapper.offsetHeight),i.setHeight=n,"number"!=typeof n){var o=/^(\d+\.?\d*)px$/.exec(n);o?n=Number(o[1]):(i.wrapper.style.height=n,n=i.wrapper.offsetHeight)}var a=n-i.panels.map((function(e){return e.node.getBoundingClientRect().height})).reduce((function(e,t){return e+t}),0);e._setSize(t,a),r=n})}function r(e){var t=e.state.panels;e.state.panels=null;var n=e.getWrapperElement(),r=e.hasFocus(),i=e.getScrollInfo();t.wrapper.parentNode.replaceChild(n,t.wrapper),e.scrollTo(i.left,i.top),r&&e.focus(),n.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}function i(e,t){for(var n=t.nextSibling;n;n=n.nextSibling)if(n==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",(function(e,r){r=r||{},this.state.panels||n(this);var o=this.state.panels,a=o.wrapper,s=this.getWrapperElement(),l=r.replace instanceof t&&!r.replace.cleared;r.after instanceof t&&!r.after.cleared?a.insertBefore(e,r.before.node.nextSibling):r.before instanceof t&&!r.before.cleared?a.insertBefore(e,r.before.node):l?(a.insertBefore(e,r.replace.node),r.replace.clear(!0)):"bottom"==r.position?a.appendChild(e):"before-bottom"==r.position?a.insertBefore(e,s.nextSibling):"after-top"==r.position?a.insertBefore(e,s):a.insertBefore(e,a.firstChild);var c=r&&r.height||e.offsetHeight,u=new t(this,e,r,c);return o.panels.push(u),this.setSize(),r.stable&&i(this,e)&&this.scrollTo(null,this.getScrollInfo().top+c),u})),t.prototype.clear=function(e){if(!this.cleared){this.cleared=!0;var t=this.cm.state.panels;t.panels.splice(t.panels.indexOf(this),1),this.cm.setSize(),this.options.stable&&i(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),t.wrapper.removeChild(this.node),0!=t.panels.length||e||r(this.cm)}},t.prototype.changed=function(){this.height=this.node.getBoundingClientRect().height,this.cm.setSize()}}(n(5237))},202(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var i=e.getInputField();r="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}r?n(e):t(e)}),20)}function i(e){a(e)&&n(e)}function o(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,a,s){var l=s&&s!=e.Init;if(a&&!l)n.on("blur",i),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),o(n);else if(!a&&l){n.off("blur",i),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&i(n)}))}(n(5237))},8586(e,t,n){!function(e){"use strict";function t(t){t.state.rulerDiv.textContent="";var n=t.getOption("rulers"),r=t.defaultCharWidth(),i=t.charCoords(e.Pos(t.firstLine(),0),"div").left;t.state.rulerDiv.style.minHeight=t.display.scroller.offsetHeight+30+"px";for(var o=0;o<n.length;o++){var a=document.createElement("div");a.className="CodeMirror-ruler";var s,l=n[o];"number"==typeof l?s=l:(s=l.column,l.className&&(a.className+=" "+l.className),l.color&&(a.style.borderColor=l.color),l.lineStyle&&(a.style.borderLeftStyle=l.lineStyle),l.width&&(a.style.borderLeftWidth=l.width)),a.style.left=i+s*r+"px",t.state.rulerDiv.appendChild(a)}}e.defineOption("rulers",!1,(function(e,n){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",t)),n&&n.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",t(e),e.on("refresh",t))}))}(n(5237))},5218(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=a(n))}}function a(e){return function(t){return f(t,e)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var c=p(t,a[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var u=a[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var l=p(t,o[a].head);if(!l||i.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),u(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function u(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var a=r[o];a.head==e.getCursor()&&(i=o);var s=a.head.ch||t>0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,i)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=r(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var c,f=r(o,"closeBefore"),p=r(o,"triples"),m=a.charAt(l+1)==i,g=t.listSelections(),v=l%2==0,y=0;y<g.length;y++){var b,x=g[y],k=x.head,w=t.getRange(k,n(k.line,k.ch+1));if(v&&!x.empty())b="surround";else if(!m&&v||w!=i)if(m&&k.ch>1&&p.indexOf(i)>=0&&t.getRange(n(k.line,k.ch-2),k)==i+i){if(k.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(k.line,k.ch-2))))return e.Pass;b="addFour"}else if(m){var _=0==k.ch?" ":t.getRange(n(k.line,k.ch-1),k);if(e.isWordChar(w)||_==i||e.isWordChar(_))return e.Pass;b="both"}else{if(!v||!(0===w.length||/\s/.test(w)||f.indexOf(w)>-1))return e.Pass;b="both"}else b=m&&h(t,k)?"both":p.indexOf(i)>=0&&t.getRange(k,n(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=b)return e.Pass}else c=b}var C=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==c)u(t,1);else if("skipThree"==c)u(t,3);else if("surround"==c){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=C+e[n]+S;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else"both"==c?(t.replaceSelection(C+S,null),t.triggerElectric(C+S),u(t,-1)):"addFour"==c&&(t.replaceSelection(C+C+C+C,"before"),u(t,1))}))}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function h(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(5237))},2819(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,i){if(i!=e.Init&&i&&t.removeKeyMap("autoCloseTags"),n){var a={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(a["'/'"]=function(e){return o(e)}),"object"==typeof n&&!1===n.whenOpening||(a["'>'"]=function(e){return r(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(r){if(r.getOption("disableInput"))return e.Pass;for(var i=r.listSelections(),o=[],l=r.getOption("autoCloseTags"),c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var u=i[c].head,d=r.getTokenAt(u),f=e.innerMode(r.getMode(),d.state),p=f.state,h=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(p),m=h&&h.name;if(!m)return e.Pass;var g="html"==f.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,y="object"==typeof l&&l.indentTags||g&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var b=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&h.close||d.string.indexOf("/")==u.ch-d.start-1||v&&a(v,b)>-1||s(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&a(x,m)>-1)o[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var k=y&&a(y,b)>-1;o[c]={indent:k,text:">"+(k?"\n\n":"")+"</"+m+">",newPos:k?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var w="object"==typeof l&&l.dontIndentOnAutoClose;for(c=i.length-1;c>=0;c--){var _=o[c];r.replaceRange(_.text,i[c].head,i[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:_.newPos,anchor:_.newPos},r.setSelections(C),!w&&_.indent&&(r.indentLine(_.newPos.line,null,!0),r.indentLine(_.newPos.line+1,null,!0))}}function i(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"</",a=t.getOption("autoCloseTags"),l="object"==typeof a&&a.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),f=e.innerMode(t.getMode(),d.state),p=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var h,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)h=o+"script";else if(m&&"css"==f.mode.name)h=o+"style";else{var g=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p),v=g.length?g[g.length-1]:"";if(!g||g.length&&s(t,g,v,u))return e.Pass;h=o+v}">"!=t.getLine(u.line).charAt(d.end)&&(h+=">"),i[c]=h}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:i(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function s(t,n,r,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,a);if(!s||s.tag!=r)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return i(e)}}(n(5237),n(6753))},7382(e,t,n){!function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,o=0,a=t.exec(e.getLine(r)),s=a[1];do{var l=r+(i+=1),c=e.getLine(l),u=t.exec(c);if(u){var d=u[1],f=parseInt(a[3],10)+i-o,p=parseInt(u[3],10),h=p;if(s!==d||isNaN(p)){if(s.length>d.length)return;if(s.length<d.length&&1===i)return;o+=1}else f===p&&(h=p+1),f>p&&(h=f+1),e.replaceRange(c.replace(t,d+h+u[4]+u[5]),{line:l,ch:0},{line:l,ch:c.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l].head,u=o.getStateAfter(c.line),d=e.innerMode(o.getMode(),u);if("markdown"!==d.mode.name&&"markdown"!==d.mode.helperType)return void o.execCommand("newlineAndIndent");var f=!1!==(u=d.state).list,p=0!==u.quote,h=o.getLine(c.line),m=t.exec(h),g=/^\s*$/.test(h.slice(0,c.ch));if(!a[l].empty()||!f&&!p||!m||g)return void o.execCommand("newlineAndIndent");if(n.test(h)){var v=p&&/>\s*$/.test(h),y=!/>\s*$/.test(h);(v||y)&&o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[l]="\n"}else{var b=m[1],x=m[5],k=!(r.test(m[2])||m[2].indexOf(">")>=0),w=k?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");s[l]="\n"+b+w+x,k&&i(o,c)}}o.replaceSelections(s)}}(n(5237))},7923(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),d=!c&&l>=0&&u.test(s.text.charAt(l))&&r[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(f>0?1:0)),f,p,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=i(s),f=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=f;p+=o){var h=e.getLine(p);if(h){var m=o>0?0:h.length-1,g=o>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=h.charAt(m);if(d.test(v)&&(void 0===a||(e.getTokenTypeAt(n(p,m+1))||"")==(a||""))){var y=r[v];if(y&&">"==y.charAt(1)==o>0)u.push(v);else{if(!u.length)return{pos:n(p,m),ch:v};u.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].empty()&&o(e,c[u].head,i);if(d&&(d.match||!1!==s)&&e.getLine(d.from.line).length<=a){var f=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=a&&l.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(l.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return a(this,e,t,n,r)}))}(n(5237))},115(e,t,n){!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation((function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),i=n.getViewport();i.from=Math.min(i.from,r.line),i.to=Math.max(r.line+1,i.to);var o=e.findMatchingTag(n,r,i);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==o.at?o.open:o.close;s?n.state.tagOther=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}}))}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,(function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",n),i.off("viewportChange",r),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",n),i.on("viewportChange",r),n(i))})),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}}(n(5237),n(6753))},4317(e,t,n){!function(e){e.defineOption("showTrailingSpace",!1,(function(t,n,r){r==e.Init&&(r=!1),r&&!n?t.removeOverlay("trailingspace"):!r&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})}))}(n(5237))},795(e,t,n){!function(e){"use strict";function t(t){return function(n,r){var i=r.line,o=n.getLine(i);function a(t){for(var a,s=r.ch,l=0;;){var c=s<=0?-1:o.lastIndexOf(t[0],s-1);if(-1!=c){if(1==l&&c<r.ch)break;if(a=n.getTokenTypeAt(e.Pos(i,c+1)),!/^(comment|string)/.test(a))return{ch:c+1,tokenType:a,pair:t};s=c-1}else{if(1==l)break;l=1,s=o.length}}}function s(t){var r,o,a=1,s=n.lastLine(),l=t.ch;e:for(var c=i;c<=s;++c)for(var u=n.getLine(c),d=c==i?l:0;;){var f=u.indexOf(t.pair[0],d),p=u.indexOf(t.pair[1],d);if(f<0&&(f=u.length),p<0&&(p=u.length),(d=Math.min(f,p))==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==f)++a;else if(! --a){r=c,o=d;break e}++d}return null==r||i==r?null:{from:e.Pos(i,l),to:e.Pos(r,o)}}for(var l=[],c=0;c<t.length;c++){var u=a(t[c]);u&&l.push(u)}for(l.sort((function(e,t){return e.ch-t.ch})),c=0;c<l.length;c++){var d=s(l[c]);if(d)return d}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;null!=r(a+1);)++a;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}}))}(n(5237))},9257(e,t,n){!function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,o=r.blockCommentEnd;if(i&&o){for(var a,s=n.line,l=t.getLine(s),c=n.ch,u=0;;){var d=c<=0?-1:l.lastIndexOf(i,c-1);if(-1!=d){if(1==u&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(s,d+1)))&&(0==d||l.slice(d-o.length,d)==o||!/comment/.test(t.getTokenTypeAt(e.Pos(s,d))))){a=d+i.length;break}c=d-1}else{if(1==u)return;u=1,c=l.length}}var f,p,h=1,m=t.lastLine();e:for(var g=s;g<=m;++g)for(var v=t.getLine(g),y=g==s?a:0;;){var b=v.indexOf(i,y),x=v.indexOf(o,y);if(b<0&&(b=v.length),x<0&&(x=v.length),(y=Math.min(b,x))==v.length)break;if(y==b)++h;else if(! --h){f=g,p=y;break e}++y}if(null!=f&&(s!=f||p!=a))return{from:e.Pos(s,a),to:e.Pos(f,p)}}}))}(n(5237))},8948(e,t,n){!function(e){"use strict";function t(t,r,o,a){if(o&&o.call){var s=o;o=null}else s=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var l=i(t,o,"minFoldSize");function c(e){var n=s(t,r);if(!n||n.to.line-n.from.line<l)return null;if("fold"===a)return n;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold){if(!e)return null;n.cleared=!0,i[o].clear()}return n}var u=c(!0);if(i(t,o,"scanUp"))for(;!u&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),u=c(!1);if(u&&!u.cleared&&"unfold"!==a){var d=n(t,o,u);e.on(d,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t,n){var r=i(e,t,"widget");if("function"==typeof r&&(r=r(n.from,n.to)),"string"==typeof r){var o=document.createTextNode(r);(r=document.createElement("span")).appendChild(o),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))}(n(5237))},1274(e,t,n){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",c),t.off("changes",d),t.off("viewportChange",f),t.off("fold",p),t.off("unfold",p),t.off("swapDoc",d),t.off("optionChange",u)),i&&(t.state.foldGutter=new n(r(i)),l(t),t.on("gutterClick",c),t.on("changes",d),t.on("viewportChange",f),t.on("fold",p),t.on("unfold",p),t.on("swapDoc",d),t.on("optionChange",u))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function a(e,n,r){var a=e.state.foldGutter.options,l=n-1,c=e.foldOption(a,"minFoldSize"),u=e.foldOption(a,"rangeFinder"),d="string"==typeof a.indicatorFolded&&s(a.indicatorFolded),f="string"==typeof a.indicatorOpen&&s(a.indicatorOpen);e.eachLine(n,r,(function(n){++l;var r=null,s=n.gutterMarkers;if(s&&(s=s[a.gutter]),i(e,l)){if(d&&s&&d.test(s.className))return;r=o(a.indicatorFolded)}else{var p=t(l,0),h=u&&u(e,p);if(h&&h.to.line-h.from.line>=c){if(f&&s&&f.test(s.className))return;r=o(a.indicatorOpen)}}(r||s)&&e.setGutterMarker(n,a.gutter,r)}))}function s(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function l(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){a(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function c(e,n,r){var o=e.state.foldGutter;if(o){var a=o.options;if(r==a.gutter){var s=i(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function u(e,t){"mode"==t&&d(e)}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){l(e)}),n.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?l(e):e.operation((function(){n.from<t.from&&(a(e,n.from,t.from),t.from=n.from),n.to>t.to&&(a(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&a(e,r,r+1)}}}(n(5237),n(8948))},1802(e,t,n){!function(e){"use strict";function t(t,n){var r=t.getLine(n),i=r.search(/\S/);return-1==i||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,i+1)))?-1:e.countColumn(r,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",(function(n,r){var i=t(n,r.line);if(!(i<0)){for(var o=null,a=r.line+1,s=n.lastLine();a<=s;++a){var l=t(n,a);if(-1==l);else{if(!(l>i))break;o=a}}return o?{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}}))}(n(5237))},5231(e,t,n){!function(e){"use strict";e.registerHelper("fold","markdown",(function(t,n){var r=100;function i(n){var r=t.getTokenTypeAt(e.Pos(n,0));return r&&/\bheader\b/.test(r)}function o(e,t,n){var o=t&&t.match(/^#+/);return o&&i(e)?o[0].length:(o=n&&n.match(/^[=\-]+\s*$/))&&i(e+1)?"="==n[0]?1:2:r}var a=t.getLine(n.line),s=t.getLine(n.line+1),l=o(n.line,a,s);if(l!==r){for(var c=t.lastLine(),u=n.line,d=t.getLine(u+2);u<c&&!(o(u+1,s,d)<=l);)++u,s=d,d=t.getLine(u+2);return{from:e.Pos(n.line,a.length),to:e.Pos(u,t.getLine(u).length)}}}))}(n(5237))},6753(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function a(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var i,o=d(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=c(e)))return;if("selfClose"!=i)if(o[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else r.push(o[2])}}function h(e,n){for(var r=[];;){var i=f(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new o(e,r.line,0);;){var a=d(i);if(!a||i.line!=r.line)return;var s=c(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=p(i,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var a=new o(e,r.line,r.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&t(a.line,a.ch),d=s&&u(a);if(s&&d&&!(n(a,r)>0)){var f={from:t(a.line,a.ch),to:l,tag:d[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:d[1]?{open:h(a,d[2]),close:f,at:"close"}:{open:f,close:p(a=new o(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new o(e,t.line,t.ch,n);;){var a=h(i,r);if(!a)break;var s=p(new o(e,t.line,t.ch,n),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,r){return p(new o(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(5237))},6564(e,t,n){!function(e){"use strict";var t=/[\w$]+/,n=500;e.registerHelper("hint","anyword",(function(r,i){for(var o=i&&i.word||t,a=i&&i.range||n,s=r.getCursor(),l=r.getLine(s.line),c=s.ch,u=c;u&&o.test(l.charAt(u-1));)--u;for(var d=u!=c&&l.slice(u,c),f=i&&i.list||[],p={},h=new RegExp(o.source,"g"),m=-1;m<=1;m+=2)for(var g=s.line,v=Math.min(Math.max(g+m*a,r.firstLine()),r.lastLine())+m;g!=v;g+=m)for(var y,b=r.getLine(g);y=h.exec(b);)g==s.line&&y[0]===d||d&&0!=y[0].lastIndexOf(d,0)||Object.prototype.hasOwnProperty.call(p,y[0])||(p[y[0]]=!0,f.push(y[0]));return{list:f,from:e.Pos(s.line,u),to:e.Pos(s.line,c)}}))}(n(5237))},2927(e,t,n){!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(n){var r=n.getCursor(),i=n.getTokenAt(r),o=e.innerMode(n.getMode(),i.state);if("css"==o.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(r.line,i.start),to:e.Pos(r.line,i.end)};var a=i.start,s=r.ch,l=i.string.slice(0,s-a);/[^\w$_-]/.test(l)&&(l="",a=s=r.ch);var c=e.resolveMode("text/css"),u=[],d=o.state.state;return"pseudo"==d||"variable-3"==i.type?f(t):"block"==d||"maybeprop"==d?f(c.propertyKeywords):"prop"==d||"parens"==d||"at"==d||"params"==d?(f(c.valueKeywords),f(c.colorKeywords)):"media"!=d&&"media_parens"!=d||(f(c.mediaTypes),f(c.mediaFeatures)),u.length?{list:u,from:e.Pos(r.line,a),to:e.Pos(r.line,s)}:void 0}function f(e){for(var t in e)l&&0!=t.lastIndexOf(l,0)||u.push(t)}}))}(n(5237),n(8656))},9935(e,t,n){!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],o=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],a=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},l={a:{attrs:{href:null,ping:null,type:null,media:a,target:n,hreflang:t}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:a,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:n}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dialog:{attrs:{open:null}},dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:o,method:i,novalidate:["","novalidate"],target:n}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:a,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:a,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:s,u:s,ul:s,var:s,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:s},c={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function u(e){for(var t in c)c.hasOwnProperty(t)&&(e.attrs[t]=c[t])}for(var d in u(s),l)l.hasOwnProperty(d)&&l[d]!=s&&u(l[d]);function f(t,n){var r={schemaInfo:l};if(n)for(var i in n)r[i]=n[i];return e.hint.xml(t,r)}e.htmlSchema=l,e.registerHelper("hint","html",f)}(n(5237),n(149))},5489(e,t,n){!function(e){var t=e.Pos;function n(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n])}function r(e,t){if(!Array.prototype.indexOf){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}return-1!=e.indexOf(t)}function i(n,r,i,o){var a=n.getCursor(),s=i(n,a);if(!/\b(?:string|comment)\b/.test(s.type)){var l=e.innerMode(n.getMode(),s.state);if("json"!==l.mode.helperType){s.state=l.state,/^[\w$_]*$/.test(s.string)?s.end>a.ch&&(s.end=a.ch,s.string=s.string.slice(0,a.ch-s.start)):s={start:a.ch,end:a.ch,string:"",state:s.state,type:"."==s.string?"property":null};for(var c=s;"property"==c.type;){if("."!=(c=i(n,t(a.line,c.start))).string)return;if(c=i(n,t(a.line,c.start)),!u)var u=[];u.push(c)}return{list:h(s,u,r,o),from:t(a.line,s.start),to:t(a.line,s.end)}}}}function o(e,t){return i(e,d,(function(e,t){return e.getTokenAt(t)}),t)}function a(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function s(e,t){return i(e,f,a,t)}e.registerHelper("hint","javascript",o),e.registerHelper("hint","coffeescript",s);var l="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),c="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),u="prototype apply call bind".split(" "),d="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function p(e,t){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=e;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(t);else for(var r in e)t(r)}function h(e,t,i,o){var a=[],s=e.string,d=o&&o.globalScope||window;function f(e){0!=e.lastIndexOf(s,0)||r(a,e)||a.push(e)}function h(e){"string"==typeof e?n(l,f):e instanceof Array?n(c,f):e instanceof Function&&n(u,f),p(e,f)}if(t&&t.length){var m,g=t.pop();for(g.type&&0===g.type.indexOf("variable")?(o&&o.additionalContext&&(m=o.additionalContext[g.string]),o&&!1===o.useGlobalScope||(m=m||d[g.string])):"string"==g.type?m="":"atom"==g.type?m=1:"function"==g.type&&(null==d.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof d.jQuery?null!=d._&&"_"==g.string&&"function"==typeof d._&&(m=d._()):m=d.jQuery());null!=m&&t.length;)m=m[t.pop().string];null!=m&&h(m)}else{for(var v=e.state.localVars;v;v=v.next)f(v.name);for(var y=e.state.context;y;y=y.prev)for(v=y.vars;v;v=v.next)f(v.name);for(v=e.state.globalVars;v;v=v.next)f(v.name);if(o&&null!=o.additionalContext)for(var b in o.additionalContext)f(b);o&&!1===o.useGlobalScope||h(d),n(i,f)}return a}}(n(5237))},9751(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<n.length;i++)if(n[i].head.line!=n[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new r(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;function a(e,t,n){var r=e.options.hintOptions,i={};for(var o in h)i[o]=h[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function s(e){return"string"==typeof e?e:e.text}function l(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}function c(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function u(r,i){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=r,this.data=i,this.picked=!1;var o=this,a=r.cm,u=a.getInputField().ownerDocument,d=u.defaultView||u.parentWindow,f=this.hints=u.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=r.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=i.selectedHint||0;for(var h=i.list,m=0;m<h.length;++m){var g=f.appendChild(u.createElement("li")),v=h[m],y=t+(m!=this.selectedHint?"":" "+n);null!=v.className&&(y=v.className+" "+y),g.className=y,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,i,v):g.appendChild(u.createTextNode(v.displayText||s(v))),g.hintId=m}var b=r.options.container||u.body,x=a.cursorCoords(r.options.alignWithWord?i.from:null),k=x.left,w=x.bottom,_=!0,C=0,S=0;if(b!==u.body){var M=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,L=M.getBoundingClientRect(),T=u.body.getBoundingClientRect();C=L.left-T.left-M.scrollLeft,S=L.top-T.top-M.scrollTop}f.style.left=k-C+"px",f.style.top=w-S+"px";var A=d.innerWidth||Math.max(u.body.offsetWidth,u.documentElement.offsetWidth),O=d.innerHeight||Math.max(u.body.offsetHeight,u.documentElement.offsetHeight);b.appendChild(f),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var E,N=r.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,P=!!r.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout((function(){E=a.getScrollInfo()})),N.bottom-O>0){var F=N.bottom-N.top,D=N.top-(x.bottom-x.top)-2;O-N.top<D?(F>D&&(f.style.height=(F=D)+"px"),f.style.top=(w=x.top-F)-S+"px",_=!1):f.style.height=O-N.top-2+"px"}var z,I=N.right-A;if(P&&(I+=a.display.nativeBarWidth),I>0&&(N.right-N.left>A&&(f.style.width=A-5+"px",I-=N.right-N.left-A),f.style.left=(k=Math.max(x.left-I-C,0))+"px"),P)for(var R=f.firstChild;R;R=R.nextSibling)R.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){z=setTimeout((function(){r.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(z)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();E||(E=a.getScrollInfo());var n=w+E.top-e.top,i=n-(d.pageYOffset||(u.documentElement||u.body).scrollTop);if(_||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=k+E.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(f,"click",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var q=this.getSelectedHintRange();return 0===q.from&&0===q.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function p(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=d(e,i);function o(i){if(i==r.length)return t(null);f(r[i],e,n,(function(e){e&&e.list.length>0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=i((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new u(this,t),e.signal(t,"shown")))}},u.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",a=i);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}if(l.length)return{list:l,from:a,to:s}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(5237))},9102(e,t,n){!function(e){"use strict";var t,n,r,i,o={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},a=e.Pos,s=e.cmpPos;function l(e){return"[object Array]"==Object.prototype.toString.call(e)}function c(t,n){return t.getModeAt(t.getCursor()).config[n]||e.resolveMode("text/x-sql")[n]}function u(e){return c(e,"keywords")||[]}function d(e){return c(e,"identifierQuote")||"`"}function f(e){return"string"==typeof e?e:e.text}function p(e,t){return l(t)&&(t={columns:t}),t.text||(t.text=e),t}function h(e){var t={};if(l(e))for(var n=e.length-1;n>=0;n--){var r=e[n];t[f(r).toUpperCase()]=p(f(r),r)}else if(e)for(var i in e)t[i.toUpperCase()]=p(i,e[i]);return t}function m(e){return t[e.toUpperCase()]}function g(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function v(e,t){var n=e.length,r=f(t).substr(0,n);return e.toUpperCase()===r.toUpperCase()}function y(e,t,n,r){if(l(n))for(var i=0;i<n.length;i++)v(t,n[i])&&e.push(r(n[i]));else for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];v(t,a=a&&!0!==a?a.displayText?{text:a.text,displayText:a.displayText}:a.text:o)&&e.push(r(a))}}function b(e){"."==e.charAt(0)&&(e=e.substr(1));for(var t=e.split(i+i),n=0;n<t.length;n++)t[n]=t[n].replace(new RegExp(i,"g"),"");return t.join(i)}function x(e){for(var t=f(e).split("."),n=0;n<t.length;n++)t[n]=i+t[n].replace(new RegExp(i,"g"),i+i)+i;var r=t.join(".");return"string"==typeof e?r:((e=g(e)).text=r,e)}function k(e,r,o,s){for(var l=!1,c=[],u=r.start,d=!0;d;)d="."==r.string.charAt(0),l=l||r.string.charAt(0)==i,u=r.start,c.unshift(b(r.string)),"."==(r=s.getTokenAt(a(e.line,r.start))).string&&(d=!0,r=s.getTokenAt(a(e.line,r.start)));var f=c.join(".");y(o,f,t,(function(e){return l?x(e):e})),y(o,f,n,(function(e){return l?x(e):e})),f=c.pop();var p=c.join("."),h=!1,v=p;if(!m(p)){var k=p;(p=_(p,s))!==k&&(h=!0)}var w=m(p);return w&&w.columns&&(w=w.columns),w&&y(o,f,w,(function(e){var t=p;return 1==h&&(t=v),"string"==typeof e?e=t+"."+e:(e=g(e)).text=t+"."+e.text,l?x(e):e})),u}function w(e,t){for(var n=e.split(/\s+/),r=0;r<n.length;r++)n[r]&&t(n[r].replace(/[`,;]/g,""))}function _(e,t){for(var n=t.doc,r=n.getValue(),i=e.toUpperCase(),l="",c="",u=[],d={start:a(0,0),end:a(t.lastLine(),t.getLineHandle(t.lastLine()).length)},f=r.indexOf(o.QUERY_DIV);-1!=f;)u.push(n.posFromIndex(f)),f=r.indexOf(o.QUERY_DIV,f+1);u.unshift(a(0,0)),u.push(a(t.lastLine(),t.getLineHandle(t.lastLine()).text.length));for(var p=null,h=t.getCursor(),g=0;g<u.length;g++){if((null==p||s(h,p)>0)&&s(h,u[g])<=0){d={start:p,end:u[g]};break}p=u[g]}if(d.start){var v=n.getRange(d.start,d.end,!1);for(g=0;g<v.length&&(w(v[g],(function(e){var t=e.toUpperCase();t===i&&m(l)&&(c=l),t!==o.ALIAS_KEYWORD&&(l=e)})),!c);g++);}return c}e.registerHelper("hint","sql",(function(e,o){t=h(o&&o.tables);var s=o&&o.defaultTable,l=o&&o.disableKeywords;n=s&&m(s),r=u(e),i=d(e),s&&!n&&(n=_(s,e)),(n=n||[]).columns&&(n=n.columns);var c,f,p,g=e.getCursor(),v=[],b=e.getTokenAt(g);if(b.end>g.ch&&(b.end=g.ch,b.string=b.string.slice(0,g.ch-b.start)),b.string.match(/^[.`"'\w@][\w$#]*$/g)?(p=b.string,c=b.start,f=b.end):(c=f=g.ch,p=""),"."==p.charAt(0)||p.charAt(0)==i)c=k(g,b,v,e);else{var x=function(e,t){return"object"==typeof e?e.className=t:e={text:e,className:t},e};y(v,p,n,(function(e){return x(e,"CodeMirror-hint-table CodeMirror-hint-default-table")})),y(v,p,t,(function(e){return x(e,"CodeMirror-hint-table")})),l||y(v,p,r,(function(e){return x(e.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:v,from:a(g.line,c),to:a(g.line,f)}}))}(n(5237),n(9532))},149(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){return n?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function r(r,i){var o=i&&i.schemaInfo,a=i&&i.quoteChar||'"',s=i&&i.matchInMiddle;if(o){var l=r.getCursor(),c=r.getTokenAt(l);if(c.end>l.ch&&(c.end=l.ch,c.string=c.string.slice(0,l.ch-c.start)),(b=e.innerMode(r.getMode(),c.state)).mode.xmlCurrentTag){var u,d,f=[],p=!1,h=/\btag\b/.test(c.type)&&!/>$/.test(c.string),m=h&&/^\w/.test(c.string);if(m){var g=r.getLine(l.line).slice(Math.max(0,c.start-2),c.start),v=/<\/$/.test(g)?"close":/<$/.test(g)?"open":null;v&&(d=c.start-("close"==v?2:1))}else h&&"<"==c.string?v="open":h&&"</"==c.string&&(v="close");var y=b.mode.xmlCurrentTag(b.state);if(!h&&!y||v){m&&(u=c.string),p=v;var b,x=b.mode.xmlCurrentContext?b.mode.xmlCurrentContext(b.state):[],k=(b=x.length&&x[x.length-1])&&o[b],w=b?k&&k.children:o["!top"];if(w&&"close"!=v)for(var _=0;_<w.length;++_)u&&!n(w[_],u,s)||f.push("<"+w[_]);else if("close"!=v)for(var C in o)!o.hasOwnProperty(C)||"!top"==C||"!attrs"==C||u&&!n(C,u,s)||f.push("<"+C);b&&(!u||"close"==v&&n(b,u,s))&&f.push("</"+b+">")}else{var S=(k=y&&o[y.name])&&k.attrs,M=o["!attrs"];if(!S&&!M)return;if(S){if(M){var L={};for(var T in M)M.hasOwnProperty(T)&&(L[T]=M[T]);for(var T in S)S.hasOwnProperty(T)&&(L[T]=S[T]);S=L}}else S=M;if("string"==c.type||"="==c.string){var A,O=(g=r.getRange(t(l.line,Math.max(0,l.ch-60)),t(l.line,"string"==c.type?c.start:c.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!O||!S.hasOwnProperty(O[1])||!(A=S[O[1]]))return;if("function"==typeof A&&(A=A.call(this,r)),"string"==c.type){u=c.string;var E=0;/['"]/.test(c.string.charAt(0))&&(a=c.string.charAt(0),u=c.string.slice(1),E++);var N=c.string.length;if(/['"]/.test(c.string.charAt(N-1))&&(a=c.string.charAt(N-1),u=c.string.substr(E,N-2)),E){var P=r.getLine(l.line);P.length>c.end&&P.charAt(c.end)==a&&c.end++}p=!0}var F=function(e){if(e)for(var t=0;t<e.length;++t)u&&!n(e[t],u,s)||f.push(a+e[t]+a);return z()};return A&&A.then?A.then(F):F(A)}for(var D in"attribute"==c.type&&(u=c.string,p=!0),S)!S.hasOwnProperty(D)||u&&!n(D,u,s)||f.push(D)}return z()}}function z(){return{list:f,from:p?t(l.line,null==d?c.start:d):l,to:p?t(l.line,c.end):l}}}e.registerHelper("hint","xml",r)}(n(5237))},9279(e,t,n){!function(e){"use strict";e.registerHelper("lint","css",(function(t,n){var r=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),r;for(var i=CSSLint.verify(t,n).messages,o=null,a=0;a<i.length;a++){var s=(o=i[a]).line-1,l=o.line-1,c=o.col-1,u=o.col;r.push({from:e.Pos(s,c),to:e.Pos(l,u),message:o.message,severity:o.type})}return r}))}(n(5237))},6015(e,t,n){!function(e,t){"use strict";var n={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};e.registerHelper("lint","html",(function(r,i){var o=[];if(t&&!t.verify&&(t=void 0!==t.default?t.default:t.HTMLHint),t||(t=window.HTMLHint),!t)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),o;for(var a=t.verify(r,i&&i.rules||n),s=0;s<a.length;s++){var l=a[s],c=l.line-1,u=l.line-1,d=l.col-1,f=l.col;o.push({from:e.Pos(c,d),to:e.Pos(u,f),message:l.message,severity:l.type})}return o}))}(n(5237),n(6899))},2154(e,t,n){!function(e){"use strict";e.registerHelper("lint","json",(function(t){var n=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),n;var r=window.jsonlint.parser||window.jsonlint;r.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{r.parse(t)}catch(e){}return n}))}(n(5237))},1561(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function r(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);var n=Math.max(0,t.clientY-i.offsetHeight-5),r=Math.max(0,Math.min(t.clientX+5,i.ownerDocument.defaultView.innerWidth-i.offsetWidth));i.style.top=n+"px",i.style.left=r+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}function i(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){e.parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600))}function a(t,n,i,a){var s=r(t,n,i);function l(){e.off(a,"mouseout",l),s&&(o(s),s=null)}var c=setInterval((function(){if(s)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){l();break}}if(!s)return clearInterval(c)}),400);e.on(a,"mouseout",l)}function s(e,t,n){for(var r in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},l)this.options[r]=l[r];for(var r in t)l.hasOwnProperty(r)?null!=t[r]&&(this.options[r]=t[r]):t.options||(this.linterOptions[r]=t[r]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){x(e,t)},this.waitingFor=0}var l={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function c(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t),n.options.highlightLines&&u(e);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function u(e){e.eachLine((function(t){var n=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass);n&&e.removeLineClass(t,"wrap",n[0])}))}function d(t,n,r,i,o){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=o&&e.on(l,"mouseover",(function(e){a(t,e,n,l)})),s}function f(e,t){return"error"==e?e:t}function p(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function h(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function m(t,n){var r=t.state.lint,i=++r.waitingFor;function o(){i=-1,t.off("change",o)}t.on("change",o),n(t.getValue(),(function(n,a){t.off("change",o),r.waitingFor==i&&(a&&n instanceof e&&(n=a),t.operation((function(){v(t,n)})))}),r.linterOptions,t)}function g(t){var n=t.state.lint;if(n){var r=n.options,i=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(i)if(r.async||i.async)m(t,i);else{var o=i(t.getValue(),n.linterOptions,t);if(!o)return;o.then?o.then((function(e){t.operation((function(){v(t,e)}))})):t.operation((function(){v(t,o)}))}}}function v(e,r){var i=e.state.lint;if(i){var o=i.options;c(e);for(var a=p(r),s=0;s<a.length;++s){var l=a[s];if(l){for(var u=null,m=i.hasGutter&&document.createDocumentFragment(),g=0;g<l.length;++g){var v=l[g],y=v.severity;y||(y="error"),u=f(u,y),o.formatAnnotation&&(v=o.formatAnnotation(v)),i.hasGutter&&m.appendChild(h(v)),v.to&&i.marked.push(e.markText(v.from,v.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+y,__annotation:v}))}i.hasGutter&&e.setGutterMarker(s,t,d(e,m,u,l.length>1,o.tooltips)),o.highlightLines&&e.addLineClass(s,"wrap",n+u)}}o.onUpdateLinting&&o.onUpdateLinting(r,a,e)}}function y(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){g(e)}),t.options.delay))}function b(e,t,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),o=0;o<t.length;o++){var s=t[o];i.appendChild(h(s))}a(e,n,i,r)}function x(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=[],l=0;l<a.length;++l){var c=a[l].__annotation;c&&s.push(c)}s.length&&b(e,s,t)}}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(c(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",y),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var o=n.getOption("gutters"),a=!1,l=0;l<o.length;++l)o[l]==t&&(a=!0);var u=n.state.lint=new s(n,r,a);u.options.lintOnChange&&n.on("change",y),0!=u.options.tooltips&&"gutter"!=u.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",u.onMouseOver),g(n)}})),e.defineExtension("performLint",(function(){g(this)}))}(n(5237))},1909(e,t,n){!function(e){"use strict";var t=e.Pos,n="http://www.w3.org/2000/svg";function r(e,t){this.mv=e,this.type=t,this.classes="left"==t?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function i(t){t.diffOutOfDate&&(t.diff=O(t.orig.getValue(),t.edit.getValue(),t.mv.options.ignoreWhitespace),t.chunks=E(t.diff),t.diffOutOfDate=!1,e.signal(t.edit,"updateDiff",t.diff))}r.prototype={constructor:r,init:function(t,n,r){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=e(t,j({value:n,readOnly:!this.mv.options.allowEditingOriginals},j(r))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new V(this.edit)),this.orig.state.trackAlignable=new V(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.lockButton.setAttribute("aria-label",this.lockButton.title),this.orig.state.diffViews=[this];var i=r.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(i)&&(i=[i]),this.classes.classLocation=i,this.diff=O(A(n),A(r.value),this.mv.options.ignoreWhitespace),this.chunks=E(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=!1!==r.showDifferences},registerEvents:function(e){this.forceUpdate=a(this),u(this,!0,!1),s(this,e)},setShowDifferences:function(e){(e=!1!==e)!=this.showDifferences&&(this.showDifferences=e,this.forceUpdate("full"))}};var o=!1;function a(t){var n,r={from:0,to:0,marked:[]},a={from:0,to:0,marked:[]},s=!1;function c(e){o=!0,s=!1,"full"==e&&(t.svg&&B(t.svg),t.copyButtons&&B(t.copyButtons),f(t.edit,r.marked,t.classes),f(t.orig,a.marked,t.classes),r.from=r.to=a.from=a.to=0),i(t),t.showDifferences&&(p(t.edit,t.diff,r,DIFF_INSERT,t.classes),p(t.orig,t.diff,a,DIFF_DELETE,t.classes)),"align"==t.mv.options.connect&&k(t),g(t),null!=t.needsScrollSync&&l(t,t.needsScrollSync),o=!1}function u(e){o||(t.dealigned=!0,d(e))}function d(e){o||s||(clearTimeout(n),!0===e&&(s=!0),n=setTimeout(c,!0===e?20:250))}function h(e,n){t.diffOutOfDate||(t.diffOutOfDate=!0,r.from=r.to=a.from=a.to=0),u(n.text.length-1!=n.to.line-n.from.line)}function m(){t.diffOutOfDate=!0,t.dealigned=!0,c("full")}return t.edit.on("change",h),t.orig.on("change",h),t.edit.on("swapDoc",m),t.orig.on("swapDoc",m),"align"==t.mv.options.connect&&(e.on(t.edit.state.trackAlignable,"realign",u),e.on(t.orig.state.trackAlignable,"realign",u)),t.edit.on("viewportChange",(function(){d(!1)})),t.orig.on("viewportChange",(function(){d(!1)})),c(),c}function s(e,t){e.edit.on("scroll",(function(){l(e,!0)&&g(e)})),e.orig.on("scroll",(function(){l(e,!1)&&g(e),t&&l(t,!0)&&g(t)}))}function l(e,t){if(e.diffOutOfDate)return e.lockScroll&&null==e.needsScrollSync&&(e.needsScrollSync=t),!1;if(e.needsScrollSync=null,!e.lockScroll)return!0;var n,r,i=+new Date;if(t?(n=e.edit,r=e.orig):(n=e.orig,r=e.edit),n.state.scrollSetBy==e&&(n.state.scrollSetAt||0)+250>i)return!1;var o=n.getScrollInfo();if("align"==e.mv.options.connect)g=o.top;else{var a,s,l=.5*o.clientHeight,u=o.top+l,d=n.lineAtHeight(u,"local"),f=F(e.chunks,d,t),p=c(n,t?f.edit:f.orig),h=c(r,t?f.orig:f.edit),m=(u-p.top)/(p.bot-p.top),g=h.top-l+m*(h.bot-h.top);if(g>o.top&&(s=o.top/l)<1)g=g*s+o.top*(1-s);else if((a=o.height-o.clientHeight-o.top)<l){var v=r.getScrollInfo();v.height-v.clientHeight-g>a&&(s=a/l)<1&&(g=g*s+(v.height-v.clientHeight-a)*(1-s))}}return r.scrollTo(o.left,g),r.state.scrollSetAt=i,r.state.scrollSetBy=e,!0}function c(e,t){var n=t.after;return null==n&&(n=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(n,"local")}}function u(t,n,r){t.lockScroll=n,n&&0!=r&&l(t,DIFF_INSERT)&&g(t),(n?e.addClass:e.rmClass)(t.lockButton,"CodeMirror-merge-scrolllock-enabled")}function d(e,t,n){for(var r=n.classLocation,i=0;i<r.length;i++)e.removeLineClass(t,r[i],n.chunk),e.removeLineClass(t,r[i],n.start),e.removeLineClass(t,r[i],n.end)}function f(t,n,r){for(var i=0;i<n.length;++i){var o=n[i];o instanceof e.TextMarker?o.clear():o.parent&&d(t,o,r)}n.length=0}function p(e,t,n,r,i){var o=e.getViewport();e.operation((function(){n.from==n.to||o.from-n.to>20||n.from-o.to>20?(f(e,n.marked,i),m(e,t,r,n.marked,o.from,o.to,i),n.from=o.from,n.to=o.to):(o.from<n.from&&(m(e,t,r,n.marked,o.from,n.from,i),n.from=o.from),o.to>n.to&&(m(e,t,r,n.marked,n.to,o.to,i),n.to=o.to))}))}function h(e,t,n,r,i,o){for(var a=n.classLocation,s=e.getLineHandle(t),l=0;l<a.length;l++)r&&e.addLineClass(s,a[l],n.chunk),i&&e.addLineClass(s,a[l],n.start),o&&e.addLineClass(s,a[l],n.end);return s}function m(e,n,r,i,o,a,s){var l=t(0,0),c=t(o,0),u=e.clipPos(t(a-1)),d=r==DIFF_DELETE?s.del:s.insert;function f(t,n){for(var r=Math.max(o,t),l=Math.min(a,n),c=r;c<l;++c)i.push(h(e,c,s,!0,c==t,c==n-1));t==n&&r==n&&l==n&&(r?i.push(h(e,r-1,s,!1,!1,!0)):i.push(h(e,r,s,!1,!0,!1)))}for(var p=0,m=!1,g=0;g<n.length;++g){var v=n[g],y=v[0],b=v[1];if(y==DIFF_EQUAL){var x=l.line+(P(n,g)?0:1);W(l,b);var k=l.line+(N(n,g)?1:0);k>x&&(m&&(f(p,x),m=!1),p=k)}else if(m=!0,y==r){var w=W(l,b,!0),_=X(c,l),C=G(u,w);Q(_,C)||i.push(e.markText(_,C,{className:d})),l=w}}m&&f(p,l.line+1)}function g(e){if(e.showDifferences){if(e.svg){B(e.svg);var t=e.gap.offsetWidth;H(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&B(e.copyButtons);for(var n=e.edit.getViewport(),r=e.orig.getViewport(),i=e.mv.wrap.getBoundingClientRect().top,o=i-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,a=i-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,s=0;s<e.chunks.length;s++){var l=e.chunks[s];l.editFrom<=n.to&&l.editTo>=n.from&&l.origFrom<=r.to&&l.origTo>=r.from&&C(e,l,a,o,t)}}}function v(e,t){for(var n=0,r=0,i=0;i<t.length;i++){var o=t[i];if(o.editTo>e&&o.editFrom<=e)return null;if(o.editFrom>e)break;n=o.editTo,r=o.origTo}return r+(e-n)}function y(e,t,n){for(var r=e.state.trackAlignable,i=e.firstLine(),o=0,a=[],s=0;;s++){for(var l=t[s],c=l?n?l.origFrom:l.editFrom:1e9;o<r.alignable.length;o+=2){var u=r.alignable[o]+1;if(!(u<=i)){if(!(u<=c))break;a.push(u)}}if(!l)break;a.push(i=n?l.origTo:l.editTo)}return a}function b(e,t,n,r){var i=0,o=0,a=0,s=0;e:for(;;i++){var l=e[i],c=t[o];if(!l&&null==c)break;for(var u=l?l[0]:1e9,d=null==c?1e9:c;a<n.length;){var f=n[a];if(f.origFrom<=d&&f.origTo>d){o++,i--;continue e}if(f.editTo>u){if(f.editFrom<=u)continue e;break}s+=f.origTo-f.origFrom-(f.editTo-f.editFrom),a++}if(u==d-s)l[r]=d,o++;else if(u<d-s)l[r]=u+s;else{var p=[d-s,null,null];p[r]=d,e.splice(i,0,p),o++}}}function x(e,t){var n=y(e.edit,e.chunks,!1),r=[];if(t)for(var i=0,o=0;i<t.chunks.length;i++){for(var a=t.chunks[i].editTo;o<n.length&&n[o]<a;)o++;o!=n.length&&n[o]==a||n.splice(o++,0,a)}for(i=0;i<n.length;i++)r.push([n[i],null,null]);return b(r,y(e.orig,e.chunks,!0),e.chunks,1),t&&b(r,y(t.orig,t.chunks,!0),t.chunks,2),r}function k(e,t){if(e.dealigned||t){if(!e.orig.curOp)return e.orig.operation((function(){k(e,t)}));e.dealigned=!1;var n=e.mv.left==e?e.mv.right:e.mv.left;n&&(i(n),n.dealigned=!1);for(var r=x(e,n),o=e.mv.aligners,a=0;a<o.length;a++)o[a].clear();o.length=0;var s=[e.edit,e.orig],l=[],c=[];for(n&&s.push(n.orig),a=0;a<s.length;a++)l.push(s[a].getScrollInfo().top),c.push(-s[a].getScrollerElement().getBoundingClientRect().top);(c[0]!=c[1]||3==s.length&&c[1]!=c[2])&&w(s,c,[0,0,0],o);for(var u=0;u<r.length;u++)w(s,c,r[u],o);for(a=0;a<s.length;a++)s[a].scrollTo(null,l[a])}}function w(e,t,n,r){for(var i=-1e8,o=[],a=0;a<e.length;a++)if(null!=n[a]){var s=e[a].heightAtLine(n[a],"local")-t[a];o[a]=s,i=Math.max(i,s)}for(a=0;a<e.length;a++)if(null!=n[a]){var l=i-o[a];l>1&&r.push(_(e[a],n[a],l))}}function _(e,t,n){var r=!0;t>e.lastLine()&&(t--,r=!1);var i=document.createElement("div");return i.className="CodeMirror-merge-spacer",i.style.height=n+"px",i.style.minWidth="1px",e.addLineWidget(t,i,{height:n,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function C(e,t,r,i,o){var a="left"==e.type,s=e.orig.heightAtLine(t.origFrom,"local",!0)-r;if(e.svg){var l=s,c=e.edit.heightAtLine(t.editFrom,"local",!0)-i;if(a){var u=l;l=c,c=u}var d=e.orig.heightAtLine(t.origTo,"local",!0)-r,f=e.edit.heightAtLine(t.editTo,"local",!0)-i;a&&(u=d,d=f,f=u);var p=" C "+o/2+" "+c+" "+o/2+" "+l+" "+(o+2)+" "+l,h=" C "+o/2+" "+d+" "+o/2+" "+f+" -1 "+f;H(e.svg.appendChild(document.createElementNS(n,"path")),"d","M -1 "+c+p+" L "+(o+2)+" "+d+h+" z","class",e.classes.connect)}if(e.copyButtons){var m=e.copyButtons.appendChild(q("div","left"==e.type?"⇝":"⇜","CodeMirror-merge-copy")),g=e.mv.options.allowEditingOriginals;if(m.title=e.edit.phrase(g?"Push to left":"Revert chunk"),m.chunk=t,m.style.top=(t.origTo>t.origFrom?s:e.edit.heightAtLine(t.editFrom,"local")-i)+"px",m.setAttribute("role","button"),m.setAttribute("tabindex","0"),m.setAttribute("aria-label",m.title),g){var v=e.edit.heightAtLine(t.editFrom,"local")-i,y=e.copyButtons.appendChild(q("div","right"==e.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));y.title="Push to right",y.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},y.style.top=v+"px","right"==e.type?y.style.left="2px":y.style.right="2px",y.setAttribute("role","button"),y.setAttribute("tabindex","0"),y.setAttribute("aria-label",y.title)}}}function S(e,n,r,i){if(!e.diffOutOfDate){var o=i.origTo>r.lastLine()?t(i.origFrom-1):t(i.origFrom,0),a=t(i.origTo,0),s=i.editTo>n.lastLine()?t(i.editFrom-1):t(i.editFrom,0),l=t(i.editTo,0),c=e.mv.options.revertChunk;c?c(e.mv,r,o,a,n,s,l):n.replaceRange(r.getRange(o,a),s,l)}}var M,L=e.MergeView=function(t,n){if(!(this instanceof L))return new L(t,n);this.options=n;var i=n.origLeft,o=null==n.origRight?n.orig:n.origRight,a=null!=i,s=null!=o,l=1+(a?1:0)+(s?1:0),c=[],u=this.left=null,d=this.right=null,f=this;if(a){u=this.left=new r(this,"left");var p=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");c.push(p),c.push(T(u))}var h=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(c.push(h),s){d=this.right=new r(this,"right"),c.push(T(d));var m=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");c.push(m)}(s?m:h).className+=" CodeMirror-merge-pane-rightmost",c.push(q("div",null,null,"height: 0; clear: both;"));var v=this.wrap=t.appendChild(q("div",c,"CodeMirror-merge CodeMirror-merge-"+l+"pane"));this.edit=e(h,j(n)),u&&u.init(p,i,n),d&&d.init(m,o,n),n.collapseIdentical&&this.editor().operation((function(){R(f,n.collapseIdentical)})),"align"==n.connect&&(this.aligners=[],k(this.left||this.right,!0)),u&&u.registerEvents(d),d&&d.registerEvents(u);var y=function(){u&&g(u),d&&g(d)};e.on(window,"resize",y);var b=setInterval((function(){for(var t=v.parentNode;t&&t!=document.body;t=t.parentNode);t||(clearInterval(b),e.off(window,"resize",y))}),5e3)};function T(t){var r=t.lockButton=q("div",null,"CodeMirror-merge-scrolllock");r.setAttribute("role","button"),r.setAttribute("tabindex","0");var i=q("div",[r],"CodeMirror-merge-scrolllock-wrap");e.on(r,"click",(function(){u(t,!t.lockScroll)})),e.on(r,"keyup",(function(e){("Enter"===e.key||"Space"===e.code)&&u(t,!t.lockScroll)}));var o=[i];if(!1!==t.mv.options.revertButtons){t.copyButtons=q("div",null,"CodeMirror-merge-copybuttons-"+t.type);var a=function(e){var n=e.target||e.srcElement;n.chunk&&("CodeMirror-merge-copy-reverse"!=n.className?S(t,t.edit,t.orig,n.chunk):S(t,t.orig,t.edit,n.chunk))};e.on(t.copyButtons,"click",a),e.on(t.copyButtons,"keyup",(function(e){("Enter"===e.key||"Space"===e.code)&&a(e)})),o.unshift(t.copyButtons)}if("align"!=t.mv.options.connect){var s=document.createElementNS&&document.createElementNS(n,"svg");s&&!s.createSVGRect&&(s=null),t.svg=s,s&&o.push(s)}return t.gap=q("div",o,"CodeMirror-merge-gap")}function A(e){return"string"==typeof e?e:e.getValue()}function O(e,t,n){M||(M=new diff_match_patch);for(var r=M.diff_main(e,t),i=0;i<r.length;++i){var o=r[i];(n?/[^ \t]/.test(o[1]):o[1])?i&&r[i-1][0]==o[0]&&(r.splice(i--,1),r[i][1]+=o[1]):r.splice(i--,1)}return r}function E(e){var n=[];if(!e.length)return n;for(var r=0,i=0,o=t(0,0),a=t(0,0),s=0;s<e.length;++s){var l=e[s],c=l[0];if(c==DIFF_EQUAL){var u=!P(e,s)||o.line<r||a.line<i?1:0,d=o.line+u,f=a.line+u;W(o,l[1],null,a);var p=N(e,s)?1:0,h=o.line+p,m=a.line+p;h>d&&(s&&n.push({origFrom:i,origTo:f,editFrom:r,editTo:d}),r=h,i=m)}else W(c==DIFF_INSERT?o:a,l[1])}return(r<=o.line||i<=a.line)&&n.push({origFrom:i,origTo:a.line+1,editFrom:r,editTo:o.line+1}),n}function N(e,t){if(t==e.length-1)return!0;var n=e[t+1][1];return!(1==n.length&&t<e.length-2||10!=n.charCodeAt(0))&&(t==e.length-2||((n=e[t+2][1]).length>1||t==e.length-3)&&10==n.charCodeAt(0))}function P(e,t){if(0==t)return!0;var n=e[t-1][1];return 10==n.charCodeAt(n.length-1)&&(1==t||10==(n=e[t-2][1]).charCodeAt(n.length-1))}function F(e,t,n){for(var r,i,o,a,s=0;s<e.length;s++){var l=e[s],c=n?l.editFrom:l.origFrom,u=n?l.editTo:l.origTo;null==i&&(c>t?(i=l.editFrom,a=l.origFrom):u>t&&(i=l.editTo,a=l.origTo)),u<=t?(r=l.editTo,o=l.origTo):c<=t&&(r=l.editFrom,o=l.origFrom)}return{edit:{before:r,after:i},orig:{before:o,after:a}}}function D(n,r,i){n.addLineClass(r,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title=n.phrase("Identical text collapsed. Click to expand.");var a=n.markText(t(r,0),t(i-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});function s(){a.clear(),n.removeLineClass(r,"wrap","CodeMirror-merge-collapsed-line")}return a.explicitlyCleared&&s(),e.on(o,"click",s),a.on("clear",s),e.on(o,"click",s),{mark:a,clear:s}}function z(e,t){var n=[];function r(){for(var e=0;e<n.length;e++)n[e].clear()}for(var i=0;i<t.length;i++){var o=t[i],a=D(o.cm,o.line,o.line+e);n.push(a),a.mark.on("clear",r)}return n[0].mark}function I(e,t,n,r){for(var i=0;i<e.chunks.length;i++)for(var o=e.chunks[i],a=o.editFrom-t;a<o.editTo+t;a++){var s=a+n;s>=0&&s<r.length&&(r[s]=!1)}}function R(e,t){"number"!=typeof t&&(t=2);for(var n=[],r=e.editor(),i=r.firstLine(),o=i,a=r.lastLine();o<=a;o++)n.push(!0);e.left&&I(e.left,t,i,n),e.right&&I(e.right,t,i,n);for(var s=0;s<n.length;s++)if(n[s]){for(var l=s+i,c=1;s<n.length-1&&n[s+1];s++,c++);if(c>t){var u=[{line:l,cm:r}];e.left&&u.push({line:v(l,e.left.chunks),cm:e.left.orig}),e.right&&u.push({line:v(l,e.right.chunks),cm:e.right.orig});var d=z(c,u);e.options.onCollapse&&e.options.onCollapse(e,l,c,d)}}}function q(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function B(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild)}function H(e){for(var t=1;t<arguments.length;t+=2)e.setAttribute(arguments[t],arguments[t+1])}function j(e,t){for(var n in t||(t={}),e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function W(e,n,r,i){for(var o=r?t(e.line,e.ch):e,a=0;;){var s=n.indexOf("\n",a);if(-1==s)break;++o.line,i&&++i.line,a=s+1}return o.ch=(a?0:o.ch)+(n.length-a),i&&(i.ch=(a?0:i.ch)+(n.length-a)),o}L.prototype={constructor:L,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(e){this.right&&this.right.setShowDifferences(e),this.left&&this.left.setShowDifferences(e)},rightChunks:function(){if(this.right)return i(this.right),this.right.chunks},leftChunks:function(){if(this.left)return i(this.left),this.left.chunks}};var K=1,U=2,$=4;function V(e){this.cm=e,this.alignable=[],this.height=e.doc.height;var t=this;e.on("markerAdded",(function(e,n){if(n.collapsed){var r=n.find(1);null!=r&&t.set(r.line,$)}})),e.on("markerCleared",(function(e,n,r,i){null!=i&&n.collapsed&&t.check(i,$,t.hasMarker)})),e.on("markerChanged",this.signal.bind(this)),e.on("lineWidgetAdded",(function(e,n,r){n.mergeSpacer||(n.above?t.set(r-1,U):t.set(r,K))})),e.on("lineWidgetCleared",(function(e,n,r){n.mergeSpacer||(n.above?t.check(r-1,U,t.hasWidgetBelow):t.check(r,K,t.hasWidget))})),e.on("lineWidgetChanged",this.signal.bind(this)),e.on("change",(function(e,n){var r=n.from.line,i=n.to.line-n.from.line,o=n.text.length-1,a=r+o;(i||o)&&t.map(r,i,o),t.check(a,$,t.hasMarker),(i||o)&&t.check(n.from.line,$,t.hasMarker)})),e.on("viewportChange",(function(){t.cm.doc.height!=t.height&&t.signal()}))}function G(e,t){return(e.line-t.line||e.ch-t.ch)<0?e:t}function X(e,t){return(e.line-t.line||e.ch-t.ch)>0?e:t}function Q(e,t){return e.line==t.line&&e.ch==t.ch}function Y(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],o=(n?i.origTo:i.editTo)-1;if(o<t)return o}}function J(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],o=n?i.origFrom:i.editFrom;if(o>t)return o}}function Z(t,n){var r=null,o=t.state.diffViews,a=t.getCursor().line;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=t==l.orig;i(l);var u=n<0?Y(l.chunks,a,c):J(l.chunks,a,c);null==u||null!=r&&!(n<0?u>r:u<r)||(r=u)}if(null==r)return e.Pass;t.setCursor(r,0)}V.prototype={signal:function(){e.signal(this,"realign"),this.height=this.cm.doc.height},set:function(e,t){for(var n=-1;n<this.alignable.length;n+=2){var r=this.alignable[n]-e;if(0==r){if((this.alignable[n+1]&t)==t)return;return this.alignable[n+1]|=t,void this.signal()}if(r>0)break}this.signal(),this.alignable.splice(n,0,e,t)},find:function(e){for(var t=0;t<this.alignable.length;t+=2)if(this.alignable[t]==e)return t;return-1},check:function(e,t,n){var r=this.find(e);if(-1!=r&&this.alignable[r+1]&t&&!n.call(this,e)){this.signal();var i=this.alignable[r+1]&~t;i?this.alignable[r+1]=i:this.alignable.splice(r,2)}},hasMarker:function(e){var t=this.cm.getLineHandle(e);if(t.markedSpans)for(var n=0;n<t.markedSpans.length;n++)if(t.markedSpans[n].marker.collapsed&&null!=t.markedSpans[n].to)return!0;return!1},hasWidget:function(e){var t=this.cm.getLineHandle(e);if(t.widgets)for(var n=0;n<t.widgets.length;n++)if(!t.widgets[n].above&&!t.widgets[n].mergeSpacer)return!0;return!1},hasWidgetBelow:function(e){if(e==this.cm.lastLine())return!1;var t=this.cm.getLineHandle(e+1);if(t.widgets)for(var n=0;n<t.widgets.length;n++)if(t.widgets[n].above&&!t.widgets[n].mergeSpacer)return!0;return!1},map:function(e,t,n){for(var r=n-t,i=e+t,o=-1,a=-1,s=0;s<this.alignable.length;s+=2){var l=this.alignable[s];l==e&&this.alignable[s+1]&U&&(o=s),l==i&&this.alignable[s+1]&U&&(a=s),l<=e||(l<i?this.alignable.splice(s--,2):this.alignable[s]+=r)}if(o>-1){var c=this.alignable[o+1];c==U?this.alignable.splice(o,2):this.alignable[o+1]=c&~U}a>-1&&n&&this.set(e+n,U)}},e.commands.goNextDiff=function(e){return Z(e,1)},e.commands.goPrevDiff=function(e){return Z(e,-1)}}(n(5237))},4285(e,t,n){!function(e,t){e.modeURL||(e.modeURL="../mode/%N/%N.js");var r={};function i(e,t){var n=t;return function(){0==--n&&e()}}function o(t,n,r){var o=e.modes[t],a=o&&o.dependencies;if(!a)return n();for(var s=[],l=0;l<a.length;++l)e.modes.hasOwnProperty(a[l])||s.push(a[l]);if(!s.length)return n();var c=i(n,s.length);for(l=0;l<s.length;++l)e.requireMode(s[l],c,r)}e.requireMode=function(i,a,s){if("string"!=typeof i&&(i=i.name),e.modes.hasOwnProperty(i))return o(i,a,s);if(r.hasOwnProperty(i))return r[i].push(a);var l=s&&s.path?s.path(i):e.modeURL.replace(/%N/g,i);if(s&&s.loadMode)s.loadMode(l,(function(){o(i,a,s)}));else if("plain"==t){var c=document.createElement("script");c.src=l;var u=document.getElementsByTagName("script")[0],d=r[i]=[a];e.on(c,"load",(function(){o(i,(function(){for(var e=0;e<d.length;++e)d[e]()}),s)})),u.parentNode.insertBefore(c,u)}else"cjs"==t?(n(4301)(l),a()):"amd"==t&&requirejs([l],a)},e.autoLoadMode=function(t,n,r){e.modes.hasOwnProperty(n)||e.requireMode(n,(function(){t.setOption("mode",t.getOption("mode"))}),r)}}(n(5237),"cjs")},7340(e,t,n){!function(e){"use strict";e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(c=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=a.close&&!o.startingInner?r(c,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(i.string=c.slice(0,d));var s=a.mode.token(i,o.inner);return d>-1?i.string=c:i.pos>i.start&&(o.startingInner=!1),d==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,c=i.string,u=0;u<n.length;++u){var d,f=n[u];if((d=r(c,f.open,i.pos))==i.pos){f.parseDelimiters||i.match(f.open),o.startingInner=!!f.parseDelimiters,o.innerActive=f;var p=0;if(t.indent){var h=t.indent(o.outer,"","");h!==e.Pass&&(p=h)}return o.inner=e.startState(f.mode,p),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=d&&d<l&&(l=d)}l!=1/0&&(i.string=c.slice(0,l));var m=t.token(i,o.outer);return l!=1/0&&(i.string=c),m},indent:function(n,r,i){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<n.length;++o){var a=n[o];"\n"===a.open&&(r.innerActive=a,r.inner=e.startState(a.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}(n(5237))},2580(e,t,n){!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}}(n(5237))},4856(e,t,n){!function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function o(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var o=r.local.endToken||null;return r.local=r.localState=null,o}var a;return o=r.local.mode.token(n,r.localState),r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),o}for(var l=e[r.state],c=0;c<l.length;c++){var u=l[c],d=(!u.data.sol||n.sol())&&n.match(u.regex);if(d){u.data.next?r.state=u.data.next:u.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=u.data.push):u.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),u.data.mode&&s(t,r,u.data.mode,u.token),u.data.indent&&r.indent.push(n.indentation()+t.indentUnit),u.data.dedent&&r.indent.pop();var f=u.token;if(f&&f.apply&&(f=f(d)),d.length>2&&u.token&&"string"!=typeof u.token){for(var p=2;p<d.length;p++)d[p]&&(r.pending||(r.pending=[])).push({text:d[p],token:u.token[p-1]});return n.backUp(d[0].length-(d[1]?d[1].length:0)),f[0]}return f&&f.join?f[0]:f}}return n.next(),null}}function a(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!a(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function s(t,r,i,o){var s;if(i.persistent)for(var l=r.persistentStates;l&&!s;l=l.next)(i.spec?a(i.spec,l.spec):i.mode==l.mode)&&(s=l);var c=s?s.mode:i.mode||e.getMode(t,i.spec),u=s?s.state:e.startState(c);i.persistent&&!s&&(r.persistentStates={mode:c,spec:i.spec,state:u,next:r.persistentStates}),r.localState=u,r.local={mode:c,end:i.end&&n(i.end),endScan:i.end&&!1!==i.forceEnd&&n(i.end,!1),endToken:o&&o.join?o[o.length-1]:o}}function l(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function c(t,n){return function(r,i,o){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,o);if(null==r.indent||r.local||n.dontIndentStates&&l(r.state,n.dontIndentStates)>-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var c=0;c<s.length;c++){var u=s[c];if(u.data.dedent&&!1!==u.data.dedentIfLineStart){var d=u.regex.exec(i);if(d&&d[0]){a--,(u.next||u.push)&&(s=t[u.next||u.push]),i=i.slice(d[0].length);continue e}}}break}return a<0?0:r.indent[a]}}e.defineSimpleMode=function(t,n){e.defineMode(t,(function(t){return e.simpleMode(t,n)}))},e.simpleMode=function(n,r){t(r,"start");var a={},s=r.meta||{},l=!1;for(var u in r)if(u!=s&&r.hasOwnProperty(u))for(var d=a[u]=[],f=r[u],p=0;p<f.length;p++){var h=f[p];d.push(new i(h,r)),(h.indent||h.dedent)&&(l=!0)}var m={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:l?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:o(a,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:c(a,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(m[g]=s[g]);return m}}(n(5237))},4301(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4301,e.exports=t},1660(e,t,n){!function(e){"use strict";var t=/^(p|li|div|h\\d|pre|blockquote|td)$/;function n(e,r){if(3==e.nodeType)return r.push(e.nodeValue);for(var i=e.firstChild;i;i=i.nextSibling)n(i,r),t.test(e.nodeType)&&r.push("\n")}e.colorize=function(t,r){t||(t=document.body.getElementsByTagName("pre"));for(var i=0;i<t.length;++i){var o=t[i],a=o.getAttribute("data-lang")||r;if(a){var s=[];n(o,s),o.textContent="",e.runMode(s.join(""),a,o),o.className+=" cm-s-default"}}}}(n(5237),n(7453))},4089(e,t,n){!function(){"use strict";function e(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function t(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function r(){}var i=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};i.prototype.eol=function(){return this.pos>=this.string.length},i.prototype.sol=function(){return this.pos==this.lineStart},i.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},i.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},i.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},i.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},i.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},i.prototype.skipToEnd=function(){this.pos=this.string.length},i.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},i.prototype.backUp=function(e){this.pos-=e},i.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=t(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?t(this.string,this.lineStart,this.tabSize):0)},i.prototype.indentation=function(){return t(this.string,null,this.tabSize)-(this.lineStart?t(this.string,this.lineStart,this.tabSize):0)},i.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},i.prototype.current=function(){return this.string.slice(this.start,this.pos)},i.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},i.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},i.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var o={},a={};function s(t){if("string"==typeof t&&a.hasOwnProperty(t))t=a[t];else if(t&&"string"==typeof t.name&&a.hasOwnProperty(t.name)){var n=a[t.name];"string"==typeof n&&(n={name:n}),i=n,o=t,Object.create?l=Object.create(i):(r.prototype=i,l=new r),o&&e(o,l),(t=l).name=n.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return s("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return s("application/json")}var i,o,l;return"string"==typeof t?{name:t}:t||{name:"null"}}var l={};var c={__proto__:null,modes:o,mimeModes:a,defineMode:function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),o[e]=t},defineMIME:function(e,t){a[e]=t},resolveMode:s,getMode:function e(t,n){n=s(n);var r=o[n.name];if(!r)return e(t,"text/plain");var i=r(t,n);if(l.hasOwnProperty(n.name)){var a=l[n.name];for(var c in a)a.hasOwnProperty(c)&&(i.hasOwnProperty(c)&&(i["_"+c]=i[c]),i[c]=a[c])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var u in n.modeProps)i[u]=n.modeProps[u];return i},modeExtensions:l,extendMode:function(t,n){e(n,l.hasOwnProperty(t)?l[t]:l[t]={})},copyState:function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},innerMode:function(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}},startState:function(e,t,n){return!e.startState||e.startState(t,n)}},u="undefined"!=typeof globalThis?globalThis:window;for(var d in u.CodeMirror={},CodeMirror.StringStream=i,c)CodeMirror[d]=c[d];CodeMirror.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(e){return e.split(/\r?\n|\r/)},CodeMirror.countColumn=t,CodeMirror.defaults={indentUnit:2},function(e){e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),a=i&&i.tabSize||e.defaults.tabSize;if(r.appendChild){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),l=r,c=0;l.textContent="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(c=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),c+=e.length-r;break}c+=i-r,n+=e.slice(r,i);var o=a-c%a;c+=o;for(var u=0;u<o;++u)n+=" ";r=i+1}if(t){var d=l.appendChild(document.createElement("span"));d.className="cm-"+t.replace(/ +/g," cm-"),d.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,p=u.length;f<p;++f){f&&r("\n");var h=new e.StringStream(u[f],null,{lookAhead:function(e){return u[f+e]},baseToken:function(){}});for(!h.string&&o.blankLine&&o.blankLine(d);!h.eol();){var m=o.token(h,d);r(h.current(),m,f,h.start,d,o),h.start=h.pos}}}}(n(5237))}()},7453(e,t,n){!function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),a=i&&i.tabSize||e.defaults.tabSize;if(r.appendChild){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),l=r,c=0;l.textContent="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(c=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),c+=e.length-r;break}c+=i-r,n+=e.slice(r,i);var o=a-c%a;c+=o;for(var u=0;u<o;++u)n+=" ";r=i+1}if(t){var d=l.appendChild(document.createElement("span"));d.className="cm-"+t.replace(/ +/g," cm-"),d.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,p=u.length;f<p;++f){f&&r("\n");var h=new e.StringStream(u[f],null,{lookAhead:function(e){return u[f+e]},baseToken:function(){}});for(!h.string&&o.blankLine&&o.blankLine(d);!h.eol();){var m=o.token(h,d);r(h.current(),m,f,h.start,d,o),h.start=h.pos}}}}(n(5237))},3004(e,t,n){!function(e){"use strict";function t(e,t){function n(e){clearTimeout(r.doRedraw),r.doRedraw=setTimeout((function(){r.redraw()}),e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var r=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(r.doUpdate),r.doUpdate=setTimeout((function(){r.computeScale()&&n(20)}),100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("changes",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",(function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)})),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){!1!==e&&this.computeScale();var t=this.cm,n=this.hScale,r=document.createDocumentFragment(),i=this.annotations,o=t.getOption("lineWrapping"),a=o&&1.5*t.defaultTextHeight(),s=null,l=null;function c(e,n){if(s!=e.line){s=e.line,l=t.getLineHandle(e.line);var r=t.getLineHandleVisualStart(l);r!=l&&(s=t.getLineNumber(r),l=r)}return l.widgets&&l.widgets.length||o&&l.height>a?t.charCoords(e,"local")[n?"top":"bottom"]:t.heightAtLine(l,"local")+(n?0:l.height)}var u=t.lastLine();if(t.display.barWidth)for(var d,f=0;f<i.length;f++){var p=i[f];if(!(p.to.line>u)){for(var h=d||c(p.from,!0)*n,m=c(p.to,!1)*n;f<i.length-1&&!(i[f+1].to.line>u)&&!((d=c(i[f+1].from,!0)*n)>m+.9);)m=c((p=i[++f]).to,!1)*n;if(m!=h){var g=Math.max(m-h,3),v=r.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(t.display.barWidth-1,2)+"px; top: "+(h+this.buttonHeight)+"px; height: "+g+"px",v.className=this.options.className,p.id&&v.setAttribute("annotation-id",p.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}}(n(5237))},6272(e,t,n){!function(e){"use strict";function t(t,r){e.changeEnd(r).line==t.lastLine()&&n(t)}function n(e){var t="";e.lineCount()>1&&(t=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px"),e.state.scrollPastEndPadding!=t&&(e.state.scrollPastEndPadding=t,e.display.lineSpace.parentNode.style.paddingBottom=t,e.off("refresh",n),e.setSize(),e.on("refresh",n))}e.defineOption("scrollPastEnd",!1,(function(r,i,o){o&&o!=e.Init&&(r.off("change",t),r.off("refresh",n),r.display.lineSpace.parentNode.style.paddingBottom="",r.state.scrollPastEndPadding=null),i&&(r.on("change",t),r.on("refresh",n),n(r))}))}(n(5237))},5841(e,t,n){!function(e){"use strict";function t(t,n,r){this.orientation=n,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var i=this;function o(t){var n=e.wheelEventPixels(t)["horizontal"==i.orientation?"x":"y"],r=i.pos;i.moveTo(i.pos+n),i.pos!=r&&e.e_preventDefault(t)}e.on(this.inner,"mousedown",(function(t){if(1==t.which){e.e_preventDefault(t);var n="horizontal"==i.orientation?"pageX":"pageY",r=t[n],o=i.pos;e.on(document,"mousemove",s),e.on(document,"mouseup",a)}function a(){e.off(document,"mousemove",s),e.off(document,"mouseup",a)}function s(e){if(1!=e.which)return a();i.moveTo(o+(e[n]-r)*(i.total/i.size))}})),e.on(this.node,"click",(function(t){e.e_preventDefault(t);var n,r=i.inner.getBoundingClientRect();n="horizontal"==i.orientation?t.clientX<r.left?-1:t.clientX>r.right?1:0:t.clientY<r.top?-1:t.clientY>r.bottom?1:0,i.moveTo(i.pos+n*i.screen)})),e.on(this.node,"mousewheel",o),e.on(this.node,"DOMMouseScroll",o)}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos||(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",0))},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};var n=10;function r(e,n,r){this.addClass=e,this.horiz=new t(e,"horizontal",r),n(this.horiz.node),this.vert=new t(e,"vertical",r),n(this.vert.node),this.width=null}t.prototype.update=function(e,t,r){var i=this.screen!=t||this.total!=e||this.size!=r;i&&(this.screen=t,this.total=e,this.size=r);var o=this.screen*(this.size/this.total);o<n&&(this.size-=n-o,o=n),this.inner.style["horizontal"==this.orientation?"width":"height"]=o+"px",this.setPos(this.pos,i)},r.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,r=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=r?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(r?n:0)),this.vert.node.style.bottom=r?n+"px":"0"),r&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?n:0)-e.barLeft),this.horiz.node.style.right=i?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?n:0,bottom:r?n:0}},r.prototype.setScrollTop=function(e){this.vert.setPos(e)},r.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},r.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new r("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new r("CodeMirror-overlayscroll",e,t)}}(n(5237))},8820(e,t,n){!function(e){"use strict";function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase("Jump to line:"),i.line+1+":"+i.ch,(function(t){var n;if(t)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(o=i.line+o+1),e.setCursor(o-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(n(5237),n(8527))},6700(e,t,n){!function(e){"use strict";var t={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function n(e){for(var n in this.options={},t)this.options[n]=(e&&e.hasOwnProperty(n)?e:t)[n];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function r(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&o(e,t)}function i(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,o(e,t))}function o(e,t){clearTimeout(t.timeout),t.timeout=setTimeout((function(){l(e)}),t.options.delay)}function a(e,t,n,r){var i=e.state.matchHighlighter;if(e.addOverlay(i.overlay=d(t,n,r)),i.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=n?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t;i.matchesonscroll=e.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function s(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation((function(){var t=e.state.matchHighlighter;if(s(e),e.somethingSelected()||!t.options.showToken){var n=e.getCursor("from"),r=e.getCursor("to");if(n.line==r.line&&(!t.options.wordsOnly||c(e,n,r))){var i=e.getRange(n,r);t.options.trim&&(i=i.replace(/^\s+|\s+$/g,"")),i.length>=t.options.minChars&&a(e,i,!1,t.options.style)}}else{for(var o=!0===t.options.showToken?/[\w$]/:t.options.showToken,l=e.getCursor(),u=e.getLine(l.line),d=l.ch,f=d;d&&o.test(u.charAt(d-1));)--d;for(;f<u.length&&o.test(u.charAt(f));)++f;d<f&&a(e,u.slice(d,f),o,t.options.style)}}))}function c(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var r={line:t.line,ch:t.ch-1};if(null===e.getRange(r,t).match(/\W/))return!1}return!(n.ch<e.getLine(t.line).length&&(r={line:n.line,ch:n.ch+1},null===e.getRange(n,r).match(/\W/)))}return!1}function u(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}function d(e,t,n){return{token:function(r){if(r.match(e)&&(!t||u(r,t)))return n;r.next(),r.skipTo(e.charAt(0))||r.skipToEnd()}}}e.defineOption("highlightSelectionMatches",!1,(function(t,o,a){if(a&&a!=e.Init&&(s(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",r),t.off("focus",i)),o){var c=t.state.matchHighlighter=new n(o);t.hasFocus()?(c.active=!0,l(t)):t.on("focus",i),t.on("cursorActivity",r)}}))}(n(5237),n(6685))},6685(e,t,n){!function(e){"use strict";function t(e,t,n,r){this.cm=e,this.options=r;var i={listenForChanges:!1};for(var o in r)i[o]=r[o];i.className||(i.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(i),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}e.defineExtension("showMatchesOnScrollbar",(function(e,n,r){return"string"==typeof r&&(r={className:r}),r||(r={}),new t(this,e,n,r)}));var n=1e3;function r(e,t,n){return e<=t?e:Math.max(t,e+n)}t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length&&!((o=this.matches[t]).from.line>=this.gap.to);t++)o.to.line>=this.gap.from&&this.matches.splice(t--,1);for(var r=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||n;r.findNext();){var o;if((o={from:r.from(),to:r.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,o),this.matches.length>i)break}this.gap=null}},t.prototype.onChange=function(t){var n=t.from.line,i=e.changeEnd(t).line,o=i-t.to.line;if(this.gap?(this.gap.from=Math.min(r(this.gap.from,n,o),t.from.line),this.gap.to=Math.max(r(this.gap.to,n,o),t.from.line)):this.gap={from:t.from.line,to:i+1},o)for(var a=0;a<this.matches.length;a++){var s=this.matches[a],l=r(s.from.line,n,o);l!=s.from.line&&(s.from=e.Pos(l,s.from.ch));var c=r(s.to.line,n,o);c!=s.to.line&&(s.to=e.Pos(c,s.to.ch))}clearTimeout(this.update);var u=this;this.update=setTimeout((function(){u.updateAfterChange()}),250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}(n(5237),n(3653),n(3004))},6895(e,t,n){!function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function a(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,o){var l=r(t);if(l.query)return p(t,n);var c=t.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(d(t,l,n),l.posFrom=l.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)})))};a(t,g(t),c,f,(function(n,i){var o=e.keyName(n),a=t.getOption("extraKeys"),s=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(n),f(i,n))})),o&&c&&(d(t,l,c),p(t,n))}else s(t,g(t),"Search for:",c,(function(e){e&&!l.query&&t.operation((function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,i){t.operation((function(){var a=r(t),s=o(t,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=o(t,a.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function g(e){var t=m("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),m("",null,t," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function x(e,t,n){e.operation((function(){for(var r=o(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return i[t]})))}else r.replace(n)}))}function k(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase("Replace all:"):e.phrase("Replace:"),a=m("",null,m("span",{className:"CodeMirror-search-label"},i),v(e));s(e,a,i,n,(function(n){n&&(n=u(n),s(e,y(e),e.phrase("Replace with:"),"",(function(r){if(r=c(r),t)x(e,n,r);else{h(e);var i=o(e,n,e.getCursor("from")),a=function(){var t,c=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||c&&i.from().line==c.line&&i.from().ch==c.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,b(e),e.phrase("Replace?"),[function(){s(t)},a,function(){x(e,n,r)}]))},s=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=k,e.commands.replaceAll=function(e){k(e,!0)}}(n(5237),n(3653),n(8527))},3653(e,t,n){!function(e){"use strict";var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var l=e.getLine(i),c=t.exec(l);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function l(e,t,n){if(!a(t))return s(e,t,n);t=o(t,"gm");for(var i,l=1,c=n.line,u=e.lastLine();c<=u;){for(var d=0;d<l&&!(c>u);d++){var f=e.getLine(c++);i=null==i?f:i+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(i);if(p){var h=i.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var l=e.getLine(i),u=c(l,t,a<0?0:l.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function d(e,t,n){if(!a(t))return u(e,t,n);t=o(t,"gm");for(var i,s=1,l=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p<s&&d>=f;p++){var h=e.getLine(d--);i=null==i?h:h+"\n"+i}s*=2;var m=c(i,t,l);if(m){var g=i.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function p(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-l.length;c<=d;c++,u=0){var p=e.getLine(c).slice(u),h=s(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=f(p,h,m,s)+u,{from:r(c,f(p,h,m,s)+u),to:r(c,f(p,h,m+l[0].length,s)+u)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v<l.length-1;v++)if(s(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),b=s(y),x=l[l.length-1];if(b.slice(0,x.length)==x)return{from:r(c,f(p,h,g,s)+u),to:r(c+l.length-1,f(y,b,x.length,s))}}}}function h(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.firstLine()-1+l.length;c>=d;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=s(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(c,f(p,h,m,s)),to:r(c,f(p,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=c-l.length+1;v<l.length-1;v++)if(s(e.getLine(o+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),b=s(y);if(b.slice(b.length-l[0].length)==l[0])return{from:r(c+1-l.length,f(y,b,y.length-l[0].length,s)),to:r(c,f(p,h,g.length,s))}}}}function m(e,t,n,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(n,r){return(n?h:p)(e,t,r,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?u:s)(e,t,r)}:this.matches=function(n,r){return(n?d:l)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new m(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new m(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(5237))},436(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function i(e){for(var i=0;i<e.state.activeLines.length;i++)e.removeLineClass(e.state.activeLines[i],"wrap",t),e.removeLineClass(e.state.activeLines[i],"background",n),e.removeLineClass(e.state.activeLines[i],"gutter",r)}function o(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function a(e,a){for(var s=[],l=0;l<a.length;l++){var c=a[l],u=e.getOption("styleActiveLine");if("object"==typeof u&&u.nonEmpty?c.anchor.line==c.head.line:c.empty()){var d=e.getLineHandleVisualStart(c.head.line);s[s.length-1]!=d&&s.push(d)}}o(e.state.activeLines,s)||e.operation((function(){i(e);for(var o=0;o<s.length;o++)e.addLineClass(s[o],"wrap",t),e.addLineClass(s[o],"background",n),e.addLineClass(s[o],"gutter",r);e.state.activeLines=s}))}function s(e,t){a(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,n,r){var o=r!=e.Init&&r;n!=o&&(o&&(t.off("beforeSelectionChange",s),i(t),delete t.state.activeLines),n&&(t.state.activeLines=[],a(t,t.listSelections()),t.on("beforeSelectionChange",s)))}))}(n(5237))},9533(e,t,n){!function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){c(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){s(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var a=o&&o!=e.Init;i&&!a?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",l(r),r.on("cursorActivity",t),r.on("change",n)):!i&&a&&(r.off("cursorActivity",t),r.off("change",n),s(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=8,i=e.Pos,o=e.cmpPos;function a(e,t,n,a){if(0!=o(t,n))for(var s=e.state.markedSelection,l=e.state.markedSelectionStyle,c=t.line;;){var u=c==t.line?t:i(c,0),d=c+r,f=d>=n.line,p=f?n:i(d,0),h=e.markText(u,p,{className:l});if(null==a?s.push(h):s.splice(a++,0,h),f)break;c=d}}function s(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function l(e){s(e);for(var t=e.listSelections(),n=0;n<t.length;n++)a(e,t[n].from(),t[n].to())}function c(e){if(!e.somethingSelected())return s(e);if(e.listSelections().length>1)return l(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,n);var c=i[0].find(),u=i[i.length-1].find();if(!c||!u||n.line-t.line<=r||o(t,u.to)>=0||o(n,c.from)<=0)return l(e);for(;o(t,c.from)>0;)i.shift().clear(),c=i[0].find();for(o(t,c.from)<0&&(c.to.line-t.line<r?(i.shift().clear(),a(e,t,c.to,0)):a(e,t,c.from,0));o(n,u.to)<0;)i.pop().clear(),u=i[i.length-1].find();o(n,u.to)>0&&(n.line-u.from.line<r?(i.pop().clear(),a(e,u.from,n)):a(e,u.to,n))}}(n(5237))},6209(e,t,n){!function(e){"use strict";function t(e,t){var n=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?n.mouseX=n.mouseY=null:(n.mouseX=t.clientX,n.mouseY=t.clientY),i(e)}function n(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var n=e.state.selectionPointer;n.mouseX=n.mouseY=null,i(e)}}function r(e){e.state.selectionPointer.rects=null,i(e)}function i(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout((function(){o(e),e.state.selectionPointer.willUpdate=!1}),50))}function o(e){var t=e.state.selectionPointer;if(t){if(null==t.rects&&null!=t.mouseX&&(t.rects=[],e.somethingSelected()))for(var n=e.display.selectionDiv.firstChild;n;n=n.nextSibling)t.rects.push(n.getBoundingClientRect());var r=!1;if(null!=t.mouseX)for(var i=0;i<t.rects.length;i++){var o=t.rects[i];o.left<=t.mouseX&&o.right>=t.mouseX&&o.top<=t.mouseY&&o.bottom>=t.mouseY&&(r=!0)}var a=r?t.value:"";e.display.lineDiv.style.cursor!=a&&(e.display.lineDiv.style.cursor=a)}}e.defineOption("selectionPointer",!1,(function(i,o){var a=i.state.selectionPointer;a&&(e.off(i.getWrapperElement(),"mousemove",a.mousemove),e.off(i.getWrapperElement(),"mouseout",a.mouseout),e.off(window,"scroll",a.windowScroll),i.off("cursorActivity",r),i.off("scroll",r),i.state.selectionPointer=null,i.display.lineDiv.style.cursor=""),o&&(a=i.state.selectionPointer={value:"string"==typeof o?o:"default",mousemove:function(e){t(i,e)},mouseout:function(e){n(i,e)},windowScroll:function(){r(i)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(i.getWrapperElement(),"mousemove",a.mousemove),e.on(i.getWrapperElement(),"mouseout",a.mouseout),e.on(window,"scroll",a.windowScroll),i.on("cursorActivity",r),i.on("scroll",r))}))}(n(5237))},6666(e,t,n){!function(e){"use strict";e.TernServer=function(e){var t=this;this.options=e||{};var n=this.options.plugins||(this.options.plugins={});n.doc_comment||(n.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new I(this):this.server=new tern.Server({getFile:function(e,n){return i(t,e,n)},async:!0,defs:this.options.defs||[],plugins:n}),this.trackChange=function(e,n){s(t,e,n)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(e,n){return c(t,e,n)},this.getHint.async=!0},e.TernServer.prototype={addDoc:function(t,n){var r={doc:n,name:t,changed:null};return this.server.addFile(t,z(this,r)),e.on(n,"change",this.trackChange),this.docs[t]=r},delDoc:function(t){var n=a(this,t);n&&(e.off(n.doc,"change",this.trackChange),delete this.docs[n.name],this.server.delFile(n.name))},hideDoc:function(e){D(this);var t=a(this,e);t&&t.changed&&l(this,t)},complete:function(e){e.showHint({hint:this.getHint})},showType:function(e,t,n){d(this,e,t,"type",n)},showDocs:function(e,t,n){d(this,e,t,"documentation",n)},updateArgHints:function(e){f(this,e)},jumpToDef:function(e){m(this,e)},jumpBack:function(e){g(this,e)},rename:function(e){x(this,e)},selectName:function(e){k(this,e)},request:function(e,t,n,r){var i=this,a=o(this,e.getDoc()),s=C(this,a,t,r),l=s.query&&this.options.queryOptions&&this.options.queryOptions[s.query.type];if(l)for(var c in l)s.query[c]=l[c];this.server.request(s,(function(e,r){!e&&i.options.responseFilter&&(r=i.options.responseFilter(a,t,s,e,r)),n(e,r)}))},destroy:function(){D(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var t=e.Pos,n="CodeMirror-Tern-",r=250;function i(e,t,n){var r=e.docs[t];r?n(z(e,r)):e.options.getFile?e.options.getFile(t,n):n(null)}function o(e,t,n){for(var r in e.docs){var i=e.docs[r];if(i.doc==t)return i}if(!n)for(var o=0;;++o)if(r="[doc"+(o||"")+"]",!e.docs[r]){n=r;break}return e.addDoc(n,t)}function a(t,n){return"string"==typeof n?t.docs[n]:(n instanceof e&&(n=n.getDoc()),n instanceof e.Doc?o(t,n):void 0)}function s(e,t,n){var i=o(e,t),a=e.cachedArgHints;a&&a.doc==t&&M(a.start,n.to)>=0&&(e.cachedArgHints=null);var s=i.changed;null==s&&(i.changed=s={from:n.from.line,to:n.from.line});var c=n.from.line+(n.text.length-1);n.from.line<s.to&&(s.to=s.to-(n.to.line-c)),c>=s.to&&(s.to=c+1),s.from>n.from.line&&(s.from=n.from.line),t.lineCount()>r&&n.to-s.from>100&&setTimeout((function(){i.changed&&i.changed.to-i.changed.from>100&&l(e,i)}),200)}function l(e,t){e.server.request({files:[{type:"full",name:t.name,text:z(e,t)}]},(function(e){e?window.console.error(e):t.changed=null}))}function c(r,i,o){r.request(i,{type:"completions",types:!0,docs:!0,urls:!0},(function(a,s){if(a)return F(r,i,a);var l=[],c="",d=s.start,f=s.end;'["'==i.getRange(t(d.line,d.ch-2),d)&&'"]'!=i.getRange(f,t(f.line,f.ch+2))&&(c='"]');for(var p=0;p<s.completions.length;++p){var h=s.completions[p],m=u(h.type);s.guess&&(m+=" "+n+"guess"),l.push({text:h.name+c,displayText:h.displayName||h.name,className:m,data:h})}var g={from:d,to:f,list:l},v=null;e.on(g,"close",(function(){N(v)})),e.on(g,"update",(function(){N(v)})),e.on(g,"select",(function(e,t){N(v);var o=r.options.completionTip?r.options.completionTip(e.data):e.data.doc;o&&(v=E(t.parentNode.getBoundingClientRect().right+window.pageXOffset,t.getBoundingClientRect().top+window.pageYOffset,o,i,n+"hint-doc"))})),o(g)}))}function u(e){var t;return t="?"==e?"unknown":"number"==e||"string"==e||"bool"==e?e:/^fn\(/.test(e)?"fn":/^\[/.test(e)?"array":"object",n+"completion "+n+"completion-"+t}function d(e,t,n,r,i){e.request(t,r,(function(n,r){if(n)return F(e,t,n);if(e.options.typeTip)var o=e.options.typeTip(r);else if(o=L("span",null,L("strong",null,r.type||"not found")),r.doc&&o.appendChild(document.createTextNode(" — "+r.doc)),r.url){o.appendChild(document.createTextNode(" "));var a=o.appendChild(L("a",null,"[docs]"));a.href=r.url,a.target="_blank"}A(t,o,e),i&&i()}),n)}function f(n,r){if(D(n),!r.somethingSelected()){var i=r.getTokenAt(r.getCursor()).state,o=e.innerMode(r.getMode(),i);if("javascript"==o.mode.name){var a=o.state.lexical;if("call"==a.info){for(var s,l=a.pos||0,c=r.getOption("tabSize"),u=r.getCursor().line,d=Math.max(0,u-9),f=!1;u>=d;--u){for(var m=r.getLine(u),g=0,v=0;;){var y=m.indexOf("\t",v);if(-1==y)break;g+=c-(y+g)%c-1,v=y+1}if(s=a.column-g,"("==m.charAt(s)){f=!0;break}}if(f){var b=t(u,s),x=n.cachedArgHints;if(x&&x.doc==r.getDoc()&&0==M(b,x.start))return p(n,r,l);n.request(r,{type:"type",preferFunction:!0,end:b},(function(e,t){!e&&t.type&&/^fn\(/.test(t.type)&&(n.cachedArgHints={start:b,type:h(t.type),name:t.exprName||t.name||"fn",guess:t.guess,doc:r.getDoc()},p(n,r,l))}))}}}}}function p(e,t,r){D(e);for(var i=e.cachedArgHints,o=i.type,a=L("span",i.guess?n+"fhint-guess":null,L("span",n+"fname",i.name),"("),s=0;s<o.args.length;++s){s&&a.appendChild(document.createTextNode(", "));var l=o.args[s];a.appendChild(L("span",n+"farg"+(s==r?" "+n+"farg-current":""),l.name||"?")),"?"!=l.type&&(a.appendChild(document.createTextNode(": ")),a.appendChild(L("span",n+"type",l.type)))}a.appendChild(document.createTextNode(o.rettype?") -> ":")")),o.rettype&&a.appendChild(L("span",n+"type",o.rettype));var c=t.cursorCoords(null,"page"),u=e.activeArgHints=E(c.right+1,c.bottom,a,t);setTimeout((function(){u.clear=O(t,(function(){e.activeArgHints==u&&D(e)}))}),20)}function h(e){var t=[],n=3;function r(t){for(var r=0,i=n;;){var o=e.charAt(n);if(t.test(o)&&!r)return e.slice(i,n);/[{\[\(]/.test(o)?++r:/[}\]\)]/.test(o)&&--r,++n}}if(")"!=e.charAt(n))for(;;){var i=e.slice(n).match(/^([^, \(\[\{]+): /);if(i&&(n+=i[0].length,i=i[1]),t.push({name:i,type:r(/[\),]/)}),")"==e.charAt(n))break;n+=2}var o=e.slice(n).match(/^\) -> (.*)$/);return{args:t,rettype:o&&o[1]}}function m(e,t){function n(n){var r={type:"definition",variable:n||null},i=o(e,t.getDoc());e.server.request(C(e,i,r),(function(n,r){if(n)return F(e,t,n);if(r.file||!r.url){if(r.file){var o,a=e.docs[r.file];if(a&&(o=y(a.doc,r)))return e.jumpStack.push({file:i.name,start:t.getCursor("from"),end:t.getCursor("to")}),void v(e,i,a,o.start,o.end)}F(e,t,"Could not find a definition.")}else window.open(r.url)}))}b(t)?n():T(t,"Jump to variable",(function(e){e&&n(e)}))}function g(e,t){var n=e.jumpStack.pop(),r=n&&e.docs[n.file];r&&v(e,o(e,t.getDoc()),r,n.start,n.end)}function v(e,t,n,r,i){n.doc.setSelection(r,i),t!=n&&e.options.switchToDoc&&(D(e),e.options.switchToDoc(n.name,n.doc))}function y(e,n){for(var r=n.context.slice(0,n.contextOffset).split("\n"),i=n.start.line-(r.length-1),o=t(i,(1==r.length?n.start.ch:e.getLine(i).length)-r[0].length),a=e.getLine(i).slice(o.ch),s=i+1;s<e.lineCount()&&a.length<n.context.length;++s)a+="\n"+e.getLine(s);if(a.slice(0,n.context.length)==n.context)return n;for(var l,c=e.getSearchCursor(n.context,0,!1),u=1/0;c.findNext();){var d=c.from(),f=1e4*Math.abs(d.line-o.line);f||(f=Math.abs(d.ch-o.ch)),f<u&&(l=d,u=f)}if(!l)return null;if(1==r.length?l.ch+=r[0].length:l=t(l.line+(r.length-1),r[r.length-1].length),n.start.line==n.end.line)var p=t(l.line,l.ch+(n.end.ch-n.start.ch));else p=t(l.line+(n.end.line-n.start.line),n.end.ch);return{start:l,end:p}}function b(e){var t=e.getCursor("end"),n=e.getTokenAt(t);return!(n.start<t.ch&&"comment"==n.type)&&/[\w)\]]/.test(e.getLine(t.line).slice(Math.max(t.ch-1,0),t.ch+1))}function x(e,t){var n=t.getTokenAt(t.getCursor());if(!/\w/.test(n.string))return F(e,t,"Not at a variable");T(t,"New name for "+n.string,(function(n){e.request(t,{type:"rename",newName:n,fullDocs:!0},(function(n,r){if(n)return F(e,t,n);_(e,r.changes)}))}))}function k(e,t){var n=o(e,t.doc).name;e.request(t,{type:"refs"},(function(r,i){if(r)return F(e,t,r);for(var o=[],a=0,s=t.getCursor(),l=0;l<i.refs.length;l++){var c=i.refs[l];c.file==n&&(o.push({anchor:c.start,head:c.end}),M(s,c.start)>=0&&M(s,c.end)<=0&&(a=o.length-1))}t.setSelections(o,a)}))}var w=0;function _(e,t){for(var n=Object.create(null),r=0;r<t.length;++r)(n[(l=t[r]).file]||(n[l.file]=[])).push(l);for(var i in n){var o=e.docs[i],a=n[i];if(o){a.sort((function(e,t){return M(t.start,e.start)}));var s="*rename"+ ++w;for(r=0;r<a.length;++r){var l=a[r];o.doc.replaceRange(l.text,l.start,l.end,s)}}}}function C(e,n,i,o){var a=[],s=0,l=!i.fullDocs;l||delete i.fullDocs,"string"==typeof i&&(i={type:i}),i.lineCharPositions=!0,null==i.end&&(i.end=o||n.doc.getCursor("end"),n.doc.somethingSelected()&&(i.start=n.doc.getCursor("start")));var c=i.start||i.end;for(var u in n.changed?n.doc.lineCount()>r&&!1!==l&&n.changed.to-n.changed.from<100&&n.changed.from<=c.line&&n.changed.to>i.end.line?(a.push(S(n,c,i.end)),i.file="#0",s=a[0].offsetLines,null!=i.start&&(i.start=t(i.start.line- -s,i.start.ch)),i.end=t(i.end.line-s,i.end.ch)):(a.push({type:"full",name:n.name,text:z(e,n)}),i.file=n.name,n.changed=null):i.file=n.name,e.docs){var d=e.docs[u];d.changed&&d!=n&&(a.push({type:"full",name:d.name,text:z(e,d)}),d.changed=null)}return{query:i,files:a}}function S(n,r,i){for(var o,a=n.doc,s=null,l=null,c=4,u=r.line-1,d=Math.max(0,u-50);u>=d;--u){var f=a.getLine(u);if(!(f.search(/\bfunction\b/)<0)){var p=e.countColumn(f,null,c);null!=s&&s<=p||(s=p,l=u)}}null==l&&(l=d);var h=Math.min(a.lastLine(),i.line+20);if(null==s||s==e.countColumn(a.getLine(r.line),null,c))o=h;else for(o=i.line+1;o<h&&!((p=e.countColumn(a.getLine(o),null,c))<=s);++o);var m=t(l,0);return{type:"part",name:n.name,offsetLines:m.line,text:a.getRange(m,t(o,i.line==o?null:0))}}var M=e.cmpPos;function L(e,t){var n=document.createElement(e);t&&(n.className=t);for(var r=2;r<arguments.length;++r){var i=arguments[r];"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i)}return n}function T(e,t,n){if(e.openDialog){var r=document.createDocumentFragment();r.appendChild(document.createTextNode(t+": "));var i=document.createElement("input");i.type="text",r.appendChild(i),e.openDialog(r,n)}else n(prompt(t,""))}function A(t,n,r){t.state.ternTooltip&&N(t.state.ternTooltip);var i=t.cursorCoords(),o=t.state.ternTooltip=E(i.right+1,i.bottom,n,t);function a(){c=!0,l||s()}function s(){t.state.ternTooltip=null,o.parentNode&&P(o),u()}var l=!1,c=!1;e.on(o,"mousemove",(function(){l=!0})),e.on(o,"mouseout",(function(t){var n=t.relatedTarget||t.toElement;n&&e.contains(o,n)||(c?s():l=!1)})),setTimeout(a,r.options.hintDelay?r.options.hintDelay:1700);var u=O(t,s)}function O(e,t){return e.on("cursorActivity",t),e.on("blur",t),e.on("scroll",t),e.on("setDoc",t),function(){e.off("cursorActivity",t),e.off("blur",t),e.off("scroll",t),e.off("setDoc",t)}}function E(e,t,r,i,o){var a=L("div",n+"tooltip "+(o||""),r);a.style.left=e+"px",a.style.top=t+"px",(((i.options||{}).hintOptions||{}).container||document.body).appendChild(a);var s=i.cursorCoords(),l=window.innerWidth,c=window.innerHeight,u=a.getBoundingClientRect(),d=document.querySelector(".CodeMirror-hints"),f=u.bottom-c,p=u.right-l;if(d&&p>0&&(a.style.left=0,u=a.getBoundingClientRect(),a.style.left=(e=e-d.offsetWidth-u.width)+"px",p=u.right-l),f>0){var h=u.bottom-u.top;s.top-(s.bottom-u.top)-h>0?a.style.top=s.top-h+"px":h>c&&(a.style.height=c-5+"px",a.style.top=s.bottom-u.top+"px")}return p>0&&(u.right-u.left>l&&(a.style.width=l-5+"px",p-=u.right-u.left-l),a.style.left=e-p+"px"),a}function N(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function P(e){e.style.opacity="0",setTimeout((function(){N(e)}),1100)}function F(e,t,n){e.options.showError?e.options.showError(t,n):A(t,String(n),e)}function D(e){e.activeArgHints&&(e.activeArgHints.clear&&e.activeArgHints.clear(),N(e.activeArgHints),e.activeArgHints=null)}function z(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function I(e){var t=e.worker=new Worker(e.options.workerScript);t.postMessage({type:"init",defs:e.options.defs,plugins:e.options.plugins,scripts:e.options.workerDeps});var n=0,r={};function o(e,i){i&&(e.id=++n,r[n]=i),t.postMessage(e)}t.onmessage=function(t){var n=t.data;"getFile"==n.type?i(e,n.name,(function(e,t){o({type:"getFile",err:String(e),text:t,id:n.id})})):"debug"==n.type?window.console.log(n.message):n.id&&r[n.id]&&(r[n.id](n.err,n.body),delete r[n.id])},t.onerror=function(e){for(var t in r)r[t](e);r={}},this.addFile=function(e,t){o({type:"add",name:e,text:t})},this.delFile=function(e){o({type:"del",name:e})},this.request=function(e,t){o({type:"req",body:e},t)}}}(n(5237))},7604(){var e;var t=0,n={};function r(e,r){postMessage({type:"getFile",name:e,id:++t}),n[t]=r}},3874(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){for(var r=n.paragraphStart||e.getHelper(t,"paragraphStart"),i=t.line,o=e.firstLine();i>o;--i){var a=e.getLine(i);if(r&&r.test(a))break;if(!/\S/.test(a)){++i;break}}for(var s=n.paragraphEnd||e.getHelper(t,"paragraphEnd"),l=t.line+1,c=e.lastLine();l<=c;++l){if(a=e.getLine(l),s&&s.test(a)){++l;break}if(!/\S/.test(a))break}return{from:i,to:l}}function r(e,t,n,r,i){for(var o=t;o<e.length&&" "==e.charAt(o);)o++;for(;o>0&&!n.test(e.slice(o-1,o+1));--o);if(!i&&o<=e.match(/^[ \t]*/)[0].length)for(o=t+1;o<e.length-1&&!n.test(e.slice(o-1,o+1));++o);for(var a=!0;;a=!1){var s=o;if(r)for(;" "==e.charAt(s-1);)--s;if(0!=s||!a)return{from:s,to:o};o=t}}function i(n,i,o,a){i=n.clipPos(i),o=n.clipPos(o);var s=a.column||80,l=a.wrapOn||/\s\S|-[^\.\d]/,c=!1!==a.forceBreak,u=!1!==a.killTrailingSpace,d=[],f="",p=i.line,h=n.getRange(i,o,!1);if(!h.length)return null;var m=h[0].match(/^[ \t]*/)[0];m.length>=s&&(s=m.length+1);for(var g=0;g<h.length;++g){var v=h[g],y=f.length,b=0;f&&v&&!l.test(f.charAt(f.length-1)+v.charAt(0))&&(f+=" ",b=1);var x="";if(g&&(x=v.match(/^\s*/)[0],v=v.slice(x.length)),f+=v,g){var k=f.length>s&&m==x&&r(f,s,l,u,c);k&&k.from==y&&k.to==y+b?(f=m+v,++p):d.push({text:[b?" ":""],from:t(p,y),to:t(p+1,x.length)})}for(;f.length>s;){var w=r(f,s,l,u,c);if(!(w.from!=w.to||c&&m!==f.slice(0,w.to)))break;d.push({text:["",m],from:t(p,w.from),to:t(p,w.to)}),f=m+f.slice(w.to),++p}}return d.length&&n.operation((function(){for(var t=0;t<d.length;++t){var r=d[t];(r.text||e.cmpPos(r.from,r.to))&&n.replaceRange(r.text,r.from,r.to)}})),d.length?{from:d[0].from,to:e.changeEnd(d[d.length-1])}:null}e.defineExtension("wrapParagraph",(function(e,r){r=r||{},e||(e=this.getCursor());var o=n(this,e,r);return i(this,t(o.from,0),t(o.to-1),r)})),e.commands.wrapLines=function(e){e.operation((function(){for(var r=e.listSelections(),o=e.lastLine()+1,a=r.length-1;a>=0;a--){var s,l=r[a];if(l.empty()){var c=n(e,l.head,{});s={from:t(c.from,0),to:t(c.to-1)}}else s={from:l.from(),to:l.to()};s.to.line>=o||(o=s.from.line,i(e,s.from,s.to,{}))}}))},e.defineExtension("wrapRange",(function(e,t,n){return i(this,e,t,n||{})})),e.defineExtension("wrapParagraphsInRange",(function(e,r,o){o=o||{};for(var a=this,s=[],l=e.line;l<=r.line;){var c=n(a,t(l,0),o);s.push(c),l=c.to}var u=!1;return s.length&&a.operation((function(){for(var e=s.length-1;e>=0;--e)u=u||i(a,t(s[e].from,0),t(s[e].to-1),o)})),u}))}(n(5237))},3944(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(e,t){return e.line==t.line&&e.ch==t.ch}var i=[];function o(e){i.push(e),i.length>50&&i.shift()}function a(e){if(!i.length)return o(e);i[i.length-1]+=e}function s(e){return i[i.length-(e?Math.min(e,1):1)]||""}function l(){return i.length>1&&i.pop(),s()}var c=null;function u(e,t,n,i,s){null==s&&(s=e.getRange(t,n)),"grow"==i&&c&&c.cm==e&&r(t,c.pos)&&e.isClean(c.gen)?a(s):!1!==i&&o(s),e.replaceRange("",t,n,"+delete"),c="grow"==i?{cm:e,pos:t,gen:e.changeGeneration()}:null}function d(e,t,n){return e.findPosH(t,n,"char",!0)}function f(e,t,n){return e.findPosH(t,n,"word",!0)}function p(e,t,n){return e.findPosV(t,n,"line",e.doc.sel.goalColumn)}function h(e,t,n){return e.findPosV(t,n,"page",e.doc.sel.goalColumn)}function m(e,t,r){for(var i=t.line,o=e.getLine(i),a=/\S/.test(r<0?o.slice(0,t.ch):o.slice(t.ch)),s=e.firstLine(),l=e.lastLine();;){if((i+=r)<s||i>l)return e.clipPos(n(i-r,r<0?0:null));if(o=e.getLine(i),/\S/.test(o))a=!0;else if(a)return n(i,0)}}function g(e,t,r){for(var i=t.line,o=t.ch,a=e.getLine(t.line),s=!1;;){var l=a.charAt(o+(r<0?-1:0));if(l){if(s&&/[!?.]/.test(l))return n(i,o+(r>0?1:0));s||(s=/\w/.test(l)),o+=r}else{if(i==(r<0?e.firstLine():e.lastLine()))return n(i,o);if(a=e.getLine(i+r),!/\S/.test(a))return n(i,o);i+=r,o=r<0?a.length:0}}}function v(e,t,i){var o;if(e.findMatchingBracket&&(o=e.findMatchingBracket(t,{strict:!0}))&&o.match&&(o.forward?1:-1)==i)return i>0?n(o.to.line,o.to.ch+1):o.to;for(var a=!0;;a=!1){var s=e.getTokenAt(t),l=n(t.line,i<0?s.start:s.end);if(!(a&&i>0&&s.end==t.ch)&&/\w/.test(s.string))return l;var c=e.findPosH(l,i,"char");if(r(l,c))return t;t=c}}function y(e,t){var n=e.state.emacsPrefix;return n?(L(e),"-"==n?-1:Number(n)):t?null:1}function b(e){var t="string"==typeof e?function(t){t.execCommand(e)}:e;return function(e){var n=y(e);t(e);for(var r=1;r<n;++r)t(e)}}function x(e,t,n,i){var o=y(e);o<0&&(i=-i,o=-o);for(var a=0;a<o;++a){var s=n(e,t,i);if(r(s,t))break;t=s}return t}function k(e,t){var n=function(n){n.extendSelection(x(n,n.getCursor(),e,t))};return n.motion=!0,n}function w(e,t,n,r){for(var i,o=e.listSelections(),a=o.length;a--;)u(e,i=o[a].head,x(e,i,t,n),r)}function _(e,t){if(e.somethingSelected()){for(var n,r=e.listSelections(),i=r.length;i--;)u(e,(n=r[i]).anchor,n.head,t);return!0}}function C(e,t){e.state.emacsPrefix?"-"!=t&&(e.state.emacsPrefix+=t):(e.state.emacsPrefix=t,e.on("keyHandled",M),e.on("inputRead",T))}var S={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function M(e,t){e.state.emacsPrefixMap||S.hasOwnProperty(t)||L(e)}function L(e){e.state.emacsPrefix=null,e.off("keyHandled",M),e.off("inputRead",T)}function T(e,t){var n=y(e);if(n>1&&"+input"==t.origin){for(var r=t.text.join("\n"),i="",o=1;o<n;++o)i+=r;e.replaceSelection(i)}}function A(e,t){("string"!=typeof t||!/^\d$/.test(t)&&"Ctrl-U"!=t)&&(e.removeKeyMap(z),e.state.emacsPrefixMap=!1,e.off("keyHandled",A),e.off("inputRead",A))}function O(e){e.setExtending(!1),e.setCursor(e.getCursor())}function E(e){var t=document.createDocumentFragment(),n=document.createElement("input");return n.setAttribute("type","text"),n.style.width="10em",t.appendChild(document.createTextNode(e+": ")),t.appendChild(n),t}function N(e,t,n){e.openDialog?e.openDialog(E(t),n,{bottom:!0}):n(prompt(t,""))}function P(e,t){var n=e.getCursor(),r=e.findPosH(n,1,"word");e.replaceRange(t(e.getRange(n,r)),n,r),e.setCursor(r)}function F(e){for(var t=e.getCursor(),r=t.line,i=t.ch,o=[];r>=e.firstLine();){for(var a=e.getLine(r),s=null==i?a.length:i;s>0;)if(")"==(i=a.charAt(--s)))o.push("(");else if("]"==i)o.push("[");else if("}"==i)o.push("{");else if(/[\(\{\[]/.test(i)&&(!o.length||o.pop()!=i))return e.extendSelection(n(r,s));--r,i=null}}t.setMark=function(e){e.setCursor(e.getCursor()),e.setExtending(!e.getExtending()),e.on("change",(function(){e.setExtending(!1)}))},t.killRegion=function(e){u(e,e.getCursor("start"),e.getCursor("end"),!0)},t.killLineEmacs=b((function(e){var t=e.getCursor(),r=e.clipPos(n(t.line)),i=e.getRange(t,r);/\S/.test(i)||(i+="\n",r=n(t.line+1,0)),u(e,t,r,"grow",i)})),t.killRingSave=function(e){o(e.getSelection()),O(e)},t.yank=function(e){var t=e.getCursor();e.replaceRange(s(y(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},t.yankPop=function(e){e.replaceSelection(l(),"around","paste")},t.forwardChar=k(d,1),t.backwardChar=k(d,-1),t.deleteChar=function(e){w(e,d,1,!1)},t.deleteForwardChar=function(e){_(e,!1)||w(e,d,1,!1)},t.deleteBackwardChar=function(e){_(e,!1)||w(e,d,-1,!1)},t.forwardWord=k(f,1),t.backwardWord=k(f,-1),t.killWord=function(e){w(e,f,1,"grow")},t.backwardKillWord=function(e){w(e,f,-1,"grow")},t.nextLine=k(p,1),t.previousLine=k(p,-1),t.scrollDownCommand=k(h,-1),t.scrollUpCommand=k(h,1),t.backwardParagraph=k(m,-1),t.forwardParagraph=k(m,1),t.backwardSentence=k(g,-1),t.forwardSentence=k(g,1),t.killSentence=function(e){w(e,g,1,"grow")},t.backwardKillSentence=function(e){u(e,e.getCursor(),g(e,e.getCursor(),1),"grow")},t.killSexp=function(e){w(e,v,1,"grow")},t.backwardKillSexp=function(e){w(e,v,-1,"grow")},t.forwardSexp=k(v,1),t.backwardSexp=k(v,-1),t.markSexp=function(e){var t=e.getCursor();e.setSelection(x(e,t,v,1),t)},t.transposeSexps=function(e){var t=v(e,e.getCursor(),-1),n=v(e,t,1),r=v(e,n,1),i=v(e,r,-1);e.replaceRange(e.getRange(i,r)+e.getRange(n,i)+e.getRange(t,n),t,r)},t.backwardUpList=b(F),t.justOneSpace=function(e){for(var t=e.getCursor(),r=t.ch,i=t.ch,o=e.getLine(t.line);r&&/\s/.test(o.charAt(r-1));)--r;for(;i<o.length&&/\s/.test(o.charAt(i));)++i;e.replaceRange(" ",n(t.line,r),n(t.line,i))},t.openLine=b((function(e){e.replaceSelection("\n","start")})),t.transposeCharsRepeatable=b((function(e){e.execCommand("transposeChars")})),t.capitalizeWord=b((function(e){P(e,(function(e){var t=e.search(/\w/);return-1==t?e:e.slice(0,t)+e.charAt(t).toUpperCase()+e.slice(t+1).toLowerCase()}))})),t.upcaseWord=b((function(e){P(e,(function(e){return e.toUpperCase()}))})),t.downcaseWord=b((function(e){P(e,(function(e){return e.toLowerCase()}))})),t.undoRepeatable=b("undo"),t.keyboardQuit=function(e){e.execCommand("clearSearch"),O(e)},t.newline=b((function(e){e.replaceSelection("\n","end")})),t.gotoLine=function(e){var t=y(e,!0);if(null!=t&&t>0)return e.setCursor(t-1);N(e,"Goto line",(function(t){var n;t&&!isNaN(n=Number(t))&&n==(0|n)&&n>0&&e.setCursor(n-1)}))},t.indentRigidly=function(e){e.indentSelection(y(e,!0)||e.getOption("indentUnit"))},t.exchangePointAndMark=function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},t.quotedInsertTab=b("insertTab"),t.universalArgument=function(e){e.state.emacsPrefixMap=!0,e.addKeyMap(z),e.on("keyHandled",A),e.on("inputRead",A)},e.emacs={kill:u,killRegion:_,repeated:b};var D=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":"killRegion","Ctrl-K":"killLineEmacs","Alt-W":"killRingSave","Ctrl-Y":"yank","Alt-Y":"yankPop","Ctrl-Space":"setMark","Ctrl-Shift-2":"setMark","Ctrl-F":"forwardChar","Ctrl-B":"backwardChar",Right:"forwardChar",Left:"backwardChar","Ctrl-D":"deleteChar",Delete:"deleteForwardChar","Ctrl-H":"deleteBackwardChar",Backspace:"deleteBackwardChar","Alt-F":"forwardWord","Alt-B":"backwardWord","Alt-Right":"forwardWord","Alt-Left":"backwardWord","Alt-D":"killWord","Alt-Backspace":"backwardKillWord","Ctrl-N":"nextLine","Ctrl-P":"previousLine",Down:"nextLine",Up:"previousLine","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":"scrollDownCommand","Ctrl-V":"scrollUpCommand",PageUp:"scrollDownCommand",PageDown:"scrollUpCommand","Ctrl-Up":"backwardParagraph","Ctrl-Down":"forwardParagraph","Alt-{":"backwardParagraph","Alt-}":"forwardParagraph","Alt-A":"backwardSentence","Alt-E":"forwardSentence","Alt-K":"killSentence","Ctrl-X Delete":"backwardKillSentence","Ctrl-Alt-K":"killSexp","Ctrl-Alt-Backspace":"backwardKillSexp","Ctrl-Alt-F":"forwardSexp","Ctrl-Alt-B":"backwardSexp","Shift-Ctrl-Alt-2":"markSexp","Ctrl-Alt-T":"transposeSexps","Ctrl-Alt-U":"backwardUpList","Alt-Space":"justOneSpace","Ctrl-O":"openLine","Ctrl-T":"transposeCharsRepeatable","Alt-C":"capitalizeWord","Alt-U":"upcaseWord","Alt-L":"downcaseWord","Alt-;":"toggleComment","Ctrl-/":"undoRepeatable","Shift-Ctrl--":"undoRepeatable","Ctrl-Z":"undoRepeatable","Cmd-Z":"undoRepeatable","Ctrl-X U":"undoRepeatable","Shift-Ctrl-Z":"redo","Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":"keyboardQuit","Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":"newline",Tab:"indentAuto","Alt-G G":"gotoLine","Ctrl-X Tab":"indentRigidly","Ctrl-X Ctrl-X":"exchangePointAndMark","Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X K":"close","Ctrl-X H":"selectAll","Ctrl-Q Tab":"quotedInsertTab","Ctrl-U":"universalArgument",fallthrough:"default"}),z={"Ctrl-G":L};function I(e){z[e]=function(t){C(t,e)},D["Ctrl-"+e]=function(t){C(t,e)},S["Ctrl-"+e]=!0}for(var R=0;R<10;++R)I(String(R));I("-")}(n(5237))},8208(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",l=r.ch,c=l,u=i<0?0:o.length,d=0;c!=u;c+=i,d++){var f=o.charAt(i<0?c-1:c),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==s)"o"!=p?(s="in",a=p):l=c+i;else if("in"==s&&a!=p){if("w"==a&&"W"==p&&i<0&&c--,"W"==a&&"w"==p&&i>0){if(c==l+1){a="w";continue}c--}break}}return n(r.line,c)}function i(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a<e;a++){var s=t.listSelections()[a].head;if(!(s.line<=o)){var l=n(s.line+(r?0:1),0);t.replaceRange("\n",l,null,"+insertLine"),t.indentLine(l.line,null,!0),i.push({head:l,anchor:l}),o=s.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function a(t,r){for(var i=r.ch,o=i,a=t.getLine(r.line);i&&e.isWordChar(a.charAt(i-1));)--i;for(;o<a.length&&e.isWordChar(a.charAt(o));)++o;return{from:n(r.line,i),to:n(r.line,o),word:a.slice(i,o)}}function s(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],a=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);a.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:a,head:s};r.push(o),r.push(l)}e.setSelections(r)}function l(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}t.goSubwordLeft=function(e){i(e,-1)},t.goSubwordRight=function(e){i(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),a=t[i].to(),s=o.line;s<=a.line;++s)a.line>o.line&&s==a.line&&0==a.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var s=a(t,r);if(!s.word)return;t.setSelection(s.from,s.to),o=!0}else{var c=t.getRange(r,i),u=o?new RegExp("\\b"+c+"\\b"):c,d=t.getSearchCursor(u,i),f=d.findNext();if(f||(f=(d=t.getSearchCursor(u,n(t.firstLine(),0))).findNext()),!f||l(t.listSelections(),d.from(),d.to()))return;t.addSelection(d.from(),d.to())}o&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){s(e,-1)},t.addCursorToNextLine=function(e){s(e,1)};var c="(){}[]";function u(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var a=r[o],s=a.head,l=t.scanForBracket(s,-1);if(!l)return!1;for(;;){var u=t.scanForBracket(s,1);if(!u)return!1;if(u.ch==c.charAt(c.indexOf(l.ch)+1)){var d=n(l.pos.line,l.pos.ch+1);if(0!=e.cmpPos(d,a.from())||0!=e.cmpPos(u.pos,a.to())){i.push({anchor:d,head:u.pos});break}if(!(l=t.scanForBracket(l.pos,-1)))return!1}s=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function d(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,a=t.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l];if(!c.empty()){for(var u=c.from().line,d=c.to().line;l<a.length-1&&a[l+1].from().line==d;)d=a[++l].to().line;a[l].to().ch||d--,s.push(u,d)}}s.length?o=!0:s.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],a=0;a<s.length;a+=2){var l=s[a],c=s[a+1],u=n(l,0),d=n(c),f=t.getRange(u,d,!1);r?f.sort((function(e,t){return e<t?-i:e==t?0:i})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(f,u,d),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function p(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],o=[],s=0;s<r.length;s++)(c=r[s]).empty()?(i.push(s),o.push("")):o.push(n(t.getRange(c.from(),c.to())));var l;for(t.replaceSelections(o,"around","case"),s=i.length-1;s>=0;s--){var c=r[i[s]];if(!(l&&e.cmpPos(c.head,l)>0)){var u=a(t,c.head);l=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=a(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function m(e,t){var r=h(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],s=0;s<r.length;s++){var l=r[s],c=l.from().line-1,u=l.to().line;a.push({anchor:n(l.anchor.line-1,l.anchor.ch),head:n(l.head.line-1,l.head.ch)}),0!=l.to().ch||l.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],s=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],l=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||l--,l<o?i.push(l,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){for(var o=t[i],a=o.from(),s=a.line,l=o.to().line;i<t.length-1&&t[i+1].from().line==l;)l=t[++i].to().line;r.push({start:s,end:l,anchor:!o.empty()&&a})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var a,s=r[o],l=s.anchor&&n(s.anchor.line-t,s.anchor.ch),c=s.start;c<=s.end;c++){var u=c-t;c==s.end&&(a=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:l||a,head:a})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),a=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<n.length;l++)n[l]==a[s]&&n.splice(l--,1);break}s==a.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var a=r[o].head,s=t.getRange({line:a.line,ch:0},a),l=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&l%i==0){var u=new n(a.line,e.findColumn(s,l-i,i));u.ch!=a.ch&&(c=u)}t.replaceRange("",c,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var g=e.keyMap;g.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(g.macSublime),g.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(g.pcSublime);var v=g.default==g.macDefault;g.sublime=v?g.macSublime:g.pcSublime}(n(5237),n(3653),n(7923))},1275(e,t,n){!function(e){"use strict";function t(e){var t=e.Pos;function n(e,n){var r=e.state.vim;if(!r||r.insertMode)return n.head;var i=r.sel.head;return i?r.visualBlock&&n.head.line!=i.line?void 0:n.from()!=n.anchor||n.empty()||n.head.line!=i.line||n.head.ch==i.ch?n.head:new t(n.head.line,n.head.ch-1):n.head}var r=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],i=r.length,o=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}];function a(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",Bt),j(t),e.on(t.getInputField(),"paste",h(t))}function s(t){t.setOption("disableInput",!1),t.off("cursorActivity",Bt),e.off(t.getInputField(),"paste",h(t)),t.state.vim=null,bt&&clearTimeout(bt)}function l(t,n){this==e.keyMap.vim&&(t.options.$customCursor=null,e.rmClass(t.getWrapperElement(),"cm-fat-cursor")),n&&n.attach==c||s(t)}function c(t,r){this==e.keyMap.vim&&(t.curOp&&(t.curOp.selectionChanged=!0),t.options.$customCursor=n,e.addClass(t.getWrapperElement(),"cm-fat-cursor")),r&&r.attach==c||a(t)}function u(t,n){if(n){if(this[t])return this[t];var r=p(t);if(!r)return!1;var i=K.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}e.defineOption("vimMode",!1,(function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var d={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},f={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function p(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,i=0;i<t.length;i++){var o=t[i];o in d?t[i]=d[o]:r=!0,o in f&&(t[i]=f[o])}return!!r&&(A(n)&&(t[t.length-1]=n.toLowerCase()),"<"+t.join("-")+">")}function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(se(e.getCursor(),0,1)),re.enterInsertMode(e,{},t))}),t.onPasteFn}var m=/[\d]/,g=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],v=[function(e){return/\S/.test(e)}];function y(e,t){for(var n=[],r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}var b,x=y(65,26),k=y(97,26),w=y(48,10),_=[].concat(x,k,w,["<",">"]),C=[].concat(x,k,w,["-",'"',".",":","_","/"]);try{b=new RegExp("^[\\p{Lu}]$","u")}catch(e){b=/^[A-Z]$/}function S(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function M(e){return/^[a-z]$/.test(e)}function L(e){return-1!="()[]{}".indexOf(e)}function T(e){return m.test(e)}function A(e){return b.test(e)}function O(e){return/^\s*$/.test(e)}function E(e){return-1!=".?!".indexOf(e)}function N(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var P={};function F(e,t,n,r,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),P[e]={type:n,defaultValue:t,callback:i},r)for(var o=0;o<r.length;o++)P[r[o]]=P[e];t&&D(e,t)}function D(e,t,n,r){var i=P[e],o=(r=r||{}).scope;if(!i)return new Error("Unknown option: "+e);if("boolean"==i.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&n&&i.callback(t,n)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&n&&(n.state.vim.options[e]={value:t}))}function z(e,t,n){var r=P[e],i=(n=n||{}).scope;if(!r)return new Error("Unknown option: "+e);if(r.callback){var o=t&&r.callback(void 0,t);return"global"!==i&&void 0!==o?o:"local"!==i?r.callback():void 0}return((o="global"!==i&&t&&t.state.vim.options[e])||"local"!==i&&r||{}).value}F("filetype",void 0,"string",["ft"],(function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}}));var I,R,q=function(){var e=100,t=-1,n=0,r=0,i=new Array(e);function o(o,a,s){var l=i[t%e];function c(n){var r=++t%e,a=i[r];a&&a.clear(),i[r]=o.setBookmark(n)}if(l){var u=l.find();u&&!pe(u,a)&&c(a)}else c(a);c(s),n=t,(r=t-e+1)<0&&(r=0)}function a(o,a){(t+=a)>n?t=n:t<r&&(t=r);var s=i[(e+t)%e];if(s&&!s.find()){var l,c=a>0?1:-1,u=o.getCursor();do{if((s=i[(e+(t+=c))%e])&&(l=s.find())&&!pe(u,l))break}while(t<n&&t>r)}return s}function s(e,n){var r=t,i=a(e,n);return t=r,i&&i.find()}return{cachedCursor:void 0,add:o,find:s,move:a}},B=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function H(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=B()}function j(e){return e.state.vim||(e.state.vim={inputState:new U,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function W(){for(var e in I={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:q(),macroModeState:new H,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new X({}),searchHistoryController:new Q,exCommandHistoryController:new Q},P){var t=P[e];t.value=t.defaultValue}}H.prototype={exitMacroRecordMode:function(){var e=I.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=I.registerController.getRegister(t);if(n){if(n.clear(),this.latestRegister=t,e.openDialog){var r=ft("span",{class:"cm-vim-message"},"recording @"+t);this.onRecordingDone=e.openDialog(r,null,{bottom:!0})}this.isRecording=!0}}};var K={enterVimMode:a,buildKeyMap:function(){},getRegisterController:function(){return I.registerController},resetVimGlobalState_:W,getVimGlobalState_:function(){return I},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:jt,map:function(e,t,n){Ot.map(e,t,n)},unmap:function(e,t){return Ot.unmap(e,t)},noremap:function(e,t,n){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(n),s=r.length,l=s-i;l<s&&a.length;l++){var c=r[l];if(!(c.keys!=t||n&&c.context&&c.context!==n||"ex"===c.type.substr(0,2)||"key"===c.type.substr(0,3))){var u={};for(var d in c)u[d]=c[d];u.keys=e,n&&!u.context&&(u.context=n),this._mapCommand(u);var f=o(c.context);a=a.filter((function(e){return-1===f.indexOf(e)}))}}},mapclear:function(e){var t=r.length,n=i,o=r.slice(0,t-n);if(r=r.slice(t-n),e)for(var a=o.length-1;a>=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var l=["normal","insert","visual"];for(var c in l)if(l[c]!==e){var u={};for(var d in s)u[d]=s[d];u.context=l[c],this._mapCommand(u)}}}},setOption:D,getOption:z,defineOption:F,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;At[e]=n,Ot.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},multiSelectHandleKey:Vt,findKey:function(e,t,n){var i,o=j(e);function a(){var r=I.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),$(e),!0;"mapping"!=n&&zt(r,t)}}function s(){if("<Esc>"==t){if(o.visualMode)Ee(e);else{if(!o.insertMode)return;Nt(e)}return $(e),!0}}function l(n){for(var r;n;)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),K.handleKey(e,t,"mapping")}function c(){if(s())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,i=1==t.length,a=Y.matchCommand(n,r,o.inputState,"insert");n.length>1&&"full"!=a.type;){n=o.inputState.keyBuffer=n.slice(1);var l=Y.matchCommand(n,r,o.inputState,"insert");"none"!=l.type&&(a=l)}if("none"==a.type)return $(e),!1;if("partial"==a.type)return R&&window.clearTimeout(R),R=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&$(e)}),z("insertModeEscKeysTimeout")),!i;if(R&&window.clearTimeout(R),i){for(var c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].head;e.replaceRange("",se(d,0,-(n.length-1)),d,"+input")}I.macroModeState.lastInsertModeChanges.changes.pop()}return $(e),a.command}function u(){if(a()||s())return!0;var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;var i=/^(\d*)(.*)$/.exec(n);if(!i)return $(e),!1;var l=o.visualMode?"visual":"normal",c=i[2]||i[1];o.inputState.operatorShortcut&&o.inputState.operatorShortcut.slice(-1)==c&&(c=o.inputState.operatorShortcut);var u=Y.matchCommand(c,r,o.inputState,l);return"none"==u.type?($(e),!1):"partial"==u.type||("clear"==u.type?($(e),!0):(o.inputState.keyBuffer="",(i=/^(\d*)(.*)$/.exec(n))[1]&&"0"!=i[1]&&o.inputState.pushRepeatDigit(i[1]),u.command))}return!1===(i=o.insertMode?c():u())?o.insertMode||1!==t.length?void 0:function(){return!0}:!0===i?function(){return!0}:function(){return e.operation((function(){e.curOp.isVimOp=!0;try{"keyToKey"==i.type?l(i.toKeys):Y.processCommand(e,o,i)}catch(t){throw e.state.vim=void 0,j(e),K.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Ot.processCommand(e,t)},defineMotion:Z,defineAction:ie,defineOperator:ne,mapCommand:Ft,_mapCommand:Pt,defineRegister:G,exitVisualMode:Ee,exitInsertMode:Nt};function U(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function $(t,n){t.state.vim.inputState=new U,e.signal(t,"vim-command-done",n)}function V(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function G(e,t){var n=I.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,C.push(e)}function X(e){this.registers=e,this.unnamedRegister=e['"']=new V,e["."]=new V,e[":"]=new V,e["/"]=new V}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}U.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},U.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},V.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(B(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},X.prototype={pushText:function(e,t,n,r,i){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)A(e)?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r);else{switch(t){case"yank":this.registers[0]=new V(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new V(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new V(n,r))}this.unnamedRegister.setText(n,r,i)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new V),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&N(e,C)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},Q.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i<n.length;i+=r)for(var o=n[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Y={matchCommand:function(e,t,n,r){var i,o=le(e,t,r,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var a=0;a<o.full.length;a++){var s=o.full[a];i||(i=s)}if("<character>"==i.keys.slice(-11)){var l=ue(e);if(!l||l.length>1)return{type:"clear"};n.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=ae(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);$(e)}r.operator=n.operator,r.operatorArgs=ae(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Te(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=ae(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=ae(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,$(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),re[n.action](e,a,t)},processSearch:function(t,n,r){if(t.getSearchCursor){var i=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;tt(t).setReversed(!i);var a=i?"/":"?",s=tt(t).getQuery(),l=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var c=I.macroModeState;c.isPlaying?p(f=c.replaySearchQueries.shift(),!0,!1):mt(t,{onClose:h,prefix:a,desc:"(JavaScript regexp)",onKeyUp:m,onKeyDown:g});break;case"wordUnderCursor":var u=De(t,!1,!0,!1,!0),d=!0;if(u||(u=De(t,!1,!0,!1,!1),d=!1),!u)return;var f=t.getLine(u.start.line).substring(u.start.ch,u.end.ch);f=d&&o?"\\b"+f+"\\b":xe(f),I.jumpList.cachedCursor=t.getCursor(),t.setCursor(u.start),p(f,!0,!1)}}function p(e,i,o){I.searchHistoryController.pushInput(e),I.searchHistoryController.reset();try{vt(t,e,i,o)}catch(n){return pt(t,"Invalid regex: "+e),void $(t)}Y.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function h(e){t.scrollTo(l.left,l.top),p(e,!0,!0);var n=I.macroModeState;n.isRecording&&Rt(n,e)}function m(n,r,o){var a,s,c,u=e.keyName(n);"Up"==u||"Down"==u?(a="Up"==u,s=n.target?n.target.selectionEnd:0,o(r=I.searchHistoryController.nextMatch(r,a)||""),s&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(s,n.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&I.searchHistoryController.reset();try{c=vt(t,r,!0,!0)}catch(n){}c?t.scrollIntoView(kt(t,!i,c),30):(_t(t),t.scrollTo(l.left,l.top))}function g(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(I.searchHistoryController.pushInput(r),I.searchHistoryController.reset(),vt(t,s),_t(t),t.scrollTo(l.left,l.top),e.e_stop(n),$(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}},processEx:function(t,n,r){function i(e){I.exCommandHistoryController.pushInput(e),I.exCommandHistoryController.reset(),Ot.processCommand(t,e),$(t)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(I.exCommandHistoryController.pushInput(r),I.exCommandHistoryController.reset(),e.e_stop(n),$(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,i(r=I.exCommandHistoryController.nextMatch(r,o)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&I.exCommandHistoryController.reset()}"keyToEx"==r.type?Ot.processCommand(t,r.exArgs.input):n.visualMode?mt(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):mt(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,n){var r,i,o,a=n.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},d=a.registerName,f=n.sel,p=fe(n.visualMode?oe(e,f.head):e.getCursor("head")),h=fe(n.visualMode?oe(e,f.anchor):e.getCursor("anchor")),m=fe(p),g=fe(h);if(c&&this.recordLastEdit(n,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,$(e),s){var v=J[s](e,p,l,n,a);if(n.lastMotion=J[s],!v)return;if(l.toJumplist){var y=I.jumpList,b=y.cachedCursor;b?(Ie(e,b,v),delete y.cachedCursor):Ie(e,p,v)}v instanceof Array?(i=v[0],r=v[1]):r=v,r||(r=fe(p)),n.visualMode?(n.visualBlock&&r.ch===1/0||(r=oe(e,r)),i&&(i=oe(e,i)),i=i||g,f.anchor=i,f.head=r,Te(e),Ve(e,n,"<",he(i,r)?i:r),Ve(e,n,">",he(i,r)?r:i)):c||(r=oe(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){i=g;var x=u.lastSel,k=Math.abs(x.head.line-x.anchor.line),w=Math.abs(x.head.ch-x.anchor.ch);r=x.visualLine?new t(g.line+k,g.ch):x.visualBlock?new t(g.line+k,g.ch+w):x.head.line==x.anchor.line?new t(g.line,g.ch+w):new t(g.line+k,g.ch),n.visualMode=!0,n.visualLine=x.visualLine,n.visualBlock=x.visualBlock,f=n.sel={anchor:i,head:r},Te(e)}else n.visualMode&&(u.lastSel={anchor:fe(f.anchor),head:fe(f.head),visualBlock:n.visualBlock,visualLine:n.visualLine});var _,C,S,M,L;if(n.visualMode){if(_=me(f.head,f.anchor),C=ge(f.head,f.anchor),S=n.visualLine||u.linewise,L=Ae(e,{anchor:_,head:C},M=n.visualBlock?"block":S?"line":"char"),S){var T=L.ranges;if("block"==M)for(var A=0;A<T.length;A++)T[A].head.ch=ye(e,T[A].head.line);else"line"==M&&(T[0].head=new t(T[0].head.line+1,0))}}else{if(_=fe(i||g),he(C=fe(r||m),_)){var O=_;_=C,C=O}(S=l.linewise||u.linewise)?Pe(e,_,C):l.forward&&Ne(e,_,C),L=Ae(e,{anchor:_,head:C},M="char",!l.inclusive||S)}e.setSelections(L.ranges,L.primary),n.lastMotion=null,u.repeat=o,u.registerName=d,u.linewise=S;var E=te[c](e,u,L.ranges,g,r);n.visualMode&&Ee(e,null!=E),E&&e.setCursor(E)}},recordLastEdit:function(e,t,n){var r=I.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},J={moveToTopLine:function(e,n,r){var i=St(e).top+r.repeat-1;return new t(i,Fe(e.getLine(i)))},moveToMiddleLine:function(e){var n=St(e),r=Math.floor(.5*(n.top+n.bottom));return new t(r,Fe(e.getLine(r)))},moveToBottomLine:function(e,n,r){var i=St(e).bottom-r.repeat+1;return new t(i,Fe(e.getLine(i)))},expandToLine:function(e,n,r){return new t(n.line+r.repeat-1,1/0)},findNext:function(e,t,n){var r=tt(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,xt(e,i),kt(e,o,i,n.repeat)}},findAndSelectNextInclusive:function(n,r,i,o,a){var s=tt(n),l=s.getQuery();if(l){var c=!i.forward,u=wt(n,c=s.isReversed()?!c:c,l,i.repeat,o);if(u){if(a.operator)return u;var d=u[0],f=new t(u[1].line,u[1].ch-1);if(o.visualMode){(o.visualLine||o.visualBlock)&&(o.visualLine=!1,o.visualBlock=!1,e.signal(n,"vim-mode-change",{mode:"visual",subMode:""}));var p=o.sel.anchor;if(p)return s.isReversed()?i.forward?[p,d]:[p,f]:i.forward?[p,f]:[p,d]}else o.visualMode=!0,o.visualLine=!1,o.visualBlock=!1,e.signal(n,"vim-mode-change",{mode:"visual",subMode:""});return c?[f,d]:[d,f]}}},goToMark:function(e,t,n,r){var i=Mt(e,r,n.selectedCharacter);return i?n.linewise?{line:i.line,ch:Fe(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,n,r,i){if(i.visualBlock&&r.sameLine){var o=i.sel;return[oe(e,new t(o.anchor.line,o.head.ch)),oe(e,new t(o.head.line,o.anchor.ch))]}return[i.sel.head,i.sel.anchor]},jumpToMark:function(e,n,r,i){for(var o=n,a=0;a<r.repeat;a++){var s=o;for(var l in i.marks)if(M(l)){var c=i.marks[l].find();if(!((r.forward?he(c,s):he(s,c))||r.linewise&&c.line==s.line)){var u=pe(s,o),d=r.forward?ve(s,c,o):ve(o,c,s);(u||d)&&(o=c)}}}return r.linewise&&(o=new t(o.line,Fe(e.getLine(o.line)))),o},moveByCharacters:function(e,n,r){var i=n,o=r.repeat,a=r.forward?i.ch+o:i.ch-o;return new t(i.line,a)},moveByLines:function(e,n,r,i){var o=n,a=o.ch;switch(i.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:a=i.lastHPos;break;default:i.lastHPos=a}var s=r.repeat+(r.repeatOffset||0),l=r.forward?o.line+s:o.line-s,c=e.firstLine(),u=e.lastLine(),d=e.findPosV(o,r.forward?s:-s,"line",i.lastHSPos);return(r.forward?d.line>l:d.line<l)&&(l=d.line,a=d.ch),l<c&&o.line==c?this.moveToStartOfLine(e,n,r,i):l>u&&o.line==u?Ke(e,n,r,i,!0):(r.toFirstChar&&(a=Fe(e.getLine(l)),i.lastHPos=a),i.lastHSPos=e.charCoords(new t(l,a),"div").left,new t(l,a))},moveByDisplayLines:function(e,n,r,i){var o=n;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var a=r.repeat;if((l=e.findPosV(o,r.forward?a:-a,"line",i.lastHSPos)).hitSide)if(r.forward)var s={top:e.charCoords(l,"div").top+8,left:i.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(new t(e.firstLine(),0),"div");c.left=i.lastHSPos,l=e.coordsChar(c,"div")}return i.lastHPos=l.ch,l},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Xe(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Ye(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(o=J.moveByDisplayLines(e,t,n,r)))return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,n){return We(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=Ue(e,n.repeat,n.forward,n.selectedCharacter),i=n.forward?-1:1;return Re(i,n),r?(r.ch+=i,r):null},moveToCharacter:function(e,t,n){var r=n.repeat;return Re(0,n),Ue(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return He(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,$e(e,i)},moveToEol:function(e,t,n,r){return Ke(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,n){var r=n;return new t(r.line,Fe(e.getLine(r.line)))},moveToMatchedSymbol:function(e,n){for(var r,i=n,o=i.line,a=i.ch,s=e.getLine(o);a<s.length;a++)if((r=s.charAt(a))&&L(r)){var l=e.getTokenTypeAt(new t(o,a+1));if("string"!==l&&"comment"!==l)break}if(a<s.length){var c="<"===a||">"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new t(o,a),{bracketRegex:c}).to}return i},moveToStartOfLine:function(e,n){return new t(n.line,0)},moveToLineOrEdgeOfDocument:function(e,n,r){var i=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(i=r.repeat-e.getOption("firstLineNumber")),new t(i,Fe(e.getLine(i)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},o={"'":!0,'"':!0,"`":!0},a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if(i[a])s=Je(e,t,a,l);else if(o[a])s=Ze(e,t,a,l);else if("W"===a)s=De(e,l,!0,!0);else if("w"===a)s=De(e,l,!0,!1);else if("p"===a)if(s=Xe(e,t,n.repeat,0,l),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var c=r.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}else if("t"===a)s=ze(e,t,l);else{if("s"!==a)return null;var u=e.getLine(t.line);t.ch>0&&E(u[t.ch])&&(t.ch-=1);var d=Qe(e,t,n.repeat,1,l),f=Qe(e,t,n.repeat,-1,l);O(e.getLine(f.line)[f.ch])&&O(e.getLine(d.line)[d.ch-1])&&(f={line:f.line,ch:f.ch+1}),s={start:f,end:d}}return e.state.vim.visualMode?Le(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=I.lastCharacterSearch,i=n.repeat,o=n.forward===r.forward,a=(r.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),n.inclusive=!!o;var s=Ue(e,i,o,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function Z(e,t){J[e]=t}function ee(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}var te={change:function(n,r,i){var o,a,s=n.state.vim,l=i[0].anchor,c=i[0].head;if(s.visualMode)if(r.fullLine)c.ch=Number.MAX_VALUE,c.line--,n.setSelection(l,c),a=n.getSelection(),n.replaceSelection(""),o=l;else{a=n.getSelection();var u=ee("",i.length);n.replaceSelections(u),o=me(i[0].head,i[0].anchor)}else{a=n.getRange(l,c);var d=s.lastEditInputState||{};if("moveByWords"==d.motion&&!O(a)){var f=/\s+$/.exec(a);f&&d.motionArgs&&d.motionArgs.forward&&(c=se(c,0,-f[0].length),a=a.slice(0,-f[0].length))}var p=new t(l.line-1,Number.MAX_VALUE),h=n.firstLine()==n.lastLine();c.line>n.lastLine()&&r.linewise&&!h?n.replaceRange("",p,c):n.replaceRange("",l,c),r.linewise&&(h||(n.setCursor(p),e.commands.newlineAndIndent(n)),l.ch=Number.MAX_VALUE),o=l}I.registerController.pushText(r.registerName,"change",a,r.linewise,i.length>1),re.enterInsertMode(n,{head:o},n.state.vim)},delete:function(e,n,r){var i,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=ee("",r.length);e.replaceSelections(s),i=me(r[0].head,r[0].anchor)}else{var l=r[0].anchor,c=r[0].head;n.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=new t(l.line-1,ye(e,l.line-1))),o=e.getRange(l,c),e.replaceRange("",l,c),i=l,n.linewise&&(i=J.moveToFirstNonWhiteSpaceCharacter(e,l))}return I.registerController.pushText(n.registerName,"delete",o,n.linewise,a.visualBlock),oe(e,i)},indent:function(e,t,n){var r=e.state.vim;if(e.indentMore)for(var i=r.visualMode?t.repeat:1,o=0;o<i;o++)t.indentRight?e.indentMore():e.indentLess();else{var a=n[0].anchor.line,s=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line;i=r.visualMode?t.repeat:1,t.linewise&&s--;for(var l=a;l<=s;l++)for(o=0;o<i;o++)e.indentLine(l,t.indentRight)}return J.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},indentAuto:function(e,t,n){return e.execCommand("indentAuto"),J.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var d=0;d<c.length;d++){var f=c.charAt(d);u+=A(f)?f.toLowerCase():f.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?J.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:me(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?me(i.sel.anchor,i.sel.head,n[0].head,n[0].anchor):r;return I.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}};function ne(e,t){te[e]=t}var re={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,i=t.forward,o=I.jumpList.move(e,i?r:-r),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*r,s=t.forward?o+a:o-a,l=fe(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,n){var r=e.getCursor().line,i=e.charCoords(new t(r,0),"local"),o=e.getScrollInfo().clientHeight,a=i.top;switch(n.position){case"center":a=i.bottom-o/2;break;case"bottom":var s=new t(r,e.getLine(r).length-1);a=a-o+(e.charCoords(s,"local").bottom-a)}e.scrollTo(null,a)},replayMacro:function(e,t,n){var r=t.selectedCharacter,i=t.repeat,o=I.macroModeState;for("@"==r?r=o.latestRegister:o.latestRegister=r;i--;)Dt(e,n,o,r)},enterMacroRecordMode:function(e,t){var n=I.macroModeState,r=t.selectedCharacter;I.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(n,r,i){if(!n.getOption("readOnly")){i.insertMode=!0,i.insertModeRepeat=r&&r.repeat||1;var o=r?r.insertAt:null,a=i.sel,s=r.head||n.getCursor("head"),l=n.listSelections().length;if("eol"==o)s=new t(s.line,ye(n,s.line));else if("bol"==o)s=new t(s.line,0);else if("charAfter"==o)s=se(s,0,1);else if("firstNonBlank"==o)s=J.moveToFirstNonWhiteSpaceCharacter(n,s);else if("startOfSelectedArea"==o){if(!i.visualMode)return;i.visualBlock?(s=new t(Math.min(a.head.line,a.anchor.line),Math.min(a.head.ch,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line<a.anchor.line?a.head:new t(a.anchor.line,0)}else if("endOfSelectedArea"==o){if(!i.visualMode)return;i.visualBlock?(s=new t(Math.min(a.head.line,a.anchor.line),Math.max(a.head.ch,a.anchor.ch)+1),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line>=a.anchor.line?se(a.head,0,1):new t(a.anchor.line,0)}else if("inplace"==o){if(i.visualMode)return}else"lastEdit"==o&&(s=Lt(n)||s);n.setOption("disableInput",!1),r&&r.replace?(n.toggleOverwrite(!0),n.setOption("keyMap","vim-replace"),e.signal(n,"vim-mode-change",{mode:"replace"})):(n.toggleOverwrite(!1),n.setOption("keyMap","vim-insert"),e.signal(n,"vim-mode-change",{mode:"insert"})),I.macroModeState.isPlaying||(n.on("change",qt),e.on(n.getInputField(),"keydown",Wt)),i.visualMode&&Ee(n),_e(n,s,l)}},toggleVisualMode:function(n,r,i){var o,a=r.repeat,s=n.getCursor();i.visualMode?i.visualLine^r.linewise||i.visualBlock^r.blockwise?(i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),Te(n)):Ee(n):(i.visualMode=!0,i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,o=oe(n,new t(s.line,s.ch+a-1)),i.sel={anchor:s,head:o},e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),Te(n),Ve(n,i,"<",me(s,o)),Ve(n,i,">",ge(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&Me(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,Te(t),Ve(t,r,"<",me(o,a)),Ve(t,r,">",ge(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,n,r){var i,o;if(r.visualMode){if(i=e.getCursor("anchor"),he(o=e.getCursor("head"),i)){var a=o;o=i,i=a}o.ch=ye(e,o.line)-1}else{var s=Math.max(n.repeat,2);i=e.getCursor(),o=oe(e,new t(i.line+s-1,1/0))}for(var l=0,c=i.line;c<o.line;c++){l=ye(e,i.line),a=new t(i.line+1,ye(e,i.line+1));var u=e.getRange(i,a);u=n.keepSpaces?u.replace(/\n\r?/g,""):u.replace(/\n\s*/g," "),e.replaceRange(u,i,a)}var d=new t(i.line,l);r.visualMode&&Ee(e,!1),e.setCursor(d)},newLineAndEnterInsertMode:function(n,r,i){i.insertMode=!0;var o=fe(n.getCursor());o.line!==n.firstLine()||r.after?(o.line=r.after?o.line:o.line-1,o.ch=ye(n,o.line),n.setCursor(o),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(n)):(n.replaceRange("\n",new t(n.firstLine(),0)),n.setCursor(n.firstLine(),0)),this.enterInsertMode(n,{repeat:r.repeat},i)},paste:function(e,n,r){var i=fe(e.getCursor()),o=I.registerController.getRegister(n.registerName);if(p=o.toString()){if(n.matchIndent){var a=e.getOption("tabSize"),s=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*a+1*n},l=e.getLine(e.getCursor().line),c=s(l.match(/^\s*/)[0]),u=p.replace(/\n$/,""),d=p!==u,f=s(p.match(/^\s*/)[0]),p=u.replace(/^\s*/gm,(function(t){var n=c+(s(t)-f);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/a);return Array(r+1).join("\t")}return Array(n+1).join(" ")}));p+=d?"\n":""}n.repeat>1&&(p=Array(n.repeat+1).join(p));var h,m,g=o.linewise,v=o.blockwise;if(v){p=p.split("\n"),g&&p.pop();for(var y=0;y<p.length;y++)p[y]=""==p[y]?" ":p[y];i.ch+=n.after?1:0,i.ch=Math.min(ye(e,i.line),i.ch)}else g?r.visualMode?p=r.visualLine?p.slice(0,-1):"\n"+p.slice(0,p.length-1)+"\n":n.after?(p="\n"+p.slice(0,p.length-1),i.ch=ye(e,i.line)):i.ch=0:i.ch+=n.after?1:0;if(r.visualMode){var b;r.lastPastedText=p;var x=Se(e,r),k=x[0],w=x[1],_=e.getSelection(),C=e.listSelections(),S=new Array(C.length).join("1").split("1");r.lastSelection&&(b=r.lastSelection.headMark.find()),I.registerController.unnamedRegister.setText(_),v?(e.replaceSelections(S),w=new t(k.line+p.length-1,k.ch),e.setCursor(k),we(e,w),e.replaceSelections(p),h=k):r.visualBlock?(e.replaceSelections(S),e.setCursor(k),e.replaceRange(p,k,k),h=k):(e.replaceRange(p,k,w),h=e.posFromIndex(e.indexFromPos(k)+p.length-1)),b&&(r.lastSelection.headMark=e.setBookmark(b)),g&&(h.ch=0)}else if(v){for(e.setCursor(i),y=0;y<p.length;y++){var M=i.line+y;M>e.lastLine()&&e.replaceRange("\n",new t(M,0)),ye(e,M)<i.ch&&ke(e,M,i.ch)}e.setCursor(i),we(e,new t(i.line+p.length-1,i.ch)),e.replaceSelections(p),h=i}else e.replaceRange(p,i),g&&n.after?h=new t(i.line+1,Fe(e.getLine(i.line+1))):g&&!n.after?h=new t(i.line,Fe(e.getLine(i.line))):!g&&n.after?(m=e.indexFromPos(i),h=e.posFromIndex(m+p.length-1)):(m=e.indexFromPos(i),h=e.posFromIndex(m+p.length));r.visualMode&&Ee(e,!1),e.setCursor(h)}},undo:function(t,n){t.operation((function(){de(t,e.commands.undo,n.repeat)(),t.setCursor(t.getCursor("anchor"))}))},redo:function(t,n){de(t,e.commands.redo,n.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){Ve(e,n,t.selectedCharacter,e.getCursor())},replace:function(n,r,i){var o,a,s=r.selectedCharacter,l=n.getCursor(),c=n.listSelections();if(i.visualMode)l=n.getCursor("start"),a=n.getCursor("end");else{var u=n.getLine(l.line);(o=l.ch+r.repeat)>u.length&&(o=u.length),a=new t(l.line,o)}if("\n"==s)i.visualMode||n.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(n);else{var d=n.getRange(l,a);if(d=d.replace(/[^\n]/g,s),i.visualBlock){var f=new Array(n.getOption("tabSize")+1).join(" ");d=(d=n.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),n.replaceSelections(d)}else n.replaceRange(d,l,a);i.visualMode?(l=he(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,n.setCursor(l),Ee(n,!1)):n.setCursor(se(a,0,-1))}},incrementNumberToken:function(e,n){for(var r,i,o,a,s=e.getCursor(),l=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=c.exec(l))&&(o=(i=r.index)+r[0].length,!(s.ch<o)););if((n.backtrack||!(o<=s.ch))&&r){var u=r[2]||r[4],d=r[3]||r[5],f=n.increase?1:-1,p={"0b":2,0:8,"":10,"0x":16}[u.toLowerCase()];a=(parseInt(r[1]+d,p)+f*n.repeat).toString(p);var h=u?new Array(d.length-a.length+1+r[1].length).join("0"):"";a="-"===a.charAt(0)?"-"+u+h+a.substr(1):u+h+a;var m=new t(s.line,i),g=new t(s.line,o);e.replaceRange(a,m,g),e.setCursor(new t(s.line,i+a.length-1))}},repeatLastEdit:function(e,t,n){if(n.lastEditInputState){var r=t.repeat;r&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=r:r=n.lastEditInputState.repeatOverride||r,Kt(e,n,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Nt};function ie(e,t){re[e]=t}function oe(e,n){var r=e.state.vim,i=r.insertMode||r.visualMode,o=Math.min(Math.max(e.firstLine(),n.line),e.lastLine()),a=ye(e,o)-1+!!i,s=Math.min(Math.max(0,n.ch),a);return new t(o,s)}function ae(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function se(e,n,r){return"object"==typeof n&&(r=n.ch,n=n.line),new t(e.line+n,e.ch+r)}function le(e,t,n,r){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==n&&"insert"!=l.context||l.context&&l.context!=n||r.operator&&"action"==l.type||!(i=ce(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}function ce(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ue(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" ";break;default:n=""}return n}function de(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function fe(e){return new t(e.line,e.ch)}function pe(e,t){return e.ch==t.ch&&e.line==t.line}function he(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function me(e,t){return arguments.length>2&&(t=me.apply(void 0,Array.prototype.slice.call(arguments,1))),he(e,t)?e:t}function ge(e,t){return arguments.length>2&&(t=ge.apply(void 0,Array.prototype.slice.call(arguments,1))),he(e,t)?t:e}function ve(e,t,n){var r=he(e,t),i=he(t,n);return r&&i}function ye(e,t){return e.getLine(t).length}function be(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function xe(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ke(e,n,r){var i=ye(e,n),o=new Array(r-i+1).join(" ");e.setCursor(new t(n,i)),e.replaceRange(o,e.getCursor())}function we(e,n){var r=[],i=e.listSelections(),o=fe(e.clipPos(n)),a=!pe(n,o),s=Ce(i,e.getCursor("head")),l=pe(i[s].head,i[s].anchor),c=i.length-1,u=c-s>s?c:0,d=i[u].anchor,f=Math.min(d.line,o.line),p=Math.max(d.line,o.line),h=d.ch,m=o.ch,g=i[u].head.ch-h,v=m-h;g>0&&v<=0?(h++,a||m--):g<0&&v>=0?(h--,l||m++):g<0&&-1==v&&(h--,m++);for(var y=f;y<=p;y++){var b={anchor:new t(y,h),head:new t(y,m)};r.push(b)}return e.setSelections(r),n.ch=m,d.ch=h,d}function _e(e,t,n){for(var r=[],i=0;i<n;i++){var o=se(t,i,0);r.push({anchor:o,head:o})}e.setSelections(r,0)}function Ce(e,t,n){for(var r=0;r<e.length;r++){var i="head"!=n&&pe(e[r].anchor,t),o="anchor"!=n&&pe(e[r].head,t);if(i||o)return r}return-1}function Se(e,n){var r=n.lastSelection,i=function(){var t=e.listSelections(),n=t[0],r=t[t.length-1];return[he(n.anchor,n.head)?n.anchor:n.head,he(r.anchor,r.head)?r.head:r.anchor]},o=function(){var n=e.getCursor(),i=e.getCursor(),o=r.visualBlock;if(o){var a=o.width,s=o.height;i=new t(n.line+s,n.ch+a);for(var l=[],c=n.line;c<i.line;c++){var u={anchor:new t(c,n.ch),head:new t(c,i.ch)};l.push(u)}e.setSelections(l)}else{var d=r.anchorMark.find(),f=r.headMark.find(),p=f.line-d.line,h=f.ch-d.ch;i={line:i.line+p,ch:p?i.ch:h+i.ch},r.visualLine&&(n=new t(n.line,0),i=new t(i.line,ye(e,i.line))),e.setSelection(n,i)}return[n,i]};return n.visualMode?i():o()}function Me(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:fe(n),head:fe(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function Le(e,n,r){var i,o=e.state.vim.sel,a=o.head,s=o.anchor;return he(r,n)&&(i=r,r=n,n=i),he(a,s)?(a=me(n,a),s=ge(s,r)):(s=me(n,s),-1==(a=se(a=ge(a,r),0,-1)).ch&&a.line!=e.firstLine()&&(a=new t(a.line-1,ye(e,a.line-1)))),[s,a]}function Te(e,t,n){var r=e.state.vim,i=Ae(e,t=t||r.sel,n=n||r.visualLine?"line":r.visualBlock?"block":"char");e.setSelections(i.ranges,i.primary)}function Ae(e,n,r,i){var o=fe(n.head),a=fe(n.anchor);if("char"==r){var s=i||he(n.head,n.anchor)?0:1,l=he(n.head,n.anchor)?1:0;return o=se(n.head,0,s),{ranges:[{anchor:a=se(n.anchor,0,l),head:o}],primary:0}}if("line"==r){if(he(n.head,n.anchor))o.ch=0,a.ch=ye(e,a.line);else{a.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=ye(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==r){var u=Math.min(a.line,o.line),d=a.ch,f=Math.max(a.line,o.line),p=o.ch;d<p?p+=1:d+=1;for(var h=f-u+1,m=o.line==u?0:h-1,g=[],v=0;v<h;v++)g.push({anchor:new t(u+v,d),head:new t(u+v,p)});return{ranges:g,primary:m}}}function Oe(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=me(t,e.getCursor("anchor"))),t}function Ee(t,n){var r=t.state.vim;!1!==n&&t.setCursor(oe(t,r.sel.head)),Me(t,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,r.insertMode||e.signal(t,"vim-mode-change",{mode:"normal"})}function Ne(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var i=r.split("\n");i.pop();for(var o=i.pop();i.length>0&&o&&O(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=ye(e,n.line)):n.ch=0}}function Pe(e,t,n){t.ch=0,n.ch=0,n.line++}function Fe(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function De(e,n,r,i,o){for(var a=Oe(e),s=e.getLine(a.line),l=a.ch,c=o?g[0]:v[0];!c(s.charAt(l));)if(++l>=s.length)return null;i?c=v[0]:(c=g[0])(s.charAt(l))||(c=g[1]);for(var u=l,d=l;c(s.charAt(u))&&u<s.length;)u++;for(;c(s.charAt(d))&&d>=0;)d--;if(d++,n){for(var f=u;/\s/.test(s.charAt(u))&&u<s.length;)u++;if(f==u){for(var p=d;/\s/.test(s.charAt(d-1))&&d>0;)d--;d||(d=p)}}return{start:new t(a.line,d),end:new t(a.line,u)}}function ze(t,n,r){var i=n;if(!e.findMatchingTag||!e.findEnclosingTag)return{start:i,end:i};var o=e.findMatchingTag(t,n)||e.findEnclosingTag(t,n);return o&&o.open&&o.close?r?{start:o.open.from,end:o.close.to}:{start:o.open.to,end:o.close.from}:{start:i,end:i}}function Ie(e,t,n){pe(t,n)||I.jumpList.add(e,t,n)}function Re(e,t){I.lastCharacterSearch.increment=e,I.lastCharacterSearch.forward=t.forward,I.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var qe={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Be={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function He(e,n,r,i){var o=fe(e.getCursor()),a=r?1:-1,s=r?e.lineCount():-1,l=o.ch,c=o.line,u=e.getLine(c),d={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:i,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:r,depth:0,curMoveThrough:!1},f=qe[i];if(!f)return o;var p=Be[f].init,h=Be[f].isComplete;for(p&&p(d);c!==s&&n;){if(d.index+=a,d.nextCh=d.lineText.charAt(d.index),!d.nextCh){if(c+=a,d.lineText=e.getLine(c)||"",a>0)d.index=0;else{var m=d.lineText.length;d.index=m>0?m-1:0}d.nextCh=d.lineText.charAt(d.index)}h(d)&&(o.line=c,o.ch=d.index,n--)}return d.nextCh||d.curMoveThrough?new t(c,d.index):o}function je(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),l=n?1:-1,c=r?v:g;if(i&&""==s){if(o+=l,s=e.getLine(o),!S(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=l>0?s.length:-1,d=u,f=u;a!=u;){for(var p=!1,h=0;h<c.length&&!p;++h)if(c[h](s.charAt(a))){for(d=a;a!=u&&c[h](s.charAt(a));)a+=l;if(p=d!=(f=a),d==t.ch&&o==t.line&&f==d+l)continue;return{from:Math.min(d,f+1),to:Math.max(d,f),line:o}}p||(a+=l)}if(!S(e,o+=l))return null;s=e.getLine(o),a=l>0?0:s.length}}function We(e,n,r,i,o,a){var s=fe(n),l=[];(i&&!o||!i&&o)&&r++;for(var c=!(i&&o),u=0;u<r;u++){var d=je(e,n,i,a,c);if(!d){var f=ye(e,e.lastLine());l.push(i?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}l.push(d),n=new t(d.line,i?d.to-1:d.from)}var p=l.length!=r,h=l[0],m=l.pop();return i&&!o?(p||h.from==s.ch&&h.line==s.line||(m=l.pop()),new t(m.line,m.from)):i&&o?new t(m.line,m.to-1):!i&&o?(p||h.to==s.ch&&h.line==s.line||(m=l.pop()),new t(m.line,m.to)):new t(m.line,m.from)}function Ke(e,n,r,i,o){var a=new t(n.line+r.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(i.lastHPos=1/0,i.lastHSPos=e.charCoords(s,"div").left),a}function Ue(e,n,r,i){for(var o,a=e.getCursor(),s=a.ch,l=0;l<n;l++){if(-1==(o=Ge(s,e.getLine(a.line),i,r,!0)))return null;s=o}return new t(e.getCursor().line,o)}function $e(e,n){var r=e.getCursor().line;return oe(e,new t(r,n-1))}function Ve(e,t,n,r){N(n,_)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function Ge(e,t,n,r,i){var o;return r?-1==(o=t.indexOf(n,e+1))||i||(o-=1):-1==(o=t.lastIndexOf(n,e-1))||i||(o+=1),o}function Xe(e,n,r,i,o){var a,s=n.line,l=e.firstLine(),c=e.lastLine(),u=s;function d(t){return!e.getLine(t)}function f(e,t,n){return n?d(e)!=d(e+t):!d(e)&&d(e+t)}if(i){for(;l<=u&&u<=c&&r>0;)f(u,i)&&r--,u+=i;return new t(u,0)}var p=e.state.vim;if(p.visualLine&&f(s,1,!0)){var h=p.sel.anchor;f(h.line,-1,!0)&&(o&&h.line==s||(s+=1))}var m=d(s);for(u=s;u<=c&&r;u++)f(u,1,!0)&&(o&&d(u)==m||r--);for(a=new t(u,0),u>c&&!m?m=!0:o=!1,u=s;u>l&&(o&&d(u)!=m&&u!=s||!f(u,-1,!0));u--);return{start:new t(u,0),end:a}}function Qe(e,n,r,i,o){function a(e){e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir}function s(e,t,n,r){var i={line:e.getLine(t),ln:t,pos:n,dir:r};if(""===i.line)return{ln:i.ln,pos:i.pos};var s=i.pos;for(a(i);null!==i.line;){if(s=i.pos,E(i.line[i.pos])){if(o){for(a(i);null!==i.line&&O(i.line[i.pos]);)s=i.pos,a(i);return{ln:i.ln,pos:s+1}}return{ln:i.ln,pos:i.pos+1}}a(i)}return{ln:i.ln,pos:s+1}}function l(e,t,n,r){var i=e.getLine(t),s={line:i,ln:t,pos:n,dir:r};if(""===s.line)return{ln:s.ln,pos:s.pos};var l=s.pos;for(a(s);null!==s.line;){if(O(s.line[s.pos])||E(s.line[s.pos])){if(E(s.line[s.pos]))return o&&O(s.line[s.pos+1])?{ln:s.ln,pos:s.pos+1}:{ln:s.ln,pos:l}}else l=s.pos;a(s)}return s.line=i,o&&O(s.line[s.pos])?{ln:s.ln,pos:s.pos}:{ln:s.ln,pos:l}}for(var c={ln:n.line,pos:n.ch};r>0;)c=i<0?l(e,c.ln,c.pos,i):s(e,c.ln,c.pos,i),r--;return new t(c.ln,c.pos)}function Ye(e,n,r,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!S(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,n,r){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},l=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!O(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!E(a.line[a.pos])||i||a.pos!==a.line.length-1&&!O(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var u=c.length-1;u>=0;--u)if(!O(c[u])){s.pos=u;break}return s}function s(e,t,n,r){var i={line:l=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(E(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||O(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var l=e.getLine(a.ln);a.pos=0;for(var c=0;c<l.length;++c)if(!O(l[c])){a.pos=c;break}return a}for(var l={ln:n.line,pos:n.ch};r>0;)l=i<0?s(e,l.ln,l.pos,i):a(e,l.ln,l.pos,i),r--;return new t(l.ln,l.pos)}function Je(e,n,r,i){var o,a,s=n,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(o=e.scanForBracket(new t(s.line,s.ch+u),-1,void 0,{bracketRegex:l}),a=e.scanForBracket(new t(s.line,s.ch+u),1,void 0,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var d=o;o=a,a=d}return i?a.ch+=1:o.ch+=1,{start:o,end:a}}function Ze(e,n,r,i){var o,a,s,l,c=fe(n),u=e.getLine(c.line).split(""),d=u.indexOf(r);if(c.ch<d?c.ch=d:d<c.ch&&u[c.ch]==r&&(a=c.ch,--c.ch),u[c.ch]!=r||a)for(s=c.ch;s>-1&&!o;s--)u[s]==r&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,l=u.length;s<l&&!a;s++)u[s]==r&&(a=s);return o&&a?(i&&(--o,++a),{start:new t(c.line,o),end:new t(c.line,a)}):{start:c,end:c}}function et(){}function tt(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new et)}function nt(e){return it(e,"/")}function rt(e){return ot(e,"/")}function it(e,t){var n=ot(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var i=0;i<n.length;i++)"number"==typeof n[i]&&r.push(e.substring(n[i]+1,n[i+1]));return r}}function ot(e,t){t||(t="/");for(var n=!1,r=[],i=0;i<e.length;i++){var o=e.charAt(i);n||o!=t||r.push(i),n=!n&&"\\"==o}return r}function at(e){for(var t="|(){",n="}",r=!1,i=[],o=-1;o<e.length;o++){var a=e.charAt(o)||"",s=e.charAt(o+1)||"",l=s&&-1!=t.indexOf(s);r?("\\"===a&&l||i.push(a),r=!1):"\\"===a?(r=!0,s&&-1!=n.indexOf(s)&&(l=!0),l&&"\\"!==s||i.push(a)):(i.push(a),l&&"\\"!==s&&i.push("\\"))}return i.join("")}F("pcre",!0,"boolean"),et.prototype={getQuery:function(){return I.query},setQuery:function(e){I.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return I.isReversed},setReversed:function(e){I.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var st={"\\n":"\n","\\r":"\r","\\t":"\t"};function lt(e){for(var t=!1,n=[],r=-1;r<e.length;r++){var i=e.charAt(r)||"",o=e.charAt(r+1)||"";st[i+o]?(n.push(st[i+o]),r++):t?(n.push(i),t=!1):"\\"===i?(t=!0,T(o)||"$"===o?n.push("$"):"/"!==o&&"\\"!==o&&n.push("\\")):("$"===i&&n.push("$"),n.push(i),"/"===o&&n.push("\\"))}return n.join("")}var ct={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t","\\&":"&"};function ut(t){for(var n=new e.StringStream(t),r=[];!n.eol();){for(;n.peek()&&"\\"!=n.peek();)r.push(n.next());var i=!1;for(var o in ct)if(n.match(o,!0)){i=!0,r.push(ct[o]);break}i||r.push(n.next())}return r.join("")}function dt(e,t,n){if(I.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var r,i,o=rt(e);return o.length?(r=e.substring(0,o[0]),i=-1!=e.substring(o[0]).indexOf("i")):r=e,r?(z("pcre")||(r=at(r)),n&&(t=/^[^A-Z]*$/.test(r)),new RegExp(r,t||i?"im":"m")):null}function ft(e){"string"==typeof e&&(e=document.createElement(e));for(var t,n=1;n<arguments.length;n++)if(t=arguments[n])if("object"!=typeof t&&(t=document.createTextNode(t)),t.nodeType)e.appendChild(t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&("$"===r[0]?e.style[r.slice(1)]=t[r]:e.setAttribute(r,t[r]));return e}function pt(e,t){var n=ft("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},t);e.openNotification?e.openNotification(n,{bottom:!0,duration:5e3}):alert(n.innerText)}function ht(e,t){return ft(document.createDocumentFragment(),ft("span",{$fontFamily:"monospace",$whiteSpace:"pre"},e,ft("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),t&&ft("span",{$color:"#888"},t))}function mt(e,t){var n=ht(t.prefix,t.desc);if(e.openDialog)e.openDialog(n,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value});else{var r="";"string"!=typeof t.prefix&&t.prefix&&(r+=t.prefix.textContent),t.desc&&(r+=" "+t.desc),t.onClose(prompt(r,""))}}function gt(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}return!1}function vt(e,t,n,r){if(t){var i=tt(e),o=dt(t,!!n,!!r);if(o)return xt(e,o),gt(o,i.getQuery())||i.setQuery(o),o}}function yt(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(!t||n.sol()){var r=n.match(e,!1);if(r)return 0==r[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+r[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););}else n.skipToEnd()},query:e}}var bt=0;function xt(e,t){clearTimeout(bt),bt=setTimeout((function(){if(e.state.vim){var n=tt(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=yt(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}}),50)}function kt(e,n,r,i){return void 0===i&&(i=1),e.operation((function(){for(var o=e.getCursor(),a=e.getSearchCursor(r,o),s=0;s<i;s++){var l=a.find(n);if(0==s&&l&&pe(a.from(),o)){var c=n?a.from():a.to();(l=a.find(n))&&!l[0]&&pe(a.from(),c)&&e.getLine(c.line).length==c.ch&&(l=a.find(n))}if(!l&&!(a=e.getSearchCursor(r,n?new t(e.lastLine()):new t(e.firstLine(),0))).find(n))return}return a.from()}))}function wt(e,n,r,i,o){return void 0===i&&(i=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(r,a),l=s.find(!n);!o.visualMode&&l&&pe(s.from(),a)&&s.find(!n);for(var c=0;c<i;c++)if(!(l=s.find(n))&&!(s=e.getSearchCursor(r,n?new t(e.lastLine()):new t(e.firstLine(),0))).find(n))return;return[s.from(),s.to()]}))}function _t(e){var t=tt(e);e.removeOverlay(tt(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Ct(e,t,n){return"number"!=typeof e&&(e=e.line),t instanceof Array?N(e,t):"number"==typeof n?e>=t&&e<=n:e==t}function St(e){var t=e.getScrollInfo(),n=6,r=10,i=e.coordsChar({left:0,top:n+t.top},"local"),o=t.clientHeight-r+t.top,a=e.coordsChar({left:0,top:o},"local");return{top:i.line,bottom:a.line}}function Mt(e,n,r){if("'"==r||"`"==r)return I.jumpList.find(e,-1)||new t(0,0);if("."==r)return Lt(e);var i=n.marks[r];return i&&i.find()}function Lt(e){for(var t=e.doc.history.done,n=t.length;n--;)if(t[n].changes)return fe(t[n].changes[0].to)}var Tt=function(){this.buildCommandMap_()};Tt.prototype={processCommand:function(e,t,n){var r=this;e.operation((function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)}))},_processCommand:function(t,n,r){var i=t.state.vim,o=I.registerController.getRegister(":"),a=o.toString();i.visualMode&&Ee(t);var s=new e.StringStream(n);o.setText(n);var l,c,u=r||{};u.input=n;try{this.parseInput_(t,s,u)}catch(e){throw pt(t,e.toString()),e}if(u.commandName){if(l=this.matchCommand_(u.commandName)){if(c=l.name,l.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,u,l),"exToKey"==l.type){for(var d=0;d<l.toKeys.length;d++)K.handleKey(t,l.toKeys[d],"mapping");return}if("exToEx"==l.type)return void this.processCommand(t,l.toInput)}}else void 0!==u.line&&(c="move");if(c)try{At[c](t,u),l&&l.possiblyAsync||!u.callback||u.callback()}catch(e){throw pt(t,e.toString()),e}else pt(t,'Not an editor command ":'+n+'"')},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=Mt(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=be(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<o.length;e++){var t=o[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var i=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[i]={name:i,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[i]={name:i,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};n&&(o.context=n),r.unshift(o)}else o={keys:e,type:"keyToKey",toKeys:t},n&&(o.context=n),r.unshift(o)},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return delete this.commandMap_[n],!0}else for(var i=e,o=0;o<r.length;o++)if(i==r[o].keys&&r[o].context===t)return r.splice(o,1),!0}};var At={colorscheme:function(e,t){!t.args||t.args.length<1?pt(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;!r||r.length<2?e&&pt(e,"Invalid mapping: "+t.input):Ot.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;(!r||r.length<1||!Ot.unmap(r[0],n))&&e&&pt(e,"No such mapping: "+t.input)},move:function(e,t){Y.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||n.length<1)e&&pt(e,"Invalid mapping: "+t.input);else{var i=n[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=P[o]&&"boolean"==P[o].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=z(o,e,r);c instanceof Error?pt(e,c.message):pt(e,!0===c||!1===c?" "+(c?"":"no")+o:"  "+o+"="+c)}else{var u=D(o,a,e,r);u instanceof Error&&pt(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=I.registerController.registers,i="----------Registers----------\n\n";if(n){n=n.join("");for(var o=0;o<n.length;o++)a=n.charAt(o),I.registerController.isValidRegister(a)&&(i+='"'+a+"    "+(r[a]||new V).toString()+"\n")}else for(var a in r){var s=r[a].toString();s.length&&(i+='"'+a+"    "+s+"\n")}pt(e,i)},sort:function(n,r){var i,o,a,s,l;function c(){if(r.argString){var t=new e.StringStream(r.argString);if(t.eat("!")&&(i=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var n=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!n&&!t.eol())return"Invalid arguments";if(n[1]){o=-1!=n[1].indexOf("i"),a=-1!=n[1].indexOf("u");var c=-1!=n[1].indexOf("d")||-1!=n[1].indexOf("n")&&1,u=-1!=n[1].indexOf("x")&&1,d=-1!=n[1].indexOf("o")&&1;if(c+u+d>1)return"Invalid arguments";s=(c?"decimal":u&&"hex")||d&&"octal"}n[2]&&(l=new RegExp(n[2].substr(1,n[2].length-2),o?"i":""))}}var u=c();if(u)pt(n,u+": "+r.argString);else{var d=r.line||n.firstLine(),f=r.lineEnd||r.line||n.lastLine();if(d!=f){var p=new t(d,0),h=new t(f,ye(n,f)),m=n.getRange(p,h).split("\n"),g=l||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),v="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,y=[],b=[];if(s||l)for(var x=0;x<m.length;x++){var k=l?m[x].match(l):null;k&&""!=k[0]?y.push(k):!l&&g.exec(m[x])?y.push(m[x]):b.push(m[x])}else b=m;if(y.sort(l?S:C),l)for(x=0;x<y.length;x++)y[x]=y[x].input;else s||b.sort(C);if(m=i?y.concat(b):b.concat(y),a){var w,_=m;for(m=[],x=0;x<_.length;x++)_[x]!=w&&m.push(_[x]),w=_[x]}n.replaceRange(m.join("\n"),p,h)}}function C(e,t){var n;i&&(n=e,e=t,t=n),o&&(e=e.toLowerCase(),t=t.toLowerCase());var r=s&&g.exec(e),a=s&&g.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),v))-(a=parseInt((a[1]+a[2]).toLowerCase(),v)):e<t?-1:1}function S(e,t){var n;return i&&(n=e,e=t,t=n),o&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}},vglobal:function(e,t){this.global(e,t)},global:function(e,t){var n=t.argString;if(n){var r,i="v"===t.commandName[0],o=void 0!==t.line?t.line:e.firstLine(),a=t.lineEnd||t.line||e.lastLine(),s=nt(n),l=n;if(s.length&&(l=s[0],r=s.slice(1,s.length).join("/")),l)try{vt(e,l,!0,!0)}catch(t){return void pt(e,"Invalid regex: "+l)}for(var c=tt(e).getQuery(),u=[],d=o;d<=a;d++){var f=e.getLineHandle(d);c.test(f.text)!==i&&u.push(r?f:f.text)}if(r){var p=0,h=function(){if(p<u.length){var t=u[p++],n=e.getLineNumber(t);if(null==n)return void h();var i=n+1+r;Ot.processCommand(e,i,{callback:h})}};h()}else pt(e,u.join("\n"))}else pt(e,"Regular Expression missing from global")},substitute:function(e,n){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var r,i,o,a,s=n.argString,l=s?it(s,s[0]):[],c="",u=!1,d=!1;if(l.length)r=l[0],z("pcre")&&""!==r&&(r=new RegExp(r).source),void 0!==(c=l[1])&&(c=z("pcre")?ut(c.replace(/([^\\])&/g,"$1$$&")):lt(c),I.lastSubstituteReplacePart=c),i=l[2]?l[2].split(" "):[];else if(s&&s.length)return void pt(e,"Substitutions should be of the form :s/pattern/replace/");if(i&&(o=i[0],a=parseInt(i[1]),o&&(-1!=o.indexOf("c")&&(u=!0),-1!=o.indexOf("g")&&(d=!0),r=z("pcre")?r+"/"+o:r.replace(/\//g,"\\/")+"/"+o)),r)try{vt(e,r,!0,!0)}catch(t){return void pt(e,"Invalid regex: "+r)}if(void 0!==(c=c||I.lastSubstituteReplacePart)){var f=tt(e).getQuery(),p=void 0!==n.line?n.line:e.getCursor().line,h=n.lineEnd||p;p==e.firstLine()&&h==e.lastLine()&&(h=1/0),a&&(h=(p=h)+a-1);var m=oe(e,new t(p,0)),g=e.getSearchCursor(f,m);Et(e,u,d,p,h,g,f,c,n.callback)}else pt(e,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){_t(e)},yank:function(e){var t=fe(e.getCursor()).line,n=e.getLine(t);I.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(t,n){if(n.argString&&be(n.argString))for(var r=t.state.vim,i=new e.StringStream(be(n.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void pt(t,"Invalid argument: "+n.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void pt(t,"Invalid argument: "+n.argString.substring(o));var s=a,l=i.next();if(!(M(s)&&M(l)||A(s)&&A(l)))return void pt(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void pt(t,"Invalid argument: "+n.argString.substring(o));for(var d=0;d<=u-c;d++){var f=String.fromCharCode(c+d);delete r.marks[f]}}else delete r.marks[a]}else pt(t,"Argument required")}},Ot=new Tt;function Et(t,n,r,i,o,a,s,l,c){t.state.vim.exMode=!0;var u,d,f,p=!1;function h(){t.operation((function(){for(;!p;)m(),v();y()}))}function m(){var e=t.getRange(a.from(),a.to()).replace(s,l),n=a.to().line;a.replace(e),d=a.to().line,o+=d-n,f=d<n}function g(){var e=u&&fe(a.to()),t=a.findNext();return t&&!t[0]&&e&&pe(a.from(),e)&&(t=a.findNext()),t}function v(){for(;g()&&Ct(a.from(),i,o);)if(r||a.from().line!=d||f)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),u=a.from(),void(p=!1);p=!0}function y(e){if(e&&e(),t.focus(),u){t.setCursor(u);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=u.ch}c&&c()}function b(n,r,i){switch(e.e_stop(n),e.keyName(n)){case"Y":m(),v();break;case"N":v();break;case"A":var o=c;c=void 0,t.operation(h),c=o;break;case"L":m();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":y(i)}return p&&y(i),!0}if(v(),!p)return n?void mt(t,{prefix:ft("span","replace with ",ft("strong",l)," (y/n/a/q/l)"),onKeyDown:b}):(h(),void(c&&c()));pt(t,"No matches for "+s.source)}function Nt(t){var n=t.state.vim,r=I.macroModeState,i=I.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges;o||(t.off("change",qt),e.off(t.getInputField(),"keydown",Wt)),!o&&n.insertModeRepeat>1&&(Kt(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&It(r)}function Pt(e){r.unshift(e)}function Ft(e,t,n,r,i){var o={keys:e,type:t};for(var a in o[t]=n,o[t+"Args"]=r,i)o[a]=i[a];Pt(o)}function Dt(e,t,n,r){var i=I.registerController.getRegister(r);if(":"==r)return i.keyBuffer[0]&&Ot.processCommand(e,i.keyBuffer[0]),void(n.isPlaying=!1);var o=i.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s<o.length;s++)for(var l,c,u=o[s];u;)if(c=(l=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),K.handleKey(e,c,"macro"),t.insertMode){var d=i.insertModeChanges[a++].changes;I.macroModeState.lastInsertModeChanges.changes=d,Ut(e,d,1),Nt(e)}n.isPlaying=!1}function zt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=I.registerController.getRegister(n);r&&r.pushText(t)}}function It(e){if(!e.isPlaying){var t=e.latestRegister,n=I.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function Rt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=I.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function qt(e,t){var n=I.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(r.ignoreCount=i);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o))}t=t.next}}function Bt(e){var t=e.state.vim;if(t.insertMode){var n=I.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||Ht(e,t)}function Ht(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?Ee(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=he(i,r)?0:-1,a=he(i,r)?-1:0;i=se(i,0,o),r=se(r,0,a),n.sel={anchor:r,head:i},Ve(t,n,"<",me(i,r)),Ve(t,n,">",ge(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function jt(e){this.keyName=e}function Wt(t){var n=I.macroModeState.lastInsertModeChanges,r=e.keyName(t);function i(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new jt(r)),!0}r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||e.lookupKey(r,"vim-insert",i))}function Kt(e,t,n,r){var i=I.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?Y.processAction(e,t,t.lastEditActionCommand):Y.evalInput(e,t)}function l(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;Ut(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<n;c++)s(),l(1);else r||s(),l(n);t.inputState=a,t.insertMode&&!r&&Nt(e),i.isPlaying=!1}function Ut(t,n,r){function i(n){return"string"==typeof n?e.commands[n](t):n(t),!0}var o=t.getCursor("head"),a=I.macroModeState.lastInsertModeChanges.visualBlock;a&&(_e(t,o,a+1),r=t.listSelections().length,t.setCursor(o));for(var s=0;s<r;s++){a&&t.setCursor(se(o,s,0));for(var l=0;l<n.length;l++){var c=n[l];if(c instanceof jt)e.lookupKey(c.keyName,"vim-insert",i);else if("string"==typeof c)t.replaceSelection(c);else{var u=t.getCursor(),d=se(u,0,c[0].length);t.replaceRange(c[0],u,d),t.setCursor(d)}}}a&&t.setCursor(se(o,0,1))}function $t(e){var t=new e.constructor;return Object.keys(e).forEach((function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&"object"==typeof r&&r.constructor!=Object&&(r=$t(r)),t[n]=r})),e.sel&&(t.sel={head:e.sel.head&&fe(e.sel.head),anchor:e.sel.anchor&&fe(e.sel.anchor)}),t}function Vt(e,t,n){var r=!1,i=K.maybeInitVimState_(e),o=i.visualBlock||i.wasInVisualBlock,a=e.isInMultiSelectMode();if(i.wasInVisualBlock&&!a?i.wasInVisualBlock=!1:a&&i.visualBlock&&(i.wasInVisualBlock=!0),"<Esc>"!=t||i.insertMode||i.visualMode||!a||"<Esc>"!=i.status)if(o||!a||e.inVirtualSelectionMode)r=K.handleKey(e,t,n);else{var s=$t(i);e.operation((function(){e.curOp.isVimOp=!0,e.forEachSelection((function(){var i=e.getCursor("head"),o=e.getCursor("anchor"),a=he(i,o)?0:-1,l=he(i,o)?-1:0;i=se(i,0,a),o=se(o,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=o,r=K.handleKey(e,t,n),e.virtualSelection&&(e.state.vim=$t(s))})),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),e.state.vim=i}),!0)}else $(e);return!r||i.visualMode||i.insert||i.visualMode==e.somethingSelected()||Ht(e,i),r}return e.keyMap.vim={attach:c,detach:l,call:u},F("insertModeEscKeysTimeout",200,"number"),e.keyMap["vim-insert"]={fallthrough:["default"],attach:c,detach:l,call:u},e.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:c,detach:l,call:u},W(),K}function n(e){return e.Vim=t(e),e.Vim}e.Vim=n(e)}(n(5237),n(3653),n(8527),n(7923))},5237(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),x=/\bCrOS\b/.test(e),k=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,l=!0);var _=b&&(c||f&&(null==w||w<12.11)),C=n||a&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,L=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return T(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function E(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function N(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function P(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(e){t=n.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function F(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}M=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var z=function(e){e.select()};function I(e){return e.display.wrapper.ownerDocument}function R(e){return q(e.display.wrapper)}function q(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function B(e){return I(e).defaultView}function H(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function W(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(z=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=H(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.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)};var $=50,V={toString:function(){return"CodeMirror.Pass"}},G={scroll:!1},X={origin:"*mouse"},Q={origin:"+move"};function Y(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var J=[""];function Z(e){for(;J.length<=e;)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ne(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function re(){}function ie(e,t){var n;return Object.create?n=Object.create(e):(re.prototype=e,n=new re),t&&j(t,n),n}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function se(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ce=/[\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 ue(e){return e.charCodeAt(0)>=768&&ce.test(e)}function de(e,t,n){for(;(n<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=n;return t}function fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function pe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var he=null;function me(e,t,n){var r;he=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:he=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:he=i)}return null!=r?r:he}var ge=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":o.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var b=1,x=d[0];b<u-1;++b){var k=d[b];"+"==k&&"1"==x&&"1"==d[b+1]?d[b]="1":","!=k||x!=d[b+1]||"1"!=x&&"n"!=x||(d[b]=x),x=k}for(var w=0;w<u;++w){var _=d[w];if(","==_)d[w]="N";else if("%"==_){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var S=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",M=w;M<C;++M)d[M]=S;w=C-1}}for(var L=0,T=c;L<u;++L){var A=d[L];"L"==T&&"1"==A?d[L]="L":o.test(A)&&(T=A)}for(var O=0;O<u;++O)if(i.test(d[O])){var E=void 0;for(E=O+1;E<u&&i.test(d[E]);++E);for(var N="L"==(O?d[O-1]:c),P=N==("L"==(E<u?d[E]:c))?N?"L":"R":c,F=O;F<E;++F)d[F]=P;O=E-1}for(var D,z=[],I=0;I<u;)if(a.test(d[I])){var R=I;for(++I;I<u&&a.test(d[I]);++I);z.push(new l(0,R,I))}else{var q=I,B=z.length,H="rtl"==t?1:0;for(++I;I<u&&"L"!=d[I];++I);for(var j=q;j<I;)if(s.test(d[j])){q<j&&(z.splice(B,0,new l(1,q,j)),B+=H);var W=j;for(++j;j<I&&s.test(d[j]);++j);z.splice(B,0,new l(2,W,j)),B+=H,q=j}else++j;q<I&&z.splice(B,0,new l(1,q,I))}return"ltr"==t&&(1==z[0].level&&(D=e.match(/^\s+/))&&(z[0].from=D[0].length,z.unshift(new l(0,0,D[0].length))),1==ee(z).level&&(D=e.match(/\s+$/))&&(ee(z).to-=D[0].length,z.push(new l(0,u-D[0].length,u)))),"rtl"==t?z.reverse():z}}();function ve(e,t){var n=e.order;return null==n&&(n=e.order=ge(e.text,t)),n}var ye=[],be=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ye).concat(n)}};function xe(e,t){return e._handlers&&e._handlers[t]||ye}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=U(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function we(e,t){var n=xe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),we(e,n||t.type,e,t),Ae(t)||t.codemirrorIgnore}function Ce(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function Se(e,t){return xe(e,t).length>0}function Me(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Le(e),Te(e)}function Ee(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Pe,Fe,De=function(){if(a&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function ze(e){if(null==Pe){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Pe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Pe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AخA")),n=M(t,0,1).getBoundingClientRect(),r=M(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Re,qe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},He="oncopy"in(Re=O("div"))||(Re.setAttribute("oncopy","return;"),"function"==typeof Re.oncopy),je=null;function We(e){if(null!=je)return je;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=M(t,0,1).getBoundingClientRect();return je=Math.abs(n.left-r.left)>1}var Ke={},Ue={};function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ke[e]=t}function Ve(e,t){Ue[e]=t}function Ge(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=Ge(t);var n=Ke[t.name];if(!n)return Xe(e,"text/plain");var r=n(e,t);if(Qe.hasOwnProperty(t.name)){var i=Qe[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Qe={};function Ye(e,t){j(t,Qe.hasOwnProperty(e)?Qe[e]:Qe[e]={})}function Je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function et(e,t,n){return!e.startState||e.startState(t,n)}var tt=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function nt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function rt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function it(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function ot(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function at(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function st(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function lt(e,t){return t>=e.first&&t<e.first+e.size}function ct(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ut(e,t,n){if(void 0===n&&(n=null),!(this instanceof ut))return new ut(e,t,n);this.line=e,this.ch=t,this.sticky=n}function dt(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&0==dt(e,t)}function pt(e){return ut(e.line,e.ch)}function ht(e,t){return dt(e,t)<0?t:e}function mt(e,t){return dt(e,t)<0?e:t}function gt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return ut(e.first,0);var n=e.first+e.size-1;return t.line>n?ut(n,nt(e,n).text.length):yt(t,nt(e,t.line).text.length)}function yt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function bt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=vt(e,t[r]);return n}tt.prototype.eol=function(){return this.pos>=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tt.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},tt.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},tt.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var xt=function(e,t){this.state=e,this.lookAhead=t},kt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function wt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function _t(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ct(e,at(t)),i=t.text.length>e.options.maxHighlightLength&&Je(e.doc.mode,r.state),o=wt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ct(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new kt(r,!0,t);var o=Nt(e,t,n),a=o>r.first&&nt(r,o-1).stateAfter,s=a?kt.fromSaved(r,a,o):new kt(r,et(r.mode),o);return r.iter(o,t,(function(n){St(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function St(e,t,n,r){var i=e.doc.mode,o=new tt(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Mt(i,n.state);!o.eol();)Lt(i,o,n.state),o.start=o.pos}function Mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Lt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ze(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}kt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},kt.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}},kt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},kt.fromSaved=function(e,t,n){return t instanceof xt?new kt(e,Je(e.mode,t.state),n,t.lookAhead):new kt(e,Je(e.mode,t),n)},kt.prototype.save=function(e){var t=!1!==e?Je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xt(t,this.maxLookAhead):t};var Tt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=nt(a,(t=vt(a,t)).line),c=Ct(e,t.line,n),u=new tt(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Lt(s,u,c.state),r&&o.push(new Tt(u,i,Je(a.mode,c.state)));return r?o:new Tt(u,i,c.state)}function Ot(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new tt(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Ot(Mt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&St(e,t,r,d.pos),d.pos=t.length,l=null):l=Ot(Lt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}function Nt(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=nt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof xt?c.lookAhead:0)<=o.modeFrontier))return s;var u=W(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Pt(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=nt(e,r).stateAfter;if(i&&(!(i instanceof xt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ft=!1,Dt=!1;function zt(){Ft=!0}function It(){Dt=!0}function Rt(e,t,n){this.marker=e,this.from=t,this.to=n}function qt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Bt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ht(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 jt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Rt(a,o.from,s?null:o.to))}}return r}function Wt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Rt(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Kt(e,t){if(t.full)return null;var n=lt(e,t.from.line)&&nt(e,t.from.line).markedSpans,r=lt(e,t.to.line)&&nt(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==dt(t.from,t.to),s=jt(n,i,a),l=Wt(r,o,a),c=1==t.text.length,u=ee(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var p=qt(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=i}}if(l)for(var h=0;h<l.length;++h){var m=l[h];null!=m.to&&(m.to+=u),null==m.from?qt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Ut(s)),l&&l!=s&&(l=Ut(l));var g=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Rt(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Ut(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function $t(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(dt(c.to,s.from)<0||dt(c.from,s.to)>0)){var u=[l,1],d=dt(c.from,s.from),f=dt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function Vt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Gt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function Qt(e){return e.inclusiveRight?1:0}function Yt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=dt(r.from,i.from)||Xt(e)-Xt(t);if(o)return-o;var a=dt(r.to,i.to)||Qt(e)-Qt(t);return a||t.id-e.id}function Jt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Yt(n,i.marker)<0)&&(n=i.marker);return n}function Zt(e){return Jt(e,!0)}function en(e){return Jt(e,!1)}function tn(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Yt(n,o.marker)<0)&&(n=o.marker)}return n}function nn(e,t,n,r,i){var o=nt(e,t),a=Dt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=dt(c.from,n)||Xt(l.marker)-Xt(i),d=dt(c.to,r)||Qt(l.marker)-Qt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?dt(c.to,n)>=0:dt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?dt(c.from,r)<=0:dt(c.from,r)<0)))return!0}}}function rn(e){for(var t;t=Zt(e);)e=t.find(-1,!0).line;return e}function on(e){for(var t;t=en(e);)e=t.find(1,!0).line;return e}function an(e){for(var t,n;t=en(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function sn(e,t){var n=nt(e,t),r=rn(n);return n==r?t:at(r)}function ln(e,t){if(t>e.lastLine())return t;var n,r=nt(e,t);if(!cn(e,r))return t;for(;n=en(r);)r=n.find(1,!0).line;return at(r)+1}function cn(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&un(e,t,r))return!0}}function un(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return un(e,r.line,qt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&un(e,t,i))return!0}function dn(e){for(var t=0,n=(e=rn(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function fn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Zt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=en(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function pn(e){var t=e.display,n=e.doc;t.maxLine=nt(n,n.first),t.maxLineLength=fn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=fn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var hn=function(e,t,n){this.text=e,Gt(this,t),this.height=n?n(this):1};function mn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Vt(e),Gt(e,n);var i=r?r(e):1;i!=e.height&&ot(e,i)}function gn(e){e.parent=null,Vt(e)}hn.prototype.lineNo=function(){return at(this)},Me(hn);var vn={},yn={};function bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function xn(e,t){var n=E("span",null,null,l?"padding-right: .1px":null),r={pre:E("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=wn,Ie(e.display.measure)&&(a=ve(o,e.doc.direction))&&(r.addToken=Cn(r.addToken,a)),r.map=[],Mn(o,r,_t(e,o,t!=e.display.externalMeasured&&at(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(ze(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function kn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function wn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?_n(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(O("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(O("span",Z(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(O("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(O("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||o||l){var x=n||"";r&&(x+=r),i&&(x+=i);var k=O("span",[c],x,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,l[w]);return e.content.appendChild(k)}e.content.appendChild(c)}}function _n(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function Cn(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function Sn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Mn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var k=r[x],w=k.marker;if("bookmark"==w.type&&k.from==h&&w.widgetNode)y.push(w);else if(k.from<=h&&(null==k.to||k.to>h||w.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&v>k.to&&(v=k.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&k.from==h&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(b||(b=[])).push(w.endStyle,k.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var _ in w.attributes)(f||(f={}))[_]=w.attributes[_];w.collapsed&&(!d||Yt(d.marker,w)<0)&&(d=k)}else k.from>h&&v>k.from&&(v=k.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!d||d.from==h)for(var S=0;S<y.length;++S)Sn(t,0,y[S]);if(d&&(d.from||0)==h){if(Sn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var M=Math.min(p,v);;){if(g){var L=h+g.length;if(!d){var T=L>M?g.slice(0,M-h):g;t.addToken(t,T,a?a+l:l,u,h+T.length==v?c:"",s,f)}if(L>=M){g=g.slice(M-h),h=M;break}h=L,u=""}g=i.slice(o,o=n[m++]),a=bn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),bn(n[A+1],t.cm.options))}function Ln(e,t,n){this.line=t,this.rest=an(t),this.size=this.rest?at(ee(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cn(e,t)}function Tn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Ln(e.doc,nt(e.doc,o),o);r=o+a.size,i.push(a)}return i}var An=null;function On(e){An?An.ops.push(e):e.ownsGroup=An={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Nn(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{An=null,t(n)}}var Pn=null;function Fn(e,t){var n=xe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);An?r=An.delayedCallbacks:Pn?r=Pn:(r=Pn=[],setTimeout(Dn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function Dn(){var e=Pn;Pn=null;for(var t=0;t<e.length;++t)e[t]()}function zn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Bn(e,t):"gutter"==o?jn(e,t,n,r):"class"==o?Hn(e,t):"widget"==o&&Wn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function Rn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function qn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):xn(e,t)}function Bn(e,t){var n=t.text.className,r=qn(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,Hn(e,t)):n&&(t.text.className=n)}function Hn(e,t){Rn(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function jn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=In(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ct(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Wn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Un(e,t,n)}function Kn(e,t,n,r){var i=qn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Hn(e,t),jn(e,t,n,r),Un(e,t,r),t.node}function Un(e,t,n){if($n(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)$n(e,t.rest[r],t,n,!1)}function $n(e,t,n,r,i){if(t.widgets)for(var o=In(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=O("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Vn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Fn(l,"redraw")}}function Vn(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 Gn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!N(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;"),A(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Xn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Qn(e){return e.lineSpace.offsetTop}function Yn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Jn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,O("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 Zn(e){return $-e.display.nativeBarWidth}function er(e){return e.display.scroller.clientWidth-Zn(e)-e.display.barWidth}function tr(e){return e.display.scroller.clientHeight-Zn(e)-e.display.barHeight}function nr(e,t,n){var r=e.options.lineWrapping,i=r&&er(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function rr(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(at(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ir(e,t){var n=at(t=rn(t)),r=e.display.externalMeasured=new Ln(e.doc,t,n);r.lineN=n;var i=r.built=xn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function or(e,t,n,r){return lr(e,sr(e,t),n,r)}function ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function sr(e,t){var n=at(t),r=ar(e,n);r&&!r.text?r=null:r&&r.changes&&(zn(e,r,n,zr(e)),e.curOp.forceUpdate=!0),r||(r=ir(e,t));var i=rr(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function lr(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(nr(e,t.view,t.rect),t.hasHeights=!0),(o=pr(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var cr,ur={left:0,right:0,top:0,bottom:0};function dr(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function fr(e,t){var n=ur;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function pr(e,t,n,r){var i,o=dr(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&ue(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():fr(M(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=hr(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Dr(e.display),top:h.top,bottom:h.bottom}:ur}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,k=y[b],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:x,bottom:k};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}function hr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!We(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 mr(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 gr(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)mr(e.display.view[t])}function vr(e){gr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yr(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function br(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function xr(e){var t=rn(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Gn(t[r]));return n}function kr(e,t,n,r,i){if(!i){var o=xr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=dn(t);if("local"==r?a+=Qn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:br(I(e)));var l=s.left+("window"==r?0:yr(I(e)));n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function wr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=yr(I(e)),i-=br(I(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function _r(e,t,n,r,i){return r||(r=nt(e.doc,t.line)),kr(e,r,or(e,r,t.ch,i),n)}function Cr(e,t,n,r,i,o){function a(t,a){var s=lr(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,kr(e,r,s,n)}r=r||nt(e.doc,t.line),i||(i=sr(e,r));var s=ve(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=me(s,l,c),f=he,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Sr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Dr(e.display)*t.ch);var r=nt(e.doc,t.line),i=dn(r)+Qn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Mr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Lr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Mr(r.first,0,null,-1,-1);var i=st(r,n),o=r.first+r.size-1;if(i>o)return Mr(r.first+r.size-1,nt(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=nt(r,i);;){var s=Er(e,a,i,t,n),l=tn(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=nt(r,i=c.line)}}function Tr(e,t,n,r){r-=xr(t);var i=t.text.length,o=fe((function(t){return lr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=fe((function(t){return lr(e,n,t).top>r}),o,i)}}function Ar(e,t,n,r){return n||(n=sr(e,t)),Tr(e,t,n,kr(e,t,lr(e,n,r),"line").top)}function Or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Er(e,t,n,r,i){i-=dn(t);var o=sr(e,t),a=xr(t),s=0,l=t.text.length,c=!0,u=ve(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Pr:Nr)(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=fe((function(t){var n=lr(e,o,t);return n.top+=a,n.bottom+=a,!!Or(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=h+(b?0:1),p=b?"after":"before",f=y?m.left:m.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":lr(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=Cr(e,ut(n,g,p),"line",t,o);f=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Mr(n,g=de(t.text,g,1),p,v,r-f)}function Nr(e,t,n,r,i,o,a){var s=fe((function(s){var l=i[s],c=1!=l.level;return Or(Cr(e,ut(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Cr(e,ut(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Or(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function Pr(e,t,n,r,i,o,a){var s=Tr(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=c||p.to<=l)){var h=lr(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=h<o?o-h+1e9:h-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Fr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==cr){cr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)cr.appendChild(document.createTextNode("x")),cr.appendChild(O("br"));cr.appendChild(document.createTextNode("x"))}A(e.measure,cr);var n=cr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function Dr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function zr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Rr(e){var t=Fr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Dr(e.display)-3);return function(i){if(cn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function qr(e){var t=e.doc,n=Rr(e);t.iter((function(e){var t=n(e);t!=e.height&&ot(e,t)}))}function Br(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Lr(e,o,a);if(r&&c.xRel>0&&(l=nt(e.doc,c.line).text).length==c.ch){var u=W(l,l.length,e.options.tabSize)-l.length;c=ut(c.line,Math.max(0,Math.round((o-Jn(e.display).left)/Dr(e.display))-u))}return c}function Hr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function jr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&sn(e.doc,t)<i.viewTo&&Kr(e);else if(n<=i.viewFrom)Dt&&ln(e.doc,n+r)>i.viewFrom?Kr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Kr(e);else if(t<=i.viewFrom){var o=Ur(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Kr(e)}else if(n>=i.viewTo){var a=Ur(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Kr(e)}else{var s=Ur(e,t,t,-1),l=Ur(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Tn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Kr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Wr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Hr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function Kr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ur(e,t,n,r){var i,o=Hr(e,t),a=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;sn(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function $r(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Tn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Tn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Hr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Tn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Hr(e,n)))),r.viewTo=n}function Vr(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 Gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&Qr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&Qr(e,l.head,i);c||Jr(e,l,o)}}return r}function Qr(e,t,n){var r=Cr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=_r(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Yr(e,t){return e.top-t.top||e.left-t.left}function Jr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Jn(e.display),s=a.left,l=Math.max(r.sizerWidth,er(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n                             height: "+(r-t)+"px"))}function d(t,n,r){var o,a,d=nt(i,t),f=d.text.length;function p(n,r){return _r(e,ut(t,n),"div",d,r)}function h(t,n,r){var i=Ar(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ve(d,i.direction);return pe(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==f,k=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var _=(c?x:b)&&w,C=(c?b:x)&&k?s:(g?v:y).left,S=_?l:(g?y:v).right;u(C,v.top,S-C,v.bottom)}else{var M,L,T,A;g?(M=c&&b&&k?s:v.left,L=c?l:h(e,i,"before"),T=c?s:h(t,i,"after"),A=c&&x&&w?l:y.right):(M=c?h(e,i,"before"):s,L=!c&&b&&k?l:v.right,T=!c&&x&&w?s:y.left,A=c?h(t,i,"after"):l),u(M,v.top,L-M,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(T,y.top,A-T,y.bottom)}(!o||Yr(v,o)<0)&&(o=v),Yr(y,o)<0&&(o=y),(!a||Yr(v,a)<0)&&(a=v),Yr(y,a)<0&&(a=y)})),{start:o,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=nt(i,f.line),m=nt(i,p.line),g=rn(h)==rn(m),v=d(f.line,f.ch,g?h.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function Zr(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()||ri(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ei(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ni(e))}function ti(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ri(e))}),100)}function ni(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Zr(e))}function ri(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ii(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),ot(c.line,d),oi(c.line),c.rest))for(var g=0;g<c.rest.length;g++)oi(c.rest[g]);if(f>e.display.sizerWidth){var v=Math.ceil(f/Dr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function oi(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 ai(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Qn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=st(t,r),a=st(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=st(t,dn(nt(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=st(t,dn(nt(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function si(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var a=O("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Qn(e.display))+"px;\n                         height: "+(t.bottom-t.top+Zn(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function li(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=Cr(e,t),l=n&&n!=t?Cr(e,n):s,c=ui(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(vi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(bi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ci(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&bi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Fr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=tr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Yn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=er(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function di(e,t){null!=t&&(mi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function fi(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function pi(e,t,n){null==t&&null==n||mi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function hi(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gi(e,Sr(e,t.from),Sr(e,t.to),t.margin))}function gi(e,t,n,r){var i=ui(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});pi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Gi(e,{top:t}),yi(e,t,!0),n&&Gi(e),Bi(e,100))}function yi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Ji(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Yn(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+Zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ki=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),be(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ki.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},ki.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};function _i(e,t){t||(t=xi(e));var n=e.display.barWidth,r=e.display.barHeight;Ci(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Ci(e,xi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ci(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=""}wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};var Si={native:ki,null:wi};function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Si[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?bi(e,t):vi(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Li=0;function Ti(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:++Li,markArrays:null},On(e.curOp)}function Ai(e){var t=e.curOp;t&&Nn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Oi(e)}))}function Oi(e){for(var t=e.ops,n=0;n<t.length;n++)Ei(t[n]);for(var r=0;r<t.length;r++)Ni(t[r]);for(var i=0;i<t.length;i++)Pi(t[i]);for(var o=0;o<t.length;o++)Fi(t[o]);for(var a=0;a<t.length;a++)Di(t[a])}function Ei(e){var t=e.cm,n=t.display;Wi(t),e.updateMaxLine&&pn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ji(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ni(e){e.updatedDisplay=e.mustUpdate&&$i(e.cm,e.update)}function Pi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ii(t),e.barMeasure=xi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=or(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+Zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-er(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Fi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==P(R(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&_i(t,e.barMeasure),e.updatedDisplay&&Yi(t,e.barMeasure),e.selectionChanged&&Zr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ei(e.cm)}function Di(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Vi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&yi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos&&si(t,li(t,vt(r,e.scrollToPos.from),vt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||we(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&we(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&we(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function zi(e,t){if(e.curOp)return t();Ti(e);try{return t()}finally{Ai(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ti(e);try{return t.apply(e,arguments)}finally{Ai(e)}}}function Ri(e){return function(){if(this.curOp)return e.apply(this,arguments);Ti(this);try{return e.apply(this,arguments)}finally{Ai(this)}}}function qi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ti(t);try{return e.apply(this,arguments)}finally{Ai(t)}}}function Bi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,H(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ct(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Je(t.mode,r.state):null,l=wt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&St(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Bi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&zi(e,(function(){for(var t=0;t<i.length;t++)Wr(e,i[t],"text")}))}}var ji=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ai(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=er(e),this.force=n,this.dims=zr(e),this.events=[]};function Wi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Zn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Zn(e)+"px",t.scrollbarsClipped=!0)}function Ki(e){if(e.hasFocus())return null;var t=P(R(e));if(!t||!N(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=B(e).getSelection();r.anchorNode&&r.extend&&N(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ui(e){if(e&&e.activeElt&&e.activeElt!=P(q(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&N(document.body,e.anchorNode)&&N(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 $i(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Kr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Vr(e))return!1;Zi(e)&&(Kr(e),t.dims=zr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Dt&&(o=sn(e.doc,o),a=ln(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;$r(e,o,a),n.viewOffset=dn(nt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Vr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Ki(e);return l>4&&(n.lineDiv.style.display="none"),Xi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ui(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bi(e,400)),n.updateLineNumbers=null,!0}function Vi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=er(e))r&&(t.visible=ai(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Yn(e.display)-tr(e),n.top)}),t.visible=ai(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$i(e,t))break;ii(e);var i=xi(e);Gr(e),_i(e,i),Yi(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 Gi(e,t){var n=new ji(e,t);if($i(e,n)){ii(e),Vi(e,n);var r=xi(e);Gr(e),_i(e,r),Yi(e,r),n.finish()}}function Xi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var p=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),zn(e,f,u,n)),p&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ct(e.options,u)))),a=f.node.nextSibling}else{var h=Kn(e,f,u,n);o.insertBefore(h,a)}u+=f.size}for(;a;)a=s(a)}function Qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Fn(e,"gutterChanged",e)}function Yi(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+Zn(e)+"px"}function Ji(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Zi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ct(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Qi(e.display),!0}return!1}function eo(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function to(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(O("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Qi(e)}function no(e){to(e.display),jr(e),Ji(e)}function ro(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=E("div",null,"CodeMirror-code"),o.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=O("div",null,"CodeMirror-cursors"),o.measure=O("div",null,"CodeMirror-measure"),o.lineMeasure=O("div",null,"CodeMirror-measure"),o.lineSpace=E("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=E("div",[o.lineSpace],"CodeMirror-lines");o.mover=O("div",[c],null,"position: relative"),o.sizer=O("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=O("div",null,null,"position: absolute; height: "+$+"px; width: 1px;"),o.gutters=O("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=O("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=O("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),u&&105===d&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=eo(i.gutters,i.lineNumbers),to(o),r.init(o)}ji.prototype.signal=function(e,t){Se(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.apply(null,this.events[e])};var io=0,oo=null;function ao(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function so(e){var t=ao(e);return t.x*=oo,t.y*=oo,t}function lo(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var r=ao(t),i=r.x,o=r.y,a=oo;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,c=s.scroller,p=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(i&&p||o&&h){if(o&&b&&l)e:for(var m=t.target,g=s.view;m!=c;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(i&&!n&&!f&&null!=a)return o&&h&&vi(e,Math.max(0,c.scrollTop+o*a)),bi(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&h)&&Le(t),void(s.wheelStartX=null);if(o&&null!=a){var y=o*a,x=e.doc.scrollTop,k=x+s.wrapper.clientHeight;y<0?x=Math.max(0,x+y-50):k=Math.min(e.doc.height,k+y+50),Gi(e,{top:x,bottom:k})}io<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(oo=(oo*io+n)/(io+1),++io)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?oo=-.53:n?oo=15:u?oo=-.7:p&&(oo=-1/3);var co=function(e,t){this.ranges=e,this.primIndex=t};co.prototype.primary=function(){return this.ranges[this.primIndex]},co.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ft(n.anchor,r.anchor)||!ft(n.head,r.head))return!1}return!0},co.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new uo(pt(this.ranges[t].anchor),pt(this.ranges[t].head));return new co(e,this.primIndex)},co.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},co.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(dt(t,r.from())>=0&&dt(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function fo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return dt(e.from(),t.from())})),n=U(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=dt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=mt(s.from(),a.from()),u=ht(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new uo(d?u:c,d?c:u))}}return new co(t,n)}function po(e,t){return new co([new uo(e,t||e)],0)}function ho(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function mo(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return ho(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+=ho(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new uo(mo(i.anchor,t),mo(i.head,t)))}return fo(e.cm,n,e.sel.primIndex)}function vo(e,t,n){return e.line==t.line?ut(n.line,e.ch-t.ch+n.ch):ut(n.line+(e.line-t.line),e.ch)}function yo(e,t,n){for(var r=[],i=ut(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=vo(s.from,i,o),c=vo(ho(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],d=dt(u.head,u.anchor)<0;r[a]=new uo(d?c:l,d?l:c)}else r[a]=new uo(l,l)}return new co(r,e.sel.primIndex)}function bo(e){e.doc.mode=Xe(e.options,e.doc.modeOption),xo(e)}function xo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Bi(e,100),e.state.modeGen++,e.curOp&&jr(e)}function ko(e,t){return 0==t.from.ch&&0==t.to.ch&&""==ee(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function wo(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){mn(e,n,i,r),Fn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new hn(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=nt(e,s.line),d=nt(e,l.line),f=ee(c),p=i(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(ko(e,t)){var m=a(0,c.length-1);o(d,d.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new hn(f+u.text.slice(l.ch),p,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,f+d.text.slice(l.ch),p);var v=a(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}Fn(e,"change",e,t)}function _o(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function Co(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,qr(e),bo(e),So(e),e.options.direction=t.direction,e.options.lineWrapping||pn(e),e.options.mode=t.modeOption,jr(e)}function So(e){("rtl"==e.doc.direction?F:L)(e.display.lineDiv,"CodeMirror-rtl")}function Mo(e){zi(e,(function(){So(e),jr(e)}))}function Lo(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 To(e,t){var n={from:pt(t.from),to:ho(t),text:rt(e,t.from,t.to)};return Do(e,n,t.from.line,t.to.line+1),_o(e,(function(e){return Do(e,n,t.from.line,t.to.line+1)}),!0),n}function Ao(e){for(;e.length&&ee(e).ranges;)e.pop()}function Oo(e,t){return t?(Ao(e.done),ee(e.done)):e.done.length&&!ee(e.done).ranges?ee(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Eo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Oo(i,i.lastOp==r)))a=ee(o.changes),0==dt(t.from,t.to)&&0==dt(t.from,a.to)?a.to=ho(t):o.changes.push(To(e,t));else{var l=ee(i.done);for(l&&l.ranges||Fo(e.sel,i.done),o={changes:[To(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||we(e,"historyAdded")}function No(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 Po(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||No(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ao(i.undone)}function Fo(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Do(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function zo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(zo(n[i]));return r}function Ro(e,t){var n=Io(e,t),r=Kt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function qo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?co.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(ee(s)[d]=c[d],delete c[d])}}}return r}function Bo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=dt(t,i)<0;o!=dt(n,i)<0?(i=t,t=n):o!=dt(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Ho(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Vo(e,new co([Bo(e.sel.primary(),t,n,i)],0),r)}function jo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Bo(e.sel.ranges[o],t[o],null,i);Vo(e,fo(e.cm,r,e.sel.primIndex),n)}function Wo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Vo(e,fo(e.cm,i,e.sel.primIndex),r)}function Ko(e,t,n,r){Vo(e,po(t,n),r)}function Uo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new uo(vt(e,t[n].anchor),vt(e,t[n].head))},origin:n&&n.origin};return we(e,"beforeSelectionChange",e,r),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?fo(e.cm,r.ranges,r.ranges.length-1):t}function $o(e,t,n){var r=e.history.done,i=ee(r);i&&i.ranges?(r[r.length-1]=t,Go(e,t,n)):Vo(e,t,n)}function Vo(e,t,n){Go(e,t,n),Po(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Go(e,t,n){(Se(e,"beforeSelectionChange")||e.cm&&Se(e.cm,"beforeSelectionChange"))&&(t=Uo(e,t,n));var r=n&&n.bias||(dt(t.primary().head,e.sel.primary().head)<0?-1:1);Xo(e,Yo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||fi(e.cm)}function Xo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ce(e.cm)),Fn(e,"cursorActivity",e))}function Qo(e){Xo(e,Yo(e,e.sel,null,!1))}function Yo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Zo(e,a.anchor,s&&s.anchor,n,r),c=a.head==a.anchor?l:Zo(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new uo(l,c))}return i?fo(e.cm,i,t.primIndex):t}function Jo(e,t,n,r,i){var o=nt(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(we(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=ea(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=dt(d,n))&&(r<0?f<0:f>0))return Jo(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=ea(e,p,r,p.line==t.line?o:null)),p?Jo(e,p,t,r,i):null}}return t}function Zo(e,t,n,r,i){var o=r||1,a=Jo(e,t,n,o,i)||!i&&Jo(e,t,n,o,!0)||Jo(e,t,n,-o,i)||!i&&Jo(e,t,n,-o,!0);return a||(e.cantEdit=!0,ut(e.first,0))}function ea(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||nt(e,t.line)).text.length?t.line<e.first+e.size-1?ut(t.line+1,0):null:new ut(t.line,t.ch+n)}function ta(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),G)}function na(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=vt(e,t)),n&&(r.to=vt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),we(e,"beforeChange",e,r),e.cm&&we(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 ra(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,ra)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"))||(t=na(e,t,!0))){var r=Ft&&!n&&$t(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ia(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=dt(t.from,t.to)){var n=go(e,t);Eo(e,t,n,e.cm?e.cm.curOp.id:NaN),sa(e,t,n,Kt(e,t));var r=[];_o(e,(function(e,n){n||-1!=U(r,e.history)||(fa(e.history,t),r.push(e.history)),sa(e,t,null,Kt(e,t))}))}}function oa(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(Fo(i,l),n&&!i.equals(e.sel))return void Vo(e,i,{clearRedo:!1});a=i}var u=[];Fo(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!na(e,r,!1))return s.length=0,{};u.push(To(e,r));var o=n?go(e,r):ee(s);sa(e,r,o,Ro(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ho(r)});var a=[];_o(e,(function(e,t){t||-1!=U(a,e.history)||(fa(e.history,r),a.push(e.history)),sa(e,r,null,Ro(e,r))}))},p=i.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new co(te(e.sel.ranges,(function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){jr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Wr(e.cm,r,"gutter")}}function sa(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,sa)(e,t,n,r);if(t.to.line<e.first)aa(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);aa(e,i),t={from:ut(e.first,0),to:ut(t.to.line+i,t.to.ch),text:[ee(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ut(o,nt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=rt(e,t.from,t.to),n||(n=go(e,t)),e.cm?la(e.cm,t,r):wo(e,t,r),Go(e,n,G),e.cantEdit&&Zo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function la(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=at(rn(nt(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&Ce(e),wo(r,t,n,Rr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=fn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Pt(r,o.line),Bi(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?jr(e):o.line!=a.line||1!=t.text.length||ko(e.doc,t)?jr(e,o.line,a.line+1,c):Wr(e,o.line,"text");var u=Se(e,"changes"),d=Se(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Fn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ca(e,t,n,r,i){var o;r||(r=n),dt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ra(e,{from:n,to:r,text:t,origin:i})}function ua(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function da(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ua(o.ranges[s].anchor,t,n,r),ua(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=ut(c.from.line+r,c.from.ch),c.to=ut(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function fa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;da(e.done,n,r,i),da(e.undone,n,r,i)}function pa(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=nt(e,gt(e,t)):i=at(t),null==i?null:(r(o,i)&&e.cm&&Wr(e.cm,i,n),o)}function ha(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ma(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}uo.prototype.from=function(){return mt(this.anchor,this.head)},uo.prototype.to=function(){return ht(this.anchor,this.head)},uo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ha.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,gn(i),Fn(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}},ma.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ha))){var s=[];this.collapse(s),this.children=[new ha(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new ha(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ma(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ma(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ga=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function va(e,t,n){dn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&di(e,n)}function ya(e,t,n,r){var i=new ga(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),pa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!cn(e,t)){var r=dn(t)<e.scrollTop;ot(t,t.height+Gn(i)),r&&di(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Fn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:at(t)),i}ga.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=at(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Gn(this);ot(n,Math.max(0,n.height-o)),e&&(zi(e,(function(){va(e,n,-o),Wr(e,r,"widget")})),Fn(e,"lineWidgetCleared",e,this,r))}},ga.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Gn(this)-t;i&&(cn(this.doc,r)||ot(r,r.height+i),n&&zi(n,(function(){n.curOp.forceUpdate=!0,va(n,r,i),Fn(n,"lineWidgetChanged",n,e,at(r))})))},Me(ga);var ba=0,xa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ba};function ka(e,t,n,r,i){if(r&&r.shared)return _a(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,ka)(e,t,n,r,i);var o=new xa(e,i),a=dt(t,n);if(r&&j(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(nn(e,t.line,t,n,o)||t.line!=n.line&&nn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&Eo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&rn(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&ot(r,0),Ht(r,new Rt(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){cn(e,t)&&ot(t,0)})),o.clearOnEnter&&be(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(zt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ba,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)jr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Wr(c,u,"text");o.atomic&&Qo(c.doc),Fn(c,"markerAdded",c,o)}return o}xa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ti(e),Se(this,"clear")){var n=this.find();n&&Fn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=qt(a.markedSpans,this);e&&!this.collapsed?Wr(e,at(a),"text"):e&&(null!=s.to&&(i=at(a)),null!=s.from&&(r=at(a))),a.markedSpans=Bt(a.markedSpans,s),null==s.from&&this.collapsed&&!cn(this.doc,a)&&e&&ot(a,Fr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=rn(this.lines[l]),u=fn(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&jr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qo(e.doc)),e&&Fn(e,"markerCleared",e,this,r,i),t&&Ai(e),this.parent&&this.parent.clear()}},xa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=qt(o.markedSpans,this);if(null!=a.from&&(n=ut(t?o:at(o),a.from),-1==e))return n;if(null!=a.to&&(r=ut(t?o:at(o),a.to),1==e))return r}return n&&{from:n,to:r}},xa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&zi(r,(function(){var i=t.line,o=at(t.line),a=ar(r,o);if(a&&(mr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!cn(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=Gn(n)-s;l&&ot(i,i.height+l)}Fn(r,"markerChanged",r,e)}))},xa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},xa.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(xa);var wa=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _a(e,t,n,r,i){(r=j(r)).shared=!1;var o=[ka(e,t,n,r,i)],a=o[0],s=r.widgetNode;return _o(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(ka(e,vt(e,t),vt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=ee(o)})),new wa(o,a)}function Ca(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),(function(e){return e.parent}))}function Sa(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(dt(o,a)){var s=ka(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Ma(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];_o(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==U(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}wa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Fn(this,"clear")}},wa.prototype.find=function(e,t){return this.primary.find(e,t)},Me(wa);var La=0,Ta=function(e,t,n,r,i){if(!(this instanceof Ta))return new Ta(e,t,n,r,i);null==n&&(n=0),ma.call(this,[new ha([new hn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ut(n,0);this.sel=po(o),this.history=new Lo(null),this.id=++La,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),wo(this,{from:o,to:o,text:e}),Vo(this,po(o),G)};Ta.prototype=ie(ma.prototype,{constructor:Ta,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=it(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:qi((function(e){var t=ut(this.first,0),n=this.first+this.size-1;ra(this,{from:t,to:ut(n,nt(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&pi(this.cm,0,0),Vo(this,po(t),G)})),replaceRange:function(e,t,n,r){ca(this,e,t=vt(this,t),n=n?vt(this,n):t,r)},getRange:function(e,t,n){var r=rt(this,vt(this,e),vt(this,t));return!1===n?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(lt(this,e))return nt(this,e)},getLineNumber:function(e){return at(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=nt(this,e)),rn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:qi((function(e,t,n){Ko(this,vt(this,"number"==typeof e?ut(e,t||0):e),null,n)})),setSelection:qi((function(e,t,n){Ko(this,vt(this,e),vt(this,t||e),n)})),extendSelection:qi((function(e,t,n){Ho(this,vt(this,e),t&&vt(this,t),n)})),extendSelections:qi((function(e,t){jo(this,bt(this,e),t)})),extendSelectionsBy:qi((function(e,t){jo(this,bt(this,te(this.sel.ranges,e)),t)})),setSelections:qi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new uo(vt(this,e[i].anchor),vt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Vo(this,fo(this.cm,r,t),n)}})),addSelection:qi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new uo(vt(this,e),vt(this,t||e))),Vo(this,fo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=rt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=rt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:qi((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&yo(this,r,t),l=r.length-1;l>=0;l--)ra(this,r[l]);s?$o(this,s):this.cm&&fi(this.cm)})),undo:qi((function(){oa(this,"undo")})),redo:qi((function(){oa(this,"redo")})),undoSelection:qi((function(){oa(this,"undo",!0)})),redoSelection:qi((function(){oa(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 Lo(this.history),_o(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:qo(this.history.done),undone:qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Lo(this.history);t.done=qo(e.done.slice(0),null,!0),t.undone=qo(e.undone.slice(0),null,!0)},setGutterMarker:qi((function(e,t,n){return pa(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&le(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:qi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&pa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,le(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!lt(this,e))return null;if(t=e,!(e=nt(this,e)))return null}else if(null==(t=at(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:qi((function(e,t,n){return pa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(S(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:qi((function(e,t,n){return pa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(S(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:qi((function(e,t,n){return ya(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ka(this,vt(this,e),vt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ka(this,e=vt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=nt(this,(e=vt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.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)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),vt(this,ut(n,t))},indexFromPos:function(e){var t=(e=vt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ta(it(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ta(it(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}],Sa(r,Ca(this)),r},unlinkDoc:function(e){if(e instanceof js&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ma(Ca(this));break}if(e.history==this.history){var n=[e.id];_o(e,(function(e){return n.push(e.id)}),!0),e.history=new Lo(null),e.history.done=qo(this.history.done,n),e.history.undone=qo(this.history.undone,n)}},iterLinkedDocs:function(e){_o(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):qe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:qi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Mo(this.cm))}))}),Ta.prototype.eachLine=Ta.prototype.iter;var Aa=0;function Oa(e){var t=this;if(Pa(t),!_e(t,e)&&!Xn(t.display,e)){Le(e),a&&(Aa=+new Date);var n=Br(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&Ii(t,(function(){var e={from:n=vt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ra(t.doc,e),$o(t.doc,po(vt(t.doc,n),vt(t.doc,ho(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Go(t.doc,po(n,n)),f)for(var p=0;p<f.length;++p)ca(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ea(e,t){if(a&&(!e.state.draggingText||+new Date-Aa<100))Oe(t);else if(!_e(e,t)&&!Xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function Na(e,t){var n=Br(e,t);if(n){var r=document.createDocumentFragment();Qr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}function Pa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Fa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Da=!1;function za(){Da||(Ia(),Da=!0)}function Ia(){var e;be(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Fa(Ra)}),100))})),be(window,"blur",(function(){return Fa(ri)}))}function Ra(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qa={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"},Ba=0;Ba<10;Ba++)qa[Ba+48]=qa[Ba+96]=String(Ba);for(var Ha=65;Ha<=90;Ha++)qa[Ha]=String.fromCharCode(Ha);for(var ja=1;ja<=12;ja++)qa[ja+111]=qa[ja+63235]="F"+ja;var Wa={};function Ka(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ua(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=te(n.split(" "),Ka),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function $a(e,t,n,r){var i=(t=Qa(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return $a(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=$a(e,t.fallthrough[o],n,r);if(a)return a}}}function Va(e){var t="string"==typeof e?e:qa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ga(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(_?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(_?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Xa(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=qa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ga(n,e,t))}function Qa(e){return"string"==typeof e?Wa[e]:e}function Ya(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&dt(o.from,ee(r).to)<=0;){var a=r.pop();if(dt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}zi(e,(function(){for(var t=r.length-1;t>=0;t--)ca(e.doc,"",r[t].from,r[t].to,"+delete");fi(e)}))}function Ja(e,t,n){var r=de(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Za(e,t,n){var r=Ja(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function es(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ve(n,t.doc.direction);if(o){var a,s=i<0?ee(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=sr(t,n);a=i<0?n.text.length-1:0;var u=lr(t,c,a).top;a=fe((function(e){return lr(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ja(n,a,1))}else a=i<0?s.to:s.from;return new ut(r,a,l)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ts(e,t,n,r){var i=ve(t,e.doc.direction);if(!i)return Za(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=me(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Za(t,n,r);var s,l=function(e,n){return Ja(t,e instanceof ut?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||sr(e,t),Ar(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new ut(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,l(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},m=h(o+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}Wa.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"},Wa.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"},Wa.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"},Wa.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"]},Wa.default=b?Wa.macDefault:Wa.pcDefault;var ns={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Ya(e,(function(t){if(t.empty()){var n=nt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ut(t.head.line+1,0)}:{from:t.head,to:ut(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ya(e,(function(t){return{from:ut(t.from().line,0),to:vt(e.doc,ut(t.to().line+1,0))}}))},delLineLeft:function(e){return Ya(e,(function(e){return{from:ut(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ya(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ya(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(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return rs(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return os(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return is(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")}),Q)},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")}),Q)},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/)?os(e,t.head):r}),Q)},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("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=W(e.getLine(o.line),o.ch,r);t.push(Z(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return zi(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=nt(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ut(i.line,i.ch-1)),i.ch>0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=nt(e.doc,i.line-1).text;a&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ut(i.line-1,a.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return zi(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);fi(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function rs(e,t){var n=nt(e.doc,t),r=rn(n);return r!=n&&(t=at(r)),es(!0,e,r,t,1)}function is(e,t){var n=nt(e.doc,t),r=on(n);return r!=n&&(t=at(r)),es(!0,e,n,t,-1)}function os(e,t){var n=rs(e,t.line),r=nt(e.doc,n.line),i=ve(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return ut(n.line,a?0:o,n.sticky)}return n}function as(e,t,n){if("string"==typeof t&&!(t=ns[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)!=V}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ss(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$a(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$a(t,e.options.extraKeys,n,e)||$a(t,e.options.keyMap,n,e)}var ls=new K;function cs(e,t,n,r){var i=e.state.keySeq;if(i){if(Va(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ls.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),us(e,i+" "+t,n,r))return!0}return us(e,t,n,r)}function us(e,t,n,r){var i=ss(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Fn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Le(n),Zr(e)),!!i}function ds(e,t){var n=Xa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?cs(e,"Shift-"+n,t,(function(t){return as(e,t,!0)}))||cs(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return as(e,t)})):cs(e,n,t,(function(t){return as(e,t)})))}function fs(e,t,n){return cs(e,"'"+n+"'",t,(function(t){return as(e,t,!0)}))}var ps=null;function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=P(R(t)),_e(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ds(t,e);f&&(ps=i?r:null,i||88!=r||He||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ms(t)}}function ms(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),ke(document,"keyup",n),ke(document,"mouseover",n))}F(t,"CodeMirror-crosshair"),be(document,"keyup",n),be(document,"mouseover",n)}function gs(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function vs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Xn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ps)return ps=null,void Le(e);if(!f||e.which&&!(e.which<10)||!ds(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(fs(t,e,i)||t.display.input.onKeyPress(e))}}}var ys,bs,xs=400,ks=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ws(e,t){var n=+new Date;return bs&&bs.compare(n,e,t)?(ys=bs=null,"triple"):ys&&ys.compare(n,e,t)?(bs=new ks(n,e,t),ys=null,"double"):(ys=new ks(n,e,t),bs=null,"single")}function _s(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Xn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ns(t,e)){var r=Br(t,e),i=Ne(e),o=r?ws(r,i):"single";B(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&Cs(t,i,r,o,e)||(1==i?r?Ms(t,r,o,e):Ee(e)==n.scroller&&Le(e):2==i?(r&&Ho(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):ti(t)))}}function Cs(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),cs(e,Ga(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ns[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=V}finally{e.state.suppressEdits=!1}return r}))}function Ss(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}function Ms(e,t,n,r){a?setTimeout(H(ei,e),0):e.curOp.focus=P(R(e));var i,o=Ss(e,n,r),s=e.doc.sel;e.options.dragDrop&&De&&!e.isReadOnly()&&"single"==n&&(i=s.contains(t))>-1&&(dt((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(dt(i.to(),t)>0||t.xRel<0)?Ls(e,r,t,o):As(e,r,t,o)}function Ls(e,t,n,r){var i=e.display,o=!1,c=Ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ti(e)),ke(i.wrapper.ownerDocument,"mouseup",c),ke(i.wrapper.ownerDocument,"mousemove",u),ke(i.scroller,"dragstart",d),ke(i.scroller,"drop",c),o||(Le(t),r.addNew||Ho(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",c),be(i.wrapper.ownerDocument,"mousemove",u),be(i.scroller,"dragstart",d),be(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ts(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function As(e,t,n,r){a&&ti(e);var i=e.display,o=e.doc;Le(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new uo(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new uo(n,n)),n=Br(e,t,!0,!0),l=-1;else{var d=Ts(e,n,r.unit);s=r.extend?Bo(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,Vo(o,fo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Vo(o,fo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Wo(o,l,s,X):(l=0,Vo(o,new co([s],0),X),c=o.sel);var f=n;function p(t){if(0!=dt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=W(nt(o,n.line).text,n.ch,a),d=W(nt(o,t.line).text,t.ch,a),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=nt(o,m).text,y=Y(v,p,a);p==h?i.push(new uo(ut(m,y),ut(m,y))):v.length>y&&i.push(new uo(ut(m,y),ut(m,Y(v,h,a))))}i.length||i.push(new uo(n,n)),Vo(o,fo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=s,k=Ts(e,t,r.unit),w=x.anchor;dt(k.anchor,w)>0?(b=k.head,w=mt(x.from(),k.anchor)):(b=k.anchor,w=ht(x.to(),k.head));var _=c.ranges.slice(0);_[l]=Os(e,new uo(vt(o,w),b)),Vo(o,fo(e,_,l),X)}}var h=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=Br(e,t,!0,"rectangle"==r.unit);if(a)if(0!=dt(a,f)){e.curOp.focus=P(R(e)),p(a);var s=ai(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ii(e,(function(){m==n&&g(t)})),150)}else{var l=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;l&&setTimeout(Ii(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Le(t),i.input.focus()),ke(i.wrapper.ownerDocument,"mousemove",y),ke(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ii(e,(function(e){0!==e.buttons&&Ne(e)?g(e):v(e)})),b=Ii(e,v);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Os(e,t){var n=t.anchor,r=t.head,i=nt(e.doc,n.line);if(0==dt(n,r)&&n.sticky==r.sticky)return t;var o=ve(i);if(!o)return t;var a=me(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=me(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new uo(new ut(n.line,h,m),r)}function Es(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Le(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Se(e,n))return Ae(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return we(e,n,e,st(e.doc,o),e.display.gutterSpecs[l].className,t),Ae(t)}}function Ns(e,t){return Es(e,t,"gutterClick",!0)}function Ps(e,t){Xn(e.display,t)||Fs(e,t)||_e(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Fs(e,t){return!!Se(e,"gutterContextMenu")&&Es(e,t,"gutterContextMenu",!1)}function Ds(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}ks.prototype.compare=function(e,t,n){return this.time+xs>e&&0==dt(t,this.pos)&&n==this.button};var zs={toString:function(){return"CodeMirror.Init"}},Is={},Rs={};function qs(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=zs&&i(e,t,n)}:i)}e.defineOption=n,e.Init=zs,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,bo(e)}),!0),n("indentUnit",2,bo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){xo(e),vr(e),jr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ca(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=zs&&e.refresh()})),n("specialCharPlaceholder",kn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!k),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ds(e),no(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qa(t),i=n!=zs&&Qa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Hs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=eo(t,e.options.lineNumbers),no(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return _i(e)}),!0),n("scrollbarStyle","native",(function(e){Mi(e),_i(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=eo(e.options.gutters,t),no(e)}),!0),n("firstLineNumber",1,no,!0),n("lineNumberFormatter",(function(e){return e}),no,!0),n("showCursorWhenSelecting",!1,Gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ri(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Bs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Gr,!0),n("singleCursorHeightPerLine",!0,Gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,xo,!0),n("addModeClass",!1,xo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,xo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Bs(e,t,n){if(!t!=!(n&&n!=zs)){var r=e.display.dragFunctions,i=t?be:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Hs(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),pn(e)),qr(e),jr(e),vr(e),setTimeout((function(){return _i(e)}),100)}function js(e,t){var n=this;if(!(this instanceof js))return new js(e,t);this.options=t=t?j(t):{},j(Is,t,!1);var r=t.value;"string"==typeof r?r=new Ta(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new js.inputStyles[t.inputStyle](this),o=this.display=new ro(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ds(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new K,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ws(this),za(),Ti(this),this.curOp.forceUpdate=!0,Co(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&ni(n)}),20):ri(this),Rs)Rs.hasOwnProperty(c)&&Rs[c](this,t[c],zs);Zi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ks.length;++u)Ks[u](this);Ai(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ws(e){var t=e.display;be(t.scroller,"mousedown",Ii(e,_s)),be(t.scroller,"dblclick",a&&s<11?Ii(e,(function(t){if(!_e(e,t)){var n=Br(e,t);if(n&&!Ns(e,t)&&!Xn(e.display,t)){Le(t);var r=e.findWordAt(n);Ho(e.doc,r.anchor,r.head)}}})):function(t){return _e(e,t)||Le(t)}),be(t.scroller,"contextmenu",(function(t){return Ps(e,t)})),be(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ps(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}be(t.scroller,"touchstart",(function(i){if(!_e(e,i)&&!o(i)&&!Ns(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),be(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),be(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new uo(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new uo(ut(a.line,0),vt(e.doc,ut(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Le(n)}i()})),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),be(t.scroller,"mousewheel",(function(t){return lo(e,t)})),be(t.scroller,"DOMMouseScroll",(function(t){return lo(e,t)})),be(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||Oe(t)},over:function(t){_e(e,t)||(Na(e,t),Oe(t))},start:function(t){return Ea(e,t)},drop:Ii(e,Oa),leave:function(t){_e(e,t)||Pa(e)}};var c=t.input.getField();be(c,"keyup",(function(t){return gs.call(e,t)})),be(c,"keydown",Ii(e,hs)),be(c,"keypress",Ii(e,vs)),be(c,"focus",(function(t){return ni(e,t)})),be(c,"blur",(function(t){return ri(e,t)}))}js.defaults=Is,js.optionHandlers=Rs;var Ks=[];function Us(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ct(e,t).state:n="prev");var a=e.options.tabSize,s=nt(o,t),l=W(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==V||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?W(nt(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=Z(c-f)),d!=u)return ca(o,d,ut(t,0),ut(t,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var m=o.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=ut(t,u.length);Wo(o,h,new uo(g,g));break}}}js.defineInitHook=function(e){return Ks.push(e)};var $s=null;function Vs(e){$s=e}function Gs(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=qe(t),c=null;if(s&&r.ranges.length>1)if($s&&$s.text.join("\n")==t){if(r.ranges.length%$s.text.length==0){c=[];for(var u=0;u<$s.text.length;u++)c.push(o.splitLines($s.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=te(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=ut(h.line,h.ch-n):e.state.overwrite&&!s?m=ut(m.line,Math.min(nt(o,m.line).text.length,m.ch+ee(l).length)):s&&$s&&$s.lineWise&&$s.text.join("\n")==l.join("\n")&&(h=m=ut(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ra(e.doc,g),Fn(e,"inputRead",e,g)}t&&!s&&Qs(e,t),fi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||zi(t,(function(){return Gs(t,n,0,null,"paste")})),!0}function Qs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Us(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(nt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Us(e,i.head.line,"smart"));a&&Fn(e,"electricInput",e,i.head.line)}}}function Ys(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:ut(i,0),head:ut(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Js(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Zs(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function el(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){B(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),we(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ri((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");ne(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,jr(this)})),removeOverlay:Ri((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void jr(this)}})),indentLine:Ri((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),lt(this.doc,e)&&Us(this,e,t,n)})),indentSelection:Ri((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Us(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&fi(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Us(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Wo(this.doc,r,new uo(o,c[r].to()),G)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=_t(this,nt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return Ct(this,(e=gt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Cr(this,null==e?n.head:"object"==typeof e?vt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return _r(this,vt(this.doc,e),t||"page")},coordsChar:function(e,t){return Lr(this,(e=wr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=wr(this,{top:e,left:0},t||"page").top,st(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=nt(this.doc,e)}else r=e;return kr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-dn(r):0)},defaultTextHeight:function(){return Fr(this.display)},defaultCharWidth:function(){return Dr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Cr(this,vt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ci(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ri(hs),triggerOnKeyPress:Ri(vs),triggerOnKeyUp:gs,triggerOnMouseDown:Ri(_s),execCommand:function(e){if(ns.hasOwnProperty(e))return ns[e].call(null,this)},triggerElectric:Ri((function(e){Qs(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),a=0;a<t&&!(o=tl(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:Ri((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?tl(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),Q)})),deleteH:Ri((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ya(this,(function(n){var i=tl(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=vt(this.doc,e),s=0;s<t;++s){var l=Cr(this,a,"div");if(null==o?o=l.left:l.left=o,(a=nl(this,l,i,n)).hitSide)break}return a},moveV:Ri((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Cr(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=nl(n,s,e,t);return"page"==t&&a==r.sel.primary()&&di(n,_r(n,l,"div").top-s.top),l}),Q),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=nt(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=se(o,i)?function(e){return se(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!se(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new uo(ut(e.line,n),ut(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P(R(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ri((function(e,t){pi(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Zn(this)-this.display.barHeight,width:e.scrollWidth-Zn(this)-this.display.barWidth,clientHeight:tr(this),clientWidth:er(this)}},scrollIntoView:Ri((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ut(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?hi(this,e):gi(this,e.from,e.to,e.margin)})),setSize:Ri((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&gr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Wr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,we(this,"refresh",this)})),operation:function(e){return zi(this,e)},startOperation:function(){return Ti(this)},endOperation:function(){return Ai(this)},refresh:Ri((function(){var e=this.display.cachedTextHeight;jr(this),this.curOp.forceUpdate=!0,vr(this),pi(this,this.doc.scrollLeft,this.doc.scrollTop),Qi(this.display),(null==e||Math.abs(e-Fr(this.display))>.5||this.options.lineWrapping)&&qr(this),we(this,"refresh",this)})),swapDoc:Ri((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Co(this,e),vr(this),this.display.input.reset(),pi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Fn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function tl(e,t,n,r,i){var o=t,a=n,s=nt(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),s=nt(e,n))}function u(o){var a;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new ut(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=i?ts(e.cm,s,t,n):Za(s,t,n);if(null==a){if(o||!c())return!1;t=es(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var m=s.text.charAt(t.ch)||"\n",g=se(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||g||(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!h))break}var v=Zo(e,t,o,a,!0);return ft(o,v)&&(v.hitSide=!0),v}function nl(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*Fr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Lr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var rl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function il(e,t){var n=ar(e,t.line);if(!n||n.hidden)return null;var r=nt(e.doc,t.line),i=rr(n,r,t.line),o=ve(r,e.doc.direction),a="left";o&&(a=me(o,t.ch)%2?"right":"left");var s=dr(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ol(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function al(e,t){return t&&(e.bad=!0),e}function sl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(ut(r,0),ut(i+1,0),c(+p));return void(h.length&&(o=h[0].find(0))&&d(rt(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return o}function ll(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return al(e.clipPos(ut(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return cl(o,t,n)}}function cl(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!N(r,t))return al(ut(at(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?ee(e.rest):e.line;return al(ut(at(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=at(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||s!=t)&&(d=o[a+(r?1:0)]),ut(u,d)}}}var d=u(a,s,n);if(d)return al(d,i);for(var f=s.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return al(ut(d.line,d.ch-p),i);p+=f.textContent.length}for(var h=s.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return al(ut(d.line,d.ch+m),i);m+=h.textContent.length}}rl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!_e(r,e)){if(r.somethingSelected())Vs({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Ys(r);Vs({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,G),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=$s.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Zs(),l=s.firstChild;Js(l),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=$s.text.join("\n");var c=P(q(i));z(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Js(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),be(i,"paste",(function(e){!o(e)||_e(r,e)||Xs(e,r)||s<=11&&setTimeout(Ii(r,(function(){return t.updateFromDOM()})),20)})),be(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),be(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),be(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),be(i,"touchstart",(function(){return n.forceCompositionEnd()})),be(i,"input",(function(){t.composing||t.readFromDOMSoon()})),be(i,"copy",a),be(i,"cut",a)},rl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},rl.prototype.prepareSelection=function(){var e=Xr(this.cm,!1);return e.focus=P(q(this.div))==this.div,e},rl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},rl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=ll(t,e.anchorNode,e.anchorOffset),s=ll(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=dt(mt(a,s),i)||0!=dt(ht(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&il(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&il(t,o);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=M(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},rl.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)},rl.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},rl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},rl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return N(this.div,t)},rl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&P(q(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},rl.prototype.blur=function(){this.div.blur()},rl.prototype.getField=function(){return this.div},rl.prototype.supportsTouch=function(){return!0},rl.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):zi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},rl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},rl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&ol(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ll(t,e.anchorNode,e.anchorOffset),r=ll(t,e.focusNode,e.focusOffset);n&&r&&zi(t,(function(){Vo(t.doc,po(n,r),G),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},rl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=ut(a.line-1,nt(r.doc,a.line-1).length)),s.ch==nt(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=ut(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Hr(r,a.line))?(t=at(i.view[0].line),n=i.view[0].node):(t=at(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=Hr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=at(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(sl(r,n,c,t,l)),f=rt(r.doc,ut(t,0),ut(l,nt(r.doc,l).text.length));d.length>1&&f.length>1;)if(ee(d)==ee(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=ee(d),b=ee(f),x=Math.min(y.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<x&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var k=ut(t,p),w=ut(l,f.length?ee(f).length-h:0);return d.length>1||d[0]||dt(k,w)?(ca(r.doc,d,k,w,"+input"),!0):void 0},rl.prototype.ensurePolled=function(){this.forceCompositionEnd()},rl.prototype.reset=function(){this.forceCompositionEnd()},rl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},rl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},rl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||zi(this.cm,(function(){return jr(e.cm)}))},rl.prototype.setUneditable=function(e){e.contentEditable="false"},rl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Gs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},rl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},rl.prototype.onContextMenu=function(){},rl.prototype.resetPosition=function(){},rl.prototype.needsContentAttribute=!0;var ul=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function dl(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=P(q(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=js((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function fl(e){e.off=ke,e.on=be,e.wheelEventPixels=so,e.Doc=Ta,e.splitLines=qe,e.countColumn=W,e.findColumn=Y,e.isWordChar=ae,e.Pass=V,e.signal=we,e.Line=hn,e.changeEnd=ho,e.scrollbarModel=Si,e.Pos=ut,e.cmpPos=dt,e.modes=Ke,e.mimeModes=Ue,e.resolveMode=Ge,e.getMode=Xe,e.modeExtensions=Qe,e.extendMode=Ye,e.copyState=Je,e.startState=et,e.innerMode=Ze,e.commands=ns,e.keyMap=Wa,e.keyName=Xa,e.isModifierKey=Va,e.lookupKey=$a,e.normalizeKeyMap=Ua,e.StringStream=tt,e.SharedTextMarker=wa,e.TextMarker=xa,e.LineWidget=ga,e.e_preventDefault=Le,e.e_stopPropagation=Te,e.e_stop=Oe,e.addClass=F,e.contains=N,e.rmClass=L,e.keyNames=qa}ul.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!_e(r,e)){if(r.somethingSelected())Vs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ys(r);Vs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,G):(n.prevInput="",i.value=t.text.join("\n"),z(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),be(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),be(i,"paste",(function(e){_e(r,e)||Xs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",(function(t){if(!Xn(e,t)&&!_e(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),be(e.lineSpace,"selectstart",(function(t){Xn(e,t)||Le(t)})),be(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),be(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ul.prototype.createField=function(e){this.wrapper=Zs(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Js(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},ul.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ul.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xr(e);if(e.options.moveInputWithCursor){var i=Cr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ul.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ul.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&&z(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},ul.prototype.getField=function(){return this.textarea},ul.prototype.supportsTouch=function(){return!1},ul.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||P(q(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},ul.prototype.blur=function(){this.textarea.blur()},ul.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ul.prototype.receivedFocus=function(){this.slowPoll()},ul.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ul.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ul.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Be(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return zi(t,(function(){Gs(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ul.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ul.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ul.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Br(n,e),c=r.scroller.scrollTop;if(o&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ii(n,Vo)(n.doc,po(o),G);var u,d=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=i.ownerDocument.defaultView.scrollY),r.input.focus(),l&&i.ownerDocument.defaultView.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){Oe(e);var m=function(){ke(window,"mouseup",m),setTimeout(v,20)};be(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ii(n,ta)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},ul.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ul.prototype.setUneditable=function(){},ul.prototype.needsContentAttribute=!1,qs(js),el(js);var pl="iter insert remove copy getEditor constructor".split(" ");for(var hl in Ta.prototype)Ta.prototype.hasOwnProperty(hl)&&U(pl,hl)<0&&(js.prototype[hl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ta.prototype[hl]));return Me(Ta),js.inputStyles={textarea:ul,contenteditable:rl},js.defineMode=function(e){js.defaults.mode||"null"==e||(js.defaults.mode=e),$e.apply(this,arguments)},js.defineMIME=Ve,js.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),js.defineMIME("text/plain","null"),js.defineExtension=function(e,t){js.prototype[e]=t},js.defineDocExtension=function(e,t){Ta.prototype[e]=t},js.fromTextArea=dl,fl(js),js.version="5.65.20",js}()},8712(e,t,n){!function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}e.defineMode("clike",(function(a,l){var c,u,d=a.indentUnit,f=l.statementIndentUnit||d,p=l.dontAlignCalls,h=l.keywords||{},m=l.types||{},g=l.builtin||{},v=l.blockKeywords||{},y=l.defKeywords||{},b=l.atoms||{},x=l.hooks||{},k=l.multiLineStrings,w=!1!==l.indentStatements,_=!1!==l.indentSwitch,C=l.namespaceSeparator,S=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,M=l.numberStart||/[\d\.]/,L=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,T=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,A=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,O=l.isReservedIdentifier||!1;function E(e,t){var n=e.next();if(x[n]){var r=x[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=N(n),t.tokenize(e,t);if(M.test(n)){if(e.backUp(1),e.match(L))return"number";e.next()}if(S.test(n))return c=n,null;if("/"==n){if(e.eat("*"))return t.tokenize=P,P(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(T.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(T););return"operator"}if(e.eatWhile(A),C)for(;e.match(C);)e.eatWhile(A);var i=e.current();return s(h,i)?(s(v,i)&&(c="newstatement"),s(y,i)&&(u=!0),"keyword"):s(m,i)?"type":s(g,i)||O&&O(i)?(s(v,i)&&(c="newstatement"),"builtin"):s(b,i)?"atom":"variable"}function N(e){return function(t,n){for(var r,i=!1,o=!1;null!=(r=t.next());){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!k)&&(n.tokenize=null),"string"}}function P(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function F(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return F(e,t),null;c=u=null;var s=(t.tokenize||E)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else c==a.type?r(t):w&&(("}"==a.type||"top"==a.type)&&";"!=c||"statement"==a.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),x.token){var d=x.token(e,t,s);void 0!==d&&(s=d)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=u?"def":s||c,F(e,t),s},indent:function(t,n){if(t.tokenize!=E&&null!=t.tokenize||t.typeAtEndOfLine&&o(t.context))return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(x.indent){var s=x.indent(t,r,n,d);if("number"==typeof s)return s}var c=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:f):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:d)+(a||!c||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(a?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",u="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",d="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION  NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=a("int long char short double float unsigned signed void bool"),p=a("SEL instancetype id Class Protocol BOOL");function h(e){return s(f,e)||/.+_t$/.test(e)}function m(e){return h(e)||s(p,e)}var g="case do else for if switch while struct enum union",v="struct enum union";function y(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=y;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function b(e,t){return"type"==t.prevToken&&"type"}function x(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function k(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=S,S(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function _(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function C(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function S(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function M(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function L(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function T(e){return function(t,n){for(var r;r=t.next();){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=T(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=T(e+1),n.tokenize(t,n)}return"comment"}}function A(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!e&&!i&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!o&&e||(n.tokenize=null),"string"}}M(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(l),types:h,blockKeywords:a(g),defKeywords:a(v),typeFirstDefinitions:!0,atoms:a("NULL true false"),isReservedIdentifier:x,hooks:{"#":y,"*":b},modeProps:{fold:["brace","include"]}}),M(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(l+" "+c),types:h,blockKeywords:a(g+" class try catch"),defKeywords:a(v+" class namespace"),typeFirstDefinitions:!0,atoms:a("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:x,hooks:{"#":y,"*":b,u:w,U:w,L:w,R:w,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&_(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:a("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")},'"':function(e,t){return!!e.match(/""$/)&&(t.tokenize=L,t.tokenize(e,t))}},modeProps:{fold:["brace","import"]}}),M("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=C,C(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),M("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class enum do else finally for forSome if match switch try while"),defKeywords:a("class enum def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=L,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),M("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=A(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),M(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":y},modeProps:{fold:["brace","include"]}}),M("text/x-nesc",{name:"clike",keywords:a(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:h,blockKeywords:a(g),atoms:a("null true false"),hooks:{"#":y},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec",{name:"clike",keywords:a(l+" "+u),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a(v+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":y,"*":b},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec++",{name:"clike",keywords:a(l+" "+u+" "+c),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a(v+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":y,"*":b,u:w,U:w,L:w,R:w,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&_(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:h,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":y},modeProps:{fold:["brace","include"]}});var O=null;function E(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!i&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!i&&t.match("``")){O=E(e),o=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return o&&(n.tokenize=null),"string"}}M("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=E(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!O||!e.match("`"))&&(t.tokenize=O,O=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(n(5237))},8656(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var i,o,a=t.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},d=n.mediaValueKeywords||{},f=n.propertyKeywords||{},p=n.nonStandardPropertyKeywords||{},h=n.fontProperties||{},m=n.counterDescriptors||{},g=n.colorKeywords||{},v=n.valueKeywords||{},y=n.allowNested,b=n.lineComment,x=!0===n.supportsAtComponent,k=!1!==t.highlightNonStandardPropertyKeywords;function w(e,t){return i=t,e}function _(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?w(null,"compare"):'"'==n||"'"==n?(t.tokenize=C(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=S),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function C(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),w("string","string")}}function S(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),w(null,"(")}function M(e,t,n){this.type=e,this.indent=t,this.prev=n}function L(e,t,n,r){return e.context=new M(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function A(e,t,n){return N[n.context.type](e,t,n)}function O(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return A(e,t,n)}function E(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var N={top:function(e,t,n){if("{"==e)return L(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(x&&/@component/i.test(e))return L(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return L(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return L(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return L(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return L(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return L(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(o="property","maybeprop"):p.hasOwnProperty(r)?(o=k?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?L(n,t,"prop"):A(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&y)return L(n,t,"propBlock");if("}"==e||"{"==e)return O(e,t,n);if("("==e)return L(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)E(t);else if("interpolation"==e)return L(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?O(e,t,n):")"==e?T(n):"("==e?L(n,t,"parens"):"interpolation"==e?L(n,t,"interpolation"):("word"==e&&E(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):A(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return L(n,t,"atBlock_parens");if("}"==e||";"==e)return O(e,t,n);if("{"==e)return T(n)&&L(n,t,y?"block":"top");if("interpolation"==e)return L(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?k?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?O(e,t,n):"{"==e?T(n)&&L(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?O(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?L(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):A(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?L(n,t,"top"):A(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?O(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?O(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new M(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||_)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=N[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(f),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),x=n.concat(i).concat(a).concat(l).concat(u).concat(f).concat(g).concat(y);function k(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(n(5237))},9184(e,t,n){!function(e){"use strict";e.defineMode("diff",(function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||0===n)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var r=e[t.peek()]||t.skipToEnd();return-1===n?t.skipToEnd():t.pos=n,r}}})),e.defineMIME("text/x-diff","diff")}(n(5237))},1764(e,t,n){!function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",(function(n,r){var i=0;function o(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===i&&(n.code=!1):(i=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var l in r)s[l]=r[l];return s.name="markdown",e.overlayMode(e.getMode(n,s),a)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(n(5237),n(7216),n(2580))},2520(e,t,n){!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function l(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(o(t,r[0])))return r[2]}}e.defineMode("htmlmixed",(function(r,i){var o=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),c={},u=i&&i.tags,d=i&&i.scriptTypes;if(s(t,c),u&&s(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]);function p(t,i){var s,u=o.token(t,i.htmlState),d=/\btag\b/.test(u);if(d&&!/[<>\s\/]/.test(t.current())&&(s=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(s))i.inTag=s+" ";else if(i.inTag&&d&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var h=">"==t.current()&&l(c[f[1]],f[2]),m=e.getMode(r,h),g=a(f[1],!0),v=a(f[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,v,t.localMode.token(e,t.localState))},i.localMode=m,i.localState=e.startState(m,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return u}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(o)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?o.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(5237),n(576),n(6792),n(8656))},5618(e,t,n){!function(e){"use strict";e.defineMode("http",(function(){function e(e,t){return e.skipToEnd(),t.cur=a,"error"}function t(t,r){return t.match(/^HTTP\/\d\.\d/)?(r.cur=n,"keyword"):t.match(/^[A-Z]+/)&&/[ \t]/.test(t.peek())?(r.cur=i,"keyword"):e(t,r)}function n(t,n){var i=t.match(/^\d+/);if(!i)return e(t,n);n.cur=r;var o=Number(i[0]);return o>=100&&o<200?"positive informational":o>=200&&o<300?"positive success":o>=300&&o<400?"positive redirect":o>=400&&o<500?"negative client-error":o>=500&&o<600?"negative server-error":"error"}function r(e,t){return e.skipToEnd(),t.cur=a,null}function i(e,t){return e.eatWhile(/\S/),t.cur=o,"string-2"}function o(t,n){return t.match(/^HTTP\/\d\.\d$/)?(n.cur=a,"keyword"):e(t,n)}function a(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?"atom":(e.skipToEnd(),"error"):(e.skipToEnd(),"string")}function s(e){return e.skipToEnd(),null}return{token:function(e,t){var n=t.cur;return n!=a&&n!=s&&e.eatSpace()?null:n(e,t)},blankLine:function(e){e.cur=s},startState:function(){return{cur:t}}}})),e.defineMIME("message/http","http")}(n(5237))},6792(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function g(e,t,n){return r=e,i=n,t}function v(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=y(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&e.eat(">"))return g("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):it(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==n)return t.tokenize=x,x(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==n&&e.eatWhile(d))return g("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?g("."):g("operator","operator",e.current());if(d.test(n)){e.eatWhile(d);var r=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(r)){var i=f[r];return g(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function y(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(h))return n.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=v),g("string","string")}}function b(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=v;break}r="*"==n}return g("comment","comment")}function x(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=v;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}var k="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=k.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(d.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function C(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function S(e,t){if(!c)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function M(e,t,n,r,i){var o=e.cc;for(L.state=e,L.stream=i,L.marked=null,L.cc=o,L.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?U:W)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return L.marked?L.marked:"variable"==n&&S(e,r)?"variable-2":t}}var L={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)L.cc.push(arguments[e])}function A(){return T.apply(null,arguments),!0}function O(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function E(e){var t=L.state;if(L.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=N(e,t.context);if(null!=r)return void(t.context=r)}else if(!O(e,t.localVars))return void(t.localVars=new D(e,t.localVars));n.globalVars&&!O(e,t.globalVars)&&(t.globalVars=new D(e,t.globalVars))}}function N(e,t){if(t){if(t.block){var n=N(e,t.prev);return n?n==t.prev?t:new F(n,t.vars,!0):null}return O(e,t.vars)?t:new F(t.prev,new D(e,t.vars),!1)}return null}function P(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function F(e,t,n){this.prev=e,this.vars=t,this.block=n}function D(e,t){this.name=e,this.next=t}var z=new D("this",new D("arguments",null));function I(){L.state.context=new F(L.state.context,L.state.localVars,!1),L.state.localVars=z}function R(){L.state.context=new F(L.state.context,L.state.localVars,!0),L.state.localVars=null}function q(){L.state.localVars=L.state.context.vars,L.state.context=L.state.context.prev}function B(e,t){var n=function(){var n=L.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new C(r,L.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function H(){var e=L.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function j(e){function t(n){return n==e?A():";"==e||"}"==n||")"==n||"]"==n?T():A(t)}return t}function W(e,t){return"var"==e?A(B("vardef",t),Te,j(";"),H):"keyword a"==e?A(B("form"),V,W,H):"keyword b"==e?A(B("form"),W,H):"keyword d"==e?L.stream.match(/^\s*$/,!1)?A():A(B("stat"),X,j(";"),H):"debugger"==e?A(j(";")):"{"==e?A(B("}"),R,fe,H,q):";"==e?A():"if"==e?("else"==L.state.lexical.info&&L.state.cc[L.state.cc.length-1]==H&&L.state.cc.pop()(),A(B("form"),V,W,H,Fe)):"function"==e?A(Re):"for"==e?A(B("form"),R,De,W,q,H):"class"==e||u&&"interface"==t?(L.marked="keyword",A(B("form","class"==e?e:t),We,H)):"variable"==e?u&&"declare"==t?(L.marked="keyword",A(W)):u&&("module"==t||"enum"==t||"type"==t)&&L.stream.match(/^\s*\w/,!1)?(L.marked="keyword","enum"==t?A(tt):"type"==t?A(Be,j("operator"),ve,j(";")):A(B("form"),Ae,j("{"),B("}"),fe,H,H)):u&&"namespace"==t?(L.marked="keyword",A(B("form"),U,W,H)):u&&"abstract"==t?(L.marked="keyword",A(W)):A(B("stat"),oe):"switch"==e?A(B("form"),V,j("{"),B("}","switch"),R,fe,H,H,q):"case"==e?A(U,j(":")):"default"==e?A(j(":")):"catch"==e?A(B("form"),I,K,W,H,q):"export"==e?A(B("stat"),Ve,H):"import"==e?A(B("stat"),Xe,H):"async"==e?A(W):"@"==t?A(U,W):T(B("stat"),U,j(";"),H)}function K(e){if("("==e)return A(He,j(")"))}function U(e,t){return G(e,t,!1)}function $(e,t){return G(e,t,!0)}function V(e){return"("!=e?T():A(B(")"),X,j(")"),H)}function G(e,t,n){if(L.state.fatArrowAt==L.stream.start){var r=n?te:ee;if("("==e)return A(I,B(")"),ue(He,")"),H,j("=>"),r,q);if("variable"==e)return T(I,Ae,j("=>"),r,q)}var i=n?Y:Q;return _.hasOwnProperty(e)?A(i):"function"==e?A(Re,i):"class"==e||u&&"interface"==t?(L.marked="keyword",A(B("form"),je,H)):"keyword c"==e||"async"==e?A(n?$:U):"("==e?A(B(")"),X,j(")"),H,i):"operator"==e||"spread"==e?A(n?$:U):"["==e?A(B("]"),et,H,i):"{"==e?de(se,"}",null,i):"quasi"==e?T(J,i):"new"==e?A(ne(n)):A()}function X(e){return e.match(/[;\}\)\],]/)?T():T(U)}function Q(e,t){return","==e?A(X):Y(e,t,!1)}function Y(e,t,n){var r=0==n?Q:Y,i=0==n?U:$;return"=>"==e?A(I,n?te:ee,q):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?A(r):u&&"<"==t&&L.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?A(B(">"),ue(ve,">"),H,r):"?"==t?A(U,j(":"),i):A(i):"quasi"==e?T(J,r):";"!=e?"("==e?de($,")","call",r):"."==e?A(ae,r):"["==e?A(B("]"),X,j("]"),H,r):u&&"as"==t?(L.marked="keyword",A(ve,r)):"regexp"==e?(L.state.lastType=L.marked="operator",L.stream.backUp(L.stream.pos-L.stream.start-1),A(i)):void 0:void 0}function J(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?A(J):A(X,Z)}function Z(e){if("}"==e)return L.marked="string-2",L.state.tokenize=x,A(J)}function ee(e){return w(L.stream,L.state),T("{"==e?W:U)}function te(e){return w(L.stream,L.state),T("{"==e?W:$)}function ne(e){return function(t){return"."==t?A(e?ie:re):"variable"==t&&u?A(Se,e?Y:Q):T(e?$:U)}}function re(e,t){if("target"==t)return L.marked="keyword",A(Q)}function ie(e,t){if("target"==t)return L.marked="keyword",A(Y)}function oe(e){return":"==e?A(H,W):T(Q,j(";"),H)}function ae(e){if("variable"==e)return L.marked="property",A()}function se(e,t){return"async"==e?(L.marked="property",A(se)):"variable"==e||"keyword"==L.style?(L.marked="property","get"==t||"set"==t?A(le):(u&&L.state.fatArrowAt==L.stream.start&&(n=L.stream.match(/^\s*:\s*/,!1))&&(L.state.fatArrowAt=L.stream.pos+n[0].length),A(ce))):"number"==e||"string"==e?(L.marked=s?"property":L.style+" property",A(ce)):"jsonld-keyword"==e?A(ce):u&&P(t)?(L.marked="keyword",A(se)):"["==e?A(U,pe,j("]"),ce):"spread"==e?A($,ce):"*"==t?(L.marked="keyword",A(se)):":"==e?T(ce):void 0;var n}function le(e){return"variable"!=e?T(ce):(L.marked="property",A(Re))}function ce(e){return":"==e?A($):"("==e?T(Re):void 0}function ue(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=L.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),A((function(n,r){return n==t||r==t?T():T(e)}),r)}return i==t||o==t?A():n&&n.indexOf(";")>-1?T(e):A(j(t))}return function(n,i){return n==t||i==t?A():T(e,r)}}function de(e,t,n){for(var r=3;r<arguments.length;r++)L.cc.push(arguments[r]);return A(B(t,n),ue(e,t),H)}function fe(e){return"}"==e?A():T(W,fe)}function pe(e,t){if(u){if(":"==e)return A(ve);if("?"==t)return A(pe)}}function he(e,t){if(u&&(":"==e||"in"==t))return A(ve)}function me(e){if(u&&":"==e)return L.stream.match(/^\s*\w+\s+is\b/,!1)?A(U,ge,ve):A(ve)}function ge(e,t){if("is"==t)return L.marked="keyword",A()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(L.marked="keyword",A("typeof"==t?$:ve)):"variable"==e||"void"==t?(L.marked="type",A(Ce)):"|"==t||"&"==t?A(ve):"string"==e||"number"==e||"atom"==e?A(Ce):"["==e?A(B("]"),ue(ve,"]",","),H,Ce):"{"==e?A(B("}"),be,H,Ce):"("==e?A(ue(_e,")"),ye,Ce):"<"==e?A(ue(ve,">"),ve):"quasi"==e?T(ke,Ce):void 0}function ye(e){if("=>"==e)return A(ve)}function be(e){return e.match(/[\}\)\]]/)?A():","==e||";"==e?A(be):T(xe,be)}function xe(e,t){return"variable"==e||"keyword"==L.style?(L.marked="property",A(xe)):"?"==t||"number"==e||"string"==e?A(xe):":"==e?A(ve):"["==e?A(j("variable"),he,j("]"),xe):"("==e?T(qe,xe):e.match(/[;\}\)\],]/)?void 0:A()}function ke(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?A(ke):A(ve,we)}function we(e){if("}"==e)return L.marked="string-2",L.state.tokenize=x,A(ke)}function _e(e,t){return"variable"==e&&L.stream.match(/^\s*[?:]/,!1)||"?"==t?A(_e):":"==e?A(ve):"spread"==e?A(_e):T(ve)}function Ce(e,t){return"<"==t?A(B(">"),ue(ve,">"),H,Ce):"|"==t||"."==e||"&"==t?A(ve):"["==e?A(ve,j("]"),Ce):"extends"==t||"implements"==t?(L.marked="keyword",A(ve)):"?"==t?A(ve,j(":"),ve):void 0}function Se(e,t){if("<"==t)return A(B(">"),ue(ve,">"),H,Ce)}function Me(){return T(ve,Le)}function Le(e,t){if("="==t)return A(ve)}function Te(e,t){return"enum"==t?(L.marked="keyword",A(tt)):T(Ae,pe,Ne,Pe)}function Ae(e,t){return u&&P(t)?(L.marked="keyword",A(Ae)):"variable"==e?(E(t),A()):"spread"==e?A(Ae):"["==e?de(Ee,"]"):"{"==e?de(Oe,"}"):void 0}function Oe(e,t){return"variable"!=e||L.stream.match(/^\s*:/,!1)?("variable"==e&&(L.marked="property"),"spread"==e?A(Ae):"}"==e?T():"["==e?A(U,j("]"),j(":"),Oe):A(j(":"),Ae,Ne)):(E(t),A(Ne))}function Ee(){return T(Ae,Ne)}function Ne(e,t){if("="==t)return A($)}function Pe(e){if(","==e)return A(Te)}function Fe(e,t){if("keyword b"==e&&"else"==t)return A(B("form","else"),W,H)}function De(e,t){return"await"==t?A(De):"("==e?A(B(")"),ze,H):void 0}function ze(e){return"var"==e?A(Te,Ie):"variable"==e?A(Ie):T(Ie)}function Ie(e,t){return")"==e?A():";"==e?A(Ie):"in"==t||"of"==t?(L.marked="keyword",A(U,Ie)):T(U,Ie)}function Re(e,t){return"*"==t?(L.marked="keyword",A(Re)):"variable"==e?(E(t),A(Re)):"("==e?A(I,B(")"),ue(He,")"),H,me,W,q):u&&"<"==t?A(B(">"),ue(Me,">"),H,Re):void 0}function qe(e,t){return"*"==t?(L.marked="keyword",A(qe)):"variable"==e?(E(t),A(qe)):"("==e?A(I,B(")"),ue(He,")"),H,me,q):u&&"<"==t?A(B(">"),ue(Me,">"),H,qe):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(L.marked="type",A(Be)):"<"==t?A(B(">"),ue(Me,">"),H):void 0}function He(e,t){return"@"==t&&A(U,He),"spread"==e?A(He):u&&P(t)?(L.marked="keyword",A(He)):u&&"this"==e?A(pe,Ne):T(Ae,pe,Ne)}function je(e,t){return"variable"==e?We(e,t):Ke(e,t)}function We(e,t){if("variable"==e)return E(t),A(Ke)}function Ke(e,t){return"<"==t?A(B(">"),ue(Me,">"),H,Ke):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(L.marked="keyword"),A(u?ve:U,Ke)):"{"==e?A(B("}"),Ue,H):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&P(t))&&L.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(L.marked="keyword",A(Ue)):"variable"==e||"keyword"==L.style?(L.marked="property",A($e,Ue)):"number"==e||"string"==e?A($e,Ue):"["==e?A(U,pe,j("]"),$e,Ue):"*"==t?(L.marked="keyword",A(Ue)):u&&"("==e?T(qe,Ue):";"==e||","==e?A(Ue):"}"==e?A():"@"==t?A(U,Ue):void 0}function $e(e,t){if("!"==t)return A($e);if("?"==t)return A($e);if(":"==e)return A(ve,Ne);if("="==t)return A($);var n=L.state.lexical.prev;return T(n&&"interface"==n.info?qe:Re)}function Ve(e,t){return"*"==t?(L.marked="keyword",A(Ze,j(";"))):"default"==t?(L.marked="keyword",A(U,j(";"))):"{"==e?A(ue(Ge,"}"),Ze,j(";")):T(W)}function Ge(e,t){return"as"==t?(L.marked="keyword",A(j("variable"))):"variable"==e?T($,Ge):void 0}function Xe(e){return"string"==e?A():"("==e?T(U):"."==e?T(Q):T(Qe,Ye,Ze)}function Qe(e,t){return"{"==e?de(Qe,"}"):("variable"==e&&E(t),"*"==t&&(L.marked="keyword"),A(Je))}function Ye(e){if(","==e)return A(Qe,Ye)}function Je(e,t){if("as"==t)return L.marked="keyword",A(Qe)}function Ze(e,t){if("from"==t)return L.marked="keyword",A(U)}function et(e){return"]"==e?A():T(ue($,"]"))}function tt(){return T(B("form"),Ae,j("{"),B("}"),ue(nt,"}"),H,H)}function nt(){return T(Ae,Ne)}function rt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,n){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=R.lex=!0,q.lex=!0,H.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new C((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new F(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=b&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",M(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==b||t.tokenize==x)return e.Pass;if(t.tokenize!=v)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==H)l=l.prev;else if(u!=Fe&&u!=q)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==Q||i==Y)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(rt(t,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:it,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(5237))},9160(e,t,n){!function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",(function(r,i){var o=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),a=e.getMode(r,i&&i.base||"javascript");function s(e){var t=e.tagName;e.tagName=null;var n=o.indent(e,"","");return e.tagName=t,n}function l(e,t){return t.context.mode==o?c(e,t,t.context):u(e,t,t.context)}function c(n,i,c){if(2==c.depth)return n.match(/^.*?\*\//)?c.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){o.skipAttribute(c.state);var u=s(c.state),d=c.state.context;if(d&&n.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?u-=r.indentUnit:c.prev.state.lexical&&(u=c.prev.state.lexical.indented)}else 1==c.depth&&(u+=r.indentUnit);return i.context=new t(e.startState(a,u),a,0,i.context),null}if(1==c.depth){if("<"==n.peek())return o.skipAttribute(c.state),i.context=new t(e.startState(o,s(c.state)),o,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return c.depth=2,l(n,i)}var f,p=o.token(n,c.state),h=n.current();return/\btag\b/.test(p)?/>$/.test(h)?c.state.context?c.depth=0:i.context=i.context.prev:/^</.test(h)&&(c.depth=1):!p&&(f=h.indexOf("{"))>-1&&n.backUp(h.length-f),p}function u(n,r,i){if("<"==n.peek()&&!n.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&a.expressionAllowed(n,i.state))return r.context=new t(e.startState(o,a.indent(i.state,"","")),o,0,r.context),a.skipExpression(i.state),null;var s=a.token(n,i.state);if(!s&&null!=i.depth){var l=n.current();"{"==l?i.depth++:"}"==l&&0==--i.depth&&(r.context=r.context.prev)}return s}return{startState:function(){return{context:new t(e.startState(a),a)}},copyState:function(e){return{context:n(e.context)}},token:l,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}}),"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}(n(5237),n(576),n(6792))},7216(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(a[s]=n.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v="    ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function b(e,t,n){return t.f=t.block=n,n(e,t)}function x(e){return!e||!/\S/.test(e.string)}function k(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==_){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=L,t.block=w,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function w(t,r){var i=t.column()===r.indentation,s=x(r.prevLine.stream),p=r.indentedCode,g=r.prevLine.hr,v=!1!==r.list,b=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var k=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,v)){for(r.list=null;k<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=k-r.listStack[r.listStack.length-1])}var w=!(s||g||r.prevLine.header||v&&p||r.prevLine.fencedCodeEnd),_=(!1===r.list||g||s)&&r.indentation<=b&&t.match(l),M=null;if(r.indentationDiff>=4&&(p||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=b&&(M=t.match(d))&&M[1].length<=6)return r.quote=0,r.header=M[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,S(r);if(r.indentation<=b&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),S(r);if(!_&&!r.setext&&i&&r.indentation<=b&&(M=t.match(c))){var L=M[1]?"ol":"ul";return r.indentation=k+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+L]),S(r)}return i&&r.indentation<=b&&(M=t.match(h,!0))?(r.quote=0,r.fencedEndRE=new RegExp(M[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(M[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,S(r)):r.setext||!(w&&v||r.quote||!1!==r.list||r.code||_||m.test(t.string))&&(M=t.lookAhead(1))&&(M=M.match(f))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==M[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,S(r)):_?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,r,N):y(t,r,r.inline)}function _(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=L,n.block=w,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=S(t)),t.localMode=t.localState=null,t.block=w,t.f=L,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?b(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function S(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function M(e,t){if(e.match(p,!0))return S(t)}function L(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,S(i);if(i.taskList)return" "===t.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,S(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),S(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return a.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var p=S(i);return i.code=0,p}return i.formatting=d,S(i)}return i.code=f,S(i)}if(i.code)return S(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var h=S(i),m=a.formatting+"-escape";return h?h+" "+m:m}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var h=S(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,h}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),S(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var h=S(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:L,h}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,n.highlightFormatting&&(i.formatting="link"),(h=S(i))?h+=" ":h="",h+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,n.highlightFormatting&&(i.formatting="link"),(h=S(i))?h+=" ":h="",h+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),b(t,i,_)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);x<3&&t.eat(s);)x++;var w=t.peek()||" ",C=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),M=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),O=null,E=null;if(x%2&&(i.em||!C||"*"!==s&&M&&!g.test(k)?i.em!=s||!M||"*"!==s&&C&&!g.test(w)||(O=!1):O=!0),x>1&&(i.strong||!C||"*"!==s&&M&&!g.test(k)?i.strong!=s||!M||"*"!==s&&C&&!g.test(w)||(E=!1):E=!0),null!=E||null!=O)return n.highlightFormatting&&(i.formatting=null==O?"strong":null==E?"em":"strong em"),!0===O&&(i.em=s),!0===E&&(i.strong=s),p=S(i),!1===O&&(i.em=!1),!1===E&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return S(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=S(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),S(i)}else if(" "===s&&t.match("~~",!0)){if(" "===t.peek())return S(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var N=S(i);return i.emoji=!1,N}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),S(i)}function T(e,t){if(">"===e.next()){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=S(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function A(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=E("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,S(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e){return function(t,r){if(t.next()===e){r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link-string");var i=S(r);return r.linkHref=!1,i}return t.match(O[e]),r.linkHref=!0,S(r)}}function N(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=P,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,S(t)):y(e,t,L)}function P(e,t){if(e.match("]:",!0)){t.f=t.inline=F,n.highlightFormatting&&(t.formatting="link");var r=S(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function F(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=L,a.linkHref+" url")}var D={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:L,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return k(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=_)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==_?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==_&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:k,getType:S,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(5237),n(576),n(2602))},2602(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",
Showing 512.00 KB of 605.62 KB. Use Edit/Download for full content.

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
16.10 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
605.62 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
365.24 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
248.20 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
276.92 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
1.25 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
1.19 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
40.99 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download
8.57 KB lrw-r--r-- 2026-05-21 08:23:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).