1
2
3
4
5
6
7
| //>>built
| define(["./kernel","../has","../sniff"],function(f,n){var k=function(a,d,b){b||(b=a[0]&&f.scopeMap[a[0]]?f.scopeMap[a.shift()][1]:f.global);try{for(var e=0;e<a.length;e++){var c=a[e];if(!(c in b))if(d)b[c]={};else return;b=b[c]}return b}catch(h){}},l=Object.prototype.toString,m=function(a,d,b){return(b||[]).concat(Array.prototype.slice.call(a,d||0))},p=/\{([^\}]+)\}/g,c={_extraNames:[],_mixin:function(a,d,b){var c,g,f={};for(c in d)g=d[c],c in a&&(a[c]===g||c in f&&f[c]===g)||(a[c]=b?b(g):g);return a},
| mixin:function(a,d){a||(a={});for(var b=1,e=arguments.length;b<e;b++)c._mixin(a,arguments[b]);return a},setObject:function(a,d,b){var c=a.split(".");a=c.pop();return(b=k(c,!0,b))&&a?b[a]=d:void 0},getObject:function(a,d,b){return a?k(a.split("."),d,b):b},exists:function(a,d){return void 0!==c.getObject(a,!1,d)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:Array.isArray||function(a){return"[object Array]"==l.call(a)},isFunction:function(a){return"[object Function]"===
| l.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||c.isArray(a)||c.isFunction(a))},isArrayLike:function(a){return!!a&&!c.isString(a)&&!c.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(c.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!c.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))},extend:function(a,d){for(var b=1,e=arguments.length;b<e;b++)c._mixin(a.prototype,arguments[b]);return a},_hitchArgs:function(a,d){var b=c._toArray(arguments,
| 2),e=c.isString(d);return function(){var g=c._toArray(arguments),h=e?(a||f.global)[d]:d;return h&&h.apply(a||this,b.concat(g))}},hitch:function(a,d){if(2<arguments.length)return c._hitchArgs.apply(f,arguments);d||(d=a,a=null);if(c.isString(d)){a=a||f.global;if(!a[d])throw['lang.hitch: scope["',d,'"] is null (scope\x3d"',a,'")'].join("");return function(){return a[d].apply(a,arguments||[])}}return a?function(){return d.apply(a,arguments||[])}:d},delegate:function(){function a(){}return function(d,
| b){a.prototype=d;d=new a;a.prototype=null;b&&c._mixin(d,b);return d}}(),_toArray:n("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(c){return(c.item?a:m).apply(this,arguments)}}():m,partial:function(a){return c.hitch.apply(f,[null].concat(c._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||c.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 new RegExp(a);var d,b,e;if(c.isArray(a))for(d=[],b=0,e=a.length;b<e;++b)b in a&&(d[b]=c.clone(a[b]));else d=a.constructor?new a.constructor:{};return c._mixin(d,a,c.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||p,c.isFunction(d)?d:function(a,b){return c.getObject(b,!1,d)})}};c.mixin(f,c);return c});
|
|