From 2c02297792a57094b2482682f458f6667947dfcc Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Thu, 19 Jul 2012 19:48:49 +0200 Subject: [PATCH] Newer es5-shim --- app/assets/javascripts/vendor/es5-shim.min.js | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/vendor/es5-shim.min.js b/app/assets/javascripts/vendor/es5-shim.min.js index 92585f1..faa02ae 100644 --- a/app/assets/javascripts/vendor/es5-shim.min.js +++ b/app/assets/javascripts/vendor/es5-shim.min.js @@ -1,16 +1,18 @@ -(function(n){"function"==typeof define?define(n):n()})(function(){function n(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(d){}}if(!Function.prototype.bind)Function.prototype.bind=function(a){var d=this;if("function"!=typeof d)throw new TypeError;var b=p.call(arguments,1),c=function(){if(this instanceof c){var e=function(){};e.prototype=d.prototype;var e=new e,g=d.apply(e,b.concat(p.call(arguments)));return null!==g&&Object(g)===g?g:e}return d.apply(a,b.concat(p.call(arguments)))}; -return c};var l=Function.prototype.call,f=Object.prototype,p=Array.prototype.slice,m=l.bind(f.toString),h=l.bind(f.hasOwnProperty),t,u,q,r,o;if(o=h(f,"__defineGetter__"))t=l.bind(f.__defineGetter__),u=l.bind(f.__defineSetter__),q=l.bind(f.__lookupGetter__),r=l.bind(f.__lookupSetter__);if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==m(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,d){var b=i(this),c=0,e=b.length>>>0;if("[object Function]"!=m(a))throw new TypeError; -for(;c>>0,e=Array(c);if("[object Function]"!=m(a))throw new TypeError;for(var g=0;g>>0,e=[];if("[object Function]"!=m(a))throw new TypeError;for(var g=0;g>>0;if("[object Function]"!=m(a))throw new TypeError;for(var e=0;e>>0;if("[object Function]"!=m(a))throw new TypeError;for(var e=0;e>>0;if("[object Function]"!=m(a))throw new TypeError; -if(!b&&1==arguments.length)throw new TypeError;var c=0,e;if(2<=arguments.length)e=arguments[1];else{do{if(c in d){e=d[c++];break}if(++c>=b)throw new TypeError;}while(1)}for(;c>>0;if("[object Function]"!=m(a))throw new TypeError;if(!b&&1==arguments.length)throw new TypeError;var c,b=b-1;if(2<=arguments.length)c=arguments[1];else{do{if(b in d){c=d[b--]; -break}if(0>--b)throw new TypeError;}while(1)}do b in this&&(c=a.call(void 0,c,d[b],b,d));while(b--);return c};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var d=i(this),b=d.length>>>0;if(!b)return-1;var c=0;1>>0;if(!b)return-1;var c=b-1;1c?"-":9999=c?-4:-6);for(d=a.length;d--;)b=a[d],10>b&&(a[d]="0"+b);return c+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()}; -if(!Date.parse||864E13!==Date.parse("+275760-09-13T00:00:00.000Z"))Date=function(a){var d=function g(b,d,c,f,h,i,j){var k=arguments.length;return this instanceof a?(k=1==k&&""+b===b?new a(g.parse(b)):7<=k?new a(b,d,c,f,h,i,j):6<=k?new a(b,d,c,f,h,i):5<=k?new a(b,d,c,f,h):4<=k?new a(b,d,c,f):3<=k?new a(b,d,c):2<=k?new a(b,d):1<=k?new a(b):new a,k.constructor=g,k):a.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})))?)?)?)?$"), -c;for(c in a)d[c]=a[c];d.now=a.now;d.UTC=a.UTC;d.prototype=a.prototype;d.prototype.constructor=d;d.parse=function(d){var c=b.exec(d);if(c){c.shift();for(var f=1;7>f;f++)c[f]=+(c[f]||(3>f?1:0)),1==f&&c[f]--;var h=+c.pop(),i=+c.pop(),j=c.pop(),f=0;if(j){if(23=h?(c[0]=h+400,a.UTC.apply(this,c)+f-126227808E5):a.UTC.apply(this,c)+f}return a.parse.apply(this,arguments)};return d}(Date);j="\t\n\u000b\u000c\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 A=RegExp("^"+j+j+"*"),B=RegExp(j+j+"*$");String.prototype.trim=function(){return(""+this).replace(A,"").replace(B,"")}}var v=function(a){a=+a;a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0>>0;if(m(a)!="[object Function]")throw new TypeError;for(;++d>>0,e=Array(d);if(m(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var g=0;g>>0,e=[],g;if(m(a)!="[object Function]")throw new TypeError(a+ +" is not a function");for(var o=0;o>>0;if(m(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var e=0;e>>0;if(m(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var e= +0;e>>0;if(m(a)!="[object Function]")throw new TypeError(a+" is not a function");if(!b&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var d=0,e;if(arguments.length>=2)e=arguments[1];else{do{if(d in c){e=c[d++];break}if(++d>=b)throw new TypeError("reduce of empty array with no initial value");}while(1)}for(;d>>0;if(m(a)!="[object Function]")throw new TypeError(a+" is not a function");if(!b&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var d,b=b-1;if(arguments.length>=2)d=arguments[1];else{do{if(b in c){d=c[b--];break}if(--b<0)throw new TypeError("reduceRight of empty array with no initial value");}while(1)}do b in this&& +(d=a.call(void 0,d,c[b],b,c));while(b--);return d});Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var c=i(this),b=c.length>>>0;if(!b)return-1;var d=0;arguments.length>1&&(d=w(arguments[1]));for(d=d>=0?d:Math.max(0,b+d);d>>0;if(!b)return-1;var d=b-1;arguments.length>1&&(d=Math.min(d,w(arguments[1])));for(d=d>=0?d:b-Math.abs(d);d>=0;d--)if(d in +c&&a===c[d])return d;return-1});Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:f)});Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(a,c){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+a);if(h(a,c)){var b={enumerable:true,configurable:true};if(p){var d=a.__proto__;a.__proto__=f;var e=r(a,c),g=s(a,c);a.__proto__=d;if(e|| +g){if(e)b.get=e;if(g)b.set=g;return b}}b.value=a[c];return b}});Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)});Object.create||(Object.create=function(a,c){var b;if(a===null)b={__proto__:null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");b=function(){};b.prototype=a;b=new b;b.__proto__=a}c!==void 0&&Object.defineProperties(b,c);return b});if(Object.defineProperty){var l=n({}),z="undefined"==typeof document|| +n(document.createElement("div"));if(!l||!z)var t=Object.defineProperty}if(!Object.defineProperty||t)Object.defineProperty=function(a,c,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.defineProperty called on non-object: "+a);if(typeof b!="object"&&typeof b!="function"||b===null)throw new TypeError("Property description must be an object: "+b);if(t)try{return t.call(Object,a,c,b)}catch(d){}if(h(b,"value"))if(p&&(r(a,c)||s(a,c))){var e=a.__proto__;a.__proto__=f; +delete a[c];a[c]=b.value;a.__proto__=e}else a[c]=b.value;else{if(!p)throw new TypeError("getters & setters can not be defined on this javascript engine");h(b,"get")&&u(a,c,b.get);h(b,"set")&&v(a,c,b.set)}return a};Object.defineProperties||(Object.defineProperties=function(a,c){for(var b in c)h(c,b)&&b!="__proto__"&&Object.defineProperty(a,b,c[b]);return a});Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(E){Object.freeze= +function(a){return function(c){return typeof c=="function"?c:a(c)}}(Object.freeze)}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 c="";h(a,c);)c=c+"?";a[c]=true;var b=h(a,c);delete a[c];return b});if(!Object.keys){var x=!0,y="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), +A=y.length,j;for(j in{toString:null})x=!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 c=[],b;for(b in a)h(a,b)&&c.push(b);if(x)for(b=0;b9999?"+":"")+("00000"+Math.abs(d)).slice(0<=d&&d<=9999?-4:-6);for(c=a.length;c--;){b=a[c];b<10&&(a[c]="0"+b)}return d+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};Date.now||(Date.now=function(){return(new Date).getTime()});Date.prototype.toJSON||(Date.prototype.toJSON=function(){if(typeof this.toISOString!= +"function")throw new TypeError("toISOString property is not callable");return this.toISOString()});if(!Date.parse||864E13!==Date.parse("+275760-09-13T00:00:00.000Z"))Date=function(a){var c=function g(b,c,d,f,h,i,j){var k=arguments.length;if(this instanceof a){k=k==1&&""+b===b?new a(g.parse(b)):k>=7?new a(b,c,d,f,h,i,j):k>=6?new a(b,c,d,f,h,i):k>=5?new a(b,c,d,f,h):k>=4?new a(b,c,d,f):k>=3?new a(b,c,d):k>=2?new a(b,c):k>=1?new a(b):new a;k.constructor=g;return k}return a.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})))?)?)?)?$"), +d;for(d in a)c[d]=a[d];c.now=a.now;c.UTC=a.UTC;c.prototype=a.prototype;c.prototype.constructor=c;c.parse=function(c){var d=b.exec(c);if(d){d.shift();for(var f=1;f<7;f++){d[f]=+(d[f]||(f<3?1:0));f==1&&d[f]--}var h=+d.pop(),i=+d.pop(),j=d.pop(),f=0;if(j){if(i>23||h>59)return NaN;f=(i*60+h)*6E4*(j=="+"?-1:1)}h=+d[0];if(0<=h&&h<=99){d[0]=h+400;return a.UTC.apply(this,d)+f-126227808E5}return a.UTC.apply(this,d)+f}return a.parse.apply(this,arguments)};return c}(Date);j="\t\n\x0B\u000c\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 B=RegExp("^"+j+j+"*"),C=RegExp(j+j+"*$");String.prototype.trim=function(){if(this===void 0||this===null)throw new TypeError("can't convert "+this+" to object");return(""+this).replace(B,"").replace(C,"")}}var w=function(a){a=+a;a!==a?a=0:a!==0&&(a!==1/0&&a!==-(1/0))&&(a=(a>0||-1)*Math.floor(Math.abs(a)));return a},D="a"!="a"[0],i=function(a){if(a==null)throw new TypeError("can't convert "+a+" to object");return D&&typeof a=="string"&&a?a.split(""): +Object(a)}}); \ No newline at end of file