/** * @preserve * https://github.com/GregBee2/xassist-object#readme Version 1.0.5. * Copyright 2018 Gregory Beirens. * Created on Tue, 17 Apr 2018 10:38:57 GMT. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@xassist/xassist-eventdispatcher")):"function"==typeof define&&define.amd?define(["exports","@xassist/xassist-eventdispatcher"],e):e(t.xa=t.xa||{},t.xa)}(this,function(t,c){"use strict";function e(t){this.object=t,c.EventDispatcher.call(this,this),this.currentValues={}}((e.prototype=Object.create(c.EventDispatcher.prototype)).constructor=e).prototype.onChange=function(o,t,e){var r=this,n=!1;if(!o||!this.object.hasOwnProperty(o))throw new ReferenceError("key does not exist in Object");this.hasEvent("changeKey"+o)||(this.registerEvent("changeKey"+o,this.object),this.currentValues[o]=this.object[o],n=!0),c.EventDispatcher.prototype.on.call(this,"changeKey"+o,t,e),n&&Object.defineProperty(this.object,o,{set:function(t){var e=r.currentValues[o];(r.currentValues[o]=t)!==e&&r.fire("changeKey"+o,t,e,o,r.object)},get:function(){return r.currentValues[o]}})},e.prototype.assign=function(){if("function"==typeof Object.assign)return Object.assign.apply(null,[this.object].concat(Array.prototype.slice.call(arguments)));if(null==this.object)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(this.object),e=0;e