(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{365:function(t,e,i){"use strict";i.r(e),i.d(e,"DefaultOptions",(function(){return a})),i.d(e,"default",(function(){return h}));var s=i(1),n=i.n(s);function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function o(t){for(var e=1;e{if(!t)return;this.context=t.getContext("2d"),this.particles=[];const i=this.options.maxCount;for(;this.particles.length{this.isRunning=!1}),n()(this,"resetParticle",(t,e,i)=>(t.color=this.colors[Math.random()*this.colors.length|0]+(this.options.alpha+")"),this.options.gradient?t.color2=this.colors[Math.random()*this.colors.length|0]+(this.options.alpha+")"):t.color2=t.color,t.x=Math.random()*e,t.y=Math.random()*-i,t.diameter=10*Math.random()+5,t.tilt=-10*Math.random(),t.tiltAngleIncrement=.07*Math.random()+.05,t.tiltAngle=Math.random()*Math.PI,t)),n()(this,"runAnimation",()=>{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{const t=Date.now(),e=t-this.lastFrameTime;(!this.supportsAnimationFrame||e>this.options.frameInterval)&&(this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height),this.updateParticles(),this.drawParticles(this.context),this.lastFrameTime=t-e%this.options.frameInterval),requestAnimationFrame(this.runAnimation)}}),n()(this,"drawParticles",t=>{if(!this.context||!this.context.canvas)return;let e,i,s;for(const n of this.particles){if(this.context.beginPath(),t.lineWidth=n.diameter,i=n.x+n.tilt,e=i+n.diameter/2,s=n.y+n.tilt+n.diameter/2,this.options.gradient){const r=t.createLinearGradient(e,n.y,i,s);r.addColorStop(0,n.color),r.addColorStop(1,n.color2),t.strokeStyle=r}else t.strokeStyle=n.color;t.moveTo(e,n.y),t.lineTo(i,s),t.stroke()}}),n()(this,"updateParticles",()=>{if(!this.context||!this.context.canvas)return;const t=this.context.canvas.width,e=this.context.canvas.height;let i;this.waveAngle+=.01;for(let s=0;st+20||i.x<-20||i.y>e)&&(this.isRunning&&this.particles.length<=this.options.maxCount?this.resetParticle(i,t,e):(this.particles.splice(s,1),s--))}),this.options=o(o({},a),t)}}}}]); //# sourceMappingURL=0.js.map