define("gpub",function(){var a=function(a,b,c){var d,e,f;for(e=0,f=a.length;f>e&&(d=a[e],!d||(c.event=d,c.target=d.target,d.callback.apply(d.scope,b)!==!1));e++);},b=function(a,b){return"function"==typeof a&&(a=a.prototype),Object.keys(b).forEach(function(c){a[c]=b[c]}),a},c=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},d=[].slice,e=function(){};return e.prototype.on=function(a,b,c){var d=this.callbacks(a),e={};return e.topic=a,e.callback=b,e.scope=c||this,e.target=this,d.push(e),this},e.prototype.emits=function(a){return this.callbacks().hasOwnProperty(a)&&this.callbacks(a).length>0},e.prototype.emit=function(b,c){var e=d.call(arguments,1);c=c||{},e.push(c);var f,g,h;return(g=this.callbacks())?(f=g[b])||g.all?((h=g.all)&&a.call(this,h,d.call(arguments,0),c),f&&a.call(this,f,e,c),this):this:this},e.prototype.off=function(a,b){var c,d,e,f;if(a||b||(this._callbacks={}),!(d=this.callbacks()))return this;if(!(c=d[a]))return this;for(e=0,f=c.length;f>e;e++)c[e].callback===b&&c.splice(e,1);return this},e.prototype.callbacks=function(a){return this._callbacks=this._callbacks||{},a?this._callbacks[a]||(this._callbacks[a]=[]):this._callbacks},e.prototype.once=function(a,b,c,d){if(!b||!a)return this;c||(c=this);var e=this,f=function(){b.apply(c,arguments),e.off(a,f)};return this.on(a,f,c,d),this},e.prototype.throttle=function(a,b,d){c(this.emit,d)},e.observable=function(a){return b(a||{},e.prototype)},e.delegable=function(a,b,c,d){"on"in a&&"emit"in a||this.observable(a),c||(c=function(a){return"on"+a}),"string"==typeof b&&(b=b.split(d||" "));var e,f="function"==typeof a;return b.forEach(function(b){e=function(a){return a?(this.on(b,a),this):this},f&&e.bind(a),a[c(b)]=e}),a},e.bindable=function(a,b,c,d){"on"in a&&"emit"in a||this.observable(a);var e=a[b||"set"],f=a[c||"get"],g=function(a,b){var c=f.call(this,a),d=e.call(this,a,b),g={old:c,value:b,property:a};return c===b?d:(this.emits("change")&&this.emit("change",g),this.emits("change:"+a)&&this.emit("change:"+a,g),d)};return d&&g.bind(a),a[b]=g,a},e.prototype.publish=e.prototype.emit,e.prototype.subscribe=e.prototype.on,e.prototype.unsubscribe=e.prototype.off,e.prototype.subscribers=e.prototype.emits,e});