//>>built define("dojox/mvc/StatefulArray",["dojo/_base/lang","dojo/Stateful"],function(_1,_2){ function _3(a){ if(a._watchElementCallbacks){ a._watchElementCallbacks(); } return a; }; var _4=function(a){ var _5=_1._toArray(a||[]); var _6=_4; _6._meta={bases:[_2]}; _5.constructor=_6; return _1.mixin(_5,{pop:function(){ return this.splice(this.get("length")-1,1)[0]; },push:function(){ this.splice.apply(this,[this.get("length"),0].concat(_1._toArray(arguments))); return this.get("length"); },reverse:function(){ return _3([].reverse.apply(this,_1._toArray(arguments))); },shift:function(){ return this.splice(0,1)[0]; },sort:function(){ return _3([].sort.apply(this,_1._toArray(arguments))); },splice:function(_7,n){ var l=this.get("length"); _7+=_7<0?l:0; var p=Math.min(_7,l),_8=this.slice(_7,_7+n),_9=_1._toArray(arguments).slice(2); [].splice.apply(this,[_7,n].concat(new Array(_9.length))); for(var i=0;i<_9.length;i++){ this.set(p+i,_9[i]); } if(this._watchElementCallbacks){ this._watchElementCallbacks(_7,_8,_9); } if(this._watchCallbacks){ this._watchCallbacks("length",l,l-_8.length+_9.length); } return _8; },unshift:function(){ this.splice.apply(this,[0,0].concat(_1._toArray(arguments))); return this.get("length"); },concat:function(a){ return new _4([].concat.apply(this,arguments)); },join:function(_a){ var _b=[]; for(var l=this.get("length"),i=0;iold){ this.splice.apply(this,[_17,old-_17]); } } return this; }else{ var _18=this.length; _2.prototype.set.call(this,_16,_17); if(_18!=this.length){ _2.prototype.set.call(this,"length",this.length); } return this; } }}); }; return _1.setObject("dojox.mvc.StatefulArray",_4); });