//>>built define("xace/views/_Split",["dcl/dcl"],function(f){var g=null;f=f(null,{declaredClass:"xace/views/Split"});f.getSplitter=function(){function f(a,b){this.$u=a;this.$doc=b}if(g)return g;var d=ace.require,h=d("ace/lib/oop"),k=d("ace/lib/lang"),l=d("ace/lib/event_emitter").EventEmitter,m=d("ace/editor").Editor,n=d("ace/virtual_renderer").VirtualRenderer,p=d("ace/edit_session").EditSession,q=d("ace/undomanager").UndoManager;d("ace/keyboard/hash_handler");d=function(a,b,c){this.BELOW=1;this.BESIDE=0;this.$container= a;this.$theme=b;this.$splits=0;this.$editorCSS="";this.$editors=[];this.$orientation=this.BESIDE;this.setSplits(c||1);this.$cEditor=this.$editors[0];this.on("focus",function(a){this.$cEditor=a}.bind(this))};(function(){h.implement(this,l);this.$createEditor=function(){var a=document.createElement("div");a.className=this.$editorCSS;a.style.cssText="position: absolute; top:0px; bottom:0px";this.$container.appendChild(a);var b=new m(new n(a,this.$theme));b.on("focus",function(){this._emit("focus",b)}.bind(this)); this.$editors.push(b);b.session.setUndoManager(new q);b.setFontSize(this.$fontSize);return b};this.setSplits=function(a){var b;if(1>a)throw"The number of splits have to be \x3e 0!";if(a!=this.$splits){if(a>this.$splits){for(;this.$splitsa;)b=this.$editors[this.$splits- 1],this.$container.removeChild(b.container),this.$splits--;this.resize()}};this.getSplits=function(){return this.$splits};this.getEditor=function(a){return this.$editors[a]};this.getCurrentEditor=function(){return this.$cEditor};this.focus=function(){this.$cEditor.focus()};this.blur=function(){this.$cEditor.blur()};this.setSessionOption=function(a,b){this.$editors.forEach(function(c){c=c.session;"mode"==a&&c.setMode(b)})};this.setTheme=function(a){this.$editors.forEach(function(b){b.setTheme(a)})}; this.setKeyboardHandler=function(a){this.$editors.forEach(function(b){b.setKeyboardHandler(a)})};this.forEach=function(a,b){this.$editors.forEach(a,b)};this.$fontSize="";this.setFontSize=function(a){this.$fontSize=a;this.forEach(function(b){b.setFontSize(a)})};this.$cloneSession=function(a){var b=new p(a.getDocument(),a.getMode()),c=a.getUndoManager();c&&(c=new f(c,b),b.setUndoManager(c));b.$informUndoManager=k.delayedCall(function(){b.$deltas=[]});b.setTabSize(a.getTabSize());b.setUseSoftTabs(a.getUseSoftTabs()); b.setOverwrite(a.getOverwrite());b.setBreakpoints(a.getBreakpoints());b.setUseWrapMode(a.getUseWrapMode());b.setUseWorker(a.getUseWorker());b.setWrapLimitRange(a.$wrapLimitRange.min,a.$wrapLimitRange.max);b.$foldData=a.$cloneFoldData();return b};this.setSession=function(a,b){var c;c=null==b?this.$cEditor:this.$editors[b];this.$editors.some(function(b){return b.session===a})&&(a=this.$cloneSession(a));c.setSession(a);return a};this.getOrientation=function(){return this.$orientation};this.setOrientation= function(a){this.$orientation!=a&&(this.$orientation=a,this.resize())};this.resize=function(){var a=this.$container.clientWidth,b=this.$container.clientHeight,c;if(this.$orientation==this.BESIDE){a/=this.$splits;this.diffGutter&&(a-=60/this.$splits);for(var e=0;e