(function(q){"function"==typeof define?define(q):"function"==typeof YUI?YUI.add("es5",q):q()})(function(){function q(a){a=+a;a!==a?a=0:0!==a&&(a!==1/0&&a!==-(1/0))&&(a=(0>>0;if("[object Function]"!=h(a))throw new TypeError;for(;++e>>0,f=Array(e);if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var g=0;g>>0,f=[],g;if("[object Function]"!=h(a))throw new TypeError(a+ " is not a function");for(var i=0;i>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var f=0;f>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var f=0;f>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");if(!c&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e=0,f;if(2<=arguments.length)f=arguments[1]; else{do{if(e in d){f=d[e++];break}if(++e>=c)throw new TypeError("reduce of empty array with no initial value");}while(1)}for(;e>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");if(!c&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value"); var e,c=c-1;if(2<=arguments.length)e=arguments[1];else{do{if(c in d){e=d[c--];break}if(0>--c)throw new TypeError("reduceRight of empty array with no initial value");}while(1)}do c in this&&(e=a.call(void 0,e,d[c],c,b));while(c--);return e});if(!Array.prototype.indexOf||-1!=[0,1].indexOf(1,2))Array.prototype.indexOf=function(a){var b=k&&"[object String]"==h(this)?this.split(""):l(this),d=b.length>>>0;if(!d)return-1;var c=0;1>>0;if(!d)return-1;var c=d-1;1c?"-":9999=c?-4:-6);for(b=a.length;b--;)d=a[b],10>d&&(a[b]="0"+d);return c+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};s=!1;try{s=Date.prototype.toJSON&&null===(new Date(NaN)).toJSON()&&-1!==(new Date(-621987552E5)).toJSON().indexOf("-000001")&& Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(G){}s||(Date.prototype.toJSON=function(){var a=Object(this),b;a:if(t(a))b=a;else{b=a.valueOf;if("function"===typeof b&&(b=b.call(a),t(b)))break a;b=a.toString;if("function"===typeof b&&(b=b.call(a),t(b)))break a;throw new TypeError;}if("number"===typeof b&&!isFinite(b))return null;b=a.toISOString;if("function"!=typeof b)throw new TypeError("toISOString property is not callable");return b.call(a)});var g=Date,v=function(a,b){var d= 1h&&60>i&&1E3>j&&-1c&&24>l&&60>b&&-1=d)return d;return NaN}return g.parse.apply(this,arguments)};Date=n;Date.now||(Date.now=function(){return(new Date).getTime()});if("0".split(void 0,0).length){var C=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:C.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var D=String.prototype.substr;String.prototype.substr=function(a,b){return D.call(this,0>a?0>(a=this.length+ a)?0:a:a,b)}}j="\t\n\x0B\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||j.trim()){j="["+j+"]";var E=RegExp("^"+j+j+"*"),F=RegExp(j+j+"*$");String.prototype.trim=function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(E,"").replace(F,"")}}var l=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}});