!function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Spinner=t()}(this,function(){"use strict";function e(e,t){var n,r=document.createElement(e||"div");for(n in t)r[n]=t[n];return r}function t(e){for(var t=1,n=arguments.length;n>t;t++)e.appendChild(arguments[t]);return e}function n(e,t,n,r){var i=["opacity",t,~~(100*e),n,r].join("-"),s=.01+n/r*100,o=Math.max(1-(1-e)/t*(100-s),e),u=f.substring(0,f.indexOf("Animation")).toLowerCase(),a=u&&"-"+u+"-"||"";return c[i]||(h.insertRule("@"+a+"keyframes "+i+"{0%{opacity:"+o+"}"+s+"%{opacity:"+e+"}"+(s+.01)+"%{opacity:1}"+(s+t)%100+"%{opacity:"+e+"}100%{opacity:"+o+"}}",h.cssRules.length),c[i]=1),i}function r(e,t){var n,r,i=e.style;for(t=t.charAt(0).toUpperCase()+t.slice(1),r=0;r',n)}h.addRule(".spin-vml","behavior:url(#default#VML)"),u.prototype.lines=function(e,r){function s(){return i(n("group",{coordsize:l+" "+l,coordorigin:-f+" "+ -f}),{width:l,height:l})}function u(e,u,a){t(h,t(i(s(),{rotation:360/r.lines*e+"deg",left:~~u}),t(i(n("roundrect",{arcsize:r.corners}),{width:f,height:r.width,left:r.radius,top:-r.width>>1,filter:a}),n("fill",{color:o(r.color,e),opacity:r.opacity}),n("stroke",{opacity:0}))))}var a,f=r.length+r.width,l=2*f,c=2*-(r.width+r.length)+"px",h=i(s(),{position:"absolute",top:c,left:c});if(r.shadow)for(a=1;a<=r.lines;a++)u(a,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(a=1;a<=r.lines;a++)u(a);return t(e,h)},u.prototype.opacity=function(e,t,n,r){var i=e.firstChild;r=r.shadow&&r.lines||0,i&&t+r>1)+"px"})}for(var a,l=0,c=(s.lines-1)*(1-s.direction)/2;l