| 1234 |
- /*! uberproto - v1.2.0 - 2015-11-29
- * http://daffl.github.com/uberproto
- * Copyright (c) 2015 ; Licensed MIT */
- !function(){Object.create=Object.create||function(a){function b(){}if(arguments.length>1)throw new Error("Object.create implementation only accepts the first parameter.");return b.prototype=a,new b},Object.getPrototypeOf=Object.getPrototypeOf||function(a){return a.proto||a.constructor.prototype},Function.prototype.bind=Function.prototype.bind||function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}}(),function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Proto=b()}(this,function(){function a(a,b,c,d){return function(){var e=this._super;this._super="function"==typeof b?b:a[c];var f=d.apply(this,arguments);return this._super=e,f}}function b(b,c){var d,e=c||this,f=/\b_super\b/,g=Object.getPrototypeOf(e)||e.prototype;for(var h in b)d=e[h],e[h]=("function"==typeof b[h]&&"function"==typeof g[h]||"function"==typeof d&&"function"==typeof b[h])&&f.test(b[h])?a(g,d,h,b[h]):b[h];return e}function c(b,c){var d=c||this,e=/\b_super\b/,f=Object.getPrototypeOf(d)||d.prototype,g={},h=b,i=function(a){g[a]||(g[a]=Object.getOwnPropertyDescriptor(h,a))};do Object.getOwnPropertyNames(h).forEach(i);while((h=Object.getPrototypeOf(h))&&Object.getPrototypeOf(h));return Object.keys(g).forEach(function(b){var c=g[b];"function"==typeof c.value&&e.test(c.value)&&(c.value=a(f,d[b],b,c.value)),Object.defineProperty(d,b,c)}),d}return{create:function(){var a=Object.create(this),b="string"==typeof a.__init?a.__init:"init";return"function"==typeof a[b]&&a[b].apply(a,arguments),a},mixin:"function"==typeof Object.defineProperty?c:b,extend:function(a,b){return this.mixin(a,Object.create(b||this))},proxy:function(a){var b=this[a],c=Array.prototype.slice.call(arguments,1);return c.unshift(this),b.bind.apply(b,c)}}});
|