!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(v){"use strict";v.runMode=function(e,t,n,r){var o=v.getMode(v.defaults,t),c=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9);if(n.appendChild){var l=r&&r.tabSize||v.defaults.tabSize,u=n,f=0;u.innerHTML="",n=function(e,t){if("\n"==e)return u.appendChild(document.createTextNode(c?"\r":e)),void(f=0);for(var n="",r=0;;){var o=e.indexOf("\t",r);if(-1==o){n+=e.slice(r),f+=e.length-r;break}f+=o-r,n+=e.slice(r,o);var a=l-f%l;f+=a;for(var d=0;d<a;++d)n+=" ";r=o+1}if(t){var i=u.appendChild(document.createElement("span"));i.className="cm-"+t.replace(/ +/g," cm-"),i.appendChild(document.createTextNode(n))}else u.appendChild(document.createTextNode(n))}}for(var a=v.splitLines(e),d=r&&r.state||v.startState(o),i=0,s=a.length;i<s;++i){i&&n("\n");var p=new v.StringStream(a[i]);for(!p.string&&o.blankLine&&o.blankLine(d);!p.eol();){var m=o.token(p,d);n(p.current(),m,i,p.start,d),p.start=p.pos}}}});