define("backbone.es6",["underscore","backbone","backbone.controller"],(function(_,Backbone){var hasNativeClassSupport=true;var classes=[Backbone.View,Backbone.Model,Backbone.Collection,Backbone.Router,Backbone.History,Backbone.Controller];["View","Model","Collection","Router","History","Controller"].forEach((function(name){Backbone["_"+name]=Backbone[name];Backbone[name]=class extends Backbone[`_${name}`]{}}));var getChild=function(parent,protoProps){var hasConstructor=protoProps&&_.has(protoProps,"constructor");if(hasConstructor){return class extends protoProps.constructor{}}return class extends parent{}};var extend=function(protoProps,staticProps){var parent=this;var child=getChild(parent,protoProps);Object.setPrototypeOf(child,parent);_.extend(child,staticProps);if(!hasNativeClassSupport){child.prototype=_.create(parent.prototype,protoProps)}else{child.prototype={};Object.setPrototypeOf(child.prototype,parent.prototype);_.extend(child.prototype,protoProps)}child.prototype.constructor=child;child.__super__=parent.prototype;return child};classes.forEach((function(Class){Class.extend=extend}));Backbone.Collection.prototype.model=Backbone.Model;Backbone.Collection.prototype.modelId=function(t){return t[this.model.prototype&&this.model.prototype.idAttribute||"id"]};Backbone.Collection.prototype._prepareModel=function(t,e){if(this._isModel(t)){if(!t.collection){t.collection=this}return t}e=e?_.clone(e):{};e.collection=this;var n;if(this.model===Backbone.Model||this.model.prototype instanceof Backbone.Model){var Class=this.model;n=new Class(t,e)}else{n=this.model(t,e)}if(!n.validationError){return n}this.trigger("invalid",this,n.validationError,e);return false}}));