-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolyfills.01000010.js
2 lines (2 loc) · 10.6 KB
/
polyfills.01000010.js
1
2
/*! For detailed credits and licence information see https://github.com/financial-times/polyfill-library */
!function(t,e){function r(t){if(1/t==-1/0&&(t=0),t>Math.pow(2,32)-1)throw new RangeError("Invalid array length");var e=[];return e.length=t,e}function n(t,e){var r=arguments.length>2?arguments[2]:[];if(!1===c(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(e,r)}function o(t,e){return t[e]}function i(t,e){return e in t}function c(t){return"function"==typeof t}function l(t){if(null==t)throw TypeError(Object.prototype.toString.call(t)+" is not coercible to Object.");return t}function a(t){return Boolean(t)}function u(t){var e=Number(t);return isNaN(e)?0:1/e==1/0||1/e==-1/0||e===1/0||e===-1/0?e:(e<0?-1:1)*Math.floor(Math.abs(e))}function p(t){var e=u(t);return e<=0?0:Math.min(e,Math.pow(2,53)-1)}function f(t){if(null==t)throw TypeError();return Object(t)}function y(t,e){var r,n=(r=e,f(t)[r]);if(null!=n){if(!1===c(n))throw new TypeError("Method not callable: "+e);return n}}function b(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in t&&(e instanceof t.Symbol||e.constructor===t.Symbol)?"symbol":"object"}}function s(t,e){var r=o(t,"prototype");return"object"!==b(r)&&(r=e),r}function w(t){return"object"===b(t)&&("function"==typeof t&&!!t.prototype)}function h(e){if("object"!==b(e))return!1;var r="Symbol"in t&&"match"in t.Symbol?o(e,t.Symbol.match):void 0;if(void 0!==r)return a(r);try{var n=e.lastIndex;return e.lastIndex=0,RegExp.prototype.exec.call(e),!0}catch(t){}finally{e.lastIndex=n}return!1}function v(t,e){if("string"===e)var r=["toString","valueOf"];else r=["valueOf","toString"];for(var i=0;i<r.length;++i){var l=o(t,r[i]);if(c(l)){var a=n(l,t);if("object"!==b(a))return a}}throw new TypeError("Cannot convert to primitive.")}function d(e){var r=arguments.length>1?arguments[1]:void 0;if("object"===b(e)){if(arguments.length<2)var o="default";else r===String?o="string":r===Number&&(o="number");var i="function"==typeof t.Symbol&&"symbol"==typeof t.Symbol.toPrimitive?y(e,t.Symbol.toPrimitive):void 0;if(void 0!==i){var c=n(i,e,[o]);if("object"!==b(c))return c;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===o&&(o="number"),v(e,o)}return e}function g(t){switch(b(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return g(d(t,String));default:return String(t)}}var j,O,m,S,E,P,_;function T(t,e,r){var n=function(t,e,r){var n={value:r,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(t,e,n),!0}catch(t){return!1}}(t,e,r);if(!n)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(r)+"` to property `"+Object.prototype.toString.call(e)+"` on object `"+Object.prototype.toString.call(t)+"`");return n}function $(t,e,r){var n={value:r,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(t,e,n)}function x(t,e){var r=arguments[2]||{},n=s(t,e),o=Object.create(n);for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&Object.defineProperty(o,i,{configurable:!0,enumerable:!1,writable:!0,value:r[i]});return o}function F(e,i){var c;if(0===i&&1/i==-1/0&&(i=0),!1===(c=e,"[object Array]"===Object.prototype.toString.call(c)))return r(i);var l=o(e,"constructor");if("object"===b(l)&&null===(l="Symbol"in t&&"species"in t.Symbol?o(l,t.Symbol.species):void 0)&&(l=void 0),void 0===l)return r(i);if(!w(l))throw new TypeError("C must be a constructor");return function(t){var e=arguments.length>2?arguments[2]:t,r=arguments.length>1?arguments[1]:[];if(!w(t))throw new TypeError("F must be a constructor.");if(!w(e))throw new TypeError("newTarget must be a constructor.");if(e===t)return new(Function.prototype.bind.apply(t,[null].concat(r)));var o=x(e,Object.prototype);return n(t,o,r)}(l,[i])}"defineProperty"in Object&&function(){try{return Object.defineProperty({},"test",{value:42}),!0}catch(t){return!1}}()||(j=Object.defineProperty,O=Object.prototype.hasOwnProperty.call(Object.prototype,"__defineGetter__"),m="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(t,e,r){if(j&&(t===window||t===document||t===Element.prototype||t instanceof Element))return j(t,e,r);if(null===t||!(t instanceof Object||"object"==typeof t))throw new TypeError("Object.defineProperty called on non-object");if(!(r instanceof Object))throw new TypeError("Property description must be an object");var n=String(e),o="value"in r||"writable"in r,i="get"in r&&typeof r.get,c="set"in r&&typeof r.set;if(i){if("function"!==i)throw new TypeError("Getter must be a function");if(!O)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(o)throw new TypeError(m);Object.__defineGetter__.call(t,n,r.get)}else t[n]=r.value;if(c){if("function"!==c)throw new TypeError("Setter must be a function");if(!O)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(o)throw new TypeError(m);Object.__defineSetter__.call(t,n,r.set)}return"value"in r&&(t[n]=r.value),t}),"bind"in Function.prototype||$(Function.prototype,"bind",(function(t){var e=Array,r=Object,n=e.prototype,o=function(){},i=n.slice,l=n.concat,a=n.push,u=Math.max,p=this;if(!c(p))throw new TypeError("Function.prototype.bind called on incompatible "+p);for(var f,y=i.call(arguments,1),b=function(){if(this instanceof f){var e=p.apply(this,l.call(y,i.call(arguments)));return r(e)===e?e:this}return p.apply(t,l.call(y,i.call(arguments)))},s=u(0,p.length-y.length),w=[],h=0;h<s;h++)a.call(w,"$"+h);return f=Function("binder","return function ("+w.join(",")+"){ return binder.apply(this, arguments); }")(b),p.prototype&&(o.prototype=p.prototype,f.prototype=new o,o.prototype=null),f})),"getOwnPropertyDescriptor"in Object&&"function"==typeof Object.getOwnPropertyDescriptor&&function(){try{return"3"===Object.getOwnPropertyDescriptor("13.7",1).value}catch(t){return!1}}()||(S=Object.getOwnPropertyDescriptor,E=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(t){return!1}},P={}.toString,_="".split,$(Object,"getOwnPropertyDescriptor",(function(t,e){var r=f(t);r=("string"===b(r)||r instanceof String)&&"[object String]"==P.call(t)?_.call(t,""):Object(t);var n,o,i=function(t){var e=d(t,String);return"symbol"===b(e)?e:g(e)}(e);if(E)try{return S(r,i)}catch(t){}if(n=r,o=i,Object.prototype.hasOwnProperty.call(n,o))return{enumerable:!0,configurable:!0,writable:!0,value:r[i]}}))),"getPrototypeOf"in Object||$(Object,"getPrototypeOf",(function(t){if(t!==Object(t))throw new TypeError("Object.getPrototypeOf called on non-object");var e=t.__proto__;return e||null===e?e:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Object.prototype:null})),"keys"in Object&&function(){return 2===Object.keys(arguments).length}(1,2)&&function(){try{return Object.keys(""),!0}catch(t){return!1}}()||$(Object,"keys",function(){"use strict";var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.prototype.propertyIsEnumerable,n=!r.call({toString:null},"toString"),o=r.call((function(){}),"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(t){var e=t.constructor;return e&&e.prototype===t},l={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},a=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&t.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{c(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();return function(r){var l,u,p,f="[object Function]"===e.call(r),y=(l=r,u=e.call(l),(p="[object Arguments]"===u)||(p="[object Array]"!==u&&null!==l&&"object"==typeof l&&"number"==typeof l.length&&l.length>=0&&"[object Function]"===e.call(l.callee)),p),b="[object String]"===e.call(r),s=[];if(null==r)throw new TypeError("Cannot convert undefined or null to object");var w=o&&f;if(b&&r.length>0&&!t.call(r,0))for(var h=0;h<r.length;++h)s.push(String(h));if(y&&r.length>0)for(var v=0;v<r.length;++v)s.push(String(v));else for(var d in r)w&&"prototype"===d||!t.call(r,d)||s.push(String(d));if(n)for(var g=function(t){if("undefined"==typeof window||!a)return c(t);try{return c(t)}catch(t){return!1}}(r),j=0;j<i.length;++j)g&&"constructor"===i[j]||!t.call(r,i[j])||s.push(i[j]);return s}}()),"defineProperties"in Object||$(Object,"defineProperties",(function(t,e){if("object"!==b(t))throw new TypeError("Object.defineProperties called on non-object");for(var r=f(e),n=Object.keys(r),i=[],c=0;c<n.length;c++){var l=n[c],a=Object.getOwnPropertyDescriptor(r,l);if(void 0!==a&&a.enumerable){var u=o(r,l);i.push([l,u])}}for(var p=0;p<i.length;p++){var y=i[p][0];u=i[p][1],Object.defineProperty(t,y,u)}return t})),"create"in Object||function(){if(!({__proto__:null}instanceof Object))var t=function(){return{__proto__:null}};else t=function(){var e=document.createElement("iframe");e.style.display="none";var r=document.body||document.documentElement;r.appendChild(e),e.src="javascript:";var n=e.contentWindow.Object.prototype;r.removeChild(e),e=null,delete n.constructor,delete n.hasOwnProperty,delete n.propertyIsEnumerable,delete n.isPrototypeOf,delete n.toLocaleString,delete n.toString,delete n.valueOf;var o=function(){};return o.prototype=n,t=function(){return new o},new o};function e(){}$(Object,"create",(function(r,n){if("object"!==b(r)&&"null"!==b(r))throw new TypeError("Object prototype may only be an Object or null");if("null"===b(r))var o=t();else e.prototype=r,(o=new e).__proto__=r,o.constructor.prototype=r,o.__proto__=r;return 1 in arguments?Object.defineProperties(o,n):o}))}(),"filter"in Array.prototype||$(Array.prototype,"filter",(function(t){var e=f(this),r=p(o(e,"length"));if(!1===c(t))throw new TypeError(t+" is not a function");for(var l=arguments.length>1?arguments[1]:void 0,u=F(e,0),y=0,b=0;y<r;){var s=g(y),w=i(e,s);if(w){var h=o(e,s),v=a(n(t,l,[h,y,e]));v&&(T(u,g(b),h),b+=1)}y+=1}return u})),"includes"in String.prototype||$(String.prototype,"includes",(function(t){"use strict";var e=arguments.length>1?arguments[1]:void 0,r=l(this),n=g(r),o=h(t);if(o)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var i=g(t),c=u(e),a=n.length,p=Math.min(Math.max(c,0),a);return-1!==String.prototype.indexOf.call(n,i,p)}))}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});