//>>built
define("dojo/_base/lang",["./kernel","../has","../sniff"],function(f,h){h.add("bug-for-in-skips-shadowed",function(){for(var a in{toString:1})return 0;return 1});var i=h("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],l=i.length,j=function(a,d,b){var c,e=0,g=f.global;if(!b)if(a.length){c=a[e++];try{b=f.scopeMap[c]&&f.scopeMap[c][1]}catch(o){}b=b||(c in g?g[c]:d?g[c]={}:void 0)}else return g;for(;b&&(c=a[e++]);)b=
c in b?b[c]:d?b[c]={}:void 0;return b},m=Object.prototype.toString,k=function(a,d,b){return(b||[]).concat(Array.prototype.slice.call(a,d||0))},n=/\{([^\}]+)\}/g,e={_extraNames:i,_mixin:function(a,d,b){var c,e,g,f={};for(c in d)if(e=d[c],!(c in a)||a[c]!==e&&(!(c in f)||f[c]!==e))a[c]=b?b(e):e;if(h("bug-for-in-skips-shadowed")&&d)for(g=0;g<l;++g)if(c=i[g],e=d[c],!(c in a)||a[c]!==e&&(!(c in f)||f[c]!==e))a[c]=b?b(e):e;return a},mixin:function(a,d){a||(a={});for(var b=1,c=arguments.length;b<c;b++)e._mixin(a,
arguments[b]);return a},setObject:function(a,d,b){var c=a.split("."),a=c.pop();return(b=j(c,!0,b))&&a?b[a]=d:void 0},getObject:function(a,d,b){return j(a.split("."),d,b)},exists:function(a,d){return void 0!==e.getObject(a,!1,d)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(a){return a&&(a instanceof Array||"array"==typeof a)},isFunction:function(a){return"[object Function]"===m.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||
e.isArray(a)||e.isFunction(a))},isArrayLike:function(a){return a&&void 0!==a&&!e.isString(a)&&!e.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(e.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!e.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(""+a)},extend:function(a,d){for(var b=1,c=arguments.length;b<c;b++)e._mixin(a.prototype,arguments[b]);return a},_hitchArgs:function(a,d){var b=e._toArray(arguments,2),c=e.isString(d);return function(){var h=e._toArray(arguments),
g=c?(a||f.global)[d]:d;return g&&g.apply(a||this,b.concat(h))}},hitch:function(a,d){if(2<arguments.length)return e._hitchArgs.apply(f,arguments);d||(d=a,a=null);if(e.isString(d)){a=a||f.global;if(!a[d])throw['lang.hitch: scope["',d,'"] is null (scope="',a,'")'].join("");return function(){return a[d].apply(a,arguments||[])}}return!a?d:function(){return d.apply(a,arguments||[])}},delegate:function(){function a(){}return function(d,b){a.prototype=d;var c=new a;a.prototype=null;b&&e._mixin(c,b);return c}}(),
_toArray:h("ie")?function(){function a(a,b,c){c=c||[];for(b=b||0;b<a.length;b++)c.push(a[b]);return c}return function(d){return(d.item?a:k).apply(this,arguments)}}():k,partial:function(a){return e.hitch.apply(f,[null].concat(e._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||e.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);var d,b,c;if(e.isArray(a)){d=[];for(b=
0,c=a.length;b<c;++b)b in a&&d.push(e.clone(a[b]))}else d=a.constructor?new a.constructor:{};return e._mixin(d,a,e.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,d,b){return a.replace(b||n,e.isFunction(d)?d:function(a,b){return e.getObject(b,!1,d)})}};e.mixin(f,e);return e});