text: angular.module("SuperModel",["AClassAbove"]).provider("SuperModel",function(){this.$get=["AClassAbove","SuperModel.Callbacks",function(a){var b=Array.prototype.slice.call(arguments,1),c=a.subclass(function(){return angular.forEach(b,function(a){this.extend(a.classMixin||{}),this.include(a.instanceMixin||{}),a.included&&a.included(this)}.bind(this)),{}});return c}]}),angular.module("SuperModel").factory("SuperModel.Callbacks",[function(){return{included:function(a){a.extendableArray("definedCallbacks")},classMixin:{defineCallbacks:function(){angular.forEach(arguments,function(a){angular.forEach(["before","after","around"],function(b){this.extendableArray(this._callbackListProp(a,b))}.bind(this)),this.definedCallbacks().push(a)}.bind(this))},setCallback:function(a,b,c){this._callbackList(b,a).push(c)},_callbackListProp:function(a,b){return["__",b,a,"callbacks"].join("_")},_callbackList:function(a,b){if(-1===this.definedCallbacks().indexOf(a))throw new Error("Callbacks on "+a+" are not supported.  If you want to support them, you need to call defineCallbacks("+a+")");var c=this._callbackListProp(a,b);return this[c]()}},instanceMixin:{runCallbacks:function(a,b){this._runSimpleCallbacks("before",a,b),this._runAroundCallbacks(a,b),this._runSimpleCallbacks("after",a,b)},_runSimpleCallbacks:function(a,b){angular.forEach(this._callbackList(b,a),function(a){"string"==typeof a&&(a=this[a]),a.apply(this)}.bind(this))},_runAroundCallbacks:function(a,b){var c=this._callbackList(a,"around");if(0==c.length)b.apply(this);else{for(var d=b.bind(this),e=c.length-1;e>=0;e--){var f=c[e];d&&(d=f.bind(this,d))}d()}},_callbackList:function(){return this.constructor._callbackList.apply(this.constructor,arguments)}}}}]);