/**
 * API Bound Models for AngularJS
 * @version v1.1.0 - 2014-09-23
 * @link https://github.com/angular-platanus/restmod
 * @author Ignacio Baixas <ignacio@platan.us>
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
!function(a,b){"use strict";a.module("restmod").factory("DirtyModel",["restmod",function(a){return a.mixin(function(){this.on("after-feed",function(){var a=this.$cmStatus={};this.$each(function(b,c){a[c]=b})}).define("$dirty",function(a){var c=this.$cmStatus;if(a)return c&&c[a]!==b?c[a]!==this[a]:!1;var d,e=[];if(c)for(d in c)c.hasOwnProperty(d)&&c[d]!==this[d]&&e.push(d);return e}).define("$restore",function(a){return this.$action(function(){var b=this.$cmStatus;if(a)this[a]=b[a];else for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c])})})})}])}(angular);