$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&function(e,t){for(var r=0;r-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}(e,m,t.localMode.token(e,t.localState))},o.localMode=p,o.localState=e.startState(p,l.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return u}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(l)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(l,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?l.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||l}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,u=r.typescript,c=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e,t,r){return n=e,i=r,t}function g(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(l&&"@"==e.peek()&&e.match(h))return t.tokenize=g,p("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=g),p("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==n&&e.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&e.eat(">"))return p("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return p("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),p("number","number");if("/"==n)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),p("comment","comment")):_e(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(e.eat("="),p("operator","operator",e.current()));if("`"==n)return t.tokenize=v,v(e,t);if("#"==n)return e.skipToEnd(),p("error","error");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),p("operator","operator",e.current());if(c.test(n)){e.eatWhile(c);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[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 r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=g;break}n="*"==r}return p("comment","comment")}function v(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=g;break}n=!n&&"\\"==r}return p("quasi","string-2",e.current())}function y(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s="([{}])".indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(c.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var b={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function x(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var k={state:null,column:null,marked:null,cc:null};function C(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function S(){return C.apply(null,arguments),!0}function L(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function T(e){var t=k.state;if(k.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new N(n,r.vars,!0):null}return L(t,r.vars)?r:new N(r.prev,new A(t,r.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!L(e,t.localVars))return void(t.localVars=new A(e,t.localVars));r.globalVars&&!L(e,t.globalVars)&&(t.globalVars=new A(e,t.globalVars))}function M(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function N(e,t,r){this.prev=e,this.vars=t,this.block=r}function A(e,t){this.name=e,this.next=t}var O=new A("this",new A("arguments",null));function W(){k.state.context=new N(k.state.context,k.state.localVars,!1),k.state.localVars=O}function z(){k.state.context=new N(k.state.context,k.state.localVars,!0),k.state.localVars=null}function D(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function P(e,t){var r=function(){var r=k.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new w(n,k.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function H(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function I(e){return function t(r){return r==e?S():";"==e||"}"==r||")"==r||"]"==r?C():S(t)}}function E(e,t){return"var"==e?S(P("vardef",t),ve,I(";"),H):"keyword a"==e?S(P("form"),j,E,H):"keyword b"==e?S(P("form"),E,H):"keyword d"==e?k.stream.match(/^\s*$/,!1)?S():S(P("stat"),K,I(";"),H):"debugger"==e?S(I(";")):"{"==e?S(P("}"),z,oe,H,D):";"==e?S():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==H&&k.state.cc.pop()(),S(P("form"),j,E,H,Ce)):"function"==e?S(Ae):"for"==e?S(P("form"),Se,E,H):"class"==e||u&&"interface"==t?(k.marked="keyword",S(P("form","class"==e?e:t),Pe,H)):"variable"==e?u&&"declare"==t?(k.marked="keyword",S(E)):u&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?S(qe):"type"==t?S(We,I("operator"),ue,I(";")):S(P("form"),ye,I("{"),P("}"),oe,H,H)):u&&"namespace"==t?(k.marked="keyword",S(P("form"),R,E,H)):u&&"abstract"==t?(k.marked="keyword",S(E)):S(P("stat"),Q):"switch"==e?S(P("form"),j,I("{"),P("}","switch"),z,oe,H,H,D):"case"==e?S(R,I(":")):"default"==e?S(I(":")):"catch"==e?S(P("form"),W,F,E,H,D):"export"==e?S(P("stat"),Fe,H):"import"==e?S(P("stat"),Be,H):"async"==e?S(E):"@"==t?S(R,E):C(P("stat"),R,I(";"),H)}function F(e){if("("==e)return S(ze,I(")"))}function R(e,t){return V(e,t,!1)}function B(e,t){return V(e,t,!0)}function j(e){return"("!=e?C():S(P(")"),R,I(")"),H)}function V(e,t,r){if(k.state.fatArrowAt==k.stream.start){var n=r?X:_;if("("==e)return S(W,P(")"),ne(ze,")"),H,I("=>"),n,D);if("variable"==e)return C(W,ye,I("=>"),n,D)}var i=r?U:G;return b.hasOwnProperty(e)?S(i):"function"==e?S(Ae,i):"class"==e||u&&"interface"==t?(k.marked="keyword",S(P("form"),De,H)):"keyword c"==e||"async"==e?S(r?B:R):"("==e?S(P(")"),K,I(")"),H,i):"operator"==e||"spread"==e?S(r?B:R):"["==e?S(P("]"),Ue,H,i):"{"==e?ie(ee,"}",null,i):"quasi"==e?C(q,i):"new"==e?S(function(e){return function(t){return"."==t?S(e?Z:Y):"variable"==t&&u?S(pe,e?U:G):C(e?B:R)}}(r)):"import"==e?S(R):S()}function K(e){return e.match(/[;\}\)\],]/)?C():C(R)}function G(e,t){return","==e?S(R):U(e,t,!1)}function U(e,t,r){var n=0==r?G:U,i=0==r?R:B;return"=>"==e?S(W,r?X:_,D):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?S(n):u&&"<"==t&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?S(P(">"),ne(ue,">"),H,n):"?"==t?S(R,I(":"),i):S(i):"quasi"==e?C(q,n):";"!=e?"("==e?ie(B,")","call",n):"."==e?S(J,n):"["==e?S(P("]"),K,I("]"),H,n):u&&"as"==t?(k.marked="keyword",S(ue,n)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),S(i)):void 0:void 0}function q(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?S(q):S(R,$)}function $(e){if("}"==e)return k.marked="string-2",k.state.tokenize=v,S(q)}function _(e){return y(k.stream,k.state),C("{"==e?E:R)}function X(e){return y(k.stream,k.state),C("{"==e?E:B)}function Y(e,t){if("target"==t)return k.marked="keyword",S(G)}function Z(e,t){if("target"==t)return k.marked="keyword",S(U)}function Q(e){return":"==e?S(H,E):C(G,I(";"),H)}function J(e){if("variable"==e)return k.marked="property",S()}function ee(e,t){return"async"==e?(k.marked="property",S(ee)):"variable"==e||"keyword"==k.style?(k.marked="property","get"==t||"set"==t?S(te):(u&&k.state.fatArrowAt==k.stream.start&&(r=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+r[0].length),S(re))):"number"==e||"string"==e?(k.marked=l?"property":k.style+" property",S(re)):"jsonld-keyword"==e?S(re):u&&M(t)?(k.marked="keyword",S(ee)):"["==e?S(R,ae,I("]"),re):"spread"==e?S(B,re):"*"==t?(k.marked="keyword",S(ee)):":"==e?C(re):void 0;var r}function te(e){return"variable"!=e?C(re):(k.marked="property",S(Ae))}function re(e){return":"==e?S(B):"("==e?C(Ae):void 0}function ne(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=k.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S((function(r,n){return r==t||n==t?C():C(e)}),n)}return i==t||o==t?S():r&&r.indexOf(";")>-1?C(e):S(I(t))}return function(r,i){return r==t||i==t?S():C(e,n)}}function ie(e,t,r){for(var n=3;n"),ue):void 0}function ce(e){if("=>"==e)return S(ue)}function de(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",S(de)):"?"==t||"number"==e||"string"==e?S(de):":"==e?S(ue):"["==e?S(I("variable"),ae,I("]"),de):"("==e?C(Oe,de):void 0}function fe(e,t){return"variable"==e&&k.stream.match(/^\s*[?:]/,!1)||"?"==t?S(fe):":"==e?S(ue):"spread"==e?S(fe):C(ue)}function he(e,t){return"<"==t?S(P(">"),ne(ue,">"),H,he):"|"==t||"."==e||"&"==t?S(ue):"["==e?S(ue,I("]"),he):"extends"==t||"implements"==t?(k.marked="keyword",S(ue)):"?"==t?S(ue,I(":"),ue):void 0}function pe(e,t){if("<"==t)return S(P(">"),ne(ue,">"),H,he)}function ge(){return C(ue,me)}function me(e,t){if("="==t)return S(ue)}function ve(e,t){return"enum"==t?(k.marked="keyword",S(qe)):C(ye,ae,xe,ke)}function ye(e,t){return u&&M(t)?(k.marked="keyword",S(ye)):"variable"==e?(T(t),S()):"spread"==e?S(ye):"["==e?ie(we,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?S(ye):"}"==e?C():"["==e?S(R,I("]"),I(":"),be):S(I(":"),ye,xe)):(T(t),S(xe))}function we(){return C(ye,xe)}function xe(e,t){if("="==t)return S(B)}function ke(e){if(","==e)return S(ve)}function Ce(e,t){if("keyword b"==e&&"else"==t)return S(P("form","else"),E,H)}function Se(e,t){return"await"==t?S(Se):"("==e?S(P(")"),Le,I(")"),H):void 0}function Le(e){return"var"==e?S(ve,I(";"),Me):";"==e?S(Me):"variable"==e?S(Te):C(R,I(";"),Me)}function Te(e,t){return"in"==t||"of"==t?(k.marked="keyword",S(R)):S(G,Me)}function Me(e,t){return";"==e?S(Ne):"in"==t||"of"==t?(k.marked="keyword",S(R)):C(R,I(";"),Ne)}function Ne(e){")"!=e&&S(R)}function Ae(e,t){return"*"==t?(k.marked="keyword",S(Ae)):"variable"==e?(T(t),S(Ae)):"("==e?S(W,P(")"),ne(ze,")"),H,le,E,D):u&&"<"==t?S(P(">"),ne(ge,">"),H,Ae):void 0}function Oe(e,t){return"*"==t?(k.marked="keyword",S(Oe)):"variable"==e?(T(t),S(Oe)):"("==e?S(W,P(")"),ne(ze,")"),H,le,D):u&&"<"==t?S(P(">"),ne(ge,">"),H,Oe):void 0}function We(e,t){return"keyword"==e||"variable"==e?(k.marked="type",S(We)):"<"==t?S(P(">"),ne(ge,">"),H):void 0}function ze(e,t){return"@"==t&&S(R,ze),"spread"==e?S(ze):u&&M(t)?(k.marked="keyword",S(ze)):C(ye,ae,xe)}function De(e,t){return"variable"==e?Pe(e,t):He(e,t)}function Pe(e,t){if("variable"==e)return T(t),S(He)}function He(e,t){return"<"==t?S(P(">"),ne(ge,">"),H,He):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(k.marked="keyword"),S(u?ue:R,He)):"{"==e?S(P("}"),Ie,H):void 0}function Ie(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",S(Ie)):"variable"==e||"keyword"==k.style?(k.marked="property",S(u?Ee:Ae,Ie)):"number"==e||"string"==e?S(u?Ee:Ae,Ie):"["==e?S(R,ae,I("]"),u?Ee:Ae,Ie):"*"==t?(k.marked="keyword",S(Ie)):u&&"("==e?C(Oe,Ie):";"==e||","==e?S(Ie):"}"==e?S():"@"==t?S(R,Ie):void 0}function Ee(e,t){if("?"==t)return S(Ee);if(":"==e)return S(ue,xe);if("="==t)return S(B);var r=k.state.lexical.prev;return C(r&&"interface"==r.info?Oe:Ae)}function Fe(e,t){return"*"==t?(k.marked="keyword",S(Ge,I(";"))):"default"==t?(k.marked="keyword",S(R,I(";"))):"{"==e?S(ne(Re,"}"),Ge,I(";")):C(E)}function Re(e,t){return"as"==t?(k.marked="keyword",S(I("variable"))):"variable"==e?C(B,Re):void 0}function Be(e){return"string"==e?S():"("==e?C(R):C(je,Ve,Ge)}function je(e,t){return"{"==e?ie(je,"}"):("variable"==e&&T(t),"*"==t&&(k.marked="keyword"),S(Ke))}function Ve(e){if(","==e)return S(je,Ve)}function Ke(e,t){if("as"==t)return k.marked="keyword",S(je)}function Ge(e,t){if("from"==t)return k.marked="keyword",S(R)}function Ue(e){return"]"==e?S():C(ne(B,"]"))}function qe(){return C(P("form"),ye,I("{"),P("}"),ne($e,"}"),H,H)}function $e(){return C(ye,xe)}function _e(e,t,r){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-(r||0)))}return D.lex=!0,H.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new N(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),y(e,t)),t.tokenize!=m&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,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);;){if((o.length?o.pop():s?R:E)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==r&&x(e,n)?"variable-2":t}}}(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==H)s=s.prev;else if(c!=Ce)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(i=t.cc[t.cc.length-1])&&(i==G||i==U)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,h=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+o:"stat"==d?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?a||o:0):"switch"!=s.info||h||0==r.doubleIndentSwitch?s.align?s.column+(h?0:1):s.indented+(h?0:o):s.indented+(/^(?:case|default)\b/.test(n)?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:l,jsonMode:s,expressionAllowed:_e,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=R&&t!=B||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})})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,i){var o,a,l=n.indentUnit,s={},u=i.htmlMode?t:r;for(var c in u)s[c]=u[c];for(var c in i)s[c]=i[c];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(h("atom","]]>")):null:e.match("--")?r(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(function e(t){return function(r,n){for(var i;null!=(i=r.next());){if("<"==i)return n.tokenize=e(t+1),n.tokenize(r,n);if(">"==i){if(1==t){n.tokenize=d;break}return n.tokenize=e(t-1),n.tokenize(r,n)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var r,n,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(r=i,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=f;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function p(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!s.contextGrabbers.hasOwnProperty(r)||!s.contextGrabbers[r].hasOwnProperty(t))return;g(e)}}function v(e,t,r){return"openTag"==e?(r.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",k):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,t,r)):(a="error",y)}function b(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&s.implicitlyClosed.hasOwnProperty(r.context.tagName)&&g(r),r.context&&r.context.tagName==n||!1===s.matchClosing?(a="tag",w):(a="tag error",x)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",w(e,t,r)):(a="error",x)}function w(e,t,r){return"endTag"!=e?(a="error",w):(g(r),v)}function x(e,t,r){return a="error",w(e,0,r)}function k(e,t,r){if("word"==e)return a="attribute",C;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(n)?m(r,n):(m(r,n),r.context=new p(r,n,i==r.indented)),v}return a="error",k}function C(e,t,r){return"equals"==e?S:(s.allowMissing||(a="error"),k(e,0,r))}function S(e,t,r){return"string"==e?L:"word"==e&&s.allowUnquoted?(a="string",k):(a="error",k(e,0,r))}function L(e,t,r){return"string"==e?L:k(e,0,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=k)}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}))HTML Editor
Preview