-1&&!/\S/.test(c.slice(0,d))&&(u=c.slice(0,d));null!=u&&(u+=r.blockCommentContinue)}if(null==u&&r.lineComment&&n(t)){var c=t.getLine(a.line),d=c.indexOf(r.lineComment);d>-1&&(u=c.slice(0,d),/\S/.test(u)?u=null:u+=r.lineComment+c.slice(d+r.lineComment.length).match(/^\s*/)[0])}if(null==u)return e.Pass;o[l]="\n"+u}t.operation(function(){for(var e=i.length-1;e>=0;e--)t.replaceRange(o[e],i[e].from(),i[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,r,i){if(i&&i!=e.Init&&n.removeKeyMap("continueComment"),r){var o="Enter";"string"==typeof r?o=r:"object"==typeof r&&r.key&&(o=r.key);var l={name:"continueComment"};l[o]=t,n.addKeyMap(l)}})}(CodeMirror),function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos;function i(e){var t=e.search(n);return-1==t?0:t}function o(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=t);for(var n=1/0,i=this.listSelections(),o=null,l=i.length-1;l>=0;l--){var a=i[l].from(),s=i[l].to();a.line>=n||(s.line>=n&&(s=r(n,0)),n=a.line,null==o?this.uncomment(a,s,e)?o="un":(this.lineComment(a,s,e),o="line"):"un"==o?this.uncomment(a,s,e):this.lineComment(a,s,e))}}),e.defineExtension("lineComment",function(e,l,a){a||(a=t);var s=this,u=o(s,e),c=s.getLine(e.line);if(null!=c&&(f=e,h=c,!/\bstring\b/.test(s.getTokenTypeAt(r(f.line,0)))||/^[\'\"\`]/.test(h))){var f,h,d=a.lineComment||u.lineComment;if(d){var p=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,s.lastLine()+1),g=null==a.padding?" ":a.padding,m=a.commentBlankLines||e.line==l.line;s.operation(function(){if(a.indent){for(var t=null,o=e.line;ou.length)&&(t=u)}for(var o=e.line;o
f||a.operation(function(){if(0!=l.fullLines){var t=n.test(a.getLine(f));a.replaceRange(h+c,r(f)),a.replaceRange(u+h,r(e.line,0));var o=l.blockCommentLead||s.blockCommentLead;if(null!=o)for(var d=e.line+1;d<=f;++d)(d!=f||t)&&a.replaceRange(o+h,r(d,0))}else a.replaceRange(c,i),a.replaceRange(u,e)})}}else(l.lineComment||s.lineComment)&&0!=l.fullLines&&a.lineComment(e,i,l)}),e.defineExtension("uncomment",function(e,i,l){l||(l=t);var a,s=this,u=o(s,e),c=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,s.lastLine()),f=Math.min(e.line,c),h=l.lineComment||u.lineComment,d=[],p=null==l.padding?" ":l.padding;e:if(h){for(var g=f;g<=c;++g){var m=s.getLine(g),v=m.indexOf(h);if(v>-1&&!/comment/.test(s.getTokenTypeAt(r(g,v+1)))&&(v=-1),-1==v&&n.test(m))break e;if(v>-1&&n.test(m.slice(0,v)))break e;d.push(m)}if(s.operation(function(){for(var e=f;e<=c;++e){var t=d[e-f],n=t.indexOf(h),i=n+h.length;n<0||(t.slice(i,i+p.length)==p&&(i+=p.length),a=!0,s.replaceRange("",r(e,n),r(e,i)))}}),a)return!0}var y=l.blockCommentStart||u.blockCommentStart,b=l.blockCommentEnd||u.blockCommentEnd;if(!y||!b)return!1;var x=l.blockCommentLead||u.blockCommentLead,w=s.getLine(f),C=w.indexOf(y);if(-1==C)return!1;var k=c==f?w:s.getLine(c),S=k.indexOf(b,c==f?C+y.length:0),L=r(f,C+1),T=r(c,S+1);if(-1==S||!/comment/.test(s.getTokenTypeAt(L))||!/comment/.test(s.getTokenTypeAt(T))||s.getRange(L,T,"\n").indexOf(b)>-1)return!1;var M=w.lastIndexOf(y,e.ch),A=-1==M?-1:w.slice(0,e.ch).indexOf(b,M+y.length);if(-1!=M&&-1!=A&&A+b.length!=e.ch)return!1;A=k.indexOf(b,i.ch);var O=k.slice(i.ch).lastIndexOf(y,A-i.ch);return M=-1==A||-1==O?-1:i.ch+O,(-1==A||-1==M||M==i.ch)&&(s.operation(function(){s.replaceRange("",r(c,S-(p&&k.slice(S-p.length,S)==p?p.length:0)),r(c,S+b.length));var e=C+y.length;if(p&&w.slice(e,e+p.length)==p&&(e+=p.length),s.replaceRange("",r(f,C),r(f,e)),x)for(var t=f+1;t<=c;++t){var i=s.getLine(t),o=i.indexOf(x);if(-1!=o&&!n.test(i.slice(0,o))){var l=o+x.length;p&&i.slice(l,l+p.length)==p&&(l+=p.length),s.replaceRange("",r(t,o),r(t,l))}}}),!0)})}(CodeMirror),function(e){"use strict";e.defineMode("javascript",function(t,n){var r,i,o=t.indentUnit,l=n.statementIndent,a=n.jsonld,s=n.json||a,u=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),l={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:l,false:l,null:l,undefined:l,NaN:l,Infinity:l,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(a&&"@"==e.peek()&&e.match(d))return t.tokenize=g,p("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),p("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==r&&e.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&e.eat(">"))return p("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),p("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),p("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),p("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),p("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),p("comment","comment")):je(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),p("regexp","string-2")):(e.eat("="),p("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),p("error","error");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),p("operator","operator",e.current());if(c.test(r)){e.eatWhile(c);var i=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(i)){var o=f[i];return p(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return p("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return p("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,l=n-1;l>=0;--l){var a=e.string.charAt(l),s=y.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(c.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!i){++l;break}}}o&&!i&&(t.fatArrowAt=l)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function C(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}var k={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function L(){return S.apply(null,arguments),!0}function T(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=k.state;if(k.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function M(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}var A={name:"this",next:{name:"arguments"}};function O(){k.state.context={prev:k.state.context,vars:k.state.localVars},k.state.localVars=A}function N(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function W(e,t){var n=function(){var n=k.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,k.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function D(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function H(e){return function t(n){return n==e?L():";"==e?S():L(t)}}function E(e,t){return"var"==e?L(W("vardef",t.length),de,H(";"),D):"keyword a"==e?L(W("form"),I,E,D):"keyword b"==e?L(W("form"),E,D):"keyword d"==e?k.stream.match(/^\s*$/,!1)?L():L(W("stat"),R,H(";"),D):"debugger"==e?L(H(";")):"{"==e?L(W("}"),te,D):";"==e?L():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==D&&k.state.cc.pop()(),L(W("form"),I,E,D,ye)):"function"==e?L(Se):"for"==e?L(W("form"),be,E,D):"class"==e||u&&"interface"==t?(k.marked="keyword",L(W("form"),Me,D)):"variable"==e?u&&"declare"==t?(k.marked="keyword",L(E)):u&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?L(Re):"type"==t?L(oe,H("operator"),oe,H(";")):L(W("form"),pe,H("{"),W("}"),te,D,D)):u&&"namespace"==t?(k.marked="keyword",L(W("form"),P,te,D)):L(W("stat"),Y):"switch"==e?L(W("form"),I,H("{"),W("}","switch"),te,D,D):"case"==e?L(P,H(":")):"default"==e?L(H(":")):"catch"==e?L(W("form"),O,H("("),Le,H(")"),E,D,N):"export"==e?L(W("stat"),We,D):"import"==e?L(W("stat"),He,D):"async"==e?L(E):"@"==t?L(P,E):S(W("stat"),P,H(";"),D)}function P(e,t){return z(e,t,!1)}function F(e,t){return z(e,t,!0)}function I(e){return"("!=e?S():L(W(")"),P,H(")"),D)}function z(e,t,n){if(k.state.fatArrowAt==k.stream.start){var r=n?K:U;if("("==e)return L(O,W(")"),J(Le,")"),D,H("=>"),r,N);if("variable"==e)return S(O,pe,H("=>"),r,N)}var i=n?j:B;return x.hasOwnProperty(e)?L(i):"function"==e?L(Se,i):"class"==e||u&&"interface"==t?(k.marked="keyword",L(W("form"),Te,D)):"keyword c"==e||"async"==e?L(n?F:P):"("==e?L(W(")"),R,H(")"),D,i):"operator"==e||"spread"==e?L(n?F:P):"["==e?L(W("]"),ze,D,i):"{"==e?ee(q,"}",null,i):"quasi"==e?S(V,i):"new"==e?L(function(e){return function(t){return"."==t?L(e?$:X):"variable"==t&&u?L(ce,e?j:B):S(e?F:P)}}(n)):"import"==e?L(P):L()}function R(e){return e.match(/[;\}\)\],]/)?S():S(P)}function B(e,t){return","==e?L(P):j(e,t,!1)}function j(e,t,n){var r=0==n?B:j,i=0==n?P:F;return"=>"==e?L(O,n?K:U,N):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?L(r):u&&"<"==t&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?L(W(">"),J(oe,">"),D,r):"?"==t?L(P,H(":"),i):L(i):"quasi"==e?S(V,r):";"!=e?"("==e?ee(F,")","call",r):"."==e?L(_,r):"["==e?L(W("]"),R,H("]"),D,r):u&&"as"==t?(k.marked="keyword",L(oe,r)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),L(i)):void 0:void 0}function V(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?L(V):L(P,G)}function G(e){if("}"==e)return k.marked="string-2",k.state.tokenize=v,L(V)}function U(e){return b(k.stream,k.state),S("{"==e?E:P)}function K(e){return b(k.stream,k.state),S("{"==e?E:F)}function X(e,t){if("target"==t)return k.marked="keyword",L(B)}function $(e,t){if("target"==t)return k.marked="keyword",L(j)}function Y(e){return":"==e?L(D,E):S(B,H(";"),D)}function _(e){if("variable"==e)return k.marked="property",L()}function q(e,t){if("async"==e)return k.marked="property",L(q);if("variable"==e||"keyword"==k.style){return k.marked="property","get"==t||"set"==t?L(Z):(u&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),L(Q));var n}else{if("number"==e||"string"==e)return k.marked=a?"property":k.style+" property",L(Q);if("jsonld-keyword"==e)return L(Q);if(u&&M(t))return k.marked="keyword",L(q);if("["==e)return L(P,ne,H("]"),Q);if("spread"==e)return L(F,Q);if("*"==t)return k.marked="keyword",L(q);if(":"==e)return S(Q)}}function Z(e){return"variable"!=e?S(Q):(k.marked="property",L(Se))}function Q(e){return":"==e?L(F):"("==e?S(Se):void 0}function J(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var l=k.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),L(function(n,r){return n==t||r==t?S():S(e)},r)}return i==t||o==t?L():L(H(t))}return function(n,i){return n==t||i==t?L():S(e,r)}}function ee(e,t,n){for(var r=3;r"==e)return L(oe)}function ae(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",L(ae)):"?"==t?L(ae):":"==e?L(oe):"["==e?L(P,ne,H("]"),ae):void 0}function se(e){return"variable"==e?L(se):":"==e?L(oe):void 0}function ue(e,t){return"<"==t?L(W(">"),J(oe,">"),D,ue):"|"==t||"."==e||"&"==t?L(oe):"["==e?L(H("]"),ue):"extends"==t||"implements"==t?(k.marked="keyword",L(oe)):void 0}function ce(e,t){if("<"==t)return L(W(">"),J(oe,">"),D,ue)}function fe(){return S(oe,he)}function he(e,t){if("="==t)return L(oe)}function de(e,t){return"enum"==t?(k.marked="keyword",L(Re)):S(pe,ne,me,ve)}function pe(e,t){return u&&M(t)?(k.marked="keyword",L(pe)):"variable"==e?(T(t),L()):"spread"==e?L(pe):"["==e?ee(pe,"]"):"{"==e?ee(ge,"}"):void 0}function ge(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?L(pe):"}"==e?S():L(H(":"),pe,me)):(T(t),L(me))}function me(e,t){if("="==t)return L(F)}function ve(e){if(","==e)return L(de)}function ye(e,t){if("keyword b"==e&&"else"==t)return L(W("form","else"),E,D)}function be(e,t){return"await"==t?L(be):"("==e?L(W(")"),xe,H(")"),D):void 0}function xe(e){return"var"==e?L(de,H(";"),Ce):";"==e?L(Ce):"variable"==e?L(we):S(P,H(";"),Ce)}function we(e,t){return"in"==t||"of"==t?(k.marked="keyword",L(P)):L(B,Ce)}function Ce(e,t){return";"==e?L(ke):"in"==t||"of"==t?(k.marked="keyword",L(P)):S(P,H(";"),ke)}function ke(e){")"!=e&&L(P)}function Se(e,t){return"*"==t?(k.marked="keyword",L(Se)):"variable"==e?(T(t),L(Se)):"("==e?L(O,W(")"),J(Le,")"),D,re,E,N):u&&"<"==t?L(W(">"),J(fe,">"),D,Se):void 0}function Le(e,t){return"@"==t&&L(P,Le),"spread"==e?L(Le):u&&M(t)?(k.marked="keyword",L(Le)):S(pe,ne,me)}function Te(e,t){return"variable"==e?Me(e,t):Ae(e,t)}function Me(e,t){if("variable"==e)return T(t),L(Ae)}function Ae(e,t){return"<"==t?L(W(">"),J(fe,">"),D,Ae):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(k.marked="keyword"),L(u?oe:P,Ae)):"{"==e?L(W("}"),Oe,D):void 0}function Oe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&M(t))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",L(Oe)):"variable"==e||"keyword"==k.style?(k.marked="property",L(u?Ne:Se,Oe)):"["==e?L(P,ne,H("]"),u?Ne:Se,Oe):"*"==t?(k.marked="keyword",L(Oe)):";"==e?L(Oe):"}"==e?L():"@"==t?L(P,Oe):void 0}function Ne(e,t){return"?"==t?L(Ne):":"==e?L(oe,me):"="==t?L(F):S(Se)}function We(e,t){return"*"==t?(k.marked="keyword",L(Ie,H(";"))):"default"==t?(k.marked="keyword",L(P,H(";"))):"{"==e?L(J(De,"}"),Ie,H(";")):S(E)}function De(e,t){return"as"==t?(k.marked="keyword",L(H("variable"))):"variable"==e?S(F,De):void 0}function He(e){return"string"==e?L():"("==e?S(P):S(Ee,Pe,Ie)}function Ee(e,t){return"{"==e?ee(Ee,"}"):("variable"==e&&T(t),"*"==t&&(k.marked="keyword"),L(Fe))}function Pe(e){if(","==e)return L(Ee,Pe)}function Fe(e,t){if("as"==t)return k.marked="keyword",L(Ee)}function Ie(e,t){if("from"==t)return k.marked="keyword",L(P)}function ze(e){return"]"==e?L():S(J(F,"]"))}function Re(){return S(W("form"),pe,H("{"),W("}"),J(Be,"}"),D,D)}function Be(){return S(pe,me)}function je(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return D.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var o=e.cc;for(k.state=e,k.stream=i,k.marked=null,k.cc=o,k.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var l=o.length?o.pop():s?P:E;if(l(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&C(e,r)?"variable-2":t}}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i,a=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==D)s=s.prev;else if(c!=ye)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==B||i==j)&&!/^[,\.=+\-*:?[\(]/.test(r));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?l||o:0):"switch"!=s.info||d||0==n.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:je,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=P&&t!=F||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(CodeMirror)}]);
\ No newline at end of file
diff --git a/_server/CodeMirror/codemirror.css b/_server/CodeMirror/codemirror.css
new file mode 100644
index 00000000..c7a8ae70
--- /dev/null
+++ b/_server/CodeMirror/codemirror.css
@@ -0,0 +1,346 @@
+/* BASICS */
+
+.CodeMirror {
+ /* Set height, width, borders, and global font properties here */
+ font-family: monospace;
+ height: 300px;
+ color: black;
+ direction: ltr;
+}
+
+/* PADDING */
+
+.CodeMirror-lines {
+ padding: 4px 0; /* Vertical padding around content */
+}
+.CodeMirror pre {
+ padding: 0 4px; /* Horizontal padding of content */
+}
+
+.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+ background-color: white; /* The little square between H and V scrollbars */
+}
+
+/* GUTTER */
+
+.CodeMirror-gutters {
+ border-right: 1px solid #ddd;
+ background-color: #f7f7f7;
+ white-space: nowrap;
+}
+.CodeMirror-linenumbers {}
+.CodeMirror-linenumber {
+ padding: 0 3px 0 5px;
+ min-width: 20px;
+ text-align: right;
+ color: #999;
+ white-space: nowrap;
+}
+
+.CodeMirror-guttermarker { color: black; }
+.CodeMirror-guttermarker-subtle { color: #999; }
+
+/* CURSOR */
+
+.CodeMirror-cursor {
+ border-left: 1px solid black;
+ border-right: none;
+ width: 0;
+}
+/* Shown when moving in bi-directional text */
+.CodeMirror div.CodeMirror-secondarycursor {
+ border-left: 1px solid silver;
+}
+.cm-fat-cursor .CodeMirror-cursor {
+ width: auto;
+ border: 0 !important;
+ background: #7e7;
+}
+.cm-fat-cursor div.CodeMirror-cursors {
+ z-index: 1;
+}
+.cm-fat-cursor-mark {
+ background-color: rgba(20, 255, 20, 0.5);
+ -webkit-animation: blink 1.06s steps(1) infinite;
+ -moz-animation: blink 1.06s steps(1) infinite;
+ animation: blink 1.06s steps(1) infinite;
+}
+.cm-animate-fat-cursor {
+ width: auto;
+ border: 0;
+ -webkit-animation: blink 1.06s steps(1) infinite;
+ -moz-animation: blink 1.06s steps(1) infinite;
+ animation: blink 1.06s steps(1) infinite;
+ background-color: #7e7;
+}
+@-moz-keyframes blink {
+ 0% {}
+ 50% { background-color: transparent; }
+ 100% {}
+}
+@-webkit-keyframes blink {
+ 0% {}
+ 50% { background-color: transparent; }
+ 100% {}
+}
+@keyframes blink {
+ 0% {}
+ 50% { background-color: transparent; }
+ 100% {}
+}
+
+/* Can style cursor different in overwrite (non-insert) mode */
+.CodeMirror-overwrite .CodeMirror-cursor {}
+
+.cm-tab { display: inline-block; text-decoration: inherit; }
+
+.CodeMirror-rulers {
+ position: absolute;
+ left: 0; right: 0; top: -50px; bottom: -20px;
+ overflow: hidden;
+}
+.CodeMirror-ruler {
+ border-left: 1px solid #ccc;
+ top: 0; bottom: 0;
+ position: absolute;
+}
+
+/* DEFAULT THEME */
+
+.cm-s-default .cm-header {color: blue;}
+.cm-s-default .cm-quote {color: #090;}
+.cm-negative {color: #d44;}
+.cm-positive {color: #292;}
+.cm-header, .cm-strong {font-weight: bold;}
+.cm-em {font-style: italic;}
+.cm-link {text-decoration: underline;}
+.cm-strikethrough {text-decoration: line-through;}
+
+.cm-s-default .cm-keyword {color: #708;}
+.cm-s-default .cm-atom {color: #219;}
+.cm-s-default .cm-number {color: #164;}
+.cm-s-default .cm-def {color: #00f;}
+.cm-s-default .cm-variable,
+.cm-s-default .cm-punctuation,
+.cm-s-default .cm-property,
+.cm-s-default .cm-operator {}
+.cm-s-default .cm-variable-2 {color: #05a;}
+.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
+.cm-s-default .cm-comment {color: #a50;}
+.cm-s-default .cm-string {color: #a11;}
+.cm-s-default .cm-string-2 {color: #f50;}
+.cm-s-default .cm-meta {color: #555;}
+.cm-s-default .cm-qualifier {color: #555;}
+.cm-s-default .cm-builtin {color: #30a;}
+.cm-s-default .cm-bracket {color: #997;}
+.cm-s-default .cm-tag {color: #170;}
+.cm-s-default .cm-attribute {color: #00c;}
+.cm-s-default .cm-hr {color: #999;}
+.cm-s-default .cm-link {color: #00c;}
+
+.cm-s-default .cm-error {color: #f00;}
+.cm-invalidchar {color: #f00;}
+
+.CodeMirror-composing { border-bottom: 2px solid; }
+
+/* Default styles for common addons */
+
+div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
+div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
+.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
+.CodeMirror-activeline-background {background: #e8f2ff;}
+
+/* STOP */
+
+/* The rest of this file contains styles related to the mechanics of
+ the editor. You probably shouldn't touch them. */
+
+.CodeMirror {
+ position: relative;
+ overflow: hidden;
+ background: white;
+}
+
+.CodeMirror-scroll {
+ overflow: scroll !important; /* Things will break if this is overridden */
+ /* 30px is the magic margin used to hide the element's real scrollbars */
+ /* See overflow: hidden in .CodeMirror */
+ margin-bottom: -30px; margin-right: -30px;
+ padding-bottom: 30px;
+ height: 100%;
+ outline: none; /* Prevent dragging from highlighting the element */
+ position: relative;
+}
+.CodeMirror-sizer {
+ position: relative;
+ border-right: 30px solid transparent;
+}
+
+/* The fake, visible scrollbars. Used to force redraw during scrolling
+ before actual scrolling happens, thus preventing shaking and
+ flickering artifacts. */
+.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+ position: absolute;
+ z-index: 6;
+ display: none;
+}
+.CodeMirror-vscrollbar {
+ right: 0; top: 0;
+ overflow-x: hidden;
+ overflow-y: scroll;
+}
+.CodeMirror-hscrollbar {
+ bottom: 0; left: 0;
+ overflow-y: hidden;
+ overflow-x: scroll;
+}
+.CodeMirror-scrollbar-filler {
+ right: 0; bottom: 0;
+}
+.CodeMirror-gutter-filler {
+ left: 0; bottom: 0;
+}
+
+.CodeMirror-gutters {
+ position: absolute; left: 0; top: 0;
+ min-height: 100%;
+ z-index: 3;
+}
+.CodeMirror-gutter {
+ white-space: normal;
+ height: 100%;
+ display: inline-block;
+ vertical-align: top;
+ margin-bottom: -30px;
+}
+.CodeMirror-gutter-wrapper {
+ position: absolute;
+ z-index: 4;
+ background: none !important;
+ border: none !important;
+}
+.CodeMirror-gutter-background {
+ position: absolute;
+ top: 0; bottom: 0;
+ z-index: 4;
+}
+.CodeMirror-gutter-elt {
+ position: absolute;
+ cursor: default;
+ z-index: 4;
+}
+.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
+.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
+
+.CodeMirror-lines {
+ cursor: text;
+ min-height: 1px; /* prevents collapsing before first draw */
+}
+.CodeMirror pre {
+ /* Reset some styles that the rest of the page might have set */
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
+ border-width: 0;
+ background: transparent;
+ font-family: inherit;
+ font-size: inherit;
+ margin: 0;
+ white-space: pre;
+ word-wrap: normal;
+ line-height: inherit;
+ color: inherit;
+ z-index: 2;
+ position: relative;
+ overflow: visible;
+ -webkit-tap-highlight-color: transparent;
+ -webkit-font-variant-ligatures: contextual;
+ font-variant-ligatures: contextual;
+}
+.CodeMirror-wrap pre {
+ word-wrap: break-word;
+ white-space: pre-wrap;
+ word-break: normal;
+}
+
+.CodeMirror-linebackground {
+ position: absolute;
+ left: 0; right: 0; top: 0; bottom: 0;
+ z-index: 0;
+}
+
+.CodeMirror-linewidget {
+ position: relative;
+ z-index: 2;
+ padding: 0.1px; /* Force widget margins to stay inside of the container */
+}
+
+.CodeMirror-widget {}
+
+.CodeMirror-rtl pre { direction: rtl; }
+
+.CodeMirror-code {
+ outline: none;
+}
+
+/* Force content-box sizing for the elements where we expect it */
+.CodeMirror-scroll,
+.CodeMirror-sizer,
+.CodeMirror-gutter,
+.CodeMirror-gutters,
+.CodeMirror-linenumber {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+.CodeMirror-measure {
+ position: absolute;
+ width: 100%;
+ height: 0;
+ overflow: hidden;
+ visibility: hidden;
+}
+
+.CodeMirror-cursor {
+ position: absolute;
+ pointer-events: none;
+}
+.CodeMirror-measure pre { position: static; }
+
+div.CodeMirror-cursors {
+ visibility: hidden;
+ position: relative;
+ z-index: 3;
+}
+div.CodeMirror-dragcursors {
+ visibility: visible;
+}
+
+.CodeMirror-focused div.CodeMirror-cursors {
+ visibility: visible;
+}
+
+.CodeMirror-selected { background: #d9d9d9; }
+.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
+.CodeMirror-crosshair { cursor: crosshair; }
+.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
+.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
+
+.cm-searching {
+ background-color: #ffa;
+ background-color: rgba(255, 255, 0, .4);
+}
+
+/* Used to force a border model for a node */
+.cm-force-border { padding-right: .1px; }
+
+@media print {
+ /* Hide the cursor when printing */
+ .CodeMirror div.CodeMirror-cursors {
+ visibility: hidden;
+ }
+}
+
+/* See issue #2901 */
+.cm-tab-wrap-hack:after { content: ''; }
+
+/* Help users use markselection to safely style text background */
+span.CodeMirror-selectedtext { background: none; }
diff --git a/_server/README.md b/_server/README.md
new file mode 100644
index 00000000..4079db9c
--- /dev/null
+++ b/_server/README.md
@@ -0,0 +1,184 @@
+# editor
+
+本目录下所有文件,以及`../editor.html`和`../启动服务.exe`([源码](http://github.com/ckcz123/mota-js-server/))是地图编辑器的所有组件.
+
+`editor.js`,`editor_file.js`和`editor_mode.js`耦合较强,`editor_blockly.js`和`editor_multi.js`和`fs.js`基本可以独立使用.
+
+## 各组件功能
+
+### 总体上
+
+以`display:none`的形式引入了`index.html`的`dom`,修改了原来的`.gameCanvas #ui #data`等的名字以避免冲突
+
+通过`main.init('editor')`加载数据
+
+`editor`模式关闭了部分动画
+
+`core.drawMap`中`editor`模式下不再画图,而是生成画图的函数提供给`editor`
+
+`editor`模式下`GlobalAnimate`可以独立的选择是否播放
+
+`core.playBgm`和`core.playSound`中非`play`模式不再播放声音
+
+`core.show`和`core.hide`中非`play`模式不再进行动画而是立刻完成并执行回调
+
+`editor`模式不执行`core.resize`
+
+### editor.js
+
+``` js
+editor.mapInit();//清空地图
+editor.changeFloor('MT2')//切换地图
+editor.guid()//产生一个可以作为id的长随机字符串
+```
+
+`editor.updateMap`中画未定义快的报错
+
+### editor_file.js
+
+提供了以下函数进行楼层`map`数组相关的操作
+```javascript
+editor.file.getFloorFileList
+editor.file.loadFloorFile
+editor.file.saveFloorFile
+editor.file.saveFloorFileAs
+```
+
+编辑模式有关的查询
+```javascript
+editor.file.editItem('redJewel',[],function(a){console.log(a)});
+editor.file.editEnemy('redBat',[],function(a){console.log(a)});
+editor.file.editLoc(2,0,[],function(a){console.log(a)});
+editor.file.editFloor([],function(a){console.log(a)});
+editor.file.editTower([],function(a){console.log(a)});
+editor.file.editFunctions([],function(a){console.log(a)});
+```
+
+编辑模式有关的编辑
+```javascript
+editor.info={images: "terrains", y: 9};
+editor.file.changeIdAndIdnum('yellowWall2',16,editor.info,function(a){console.log(a)});
+editor.file.editItem('book',[["change","['items']['name']","怪物手册的新名字"]],function(a){console.log(a)});
+editor.file.editEnemy('redBat',[['change',"['atk']",20]],function(a){console.log(a)});
+editor.file.editLoc(2,6,[["change","['afterBattle']",null]],function(a){console.log(a)});
+editor.file.editFloor([["change","['title']",'样板 33 层']],function(a){console.log(a)});
+editor.file.editTower([["change","['values']['lavaDamage']",200]],function(a){console.log(a)});
+editor.file.editFunctions(["change","['events']['afterChangeLight']","function(x,y){console.log(x,y)}"],function(a){console.log(a)});
+```
+
+### editor_mode.js
+生成表格并绑定事件的函数
+```javascript
+editor.mode.loc();
+editor.mode.emenyitem();
+editor.mode.floor();
+editor.mode.tower();
+editor.mode.functions();
+```
+
+切换模式
+```javascript
+editor.mode.onmode('');//清空
+editor.mode.onmode('save');//保存
+editor.mode.onmode('nextChange');//下次onmode时前端进行切换
+
+editor.mode.onmode('loc');
+editor.mode.onmode('emenyitem');
+editor.mode.onmode('floor');
+editor.mode.onmode('tower');
+editor.mode.onmode('functions');
+editor.mode.onmode('map');
+editor.mode.onmode('appendpic');
+```
+在`onmode('save')`时,改动才会保存到文件,涉及到图片的改动需要刷新页面使得`editor`能看到
+
+表格的`onchange`的实现中,获得当前模式的方式.不注意的话,修改`index.html`中页面的结构,会被坑
+```javascript
+var node = thisTr.parentNode;
+while (!editor_mode._ids.hasOwnProperty(node.getAttribute('id'))) {
+ node = node.parentNode;
+}
+editor_mode.onmode(editor_mode._ids[node.getAttribute('id')]);
+```
+
+`editor.mode.listen`中提供了追加素材的支持.
+
+处理注释的特殊指令
+```
+$range(evalstr:thiseval)$end
+ 限制取值范围,要求修改后的eval(evalstr)为true
+$leaf(evalstr:thiseval)$end
+ 强制指定为叶节点,如果eval(evalstr)为true
+
+//以下几个中选一个 [
+$select(evalstr)$end
+ 渲染成