Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/addon/runmode/runmode",["module","exports","require","../../lib/codemirror"],(function(e,t,r){var n,o=void 0;window;n=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 f=c.appendChild(document.createElement("span"));f.className="cm-"+t.replace(/ +/g," cm-"),f.appendChild(document.createTextNode(r))}else c.appendChild(document.createTextNode(r))}}for(var u=e.splitLines(t),f=o&&o.state||e.startState(a),m=0,s=u.length;m<s;++m){m&&n("\n");var p=new e.StringStream(u[m],null,{lookAhead:function(e){return u[m+e]},baseToken:function(){}});for(!p.string&&a.blankLine&&a.blankLine(f);!p.eol();){var v=a.token(p,f);n(p.current(),v,m,p.start,f,a),p.start=p.pos}}}},"object"==typeof t&&"object"==typeof e?n(r("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)}));
//# sourceMappingURL=runmode.js.map