(function(){var a={}.hasOwnProperty,b=function(f,d){for(var c in d){if(a.call(d,c)){f[c]=d[c]}}function e(){this.constructor=f}e.prototype=d.prototype;f.prototype=new e();f.__super__=d.prototype;return f};window.Controls.codearea=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){this.dom=$('<div class="control control-inset codearea"> \n</div>');this.cm=CodeMirror(this.dom[0],{value:this.properties.value,mode:this.properties.mode,lineNumbers:true,matchBrackets:true});this.dom.find(">*").css({width:this._int_to_px(this.properties.width)});this.dom.find(".CodeMirror-scroll").css({height:this._int_to_px(this.properties.height)});return setTimeout(this.cm.refresh,1)};d.prototype.onBroadcast=function(e){if(e==="visible"){return setTimeout(this.cm.refresh,1)}};d.prototype.detectUpdates=function(){var e,f;e={};f=this.cm.getValue();if(f!==this.properties.value){e.value=f}return e};return d})(window.Control)}).call(this);