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