<commit_before>(function(){var __bind=function(b,a){return function(){return b.apply(a,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b},athena={lib:{}};
athena.lib.Model=function(b){function a(){this.toJSONString=__bind(this.toJSONString,this);this.toJSON=__bind(this.toJSON,this);this.clone=__bind(this.clone,this);this.properties=__bind(this.properties,this);this.property=__bind(this.property,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);return this.properties(_.keys(this.attributes))};a.prototype.property=
function(a){var b=this;if(null==a)throw Error("Expected `property` parameter to be defined.");if(!_.isString(a))throw Error("Expected `property` to be of type string.");return this[a]=function(e){null!=e&&b.set(a,e);return b.get(a)}};a.prototype.properties=function(a){var b=this;if(null==a)throw Error("Expected `propertyArray` parameter to be defined.");if(!_.isArray(a))throw Error("Expected `propertyArray` parameter to be of type Array.");return _.each(a,function(a){return b.property(a)})};a.prototype.clone=
function(){return new this.constructor(this.toJSON())};a.prototype.toJSON=function(){return JSON.parse(JSON.stringify(this.attributes))};a.prototype.toJSONString=function(){return JSON.stringify(this.toJSON())};return a}(Backbone.Model);athena.lib.util={};
athena.lib.util.keys={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,KEY_0:48,KEY_1:49,KEY_2:50,KEY_3:51,KEY_4:52,KEY_5:53,KEY_6:54,KEY_7:55,KEY_8:56,KEY_9:57,KEY_A:65,KEY_B:66,KEY_C:67,KEY_D:68,KEY_E:69,KEY_F:70,KEY_G:71,KEY_H:72,KEY_I:73,KEY_J:74,KEY_K:75,KEY_L:76,KEY_M:77,KEY_N:78,KEY_O:79,KEY_P:80,KEY_Q:81,KEY_R:82,KEY_S:83,KEY_T:84,KEY_U:85,KEY_V:86,
KEY_W:87,KEY_X:88,KEY_Y:89,KEY_Z:90,LEFT_META:91,RIGHT_META:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,MULTIPLY:106,ADD:107,SUBTRACT:109,DECIMAL:110,DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,SCROLL_LOCK:145,SEMICOLON:186,EQUALS:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,GRAVE_ACCENT:192,OPEN_BRACKET:219,BACK_SLASH:220,CLOSE_BRACKET:221,
SINGLE_QUOTE:222};var test,__bind=function(b,a){return function(){return b.apply(a,arguments)}};athena.lib.util.test={};test=athena.lib.util.test;test.view_with_options=function(b,a,c){a=a||lib.View;c=c||"body";b=new a(b);b.render();$(c).append(b.$el);return b};test.view_with_content=function(b){var a;a=test.view_with_options.apply(this,_.rest(arguments));a.$el.append(b);return a};test.throwsExceptionWithString=function(b,a,c){var d;d=!1;null!=c?c instanceof Array||(c=[c]):c=[];try{a.apply(null,c)}catch(e){d=0<=e.message.search(b)}return d};
test.describeView=function(b,a,c,d){null==c&&(c={});return describe(""+b.name+" view tests",function(){it("should be a function",function(){return expect(typeof b).toBe("function")});it("should derive from "+a.name,function(){return expect(athena.lib.util.derives(b,a)).toBe(!0)});it("should be constructible with given options",function(){var a;expect(function(){return new b(c)}).not.toThrow();a=new b(c);expect(a instanceof b).toBe(!0);return expect(a.options).toBe(c)});it("should have a className property of type string",
function(){return expect(typeof b.prototype.className).toBe("string")});it("should have a defaults function, that returns an object",function(){var a;expect(typeof b.prototype.events).toBe("function");a=new b(c);return expect(typeof a.defaults()).toBe("object")});it("should have an events function, that returns an object",function(){var a;expect(typeof b.prototype.events).toBe("function");a=new b(c);return expect(typeof a.events()).toBe("object")});it("should have render return @",function(){var a;
a=new b(c);return expect(a.render()).toBe(a)});return"function"===typeof d?d():void 0})};
test.describeSubview=function(b,a){var c,d,e,f,g;d=b.View;g=b.viewOptions;f=b.subviewAttr;c=b.Subview;e=b.checkDOM;null==e&&(e=function(a,b){return a.parentNode===b});return describe(""+d.name+"::"+f+" subview",function(){it("should be defined on init",function(){var a;a=new d(g);return expect(a[f]).toBeDefined()});it("should be an instanceof "+c.name,function(){var a;a=new d(g);return expect(a[f]instanceof c)});it("should not be rendering initially",function(){var a;a=new d(g);return expect(a[f].rendering).toBe(!1)});
it("should be rendering with "+d.name,function(){var a;a=new d(g);a.render();return expect(a[f].rendering).toBe(!0)});it("should be a DOM child of the "+d.name,function(){var a;a=new d(g);a.render();return expect(e(a[f].el,a.el)).toBe(!0)});return"function"===typeof a?a():void 0})};
test.EventSpy=function(){function b(a,b){this.target=a;this.eventName=b;this.trigger=__bind(this.trigger,this);this.reset=__bind(this.reset,this);this.reset();this.target.on(null!=b?b:"all",this.trigger)}b.prototype.reset=function(){this.triggered=!1;return this.triggerCount=0};b.prototype.trigger=function(){this.triggered=!0;return this.triggerCount++};return b}();var derives;athena.lib.util.derives=derives=function(b,a){return!b||!b.__super__?!1:a.prototype===b.__super__?!0:derives(b.__super__.constructor,a)};var util,__bind=function(b,a){return function(){return b.apply(a,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};athena.lib.util.RemoteResource={};athena.lib.util.RemoteResourceInterface={};util=athena.lib.util;
util.RemoteResourceInterface=function(){function b(){}b.prototype.url=function(){};b.prototype.data=function(){};b.prototype.reset=function(){};b.prototype.synced=function(){return!0};b.prototype.sync=function(a){if(a.success)return a.success(this.data())};return b}();
util.RemoteResource=function(b){function a(a){this.sync=__bind(this.sync,this);this.synced=__bind(this.synced,this);this.reset=__bind(this.reset,this);this.data=__bind(this.data,this);this.url=__bind(this.url,this);this.params=_.clone(a);if(!this.params.url)throw Error("remoteResource `url` AJAX param required for sync.");this.url(this.params.url)}__extends(a,b);a.prototype.url=function(a){a&&(this.reset(),this._url=a);return this._url};a.prototype.data=function(){if(!this._synced)throw Error("not synced. cannot access data.");
return _.clone(this._data)};a.prototype.reset=function(){this._synced=!1;return this._data=void 0};a.prototype.synced=function(){return this._synced};a.prototype.sync=function(a){var b,e=this;if(a.url)throw Error("remoteResource.sync doesn't take url parameter.");a=_.extend({},this.params,a);b=a.success||function(){};if(this._synced&&!a.force)return b(this.data()),this;a.url=this._url;a.success=function(a,c,h){e._data=a;e._synced=!0;return b(e.data(),c,h)};$.ajax(a);return this};return a}(util.RemoteResourceInterface);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.View=function(b){function a(){this.softRender=__bind(this.softRender,this);this.render=__bind(this.render,this);this.destroy=__bind(this.destroy,this);this.initialize=__bind(this.initialize,this);this.events=__bind(this.events,this);this.defaults=__bind(this.defaults,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className="";a.classNameExtend=function(a){var b;return(b=this.prototype.className)?b+" "+a:a};a.prototype.defaults=function(){return{extraClasses:[],
eventhub:void 0}};a.prototype.events=function(){return{}};a.prototype.initialize=function(){var b=this;a.__super__.initialize.apply(this,arguments);_.defaults(this.options,this.defaults());this.eventhub=this.options.eventhub||this;if(this.options.extraClasses)return _.each(this.options.extraClasses,function(a){return b.$el.addClass(a)})};a.prototype.destroy=function(){this.rendering=!1;this.remove();this.unbind();return this.uninitialize()};a.prototype.rendering=!1;a.prototype.render=function(){a.__super__.render.apply(this,
arguments);this.rendering=!0;this.delegateEvents();return this};a.prototype.softRender=function(){if(this.rendering)return this.render()};a.prototype.uninitialize=function(){};return a}(Backbone.View);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.ContainerView=function(b){function a(){this.render=__bind(this.render,this);this.content=__bind(this.content,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className=a.classNameExtend("container-view");a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);return this.content(this.options.content)};a.prototype.content=function(a){null!=a&&(this.rendering&&this._content instanceof
Backbone.View&&this._content.remove(),this._content=a,this.softRender());return this._content};a.prototype.render=function(){a.__super__.render.apply(this,arguments);this.$el.empty();if(this._content instanceof Backbone.View)this._content.render(),this.$el.append(this._content.el);else if(this._content instanceof $)this.$el.append(this._content);else if(_.isString(this._content))this.$el.append(this._content);else if(_.isObject(this._content)){if(!this.template)throw Error("ContainerView has no template to use.");
this.$el.html(this.template(this._content))}else if(null!=this._content)throw Error("ContainerView content type unknown.");return this};return a}(athena.lib.View);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.ToolbarView=function(b){function a(){this.renderButtonGroup=__bind(this.renderButtonGroup,this);this.renderButtonFromObject=__bind(this.renderButtonFromObject,this);this.renderButton=__bind(this.renderButton,this);this.render=__bind(this.render,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className=a.classNameExtend("toolbar-view");a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);
return this.buttons=this.options.buttons||[]};a.prototype.render=function(){a.__super__.render.apply(this,arguments);this.$el.empty();this.$el.append(this.renderButtonGroup(this.buttons).children());return this};a.prototype.renderButton=function(a){if(a instanceof Backbone.View)return a.render().$el;if(a instanceof $)return a;if(_.isString(a))return this.renderButtonFromObject({text:a});if(_.isArray(a))return this.renderButtonGroup(a);if((!_.isObject(a)||!_.isArray(a.dropdown))&&_.isObject(a))return this.renderButtonFromObject(a)};
a.prototype.renderButtonFromObject=function(a){var b,e,f;b=$("<button>");b.addClass("btn");a.icon&&b.append($("<i class='"+a.icon+"'>"));a.text&&b.append(a.text);a.className&&b.addClass(a.className);a.id&&b.attr("id",a.id);a.tooltip&&(e=a.tooltip,_.isString(e)&&(e={title:a.tooltip}),b.tooltip(e));_.each(null!=(f=a.events)?f:{},function(a,c){return b.on(c,a)});return b};a.prototype.renderButtonGroup=function(a){var b,e=this;b=$("<div>");b.addClass("btn-group");_.each(a,function(a){var c;return null!=
(c=e.renderButton(a))?c.appendTo(b):void 0});return b};return a}(athena.lib.View);("undefined"!==typeof exports&&null!==exports?exports:this).athena=athena;}).call(this);<commit_msg>updated athena.lib: bugfix on subview testing<commit_after>(function(){var __bind=function(b,a){return function(){return b.apply(a,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b},athena={lib:{}};
athena.lib.Model=function(b){function a(){this.toJSONString=__bind(this.toJSONString,this);this.toJSON=__bind(this.toJSON,this);this.clone=__bind(this.clone,this);this.properties=__bind(this.properties,this);this.property=__bind(this.property,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);return this.properties(_.keys(this.attributes))};a.prototype.property=
function(a){var b=this;if(null==a)throw Error("Expected `property` parameter to be defined.");if(!_.isString(a))throw Error("Expected `property` to be of type string.");return this[a]=function(e){null!=e&&b.set(a,e);return b.get(a)}};a.prototype.properties=function(a){var b=this;if(null==a)throw Error("Expected `propertyArray` parameter to be defined.");if(!_.isArray(a))throw Error("Expected `propertyArray` parameter to be of type Array.");return _.each(a,function(a){return b.property(a)})};a.prototype.clone=
function(){return new this.constructor(this.toJSON())};a.prototype.toJSON=function(){return JSON.parse(JSON.stringify(this.attributes))};a.prototype.toJSONString=function(){return JSON.stringify(this.toJSON())};return a}(Backbone.Model);athena.lib.util={};
athena.lib.util.keys={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,KEY_0:48,KEY_1:49,KEY_2:50,KEY_3:51,KEY_4:52,KEY_5:53,KEY_6:54,KEY_7:55,KEY_8:56,KEY_9:57,KEY_A:65,KEY_B:66,KEY_C:67,KEY_D:68,KEY_E:69,KEY_F:70,KEY_G:71,KEY_H:72,KEY_I:73,KEY_J:74,KEY_K:75,KEY_L:76,KEY_M:77,KEY_N:78,KEY_O:79,KEY_P:80,KEY_Q:81,KEY_R:82,KEY_S:83,KEY_T:84,KEY_U:85,KEY_V:86,
KEY_W:87,KEY_X:88,KEY_Y:89,KEY_Z:90,LEFT_META:91,RIGHT_META:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,MULTIPLY:106,ADD:107,SUBTRACT:109,DECIMAL:110,DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,SCROLL_LOCK:145,SEMICOLON:186,EQUALS:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,GRAVE_ACCENT:192,OPEN_BRACKET:219,BACK_SLASH:220,CLOSE_BRACKET:221,
SINGLE_QUOTE:222};var test,__bind=function(b,a){return function(){return b.apply(a,arguments)}};athena.lib.util.test={};test=athena.lib.util.test;test.view_with_options=function(b,a,c){a=a||lib.View;c=c||"body";b=new a(b);b.render();$(c).append(b.$el);return b};test.view_with_content=function(b){var a;a=test.view_with_options.apply(this,_.rest(arguments));a.$el.append(b);return a};test.throwsExceptionWithString=function(b,a,c){var d;d=!1;null!=c?c instanceof Array||(c=[c]):c=[];try{a.apply(null,c)}catch(e){d=0<=e.message.search(b)}return d};
test.describeView=function(b,a,c,d){null==c&&(c={});return describe(""+b.name+" view tests",function(){it("should be a function",function(){return expect(typeof b).toBe("function")});it("should derive from "+a.name,function(){return expect(athena.lib.util.derives(b,a)).toBe(!0)});it("should be constructible with given options",function(){var a;expect(function(){return new b(c)}).not.toThrow();a=new b(c);expect(a instanceof b).toBe(!0);return expect(a.options).toBe(c)});it("should have a className property of type string",
function(){return expect(typeof b.prototype.className).toBe("string")});it("should have a defaults function, that returns an object",function(){var a;expect(typeof b.prototype.events).toBe("function");a=new b(c);return expect(typeof a.defaults()).toBe("object")});it("should have an events function, that returns an object",function(){var a;expect(typeof b.prototype.events).toBe("function");a=new b(c);return expect(typeof a.events()).toBe("object")});it("should have render return @",function(){var a;
a=new b(c);return expect(a.render()).toBe(a)});return"function"===typeof d?d():void 0})};
test.describeSubview=function(b,a){var c,d,e,f,g;d=b.View;g=b.viewOptions;f=b.subviewAttr;c=b.Subview;e=b.checkDOM;null==e&&(e=function(a,b){return a.parentNode===b});return describe(""+d.name+"::"+f+" subview",function(){it("should be defined on init",function(){var a;a=new d(g);return expect(a[f]).toBeDefined()});it("should be an instanceof "+c.name,function(){var a;a=new d(g);return expect(a[f]instanceof c).toBe(!0)});it("should not be rendering initially",function(){var a;a=new d(g);return expect(a[f].rendering).toBe(!1)});
it("should be rendering with "+d.name,function(){var a;a=new d(g);a.render();return expect(a[f].rendering).toBe(!0)});it("should be a DOM child of the "+d.name,function(){var a;a=new d(g);a.render();return expect(e(a[f].el,a.el)).toBe(!0)});return"function"===typeof a?a():void 0})};
test.EventSpy=function(){function b(a,b){this.target=a;this.eventName=b;this.trigger=__bind(this.trigger,this);this.reset=__bind(this.reset,this);this.reset();this.target.on(null!=b?b:"all",this.trigger)}b.prototype.reset=function(){this.triggered=!1;return this.triggerCount=0};b.prototype.trigger=function(){this.triggered=!0;return this.triggerCount++};return b}();var derives;athena.lib.util.derives=derives=function(b,a){return!b||!b.__super__?!1:a.prototype===b.__super__?!0:derives(b.__super__.constructor,a)};var util,__bind=function(b,a){return function(){return b.apply(a,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};athena.lib.util.RemoteResource={};athena.lib.util.RemoteResourceInterface={};util=athena.lib.util;
util.RemoteResourceInterface=function(){function b(){}b.prototype.url=function(){};b.prototype.data=function(){};b.prototype.reset=function(){};b.prototype.synced=function(){return!0};b.prototype.sync=function(a){if(a.success)return a.success(this.data())};return b}();
util.RemoteResource=function(b){function a(a){this.sync=__bind(this.sync,this);this.synced=__bind(this.synced,this);this.reset=__bind(this.reset,this);this.data=__bind(this.data,this);this.url=__bind(this.url,this);this.params=_.clone(a);if(!this.params.url)throw Error("remoteResource `url` AJAX param required for sync.");this.url(this.params.url)}__extends(a,b);a.prototype.url=function(a){a&&(this.reset(),this._url=a);return this._url};a.prototype.data=function(){if(!this._synced)throw Error("not synced. cannot access data.");
return _.clone(this._data)};a.prototype.reset=function(){this._synced=!1;return this._data=void 0};a.prototype.synced=function(){return this._synced};a.prototype.sync=function(a){var b,e=this;if(a.url)throw Error("remoteResource.sync doesn't take url parameter.");a=_.extend({},this.params,a);b=a.success||function(){};if(this._synced&&!a.force)return b(this.data()),this;a.url=this._url;a.success=function(a,c,h){e._data=a;e._synced=!0;return b(e.data(),c,h)};$.ajax(a);return this};return a}(util.RemoteResourceInterface);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.View=function(b){function a(){this.softRender=__bind(this.softRender,this);this.render=__bind(this.render,this);this.destroy=__bind(this.destroy,this);this.initialize=__bind(this.initialize,this);this.events=__bind(this.events,this);this.defaults=__bind(this.defaults,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className="";a.classNameExtend=function(a){var b;return(b=this.prototype.className)?b+" "+a:a};a.prototype.defaults=function(){return{extraClasses:[],
eventhub:void 0}};a.prototype.events=function(){return{}};a.prototype.initialize=function(){var b=this;a.__super__.initialize.apply(this,arguments);_.defaults(this.options,this.defaults());this.eventhub=this.options.eventhub||this;if(this.options.extraClasses)return _.each(this.options.extraClasses,function(a){return b.$el.addClass(a)})};a.prototype.destroy=function(){this.rendering=!1;this.remove();this.unbind();return this.uninitialize()};a.prototype.rendering=!1;a.prototype.render=function(){a.__super__.render.apply(this,
arguments);this.rendering=!0;this.delegateEvents();return this};a.prototype.softRender=function(){if(this.rendering)return this.render()};a.prototype.uninitialize=function(){};return a}(Backbone.View);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.ContainerView=function(b){function a(){this.render=__bind(this.render,this);this.content=__bind(this.content,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className=a.classNameExtend("container-view");a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);return this.content(this.options.content)};a.prototype.content=function(a){null!=a&&(this.rendering&&this._content instanceof
Backbone.View&&this._content.remove(),this._content=a,this.softRender());return this._content};a.prototype.render=function(){a.__super__.render.apply(this,arguments);this.$el.empty();if(this._content instanceof Backbone.View)this._content.render(),this.$el.append(this._content.el);else if(this._content instanceof $)this.$el.append(this._content);else if(_.isString(this._content))this.$el.append(this._content);else if(_.isObject(this._content)){if(!this.template)throw Error("ContainerView has no template to use.");
this.$el.html(this.template(this._content))}else if(null!=this._content)throw Error("ContainerView content type unknown.");return this};return a}(athena.lib.View);__bind=function(b,a){return function(){return b.apply(a,arguments)}};__hasProp={}.hasOwnProperty;__extends=function(b,a){function c(){this.constructor=b}for(var d in a)__hasProp.call(a,d)&&(b[d]=a[d]);c.prototype=a.prototype;b.prototype=new c;b.__super__=a.prototype;return b};
athena.lib.ToolbarView=function(b){function a(){this.renderButtonGroup=__bind(this.renderButtonGroup,this);this.renderButtonFromObject=__bind(this.renderButtonFromObject,this);this.renderButton=__bind(this.renderButton,this);this.render=__bind(this.render,this);this.initialize=__bind(this.initialize,this);return a.__super__.constructor.apply(this,arguments)}__extends(a,b);a.prototype.className=a.classNameExtend("toolbar-view");a.prototype.initialize=function(){a.__super__.initialize.apply(this,arguments);
return this.buttons=this.options.buttons||[]};a.prototype.render=function(){a.__super__.render.apply(this,arguments);this.$el.empty();this.$el.append(this.renderButtonGroup(this.buttons).children());return this};a.prototype.renderButton=function(a){if(a instanceof Backbone.View)return a.render().$el;if(a instanceof $)return a;if(_.isString(a))return this.renderButtonFromObject({text:a});if(_.isArray(a))return this.renderButtonGroup(a);if((!_.isObject(a)||!_.isArray(a.dropdown))&&_.isObject(a))return this.renderButtonFromObject(a)};
a.prototype.renderButtonFromObject=function(a){var b,e,f;b=$("<button>");b.addClass("btn");a.icon&&b.append($("<i class='"+a.icon+"'>"));a.text&&b.append(a.text);a.className&&b.addClass(a.className);a.id&&b.attr("id",a.id);a.tooltip&&(e=a.tooltip,_.isString(e)&&(e={title:a.tooltip}),b.tooltip(e));_.each(null!=(f=a.events)?f:{},function(a,c){return b.on(c,a)});return b};a.prototype.renderButtonGroup=function(a){var b,e=this;b=$("<div>");b.addClass("btn-group");_.each(a,function(a){var c;return null!=
(c=e.renderButton(a))?c.appendTo(b):void 0});return b};return a}(athena.lib.View);("undefined"!==typeof exports&&null!==exports?exports:this).athena=athena;}).call(this);
{'fraction_non_alphanumeric': 0.21071789686552073, 'fraction_numerical': 0.02333670374115268, 'mean_word_length': 13.805988023952096, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1837582', 'n_tokens_mistral': 9117, 'n_tokens_neox': 8844, 'n_words': 666}