(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6f440a42"],{"009c":function(e,t,n){"use strict";e.exports=o;var r=n("d4fd"),i=n("b854");function o(e,t){r.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,i.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}o.prototype=new r,o.prototype.constructor=o},"020c":function(e,t,n){"use strict";t.bool={enforcing:{bitwise:!0,freeze:!0,camelcase:!0,curly:!0,eqeqeq:!0,futurehostile:!0,es3:!0,es5:!0,forin:!0,immed:!0,leanswitch:!0,newcap:!0,noarg:!0,nocomma:!0,noempty:!0,nonbsp:!0,nonew:!0,noreturnawait:!0,regexpu:!0,undef:!0,singleGroups:!1,varstmt:!1,enforceall:!1,trailingcomma:!1},relaxing:{asi:!0,multistr:!0,debug:!0,boss:!0,evil:!0,funcscope:!0,globalstrict:!0,iterator:!0,notypeof:!0,plusplus:!0,proto:!0,scripturl:!0,sub:!0,supernew:!0,laxbreak:!0,laxcomma:!0,validthis:!0,withstmt:!0,moz:!0,noyield:!0,eqnull:!0,lastsemic:!0,loopfunc:!0,expr:!0,esnext:!0,elision:!0},environments:{mootools:!0,couch:!0,jasmine:!0,jquery:!0,node:!0,qunit:!0,rhino:!0,shelljs:!0,prototypejs:!0,yui:!0,mocha:!0,module:!0,wsh:!0,worker:!0,nonstandard:!0,browser:!0,browserify:!0,devel:!0,dojo:!0,typed:!0,phantom:!0},obsolete:{onecase:!0,regexp:!0,regexdash:!0}},t.val={maxlen:!1,indent:!1,maxerr:!1,predef:!1,globals:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,shadow:!1,strict:!0,unused:!0,latedef:!1,ignore:!1,ignoreDelimiters:!1,esversion:5},t.unstable={},t.inverted={bitwise:!0,forin:!0,newcap:!0,plusplus:!0,regexp:!0,undef:!0,eqeqeq:!0,strict:!0},t.validNames=Object.keys(t.val).concat(Object.keys(t.bool.relaxing)).concat(Object.keys(t.bool.enforcing)).concat(Object.keys(t.bool.obsolete)).concat(Object.keys(t.bool.environments)).concat(["unstable"]),t.unstableNames=Object.keys(t.unstable),t.renamed={eqeq:"eqeqeq",windows:"wsh",sloppy:"strict"},t.removed={nomen:!0,onevar:!0,passfail:!0,white:!0,gcl:!0,smarttabs:!0,trailing:!0},t.noenforceall={varstmt:!0,strict:!0,regexpu:!0}},"05dd":function(e,t,n){(function(e){e(n("56b3"),n("a2c1"))})((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||n.whenClosing)&&(a["'/'"]=function(e){return o(e)}),("object"!=typeof n||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"),u=0;uc.ch&&(m=m.slice(0,m.length-f.end+c.ch));var y=m.toLowerCase();if(!m||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&p.close||f.string.indexOf("/")==c.ch-f.start-1||v&&a(v,y)>-1||s(r,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(d)||[],m,c,!0))return e.Pass;var w="object"==typeof l&&l.emptyTags;if(w&&a(w,m)>-1)o[u]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var x=b&&a(b,y)>-1;o[u]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var k="object"==typeof l&&l.dontIndentOnAutoClose;for(u=i.length-1;u>=0;u--){var C=o[u];r.replaceRange(C.text,i[u].head,i[u].anchor,"+insert");var E=r.listSelections().slice(0);E[u]={head:C.newPos,anchor:C.newPos},r.setSelections(E),!k&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.newPos.line+1,null,!0))}}function i(t,n){for(var r=t.listSelections(),i=[],o=n?"/":""!=t.getLine(c.line).charAt(f.end)&&(p+=">"),i[u]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(u=0;u=0;u--){if(n[u]!=r)break;++l}i=s.to;for(u=1;ut.cursorCoords(n,"window").top&&((c=r).style.opacity=.4)})))};a(t,m(t),u,h,(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),f(t,r(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(n),h(i,n))})),o&&u&&(f(t,l,u),d(t,n))}else s(t,m(t),"Search for:",u,(function(e){e&&!l.query&&t.operation((function(){f(t,l,e),l.posFrom=l.posTo=t.getCursor(),d(t,n)}))}))}function d(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)),s.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 p(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){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function g(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function v(e){return''+e.phrase("With:")+' '}function b(e){return''+e.phrase("Replace?")+" "}function y(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 w(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=''+(t?e.phrase("Replace all:"):e.phrase("Replace:"))+"";s(e,i+g(e),i,n,(function(n){n&&(n=c(n),s(e,v(e),e.phrase("Replace with:"),"",(function(r){if(r=u(r),t)y(e,n,r);else{p(e);var i=o(e,n,e.getCursor("from")),a=function(){var t,u=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||u&&i.from().line==u.line&&i.from().ch==u.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(){y(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.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=w,e.commands.replaceAll=function(e){w(e,!0)}}))},"0dd0":function(e,t,n){},"185a":function(e,t,n){"use strict";var r,i=n("2ef0"),o=n("faa1"),a=n("a967"),s=n("4d6a").state,l=n("c0d3"),u=l.asciiIdentifierStartTable,c=l.asciiIdentifierPartTable,f=n("a2a2"),h=n("4e50"),d={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},p={Block:1,Template:2};function m(e){return/^[0-9a-fA-F]+$/.test(e)}function g(e){return 1===e.length&&m(e)}function v(){var e=[];return{push:function(t){e.push(t)},check:function(){for(var t=0;t0&&this.context[this.context.length-1].type===e},pushContext:function(e){this.context.push({type:e})},popContext:function(){return this.context.pop()},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=s.lines,this._lines},setLines:function(e){this._lines=e,s.lines=this._lines},peek:function(e){return this.input.charAt(e||0)},skip:function(e){e=e||1,this.char+=e,this.input=this.input.slice(e)},on:function(e,t){e.split(" ").forEach(function(e){this.emitter.on(e,t)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(e,t,n,r){n.push(function(){r()&&this.trigger(e,t)}.bind(this))},scanPunctuator:function(){var e,t,n,r=this.peek();switch(r){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if("."===this.peek(1)&&"."===this.peek(2))return{type:d.Punctuator,value:"..."};case"(":case")":case";":case",":case"[":case"]":case":":case"~":case"?":return{type:d.Punctuator,value:r};case"{":return this.pushContext(p.Block),{type:d.Punctuator,value:r};case"}":return this.inContext(p.Block)&&this.popContext(),{type:d.Punctuator,value:r};case"#":return{type:d.Punctuator,value:r};case"":return null}return e=this.peek(1),t=this.peek(2),n=this.peek(3),">"===r&&">"===e&&">"===t&&"="===n?{type:d.Punctuator,value:">>>="}:"="===r&&"="===e&&"="===t?{type:d.Punctuator,value:"==="}:"!"===r&&"="===e&&"="===t?{type:d.Punctuator,value:"!=="}:">"===r&&">"===e&&">"===t?{type:d.Punctuator,value:">>>"}:"<"===r&&"<"===e&&"="===t?{type:d.Punctuator,value:"<<="}:">"===r&&">"===e&&"="===t?{type:d.Punctuator,value:">>="}:"="===r&&">"===e?{type:d.Punctuator,value:r+e}:r===e&&"+-<>&|*".indexOf(r)>=0?"*"===r&&"="===t?{type:d.Punctuator,value:r+e+t}:{type:d.Punctuator,value:r+e}:"<>=!+-*%&|^/".indexOf(r)>=0?"="===e?{type:d.Punctuator,value:r+e}:{type:d.Punctuator,value:r}:null},scanComments:function(e){var t=this.peek(),n=this.peek(1),r=this.input.substr(2),i=this.line,o=this.char,s=this;function l(e,t,n){var r=["jshint","jshint.unstable","jslint","members","member","globals","global","exported"],i=!1,o=e+t,l="plain";return n=n||{},n.isMultiline&&(o+="*/"),t=t.replace(/\n/g," "),"/*"===e&&a.fallsThrough.test(t)&&(i=!0,l="falls through"),r.forEach((function(n){if(!i&&("//"!==e||"jshint"===n||"jshint.unstable"===n)){" "===t.charAt(n.length)&&t.substr(0,n.length)===n&&(i=!0,e+=n,t=t.substr(n.length)),i||" "!==t.charAt(0)||" "!==t.charAt(n.length+1)||t.substr(1,n.length)!==n||(i=!0,e=e+" "+n,t=t.substr(n.length+1));var r=t.indexOf(n);if(!i&&r>=0&&" "===t.charAt(r+n.length)){var o=0===t.substr(0,r).trim().length;o&&(i=!0,t=t.substr(n.length+r))}if(i)switch(n){case"member":l="members";break;case"global":l="globals";break;default:var a=t.split(":").map((function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}));if(2===a.length)switch(a[0]){case"ignore":switch(a[1]){case"start":s.ignoringLinterErrors=!0,i=!1;break;case"end":s.ignoringLinterErrors=!1,i=!1;break}}l=n}}})),{type:d.Comment,commentType:l,value:o,body:t,isSpecial:i,isMalformed:n.isMalformed||!1}}if("*"===t&&"/"===n)return this.trigger("error",{code:"E018",line:i,character:o}),this.skip(2),null;if("/"!==t||"*"!==n&&"/"!==n)return null;if("/"===n)return this.skip(this.input.length),l("//",r);var u="";if("*"===n){this.inComment=!0,this.skip(2);while("*"!==this.peek()||"/"!==this.peek(1))if(""===this.peek()){if(u+="\n",!this.nextLine(e))return this.trigger("error",{code:"E017",line:i,character:o}),this.inComment=!1,l("/*",u,{isMultiline:!0,isMalformed:!0})}else u+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,l("/*",u,{isMultiline:!0})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),t=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof","true","false","null","async","await"];return e&&t.indexOf(e[0])>=0?{type:d.Keyword,value:e[0]}:null},scanIdentifier:function(e){var t,i,o="",a=0;function l(e){return f.indexOf(e)>-1}function p(e){return l(e)||h.indexOf(e)>-1}var g=function(){if(a+=1,"u"!==this.peek(a))return null;var e,t=this.peek(a+1)+this.peek(a+2)+this.peek(a+3)+this.peek(a+4);return m(t)?(e=parseInt(t,16),c[e]||p(e)?(a+=5,"\\u"+t):null):null}.bind(this),v=function(){var e=this.peek(a),t=e.charCodeAt(0);return 92===t?g():t<128?u[t]?(a+=1,e):null:l(t)?(a+=1,e):null}.bind(this),b=function(){var e=this.peek(a),t=e.charCodeAt(0);return 92===t?g():t<128?c[t]?(a+=1,e):null:p(t)?(a+=1,e):null}.bind(this);function y(e){return e.replace(/\\u([0-9a-fA-F]{4})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))}if(t=v(),null===t)return null;for(o=t;;){if(t=b(),null===t)break;o+=t}return i=y(o),s.inES6(!0)||(r=n("2eb6"),r.test(i)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["unicode 8","6"]},e,(function(){return!0}))),{type:d.Identifier,value:i,text:o,tokenLength:o.length}},scanNumericLiteral:function(e){var t=0,n="",r=this.input.length,i=this.peek(t),o=u,a=10,l=!1;function u(e){return/^[0-9]$/.test(e)}function c(e){return/^[0-7]$/.test(e)}function f(e){return/^[01]$/.test(e)}function h(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"}if("."!==i&&!u(i))return null;if("."!==i){n=this.peek(t),t+=1,i=this.peek(t),"0"===n&&("x"!==i&&"X"!==i||(o=g,a=16,t+=1,n+=i),"o"!==i&&"O"!==i||(o=c,a=8,s.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["Octal integer literal","6"]},e,(function(){return!0})),t+=1,n+=i),"b"!==i&&"B"!==i||(o=f,a=2,s.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["Binary integer literal","6"]},e,(function(){return!0})),t+=1,n+=i),c(i)&&(o=c,a=8,l=!0,t+=1,n+=i),!c(i)&&u(i)&&(t+=1,n+=i));while(t=0&&i<=7&&s.isStrict()}));break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":r="\\"+r,this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,(function(){return s.isStrict()}));break;case"u":var o=this.input.substr(1,4),a=parseInt(o,16);m(o)||this.trigger("warning",{code:"W052",line:this.line,character:this.char,data:["u"+o]}),r=String.fromCharCode(a),n=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\v"]},e,(function(){return s.jsonMode})),r="\v";break;case"x":var l=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\x-"]},e,(function(){return s.jsonMode})),r=String.fromCharCode(l),n=3;break;case"\\":r="\\\\";break;case'"':r='\\"';break;case"/":break;case"":t=!0,r="";break}return{char:r,jump:n,allowNewLine:t}},scanTemplateLiteral:function(e){var t,n,r="",i=this.line,o=this.char,a=this.templateStarts.length;if("`"===this.peek())s.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["template literal syntax","6"]},e,(function(){return!0})),t=d.TemplateHead,this.templateStarts.push({line:this.line,char:this.char}),a=this.templateStarts.length,this.skip(1),this.pushContext(p.Template);else{if(!this.inContext(p.Template)||"}"!==this.peek())return null;t=d.TemplateMiddle}while("`"!==this.peek()){while(""===(n=this.peek()))if(r+="\n",!this.nextLine(e)){var l=this.templateStarts.pop();return this.trigger("error",{code:"E052",line:l.line,character:l.char}),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!0,depth:a,context:this.popContext()}}if("$"===n&&"{"===this.peek(1))return r+="${",this.skip(2),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!1,depth:a,context:this.currentContext()};if("\\"===n){var u=this.scanEscapeSequence(e);r+=u.char,this.skip(u.jump)}else"`"!==n&&(r+=n,this.skip(1))}return t=t===d.TemplateHead?d.NoSubstTemplate:d.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!1,depth:a,context:this.popContext()}},scanStringLiteral:function(e){var t=this.peek();if('"'!==t&&"'"!==t)return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},e,(function(){return s.jsonMode&&'"'!==t}));var n="",r=this.line,i=this.char,o=!1;this.skip();while(this.peek()!==t)if(""===this.peek()){if(o?(o=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},e,(function(){return!s.option.multistr})),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},e,(function(){return s.jsonMode&&s.option.multistr}))):this.trigger("warning",{code:"W112",line:this.line,character:this.char}),!this.nextLine(e))return{type:d.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!0,quote:t}}else{o=!1;var a=this.peek(),l=1;if(a<" "&&this.triggerAsync("warning",{code:"W113",line:this.line,character:this.char,data:[""]},e,(function(){return!0})),"\\"===a){var u=this.scanEscapeSequence(e);a=u.char,l=u.jump,o=u.allowNewLine}""!==a&&(n+=a,this.skip(l))}return this.skip(),{type:d.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!1,quote:t}},scanRegExp:function(e){var t,n,r,i=0,o=this.input.length,l=this.peek(),u=l,c="",f=[],h="",p="",g=!1,v=!1,b=!1,y=!1,w=!1,x="",k=function(){return h.indexOf("u")>-1},C=0,E=function(){var t,n;if(i+=1,l=this.peek(i),a.nonzeroDigit.test(l)){n=l,t=this.peek(i+1);while(a.nonzeroDigit.test(t)||"0"===t)i+=1,l=t,n+=l,c+=l,u+=l,t=this.peek(i+1);return f.push(Number(n)),n}if(x+=l,"u"===l&&"{"===this.peek(i+1)){var r=i+2;n="u{",t=this.peek(r);while(m(t))n+=t,r+=1,t=this.peek(r);if("}"!==t)this.triggerAsync("error",{code:"E016",line:this.line,character:this.char,data:["Invalid Unicode escape sequence"]},e,k);else if(n.length>2)return n+="}",c+=n,u+=n,i=r+1,n}return l<" "&&(g=!0,this.triggerAsync("warning",{code:"W048",line:this.line,character:this.char},e,(function(){return!0}))),"<"===l?(g=!0,this.triggerAsync("warning",{code:"W049",line:this.line,character:this.char,data:[l]},e,(function(){return!0}))):"0"===l&&a.decimalDigit.test(this.peek(i+1))&&this.triggerAsync("error",{code:"E016",line:this.line,character:this.char,data:["Invalid decimal escape sequence"]},e,k),i+=1,c+=l,u+=l,l}.bind(this),S=function(){var e,t=i,n="",r="";e=this.peek(t+1);while(a.decimalDigit.test(e))t+=1,n+=e,e=this.peek(t+1);if(!n)return!1;if("}"===e)return!0;if(","!==e)return!1;t+=1,e=this.peek(t+1);while(a.decimalDigit.test(e))t+=1,r+=e,e=this.peek(t+1);return"}"===e&&(!r||Number(n)<=Number(r))}.bind(this),_=function(e){var t="￿";return e.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,n,r){var i,o=parseInt(n||r,16);return o>1114111?(g=!0,void this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[l]})):(i=String.fromCharCode(o),a.regexpSyntaxChars.test(i)?e:o<=65535?String.fromCharCode(o):t)}.bind(this)).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t)}.bind(this);if(!this.prereg||"/"!==l)return null;i+=1,n=!1;while(it)return!0}));return!!i||!n.split("").every((function(e){return"u"===e||"/"===e||"0"===e||r.regexpControlEscapes.test(e)||r.regexpCharClasses.test(e)||r.regexpSyntaxChars.test(e)}))}(f,C,x,a);A?r="Invalid escape":w&&(r="Invalid quantifier"),c=_(c)}else"s"===l?(s.inES9()||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["DotAll RegExp flag","9"]},e,(function(){return!0})),u.indexOf("s")>-1&&(r="Duplicate RegExp flag")):p+=l;h.indexOf(l)>-1&&(r="Duplicate RegExp flag"),h+=l,u+=l,h+=l,i+=1}-1===h.indexOf("u")&&this.triggerAsync("warning",{code:"W147",line:this.line,character:this.char},e,(function(){return s.option.regexpu}));try{new RegExp(c,p)}catch(T){r=T.message}return r?(g=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[r]})):h.indexOf("s")>-1&&!a.regexpDot.test(c)&&this.trigger("warning",{code:"W148",line:this.line,character:this.char}),{type:d.RegExp,value:u,isMalformed:g}},scanNonBreakingSpaces:function(){return s.option.nonbsp?this.input.search(/(\u00A0)/):-1},next:function(e){this.from=this.char;while(a.whitespace.test(this.peek()))this.from+=1,this.skip();var t=this.scanComments(e)||this.scanStringLiteral(e)||this.scanTemplateLiteral(e);return t||(t=this.scanRegExp(e)||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier(e)||this.scanNumericLiteral(e),t?(this.skip(t.tokenLength||t.value.length),t):null)},nextLine:function(e){var t;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var n=this.input.trim(),r=function(){return i.some(arguments,(function(e){return 0===n.indexOf(e)}))},o=function(){return i.some(arguments,(function(e){return-1!==n.indexOf(e,n.length-e.length)}))};if(!0===this.ignoringLinterErrors&&(r("/*","//")||this.inComment&&o("*/")||(this.input="")),t=this.scanNonBreakingSpaces(),t>=0&&this.triggerAsync("warning",{code:"W125",line:this.line,character:t+1},e,(function(){return!0})),this.input=this.input.replace(/\t/g,s.tab),!this.ignoringLinterErrors&&s.option.maxlen&&s.option.maxlen '+e.phrase("(Use line:column or scroll% syntax)")+""}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-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"}))},2162:function(e,t,n){"use strict";function r(){this._listeners=Object.create(null)}e.exports=r,r.prototype={constructor:r,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){if("string"===typeof e&&(e={type:e}),"undefined"!==typeof e.target&&(e.target=this),"undefined"===typeof e.type)throw new Error("Event object missing 'type' property.");if(this._listeners[e.type])for(var t=this._listeners[e.type].concat(),n=0,r=t.length;n=t.options.minChars&&a(e,i,!1,t.options.style)}}else{var o=!0===t.options.showToken?/[\w$]/:t.options.showToken,l=e.getCursor(),c=e.getLine(l.line),f=l.ch,h=f;while(f&&o.test(c.charAt(f-1)))--f;while(h0){var i={line:t.line,ch:t.ch-1},o=e.getRange(i,t);if(null===o.match(/\W/))return!1}if(n.ch=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(),u=r.getTokenAt(l);u.end>l.ch&&(u.end=l.ch,u.string=u.string.slice(0,l.ch-u.start));var c=e.innerMode(r.getMode(),u.state);if(c.mode.xmlCurrentTag){var f,h,d=[],p=!1,m=/\btag\b/.test(u.type)&&!/>$/.test(u.string),g=m&&/^\w/.test(u.string);if(g){var v=r.getLine(l.line).slice(Math.max(0,u.start-2),u.start),b=/<\/$/.test(v)?"close":/<$/.test(v)?"open":null;b&&(h=u.start-("close"==b?2:1))}else m&&"<"==u.string?b="open":m&&"")}else{x=y&&o[y.name];var S=x&&x.attrs,_=o["!attrs"];if(!S&&!_)return;if(S){if(_){var A={};for(var T in _)_.hasOwnProperty(T)&&(A[T]=_[T]);for(var T in S)S.hasOwnProperty(T)&&(A[T]=S[T]);S=A}}else S=_;if("string"==u.type||"="==u.string){v=r.getRange(t(l.line,Math.max(0,l.ch-60)),t(l.line,"string"==u.type?u.start:u.end));var L,M=v.match(/([^\s\u00a0=<>\"\']+)=$/);if(!M||!S.hasOwnProperty(M[1])||!(L=S[M[1]]))return;if("function"==typeof L&&(L=L.call(this,r)),"string"==u.type){f=u.string;var O=0;/['"]/.test(u.string.charAt(0))&&(a=u.string.charAt(0),f=u.string.slice(1),O++);var F=u.string.length;if(/['"]/.test(u.string.charAt(F-1))&&(a=u.string.charAt(F-1),f=u.string.substr(O,F-2)),O){var D=r.getLine(l.line);D.length>u.end&&D.charAt(u.end)==a&&u.end++}p=!0}for(C=0;C * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o,a="4.17.15",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",d=1,p=2,m=4,g=1,v=2,b=1,y=2,w=4,x=8,k=16,C=32,E=64,S=128,_=256,A=512,T=30,L="...",M=800,O=16,F=1,D=2,W=3,N=1/0,R=9007199254740991,B=17976931348623157e292,P=NaN,I=4294967295,z=I-1,j=I>>>1,$=[["ary",S],["bind",b],["bindKey",y],["curry",x],["curryRight",k],["flip",A],["partial",C],["partialRight",E],["rearg",_]],H="[object Arguments]",U="[object Array]",q="[object AsyncFunction]",G="[object Boolean]",V="[object Date]",Y="[object DOMException]",K="[object Error]",X="[object Function]",Z="[object GeneratorFunction]",Q="[object Map]",J="[object Number]",ee="[object Null]",te="[object Object]",ne="[object Promise]",re="[object Proxy]",ie="[object RegExp]",oe="[object Set]",ae="[object String]",se="[object Symbol]",le="[object Undefined]",ue="[object WeakMap]",ce="[object WeakSet]",fe="[object ArrayBuffer]",he="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",me="[object Int8Array]",ge="[object Int16Array]",ve="[object Int32Array]",be="[object Uint8Array]",ye="[object Uint8ClampedArray]",we="[object Uint16Array]",xe="[object Uint32Array]",ke=/\b__p \+= '';/g,Ce=/\b(__p \+=) '' \+/g,Ee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Se=/&(?:amp|lt|gt|quot|#39);/g,_e=/[&<>"']/g,Ae=RegExp(Se.source),Te=RegExp(_e.source),Le=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Oe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,De=/^\w*$/,We=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Re=RegExp(Ne.source),Be=/^\s+|\s+$/g,Pe=/^\s+/,Ie=/\s+$/,ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,je=/\{\n\/\* \[wrapped with (.+)\] \*/,$e=/,? & /,He=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ue=/\\(\\)?/g,qe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ge=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,Ye=/^0b[01]+$/i,Ke=/^\[object .+?Constructor\]$/,Xe=/^0o[0-7]+$/i,Ze=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=/($^)/,et=/['\n\r\u2028\u2029\\]/g,tt="\\ud800-\\udfff",nt="\\u0300-\\u036f",rt="\\ufe20-\\ufe2f",it="\\u20d0-\\u20ff",ot=nt+rt+it,at="\\u2700-\\u27bf",st="a-z\\xdf-\\xf6\\xf8-\\xff",lt="\\xac\\xb1\\xd7\\xf7",ut="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ct="\\u2000-\\u206f",ft=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ht="A-Z\\xc0-\\xd6\\xd8-\\xde",dt="\\ufe0e\\ufe0f",pt=lt+ut+ct+ft,mt="['’]",gt="["+tt+"]",vt="["+pt+"]",bt="["+ot+"]",yt="\\d+",wt="["+at+"]",xt="["+st+"]",kt="[^"+tt+pt+yt+at+st+ht+"]",Ct="\\ud83c[\\udffb-\\udfff]",Et="(?:"+bt+"|"+Ct+")",St="[^"+tt+"]",_t="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",Tt="["+ht+"]",Lt="\\u200d",Mt="(?:"+xt+"|"+kt+")",Ot="(?:"+Tt+"|"+kt+")",Ft="(?:"+mt+"(?:d|ll|m|re|s|t|ve))?",Dt="(?:"+mt+"(?:D|LL|M|RE|S|T|VE))?",Wt=Et+"?",Nt="["+dt+"]?",Rt="(?:"+Lt+"(?:"+[St,_t,At].join("|")+")"+Nt+Wt+")*",Bt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",It=Nt+Wt+Rt,zt="(?:"+[wt,_t,At].join("|")+")"+It,jt="(?:"+[St+bt+"?",bt,_t,At,gt].join("|")+")",$t=RegExp(mt,"g"),Ht=RegExp(bt,"g"),Ut=RegExp(Ct+"(?="+Ct+")|"+jt+It,"g"),qt=RegExp([Tt+"?"+xt+"+"+Ft+"(?="+[vt,Tt,"$"].join("|")+")",Ot+"+"+Dt+"(?="+[vt,Tt+Mt,"$"].join("|")+")",Tt+"?"+Mt+"+"+Ft,Tt+"+"+Dt,Pt,Bt,yt,zt].join("|"),"g"),Gt=RegExp("["+Lt+tt+ot+dt+"]"),Vt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kt=-1,Xt={};Xt[de]=Xt[pe]=Xt[me]=Xt[ge]=Xt[ve]=Xt[be]=Xt[ye]=Xt[we]=Xt[xe]=!0,Xt[H]=Xt[U]=Xt[fe]=Xt[G]=Xt[he]=Xt[V]=Xt[K]=Xt[X]=Xt[Q]=Xt[J]=Xt[te]=Xt[ie]=Xt[oe]=Xt[ae]=Xt[ue]=!1;var Zt={};Zt[H]=Zt[U]=Zt[fe]=Zt[he]=Zt[G]=Zt[V]=Zt[de]=Zt[pe]=Zt[me]=Zt[ge]=Zt[ve]=Zt[Q]=Zt[J]=Zt[te]=Zt[ie]=Zt[oe]=Zt[ae]=Zt[se]=Zt[be]=Zt[ye]=Zt[we]=Zt[xe]=!0,Zt[K]=Zt[X]=Zt[ue]=!1;var Qt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Jt={"&":"&","<":"<",">":">",'"':""","'":"'"},en={"&":"&","<":"<",">":">",""":'"',"'":"'"},tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof e&&e&&e.Object===Object&&e,an="object"==typeof self&&self&&self.Object===Object&&self,sn=on||an||Function("return this")(),ln=t&&!t.nodeType&&t,un=ln&&"object"==typeof r&&r&&!r.nodeType&&r,cn=un&&un.exports===ln,fn=cn&&on.process,hn=function(){try{var e=un&&un.require&&un.require("util").types;return e||fn&&fn.binding&&fn.binding("util")}catch(t){}}(),dn=hn&&hn.isArrayBuffer,pn=hn&&hn.isDate,mn=hn&&hn.isMap,gn=hn&&hn.isRegExp,vn=hn&&hn.isSet,bn=hn&&hn.isTypedArray;function yn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function wn(e,t,n,r){var i=-1,o=null==e?0:e.length;while(++i-1}function _n(e,t,n){var r=-1,i=null==e?0:e.length;while(++r-1);return n}function Qn(e,t){var n=e.length;while(n--&&Bn(t,e[n],0)>-1);return n}function Jn(e,t){var n=e.length,r=0;while(n--)e[n]===t&&++r;return r}var er=$n(Qt),tr=$n(Jt);function nr(e){return"\\"+tn[e]}function rr(e,t){return null==e?o:e[t]}function ir(e){return Gt.test(e)}function or(e){return Vt.test(e)}function ar(e){var t,n=[];while(!(t=e.next()).done)n.push(t.value);return n}function sr(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function lr(e,t){return function(n){return e(t(n))}}function ur(e,t){var n=-1,r=e.length,i=0,o=[];while(++n-1}function zr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function jr(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t=t?e:t)),e}function mi(e,t,n,r,i,a){var s,l=t&d,u=t&p,c=t&m;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!kc(e))return e;var f=ac(e);if(f){if(s=Ja(e),!l)return na(e,s)}else{var h=Ka(e),g=h==X||h==Z;if(fc(e))return Go(e,l);if(h==te||h==H||g&&!i){if(s=u||g?{}:es(e),!l)return u?oa(e,fi(s,e)):ia(e,ci(s,e))}else{if(!Zt[h])return i?e:{};s=ts(e,h,l)}}a||(a=new Xr);var v=a.get(e);if(v)return v;a.set(e,s),Nc(e)?e.forEach((function(r){s.add(mi(r,t,n,r,e,a))})):Ec(e)&&e.forEach((function(r,i){s.set(i,mi(r,t,n,i,e,a))}));var b=c?u?Pa:Ba:u?kf:xf,y=f?o:b(e);return xn(y||e,(function(r,i){y&&(i=r,r=e[i]),si(s,i,mi(r,t,n,i,e,a))})),s}function gi(e){var t=xf(e);return function(n){return vi(n,e,t)}}function vi(e,t,n){var r=n.length;if(null==e)return!r;e=nt(e);while(r--){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function bi(e,t,n){if("function"!=typeof e)throw new ot(u);return Cs((function(){e.apply(o,n)}),t)}function yi(e,t,n,r){var i=-1,o=Sn,a=!0,l=e.length,u=[],c=t.length;if(!l)return u;n&&(t=An(t,Yn(n))),r?(o=_n,a=!1):t.length>=s&&(o=Xn,a=!1,t=new Vr(t));e:while(++ii?0:i+n),r=r===o||r>i?i:Gc(r),r<0&&(r+=i),r=n>r?0:Vc(r);while(n0&&n(s)?t>1?_i(s,t-1,n,r,i):Tn(i,s):r||(i[i.length]=s)}return i}var Ai=ua(),Ti=ua(!0);function Li(e,t){return e&&Ai(e,t,xf)}function Mi(e,t){return e&&Ti(e,t,xf)}function Oi(e,t){return En(t,(function(t){return yc(e[t])}))}function Fi(e,t){t=$o(t,e);var n=0,r=t.length;while(null!=e&&nt}function Ri(e,t){return null!=e&&ft.call(e,t)}function Bi(e,t){return null!=e&&t in nt(e)}function Pi(e,t,n){return e>=jt(t,n)&&e=120&&h.length>=120)?new Vr(l&&h):o}h=e[0];var d=-1,p=u[0];e:while(++d-1)s!==e&&St.call(s,l,1),St.call(e,l,1)}return e}function mo(e,t){var n=e?t.length:0,r=n-1;while(n--){var i=t[n];if(n==r||i!==o){var o=i;is(i)?St.call(e,i,1):Wo(e,i)}}return e}function go(e,t){return e+Wt(Gt()*(t-e+1))}function vo(e,t,r,i){var o=-1,a=zt(Dt((t-e)/(r||1)),0),s=n(a);while(a--)s[i?a:++o]=e,e+=r;return s}function bo(e,t){var n="";if(!e||t<1||t>R)return n;do{t%2&&(n+=e),t=Wt(t/2),t&&(e+=e)}while(t);return n}function yo(e,t){return Es(bs(e,t,Lh),e+"")}function wo(e){return ri(zf(e))}function xo(e,t){var n=zf(e);return As(n,pi(t,0,n.length))}function ko(e,t,n,r){if(!kc(e))return e;t=$o(t,e);var i=-1,a=t.length,s=a-1,l=e;while(null!=l&&++io?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;var a=n(o);while(++i>>1,a=e[o];null!==a&&!Bc(a)&&(n?a<=t:a=s){var c=t?null:Aa(e);if(c)return cr(c);a=!1,i=Xn,u=new Vr}else u=t?[]:l;e:while(++r=r?e:_o(e,t,n)}var qo=Mt||function(e){return sn.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=xt?xt(n):new e.constructor(n);return e.copy(r),r}function Vo(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Yo(e,t){var n=t?Vo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ko(e){var t=new e.constructor(e.source,Ge.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return vr?nt(vr.call(e)):{}}function Zo(e,t){var n=t?Vo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Qo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e===e,a=Bc(e),s=t!==o,l=null===t,u=t===t,c=Bc(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!c&&e=s)return l;var u=n[r];return l*("desc"==u?-1:1)}}return e.index-t.index}function ea(e,t,r,i){var o=-1,a=e.length,s=r.length,l=-1,u=t.length,c=zt(a-s,0),f=n(u+c),h=!i;while(++l1?n[i-1]:o,s=i>2?n[2]:o;a=e.length>3&&"function"==typeof a?(i--,a):o,s&&os(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=nt(t);while(++r-1?i[a?t[s]:s]:o}}function ga(e){return Ra((function(t){var n=t.length,r=n,i=Er.prototype.thru;e&&t.reverse();while(r--){var a=t[r];if("function"!=typeof a)throw new ot(u);if(i&&!s&&"wrapper"==za(a))var s=new Er([],!0)}r=s?r:n;while(++r1&&b.reverse(),h&&cl))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var f=-1,h=!0,d=n&v?new Vr:o;a.set(e,t),a.set(t,e);while(++f1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ze,"{\n/* [wrapped with "+t+"] */\n")}function rs(e){return ac(e)||oc(e)||!!(_t&&e&&e[_t])}function is(e,t){var n=typeof e;return t=null==t?R:t,!!t&&("number"==n||"symbol"!=n&&Ze.test(e))&&e>-1&&e%1==0&&e0){if(++t>=M)return arguments[0]}else t=0;return e.apply(o,arguments)}}function As(e,t){var n=-1,r=e.length,i=r-1;t=t===o?r:t;while(++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Wl(e,n)}));function Hl(e){var t=wr(e);return t.__chain__=!0,t}function Ul(e,t){return t(e),e}function ql(e,t){return t(e)}var Gl=Ra((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return di(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Sr&&is(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:ql,args:[i],thisArg:o}),new Er(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));function Vl(){return Hl(this)}function Yl(){return new Er(this.value(),this.__chain__)}function Kl(){this.__values__===o&&(this.__values__=Uc(this.value()));var e=this.__index__>=this.__values__.length,t=e?o:this.__values__[this.__index__++];return{done:e,value:t}}function Xl(){return this}function Zl(e){var t,n=this;while(n instanceof Cr){var r=Fs(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function Ql(){var e=this.__wrapped__;if(e instanceof Sr){var t=e;return this.__actions__.length&&(t=new Sr(this)),t=t.reverse(),t.__actions__.push({func:ql,args:[hl],thisArg:o}),new Er(t,this.__chain__)}return this.thru(hl)}function Jl(){return Bo(this.__wrapped__,this.__actions__)}var eu=aa((function(e,t,n){ft.call(e,n)?++e[n]:hi(e,n,1)}));function tu(e,t,n){var r=ac(e)?Cn:ki;return n&&os(e,t,n)&&(t=o),r(e,$a(t,3))}function nu(e,t){var n=ac(e)?En:Si;return n(e,$a(t,3))}var ru=ma(Us),iu=ma(qs);function ou(e,t){return _i(pu(e,t),1)}function au(e,t){return _i(pu(e,t),N)}function su(e,t,n){return n=n===o?1:Gc(n),_i(pu(e,t),n)}function lu(e,t){var n=ac(e)?xn:wi;return n(e,$a(t,3))}function uu(e,t){var n=ac(e)?kn:xi;return n(e,$a(t,3))}var cu=aa((function(e,t,n){ft.call(e,n)?e[n].push(t):hi(e,n,[t])}));function fu(e,t,n,r){e=lc(e)?e:zf(e),n=n&&!r?Gc(n):0;var i=e.length;return n<0&&(n=zt(i+n,0)),Rc(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Bn(e,t,n)>-1}var hu=yo((function(e,t,r){var i=-1,o="function"==typeof t,a=lc(e)?n(e.length):[];return wi(e,(function(e){a[++i]=o?yn(t,e,r):ji(e,t,r)})),a})),du=aa((function(e,t,n){hi(e,n,t)}));function pu(e,t){var n=ac(e)?An:ro;return n(e,$a(t,3))}function mu(e,t,n,r){return null==e?[]:(ac(t)||(t=null==t?[]:[t]),n=r?o:n,ac(n)||(n=null==n?[]:[n]),uo(e,t,n))}var gu=aa((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function vu(e,t,n){var r=ac(e)?Ln:Hn,i=arguments.length<3;return r(e,$a(t,4),n,i,wi)}function bu(e,t,n){var r=ac(e)?Mn:Hn,i=arguments.length<3;return r(e,$a(t,4),n,i,xi)}function yu(e,t){var n=ac(e)?En:Si;return n(e,Iu($a(t,3)))}function wu(e){var t=ac(e)?ri:wo;return t(e)}function xu(e,t,n){t=(n?os(e,t,n):t===o)?1:Gc(t);var r=ac(e)?ii:xo;return r(e,t)}function ku(e){var t=ac(e)?oi:So;return t(e)}function Cu(e){if(null==e)return 0;if(lc(e))return Rc(e)?pr(e):e.length;var t=Ka(e);return t==Q||t==oe?e.size:eo(e).length}function Eu(e,t,n){var r=ac(e)?On:Ao;return n&&os(e,t,n)&&(t=o),r(e,$a(t,3))}var Su=yo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&os(e,t[0],t[1])?t=[]:n>2&&os(t[0],t[1],t[2])&&(t=[t[0]]),uo(e,_i(t,1),[])})),_u=Ot||function(){return sn.Date.now()};function Au(e,t){if("function"!=typeof t)throw new ot(u);return e=Gc(e),function(){if(--e<1)return t.apply(this,arguments)}}function Tu(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,La(e,S,o,o,o,o,t)}function Lu(e,t){var n;if("function"!=typeof t)throw new ot(u);return e=Gc(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Mu=yo((function(e,t,n){var r=b;if(n.length){var i=ur(n,ja(Mu));r|=C}return La(e,r,t,n,i)})),Ou=yo((function(e,t,n){var r=b|y;if(n.length){var i=ur(n,ja(Ou));r|=C}return La(t,r,e,n,i)}));function Fu(e,t,n){t=n?o:t;var r=La(e,x,o,o,o,o,o,t);return r.placeholder=Fu.placeholder,r}function Du(e,t,n){t=n?o:t;var r=La(e,k,o,o,o,o,o,t);return r.placeholder=Du.placeholder,r}function Wu(e,t,n){var r,i,a,s,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new ot(u);function m(t){var n=r,a=i;return r=i=o,f=t,s=e.apply(a,n),s}function g(e){return f=e,l=Cs(y,t),h?m(e):s}function v(e){var n=e-c,r=e-f,i=t-n;return d?jt(i,a-r):i}function b(e){var n=e-c,r=e-f;return c===o||n>=t||n<0||d&&r>=a}function y(){var e=_u();if(b(e))return w(e);l=Cs(y,v(e))}function w(e){return l=o,p&&r?m(e):(r=i=o,s)}function x(){l!==o&&qo(l),f=0,r=c=i=l=o}function k(){return l===o?s:w(_u())}function C(){var e=_u(),n=b(e);if(r=arguments,i=this,c=e,n){if(l===o)return g(c);if(d)return qo(l),l=Cs(y,t),m(c)}return l===o&&(l=Cs(y,t)),s}return t=Yc(t)||0,kc(n)&&(h=!!n.leading,d="maxWait"in n,a=d?zt(Yc(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),C.cancel=x,C.flush=k,C}var Nu=yo((function(e,t){return bi(e,1,t)})),Ru=yo((function(e,t,n){return bi(e,Yc(t)||0,n)}));function Bu(e){return La(e,A)}function Pu(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(u);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Pu.Cache||jr),n}function Iu(e){if("function"!=typeof e)throw new ot(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function zu(e){return Lu(2,e)}Pu.Cache=jr;var ju=Ho((function(e,t){t=1==t.length&&ac(t[0])?An(t[0],Yn($a())):An(_i(t,1),Yn($a()));var n=t.length;return yo((function(r){var i=-1,o=jt(r.length,n);while(++i=t})),oc=$i(function(){return arguments}())?$i:function(e){return Cc(e)&&ft.call(e,"callee")&&!Et.call(e,"callee")},ac=n.isArray,sc=dn?Yn(dn):Hi;function lc(e){return null!=e&&xc(e.length)&&!yc(e)}function uc(e){return Cc(e)&&lc(e)}function cc(e){return!0===e||!1===e||Cc(e)&&Wi(e)==G}var fc=Rt||Vh,hc=pn?Yn(pn):Ui;function dc(e){return Cc(e)&&1===e.nodeType&&!Fc(e)}function pc(e){if(null==e)return!0;if(lc(e)&&(ac(e)||"string"==typeof e||"function"==typeof e.splice||fc(e)||Pc(e)||oc(e)))return!e.length;var t=Ka(e);if(t==Q||t==oe)return!e.size;if(fs(e))return!eo(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function mc(e,t){return qi(e,t)}function gc(e,t,n){n="function"==typeof n?n:o;var r=n?n(e,t):o;return r===o?qi(e,t,o,n):!!r}function vc(e){if(!Cc(e))return!1;var t=Wi(e);return t==K||t==Y||"string"==typeof e.message&&"string"==typeof e.name&&!Fc(e)}function bc(e){return"number"==typeof e&&Bt(e)}function yc(e){if(!kc(e))return!1;var t=Wi(e);return t==X||t==Z||t==q||t==re}function wc(e){return"number"==typeof e&&e==Gc(e)}function xc(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=R}function kc(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Cc(e){return null!=e&&"object"==typeof e}var Ec=mn?Yn(mn):Vi;function Sc(e,t){return e===t||Yi(e,t,Ua(t))}function _c(e,t,n){return n="function"==typeof n?n:o,Yi(e,t,Ua(t),n)}function Ac(e){return Oc(e)&&e!=+e}function Tc(e){if(cs(e))throw new i(l);return Ki(e)}function Lc(e){return null===e}function Mc(e){return null==e}function Oc(e){return"number"==typeof e||Cc(e)&&Wi(e)==J}function Fc(e){if(!Cc(e)||Wi(e)!=te)return!1;var t=kt(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==mt}var Dc=gn?Yn(gn):Xi;function Wc(e){return wc(e)&&e>=-R&&e<=R}var Nc=vn?Yn(vn):Zi;function Rc(e){return"string"==typeof e||!ac(e)&&Cc(e)&&Wi(e)==ae}function Bc(e){return"symbol"==typeof e||Cc(e)&&Wi(e)==se}var Pc=bn?Yn(bn):Qi;function Ic(e){return e===o}function zc(e){return Cc(e)&&Ka(e)==ue}function jc(e){return Cc(e)&&Wi(e)==ce}var $c=Ea(no),Hc=Ea((function(e,t){return e<=t}));function Uc(e){if(!e)return[];if(lc(e))return Rc(e)?mr(e):na(e);if(At&&e[At])return ar(e[At]());var t=Ka(e),n=t==Q?sr:t==oe?cr:zf;return n(e)}function qc(e){if(!e)return 0===e?e:0;if(e=Yc(e),e===N||e===-N){var t=e<0?-1:1;return t*B}return e===e?e:0}function Gc(e){var t=qc(e),n=t%1;return t===t?n?t-n:t:0}function Vc(e){return e?pi(Gc(e),0,I):0}function Yc(e){if("number"==typeof e)return e;if(Bc(e))return P;if(kc(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=kc(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Be,"");var n=Ye.test(e);return n||Xe.test(e)?rn(e.slice(2),n?2:8):Ve.test(e)?P:+e}function Kc(e){return ra(e,kf(e))}function Xc(e){return e?pi(Gc(e),-R,R):0===e?e:0}function Zc(e){return null==e?"":Fo(e)}var Qc=sa((function(e,t){if(fs(t)||lc(t))ra(t,xf(t),e);else for(var n in t)ft.call(t,n)&&si(e,n,t[n])})),Jc=sa((function(e,t){ra(t,kf(t),e)})),ef=sa((function(e,t,n,r){ra(t,kf(t),e,r)})),tf=sa((function(e,t,n,r){ra(t,xf(t),e,r)})),nf=Ra(di);function rf(e,t){var n=kr(e);return null==t?n:ci(n,t)}var of=yo((function(e,t){e=nt(e);var n=-1,r=t.length,i=r>2?t[2]:o;i&&os(t[0],t[1],i)&&(r=1);while(++n1),t})),ra(e,Pa(e),n),r&&(n=mi(n,d|p|m,Fa));var i=t.length;while(i--)Wo(n,t[i]);return n}));function Tf(e,t){return Mf(e,Iu($a(t)))}var Lf=Ra((function(e,t){return null==e?{}:co(e,t)}));function Mf(e,t){if(null==e)return{};var n=An(Pa(e),(function(e){return[e]}));return t=$a(t),fo(e,n,(function(e,n){return t(e,n[0])}))}function Of(e,t,n){t=$o(t,e);var r=-1,i=t.length;i||(i=1,e=o);while(++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Gt();return jt(e+i*(t-e+nn("1e-"+((i+"").length-1))),t)}return go(e,t)}var qf=ha((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return yh(Zc(e).toLowerCase())}function Vf(e){return e=Zc(e),e&&e.replace(Qe,er).replace(Ht,"")}function Yf(e,t,n){e=Zc(e),t=Fo(t);var r=e.length;n=n===o?r:pi(Gc(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function Kf(e){return e=Zc(e),e&&Te.test(e)?e.replace(_e,tr):e}function Xf(e){return e=Zc(e),e&&Re.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ha((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Qf=ha((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Jf=fa("toLowerCase");function eh(e,t,n){e=Zc(e),t=Gc(t);var r=t?pr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return xa(Wt(i),n)+e+xa(Dt(i),n)}function th(e,t,n){e=Zc(e),t=Gc(t);var r=t?pr(e):0;return t&&r>>0,n?(e=Zc(e),e&&("string"==typeof t||null!=t&&!Dc(t))&&(t=Fo(t),!t&&ir(e))?Uo(mr(e),0,n):e.split(t,n)):[]}var lh=ha((function(e,t,n){return e+(n?" ":"")+yh(t)}));function uh(e,t,n){return e=Zc(e),n=null==n?0:pi(Gc(n),0,e.length),t=Fo(t),e.slice(n,n+t.length)==t}function ch(e,t,n){var r=wr.templateSettings;n&&os(e,t,n)&&(t=o),e=Zc(e),t=ef({},t,r,Ma);var i,a,s=ef({},t.imports,r.imports,Ma),l=xf(s),u=Kn(s,l),c=0,f=t.interpolate||Je,h="__p += '",d=rt((t.escape||Je).source+"|"+f.source+"|"+(f===Oe?qe:Je).source+"|"+(t.evaluate||Je).source+"|$","g"),p="//# sourceURL="+(ft.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Kt+"]")+"\n";e.replace(d,(function(t,n,r,o,s,l){return r||(r=o),h+=e.slice(c,l).replace(et,nr),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),h+="';\n";var m=ft.call(t,"variable")&&t.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(ke,""):h).replace(Ce,"$1").replace(Ee,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=xh((function(){return He(l,p+"return "+h).apply(o,u)}));if(g.source=h,vc(g))throw g;return g}function fh(e){return Zc(e).toLowerCase()}function hh(e){return Zc(e).toUpperCase()}function dh(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(Be,"");if(!e||!(t=Fo(t)))return e;var r=mr(e),i=mr(t),a=Zn(r,i),s=Qn(r,i)+1;return Uo(r,a,s).join("")}function ph(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(Ie,"");if(!e||!(t=Fo(t)))return e;var r=mr(e),i=Qn(r,mr(t))+1;return Uo(r,0,i).join("")}function mh(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(Pe,"");if(!e||!(t=Fo(t)))return e;var r=mr(e),i=Zn(r,mr(t));return Uo(r,i).join("")}function gh(e,t){var n=T,r=L;if(kc(t)){var i="separator"in t?t.separator:i;n="length"in t?Gc(t.length):n,r="omission"in t?Fo(t.omission):r}e=Zc(e);var a=e.length;if(ir(e)){var s=mr(e);a=s.length}if(n>=a)return e;var l=n-pr(r);if(l<1)return r;var u=s?Uo(s,0,l).join(""):e.slice(0,l);if(i===o)return u+r;if(s&&(l+=u.length-l),Dc(i)){if(e.slice(l).search(i)){var c,f=u;i.global||(i=rt(i.source,Zc(Ge.exec(i))+"g")),i.lastIndex=0;while(c=i.exec(f))var h=c.index;u=u.slice(0,h===o?l:h)}}else if(e.indexOf(Fo(i),l)!=l){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r}function vh(e){return e=Zc(e),e&&Ae.test(e)?e.replace(Se,gr):e}var bh=ha((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),yh=fa("toUpperCase");function wh(e,t,n){return e=Zc(e),t=n?o:t,t===o?or(e)?yr(e):Wn(e):e.match(t)||[]}var xh=yo((function(e,t){try{return yn(e,o,t)}catch(n){return vc(n)?n:new i(n)}})),kh=Ra((function(e,t){return xn(t,(function(t){t=Ls(t),hi(e,t,Mu(e[t],e))})),e}));function Ch(e){var t=null==e?0:e.length,n=$a();return e=t?An(e,(function(e){if("function"!=typeof e[1])throw new ot(u);return[n(e[0]),e[1]]})):[],yo((function(n){var r=-1;while(++rR)return[];var n=I,r=jt(e,I);t=$a(t),e-=I;var i=Gn(r,t);while(++n0||t<0)?new Sr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=Gc(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},Sr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Sr.prototype.toArray=function(){return this.take(I)},Li(Sr.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=wr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(wr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Sr,u=s[0],c=l||ac(t),f=function(e){var t=i.apply(wr,Tn([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,m=l&&!d;if(!a&&c){t=m?t:new Sr(this);var g=e.apply(t,s);return g.__actions__.push({func:ql,args:[f],thisArg:o}),new Er(g,h)}return p&&m?e.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})})),xn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);wr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ac(i)?i:[],e)}return this[n]((function(n){return t.apply(ac(n)?n:[],e)}))}})),Li(Sr.prototype,(function(e,t){var n=wr[t];if(n){var r=n.name+"";ft.call(un,r)||(un[r]=[]),un[r].push({name:t,func:n})}})),un[va(o,y).name]=[{name:"wrapper",func:o}],Sr.prototype.clone=_r,Sr.prototype.reverse=Ar,Sr.prototype.value=Tr,wr.prototype.at=Gl,wr.prototype.chain=Vl,wr.prototype.commit=Yl,wr.prototype.next=Kl,wr.prototype.plant=Zl,wr.prototype.reverse=Ql,wr.prototype.toJSON=wr.prototype.valueOf=wr.prototype.value=Jl,wr.prototype.first=wr.prototype.head,At&&(wr.prototype[At]=Xl),wr},xr=wr();sn._=xr,i=function(){return xr}.call(t,n,t,r),i===o||(r.exports=i)}).call(this)}).call(this,n("c8ba"),n("62e4")(e))},"31c5":function(e,t,n){(function(e){e(n("56b3"))})((function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function i(e){for(var i=0;ie[r[t]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},o.calculate=function(e){var t,n,a,s=0,l=0,u=0;function c(e){var t,n,i,o,a,f=e.elementName?e.elementName.text:"";for(f&&"*"!==f.charAt(f.length-1)&&u++,t=0,i=e.modifiers.length;tt.firstLine())r=e.Pos(r.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==a){var f=n(t,o,c);e.on(f,"mousedown",(function(t){h.clear(),e.e_preventDefault(t)}));var h=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});h.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,c.from,c.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"),r.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=0;--t){var n=l[t]["(bindings)"];if(n[e])return n}}function C(e){for(var t=l.length-1;t>=0;t--){var n=l[t];if(n["(usages)"][e])return n["(usages)"][e];if(n===c)break}return!1}function E(t,n){if("outer"===e.option.shadow)for(var r="global"===c["(type)"],i="functionparams"===s["(type)"],o=!r,a=0;a1?l[l.length-2]:null,p=s===c,v="functionparams"===s["(type)"],b="functionouter"===s["(type)"],x=s["(usages)"],k=s["(bindings)"],C=Object.keys(x);for(x.__proto__&&-1===C.indexOf("__proto__")&&C.push("__proto__"),t=0;t=0;o--){var a=l[o];if(a["(bindings)"][e]&&(!n||a["(bindings)"][e]["(blockscoped)"]))return a["(bindings)"][e]["(type)"];var s=r?l[o-1]:a;if(s&&"functionparams"===s["(type)"])return null}return null},hasLabel:function(e){for(var t=l.length-1;t>=0;t--){var n=l[t];if(n["(labels)"][e])return!0;if("functionparams"===n["(type)"])return!1}return!1},has:function(e,t){return Boolean(this.bindingtype(e,t))},add:function(e,t,n,r){s["(bindings)"][e]={"(type)":t,"(token)":n,"(blockscoped)":!1,"(function)":c,"(unused)":r}}},block:{isGlobal:function(){return"global"===s["(type)"]},use:function(t,n){var r=c["(parent)"];r&&r["(bindings)"][t]&&"param"===r["(bindings)"][t]["(type)"]&&(_.funct.has(t,{excludeParams:!0,onlyBlockscoped:!0})||(r["(bindings)"][t]["(unused)"]=!1)),n&&(e.ignored.W117||!1===e.option.undef)&&(n.ignoreUndef=!0),v(t),s["(usages)"][t]["(onlyUsedSubFunction)"]=!1,n&&(n["(function)"]=c,s["(usages)"][t]["(tokens)"].push(n));var i=s["(bindings)"][t];i&&i["(blockscoped)"]&&!i["(initialized)"]&&g("E056",n,t,i["(type)"])},reassign:function(t,n){n.ignoreW020=e.ignored.W020,n.ignoreW021=e.ignored.W021,this.modify(t,n),s["(usages)"][t]["(reassigned)"].push(n)},modify:function(e,t){v(e),s["(usages)"][e]["(onlyUsedSubFunction)"]=!1,s["(usages)"][e]["(modified)"].push(t)},add:function(e,t,n,r,i){s["(bindings)"][e]={"(type)":t,"(token)":n,"(initialized)":!!i,"(blockscoped)":!0,"(unused)":r}},addLabel:function(t,n){var r=n.token;_.funct.hasLabel(t)?m("E011",r,t):"outer"===e.option.shadow&&(_.funct.has(t)?m("W004",r,t):E(t,r)),s["(labels)"][t]=r}}};return _};e.exports=a},"49e3":function(e,t,n){"use strict";e.exports={__proto__:null,aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",currentColor:"The value of the 'color' property.",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."}},"4d6a":function(e,t,n){"use strict";var r=n("76b5"),i={syntax:{},isStrict:function(){return this.directive["use strict"]||this.inClassBody||this.option.module||"implied"===this.option.strict},stmtMissingStrict:function(){return"global"===this.option.strict||!1!==this.option.strict&&!!this.option.globalstrict},allowsGlobalUsd:function(){return"global"===this.option.strict||this.option.globalstrict||this.option.module||this.impliedClosure()},impliedClosure:function(){return this.option.node||this.option.phantom||this.option.browserify},inMoz:function(){return this.option.moz},inES9:function(){return this.esVersion>=9},inES8:function(){return this.esVersion>=8},inES7:function(){return this.esVersion>=7},inES6:function(e){return!(e||!this.option.moz)||this.esVersion>=6},inES5:function(){return!this.esVersion||this.esVersion>=5||this.option.moz},inferEsVersion:function(){var e=null;if(this.option.esversion){if(this.option.es3?e="es3":this.option.es5?e="es5":this.option.esnext&&(e="esnext"),e)return e;2015===this.option.esversion?this.esVersion=6:this.esVersion=this.option.esversion}else this.option.es3?this.esVersion=3:this.option.esnext&&(this.esVersion=6);return null},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={unstable:{}},this.esVersion=5,this.funct=null,this.ignored={},this.directive=Object.create(null),this.jsonMode=!1,this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new r,this.inClassBody=!1}};t.state=i},"4e50":function(e,t){var n="183,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,903,1155,1156,1157,1158,1159,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1471,1473,1474,1476,1477,1479,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1648,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1763,1764,1767,1768,1770,1771,1772,1773,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1809,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,2027,2028,2029,2030,2031,2032,2033,2034,2035,2045,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2081,2082,2083,2085,2086,2087,2089,2090,2091,2092,2093,2137,2138,2139,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2362,2363,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2385,2386,2387,2388,2389,2390,2391,2402,2403,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2433,2434,2435,2492,2494,2495,2496,2497,2498,2499,2500,2503,2504,2507,2508,2509,2519,2530,2531,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2558,2561,2562,2563,2620,2622,2623,2624,2625,2626,2631,2632,2635,2636,2637,2641,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2677,2689,2690,2691,2748,2750,2751,2752,2753,2754,2755,2756,2757,2759,2760,2761,2763,2764,2765,2786,2787,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2810,2811,2812,2813,2814,2815,2817,2818,2819,2876,2878,2879,2880,2881,2882,2883,2884,2887,2888,2891,2892,2893,2902,2903,2914,2915,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2946,3006,3007,3008,3009,3010,3014,3015,3016,3018,3019,3020,3021,3031,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3072,3073,3074,3075,3076,3134,3135,3136,3137,3138,3139,3140,3142,3143,3144,3146,3147,3148,3149,3157,3158,3170,3171,3174,3175,3176,3177,3178,3179,3180,3181,3182,3183,3201,3202,3203,3260,3262,3263,3264,3265,3266,3267,3268,3270,3271,3272,3274,3275,3276,3277,3285,3286,3298,3299,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3328,3329,3330,3331,3387,3388,3390,3391,3392,3393,3394,3395,3396,3398,3399,3400,3402,3403,3404,3405,3415,3426,3427,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3458,3459,3530,3535,3536,3537,3538,3539,3540,3542,3544,3545,3546,3547,3548,3549,3550,3551,3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3570,3571,3633,3636,3637,3638,3639,3640,3641,3642,3655,3656,3657,3658,3659,3660,3661,3662,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3761,3764,3765,3766,3767,3768,3769,3771,3772,3784,3785,3786,3787,3788,3789,3792,3793,3794,3795,3796,3797,3798,3799,3800,3801,3864,3865,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3893,3895,3897,3902,3903,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3974,3975,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3993,3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4038,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4182,4183,4184,4185,4190,4191,4192,4194,4195,4196,4199,4200,4201,4202,4203,4204,4205,4209,4210,4211,4212,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4957,4958,4959,4969,4970,4971,4972,4973,4974,4975,4976,4977,5906,5907,5908,5938,5939,5940,5970,5971,6002,6003,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6109,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6155,6156,6157,6160,6161,6162,6163,6164,6165,6166,6167,6168,6169,6313,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6679,6680,6681,6682,6683,6741,6742,6743,6744,6745,6746,6747,6748,6749,6750,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761,6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,6780,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,6832,6833,6834,6835,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6912,6913,6914,6915,6916,6964,6965,6966,6967,6968,6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6992,6993,6994,6995,6996,6997,6998,6999,7000,7001,7019,7020,7021,7022,7023,7024,7025,7026,7027,7040,7041,7042,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7088,7089,7090,7091,7092,7093,7094,7095,7096,7097,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,7155,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213,7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7376,7377,7378,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400,7405,7410,7411,7412,7415,7416,7417,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7675,7676,7677,7678,7679,8204,8205,8255,8256,8276,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8417,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,11503,11504,11505,11647,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,12330,12331,12332,12333,12334,12335,12441,12442,42528,42529,42530,42531,42532,42533,42534,42535,42536,42537,42607,42612,42613,42614,42615,42616,42617,42618,42619,42620,42621,42654,42655,42736,42737,43010,43014,43019,43043,43044,43045,43046,43047,43136,43137,43188,43189,43190,43191,43192,43193,43194,43195,43196,43197,43198,43199,43200,43201,43202,43203,43204,43205,43216,43217,43218,43219,43220,43221,43222,43223,43224,43225,43232,43233,43234,43235,43236,43237,43238,43239,43240,43241,43242,43243,43244,43245,43246,43247,43248,43249,43263,43264,43265,43266,43267,43268,43269,43270,43271,43272,43273,43302,43303,43304,43305,43306,43307,43308,43309,43335,43336,43337,43338,43339,43340,43341,43342,43343,43344,43345,43346,43347,43392,43393,43394,43395,43443,43444,43445,43446,43447,43448,43449,43450,43451,43452,43453,43454,43455,43456,43472,43473,43474,43475,43476,43477,43478,43479,43480,43481,43493,43504,43505,43506,43507,43508,43509,43510,43511,43512,43513,43561,43562,43563,43564,43565,43566,43567,43568,43569,43570,43571,43572,43573,43574,43587,43596,43597,43600,43601,43602,43603,43604,43605,43606,43607,43608,43609,43643,43644,43645,43696,43698,43699,43700,43703,43704,43710,43711,43713,43755,43756,43757,43758,43759,43765,43766,44003,44004,44005,44006,44007,44008,44009,44010,44012,44013,44016,44017,44018,44019,44020,44021,44022,44023,44024,44025,64286,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65056,65057,65058,65059,65060,65061,65062,65063,65064,65065,65066,65067,65068,65069,65070,65071,65075,65076,65101,65102,65103,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65343",r=n.split(",").map((function(e){return parseInt(e,10)}));e.exports=r},"56b3":function(e,t,n){(function(t,n){e.exports=n()})(0,(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),u=l&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,l=!0);var k=b&&(u||f&&(null==x||x<12.11)),C=n||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,_=function(e,t){var n=e.className,r=E(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 A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return A(e).appendChild(t)}function L(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)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(t){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function z(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var V=[""];function Y(e){while(V.length<=e)V.push(K(V)+" ");return V[e]}function K(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\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 oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){while((n<0?t>0:tn?-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 le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||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 ue=null;function ce(e,t,n){var r;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}var fe=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 u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,f=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){ke(e),Ce(e)}function _e(e){return e.target||e.srcElement}function Ae(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 Te,Le,Me=function(){if(a&&s<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Te){var t=L("span","​");T(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Te?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Fe(e){if(null!=Le)return Le;var t=T(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(Le=r.right-n.right<3)}var De=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},We=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne=function(){var e=L("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Re=null;function Be(e){if(null!=Re)return Re;var t=T(e,L("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Re=Math.abs(n.left-r.left)>1}var Pe={},Ie={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pe[e]=t}function je(e,t){Ie[e]=t}function $e(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),e=J(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return $e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return $e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=$e(t);var n=Pe[t.name];if(!n)return He(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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 Ue={};function qe(e,t){var n=Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={};B(t,n)}function Ge(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 Ve(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Ke=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 Xe(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?it(n,Xe(e,n).text.length):ht(t,Xe(e,t.line).text.length)}function ht(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function dt(e,t){for(var n=[],r=0;r=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.post},Ke.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var pt=function(e,t){this.state=e,this.lookAhead=t},mt=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 gt(e,t,n,r){var i=[e.state.modeGen],o={};St(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,u=0;n.state=!0,St(e,t.text,s.mode,n,(function(e,t){var n=l;while(ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ge(e.doc.mode,r.state),o=gt(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 bt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new mt(r,!0,t);var o=_t(e,t,n),a=o>r.first&&Xe(r,o-1).stateAfter,s=a?mt.fromSaved(r,a,o):new mt(r,Ye(r.mode),o);return r.iter(o,t,(function(n){yt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(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}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof pt?new mt(e,Ge(e.mode,t.state),n,t.lookAhead):new mt(e,Ge(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ct(e,t,n,r){var i,o=e.doc,a=o.mode;t=ft(o,t);var s,l=Xe(o,t.line),u=bt(e,t.line,n),c=new Ke(l.text,e.options.tabSize,u);r&&(s=[]);while((r||c.pose.options.maxHighlightLength?(s=!1,a&&yt(e,t,r,f.pos),f.pos=t.length,l=null):l=Et(xt(n,f,r.state,h),o),h){var d=h[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){while(ua;--s){if(s<=o.first)return o.first;var l=Xe(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof pt?u.lookAhead:0)<=o.modeFrontier))return s;var c=P(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function At(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Xe(e,r).stateAfter;if(i&&(!(i instanceof pt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Ft(a,o.from,l?null:o.to))}}return r}function Bt(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var w=0;w0)){var c=[l,1],f=ot(u.from,s.from),h=ot(u.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}function jt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function Xt(e,t,n,r,i){var o=Xe(e,t),a=Lt&&o.markedSpans;if(a)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.to,n)>=0:ot(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.from,r)<=0:ot(u.from,r)<0)))return!0}}}function Zt(e){var t;while(t=Vt(e))e=t.find(-1,!0).line;return e}function Qt(e){var t;while(t=Yt(e))e=t.find(1,!0).line;return e}function Jt(e){var t,n;while(t=Yt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function en(e,t){var n=Xe(e,t),r=Zt(n);return n==r?t:et(r)}function tn(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!nn(e,r))return t;while(n=Yt(r))r=n.find(1,!0).line;return et(r)+1}function nn(e,t){var n=Lt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var ln=function(e,t,n){this.text=e,$t(this,t),this.height=n?n(this):1};function un(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),$t(e,n);var i=r?r(e):1;i!=e.height&&Je(e,i)}function cn(e){e.parent=null,jt(e)}ln.prototype.lineNo=function(){return et(this)},xe(ln);var fn={},hn={};function dn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?hn:fn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function pn(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("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=gn,Fe(e.display.measure)&&(a=he(o,e.doc.direction))&&(r.addToken=bn(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&et(o);wn(o,r,vt(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=W(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=W(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(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 u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=W(r.pre.className,r.textClass||"")),r}function mn(e){var t=L("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gn(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?vn(t,e.trailingSpace):t,f=e.cm.state.specialChars,h=!1;if(f.test(t)){u=document.createDocumentFragment();var d=0;while(1){f.lastIndex=d;var p=f.exec(t),m=p?p.index-d:t.length-d;if(m){var g=document.createTextNode(c.slice(d,d+m));a&&s<9?u.appendChild(L("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;d+=m+1;var v=void 0;if("\t"==p[0]){var b=e.cm.options.tabSize,y=b-e.col%b;v=u.appendChild(L("span",Y(y),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==p[0]||"\n"==p[0]?(v=u.appendChild(L("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",p[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),a&&s<9?u.appendChild(L("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&s<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||h||o){var w=n||"";r&&(w+=r),i&&(w+=i);var x=L("span",[u],w,o);if(l)for(var k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&x.setAttribute(k,l[k]);return e.content.appendChild(x)}e.content.appendChild(u)}}function vn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&f.from<=u)break;if(f.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-u),i,o,null,s,l),o=null,r=r.slice(f.to-u),u=f.to}}}function yn(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 wn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,h,d=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=u=c=s="",h=null,f=null,v=1/0;for(var b=[],y=void 0,w=0;wp||k.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,u=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&x.from==p&&(c+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&((h||(h={})).title=k.title),k.attributes)for(var C in k.attributes)(h||(h={}))[C]=k.attributes[C];k.collapsed&&(!f||qt(f.marker,k)<0)&&(f=x)}else x.from>p&&v>x.from&&(v=x.from)}if(y)for(var E=0;E=d)break;var _=Math.min(d,v);while(1){if(g){var A=p+g.length;if(!f){var T=A>_?g.slice(0,_-p):g;t.addToken(t,T,a?a+l:l,c,p+T.length==v?u:"",s,h)}if(A>=_){g=g.slice(_-p),p=_;break}p=A,c=""}g=i.slice(o,o=n[m++]),a=dn(n[m++],t.cm.options)}}else for(var L=1;L2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Zn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Qn(e,t){t=Zt(t);var n=et(t),r=e.display.externalMeasured=new xn(e.doc,t,n);r.lineN=n;var i=r.built=pn(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}function Jn(e,t,n,r){return nr(e,tr(e,t),n,r)}function er(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=l-s,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)while(u=0;i--)if((n=e[i]).left!=n.right)break;return n}function sr(e,t,n,r){var i,o=or(t.map,n,r),l=o.node,u=o.start,c=o.end,f=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){while(u&&oe(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c0&&(f=r="right"),i=e.options.lineWrapping&&(d=l.getClientRects()).length>1?d["right"==r?d.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Lr(e.display),top:p.top,bottom:p.bottom}:ir}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){var r=s[t],i=1==r.level;return a(n?e-1:e,i!=n)}var f=ce(s,l,u),h=ue,d=c(l,f,"before"==u);return null!=h&&(d.other=c(l,h,"before"!=u)),d}function yr(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=Lr(e.display)*t.ch);var r=Xe(e.doc,t.line),i=on(r)+Un(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function wr(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function xr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return wr(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return wr(r.first+r.size-1,Xe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(r,i);;){var s=Sr(e,a,i,t,n),l=Kt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=Xe(r,i=u.line)}}function kr(e,t,n,r){r-=pr(t);var i=t.text.length,o=se((function(t){return nr(e,n,t-1).bottom<=r}),i,0);return i=se((function(t){return nr(e,n,t).top>r}),o,i),{begin:o,end:i}}function Cr(e,t,n,r){n||(n=tr(e,t));var i=mr(e,t,nr(e,n,r),"line").top;return kr(e,t,n,i)}function Er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Sr(e,t,n,r,i){i-=on(t);var o=tr(e,t),a=pr(t),s=0,l=t.text.length,u=!0,c=he(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Ar:_r)(e,t,n,o,c,r,i);u=1!=f.level,s=u?f.from:f.to-1,l=u?f.to:f.from-1}var h,d,p=null,m=null,g=se((function(t){var n=nr(e,o,t);return n.top+=a,n.bottom+=a,!!Er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var b=r-m.left=w.bottom?1:0}return g=ae(t.text,g,1),wr(n,g,d,v,r-h)}function _r(e,t,n,r,i,o,a){var s=se((function(s){var l=i[s],u=1!=l.level;return Er(br(e,it(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=br(e,it(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Er(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l}function Ar(e,t,n,r,i,o,a){var s=kr(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h=u||d.to<=l)){var p=1!=d.level,m=nr(e,r,p?Math.min(u,d.to)-1:Math.max(l,d.from)).right,g=mg)&&(c=d,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Tr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rr){rr=L("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(L("br"));rr.appendChild(document.createTextNode("x"))}T(e.measure,rr);var n=rr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function Lr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),n=L("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Mr(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:Or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fr(e){var t=Tr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Lr(e.display)-3);return function(i){if(nn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Xe(e.doc,u.line).text).length==u.ch){var c=P(l,l.length,e.options.tabSize)-l.length;u=it(u.line,Math.max(0,Math.round((o-Gn(e.display).left)/Lr(e.display))-c))}return u}function Nr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Lt&&en(e.doc,t)i.viewFrom?Pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Pr(e);else if(t<=i.viewFrom){var o=Ir(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Pr(e)}else if(n>=i.viewTo){var a=Ir(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Pr(e)}else{var s=Ir(e,t,t,-1),l=Ir(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(kn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Pr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Nr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function Pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ir(e,t,n,r){var i,o=Nr(e,t),a=e.display.view;if(!Lt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}while(en(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 zr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Nr(e,n)))),r.viewTo=n}function jr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.state.focused||(e.display.input.focus(),Xr(e))}function Kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zr(e))}),100)}function Xr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,D(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()),Vr(e))}function Zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Je(i.line,l),Jr(i.line),i.rest))for(var d=0;de.display.sizerWidth){var p=Math.ceil(u/Lr(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Jr(e){if(e.widgets)for(var t=0;t=a&&(o=tt(t,on(Xe(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!be(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=L("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Un(e.display))+"px;\n height: "+(t.bottom-t.top+Vn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?it(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=br(e,t),l=n&&n!=t?br(e,n):s;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};var u=ii(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(fi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(di(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function ri(e,t){var n=ii(e,t);null!=n.scrollTop&&fi(e,n.scrollTop),null!=n.scrollLeft&&di(e,n.scrollLeft)}function ii(e,t){var n=e.display,r=Tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Kn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+qn(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,h=Yn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.lefth+f-3&&(a.scrollLeft=t.right+(d?0:10)-h),a}function oi(e,t){null!=t&&(ui(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ui(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,n){null==t&&null==n||ui(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function li(e,t){ui(e),e.curOp.scrollToPos=t}function ui(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=yr(e,t.from),r=yr(e,t.to);ci(e,n,r,t.margin)}}function ci(e,t,n,r){var i=ii(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});si(e,i.scrollLeft,i.scrollTop)}function fi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||$i(e,{top:t}),hi(e,t,!0),n&&$i(e),Wi(e,100))}function hi(e,t,n){t=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 di(e,t,n,r){t=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,Gi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(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+Vn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mi=function(e,t,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mi.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.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}},mi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mi.prototype.zeroWidthHack=function(){var e=b&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new I,this.disableVert=new I},mi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},mi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function vi(e,t){t||(t=pi(e));var n=e.display.barWidth,r=e.display.barHeight;bi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Qr(e),bi(e,pi(e)),n=e.display.barWidth,r=e.display.barHeight}function bi(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=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var yi={native:mi,null:gi};function wi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new yi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(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?di(e,t):fi(e,t)}),e),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)}var xi=0;function ki(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:++xi},En(e.curOp)}function Ci(e){var t=e.curOp;t&&_n(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ri(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function _i(e){e.updatedDisplay=e.mustUpdate&&zi(e.cm,e.update)}function Ai(e){var t=e.cm,n=t.display;e.updatedDisplay&&Qr(t),e.barMeasure=pi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Jn(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+Vn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=bt(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?Ge(t.mode,r.state):null,l=gt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&hn)return Wi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Mi(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jr(e))return!1;Vi(e)&&(Pr(e),t.dims=Mr(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.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Lt&&(o=en(e.doc,o),a=tn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zr(e,o,a),n.viewOffset=on(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=jr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Pi(e);return l>4&&(n.lineDiv.style.display="none"),Hi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ii(u),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Wi(e,400)),n.updateLineNumbers=null,!0}function ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if((!r||!e.options.lineWrapping||t.oldDisplayWidth==Yn(e))&&(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-Kn(e),n.top)}),t.visible=ei(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo))break;if(!zi(e,t))break;Qr(e);var i=pi(e);$r(e),vi(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function $i(e,t){var n=new Ri(e,t);if(zi(e,n)){Qr(e),ji(e,n);var r=pi(e);$r(e),vi(e,r),qi(e,r),n.finish()}}function Hi(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 u=r.view,c=r.viewFrom,f=0;f-1&&(d=!1),Mn(e,h,c,n)),d&&(A(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,c)))),a=h.node.nextSibling}else{var p=Pn(e,h,c,n);o.insertBefore(p,a)}c+=h.size}while(a)a=s(a)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Vn(e)+"px"}function Gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&b&&l)e:for(var h=t.target,d=a.view;h!=s;h=h.parentNode)for(var p=0;p=0&&ot(e,r.to())<=0)return n}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=z(t,i);for(var o=1;o0:l>=0){var u=ut(s.from(),a.from()),c=lt(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new io(f?c:u,f?u:c))}}return new ro(t,n)}function ao(e,t){return new ro([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function lo(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(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+=so(t).ch-t.to.ch),it(n,r)}function uo(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}Tn(e,"change",e,t)}function vo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}function So(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=Eo(i,i.lastOp==r)))a=K(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=so(t):o.changes.push(ko(e,t));else{var l=K(i.done);l&&l.ranges||To(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);while(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||ve(e,"historyAdded")}function _o(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 Ao(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||_o(e,o,K(i.done),t))?i.done[i.done.length-1]=t:To(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Co(i.undone)}function To(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Lo(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 Mo(e){if(!e)return null;for(var t,n=0;n-1&&(K(s)[f]=u[f],delete u[f])}}}return r}function Wo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new io(i,t)}return new io(n||t,t)}function No(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),jo(e,new ro([Wo(e.sel.primary(),t,n,i)],0),r)}function Ro(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),h=void 0;if((r<0?c:u)&&(f=Yo(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(h=ot(f,n))&&(r<0?h<0:h>0))return Go(e,f,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?u:c)&&(d=Yo(e,d,r,d.line==t.line?o:null)),d?Go(e,d,t,r,i):null}}return t}function Vo(e,t,n,r,i){var o=r||1,a=Go(e,t,n,o,i)||!i&&Go(e,t,n,o,!0)||Go(e,t,n,-o,i)||!i&&Go(e,t,n,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Yo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ft(e,it(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=uo(e,t);So(e,t,n,e.cm?e.cm.curOp.id:NaN),ta(e,t,n,Pt(e,t));var r=[];vo(e,(function(e,n){n||-1!=z(r,e.history)||(aa(e.history,t),r.push(e.history)),ta(e,t,null,Pt(e,t))}))}}function Jo(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,u=0;u=0;--d){var p=h(d);if(p)return p.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(X(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Rr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:it(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),n||(n=uo(e,t)),e.cm?na(e.cm,t,r):go(e,t,r),$o(e,n,H),e.cantEdit&&Vo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function na(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=et(Zt(Xe(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&&ye(e),go(r,t,n,Fr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=an(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),At(r,o.line),Wi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?Rr(e):o.line!=a.line||1!=t.text.length||mo(e.doc,t)?Rr(e,o.line,a.line+1,u):Br(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Tn(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ra(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Zo(e,{from:n,to:r,text:t,origin:i})}function ia(e,t,n,r){n1||!(this.children[0]instanceof la))){var s=[];this.collapse(s),this.children=[new la(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Xt(e,t.line,t,n,o)||t.line!=n.line&&Xt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ot()}o.addToHistory&&So(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Zt(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Je(e,0),Nt(e,new Ft(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){nn(e,t)&&Je(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Mt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++da,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Rr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Br(u,c,"text");o.atomic&&Uo(u.doc),Tn(u,"markerAdded",u,o)}return o}pa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),we(this,"clear")){var n=this.find();n&&Tn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&Tn(e,"markerCleared",e,this,r,i),t&&Ci(e),this.parent&&this.parent.clear()}},pa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)Zo(this,r[l]);s?zo(this,s):this.cm&&ai(this.cm)})),undo:Di((function(){Jo(this,"undo")})),redo:Di((function(){Jo(this,"redo")})),undoSelection:Di((function(){Jo(this,"undo",!0)})),redoSelection:Di((function(){Jo(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.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(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=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;re)return t=e,!0;e-=o,++n})),ft(this,it(n,t))},indexFromPos:function(e){e=ft(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var c=e.dataTransfer.getData("Text");if(c){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),$o(t.doc,ao(n,n)),f)for(var h=0;h=0;t--)ra(e.doc,"",r[t].from,r[t].to,"+delete");ai(e)}))}function Ga(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Va(e,t,n){var r=Ga(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Ya(e,t,n,r,i){if(e){var o=he(n,t.doc.direction);if(o){var a,s=i<0?K(o):o[0],l=i<0==(1==s.level),u=l?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=tr(t,n);a=i<0?n.text.length-1:0;var f=nr(t,c,a).top;a=se((function(e){return nr(t,c,e).top==f}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=Ga(n,a,1))}else a=i<0?s.to:s.from;return new it(r,a,u)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}function Ka(e,t,n,r){var i=he(t,e.doc.direction);if(!i)return Va(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=ce(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=a.from&&h>=c.begin)){var d=f?"before":"after";return new it(n.line,h,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||(m=p(r>0?0:i.length-1,r,u(g)),!m)?null:m}Ba.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"},Ba.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"},Ba.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ba.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"]},Ba["default"]=b?Ba.macDefault:Ba.pcDefault;var Xa={selectAll:Ko,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return qa(e,(function(t){if(t.empty()){var n=Xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Xe(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}n.push(new io(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Mi(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-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?xs(e,r,t,o):Cs(e,r,t,o)}function xs(e,t,n,r){var i=e.display,o=!1,u=Oi(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,ge(i.wrapper.ownerDocument,"mouseup",u),ge(i.wrapper.ownerDocument,"mousemove",c),ge(i.scroller,"dragstart",f),ge(i.scroller,"drop",u),o||(ke(t),r.addNew||No(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),Kr(e),setTimeout((function(){return i.input.focus()}),20)}function ks(e,t,n){if("char"==n)return new io(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new io(it(t.line,0),ft(e.doc,it(t.line+1,0)));var r=n(e,t);return new io(r.from,r.to)}function Cs(e,t,n,r){var i=e.display,o=e.doc;ke(t);var a,s,l=o.sel,u=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?u[s]:new io(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new io(n,n)),n=Wr(e,t,!0,!0),s=-1;else{var c=ks(e,n,r.unit);a=r.extend?Wo(a,c.anchor,c.head,r.extend):c}r.addNew?-1==s?(s=u.length,jo(o,oo(e,u.concat([a]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(jo(o,oo(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Bo(o,s,a,U):(s=0,jo(o,new ro([a],0),U),l=o.sel);var f=n;function h(t){if(0!=ot(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],u=e.options.tabSize,c=P(Xe(o,n.line).text,n.ch,u),h=P(Xe(o,t.line).text,t.ch,u),d=Math.min(c,h),p=Math.max(c,h),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Xe(o,m).text,b=G(v,d,u);d==p?i.push(new io(it(m,b),it(m,b))):v.length>b&&i.push(new io(it(m,b),it(m,G(v,p,u))))}i.length||i.push(new io(n,n)),jo(o,oo(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,w=a,x=ks(e,t,r.unit),k=w.anchor;ot(x.anchor,k)>0?(y=x.head,k=ut(w.from(),x.anchor)):(y=x.anchor,k=lt(w.to(),x.head));var C=l.ranges.slice(0);C[s]=Es(e,new io(ft(o,k),y)),jo(o,oo(e,C,s),U)}}var d=i.wrapper.getBoundingClientRect(),p=0;function m(t){var n=++p,a=Wr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=ot(a,f)){e.curOp.focus=F(),h(a);var s=ei(i,o);(a.line>=s.to||a.lined.bottom?20:0;l&&setTimeout(Oi(e,(function(){p==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function g(t){e.state.selectingText=!1,p=1/0,t&&(ke(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",v),ge(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var v=Oi(e,(function(e){0!==e.buttons&&Ae(e)?m(e):g(e)})),b=Oi(e,g);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",b)}function Es(e,t){var n=t.anchor,r=t.head,i=Xe(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=he(i);if(!o)return t;var a=ce(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?f<0:f>0}var h=o[u+(l?-1:0)],d=l==(1==h.level),p=d?h.from:h.to,m=d?"after":"before";return n.ch==p&&n.sticky==m?t:new io(new it(n.line,p,m),r)}function Ss(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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!we(e,n))return Ee(t);o-=s.top-a.viewOffset;for(var l=0;l=i){var c=tt(e.doc,o),f=e.display.gutterSpecs[l];return ve(e,n,e,c,f.className,t),Ee(t)}}}function _s(e,t){return Ss(e,t,"gutterClick",!0)}function As(e,t){Hn(e.display,t)||Ts(e,t)||be(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ts(e,t){return!!we(e,"gutterContextMenu")&&Ss(e,t,"gutterContextMenu",!1)}function Ls(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(e)}ms.prototype.compare=function(e,t,n){return this.time+ps>e&&0==ot(t,this.pos)&&n==this.button};var Ms={toString:function(){return"CodeMirror.Init"}},Os={},Fs={};function Ds(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ms&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ms,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ho(e)}),!0),n("indentUnit",2,ho,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){po(e),fr(e),Rr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ra(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ms&&e.refresh()})),n("specialCharPlaceholder",mn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ls(e),Xi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ua(t),i=n!=Ms&&Ua(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ns,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Xi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),n("scrollbarStyle","native",(function(e){wi(e),vi(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=Yi(e.options.gutters,t),Xi(e)}),!0),n("firstLineNumber",1,Xi,!0),n("lineNumberFormatter",(function(e){return e}),Xi,!0),n("showCursorWhenSelecting",!1,$r,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Zr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ws),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$r,!0),n("singleCursorHeightPerLine",!0,$r,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,po,!0),n("addModeClass",!1,po,!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,po,!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 Ws(e,t,n){var r=n&&n!=Ms;if(!t!=!r){var i=e.display.dragFunctions,o=t?pe:ge;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ns(e){e.options.lineWrapping?(D(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),sn(e)),Dr(e),Rr(e),fr(e),setTimeout((function(){return vi(e)}),100)}function Rs(e,t){var n=this;if(!(this instanceof Rs))return new Rs(e,t);this.options=t=t?B(t):{},B(Os,t,!1);var r=t.value;"string"==typeof r?r=new ka(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Rs.inputStyles[t.inputStyle](this),o=this.display=new Zi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Ls(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wi(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 I,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Bs(this),Ma(),ki(this),this.curOp.forceUpdate=!0,bo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(R(Xr,this),20):Zr(this),Fs)Fs.hasOwnProperty(u)&&Fs[u](this,t[u],Ms);Vi(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}pe(t.scroller,"touchstart",(function(i){if(!be(e,i)&&!o(i)&&!_s(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)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Hn(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 io(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new io(it(a.line,0),ft(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(fi(e,t.scroller.scrollTop),di(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Se(t)},over:function(t){be(e,t)||(_a(e,t),Se(t))},start:function(t){return Sa(e,t)},drop:Oi(e,Ea),leave:function(t){be(e,t)||Aa(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return cs.call(e,t)})),pe(u,"keydown",Oi(e,ls)),pe(u,"keypress",Oi(e,fs)),pe(u,"focus",(function(t){return Xr(e,t)})),pe(u,"blur",(function(t){return Zr(e,t)}))}Rs.defaults=Os,Rs.optionHandlers=Fs;var Ps=[];function Is(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=bt(e,t).state:n="prev");var a=e.options.tabSize,s=Xe(o,t),l=P(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==$||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?P(Xe(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",h=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)h+=a,f+="\t";if(ha,l=De(t),u=null;if(s&&r.ranges.length>1)if(zs&&zs.text.join("\n")==t){if(r.ranges.length%zs.text.length==0){u=[];for(var c=0;c=0;h--){var d=r.ranges[h],p=d.from(),m=d.to();d.empty()&&(n&&n>0?p=it(p.line,p.ch-n):e.state.overwrite&&!s?m=it(m.line,Math.min(Xe(o,m.line).text.length,m.ch+K(l).length)):s&&zs&&zs.lineWise&&zs.text.join("\n")==t&&(p=m=it(p.line,0)));var g={from:p,to:m,text:u?u[h%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Zo(e.doc,g),Tn(e,"inputRead",e,g)}t&&!s&&Us(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Hs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Mi(t,(function(){return $s(t,n,0,null,"paste")})),!0}function Us(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-1){a=Is(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Is(e,i.head.line,"smart"));a&&Tn(e,"electricInput",e,i.head.line)}}}function qs(e){for(var t=[],n=[],r=0;rn&&(Is(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ai(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;l0&&Bo(this.doc,r,new io(o,u[r].to()),H)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,it(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=vt(this,Xe(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&&(e=o,i=!0),r=Xe(this.doc,e)}else r=e;return mr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return Tr(this.display)},defaultCharWidth:function(){return Lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=br(this,ft(this.doc,e));var a=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),u=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>u&&(s=u-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&&ri(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Fi(ls),triggerOnKeyPress:Fi(fs),triggerOnKeyUp:cs,triggerOnMouseDown:Fi(vs),execCommand:function(e){if(Xa.hasOwnProperty(e))return Xa[e].call(null,this)},triggerElectric:Fi((function(e){Us(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=ft(this.doc,e),a=0;a0&&s(n.charAt(r-1)))--r;while(i.5)&&Dr(this),ve(this,"refresh",this)})),swapDoc:Fi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),fr(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Tn(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}},xe(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 Ks(e,t,n,r,i){var o=t,a=n,s=Xe(e,t.line);function l(){var r=t.line+n;return!(r=e.first+e.size)&&(t=new it(r,t.ch,t.sticky),s=Xe(e,r))}function u(r){var o;if(o=i?Ka(e.cm,s,t,n):Va(s,t,n),null==o){if(r||!l())return!1;t=Ya(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,f="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;;d=!1){if(n<0&&!u(!d))break;var p=s.text.charAt(t.ch)||"\n",m=ne(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!d))break}var g=Vo(e,t,o,a,!0);return at(o,g)&&(g.hitSide=!0),g}function Xs(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Tr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=xr(e,s,i),!o.outside)break;if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Zs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new I,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qs(e,t){var n=er(e,t.line);if(!n||n.hidden)return null;var r=Xe(e.doc,t.line),i=Zn(n,r,t.line),o=he(r,e.doc.direction),a="left";if(o){var s=ce(o,t.ch);a=s%2?"right":"left"}var l=or(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function el(e,t){return t&&(e.bad=!0),e}function tl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function f(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void f(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(it(r,0),it(i+1,0),u(+d));return void(p.length&&(o=p[0].find(0))&&f(Ze(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&&c();for(var g=0;g=t.display.viewTo||o.line=t.display.viewFrom&&Qs(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=it(a.line-1,Xe(r.doc,a.line-1).length)),s.ch==Xe(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Nr(r,a.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=Nr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=et(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;var f=r.doc.splitLines(tl(r,n,u,t,l)),h=Ze(r.doc,it(t,0),it(l,Xe(r.doc,l).text.length));while(f.length>1&&h.length>1)if(K(f)==K(h))f.pop(),h.pop(),l--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),t++}var d=0,p=0,m=f[0],g=h[0],v=Math.min(m.length,g.length);while(da.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1))d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var x=it(t,d),k=it(l,h.length?K(h).length-p:0);return f.length>1||f[0]||ot(x,k)?(ra(r.doc,f,x,k,"+input"),!0):void 0},Zs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zs.prototype.reset=function(){this.forceCompositionEnd()},Zs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zs.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))},Zs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Mi(this.cm,(function(){return Rr(e.cm)}))},Zs.prototype.setUneditable=function(e){e.contentEditable="false"},Zs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Oi(this.cm,$s)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Zs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Zs.prototype.onContextMenu=function(){},Zs.prototype.resetPosition=function(){},Zs.prototype.needsContentAttribute=!0;var il=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new I,this.hasSelection=!1,this.composing=null};function ol(e,t){if(t=t?B(t):{},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=F();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(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(l){}}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&&(ge(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Rs((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function al(e){e.off=ge,e.on=pe,e.wheelEventPixels=to,e.Doc=ka,e.splitLines=De,e.countColumn=P,e.findColumn=G,e.isWordChar=te,e.Pass=$,e.signal=ve,e.Line=ln,e.changeEnd=so,e.scrollbarModel=yi,e.Pos=it,e.cmpPos=ot,e.modes=Pe,e.mimeModes=Ie,e.resolveMode=$e,e.getMode=He,e.modeExtensions=Ue,e.extendMode=qe,e.copyState=Ge,e.startState=Ye,e.innerMode=Ve,e.commands=Xa,e.keyMap=Ba,e.keyName=Ha,e.isModifierKey=ja,e.lookupKey=za,e.normalizeKeyMap=Ia,e.StringStream=Ke,e.SharedTextMarker=ga,e.TextMarker=pa,e.LineWidget=ca,e.e_preventDefault=ke,e.e_stopPropagation=Ce,e.e_stop=Se,e.addClass=D,e.contains=O,e.rmClass=_,e.keyNames=Da}il.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!be(r,e)){if(r.somethingSelected())js({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qs(r);js({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),N(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){be(r,e)||Hs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Hn(e,t)&&!be(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)}})),pe(e.lineSpace,"selectstart",(function(t){Hn(e,t)||ke(t)})),pe(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"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},il.prototype.createField=function(e){this.wrapper=Vs(),this.textarea=this.wrapper.firstChild},il.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Hr(e);if(e.options.moveInputWithCursor){var i=br(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},il.prototype.showSelection=function(e){var t=this.cm,n=t.display;T(n.cursorDiv,e.cursors),T(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},il.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},il.prototype.getField=function(){return this.textarea},il.prototype.supportsTouch=function(){return!1},il.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||F()!=this.textarea))try{this.textarea.focus()}catch(e){}},il.prototype.blur=function(){this.textarea.blur()},il.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},il.prototype.receivedFocus=function(){this.slowPoll()},il.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},il.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},il.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||We(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(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")}var l=0,u=Math.min(r.length,i.length);while(l1e3||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},il.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},il.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},il.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Wr(n,e),u=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Oi(n,jo)(n.doc,ao(o),H);var h,d=i.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(h=window.scrollY),r.input.focus(),l&&window.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=b,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),C){Se(e);var g=function(){ge(window,"mouseup",g),setTimeout(b,20)};pe(window,"mouseup",g)}else setTimeout(b,50)}function v(){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 b(){if(t.contextMenuPending==b&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&s<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Oi(n,Ko)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},il.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},il.prototype.setUneditable=function(){},il.prototype.needsContentAttribute=!1,Ds(Rs),Ys(Rs);var sl="iter insert remove copy getEditor constructor".split(" ");for(var ll in ka.prototype)ka.prototype.hasOwnProperty(ll)&&z(sl,ll)<0&&(Rs.prototype[ll]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[ll]));return xe(ka),Rs.inputStyles={textarea:il,contenteditable:Zs},Rs.defineMode=function(e){Rs.defaults.mode||"null"==e||(Rs.defaults.mode=e),ze.apply(this,arguments)},Rs.defineMIME=je,Rs.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Rs.defineMIME("text/plain","null"),Rs.defineExtension=function(e,t){Rs.prototype[e]=t},Rs.defineDocExtension=function(e,t){ka.prototype[e]=t},Rs.fromTextArea=ol,al(Rs),Rs.version="5.50.0",Rs}))},"577f":function(e,t,n){!function(t,r){e.exports=r(n("d3c5"),n("d800"))}("undefined"!=typeof self&&self,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"altRequire",(function(){return a})),n.d(r,"attrLowercase",(function(){return s})),n.d(r,"attrNoDuplication",(function(){return l})),n.d(r,"attrUnsafeChars",(function(){return u})),n.d(r,"attrValueDoubleQuotes",(function(){return c})),n.d(r,"attrValueNotEmpty",(function(){return f})),n.d(r,"csslint",(function(){return d})),n.d(r,"doctypeFirst",(function(){return p})),n.d(r,"doctypeHTML5",(function(){return m})),n.d(r,"headScriptDisabled",(function(){return g})),n.d(r,"hrefAbsOrRel",(function(){return v})),n.d(r,"idClsasAdDisabled",(function(){return b})),n.d(r,"idClassValue",(function(){return y})),n.d(r,"idUnique",(function(){return w})),n.d(r,"inlineScriptDisabled",(function(){return x})),n.d(r,"inlineStyleDisabled",(function(){return k})),n.d(r,"jshint",(function(){return E})),n.d(r,"scriptDisabled",(function(){return S})),n.d(r,"spaceTabMixedDisabled",(function(){return _})),n.d(r,"specCharEscape",(function(){return A})),n.d(r,"srcNotEmpty",(function(){return T})),n.d(r,"styleDisabled",(function(){return L})),n.d(r,"tagPair",(function(){return M})),n.d(r,"tagSelfClose",(function(){return O})),n.d(r,"tagnameLowercase",(function(){return F})),n.d(r,"titleRequire",(function(){return D}));var i=class{constructor(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}makeMap(e){for(var t={},n=e.split(","),r=0;r]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,h=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,d=/\r?\n/g,p=0,m=0,g=0,v=1,b=u._arrBlocks;function y(e,t,n,r){var i=n-g+1;for(void 0===r&&(r={}),r.raw=t,r.pos=n,r.line=v,r.col=i,b.push(r),u.fire(e,r);d.exec(t);)v++,g=n+d.lastIndex}for(u.fire("start",{pos:0,line:1,col:1});t=f.exec(e);)if((n=t.index)>p&&(l=e.substring(p,n),o?s.push(l):y("text",l,p)),p=f.lastIndex,!(r=t[1])||(o&&r===o&&(y("cdata",l=s.join(""),m,{tagName:o,attrs:a}),o=null,a=null,s=null),o))if(o)s.push(t[0]);else if(r=t[4]){i=[];for(var w,x=t[5],k=0;w=h.exec(x);){var C=w[1],E=w[2]?w[2]:w[4]?w[4]:"",S=w[3]?w[3]:w[5]?w[5]:w[6]?w[6]:"";i.push({name:C,value:S,quote:E,index:w.index,raw:w[0]}),k+=w[0].length}k===x.length?(y("tagstart",t[0],n,{tagName:r,attrs:i,close:t[6]}),c[r]&&(o=r,a=i.concat(),s=[],m=p)):y("text",t[0],n)}else(t[2]||t[3])&&y("comment",t[0],n,{content:t[2]||t[3],long:!!t[2]});else y("tagend",t[0],n,{tagName:r});e.length>p&&y("text",l=e.substring(p,e.length),p),u.fire("end",{pos:p,line:v,col:e.length-g+1})}addListener(e,t){for(var n,r=this._listeners,i=e.split(/[,\s]/),o=0,a=i.length;o0?(o+=i,n=r[i].length+1):n=e.col+t,{line:o,col:n}}getMapAttrs(e){for(var t,n={},r=0,i=e.length;r{this.error=this.report.bind(this,"error"),this.warn=this.report.bind(this,"warn"),this.info=this.report.bind(this,"info")})}report(e,t,n,r,i,o){for(var a,s,l=this.lines,u=this.brLen,c=n-1,f=l.length;c(s=(a=l[c]).length)&&n element must be present and alt attribute of area[href] and input[type=image] must have a value.",init:function(e,t){var n=this;e.addListener("tagstart",(function(r){var i,o=r.tagName.toLowerCase(),a=e.getMapAttrs(r.attrs),s=r.col+o.length+1;"img"!==o||"alt"in a?("area"===o&&"href"in a||"input"===o&&"image"===a.type)&&("alt"in a&&""!==a.alt||(i="area"===o?"area[href]":"input[type=image]",t.warn("The alt attribute of "+i+" must have a value.",r.line,s,n,r.raw))):t.warn("An alt attribute must be present on elements.",r.line,s,n,r.raw)}))}},s={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init:function(e,t,n){var r=this,i=Array.isArray(n)?n:[];e.addListener("tagstart",(function(e){for(var n,o=e.attrs,a=e.col+e.tagName.length+1,s=0,l=o.length;s"',init:function(e,t){var n=this;function r(e){!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: ""',e.line,e.col,n,e.raw)}e.addListener("all",r),e.addListener("tagstart",(function t(){e.removeListener("comment",r),e.removeListener("tagstart",t)}))}},g={id:"head-script-disabled",description:"The