/**
* Polyfills for ES5:
* console.log, Event, CustomEvent,
* Location.origin, Location.toString,
* DOMTokenList.prototype {add, remove, item, contains, toggle (1 arg), length}
* requestAnimationFrame, cancelAnimationFrame
* @preserve
*/
function t(t,n,e){var i=t[n]=t[n]||e;e===i&&(i.justPolyfill=!0)}function o(t){return t.prototype}function n(t,n){for(var e in t)o(g).hasOwnProperty.call(t,e)&&n(e,t[e])}function e(t,n,e){g.defineProperty(t,n,{get:e})}function i(t,n){for(var e,i=["moz","webkit","ms","o"],o=i.length;0<=--o;)if(e=t[n+i[o]])return e}function r(t){return[].join.call(t," ")}function u(t){if(!(t+="")||/\s/.test(t))throw Error('"'+t+'" is invalid');return t}function c(){return[].call(this,function(t,n){return!isNaN(n)})}function s(e,i){var o=this;n(c.call(o),function(t,n){e.call(i,n,+t,o)})}function a(){return g.keys(c.call(this))}var l,f,m,h,v,b,p,g,E,d,_,y;l=window,p=document,g=Object,E=Array,d=Element,_=Event,y=Location,t(l,"console",{log:function(){}}),t(l,"Event",o(_).constructor?_:function(t,n){var e=document.createEvent("Event"),i=Object(n);return e.initEvent(t,i.bubbles,i.cancelable),e}),t(l,"CustomEvent",o(CustomEvent).constructor?_:function(t,n){var e=document.createEvent("CustomEvent"),i=Object(n);return e.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),e}),t(g,"setPrototypeOf",function(e,t){"__proto__"in e?e.__proto__=t:n(t,function(t,n){e[t]=n})}),o(y).origin||e(o(y),"origin",function(){return this.protocol+"//"+this.host}),t(o(y),"toString",function(){return this.href}),f="DOMTokenList",m=function(t){var n=this;n.value=(t.getAttribute("class")||"").trim(),n.length=n.value?[].push.apply(n,n.value.split(/\s+/)):0,n.element=t,o(m).toString=function(){return r(this)},o(m)._values=o(m)._entries=c,o(m)._keys=a},h=p.createElement("a"),v="classList",t(l,f,m),v in h||e(o(d),v,function(){return new l[f](this)}),t(o(m),"add",function(){var t,n,e=arguments;for(t=0;t<e.length;t+=1)this.contains(n=u(e[t]))||(o(E).push.call(this,n),this.element.setAttribute("class",r(this)))}),t(o(m),"remove",function(){for(var e,i=this,t=arguments,n=t.length;0<=--n;)i.contains(e=u(t[n]))&&(s.call(i,function(t,n){t===e&&o(E).splice.call(i,n,1)}),i.element.setAttribute("class",r(i)))}),t(o(m),"item",function(t){return this[t]||null}),t(o(m),"contains",function(t){return!/\s/.test(t)&&0<=function(t,n){return(" "+r(t)+" ").indexOf(" "+n+" ")}(this,t)}),t(o(m),"toggle",function(t,n){return this.contains(t)&&!n?(this.remove(t),!1):(this.add(t),!0)}),h=null,t(l,"requestAnimationFrame",i(l,"RequestAnimationFrame")||(b=0,function(t){var n=+new Date,e=Math.max(0,16-n-b),i=setTimeout(function(){t(n+e)},e);return b=n+e,i})),t(l,"cancelAnimationFrame",i(l,"CancelAnimationFrame")||i(l,"CancelRequestAnimationFrame")||function(t){clearTimeout(t)});