{ I" metadata:ET{I" code;TI" "use strict"; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } var BaseCollection = (function (_Backbone$Collection) { function BaseCollection() { _classCallCheck(this, BaseCollection); if (_Backbone$Collection != null) { _Backbone$Collection.apply(this, arguments); } } _inherits(BaseCollection, _Backbone$Collection); _createClass(BaseCollection, null, [{ key: "collectionClassForResource", // Returns the collection class for a resource name, using our model // convention, i.e. // 'foos' -> App.Models.Foo.Collection value: function collectionClassForResource(resourceName) { return BaseModel.modelClassForResource(resourceName).Collection; } }, { key: "forResource", // Return a collection class with intelligent defaults based on the resource // name, i.e. model class and urls set from the resource name // The class can be further extended through the typical mechanisms value: function forResource(resourceName) { return (function (_BaseCollection) { var _class = function () { _classCallCheck(this, _class); if (_BaseCollection != null) { _BaseCollection.apply(this, arguments); } }; _inherits(_class, _BaseCollection); _createClass(_class, [{ key: "model", get: function () { return BaseModel.modelClassForResource(resourceName); } }, { key: "url", value: function url() { return "/" + _.str.underscored(resourceName) + ".json"; } }]); return _class; })(BaseCollection); } }]); return BaseCollection; })(Backbone.Collection);;TI"map;T0I"ast;T0