//>>built
define("chy/store/Json","dojo/store/util/QueryResults,dojo/_base/declare,dojo/_base/lang,dojo/_base/xhr,dojo/store/util/SimpleQueryEngine,dojo/store/api/Store,dojo/when".split(","),function(d,e,f,c,g,h){return e("chy.store.Json",null,{idProperty:"id",queryEngine:g,startLength:0,target:"",constructor:function(a){f.mixin(this,a||{})},query:function(a){var b=-1<this.target.indexOf("?");a&&"object"==typeof a&&(a=(a=c.objectToQuery(a))?(b?"&":"?")+a:"");b=a.split("=");2<=b.length&&(b=b[1]);b=b.replace(/\*/g,
"");return b.length>=this.startLength||0==b.length?(a=c("GET",{url:this.target+(a||""),handleAs:"json"}).then(function(a){return a.option?[].concat(a.option):[]}),d(a)):new h.QueryResults},getIdentity:function(a){return a[this.idProperty]},get:function(a){a=(-1<this.target.indexOf("?")?"&":"?")+"id="+a;return c("GET",{url:this.target+(a||""),handleAs:"json"}).then(function(a){a=a.option?[].concat(a.option):[];return 0<a.length?a[0]:a})}})});