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