!function($){var ideFactory=function(textareaID,mode){return{init:function(){if(this.$textarea=$(textareaID),!this.$textarea.length)return!1;this.editor=window.CodeMirror.fromTextArea(this.$textarea.get(0),{autofocus:!0,mode:mode,lineNumbers:!0,tabSize:2,indentWithTabs:!0,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,theme:"dracula",viewportMargin:1/0,direction:"ltr",extraKeys:{"Ctrl-Space":"autocomplete"}}),this.addListeners()},addListeners:function(){this.$textarea.on("change",_.bind(function(editor){this.editor.focus(),this.editor.getDoc().setValue(this.$textarea.val())},this))}}},cssEditor=ideFactory("#custom_css","text/css"),jsEditor=ideFactory("#custom_js","text/javascript");_.bind(jsEditor.init,jsEditor)(),_.bind(cssEditor.init,cssEditor)(),$(".CodeMirror-scroll").on("click",function(e){e.target==this&&$(".CodeMirror-hints").hide()})}(jQuery);