CodeMirror.defineMode("htmlmixed",function(g){function d(a,b){var d=c.token(a,b.htmlState);/(?:^|\s)tag(?:\s|$)/.test(d)&&(">"==a.current()&&b.htmlState.context)&&(/^script$/i.test(b.htmlState.context.tagName)?(b.token=h,b.localState=e.startState(c.indent(b.htmlState,""))):/^style$/i.test(b.htmlState.context.tagName)&&(b.token=i,b.localState=f.startState(c.indent(b.htmlState,""))));return d}function j(a,b,d){var c=a.current(),e=c.search(b);-1/i,!1)?(b.token=d,b.localState=null,d(a,b)):j(a,/<\/\s*script\s*>/,e.token(a,b.localState))}function i(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=d,b.localState=null,d(a,b)):j(a,/<\/\s*style\s*>/,f.token(a,b.localState))}var c=CodeMirror.getMode(g,{name:"xml",htmlMode:!0}),e=CodeMirror.getMode(g,"javascript"),f=CodeMirror.getMode(g,"css");return{startState:function(){var a=c.startState();return{token:d, localState:null,mode:"html",htmlState:a}},copyState:function(a){if(a.localState)var b=CodeMirror.copyState(a.token==i?f:e,a.localState);return{token:a.token,localState:b,mode:a.mode,htmlState:CodeMirror.copyState(c,a.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return a.token==d||/^\s*<\//.test(b)?c.indent(a.htmlState,b):a.token==h?e.indent(a.localState,b):f.indent(a.localState,b)},electricChars:"/{}:",innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.token== d?c:a.token==h?e:f}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");