//>>built define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(h,l,m,f){return m("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(a){f.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");a.getFeatures()["dojo.data.api.Notification"]&& (this.connects=this.connects.concat([l.after(a,"onNew",f.hitch(this,"onNewItem"),!0),l.after(a,"onDelete",f.hitch(this,"onDeleteItem"),!0),l.after(a,"onSet",f.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var a;a=this.connects.pop();)a.remove()},getRoot:function(a,b){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:f.hitch(this,function(b){if(1!=b.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+b.length+" items, but must return exactly one");this.root= b[0];a(this.root)}),onError:b})},mayHaveChildren:function(a){return h.some(this.childrenAttrs,function(b){return this.store.hasAttribute(a,b)},this)},getChildren:function(a,b,c){var g=this.store;if(g.isItemLoaded(a)){for(var d=[],e=0;e