(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{483:function(t,e,i){"use strict";i.r(e),i.d(e,"DefaultOptions",(function(){return a})),i.d(e,"default",(function(){return h}));var n=i(13),s=i.n(n),o=i(155);function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:3e3;if(!t)return;e.context=t.getContext("2d"),e.particles=[];const n=e.options.maxCount;for(;e.particles.length{this.isRunning=!1})),s()(this,"resetParticle",((t,e,i)=>(t.x=Math.random()*e,t.y=Math.random()*-i,t.width=1.5*Math.random(),t.height=15*t.width+4,t.speed=Math.random()*this.options.speed*4/5+this.options.speed,t))),s()(this,"renderLoop",(()=>{if(this.context&&this.context.canvas)if(0===this.particles.length)this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height);else{(Date.now()-this.lastAnimationTime>=15||!this.lastAnimationTime)&&(this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height),this.lastAnimationTime=Date.now(),this.animateAndRenderRaindrops()),requestAnimationFrame(this.renderLoop)}})),s()(this,"animateAndRenderRaindrops",(()=>{if(!this.context||!this.context.canvas)return;const t=this.context.canvas.height;for(const e of Object(o.b)(this.particles)){e.y+=e.speed,this.context.save(),this.context.beginPath(),this.context.rect(e.x,e.y,e.width,e.height),this.context.fillStyle="#5dadec",this.context.fill(),this.context.closePath(),this.context.restore();const i=2*t;if(e.y>t+i){const t=this.particles.indexOf(e);this.particles.splice(t,1)}}})),this.options=c(c({},a),t)}}}}]); //# sourceMappingURL=4.js.map