define("dojo/store/util/SimpleQueryEngine",["../../_base/array"],function(_1){returnfunction(_2,_3){switch(typeof_2){default:thrownewError("Can not query with a "+typeof_2);case"object":case"undefined":var_4=_2;_2=function(_5){for(var_6in_4){var_7=_4[_6];if(_7&&_7.test){if(!_7.test(_5[_6])){returnfalse;}}else{if(_7!=_5[_6]){returnfalse;}}}returntrue;};break;case"string":if(!this[_2]){thrownewError("No filter function "+_2+" was found in store");}_2=this[_2];case"function":}function_8(_9){var_a=_1.filter(_9,_2);if(_3&&_3.sort){_a.sort(function(a,b){for(var_b,i=0;_b=_3.sort[i];i++){var_c=a[_b.attribute];var_d=b[_b.attribute];if(_c!=_d){return!!_b.descending==_c>_d?-1:1;}}return0;});}if(_3&&(_3.start||_3.count)){var_e=_a.length;_a=_a.slice(_3.start||0,(_3.start||0)+(_3.count||Infinity));_a.total=_e;}return_a;};_8.matches=_2;return_8;};});