Browse Source

fix es5-shim for amber integration

Laurent Laffont 11 years ago
parent
commit
a465d31f24

+ 13 - 0
js/lib/es5-shim-2.0.2/es5-sham.js

@@ -30,6 +30,19 @@ if (!Object.getPrototypeOf) {
     };
 }
 
+
+var call = Function.prototype.call;
+var prototypeOfObject = Object.prototype;
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+  defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+  defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+  lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+  lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+
+
 // ES5 15.2.3.3
 // http://es5.github.com/#x15.2.3.3
 if (!Object.getOwnPropertyDescriptor) {

+ 6 - 6
js/lib/es5-shim-2.0.2/es5-sham.min.js

@@ -1,6 +1,6 @@
-(function(d){"function"==typeof define?define(d):"function"==typeof YUI?YUI.add("es5-sham",d):d()})(function(){function d(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:prototypeOfObject)});Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+
-a);if(owns(a,b)){var c={enumerable:true,configurable:true};if(supportsAccessors){var g=a.__proto__;a.__proto__=prototypeOfObject;var d=lookupGetter(a,b),e=lookupSetter(a,b);a.__proto__=g;if(d||e){if(d)c.get=d;if(e)c.set=e;return c}}c.value=a[b];return c}});Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)});Object.create||(Object.create=function(a,b){function c(){}var d;if(a===null)d={__proto__:null};else{if(typeof a!=="object"&&typeof a!=="function")throw new TypeError("Object prototype may only be an Object or null");
-c.prototype=a;d=new c;d.__proto__=a}b!==void 0&&Object.defineProperties(d,b);return d});if(Object.defineProperty){var f=d({}),h="undefined"==typeof document||d(document.createElement("div"));if(!f||!h)var e=Object.defineProperty}if(!Object.defineProperty||e)Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.defineProperty called on non-object: "+a);if(typeof c!="object"&&typeof c!="function"||c===null)throw new TypeError("Property description must be an object: "+
-c);if(e)try{return e.call(Object,a,b,c)}catch(d){}if(owns(c,"value"))if(supportsAccessors&&(lookupGetter(a,b)||lookupSetter(a,b))){var f=a.__proto__;a.__proto__=prototypeOfObject;delete a[b];a[b]=c.value;a.__proto__=f}else a[b]=c.value;else{if(!supportsAccessors)throw new TypeError("getters & setters can not be defined on this javascript engine");owns(c,"get")&&defineGetter(a,b,c.get);owns(c,"set")&&defineSetter(a,b,c.set)}return a};Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)owns(b,
-c)&&c!="__proto__"&&Object.defineProperty(a,c,b[c]);return a});Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(j){var i=Object.freeze;Object.freeze=function(a){return typeof a=="function"?a:i(a)}}Object.preventExtensions||(Object.preventExtensions=function(a){return a});Object.isSealed||(Object.isSealed=function(){return false});Object.isFrozen||(Object.isFrozen=function(){return false});Object.isExtensible||
-(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError;for(var b="";owns(a,b);)b=b+"?";a[b]=true;var c=owns(a,b);delete a[b];return c})});
+(function(e){"function"==typeof define?define(e):"function"==typeof YUI?YUI.add("es5-sham",e):e()})(function(){function e(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:f)});var d=Function.prototype.call,f=Object.prototype,g=d.bind(f.hasOwnProperty),h;if(h=g(f,"__defineGetter__"))defineGetter=d.bind(f.__defineGetter__),defineSetter=d.bind(f.__defineSetter__),
+lookupGetter=d.bind(f.__lookupGetter__),lookupSetter=d.bind(f.__lookupSetter__);Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+a);if(g(a,b)){var c={enumerable:!0,configurable:!0};if(h){var j=a.__proto__;a.__proto__=f;var d=lookupGetter(a,b),e=lookupSetter(a,b);a.__proto__=j;if(d||e)return d&&(c.get=d),e&&(c.set=e),c}c.value=a[b];return c}});
+Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)});Object.create||(Object.create=function(a,b){function c(){}var d;if(null===a)d={__proto__:null};else{if("object"!==typeof a&&"function"!==typeof a)throw new TypeError("Object prototype may only be an Object or null");c.prototype=a;d=new c;d.__proto__=a}void 0!==b&&Object.defineProperties(d,b);return d});if(Object.defineProperty){var d=e({}),k="undefined"==typeof document||e(document.createElement("div"));if(!d||
+!k)var i=Object.defineProperty}if(!Object.defineProperty||i)Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError("Property description must be an object: "+c);if(i)try{return i.call(Object,a,b,c)}catch(d){}if(g(c,"value"))if(h&&(lookupGetter(a,b)||lookupSetter(a,b))){var e=a.__proto__;a.__proto__=f;delete a[b];a[b]=c.value;
+a.__proto__=e}else a[b]=c.value;else{if(!h)throw new TypeError("getters & setters can not be defined on this javascript engine");g(c,"get")&&defineGetter(a,b,c.get);g(c,"set")&&defineSetter(a,b,c.set)}return a};Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)g(b,c)&&"__proto__"!=c&&Object.defineProperty(a,c,b[c]);return a});Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(m){var l=
+Object.freeze;Object.freeze=function(a){return"function"==typeof a?a:l(a)}}Object.preventExtensions||(Object.preventExtensions=function(a){return a});Object.isSealed||(Object.isSealed=function(){return!1});Object.isFrozen||(Object.isFrozen=function(){return!1});Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError;for(var b="";g(a,b);)b+="?";a[b]=!0;var c=g(a,b);delete a[b];return c})});

+ 16 - 16
js/lib/es5-shim-2.0.2/es5-shim.min.js

@@ -1,16 +1,16 @@
-(function(p){"function"==typeof define?define(p):"function"==typeof YUI?YUI.add("es5",p):p()})(function(){function p(a){a=+a;a!==a?a=0:0!==a&&(a!==1/0&&a!==-(1/0))&&(a=(0<a||-1)*Math.floor(Math.abs(a)));return a}function s(a){var b=typeof a;return null===a||"undefined"===b||"boolean"===b||"number"===b||"string"===b}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var d=q.call(arguments,
-1),c=function(){if(this instanceof c){var e=b.apply(this,d.concat(q.call(arguments)));return Object(e)===e?e:this}return b.apply(a,d.concat(q.call(arguments)))};b.prototype&&(c.prototype=Object.create(b.prototype));return c});var m=Function.prototype.call,o=Object.prototype,q=Array.prototype.slice,h=m.bind(o.toString),t=m.bind(o.hasOwnProperty);t(o,"__defineGetter__")&&(m.bind(o.__defineGetter__),m.bind(o.__defineSetter__),m.bind(o.__lookupGetter__),m.bind(o.__lookupSetter__));if(2!=[1,2].splice(0).length){var x=
-Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?x.apply(this,[a===void 0?0:a,b===void 0?this.length-a:b].concat(q.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(a){return h(a)=="[object Array]"});var m=Object("a"),k="a"!=m[0]||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var d=l(this),c=k&&h(this)=="[object String]"?this.split(""):d,e=-1,f=c.length>>>0;if(h(a)!="[object Function]")throw new TypeError;for(;++e<f;)e in
-c&&a.call(b,c[e],e,d)});Array.prototype.map||(Array.prototype.map=function(a,b){var d=l(this),c=k&&h(this)=="[object String]"?this.split(""):d,e=c.length>>>0,f=Array(e);if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var g=0;g<e;g++)g in c&&(f[g]=a.call(b,c[g],g,d));return f});Array.prototype.filter||(Array.prototype.filter=function(a,b){var d=l(this),c=k&&h(this)=="[object String]"?this.split(""):d,e=c.length>>>0,f=[],g;if(h(a)!="[object Function]")throw new TypeError(a+
-" is not a function");for(var i=0;i<e;i++)if(i in c){g=c[i];a.call(b,g,i,d)&&f.push(g)}return f});Array.prototype.every||(Array.prototype.every=function(a,b){var d=l(this),c=k&&h(this)=="[object String]"?this.split(""):d,e=c.length>>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var f=0;f<e;f++)if(f in c&&!a.call(b,c[f],f,d))return false;return true});Array.prototype.some||(Array.prototype.some=function(a,b){var d=l(this),c=k&&h(this)=="[object String]"?this.split(""):
-d,e=c.length>>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var f=0;f<e;f++)if(f in c&&a.call(b,c[f],f,d))return true;return false});Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=l(this),d=k&&h(this)=="[object String]"?this.split(""):b,c=d.length>>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");if(!c&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var e=0,f;if(arguments.length>=
-2)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<c;e++)e in d&&(f=a.call(void 0,f,d[e],e,b));return f});Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=l(this),d=k&&h(this)=="[object String]"?this.split(""):b,c=d.length>>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");if(!c&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");
-var e,c=c-1;if(arguments.length>=2)e=arguments[1];else{do{if(c in d){e=d[c--];break}if(--c<0)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&&h(this)=="[object String]"?this.split(""):l(this),d=b.length>>>0;if(!d)return-1;var c=0;arguments.length>1&&(c=p(arguments[1]));for(c=c>=0?c:Math.max(0,d+c);c<d;c++)if(c in
-b&&b[c]===a)return c;return-1};if(!Array.prototype.lastIndexOf||-1!=[0,1].lastIndexOf(0,-3))Array.prototype.lastIndexOf=function(a){var b=k&&h(this)=="[object String]"?this.split(""):l(this),d=b.length>>>0;if(!d)return-1;var c=d-1;arguments.length>1&&(c=Math.min(c,p(arguments[1])));for(c=c>=0?c:d-Math.abs(c);c>=0;c--)if(c in b&&a===b[c])return c;return-1};if(!Object.keys){var v=!0,w="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),y=w.length,
-r;for(r in{toString:null})v=!1;Object.keys=function(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var b=[],d;for(d in a)t(a,d)&&b.push(d);if(v)for(d=0;d<y;d++){var c=w[d];t(a,c)&&b.push(c)}return b}}if(!Date.prototype.toISOString||-1===(new Date(-621987552E5)).toISOString().indexOf("-000001"))Date.prototype.toISOString=function(){var a,b,d,c;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");
-c=this.getUTCFullYear();a=this.getUTCMonth();c=c+Math.floor(a/12);a=[(a%12+12)%12+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];c=(c<0?"-":c>9999?"+":"")+("00000"+Math.abs(c)).slice(0<=c&&c<=9999?-4:-6);for(b=a.length;b--;){d=a[b];d<10&&(a[b]="0"+d)}return c+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};r=!1;try{r=Date.prototype.toJSON&&null===(new Date(NaN)).toJSON()&&-1!==(new Date(-621987552E5)).toJSON().indexOf("-000001")&&
-Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(F){}r||(Date.prototype.toJSON=function(){var a=Object(this),b;a:if(s(a))b=a;else{b=a.valueOf;if(typeof b==="function"){b=b.call(a);if(s(b))break a}b=a.toString;if(typeof b==="function"){b=b.call(a);if(s(b))break a}throw new TypeError;}if(typeof b==="number"&&!isFinite(b))return null;b=a.toISOString;if(typeof b!="function")throw new TypeError("toISOString property is not callable");return b.call(a)});var g=Date,u=function(a,b){var d=
-b>1?1:0;return z[b]+Math.floor((a-1969+d)/4)-Math.floor((a-1901+d)/100)+Math.floor((a-1601+d)/400)+365*(a-1970)},n=function(a,b,d,c,e,f,h){var i=arguments.length;if(this instanceof g){i=i==1&&String(a)===a?new g(n.parse(a)):i>=7?new g(a,b,d,c,e,f,h):i>=6?new g(a,b,d,c,e,f):i>=5?new g(a,b,d,c,e):i>=4?new g(a,b,d,c):i>=3?new g(a,b,d):i>=2?new g(a,b):i>=1?new g(a):new g;i.constructor=n;return i}return g.apply(this,arguments)},A=RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),
-z=[0,31,59,90,120,151,181,212,243,273,304,334,365],j;for(j in g)n[j]=g[j];n.now=g.now;n.UTC=g.UTC;n.prototype=g.prototype;n.prototype.constructor=Date;n.parse=function(a){var b=A.exec(a);if(b){var d=Number(b[1]),c=Number(b[2]||1)-1,e=Number(b[3]||1)-1,f=Number(b[4]||0),h=Number(b[5]||0),i=Number(b[6]||0),j=Number(b[7]||0),m=!b[4]||b[8]?0:Number(new Date(1970,0)),k=b[9]==="-"?1:-1,l=Number(b[10]||0),b=Number(b[11]||0);if(f<(h>0||i>0||j>0?24:25)&&h<60&&i<60&&j<1E3&&c>-1&&c<12&&l<24&&b<60&&e>-1&&e<u(d,
-c+1)-u(d,c)){d=((u(d,c)+e)*24+f+l*k)*60;d=((d+h+b*k)*60+i)*1E3+j+m;if(-864E13<=d&&d<=864E13)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 B=String.prototype.split;String.prototype.split=function(a,b){return a===void 0&&b===0?[]:B.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var C=String.prototype.substr;String.prototype.substr=function(a,b){return C.call(this,a<0?(a=this.length+
-a)<0?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 D=RegExp("^"+j+j+"*"),E=RegExp(j+j+"*$");String.prototype.trim=function(){if(this===void 0||this===null)throw new TypeError("can't convert "+this+" to object");return String(this).replace(D,"").replace(E,"")}}var l=function(a){if(a==null)throw new TypeError("can't convert "+a+" to object");return Object(a)}});
+(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<a||-1)*Math.floor(Math.abs(a)));return a}function t(a){var b=typeof a;return null===a||"undefined"===b||"boolean"===b||"number"===b||"string"===b}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var d=r.call(arguments,
+1),c=function(){if(this instanceof c){var e=b.apply(this,d.concat(r.call(arguments)));return Object(e)===e?e:this}return b.apply(a,d.concat(r.call(arguments)))};b.prototype&&(c.prototype=Object.create(b.prototype));return c});var m=Function.prototype.call,p=Object.prototype,r=Array.prototype.slice,h=m.bind(p.toString),u=m.bind(p.hasOwnProperty);u(p,"__defineGetter__")&&(m.bind(p.__defineGetter__),m.bind(p.__defineSetter__),m.bind(p.__lookupGetter__),m.bind(p.__lookupSetter__));if(2!=[1,2].splice(0).length){var y=
+Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?y.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(r.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(a){return"[object Array]"==h(a)});var m=Object("a"),k="a"!=m[0]||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var d=l(this),c=k&&"[object String]"==h(this)?this.split(""):d,e=-1,f=c.length>>>0;if("[object Function]"!=h(a))throw new TypeError;for(;++e<f;)e in c&&
+a.call(b,c[e],e,d)});Array.prototype.map||(Array.prototype.map=function(a,b){var d=l(this),c=k&&"[object String]"==h(this)?this.split(""):d,e=c.length>>>0,f=Array(e);if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var g=0;g<e;g++)g in c&&(f[g]=a.call(b,c[g],g,d));return f});Array.prototype.filter||(Array.prototype.filter=function(a,b){var d=l(this),c=k&&"[object String]"==h(this)?this.split(""):d,e=c.length>>>0,f=[],g;if("[object Function]"!=h(a))throw new TypeError(a+
+" is not a function");for(var i=0;i<e;i++)i in c&&(g=c[i],a.call(b,g,i,d)&&f.push(g));return f});Array.prototype.every||(Array.prototype.every=function(a,b){var d=l(this),c=k&&"[object String]"==h(this)?this.split(""):d,e=c.length>>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var f=0;f<e;f++)if(f in c&&!a.call(b,c[f],f,d))return!1;return!0});Array.prototype.some||(Array.prototype.some=function(a,b){var d=l(this),c=k&&"[object String]"==h(this)?this.split(""):d,e=
+c.length>>>0;if("[object Function]"!=h(a))throw new TypeError(a+" is not a function");for(var f=0;f<e;f++)if(f in c&&a.call(b,c[f],f,d))return!0;return!1});Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=l(this),d=k&&"[object String]"==h(this)?this.split(""):b,c=d.length>>>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<c;e++)e in d&&(f=a.call(void 0,f,d[e],e,b));return f});Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=l(this),d=k&&"[object String]"==h(this)?this.split(""):b,c=d.length>>>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<arguments.length&&(c=q(arguments[1]));for(c=0<=c?c:Math.max(0,d+c);c<d;c++)if(c in
+b&&b[c]===a)return c;return-1};if(!Array.prototype.lastIndexOf||-1!=[0,1].lastIndexOf(0,-3))Array.prototype.lastIndexOf=function(a){var b=k&&"[object String]"==h(this)?this.split(""):l(this),d=b.length>>>0;if(!d)return-1;var c=d-1;1<arguments.length&&(c=Math.min(c,q(arguments[1])));for(c=0<=c?c:d-Math.abs(c);0<=c;c--)if(c in b&&a===b[c])return c;return-1};if(!Object.keys){var w=!0,x="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),z=x.length,
+s;for(s in{toString:null})w=!1;Object.keys=function(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var b=[],d;for(d in a)u(a,d)&&b.push(d);if(w)for(d=0;d<z;d++){var c=x[d];u(a,c)&&b.push(c)}return b}}if(!Date.prototype.toISOString||-1===(new Date(-621987552E5)).toISOString().indexOf("-000001"))Date.prototype.toISOString=function(){var a,b,d,c;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");
+c=this.getUTCFullYear();a=this.getUTCMonth();c+=Math.floor(a/12);a=[(a%12+12)%12+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];c=(0>c?"-":9999<c?"+":"")+("00000"+Math.abs(c)).slice(0<=c&&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=
+1<b?1:0;return A[b]+Math.floor((a-1969+d)/4)-Math.floor((a-1901+d)/100)+Math.floor((a-1601+d)/400)+365*(a-1970)},n=function(a,b,d,c,e,f,h){var i=arguments.length;return this instanceof g?(i=1==i&&String(a)===a?new g(n.parse(a)):7<=i?new g(a,b,d,c,e,f,h):6<=i?new g(a,b,d,c,e,f):5<=i?new g(a,b,d,c,e):4<=i?new g(a,b,d,c):3<=i?new g(a,b,d):2<=i?new g(a,b):1<=i?new g(a):new g,i.constructor=n,i):g.apply(this,arguments)},B=RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),
+A=[0,31,59,90,120,151,181,212,243,273,304,334,365],j;for(j in g)n[j]=g[j];n.now=g.now;n.UTC=g.UTC;n.prototype=g.prototype;n.prototype.constructor=Date;n.parse=function(a){var b=B.exec(a);if(b){var d=Number(b[1]),c=Number(b[2]||1)-1,e=Number(b[3]||1)-1,f=Number(b[4]||0),h=Number(b[5]||0),i=Number(b[6]||0),j=Number(b[7]||0),m=!b[4]||b[8]?0:Number(new Date(1970,0)),k="-"===b[9]?1:-1,l=Number(b[10]||0),b=Number(b[11]||0);if(f<(0<h||0<i||0<j?24:25)&&60>h&&60>i&&1E3>j&&-1<c&&12>c&&24>l&&60>b&&-1<e&&e<v(d,
+c+1)-v(d,c))if(d=60*(24*(v(d,c)+e)+f+l*k),d=1E3*(60*(d+h+b*k)+i)+j+m,-864E13<=d&&864E13>=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)}});