@novely/particles 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ var Pe="generated",ws="pointerdown",_s="pointerup",Mt="pointerleave",ks="pointerout",ae="pointermove",Cs="touchstart",Ln="touchend",Ms="touchmove",Ps="touchcancel",Os="resize",Rs="visibilitychange",j="tsParticles - Error";var Q={x:0,y:0,z:0},Pt={a:1,b:0,c:0,d:1},Ie="random",Ot="mid",H=2,Ss=Math.PI*H,Nt=60;var An="true",Vn="false",Ht="canvas",Bn=0,ce=2,qn=4,zs=1,Nn=1,Hn=1,Ds=4,Ut=1,Rt=255,Te=360,Wt=100,jt=100,Un=0,$t=0,Is=60,Ts=0,St=.25,Wn=.5+St,jn=0,Es=1,Fs=0,Ls=0,As=1,zt=1,Vs=1,$n=1,it=0,Gt=1,Bs=0,qs=120,Ns=0,Hs=0,Us=1e4,Ws=0,js=1,We=0,Qt=1,$s=1,Gs=0,Gn=1,Qs=0,Ys=0,Qn=-St,Yn=1.5,Xn=0,Xs=1,Zs=0,Dt=0,Ks=0,Yt=1,Js=1,ot=1,er=500,Zn=50,tr=0,It=1,Kn=0,Jn=1,ir=0,Ee=255,Xt=3,Zt=6,or=1,nr=1,sr=0,rr=0,ar=0,cr=0;var $;(function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"})($||($={}));function Kt(t){return typeof t=="boolean"}function le(t){return typeof t=="string"}function me(t){return typeof t=="number"}function Oe(t){return typeof t=="object"&&t!==null}function J(t){return Array.isArray(t)}function d(t){return t==null}var nt=class t{constructor(e,i,o){if(this._updateFromAngle=(n,s)=>{this.x=Math.cos(n)*s,this.y=Math.sin(n)*s},!me(e)&&e){this.x=e.x,this.y=e.y;let n=e;this.z=n.z?n.z:Q.z}else if(e!==void 0&&i!==void 0)this.x=e,this.y=i,this.z=o??Q.z;else throw new Error(`${j} Vector3d not initialized correctly`)}static get origin(){return t.create(Q.x,Q.y,Q.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this._updateFromAngle(e,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(e){this._updateFromAngle(this.angle,e)}static clone(e){return t.create(e.x,e.y,e.z)}static create(e,i,o){return new t(e,i,o)}add(e){return t.create(this.x+e.x,this.y+e.y,this.z+e.z)}addTo(e){this.x+=e.x,this.y+=e.y,this.z+=e.z}copy(){return t.clone(this)}distanceTo(e){return this.sub(e).length}distanceToSq(e){return this.sub(e).getLengthSq()}div(e){return t.create(this.x/e,this.y/e,this.z/e)}divTo(e){this.x/=e,this.y/=e,this.z/=e}getLengthSq(){return this.x**ce+this.y**ce}mult(e){return t.create(this.x*e,this.y*e,this.z*e)}multTo(e){this.x*=e,this.y*=e,this.z*=e}normalize(){let e=this.length;e!=We&&this.multTo(Ut/e)}rotate(e){return t.create(this.x*Math.cos(e)-this.y*Math.sin(e),this.x*Math.sin(e)+this.y*Math.cos(e),Q.z)}setTo(e){this.x=e.x,this.y=e.y;let i=e;this.z=i.z?i.z:Q.z}sub(e){return t.create(this.x-e.x,this.y-e.y,this.z-e.z)}subFrom(e){this.x-=e.x,this.y-=e.y,this.z-=e.z}},D=class t extends nt{constructor(e,i){super(e,i,Q.z)}static get origin(){return t.create(Q.x,Q.y)}static clone(e){return t.create(e.x,e.y)}static create(e,i){return new t(e,i)}};var Rc=Math.random,lr={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)};function M(){return U(Rc(),0,1-Number.EPSILON)}function fr(t){return lr.nextFrame(t)}function ur(t){lr.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function Jt(t,e,i,o){return Math.floor((t*i+e*o)/(i+o))}function Y(t){let e=ee(t),i=0,o=st(t);return e===o&&(o=i),M()*(e-o)+o}function y(t){return me(t)?t:Y(t)}function st(t){return me(t)?t:t.min}function ee(t){return me(t)?t:t.max}function _(t,e){if(t===e||e===void 0&&me(t))return t;let i=st(t),o=ee(t);return e!==void 0?{min:Math.min(i,e),max:Math.max(o,e)}:_(i,o)}function T(t,e){let i=t.x-e.x,o=t.y-e.y,n=2;return{dx:i,dy:o,distance:Math.sqrt(i**n+o**n)}}function F(t,e){return T(t,e).distance}function ue(t){return t*Math.PI/180}function hr(t,e,i){if(me(t))return ue(t);switch(t){case $.top:return-Math.PI*.5;case $.topRight:return-Math.PI*St;case $.right:return Ts;case $.bottomRight:return Math.PI*St;case $.bottom:return Math.PI*.5;case $.bottomLeft:return Math.PI*Wn;case $.left:return Math.PI;case $.topLeft:return-Math.PI*Wn;case $.inside:return Math.atan2(i.y-e.y,i.x-e.x);case $.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return M()*Ss}}function dr(t){let e=D.origin;return e.length=1,e.angle=t,e}function es(t,e,i,o){return D.create(t.x*(i-o)/(i+o)+e.x*H*o/(i+o),t.y)}function pr(t){return{x:t.position?.x??M()*t.size.width,y:t.position?.y??M()*t.size.height}}function ei(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}var Re;(function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"})(Re||(Re={}));var L;(function(t){t.increasing="increasing",t.decreasing="decreasing"})(L||(L={}));var xe;(function(t){t.none="none",t.max="max",t.min="min"})(xe||(xe={}));var C;(function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"})(C||(C={}));var ve;(function(t){t.precise="precise",t.percent="percent"})(ve||(ve={}));var Fe;(function(t){t.max="max",t.min="min",t.random="random"})(Fe||(Fe={}));var Sc={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function he(){return Sc}function zc(t){let e=new Map;return(...i)=>{let o=JSON.stringify(i);if(e.has(o))return e.get(o);let n=t(...i);return e.set(o,n),n}}function mr(t){let e={bounced:!1},{pSide:i,pOtherSide:o,rectSide:n,rectOtherSide:s,velocity:r,factor:a}=t;return o.min<s.min||o.min>s.max||o.max<s.min||o.max>s.max||(i.max>=n.min&&i.max<=(n.max+n.min)*.5&&r>jn||i.min<=n.max&&i.min>(n.max+n.min)*.5&&r<jn)&&(e.velocity=r*-a,e.bounced=!0),e}function Dc(t,e){let i=W(e,o=>t.matches(o));return J(i)?i.some(o=>o):i}function be(){return typeof window>"u"||!window||typeof window.document>"u"||!window.document}function Ic(){return!be()&&typeof matchMedia<"u"}function ti(t){if(Ic())return matchMedia(t)}function xr(t){if(!(be()||typeof IntersectionObserver>"u"))return new IntersectionObserver(t)}function gr(t){if(!(be()||typeof MutationObserver>"u"))return new MutationObserver(t)}function O(t,e){return t===e||J(e)&&e.indexOf(t)>-1}async function ts(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function Tc(t){return Math.floor(M()*t.length)}function rt(t,e,i=!0){return t[e!==void 0&&i?e%t.length:Tc(t)]}function at(t,e,i,o,n){return Ec(Le(t,o??0),e,i,n)}function Ec(t,e,i,o){let n=!0;return(!o||o===C.bottom)&&(n=t.top<e.height+i.x),n&&(!o||o===C.left)&&(n=t.right>i.x),n&&(!o||o===C.right)&&(n=t.left<e.width+i.y),n&&(!o||o===C.top)&&(n=t.bottom>i.y),n}function Le(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function E(t,...e){for(let i of e){if(i==null)continue;if(!Oe(i)){t=i;continue}let o=Array.isArray(i);o&&(Oe(t)||!t||!Array.isArray(t))?t=[]:!o&&(Oe(t)||!t||Array.isArray(t))&&(t={});for(let n in i){if(n==="__proto__")continue;let s=i,r=s[n],a=t;a[n]=Oe(r)&&Array.isArray(r)?r.map(c=>E(a[n],c)):E(a[n],r)}}return t}function ct(t,e){return!!vr(e,i=>i.enable&&O(t,i.mode))}function lt(t,e,i){W(e,o=>{let n=o.mode;o.enable&&O(t,n)&&Fc(o,i)})}function Fc(t,e){let i=t.selectors;W(i,o=>{e(o,t)})}function ii(t,e){if(!(!e||!t))return vr(t,i=>Dc(e,i.selectors))}function Tt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:D.create(y(t.options.bounce.horizontal.value),y(t.options.bounce.vertical.value))}}function oi(t,e){let{x:i,y:o}=t.velocity.sub(e.velocity),[n,s]=[t.position,e.position],{dx:r,dy:a}=T(s,n);if(i*r+o*a<0)return;let l=-Math.atan2(a,r),f=t.mass,u=e.mass,h=t.velocity.rotate(l),p=e.velocity.rotate(l),m=es(h,p,f,u),g=es(p,h,f,u),x=m.rotate(-l),b=g.rotate(-l);t.velocity.x=x.x*t.factor.x,t.velocity.y=x.y*t.factor.y,e.velocity.x=b.x*e.factor.x,e.velocity.y=b.y*e.factor.y}function yr(t,e){let i=t.getPosition(),o=t.getRadius(),n=Le(i,o),s=t.options.bounce,r=mr({pSide:{min:n.left,max:n.right},pOtherSide:{min:n.top,max:n.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:y(s.horizontal.value)});r.bounced&&(r.velocity!==void 0&&(t.velocity.x=r.velocity),r.position!==void 0&&(t.position.x=r.position));let a=mr({pSide:{min:n.top,max:n.bottom},pOtherSide:{min:n.left,max:n.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:y(s.vertical.value)});a.bounced&&(a.velocity!==void 0&&(t.velocity.y=a.velocity),a.position!==void 0&&(t.position.y=a.position))}function W(t,e){return J(t)?t.map((o,n)=>e(o,n)):e(t,0)}function K(t,e,i){return J(t)?rt(t,e,i):t}function vr(t,e){return J(t)?t.find((o,n)=>e(o,n)):e(t,0)?t:void 0}function ni(t,e){let i=t.value,o=t.animation,n={delayTime:y(o.delay)*1e3,enable:o.enable,value:y(t.value)*e,max:ee(i)*e,min:st(i)*e,loops:0,maxLoops:y(o.count),time:0},s=1;if(o.enable){switch(n.decay=s-y(o.decay),o.mode){case Re.increase:n.status=L.increasing;break;case Re.decrease:n.status=L.decreasing;break;case Re.random:n.status=M()>=.5?L.increasing:L.decreasing;break}let r=o.mode===Re.auto;switch(o.startValue){case Fe.min:n.value=n.min,r&&(n.status=L.increasing);break;case Fe.max:n.value=n.max,r&&(n.status=L.decreasing);break;case Fe.random:default:n.value=Y(n),r&&(n.status=M()>=.5?L.increasing:L.decreasing);break}}return n.initialValue=n.value,n}function Lc(t,e){if(!(t.mode===ve.percent)){let{mode:n,...s}=t;return s}return"x"in t?{x:t.x/100*e.width,y:t.y/100*e.height}:{width:t.width/100*e.width,height:t.height/100*e.height}}function si(t,e){return Lc(t,e)}function Ac(t,e,i,o,n){switch(e){case xe.max:i>=n&&t.destroy();break;case xe.min:i<=o&&t.destroy();break}}function ft(t,e,i,o,n){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;let f=(e.velocity??0)*n.factor,u=e.min,h=e.max,p=e.decay??1;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case L.increasing:e.value>=h?(i?e.status=L.decreasing:e.value-=h,e.loops||(e.loops=0),e.loops++):e.value+=f;break;case L.decreasing:e.value<=u?(i?e.status=L.increasing:e.value+=h,e.loops||(e.loops=0),e.loops++):e.value-=f}e.velocity&&p!==1&&(e.velocity*=p),Ac(t,o,e.value,u,h),t.destroyed||(e.value=U(e.value,u,h))}}function br(t){let e=document.createElement("div").style;if(!t)return e;for(let i in t){let o=t[i];if(!Object.prototype.hasOwnProperty.call(t,i)||d(o))continue;let n=t.getPropertyValue?.(o);if(!n)continue;let s=t.getPropertyPriority?.(o);s?e.setProperty?.(o,n,s):e.setProperty?.(o,n)}return e}function Vc(t){let e=document.createElement("div").style,i=10,o={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0"};for(let n in o){let s=o[n];e.setProperty(n,s)}return e}var wr=zc(Vc);var ri;(function(t){t.darken="darken",t.enlighten="enlighten"})(ri||(ri={}));function Bc(t,e){if(e){for(let i of t.colorManagers.values())if(e.startsWith(i.stringPrefix))return i.parseString(e)}}function te(t,e,i,o=!0){if(!e)return;let n=le(e)?{value:e}:e;if(le(n.value))return _r(t,n.value,i,o);if(J(n.value))return te(t,{value:rt(n.value,i,o)});for(let s of t.colorManagers.values()){let r=s.handleRangeColor(n);if(r)return r}}function _r(t,e,i,o=!0){if(!e)return;let n=le(e)?{value:e}:e;if(le(n.value))return n.value===Ie?Cr():qc(t,n.value);if(J(n.value))return _r(t,{value:rt(n.value,i,o)});for(let s of t.colorManagers.values()){let r=s.handleColor(n);if(r)return r}}function Se(t,e,i,o=!0){let n=te(t,e,i,o);return n?ns(n):void 0}function ns(t){let e=t.r/Rt,i=t.g/Rt,o=t.b/Rt,n=Math.max(e,i,o),s=Math.min(e,i,o),r={h:Un,l:(n+s)*.5,s:$t};return n!==s&&(r.s=r.l<.5?(n-s)/(n+s):(n-s)/(H-n-s),r.h=e===n?(i-o)/(n-s):r.h=i===n?H+(o-e)/(n-s):H*H+(e-i)/(n-s)),r.l*=jt,r.s*=Wt,r.h*=Is,r.h<Un&&(r.h+=Te),r.h>=Te&&(r.h-=Te),r}function qc(t,e){return Bc(t,e)}function je(t){let e=(t.h%Te+Te)%Te,i=Math.max($t,Math.min(Wt,t.s)),o=Math.max(ir,Math.min(jt,t.l)),n=e/Te,s=i/Wt,r=o/jt;if(i===$t){let m=Math.round(r*Ee);return{r:m,g:m,b:m}}let a=(m,g,x)=>{if(x<0&&x++,x>1&&x--,x*Zt<1)return m+(g-m)*Zt*x;if(x*H<1)return g;if(x*Xt<1*H){let k=H/Xt;return m+(g-m)*(k-x)*Zt}return m},c=r<.5?r*(or+s):r+s-r*s,l=H*r-c,f=nr/Xt,u=Math.min(Ee,Ee*a(l,c,n+f)),h=Math.min(Ee,Ee*a(l,c,n)),p=Math.min(Ee,Ee*a(l,c,n-f));return{r:Math.round(u),g:Math.round(h),b:Math.round(p)}}function kr(t){let e=je(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Cr(t){let e=t??sr,i=Rt+It;return{b:Math.floor(Y(_(e,i))),g:Math.floor(Y(_(e,i))),r:Math.floor(Y(_(e,i)))}}function oe(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??zt})`}function Ae(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??zt})`}function Et(t,e,i,o){let n=t,s=e;return n.r===void 0&&(n=je(t)),s.r===void 0&&(s=je(e)),{b:Jt(n.b,s.b,i,o),g:Jt(n.g,s.g,i,o),r:Jt(n.r,s.r,i,o)}}function Ft(t,e,i){if(i===Ie)return Cr();if(i===Ot){let o=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(o&&n&&e)return Et(o,n,t.getRadius(),e.getRadius());{let s=o??n;if(s)return je(s)}}else return i}function ai(t,e,i,o){let n=le(e)?e:e.value;return n===Ie?o?te(t,{value:n}):i?Ie:Ot:n===Ot?Ot:te(t,{value:n})}function ss(t){return t!==void 0?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function ci(t,e,i){let o={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(is(o.h,e.h,i),is(o.s,e.s,i),is(o.l,e.l,i)),o}function is(t,e,i){t.enable=e.enable,t.enable?(t.velocity=y(e.speed)/100*i,t.decay=Qt-y(e.decay),t.status=L.increasing,t.loops=ar,t.maxLoops=y(e.count),t.time=cr,t.delayTime=y(e.delay)*1e3,e.sync||(t.velocity*=M(),t.value*=M()),t.initialValue=t.value,t.offset=_(e.offset)):t.velocity=rr}function os(t,e,i,o){if(!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0)||(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=o.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0)))return;let f=t.offset?Y(t.offset):0,u=(t.velocity??0)*o.factor+f*3.6,h=t.decay??1,p=ee(e),m=st(e);!i||t.status===L.increasing?(t.value+=u,t.value>p&&(t.loops||(t.loops=0),t.loops++,i?t.status=L.decreasing:t.value-=p)):(t.value-=u,t.value<0&&(t.loops||(t.loops=0),t.loops++,t.status=L.increasing)),t.velocity&&h!==1&&(t.velocity*=h),t.value=U(t.value,m,p)}function li(t,e){if(!t)return;let{h:i,s:o,l:n}=t,s={h:{min:0,max:360},s:{min:0,max:100},l:{min:0,max:100}};i&&os(i,s.h,!1,e),o&&os(o,s.s,!0,e),n&&os(n,s.l,!0,e)}function Ve(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Mr(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(Q.x,Q.y,e.width,e.height)}function Pr(t,e,i,o){i&&(t.globalAlpha=o,t.drawImage(i,Q.x,Q.y,e.width,e.height),t.globalAlpha=1)}function fi(t,e){t.clearRect(Q.x,Q.y,e.width,e.height)}function Or(t){let{container:e,context:i,particle:o,delta:n,colorStyles:s,backgroundMask:r,composite:a,radius:c,opacity:l,shadow:f,transform:u}=t,h=o.getPosition(),p=o.rotation+(o.pathRotation?o.velocity.angle:tr),m={sin:Math.sin(p),cos:Math.cos(p)},g=!!p,x={a:m.cos*(u.a??Pt.a),b:g?m.sin*(u.b??It):u.b??Pt.b,c:g?-m.sin*(u.c??It):u.c??Pt.c,d:m.cos*(u.d??Pt.d)};i.setTransform(x.a,x.b,x.c,x.d,h.x,h.y),r&&(i.globalCompositeOperation=a);let b=o.shadowColor;f.enable&&b&&(i.shadowBlur=f.blur,i.shadowColor=oe(b),i.shadowOffsetX=f.offset.x,i.shadowOffsetY=f.offset.y),s.fill&&(i.fillStyle=s.fill);let v=o.strokeWidth??Kn;i.lineWidth=v,s.stroke&&(i.strokeStyle=s.stroke);let k={container:e,context:i,particle:o,radius:c,opacity:l,delta:n,transformData:x,strokeWidth:v};Hc(k),Uc(k),Nc(k),i.globalCompositeOperation="source-over",i.resetTransform()}function Nc(t){let{container:e,context:i,particle:o,radius:n,opacity:s,delta:r,transformData:a}=t;if(!o.effect)return;let c=e.effectDrawers.get(o.effect);c&&c.draw({context:i,particle:o,radius:n,opacity:s,delta:r,pixelRatio:e.retina.pixelRatio,transformData:{...a}})}function Hc(t){let{container:e,context:i,particle:o,radius:n,opacity:s,delta:r,strokeWidth:a,transformData:c}=t;if(!o.shape)return;let l=e.shapeDrawers.get(o.shape);l&&(i.beginPath(),l.draw({context:i,particle:o,radius:n,opacity:s,delta:r,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),o.shapeClose&&i.closePath(),a>Kn&&i.stroke(),o.shapeFill&&i.fill())}function Uc(t){let{container:e,context:i,particle:o,radius:n,opacity:s,delta:r,transformData:a}=t;if(!o.shape)return;let c=e.shapeDrawers.get(o.shape);c?.afterDraw&&c.afterDraw({context:i,particle:o,radius:n,opacity:s,delta:r,pixelRatio:e.retina.pixelRatio,transformData:{...a}})}function Rr(t,e,i){e.draw&&e.draw(t,i)}function Sr(t,e,i,o){e.drawParticle&&e.drawParticle(t,i,o)}function zr(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===ri.darken?-Jn:Jn)*i}}function Wc(t,e,i){let o=e[i];o!==void 0&&(t[i]=(t[i]??Es)*o)}function Dr(t,e,i=!1){if(!e)return;let o=t;if(!o)return;let n=o.style;if(!n)return;let s=new Set;for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&s.add(n[r]);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&s.add(e[r]);for(let r of s){let a=e.getPropertyValue(r);a?n.setProperty(r,a,i?"important":""):n.removeProperty(r)}}var ui=class{constructor(e,i){this.container=e,this._applyPostDrawUpdaters=s=>{for(let r of this._postDrawUpdaters)r.afterDraw?.(s)},this._applyPreDrawUpdaters=(s,r,a,c,l,f)=>{for(let u of this._preDrawUpdaters){if(u.getColorStyles){let{fill:h,stroke:p}=u.getColorStyles(r,s,a,c);h&&(l.fill=h),p&&(l.stroke=p)}if(u.getTransformValues){let h=u.getTransformValues(r);for(let p in h)Wc(f,h,p)}u.beforeDraw?.(r)}},this._applyResizePlugins=()=>{for(let s of this._resizePlugins)s.resize?.()},this._getPluginParticleColors=s=>{let r,a;for(let c of this._colorPlugins)if(!r&&c.particleFillColor&&(r=Se(this._engine,c.particleFillColor(s))),!a&&c.particleStrokeColor&&(a=Se(this._engine,c.particleStrokeColor(s))),r&&a)break;return[r,a]},this._initCover=async()=>{let s=this.container.actualOptions,r=s.backgroundMask.cover,a=r.color;if(a){let c=te(this._engine,a);if(c){let l={...c,a:r.opacity};this._coverColorStyle=oe(l,l.a)}}else await new Promise((c,l)=>{if(!r.image)return;let f=document.createElement("img");f.addEventListener("load",()=>{this._coverImage={image:f,opacity:r.opacity},c()}),f.addEventListener("error",u=>{l(u.error)}),f.src=r.image})},this._initStyle=()=>{let s=this.element,r=this.container.actualOptions;if(s){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(let a in r.style){if(!a||!r.style||!Object.prototype.hasOwnProperty.call(r.style,a))continue;let c=r.style[a];c&&s.style.setProperty(a,c,"important")}}},this._initTrail=async()=>{let s=this.container.actualOptions,r=s.particles.move.trail,a=r.fill;if(!r.enable)return;let c=Ut/r.length;if(a.color){let l=te(this._engine,a.color);if(!l)return;this._trailFill={color:{...l},opacity:c}}else await new Promise((l,f)=>{if(!a.image)return;let u=document.createElement("img");u.addEventListener("load",()=>{this._trailFill={image:u,opacity:c},l()}),u.addEventListener("error",h=>{f(h.error)}),u.src=a.image})},this._paintBase=s=>{this.draw(r=>Mr(r,this.size,s))},this._paintImage=(s,r)=>{this.draw(a=>Pr(a,this.size,s,r))},this._repairStyle=()=>{let s=this.element;s&&(this._safeMutationObserver(r=>r.disconnect()),this._initStyle(),this.initBackground(),this._safeMutationObserver(r=>{!s||!(s instanceof Node)||r.observe(s,{attributes:!0})}))},this._resetOriginalStyle=()=>{let s=this.element,r=this._originalStyle;!s||!r||Dr(s,r,!0)},this._safeMutationObserver=s=>{this._mutationObserver&&s(this._mutationObserver)},this._setFullScreenStyle=()=>{let s=this.element;s&&Dr(s,wr(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=i,this._standardSize={height:0,width:0};let o=e.retina.pixelRatio,n=this._standardSize;this.size={height:n.height*o,width:n.width*o},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){let e=this.container.actualOptions,i=e.particles.move.trail,o=this._trailFill;e.backgroundMask.enable?this.paint():i.enable&&i.length>Ls&&o?o.color?this._paintBase(oe(o.color,o.opacity)):o.image&&this._paintImage(o.image,o.opacity):e.clear&&this.draw(n=>{fi(n,this.size)})}destroy(){this.stop(),this._generated?(this.element?.remove(),this.element=void 0):this._resetOriginalStyle(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(e){let i=this._context;if(i)return e(i)}drawAsync(e){let i=this._context;if(i)return e(i)}drawParticle(e,i){if(e.spawning||e.destroyed)return;let o=e.getRadius();if(o<=Fs)return;let n=e.getFillColor(),s=e.getStrokeColor()??n,[r,a]=this._getPluginParticleColors(e);r||(r=n),a||(a=s),!(!r&&!a)&&this.draw(c=>{let l=this.container,f=l.actualOptions,u=e.options.zIndex,h=As-e.zIndexFactor,p=h**u.opacityRate,m=e.bubble.opacity??e.opacity?.value??zt,g=e.strokeOpacity??m,x=m*p,b=g*p,v={},k={fill:r?Ae(r,x):void 0};k.stroke=a?Ae(a,b):k.fill,this._applyPreDrawUpdaters(c,e,o,x,k,v),Or({container:l,context:c,particle:e,delta:i,colorStyles:k,backgroundMask:f.backgroundMask.enable,composite:f.backgroundMask.composite,radius:o*h**u.sizeRate,opacity:x,shadow:e.options.shadow,transform:v}),this._applyPostDrawUpdaters(e)})}drawParticlePlugin(e,i,o){this.draw(n=>Sr(n,e,i,o))}drawPlugin(e,i){this.draw(o=>Rr(o,e,i))}async init(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=gr(e=>{for(let i of e)i.type==="attributes"&&i.attributeName==="style"&&this._repairStyle()}),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(e){he().error(e)}this.initBackground(),this._safeMutationObserver(e=>{!this.element||!(this.element instanceof Node)||e.observe(this.element,{attributes:!0})}),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){let e=this.container.actualOptions,i=e.background,o=this.element;if(!o)return;let n=o.style;if(n){if(i.color){let s=te(this._engine,i.color);n.backgroundColor=s?oe(s,i.opacity):""}else n.backgroundColor="";n.backgroundImage=i.image||"",n.backgroundPosition=i.position||"",n.backgroundRepeat=i.repeat||"",n.backgroundSize=i.size||""}}initPlugins(){this._resizePlugins=[];for(let e of this.container.plugins.values())e.resize&&this._resizePlugins.push(e),(e.particleFillColor??e.particleStrokeColor)&&this._colorPlugins.push(e)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(let e of this.container.particles.updaters)e.afterDraw&&this._postDrawUpdaters.push(e),(e.getColorStyles??e.getTransformValues??e.beforeDraw)&&this._preDrawUpdaters.push(e)}loadCanvas(e){this._generated&&this.element&&this.element.remove(),this._generated=e.dataset&&Pe in e.dataset?e.dataset[Pe]==="true":this._generated,this.element=e,this.element.ariaHidden="true",this._originalStyle=br(this.element.style);let i=this._standardSize;i.height=e.offsetHeight,i.width=e.offsetWidth;let o=this.container.retina.pixelRatio,n=this.size;e.height=n.height=i.height*o,e.width=n.width=i.width*o,this._context=this.element.getContext("2d"),this._safeMutationObserver(s=>s.disconnect()),this.container.retina.init(),this.initBackground(),this._safeMutationObserver(s=>{!this.element||!(this.element instanceof Node)||s.observe(this.element,{attributes:!0})})}paint(){let e=this.container.actualOptions;this.draw(i=>{e.backgroundMask.enable&&e.backgroundMask.cover?(fi(i,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()})}resize(){if(!this.element)return!1;let e=this.container,i=e.canvas._standardSize,o={width:this.element.offsetWidth,height:this.element.offsetHeight},n=e.retina.pixelRatio,s={width:o.width*n,height:o.height*n};if(o.height===i.height&&o.width===i.width&&s.height===this.element.height&&s.width===this.element.width)return!1;let r={...i};i.height=o.height,i.width=o.width;let a=this.size;return this.element.width=a.width=s.width,this.element.height=a.height=s.height,this.container.started&&e.particles.setResizeFactor({width:i.width/r.width,height:i.height/r.height}),!0}stop(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=void 0,this.draw(e=>fi(e,this.size))}async windowResize(){if(!this.element||!this.resize())return;let e=this.container,i=e.updateActualOptions();e.particles.setDensity(),this._applyResizePlugins(),i&&await e.refresh()}};var Be;(function(t){t.canvas="canvas",t.parent="parent",t.window="window"})(Be||(Be={}));function de(t,e,i,o,n){if(o){let s={passive:!0};Kt(n)?s.capture=n:n!==void 0&&(s=n),t.addEventListener(e,i,s)}else{let s=n;t.removeEventListener(e,i,s)}}var hi=class{constructor(e){this.container=e,this._doMouseTouchClick=i=>{let o=this.container,n=o.actualOptions;if(this._canPush){let s=o.interactivity.mouse,r=s.position;if(!r)return;s.clickPosition={...r},s.clickTime=new Date().getTime();let a=n.interactivity.events.onClick;W(a.mode,c=>this.container.handleClickMode(c))}i.type==="touchend"&&setTimeout(()=>this._mouseTouchFinish(),er)},this._handleThemeChange=i=>{let o=i,n=this.container,s=n.options,r=s.defaultThemes,a=o.matches?r.dark:r.light;s.themes.find(l=>l.name===a)?.default.auto&&n.loadTheme(a)},this._handleVisibilityChange=()=>{let i=this.container,o=i.actualOptions;this._mouseTouchFinish(),o.pauseOnBlur&&(document?.hidden?(i.pageHidden=!0,i.pause()):(i.pageHidden=!1,i.animationStatus?i.play(!0):i.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);let i=async()=>{await this.container.canvas?.windowResize()};this._resizeTimeout=setTimeout(()=>void i(),this.container.actualOptions.interactivity.events.resize.delay*1e3)},this._manageInteractivityListeners=(i,o)=>{let n=this._handlers,s=this.container,r=s.actualOptions,a=s.interactivity.element;if(!a)return;let c=a,l=s.canvas.element;l&&(l.style.pointerEvents=c===l?"initial":"none"),(r.interactivity.events.onHover.enable||r.interactivity.events.onClick.enable)&&(de(a,ae,n.mouseMove,o),de(a,Cs,n.touchStart,o),de(a,Ms,n.touchMove,o),r.interactivity.events.onClick.enable?(de(a,Ln,n.touchEndClick,o),de(a,_s,n.mouseUp,o),de(a,ws,n.mouseDown,o)):de(a,Ln,n.touchEnd,o),de(a,i,n.mouseLeave,o),de(a,Ps,n.touchCancel,o))},this._manageListeners=i=>{let o=this._handlers,n=this.container,s=n.actualOptions,r=s.interactivity.detectsOn,a=n.canvas.element,c=Mt;r===Be.window?(n.interactivity.element=window,c=ks):r===Be.parent&&a?n.interactivity.element=a.parentElement??a.parentNode:n.interactivity.element=a,this._manageMediaMatch(i),this._manageResize(i),this._manageInteractivityListeners(c,i),document&&de(document,Rs,o.visibilityChange,i,!1)},this._manageMediaMatch=i=>{let o=this._handlers,n=ti("(prefers-color-scheme: dark)");if(n){if(n.addEventListener!==void 0){de(n,"change",o.themeChange,i);return}n.addListener!==void 0&&(i?n.addListener(o.oldThemeChange):n.removeListener(o.oldThemeChange))}},this._manageResize=i=>{let o=this._handlers,n=this.container;if(!n.actualOptions.interactivity.events.resize)return;if(typeof ResizeObserver>"u"){de(window,Os,o.resize,i);return}let r=n.canvas.element;this._resizeObserver&&!i?(r&&this._resizeObserver.unobserve(r),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&i&&r&&(this._resizeObserver=new ResizeObserver(a=>{a.find(l=>l.target===r)&&this._handleWindowResize()}),this._resizeObserver.observe(r))},this._mouseDown=()=>{let{interactivity:i}=this.container;if(!i)return;let{mouse:o}=i;o.clicking=!0,o.downPosition=o.position},this._mouseTouchClick=i=>{let o=this.container,n=o.actualOptions,{mouse:s}=o.interactivity;s.inside=!0;let r=!1,a=s.position;if(!(!a||!n.interactivity.events.onClick.enable)){for(let c of o.plugins.values())if(c.clickPositionValid&&(r=c.clickPositionValid(a),r))break;r||this._doMouseTouchClick(i),s.clicking=!1}},this._mouseTouchFinish=()=>{let i=this.container.interactivity;if(!i)return;let o=i.mouse;delete o.position,delete o.clickPosition,delete o.downPosition,i.status=Mt,o.inside=!1,o.clicking=!1},this._mouseTouchMove=i=>{let o=this.container,n=o.actualOptions,s=o.interactivity,r=o.canvas.element;if(!s?.element)return;s.mouse.inside=!0;let a;if(i.type.startsWith("pointer")){this._canPush=!0;let l=i;if(s.element===window){if(r){let f=r.getBoundingClientRect();a={x:l.clientX-f.left,y:l.clientY-f.top}}}else if(n.interactivity.detectsOn===Be.parent){let f=l.target,u=l.currentTarget;if(f&&u&&r){let h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),m=r.getBoundingClientRect();a={x:l.offsetX+H*h.left-(p.left+m.left),y:l.offsetY+H*h.top-(p.top+m.top)}}else a={x:l.offsetX??l.clientX,y:l.offsetY??l.clientY}}else l.target===r&&(a={x:l.offsetX??l.clientX,y:l.offsetY??l.clientY})}else if(this._canPush=i.type!=="touchmove",r){let l=i,f=l.touches[l.touches.length-Yt],u=r.getBoundingClientRect();a={x:f.clientX-(u.left??it),y:f.clientY-(u.top??it)}}let c=o.retina.pixelRatio;a&&(a.x*=c,a.y*=c),s.mouse.position=a,s.status=ae},this._touchEnd=i=>{let o=i,n=Array.from(o.changedTouches);for(let s of n)this._touches.delete(s.identifier);this._mouseTouchFinish()},this._touchEndClick=i=>{let o=i,n=Array.from(o.changedTouches);for(let s of n)this._touches.delete(s.identifier);this._mouseTouchClick(i)},this._touchStart=i=>{let o=i,n=Array.from(o.changedTouches);for(let s of n)this._touches.set(s.identifier,performance.now());this._mouseTouchMove(i)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:i=>this._mouseTouchMove(i),mouseUp:i=>this._mouseTouchClick(i),touchStart:i=>this._touchStart(i),touchMove:i=>this._mouseTouchMove(i),touchEnd:i=>this._touchEnd(i),touchCancel:i=>this._touchEnd(i),touchEndClick:i=>this._touchEndClick(i),visibilityChange:()=>this._handleVisibilityChange(),themeChange:i=>this._handleThemeChange(i),oldThemeChange:i=>this._handleThemeChange(i),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}};var G;(function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"})(G||(G={}));var z=class t{constructor(){this.value=""}static create(e,i){let o=new t;return o.load(e),i!==void 0&&(le(i)||J(i)?o.load({value:i}):o.load(i)),o}load(e){d(e)||d(e.value)||(this.value=e.value)}};var di=class{constructor(){this.color=new z,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(e){d(e)||(e.color!==void 0&&(this.color=z.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image),e.position!==void 0&&(this.position=e.position),e.repeat!==void 0&&(this.repeat=e.repeat),e.size!==void 0&&(this.size=e.size),e.opacity!==void 0&&(this.opacity=e.opacity))}};var pi=class{constructor(){this.opacity=1}load(e){d(e)||(e.color!==void 0&&(this.color=z.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image),e.opacity!==void 0&&(this.opacity=e.opacity))}};var mi=class{constructor(){this.composite="destination-out",this.cover=new pi,this.enable=!1}load(e){if(!d(e)){if(e.composite!==void 0&&(this.composite=e.composite),e.cover!==void 0){let i=e.cover,o=le(e.cover)?{color:e.cover}:e.cover;this.cover.load(i.color!==void 0||i.image!==void 0?i:{color:o})}e.enable!==void 0&&(this.enable=e.enable)}}};var xi=class{constructor(){this.enable=!0,this.zIndex=0}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.zIndex!==void 0&&(this.zIndex=e.zIndex))}};var gi=class{constructor(){this.enable=!1,this.mode=[]}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode))}};var we;(function(t){t.circle="circle",t.rectangle="rectangle"})(we||(we={}));var Lt=class{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=we.circle}load(e){d(e)||(e.selectors!==void 0&&(this.selectors=e.selectors),e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode),e.type!==void 0&&(this.type=e.type))}};var yi=class{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.force!==void 0&&(this.force=e.force),e.smooth!==void 0&&(this.smooth=e.smooth))}};var vi=class{constructor(){this.enable=!1,this.mode=[],this.parallax=new yi}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode),this.parallax.load(e.parallax))}};var bi=class{constructor(){this.delay=.5,this.enable=!0}load(e){d(e)||(e.delay!==void 0&&(this.delay=e.delay),e.enable!==void 0&&(this.enable=e.enable))}};var wi=class{constructor(){this.onClick=new gi,this.onDiv=new Lt,this.onHover=new vi,this.resize=new bi}load(e){if(d(e))return;this.onClick.load(e.onClick);let i=e.onDiv;i!==void 0&&(this.onDiv=W(i,o=>{let n=new Lt;return n.load(o),n})),this.onHover.load(e.onHover),this.resize.load(e.resize)}};var _i=class{constructor(e,i){this._engine=e,this._container=i}load(e){if(d(e)||!this._container)return;let i=this._engine.interactors.get(this._container);if(i)for(let o of i)o.loadModeOptions&&o.loadModeOptions(this,e)}};var ut=class{constructor(e,i){this.detectsOn=Be.window,this.events=new wi,this.modes=new _i(e,i)}load(e){if(d(e))return;let i=e.detectsOn;i!==void 0&&(this.detectsOn=i),this.events.load(e.events),this.modes.load(e.modes)}};var ki=class{load(e){d(e)||(e.position&&(this.position={x:e.position.x??Zn,y:e.position.y??Zn,mode:e.position.mode??ve.percent}),e.options&&(this.options=E({},e.options)))}};var ze;(function(t){t.screen="screen",t.canvas="canvas"})(ze||(ze={}));var Ci=class{constructor(){this.maxWidth=1/0,this.options={},this.mode=ze.canvas}load(e){d(e)||(d(e.maxWidth)||(this.maxWidth=e.maxWidth),d(e.mode)||(e.mode===ze.screen?this.mode=ze.screen:this.mode=ze.canvas),d(e.options)||(this.options=E({},e.options)))}};var _e;(function(t){t.any="any",t.dark="dark",t.light="light"})(_e||(_e={}));var Mi=class{constructor(){this.auto=!1,this.mode=_e.any,this.value=!1}load(e){d(e)||(e.auto!==void 0&&(this.auto=e.auto),e.mode!==void 0&&(this.mode=e.mode),e.value!==void 0&&(this.value=e.value))}};var Pi=class{constructor(){this.name="",this.default=new Mi}load(e){d(e)||(e.name!==void 0&&(this.name=e.name),this.default.load(e.default),e.options!==void 0&&(this.options=E({},e.options)))}};var $e=class{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(e){d(e)||(e.count!==void 0&&(this.count=_(e.count)),e.enable!==void 0&&(this.enable=e.enable),e.speed!==void 0&&(this.speed=_(e.speed)),e.decay!==void 0&&(this.decay=_(e.decay)),e.delay!==void 0&&(this.delay=_(e.delay)),e.sync!==void 0&&(this.sync=e.sync))}},qe=class extends $e{constructor(){super(),this.mode=Re.auto,this.startValue=Fe.random}load(e){super.load(e),!d(e)&&(e.mode!==void 0&&(this.mode=e.mode),e.startValue!==void 0&&(this.startValue=e.startValue))}};var ht=class extends $e{constructor(){super(),this.offset=0,this.sync=!0}load(e){super.load(e),!d(e)&&e.offset!==void 0&&(this.offset=_(e.offset))}};var Oi=class{constructor(){this.h=new ht,this.s=new ht,this.l=new ht}load(e){d(e)||(this.h.load(e.h),this.s.load(e.s),this.l.load(e.l))}};var Ge=class t extends z{constructor(){super(),this.animation=new Oi}static create(e,i){let o=new t;return o.load(e),i!==void 0&&(le(i)||J(i)?o.load({value:i}):o.load(i)),o}load(e){if(super.load(e),d(e))return;let i=e.animation;i!==void 0&&(i.enable!==void 0?this.animation.h.load(i):this.animation.load(e.animation))}};var Ne;(function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"})(Ne||(Ne={}));var Ri=class{constructor(){this.speed=2}load(e){d(e)||e.speed!==void 0&&(this.speed=e.speed)}};var Si=class{constructor(){this.enable=!0,this.retries=0}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.retries!==void 0&&(this.retries=e.retries))}};var ie=class{constructor(){this.value=0}load(e){d(e)||d(e.value)||(this.value=_(e.value))}},rs=class extends ie{constructor(){super(),this.animation=new $e}load(e){if(super.load(e),d(e))return;let i=e.animation;i!==void 0&&this.animation.load(i)}},dt=class extends rs{constructor(){super(),this.animation=new qe}load(e){super.load(e)}};var At=class extends ie{constructor(){super(),this.value=1}};var pt=class{constructor(){this.horizontal=new At,this.vertical=new At}load(e){d(e)||(this.horizontal.load(e.horizontal),this.vertical.load(e.vertical))}};var zi=class{constructor(){this.absorb=new Ri,this.bounce=new pt,this.enable=!1,this.maxSpeed=50,this.mode=Ne.bounce,this.overlap=new Si}load(e){d(e)||(this.absorb.load(e.absorb),this.bounce.load(e.bounce),e.enable!==void 0&&(this.enable=e.enable),e.maxSpeed!==void 0&&(this.maxSpeed=_(e.maxSpeed)),e.mode!==void 0&&(this.mode=e.mode),this.overlap.load(e.overlap))}};var Di=class{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(e){if(d(e))return;let i=e.options;if(i!==void 0)for(let o in i){let n=i[o];n&&(this.options[o]=E(this.options[o]??{},n))}e.close!==void 0&&(this.close=e.close),e.fill!==void 0&&(this.fill=e.fill),e.type!==void 0&&(this.type=e.type)}};var Ii=class{constructor(){this.offset=0,this.value=90}load(e){d(e)||(e.offset!==void 0&&(this.offset=_(e.offset)),e.value!==void 0&&(this.value=_(e.value)))}};var Ti=class{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(e){if(!d(e)&&(e.distance!==void 0&&(this.distance=_(e.distance)),e.enable!==void 0&&(this.enable=e.enable),e.rotate)){let i=e.rotate.x;i!==void 0&&(this.rotate.x=i);let o=e.rotate.y;o!==void 0&&(this.rotate.y=o)}}};var Ei=class{constructor(){this.x=50,this.y=50,this.mode=ve.percent,this.radius=0}load(e){d(e)||(e.x!==void 0&&(this.x=e.x),e.y!==void 0&&(this.y=e.y),e.mode!==void 0&&(this.mode=e.mode),e.radius!==void 0&&(this.radius=e.radius))}};var Fi=class{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(e){d(e)||(e.acceleration!==void 0&&(this.acceleration=_(e.acceleration)),e.enable!==void 0&&(this.enable=e.enable),e.inverse!==void 0&&(this.inverse=e.inverse),e.maxSpeed!==void 0&&(this.maxSpeed=_(e.maxSpeed)))}};var Li=class{constructor(){this.clamp=!0,this.delay=new ie,this.enable=!1,this.options={}}load(e){d(e)||(e.clamp!==void 0&&(this.clamp=e.clamp),this.delay.load(e.delay),e.enable!==void 0&&(this.enable=e.enable),this.generator=e.generator,e.options&&(this.options=E(this.options,e.options)))}};var Ai=class{load(e){d(e)||(e.color!==void 0&&(this.color=z.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image))}};var Vi=class{constructor(){this.enable=!1,this.length=10,this.fill=new Ai}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.fill!==void 0&&this.fill.load(e.fill),e.length!==void 0&&(this.length=e.length))}};var R;(function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"})(R||(R={}));var Bi=class{constructor(){this.default=R.out}load(e){d(e)||(e.default!==void 0&&(this.default=e.default),this.bottom=e.bottom??e.default,this.left=e.left??e.default,this.right=e.right??e.default,this.top=e.top??e.default)}};var qi=class{constructor(){this.acceleration=0,this.enable=!1}load(e){d(e)||(e.acceleration!==void 0&&(this.acceleration=_(e.acceleration)),e.enable!==void 0&&(this.enable=e.enable),e.position&&(this.position=E({},e.position)))}};var Ni=class{constructor(){this.angle=new Ii,this.attract=new Ti,this.center=new Ei,this.decay=0,this.distance={},this.direction=$.none,this.drift=0,this.enable=!1,this.gravity=new Fi,this.path=new Li,this.outModes=new Bi,this.random=!1,this.size=!1,this.speed=2,this.spin=new qi,this.straight=!1,this.trail=new Vi,this.vibrate=!1,this.warp=!1}load(e){if(d(e))return;this.angle.load(me(e.angle)?{value:e.angle}:e.angle),this.attract.load(e.attract),this.center.load(e.center),e.decay!==void 0&&(this.decay=_(e.decay)),e.direction!==void 0&&(this.direction=e.direction),e.distance!==void 0&&(this.distance=me(e.distance)?{horizontal:e.distance,vertical:e.distance}:{...e.distance}),e.drift!==void 0&&(this.drift=_(e.drift)),e.enable!==void 0&&(this.enable=e.enable),this.gravity.load(e.gravity);let i=e.outModes;i!==void 0&&(Oe(i)?this.outModes.load(i):this.outModes.load({default:i})),this.path.load(e.path),e.random!==void 0&&(this.random=e.random),e.size!==void 0&&(this.size=e.size),e.speed!==void 0&&(this.speed=_(e.speed)),this.spin.load(e.spin),e.straight!==void 0&&(this.straight=e.straight),this.trail.load(e.trail),e.vibrate!==void 0&&(this.vibrate=e.vibrate),e.warp!==void 0&&(this.warp=e.warp)}};var Hi=class extends qe{constructor(){super(),this.destroy=xe.none,this.speed=2}load(e){super.load(e),!d(e)&&e.destroy!==void 0&&(this.destroy=e.destroy)}};var Ui=class extends dt{constructor(){super(),this.animation=new Hi,this.value=1}load(e){if(d(e))return;super.load(e);let i=e.animation;i!==void 0&&this.animation.load(i)}};var Wi=class{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(e){if(d(e))return;e.enable!==void 0&&(this.enable=e.enable);let i=e.width;i!==void 0&&(this.width=i);let o=e.height;o!==void 0&&(this.height=o)}};var Qe;(function(t){t.delete="delete",t.wait="wait"})(Qe||(Qe={}));var ji=class{constructor(){this.mode=Qe.delete,this.value=0}load(e){d(e)||(e.mode!==void 0&&(this.mode=e.mode),e.value!==void 0&&(this.value=e.value))}};var $i=class{constructor(){this.density=new Wi,this.limit=new ji,this.value=0}load(e){d(e)||(this.density.load(e.density),this.limit.load(e.limit),e.value!==void 0&&(this.value=e.value))}};var Gi=class{constructor(){this.blur=0,this.color=new z,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(e){d(e)||(e.blur!==void 0&&(this.blur=e.blur),this.color=z.create(this.color,e.color),e.enable!==void 0&&(this.enable=e.enable),e.offset!==void 0&&(e.offset.x!==void 0&&(this.offset.x=e.offset.x),e.offset.y!==void 0&&(this.offset.y=e.offset.y)))}};var Qi=class{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(e){if(d(e))return;let i=e.options;if(i!==void 0)for(let o in i){let n=i[o];n&&(this.options[o]=E(this.options[o]??{},n))}e.close!==void 0&&(this.close=e.close),e.fill!==void 0&&(this.fill=e.fill),e.type!==void 0&&(this.type=e.type)}};var Yi=class extends qe{constructor(){super(),this.destroy=xe.none,this.speed=5}load(e){super.load(e),!d(e)&&e.destroy!==void 0&&(this.destroy=e.destroy)}};var Xi=class extends dt{constructor(){super(),this.animation=new Yi,this.value=3}load(e){if(super.load(e),d(e))return;let i=e.animation;i!==void 0&&this.animation.load(i)}};var Vt=class{constructor(){this.width=0}load(e){d(e)||(e.color!==void 0&&(this.color=Ge.create(this.color,e.color)),e.width!==void 0&&(this.width=_(e.width)),e.opacity!==void 0&&(this.opacity=_(e.opacity)))}};var Zi=class extends ie{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(e){super.load(e),!d(e)&&(e.opacityRate!==void 0&&(this.opacityRate=e.opacityRate),e.sizeRate!==void 0&&(this.sizeRate=e.sizeRate),e.velocityRate!==void 0&&(this.velocityRate=e.velocityRate))}};var Ki=class{constructor(e,i){this._engine=e,this._container=i,this.bounce=new pt,this.collisions=new zi,this.color=new Ge,this.color.value="#fff",this.effect=new Di,this.groups={},this.move=new Ni,this.number=new $i,this.opacity=new Ui,this.reduceDuplicates=!1,this.shadow=new Gi,this.shape=new Qi,this.size=new Xi,this.stroke=new Vt,this.zIndex=new Zi}load(e){if(d(e))return;if(e.groups!==void 0)for(let o of Object.keys(e.groups)){if(!Object.hasOwn(e.groups,o))continue;let n=e.groups[o];n!==void 0&&(this.groups[o]=E(this.groups[o]??{},n))}e.reduceDuplicates!==void 0&&(this.reduceDuplicates=e.reduceDuplicates),this.bounce.load(e.bounce),this.color.load(Ge.create(this.color,e.color)),this.effect.load(e.effect),this.move.load(e.move),this.number.load(e.number),this.opacity.load(e.opacity),this.shape.load(e.shape),this.size.load(e.size),this.shadow.load(e.shadow),this.zIndex.load(e.zIndex),this.collisions.load(e.collisions),e.interactivity!==void 0&&(this.interactivity=E({},e.interactivity));let i=e.stroke;if(i&&(this.stroke=W(i,o=>{let n=new Vt;return n.load(o),n})),this._container){let o=this._engine.updaters.get(this._container);if(o)for(let s of o)s.loadOptions&&s.loadOptions(this,e);let n=this._engine.interactors.get(this._container);if(n)for(let s of n)s.loadParticlesOptions&&s.loadParticlesOptions(this,e)}}};function as(t,...e){for(let i of e)t.load(i)}function Ji(t,e,...i){let o=new Ki(t,e);return as(o,...i),o}var eo=class{constructor(e,i){this._findDefaultTheme=o=>this.themes.find(n=>n.default.value&&n.default.mode===o)??this.themes.find(n=>n.default.value&&n.default.mode===_e.any),this._importPreset=o=>{this.load(this._engine.getPreset(o))},this._engine=e,this._container=i,this.autoPlay=!0,this.background=new di,this.backgroundMask=new mi,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new xi,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new ut(e,i),this.manualParticles=[],this.particles=Ji(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(e){if(d(e))return;e.preset!==void 0&&W(e.preset,r=>this._importPreset(r)),e.autoPlay!==void 0&&(this.autoPlay=e.autoPlay),e.clear!==void 0&&(this.clear=e.clear),e.key!==void 0&&(this.key=e.key),e.name!==void 0&&(this.name=e.name),e.delay!==void 0&&(this.delay=_(e.delay));let i=e.detectRetina;i!==void 0&&(this.detectRetina=i),e.duration!==void 0&&(this.duration=_(e.duration));let o=e.fpsLimit;o!==void 0&&(this.fpsLimit=o),e.pauseOnBlur!==void 0&&(this.pauseOnBlur=e.pauseOnBlur),e.pauseOnOutsideViewport!==void 0&&(this.pauseOnOutsideViewport=e.pauseOnOutsideViewport),e.zLayers!==void 0&&(this.zLayers=e.zLayers),this.background.load(e.background);let n=e.fullScreen;Kt(n)?this.fullScreen.enable=n:this.fullScreen.load(n),this.backgroundMask.load(e.backgroundMask),this.interactivity.load(e.interactivity),e.manualParticles&&(this.manualParticles=e.manualParticles.map(r=>{let a=new ki;return a.load(r),a})),this.particles.load(e.particles),this.style=E(this.style,e.style),this._engine.loadOptions(this,e),e.smooth!==void 0&&(this.smooth=e.smooth);let s=this._engine.interactors.get(this._container);if(s)for(let r of s)r.loadOptions&&r.loadOptions(this,e);if(e.responsive!==void 0)for(let r of e.responsive){let a=new Ci;a.load(r),this.responsive.push(a)}if(this.responsive.sort((r,a)=>r.maxWidth-a.maxWidth),e.themes!==void 0)for(let r of e.themes){let a=this.themes.find(c=>c.name===r.name);if(a)a.load(r);else{let c=new Pi;c.load(r),this.themes.push(c)}}this.defaultThemes.dark=this._findDefaultTheme(_e.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(_e.light)?.name}setResponsive(e,i,o){this.load(o);let n=this.responsive.find(s=>s.mode===ze.screen&&screen?s.maxWidth>screen.availWidth:s.maxWidth*i>e);return this.load(n?.options),n?.maxWidth}setTheme(e){if(e){let i=this.themes.find(o=>o.name===e);i&&this.load(i.options)}else{let i=ti("(prefers-color-scheme: dark)"),o=i?.matches,n=this._findDefaultTheme(o?_e.dark:_e.light);n&&this.load(n.options)}}};var De;(function(t){t.external="external",t.particles="particles"})(De||(De={}));var to=class{constructor(e,i){this.container=i,this._engine=e,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(e){for(let i of this._externalInteractors)i.isEnabled()&&i.interact(e)}handleClickMode(e){for(let i of this._externalInteractors)i.handleClickMode?.(e)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(let e of this._interactors){switch(e.type){case De.external:this._externalInteractors.push(e);break;case De.particles:this._particleInteractors.push(e);break}e.init()}}particlesInteract(e,i){for(let o of this._externalInteractors)o.clear(e,i);for(let o of this._particleInteractors)o.isEnabled(e)&&o.interact(e,i)}reset(e){for(let i of this._externalInteractors)i.isEnabled()&&i.reset(e);for(let i of this._particleInteractors)i.isEnabled(e)&&i.reset(e)}};var ne;(function(t){t.normal="normal",t.inside="inside",t.outside="outside"})(ne||(ne={}));function jc(t,e,i,o){let n=e.options[t];if(n)return E({close:e.close,fill:e.fill},K(n,i,o))}function $c(t,e,i,o){let n=e.options[t];if(n)return E({close:e.close,fill:e.fill},K(n,i,o))}function Ir(t){if(!O(t.outMode,t.checkModes))return;let e=t.radius*H;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}var io=class{constructor(e,i){this.container=i,this._calcPosition=(o,n,s,r=Bn)=>{for(let m of o.plugins.values()){let g=m.particlePosition!==void 0?m.particlePosition(n,this):void 0;if(g)return nt.create(g.x,g.y,s)}let a=o.canvas.size,c=pr({size:a,position:n}),l=nt.create(c.x,c.y,s),f=this.getRadius(),u=this.options.move.outModes,h=m=>{Ir({outMode:m,checkModes:[R.bounce],coord:l.x,maxCoord:o.canvas.size.width,setCb:g=>l.x+=g,radius:f})},p=m=>{Ir({outMode:m,checkModes:[R.bounce],coord:l.y,maxCoord:o.canvas.size.height,setCb:g=>l.y+=g,radius:f})};return h(u.left??u.default),h(u.right??u.default),p(u.top??u.default),p(u.bottom??u.default),this._checkOverlap(l,r)?this._calcPosition(o,void 0,s,r+$s):l},this._calculateVelocity=()=>{let o=dr(this.direction),n=o.copy(),s=this.options.move;if(s.direction===$.inside||s.direction===$.outside)return n;let r=ue(y(s.angle.value)),a=ue(y(s.angle.offset)),c={left:a-r*.5,right:a+r*.5};return s.straight||(n.angle+=Y(_(c.left,c.right))),s.random&&typeof s.speed=="number"&&(n.length*=M()),n},this._checkOverlap=(o,n=Bn)=>{let s=this.options.collisions,r=this.getRadius();if(!s.enable)return!1;let a=s.overlap;if(a.enable)return!1;let c=a.retries;if(c>=Gs&&n>c)throw new Error(`${j} particle is overlapping and can't be placed`);return!!this.container.particles.find(l=>F(o,l.position)<r+l.getRadius())},this._getRollColor=o=>{if(!o||!this.roll||!this.backColor&&!this.roll.alter)return o;let n=this.roll.horizontal&&this.roll.vertical?H*Gn:Gn,s=this.roll.horizontal?Math.PI*.5:We;return Math.floor(((this.roll.angle??We)+s)/(Math.PI/n))%H?this.backColor?this.backColor:this.roll.alter?zr(o,this.roll.alter.type,this.roll.alter.value):o:o},this._initPosition=o=>{let n=this.container,s=y(this.options.zIndex.value);this.position=this._calcPosition(n,o,U(s,Qs,n.zLayers)),this.initialPosition=this.position.copy();let r=n.canvas.size;switch(this.moveCenter={...si(this.options.move.center,r),radius:this.options.move.center.radius??Ys,mode:this.options.move.center.mode??ve.percent},this.direction=hr(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case $.inside:this.outType=ne.inside;break;case $.outside:this.outType=ne.outside;break}this.offset=D.origin},this._engine=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;let i=this.container,o=this.pathGenerator;i.shapeDrawers.get(this.shape)?.particleDestroy?.(this);for(let s of i.plugins.values())s.particleDestroyed?.(this,e);for(let s of i.particles.updaters)s.particleDestroyed?.(this,e);o?.reset(this),this._engine.dispatchEvent(G.particleDestroyed,{container:this.container,data:{particle:this}})}draw(e){let i=this.container,o=i.canvas;for(let n of i.plugins.values())o.drawParticlePlugin(n,this,e);o.drawParticle(this,e)}getFillColor(){return this._getRollColor(this.bubble.color??ss(this.color))}getMass(){return this.getRadius()**ce*Math.PI*.5}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??ss(this.strokeColor))}init(e,i,o,n){let s=this.container,r=this._engine;this.id=e,this.group=n,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=ne.normal,this.ignoresResizeRatio=!0;let a=s.retina.pixelRatio,c=s.actualOptions,l=Ji(this._engine,s,c.particles),{reduceDuplicates:f}=l,u=l.effect.type,h=l.shape.type;this.effect=K(u,this.id,f),this.shape=K(h,this.id,f);let p=l.effect,m=l.shape;if(o){if(o.effect?.type){let S=o.effect.type,Z=K(S,this.id,f);Z&&(this.effect=Z,p.load(o.effect))}if(o.shape?.type){let S=o.shape.type,Z=K(S,this.id,f);Z&&(this.shape=Z,m.load(o.shape))}}if(this.effect===Ie){let S=[...this.container.effectDrawers.keys()];this.effect=S[Math.floor(Math.random()*S.length)]}if(this.shape===Ie){let S=[...this.container.shapeDrawers.keys()];this.shape=S[Math.floor(Math.random()*S.length)]}this.effectData=jc(this.effect,p,this.id,f),this.shapeData=$c(this.shape,m,this.id,f),l.load(o);let g=this.effectData;g&&l.load(g.particles);let x=this.shapeData;x&&l.load(x.particles);let b=new ut(r,s);b.load(s.actualOptions.interactivity),b.load(l.interactivity),this.interactivity=b,this.effectFill=g?.fill??l.effect.fill,this.effectClose=g?.close??l.effect.close,this.shapeFill=x?.fill??l.shape.fill,this.shapeClose=x?.close??l.shape.close,this.options=l;let v=this.options.move.path;this.pathDelay=y(v.delay.value)*1e3,v.generator&&(this.pathGenerator=this._engine.getPathGenerator(v.generator),this.pathGenerator&&s.addPath(v.generator,this.pathGenerator)&&this.pathGenerator.init(s)),s.retina.initParticle(this),this.size=ni(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=Qt-y(this.options.move.decay);let k=s.particles;k.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/s.zLayers,this.sides=24;let w=s.effectDrawers.get(this.effect);w||(w=this._engine.getEffectDrawer(this.effect),w&&s.effectDrawers.set(this.effect,w)),w?.loadEffect&&w.loadEffect(this);let P=s.shapeDrawers.get(this.shape);P||(P=this._engine.getShapeDrawer(this.shape),P&&s.shapeDrawers.set(this.shape,P)),P?.loadShape&&P.loadShape(this);let V=P?.getSidesCount;V&&(this.sides=V(this)),this.spawning=!1,this.shadowColor=te(this._engine,this.options.shadow.color);for(let S of k.updaters)S.init(this);for(let S of k.movers)S.init?.(this);w?.particleInit?.(s,this),P?.particleInit?.(s,this);for(let S of s.plugins.values())S.particleCreated?.(this)}isInsideCanvas(){let e=this.getRadius(),i=this.container.canvas.size,o=this.position;return o.x>=-e&&o.y>=-e&&o.y<=i.height+e&&o.x<=i.width+e}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(let e of this.container.particles.updaters)e.reset?.(this)}};var oo=class{constructor(e,i){this.position=e,this.particle=i}};var Ye;(function(t){t.circle="circle",t.rectangle="rectangle"})(Ye||(Ye={}));var no=class{constructor(e,i,o){this.position={x:e,y:i},this.type=o}},A=class t extends no{constructor(e,i,o){super(e,i,Ye.circle),this.radius=o}contains(e){return F(e,this.position)<=this.radius}intersects(e){let i=this.position,o=e.position,n={x:Math.abs(o.x-i.x),y:Math.abs(o.y-i.y)},s=this.radius;if(e instanceof t||e.type===Ye.circle){let r=e,a=s+r.radius,c=Math.sqrt(n.x**ce+n.y**ce);return a>c}else if(e instanceof X||e.type===Ye.rectangle){let r=e,{width:a,height:c}=r.size;return Math.pow(n.x-a,ce)+Math.pow(n.y-c,ce)<=s**ce||n.x<=s+a&&n.y<=s+c||n.x<=a||n.y<=c}return!1}},X=class t extends no{constructor(e,i,o,n){super(e,i,Ye.rectangle),this.size={height:n,width:o}}contains(e){let i=this.size.width,o=this.size.height,n=this.position;return e.x>=n.x&&e.x<=n.x+i&&e.y>=n.y&&e.y<=n.y+o}intersects(e){if(e instanceof A)return e.intersects(this);let i=this.size.width,o=this.size.height,n=this.position,s=e.position,r=e instanceof t?e.size:{width:0,height:0},a=r.width,c=r.height;return s.x<n.x+i&&s.x+a>n.x&&s.y<n.y+o&&s.y+c>n.y}};var Bt=class t{constructor(e,i){this.rectangle=e,this.capacity=i,this._subdivide=()=>{let{x:o,y:n}=this.rectangle.position,{width:s,height:r}=this.rectangle.size,{capacity:a}=this;for(let c=0;c<Ds;c++){let l=c%H;this._subs.push(new t(new X(o+s*.5*l,n+r*.5*(Math.round(c*.5)-l),s*.5,r*.5),a))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(e){return this.rectangle.contains(e.position)?this._points.length<this.capacity?(this._points.push(e),!0):(this._divided||this._subdivide(),this._subs.some(i=>i.insert(e))):!1}query(e,i){let o=[];if(!e.intersects(this.rectangle))return[];for(let n of this._points)!e.contains(n.position)&&F(e.position,n.position)>n.particle.getRadius()&&(!i||i(n.particle))||o.push(n.particle);if(this._divided)for(let n of this._subs)o.push(...n.query(e,i));return o}queryCircle(e,i,o){return this.query(new A(e.x,e.y,i),o)}queryRectangle(e,i,o){return this.query(new X(e.x,e.y,i.width,i.height),o)}};var Tr=t=>{let{height:e,width:i}=t;return new X(Qn*i,Qn*e,Yn*i,Yn*e)},so=class{constructor(e,i){this._addToPool=(...n)=>{this._pool.push(...n)},this._applyDensity=(n,s,r)=>{let a=n.number;if(!n.number.density?.enable){r===void 0?this._limit=a.limit.value:a.limit&&this._groupLimits.set(r,a.limit.value);return}let c=this._initDensityFactor(a.density),l=a.value,f=a.limit.value>Xn?a.limit.value:l,u=Math.min(l,f)*c+s,h=Math.min(this.count,this.filter(p=>p.group===r).length);r===void 0?this._limit=a.limit.value*c:this._groupLimits.set(r,a.limit.value*c),h<u?this.push(Math.abs(u-h),void 0,n,r):h>u&&this.removeQuantity(h-u,r)},this._initDensityFactor=n=>{let s=this._container;if(!s.canvas.element||!n.enable)return Js;let r=s.canvas.element,a=s.retina.pixelRatio;return r.width*r.height/(n.height*n.width*a**ce)},this._pushParticle=(n,s,r,a)=>{try{let c=this._pool.pop();c||(c=new io(this._engine,this._container)),c.init(this._nextId,n,s,r);let l=!0;return a&&(l=a(c)),l?(this._array.push(c),this._zArray.push(c),this._nextId++,this._engine.dispatchEvent(G.particleAdded,{container:this._container,data:{particle:c}}),c):void 0}catch(c){he().warning(`${j} adding particle: ${c}`)}},this._removeParticle=(n,s,r)=>{let a=this._array[n];if(!a||a.group!==s)return!1;let c=this._zArray.indexOf(a);return this._array.splice(n,ot),this._zArray.splice(c,ot),a.destroy(r),this._engine.dispatchEvent(G.particleRemoved,{container:this._container,data:{particle:a}}),this._addToPool(a),!0},this._engine=e,this._container=i,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new to(e,i),this._pluginsInitialized=!1;let o=i.canvas.size;this.quadTree=new Bt(Tr(o),qn),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){let e=this._container;e.actualOptions.manualParticles.forEach(o=>this.addParticle(o.position?si(o.position,e.canvas.size):void 0,o.options))}addParticle(e,i,o,n){let s=this._container.actualOptions.particles.number.limit.mode,r=o===void 0?this._limit:this._groupLimits.get(o)??this._limit,a=this.count;if(r>Xn)switch(s){case Qe.delete:{let c=a+Xs-r;c>Zs&&this.removeQuantity(c);break}case Qe.wait:if(a>=r)return;break}return this._pushParticle(e,i,o,n)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(e){let i=this._container,o=i.canvas;o.clear(),this.update(e);for(let n of i.plugins.values())o.drawPlugin(n,e);for(let n of this._zArray)n.draw(e)}filter(e){return this._array.filter(e)}find(e){return this._array.find(e)}get(e){return this._array[e]}handleClickMode(e){this._interactionManager.handleClickMode(e)}async init(){let e=this._container,i=e.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let o=!1;for(let n of e.plugins.values())if(o=n.particlesInitialization?.()??o,o)break;if(this.addManualParticles(),!o){let n=i.particles,s=n.groups;for(let r in s){let a=s[r];for(let c=this.count,l=0;l<a.number?.value&&c<n.number.value;c++,l++)this.addParticle(void 0,a,r)}for(let r=this.count;r<n.number.value;r++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;let e=this._container;this.movers=await this._engine.getMovers(e,!0),this.updaters=await this._engine.getUpdaters(e,!0),await this._interactionManager.init();for(let i of e.pathGenerators.values())i.init(e)}push(e,i,o,n){for(let s=0;s<e;s++)this.addParticle(i?.position,o,n)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(e,i,o){this.removeAt(this._array.indexOf(e),void 0,i,o)}removeAt(e,i=zs,o,n){if(e<Dt||e>this.count)return;let s=0;for(let r=e;s<i&&r<this.count;r++)this._removeParticle(r,o,n)&&(r--,s++)}removeQuantity(e,i){this.removeAt(Dt,e,i)}setDensity(){let e=this._container.actualOptions,i=e.particles.groups;for(let o in i)this._applyDensity(i[o],Ks,o);this._applyDensity(e.particles,e.manualParticles.length)}setLastZIndex(e){this._lastZIndex=e,this._needsSort=this._needsSort||this._lastZIndex<e}setResizeFactor(e){this._resizeFactor=e}update(e){let i=this._container,o=new Set;this.quadTree=new Bt(Tr(i.canvas.size),qn);for(let s of i.pathGenerators.values())s.update();for(let s of i.plugins.values())s.update?.(e);let n=this._resizeFactor;for(let s of this._array){n&&!s.ignoresResizeRatio&&(s.position.x*=n.width,s.position.y*=n.height,s.initialPosition.x*=n.width,s.initialPosition.y*=n.height),s.ignoresResizeRatio=!1,this._interactionManager.reset(s);for(let r of this._container.plugins.values()){if(s.destroyed)break;r.particleUpdate?.(s,e)}for(let r of this.movers)r.isEnabled(s)&&r.move(s,e);if(s.destroyed){o.add(s);continue}this.quadTree.insert(new oo(s.getPosition(),s))}if(o.size){let s=r=>!o.has(r);this._array=this.filter(s),this._zArray=this._zArray.filter(s);for(let r of o)this._engine.dispatchEvent(G.particleRemoved,{container:this._container,data:{particle:r}});this._addToPool(...o)}this._interactionManager.externalInteract(e);for(let s of this._array){for(let r of this.updaters)r.update(s,e);!s.destroyed&&!s.spawning&&this._interactionManager.particlesInteract(s,e)}if(delete this._resizeFactor,this._needsSort){let s=this._zArray;s.sort((r,a)=>a.position.z-r.position.z||r.id-a.id),this._lastZIndex=s[s.length-Yt].position.z,this._needsSort=!1}}};var ro=class{constructor(e){this.container=e,this.pixelRatio=Nn,this.reduceFactor=Hn}init(){let e=this.container,i=e.actualOptions;this.pixelRatio=!i.detectRetina||be()?Nn:window.devicePixelRatio,this.reduceFactor=Hn;let o=this.pixelRatio,n=e.canvas;if(n.element){let a=n.element;n.size.width=a.offsetWidth*o,n.size.height=a.offsetHeight*o}let s=i.particles,r=s.move;this.maxSpeed=y(r.gravity.maxSpeed)*o,this.sizeAnimationSpeed=y(s.size.animation.speed)*o}initParticle(e){let i=e.options,o=this.pixelRatio,n=i.move,s=n.distance,r=e.retina;r.moveDrift=y(n.drift)*o,r.moveSpeed=y(n.speed)*o,r.sizeAnimationSpeed=y(i.size.animation.speed)*o;let a=r.maxDistance;a.horizontal=s.horizontal!==void 0?s.horizontal*o:void 0,a.vertical=s.vertical!==void 0?s.vertical*o:void 0,r.maxSpeed=y(n.gravity.maxSpeed)*o}};function q(t){return t&&!t.destroyed}function Gc(t,e=Nt,i=!1){return{value:t,factor:i?Nt/e:Nt*t/1e3}}function mt(t,e,...i){let o=new eo(t,e);return as(o,...i),o}var ao=class{constructor(e,i,o){this._intersectionManager=n=>{if(!(!q(this)||!this.actualOptions.pauseOnOutsideViewport))for(let s of n)s.target===this.interactivity.element&&(s.isIntersecting?this.play():this.pause())},this._nextFrame=n=>{try{if(!this._smooth&&this._lastFrameTime!==void 0&&n<this._lastFrameTime+1e3/this.fpsLimit){this.draw(!1);return}this._lastFrameTime??=n;let s=Gc(n-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(s.value),this._lastFrameTime=n,s.value>1e3){this.draw(!1);return}if(this.particles.draw(s),!this.alive()){this.destroy();return}this.animationStatus&&this.draw(!1)}catch(s){he().error(`${j} in animation loop`,s)}},this._engine=e,this.id=Symbol(i),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=o,this._initialSourceOptions=o,this.retina=new ro(this),this.canvas=new ui(this,this._engine),this.particles=new so(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=mt(this._engine,this),this.actualOptions=mt(this._engine,this),this._eventListeners=new hi(this),this._intersectionObserver=xr(n=>this._intersectionManager(n)),this._engine.dispatchEvent(G.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&q(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(e){if(!q(this))return;let i=this.interactivity.element;if(!i)return;let o=(u,h,p)=>{if(!q(this))return;let m=this.retina.pixelRatio,g={x:h.x*m,y:h.y*m},x=this.particles.quadTree.queryCircle(g,p*m);e(u,x)},n=u=>{if(!q(this))return;let h=u,p={x:h.offsetX||h.clientX,y:h.offsetY||h.clientY};o(u,p,Vs)},s=()=>{q(this)&&(l=!0,f=!1)},r=()=>{q(this)&&(f=!0)},a=u=>{if(q(this)){if(l&&!f){let h=u,p=h.touches[h.touches.length-$n];if(!p&&(p=h.changedTouches[h.changedTouches.length-$n],!p))return;let m=this.canvas.element,g=m?m.getBoundingClientRect():void 0,x={x:p.clientX-(g?g.left:it),y:p.clientY-(g?g.top:it)};o(u,x,Math.max(p.radiusX,p.radiusY))}l=!1,f=!1}},c=()=>{q(this)&&(l=!1,f=!1)},l=!1,f=!1;this._clickHandlers.set("click",n),this._clickHandlers.set("touchstart",s),this._clickHandlers.set("touchmove",r),this._clickHandlers.set("touchend",a),this._clickHandlers.set("touchcancel",c);for(let[u,h]of this._clickHandlers)i.addEventListener(u,h)}addLifeTime(e){this._lifeTime+=e}addPath(e,i,o=!1){return!q(this)||!o&&this.pathGenerators.has(e)?!1:(this.pathGenerators.set(e,i),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(q(this)){for(let[e,i]of this._clickHandlers)this.interactivity.element?.removeEventListener(e,i);this._clickHandlers.clear()}}destroy(e=!0){if(q(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(let i of this.effectDrawers.values())i.destroy?.(this);for(let i of this.shapeDrawers.values())i.destroy?.(this);for(let i of this.effectDrawers.keys())this.effectDrawers.delete(i);for(let i of this.shapeDrawers.keys())this.shapeDrawers.delete(i);if(this._engine.clearPlugins(this),this.destroyed=!0,e){let i=this._engine.items,o=i.findIndex(n=>n===this);o>=Bs&&i.splice(o,Gt)}this._engine.dispatchEvent(G.containerDestroyed,{container:this})}}draw(e){if(!q(this))return;let i=e,o=n=>{i&&(this._lastFrameTime=void 0,i=!1),this._nextFrame(n)};this._drawAnimationFrame=fr(n=>o(n))}async export(e,i={}){for(let o of this.plugins.values()){if(!o.export)continue;let n=await o.export(e,i);if(n.supported)return n.blob}he().error(`${j} - Export plugin with type ${e} not found`)}handleClickMode(e){if(q(this)){this.particles.handleClickMode(e);for(let i of this.plugins.values())i.handleClickMode?.(e)}}async init(){if(!q(this))return;let e=this._engine.getSupportedEffects();for(let l of e){let f=this._engine.getEffectDrawer(l);f&&this.effectDrawers.set(l,f)}let i=this._engine.getSupportedShapes();for(let l of i){let f=this._engine.getShapeDrawer(l);f&&this.shapeDrawers.set(l,f)}await this.particles.initPlugins(),this._options=mt(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=mt(this._engine,this,this._options);let o=await this._engine.getAvailablePlugins(this);for(let[l,f]of o)this.plugins.set(l,f);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();let{zLayers:n,duration:s,delay:r,fpsLimit:a,smooth:c}=this.actualOptions;this.zLayers=n,this._duration=y(s)*1e3,this._delay=y(r)*1e3,this._lifeTime=0,this.fpsLimit=a>Ns?a:qs,this._smooth=c;for(let l of this.effectDrawers.values())await l.init?.(this);for(let l of this.shapeDrawers.values())await l.init?.(this);for(let l of this.plugins.values())await l.init?.();this._engine.dispatchEvent(G.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(let l of this.plugins.values())l.particlesSetup?.();this._engine.dispatchEvent(G.particlesSetup,{container:this})}async loadTheme(e){q(this)&&(this._currentTheme=e,await this.refresh())}pause(){if(q(this)&&(this._drawAnimationFrame!==void 0&&(ur(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(let e of this.plugins.values())e.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(G.containerPaused,{container:this})}}play(e){if(!q(this))return;let i=this._paused||e;if(this._firstStart&&!this.actualOptions.autoPlay){this._firstStart=!1;return}if(this._paused&&(this._paused=!1),i)for(let o of this.plugins.values())o.play&&o.play();this._engine.dispatchEvent(G.containerPlay,{container:this}),this.draw(i??!1)}async refresh(){if(q(this))return this.stop(),this.start()}async reset(e){if(q(this))return this._initialSourceOptions=e,this._sourceOptions=e,this._options=mt(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=mt(this._engine,this,this._options),this.refresh()}async start(){!q(this)||this.started||(await this.init(),this.started=!0,await new Promise(e=>{let i=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(let o of this.plugins.values())await o.start?.();this._engine.dispatchEvent(G.containerStarted,{container:this}),this.play(),e()};this._delayTimeout=setTimeout(()=>void i(),this._delay)}))}stop(){if(!(!q(this)||!this.started)){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(let e of this.plugins.values())e.stop?.();for(let e of this.plugins.keys())this.plugins.delete(e);this._sourceOptions=this._options,this._engine.dispatchEvent(G.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];let e=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth===e?!1:(this._responsiveMaxWidth=e,!0)}};var co=class{constructor(){this._listeners=new Map}addEventListener(e,i){this.removeEventListener(e,i);let o=this._listeners.get(e);o||(o=[],this._listeners.set(e,o)),o.push(i)}dispatchEvent(e,i){this._listeners.get(e)?.forEach(n=>n(i))}hasEventListener(e){return!!this._listeners.get(e)}removeAllEventListeners(e){e?this._listeners.delete(e):this._listeners=new Map}removeEventListener(e,i){let o=this._listeners.get(e);if(!o)return;let n=o.length,s=o.indexOf(i);s<Dt||(n===ot?this._listeners.delete(e):o.splice(s,ot))}};async function cs(t,e,i,o=!1){let n=e.get(t);return(!n||o)&&(n=await Promise.all([...i.values()].map(s=>s(t))),e.set(t,n)),n}async function Qc(t){let e=K(t.url,t.index);if(!e)return t.fallback;let i=await fetch(e);return i.ok?await i.json():(he().error(`${j} ${i.status} while retrieving config file`),t.fallback)}var Yc=t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===Ht)e=t,e.dataset[Pe]||(e.dataset[Pe]=Vn);else{let o=t.getElementsByTagName(Ht);o.length?(e=o[Hs],e.dataset[Pe]=Vn):(e=document.createElement(Ht),e.dataset[Pe]=An,t.appendChild(e))}let i="100%";return e.style.width||(e.style.width=i),e.style.height||(e.style.height=i),e},Xc=(t,e)=>{let i=e??document.getElementById(t);return i||(i=document.createElement("div"),i.id=t,i.dataset[Pe]=An,document.body.append(i),i)},lo=class{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new co,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){let e={};for(let[i,o]of this._configs)e[i]=o;return e}get items(){return this._domArray}get version(){return"3.8.1"}async addColorManager(e,i=!0){this.colorManagers.set(e.key,e),await this.refresh(i)}addConfig(e){let i=e.key??e.name??"default";this._configs.set(i,e),this._eventDispatcher.dispatchEvent(G.configAdded,{data:{name:i,config:e}})}async addEasing(e,i,o=!0){this.getEasing(e)||(this.easingFunctions.set(e,i),await this.refresh(o))}async addEffect(e,i,o=!0){W(e,n=>{this.getEffectDrawer(n)||this.effectDrawers.set(n,i)}),await this.refresh(o)}addEventListener(e,i){this._eventDispatcher.addEventListener(e,i)}async addInteractor(e,i,o=!0){this._initializers.interactors.set(e,i),await this.refresh(o)}async addMover(e,i,o=!0){this._initializers.movers.set(e,i),await this.refresh(o)}async addParticleUpdater(e,i,o=!0){this._initializers.updaters.set(e,i),await this.refresh(o)}async addPathGenerator(e,i,o=!0){this.getPathGenerator(e)||this.pathGenerators.set(e,i),await this.refresh(o)}async addPlugin(e,i=!0){this.getPlugin(e.id)||this.plugins.push(e),await this.refresh(i)}async addPreset(e,i,o=!1,n=!0){(o||!this.getPreset(e))&&this.presets.set(e,i),await this.refresh(n)}async addShape(e,i=!0){for(let o of e.validTypes)this.getShapeDrawer(o)||this.shapeDrawers.set(o,e);await this.refresh(i)}checkVersion(e){if(this.version!==e)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${e}`)}clearPlugins(e){this.updaters.delete(e),this.movers.delete(e),this.interactors.delete(e)}dispatchEvent(e,i){this._eventDispatcher.dispatchEvent(e,i)}dom(){return this.items}domItem(e){return this.item(e)}async getAvailablePlugins(e){let i=new Map;for(let o of this.plugins)o.needsPlugin(e.actualOptions)&&i.set(o.id,await o.getPlugin(e));return i}getEasing(e){return this.easingFunctions.get(e)??(i=>i)}getEffectDrawer(e){return this.effectDrawers.get(e)}async getInteractors(e,i=!1){return cs(e,this.interactors,this._initializers.interactors,i)}async getMovers(e,i=!1){return cs(e,this.movers,this._initializers.movers,i)}getPathGenerator(e){return this.pathGenerators.get(e)}getPlugin(e){return this.plugins.find(i=>i.id===e)}getPreset(e){return this.presets.get(e)}getShapeDrawer(e){return this.shapeDrawers.get(e)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(e,i=!1){return cs(e,this.updaters,this._initializers.updaters,i)}init(){this._initialized||(this._initialized=!0)}item(e){let{items:i}=this,o=i[e];if(!o||o.destroyed){i.splice(e,Gt);return}return o}async load(e){let i=e.id??e.element?.id??`tsparticles${Math.floor(M()*Us)}`,{index:o,url:n}=e,s=n?await Qc({fallback:e.options,url:n,index:o}):e.options,r=K(s,o),{items:a}=this,c=a.findIndex(h=>h.id.description===i),l=new ao(this,i,r);if(c>=Ws){let h=this.item(c),p=h?js:We;h&&!h.destroyed&&h.destroy(!1),a.splice(c,p,l)}else a.push(l);let f=Xc(i,e.element),u=Yc(f);return l.canvas.loadCanvas(u),await l.start(),l}loadOptions(e,i){this.plugins.forEach(o=>o.loadOptions?.(e,i))}loadParticlesOptions(e,i,...o){let n=this.updaters.get(e);n&&n.forEach(s=>s.loadOptions?.(i,...o))}async refresh(e=!0){e&&await Promise.all(this.items.map(i=>i.refresh()))}removeEventListener(e,i){this._eventDispatcher.removeEventListener(e,i)}setOnClickHandler(e){let{items:i}=this;if(!i.length)throw new Error(`${j} can only set click handlers after calling tsParticles.load()`);i.forEach(o=>o.addClickHandler(e))}};function Er(){let t=new lo;return t.init(),t}var N=class{constructor(e){this.type=De.external,this.container=e}};var He=class{constructor(e){this.type=De.particles,this.container=e}};var se;(function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"})(se||(se={}));var Fr;(function(t){t.linear="linear",t.radial="radial",t.random="random"})(Fr||(Fr={}));var ke;(function(t){t.easeInBack="ease-in-back",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInExpo="ease-in-expo",t.easeInSine="ease-in-sine",t.easeOutBack="ease-out-back",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutExpo="ease-out-expo",t.easeOutSine="ease-out-sine",t.easeInOutBack="ease-in-out-back",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutExpo="ease-in-out-expo",t.easeInOutSine="ease-in-out-sine"})(ke||(ke={}));var Lr=Er();be()||(window.tsParticles=Lr);var ls=.5,Zc=2,Ue=0,ge=1,Ar=60,Vr=0,Kc=.01,Jc=Math.PI*Zc;function Br(t){let e=t.initialPosition,{dx:i,dy:o}=T(e,t.position),n=Math.abs(i),s=Math.abs(o),{maxDistance:r}=t.retina,a=r.horizontal,c=r.vertical;if(!a&&!c)return;let l=(a&&n>=a)??!1,f=(c&&s>=c)??!1;if((l||f)&&!t.misplaced)t.misplaced=!!a&&n>a||!!c&&s>c,a&&(t.velocity.x=t.velocity.y*ls-t.velocity.x),c&&(t.velocity.y=t.velocity.x*ls-t.velocity.y);else if((!a||n<a)&&(!c||s<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){let u=t.position,h=t.velocity;a&&(u.x<e.x&&h.x<Ue||u.x>e.x&&h.x>Ue)&&(h.x*=-M()),c&&(u.y<e.y&&h.y<Ue||u.y>e.y&&h.y>Ue)&&(h.y*=-M())}}function qr(t,e,i,o,n,s){el(t,s);let r=t.gravity,a=r?.enable&&r.inverse?-ge:ge;n&&i&&(t.velocity.x+=n*s.factor/(Ar*i)),r?.enable&&i&&(t.velocity.y+=a*(r.acceleration*s.factor)/(Ar*i));let c=t.moveDecay;t.velocity.multTo(c);let l=t.velocity.mult(i);r?.enable&&o>Ue&&(!r.inverse&&l.y>=Ue&&l.y>=o||r.inverse&&l.y<=Ue&&l.y<=-o)&&(l.y=a*o,i&&(t.velocity.y=l.y/i));let f=t.options.zIndex,u=(ge-t.zIndexFactor)**f.velocityRate;l.multTo(u);let{position:h}=t;h.addTo(l),e.vibrate&&(h.x+=Math.sin(h.x*Math.cos(h.y)),h.y+=Math.cos(h.y*Math.sin(h.x)))}function Nr(t,e){let i=t.container;if(!t.spin)return;let o=t.spin.direction===se.clockwise,n={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*n.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*n.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;let s=Math.max(i.canvas.size.width,i.canvas.size.height),r=s*ls;t.spin.radius>r?(t.spin.radius=r,t.spin.acceleration*=-ge):t.spin.radius<Vr&&(t.spin.radius=Vr,t.spin.acceleration*=-ge),t.spin.angle+=e*Kc*(ge-t.spin.radius/s)}function el(t,e){let i=t.options,o=i.move.path;if(!o.enable)return;if(t.lastPathTime<=t.pathDelay){t.lastPathTime+=e.value;return}let s=t.pathGenerator?.generate(t,e);s&&t.velocity.addTo(s),o.clamp&&(t.velocity.x=U(t.velocity.x,-ge,ge),t.velocity.y=U(t.velocity.y,-ge,ge)),t.lastPathTime-=t.pathDelay}function Hr(t){return t.slow.inRange?t.slow.factor:ge}function Ur(t){let e=t.container,i=t.options,o=i.move.spin;if(!o.enable)return;let n=o.position??{x:50,y:50},s=.01,r={x:n.x*s*e.canvas.size.width,y:n.y*s*e.canvas.size.height},a=t.getPosition(),c=F(a,r),l=y(o.acceleration);t.retina.spinAcceleration=l*e.retina.pixelRatio,t.spin={center:r,direction:t.velocity.x>=Ue?se.clockwise:se.counterClockwise,angle:M()*Jc,radius:c,acceleration:t.retina.spinAcceleration}}var tl=2,il=1,ol=1,fo=class{init(e){let i=e.options,o=i.move.gravity;e.gravity={enable:o.enable,acceleration:y(o.acceleration),inverse:o.inverse},Ur(e)}isEnabled(e){return!e.destroyed&&e.options.move.enable}move(e,i){let o=e.options,n=o.move;if(!n.enable)return;let s=e.container,r=s.retina.pixelRatio;e.retina.moveSpeed??=y(n.speed)*r,e.retina.moveDrift??=y(e.options.move.drift)*r;let a=Hr(e),c=e.retina.moveSpeed*s.retina.reduceFactor,l=e.retina.moveDrift,f=ee(o.size.value)*r,u=n.size?e.getRadius()/f:il,h=i.factor||ol,p=c*u*a*h/tl,m=e.retina.maxSpeed??s.retina.maxSpeed;n.spin.enable?Nr(e,p):qr(e,n,p,m,l,i),Br(e)}};async function Wr(t,e=!0){t.checkVersion("3.8.1"),await t.addMover("base",()=>Promise.resolve(new fo),e)}var nl=Math.PI*2,sl=0,jr={x:0,y:0};function $r(t){let{context:e,particle:i,radius:o}=t;i.circleRange||(i.circleRange={min:sl,max:nl});let n=i.circleRange;e.arc(jr.x,jr.y,o,n.min,n.max,!1)}var rl=12,al=360,Gr=0,uo=class{constructor(){this.validTypes=["circle"]}draw(e){$r(e)}getSidesCount(){return rl}particleInit(e,i){let o=i.shapeData,n=o?.angle??{max:al,min:Gr};i.circleRange=Oe(n)?{min:ue(n.min),max:ue(n.max)}:{min:Gr,max:ue(n)}}};async function Qr(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new uo,e)}var ho=class{constructor(e,i){this._container=e,this._engine=i}init(e){let i=Se(this._engine,e.options.color,e.id,e.options.reduceDuplicates);i&&(e.color=ci(i,e.options.color.animation,this._container.retina.reduceFactor))}isEnabled(e){let{h:i,s:o,l:n}=e.options.color.animation,{color:s}=e;return!e.destroyed&&!e.spawning&&(s?.h.value!==void 0&&i.enable||s?.s.value!==void 0&&o.enable||s?.l.value!==void 0&&n.enable)}update(e,i){li(e.color,i)}};async function Yr(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("color",i=>Promise.resolve(new ho(i,t)),e)}var Xe;(function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"})(Xe||(Xe={}));var cl=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,ll=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,po=16,fl=1,ul=255,mo=class{constructor(){this.key="hex",this.stringPrefix="#"}handleColor(e){return this._parseString(e.value)}handleRangeColor(e){return this._parseString(e.value)}parseString(e){return this._parseString(e)}_parseString(e){if(typeof e!="string"||!e?.startsWith(this.stringPrefix))return;let i=e.replace(cl,(n,s,r,a,c)=>s+s+r+r+a+a+(c!==void 0?c+c:"")),o=ll.exec(i);return o?{a:o[Xe.a]!==void 0?parseInt(o[Xe.a],po)/ul:fl,b:parseInt(o[Xe.b],po),g:parseInt(o[Xe.g],po),r:parseInt(o[Xe.r],po)}:void 0}};async function Xr(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new mo,e)}var xt;(function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"})(xt||(xt={}));var xo=class{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(e){let i=e.value,o=i.hsl??e.value;if(o.h!==void 0&&o.s!==void 0&&o.l!==void 0)return je(o)}handleRangeColor(e){let i=e.value,o=i.hsl??e.value;if(o.h!==void 0&&o.l!==void 0)return je({h:y(o.h),l:y(o.l),s:y(o.s)})}parseString(e){if(!e.startsWith("hsl"))return;let i=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i,o=i.exec(e),n=4,s=1,r=10;return o?kr({a:o.length>n?ei(o[xt.a]):s,h:parseInt(o[xt.h],r),l:parseInt(o[xt.l],r),s:parseInt(o[xt.s],r)}):void 0}};async function Zr(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new xo,e)}var go=class{constructor(e){this.container=e}init(e){let i=e.options.opacity,o=1;e.opacity=ni(i,o);let n=i.animation;n.enable&&(e.opacity.velocity=y(n.speed)/100*this.container.retina.reduceFactor,n.sync||(e.opacity.velocity*=M()))}isEnabled(e){return!e.destroyed&&!e.spawning&&!!e.opacity&&e.opacity.enable&&((e.opacity.maxLoops??0)<=0||(e.opacity.maxLoops??0)>0&&(e.opacity.loops??0)<(e.opacity.maxLoops??0))}reset(e){e.opacity&&(e.opacity.time=0,e.opacity.loops=0)}update(e,i){!this.isEnabled(e)||!e.opacity||ft(e,e.opacity,!0,e.options.opacity.animation.destroy,i)}};async function Kr(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("opacity",i=>Promise.resolve(new go(i)),e)}var yo=0,gt=0;function Jr(t){if(t.outMode!==R.bounce&&t.outMode!==R.split||t.direction!==C.left&&t.direction!==C.right)return;t.bounds.right<gt&&t.direction===C.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===C.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);let e=t.particle.velocity.x,i=!1;if(t.direction===C.right&&t.bounds.right>=t.canvasSize.width&&e>yo||t.direction===C.left&&t.bounds.left<=gt&&e<yo){let n=y(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-n,i=!0}if(!i)return;let o=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===C.right?t.particle.position.x=t.canvasSize.width-o:t.bounds.left<=gt&&t.direction===C.left&&(t.particle.position.x=o),t.outMode===R.split&&t.particle.destroy()}function ea(t){if(t.outMode!==R.bounce&&t.outMode!==R.split||t.direction!==C.bottom&&t.direction!==C.top)return;t.bounds.bottom<gt&&t.direction===C.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===C.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);let e=t.particle.velocity.y,i=!1;if(t.direction===C.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>yo||t.direction===C.top&&t.bounds.top<=gt&&e<yo){let n=y(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-n,i=!0}if(!i)return;let o=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===C.bottom?t.particle.position.y=t.canvasSize.height-o:t.bounds.top<=gt&&t.direction===C.top&&(t.particle.position.y=o),t.outMode===R.split&&t.particle.destroy()}var vo=class{constructor(e){this.container=e,this.modes=[R.bounce,R.split]}update(e,i,o,n){if(!this.modes.includes(n))return;let s=this.container,r=!1;for(let h of s.plugins.values())if(h.particleBounce!==void 0&&(r=h.particleBounce(e,o,i)),r)break;if(r)return;let a=e.getPosition(),c=e.offset,l=e.getRadius(),f=Le(a,l),u=s.canvas.size;Jr({particle:e,outMode:n,direction:i,bounds:f,canvasSize:u,offset:c,size:l}),ea({particle:e,outMode:n,direction:i,bounds:f,canvasSize:u,offset:c,size:l})}};var bo=0,wo=class{constructor(e){this.container=e,this.modes=[R.destroy]}update(e,i,o,n){if(!this.modes.includes(n))return;let s=this.container;switch(e.outType){case ne.normal:case ne.outside:if(at(e.position,s.canvas.size,D.origin,e.getRadius(),i))return;break;case ne.inside:{let{dx:r,dy:a}=T(e.position,e.moveCenter),{x:c,y:l}=e.velocity;if(c<bo&&r>e.moveCenter.radius||l<bo&&a>e.moveCenter.radius||c>=bo&&r<-e.moveCenter.radius||l>=bo&&a<-e.moveCenter.radius)return;break}}s.particles.remove(e,e.group,!0)}};var _o=0,ko=class{constructor(e){this.container=e,this.modes=[R.none]}update(e,i,o,n){if(!this.modes.includes(n)||((e.options.move.distance.horizontal&&(i===C.left||i===C.right))??(e.options.move.distance.vertical&&(i===C.top||i===C.bottom))))return;let s=e.options.move.gravity,r=this.container,a=r.canvas.size,c=e.getRadius();if(s.enable){let l=e.position;(!s.inverse&&l.y>a.height+c&&i===C.bottom||s.inverse&&l.y<-c&&i===C.top)&&r.particles.remove(e)}else{if(e.velocity.y>_o&&e.position.y<=a.height+c||e.velocity.y<_o&&e.position.y>=-c||e.velocity.x>_o&&e.position.x<=a.width+c||e.velocity.x<_o&&e.position.x>=-c)return;at(e.position,r.canvas.size,D.origin,c,i)||r.particles.remove(e)}}};var Co=0,Mo=0,Po=class{constructor(e){this.container=e,this.modes=[R.out]}update(e,i,o,n){if(!this.modes.includes(n))return;let s=this.container;switch(e.outType){case ne.inside:{let{x:r,y:a}=e.velocity,c=D.origin;c.length=e.moveCenter.radius,c.angle=e.velocity.angle+Math.PI,c.addTo(D.create(e.moveCenter));let{dx:l,dy:f}=T(e.position,c);if(r<=Co&&l>=Mo||a<=Co&&f>=Mo||r>=Co&&l<=Mo||a>=Co&&f<=Mo)return;e.position.x=Math.floor(Y({min:0,max:s.canvas.size.width})),e.position.y=Math.floor(Y({min:0,max:s.canvas.size.height}));let{dx:u,dy:h}=T(e.position,e.moveCenter);e.direction=Math.atan2(-h,-u),e.velocity.angle=e.direction;break}default:{if(at(e.position,s.canvas.size,D.origin,e.getRadius(),i))return;switch(e.outType){case ne.outside:{e.position.x=Math.floor(Y({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(Y({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;let{dx:r,dy:a}=T(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(a,r),e.velocity.angle=e.direction);break}case ne.normal:{let r=e.options.move.warp,a=s.canvas.size,c={bottom:a.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:a.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},l=e.getRadius(),f=Le(e.position,l);i===C.right&&f.left>a.width+e.offset.x?(e.position.x=c.left,e.initialPosition.x=e.position.x,r||(e.position.y=M()*a.height,e.initialPosition.y=e.position.y)):i===C.left&&f.right<-e.offset.x&&(e.position.x=c.right,e.initialPosition.x=e.position.x,r||(e.position.y=M()*a.height,e.initialPosition.y=e.position.y)),i===C.bottom&&f.top>a.height+e.offset.y?(r||(e.position.x=M()*a.width,e.initialPosition.x=e.position.x),e.position.y=c.top,e.initialPosition.y=e.position.y):i===C.top&&f.bottom<-e.offset.y&&(r||(e.position.x=M()*a.width,e.initialPosition.x=e.position.x),e.position.y=c.bottom,e.initialPosition.y=e.position.y);break}}break}}}};var hl=(t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e,Oo=class{constructor(e){this._addUpdaterIfMissing=(i,o,n)=>{let s=i.options.move.outModes;!this.updaters.has(o)&&hl(s,o)&&this.updaters.set(o,n(this.container))},this._updateOutMode=(i,o,n,s)=>{for(let r of this.updaters.values())r.update(i,s,o,n)},this.container=e,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,R.bounce,i=>new vo(i)),this._addUpdaterIfMissing(e,R.out,i=>new Po(i)),this._addUpdaterIfMissing(e,R.destroy,i=>new wo(i)),this._addUpdaterIfMissing(e,R.none,i=>new ko(i))}isEnabled(e){return!e.destroyed&&!e.spawning}update(e,i){let o=e.options.move.outModes;this._updateOutMode(e,i,o.bottom??o.default,C.bottom),this._updateOutMode(e,i,o.left??o.default,C.left),this._updateOutMode(e,i,o.right??o.default,C.right),this._updateOutMode(e,i,o.top??o.default,C.top)}};async function ta(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("outModes",i=>Promise.resolve(new Oo(i)),e)}var yt;(function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"})(yt||(yt={}));var Ro=class{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(e){let i=e.value,o=i.rgb??e.value;if(o.r!==void 0)return o}handleRangeColor(e){let i=e.value,o=i.rgb??e.value;if(o.r!==void 0)return{r:y(o.r),g:y(o.g),b:y(o.b)}}parseString(e){if(!e.startsWith(this.stringPrefix))return;let i=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i,o=i.exec(e),n=10;return o?{a:o.length>4?ei(o[yt.a]):1,b:parseInt(o[yt.b],n),g:parseInt(o[yt.g],n),r:parseInt(o[yt.r],n)}:void 0}};async function ia(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new Ro,e)}var Ze=0,So=class{init(e){let i=e.container,o=e.options.size,n=o.animation;n.enable&&(e.size.velocity=(e.retina.sizeAnimationSpeed??i.retina.sizeAnimationSpeed)/100*i.retina.reduceFactor,n.sync||(e.size.velocity*=M()))}isEnabled(e){return!e.destroyed&&!e.spawning&&e.size.enable&&((e.size.maxLoops??Ze)<=Ze||(e.size.maxLoops??Ze)>Ze&&(e.size.loops??Ze)<(e.size.maxLoops??Ze))}reset(e){e.size.loops=Ze}update(e,i){this.isEnabled(e)&&ft(e,e.size,!0,e.options.size.animation.destroy,i)}};async function oa(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("size",()=>Promise.resolve(new So),e)}async function na(t,e=!0){t.checkVersion("3.8.1"),await Xr(t,!1),await Zr(t,!1),await ia(t,!1),await Wr(t,!1),await Qr(t,!1),await Yr(t,!1),await Kr(t,!1),await ta(t,!1),await oa(t,!1),await t.refresh(e)}async function sa(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(ke.easeInQuad,i=>i**2,!1),await t.addEasing(ke.easeOutQuad,i=>1-(1-i)**2,!1),await t.addEasing(ke.easeInOutQuad,i=>i<.5?2*i**2:1-(-2*i+2)**2/2,!1),await t.refresh(e)}function ra(t,e){let{context:i,opacity:o}=t,n=.5,s=i.globalAlpha;if(!e)return;let r=e.width,a=r*n;i.globalAlpha=o,i.drawImage(e,-a,-a,r,r),i.globalAlpha=s}var fs='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"',aa=0,zo=class{constructor(){this.validTypes=["emoji"],this._emojiShapeDict=new Map}destroy(){for(let[e,i]of this._emojiShapeDict)i instanceof ImageBitmap&&i?.close(),this._emojiShapeDict.delete(e)}draw(e){let i=e.particle.emojiDataKey;if(!i)return;let o=this._emojiShapeDict.get(i);o&&ra(e,o)}async init(e){let i=e.actualOptions,{validTypes:o}=this;if(!o.find(r=>O(r,i.particles.shape.type)))return;let n=[ts(fs)],s=o.map(r=>i.particles.shape.options[r]).find(r=>!!r);s&&W(s,r=>{r.font&&n.push(ts(r.font))}),await Promise.all(n)}particleDestroy(e){e.emojiDataKey=void 0}particleInit(e,i){let n=i.shapeData;if(!n?.value)return;let s=K(n.value,i.randomIndexData);if(!s)return;let r=typeof s=="string"?{font:n.font??fs,padding:n.padding??aa,value:s}:{font:fs,padding:aa,...n,...s},a=r.font,c=r.value,l=`${c}_${a}`;if(this._emojiShapeDict.has(l)){i.emojiDataKey=l;return}let f=r.padding*2,u=ee(i.size.value),h=u+f,p=h*2,m;if(typeof OffscreenCanvas<"u"){let g=new OffscreenCanvas(p,p),x=g.getContext("2d");if(!x)return;x.font=`400 ${u*2}px ${a}`,x.textBaseline="middle",x.textAlign="center",x.fillText(c,h,h),m=g.transferToImageBitmap()}else{let g=document.createElement("canvas");g.width=p,g.height=p;let x=g.getContext("2d");if(!x)return;x.font=`400 ${u*2}px ${a}`,x.textBaseline="middle",x.textAlign="center",x.fillText(c,h,h),m=g}this._emojiShapeDict.set(l,m),i.emojiDataKey=l}};async function ca(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new zo,e)}var dl=1,pl=1,la=0;function fa(t,e,i,o,n,s){let r=e.actualOptions.interactivity.modes.attract;if(!r)return;let a=e.particles.quadTree.query(n,s);for(let c of a){let{dx:l,dy:f,distance:u}=T(c.position,i),h=r.speed*r.factor,p=U(t.getEasing(r.easing)(pl-u/o)*h,dl,r.maxSpeed),m=D.create(u?l/u*p:h,u?f/u*p:h);c.position.subFrom(m)}}function ua(t,e,i){e.attract||(e.attract={particles:[]});let{attract:o}=e;if(o.finish||(o.count||(o.count=0),o.count++,o.count===e.particles.count&&(o.finish=!0)),o.clicking){let n=e.interactivity.mouse.clickPosition,s=e.retina.attractModeDistance;if(!s||s<la||!n)return;fa(t,e,n,s,new A(n.x,n.y,s),r=>i(r))}else o.clicking===!1&&(o.particles=[])}function ha(t,e,i){let o=e.interactivity.mouse.position,n=e.retina.attractModeDistance;!n||n<la||!o||fa(t,e,o,n,new A(o.x,o.y,n),s=>i(s))}var Do=class{constructor(){this.distance=200,this.duration=.4,this.easing=ke.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(e){d(e)||(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.easing!==void 0&&(this.easing=e.easing),e.factor!==void 0&&(this.factor=e.factor),e.maxSpeed!==void 0&&(this.maxSpeed=e.maxSpeed),e.speed!==void 0&&(this.speed=e.speed))}};var qt="attract",Io=class extends N{constructor(e,i){super(i),this._engine=e,i.attract||(i.attract={particles:[]}),this.handleClickMode=o=>{let n=this.container.actualOptions,s=n.interactivity.modes.attract;if(!(!s||o!==qt)){i.attract||(i.attract={particles:[]}),i.attract.clicking=!0,i.attract.count=0;for(let r of i.attract.particles)this.isEnabled(r)&&r.velocity.setTo(r.initialVelocity);i.attract.particles=[],i.attract.finish=!1,setTimeout(()=>{i.destroyed||(i.attract||(i.attract={particles:[]}),i.attract.clicking=!1)},s.duration*1e3)}}}clear(){}init(){let e=this.container,i=e.actualOptions.interactivity.modes.attract;i&&(e.retina.attractModeDistance=i.distance*e.retina.pixelRatio)}interact(){let e=this.container,i=e.actualOptions,o=e.interactivity.status===ae,n=i.interactivity.events,{enable:s,mode:r}=n.onHover,{enable:a,mode:c}=n.onClick;o&&s&&O(qt,r)?ha(this._engine,this.container,l=>this.isEnabled(l)):a&&O(qt,c)&&ua(this._engine,this.container,l=>this.isEnabled(l))}isEnabled(e){let i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(e?.interactivity??o.interactivity).events;if((!n.position||!s.onHover.enable)&&(!n.clickPosition||!s.onClick.enable))return!1;let r=s.onHover.mode,a=s.onClick.mode;return O(qt,r)||O(qt,a)}loadModeOptions(e,...i){e.attract||(e.attract=new Do);for(let o of i)e.attract.load(o?.attract)}reset(){}};async function da(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalAttract",i=>Promise.resolve(new Io(t,i)),e)}var ml=2,To=.5,xl=Math.PI*To,pa=2,ma=10,gl=0;function xa(t,e,i,o,n){let s=t.particles.quadTree.query(o,n);for(let r of s)o instanceof A?oi(Tt(r),{position:e,radius:i,mass:i**ml*xl,velocity:D.origin,factor:D.origin}):o instanceof X&&yr(r,Le(e,i))}function yl(t,e,i,o){let n=document.querySelectorAll(e);n.length&&n.forEach(s=>{let r=s,a=t.retina.pixelRatio,c={x:(r.offsetLeft+r.offsetWidth*To)*a,y:(r.offsetTop+r.offsetHeight*To)*a},l=r.offsetWidth*To*a,f=ma*a,u=i.type===we.circle?new A(c.x,c.y,l+f):new X(r.offsetLeft*a-f,r.offsetTop*a-f,r.offsetWidth*a+f*pa,r.offsetHeight*a+f*pa);o(c,l,u)})}function ga(t,e,i,o){lt(i,e,(n,s)=>yl(t,n,s,(r,a,c)=>xa(t,r,a,c,o)))}function ya(t,e){let i=t.retina.pixelRatio,o=ma*i,n=t.interactivity.mouse.position,s=t.retina.bounceModeDistance;!s||s<gl||!n||xa(t,n,s,new A(n.x,n.y,s+o),e)}var Eo=class{constructor(){this.distance=200}load(e){d(e)||e.distance!==void 0&&(this.distance=e.distance)}};var Fo="bounce",Lo=class extends N{constructor(e){super(e)}clear(){}init(){let e=this.container,i=e.actualOptions.interactivity.modes.bounce;i&&(e.retina.bounceModeDistance=i.distance*e.retina.pixelRatio)}interact(){let e=this.container,i=e.actualOptions,o=i.interactivity.events,n=e.interactivity.status===ae,s=o.onHover.enable,r=o.onHover.mode,a=o.onDiv;n&&s&&O(Fo,r)?ya(this.container,c=>this.isEnabled(c)):ga(this.container,a,Fo,c=>this.isEnabled(c))}isEnabled(e){let i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(e?.interactivity??o.interactivity).events,r=s.onDiv;return!!n.position&&s.onHover.enable&&O(Fo,s.onHover.mode)||ct(Fo,r)}loadModeOptions(e,...i){e.bounce||(e.bounce=new Eo);for(let o of i)e.bounce.load(o?.bounce)}reset(){}};async function va(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalBounce",i=>Promise.resolve(new Lo(i)),e)}var vt=class{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(e){if(!d(e)){if(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.mix!==void 0&&(this.mix=e.mix),e.opacity!==void 0&&(this.opacity=e.opacity),e.color!==void 0){let i=J(this.color)?void 0:this.color;this.color=W(e.color,o=>z.create(i,o))}e.size!==void 0&&(this.size=e.size)}}};var Ao=class extends vt{constructor(){super(),this.selectors=[]}load(e){super.load(e),!d(e)&&e.selectors!==void 0&&(this.selectors=e.selectors)}};var Vo=class extends vt{load(e){super.load(e),!d(e)&&(this.divs=W(e.divs,i=>{let o=new Ao;return o.load(i),o}))}};var ye;(function(t){t.color="color",t.opacity="opacity",t.size="size"})(ye||(ye={}));function us(t,e,i,o){if(e>=i){let n=t+(e-i)*o;return U(n,t,e)}else if(e<i){let n=t-(i-e)*o;return U(n,e,t)}}var Ke="bubble",hs=0,vl=0,bl=2,ba=1,wa=1,wl=0,_l=0,ds=.5,ps=1,Bo=class extends N{constructor(e,i){super(e),this._clickBubble=()=>{let o=this.container,n=o.actualOptions,s=o.interactivity.mouse.clickPosition,r=n.interactivity.modes.bubble;if(!r||!s)return;o.bubble||(o.bubble={});let a=o.retina.bubbleModeDistance;if(!a||a<hs)return;let c=o.particles.quadTree.queryCircle(s,a,f=>this.isEnabled(f)),{bubble:l}=o;for(let f of c){if(!l.clicking)continue;f.bubble.inRange=!l.durationEnd;let u=f.getPosition(),h=F(u,s),p=(new Date().getTime()-(o.interactivity.mouse.clickTime??vl))/1e3;p>r.duration&&(l.durationEnd=!0),p>r.duration*bl&&(l.clicking=!1,l.durationEnd=!1);let m={bubbleObj:{optValue:o.retina.bubbleModeSize,value:f.bubble.radius},particlesObj:{optValue:ee(f.options.size.value)*o.retina.pixelRatio,value:f.size.value},type:ye.size};this._process(f,h,p,m);let g={bubbleObj:{optValue:r.opacity,value:f.bubble.opacity},particlesObj:{optValue:ee(f.options.opacity.value),value:f.opacity?.value??ba},type:ye.opacity};this._process(f,h,p,g),!l.durationEnd&&h<=a?this._hoverBubbleColor(f,h):delete f.bubble.color}},this._hoverBubble=()=>{let o=this.container,n=o.interactivity.mouse.position,s=o.retina.bubbleModeDistance;if(!s||s<hs||!n)return;let r=o.particles.quadTree.queryCircle(n,s,a=>this.isEnabled(a));for(let a of r){a.bubble.inRange=!0;let c=a.getPosition(),l=F(c,n),f=wa-l/s;l<=s?f>=_l&&o.interactivity.status===ae&&(this._hoverBubbleSize(a,f),this._hoverBubbleOpacity(a,f),this._hoverBubbleColor(a,f)):this.reset(a),o.interactivity.status===Mt&&this.reset(a)}},this._hoverBubbleColor=(o,n,s)=>{let r=this.container.actualOptions,a=s??r.interactivity.modes.bubble;if(a){if(!o.bubble.finalColor){let c=a.color;if(!c)return;let l=K(c);o.bubble.finalColor=Se(this._engine,l)}if(o.bubble.finalColor)if(a.mix){o.bubble.color=void 0;let c=o.getFillColor();o.bubble.color=c?ns(Et(c,o.bubble.finalColor,wa-n,n)):o.bubble.finalColor}else o.bubble.color=o.bubble.finalColor}},this._hoverBubbleOpacity=(o,n,s)=>{let r=this.container,a=r.actualOptions,c=s?.opacity??a.interactivity.modes.bubble?.opacity;if(!c)return;let l=o.options.opacity.value,f=o.opacity?.value??ba,u=us(f,c,ee(l),n);u!==void 0&&(o.bubble.opacity=u)},this._hoverBubbleSize=(o,n,s)=>{let r=this.container,a=s?.size?s.size*r.retina.pixelRatio:r.retina.bubbleModeSize;if(a===void 0)return;let c=ee(o.options.size.value)*r.retina.pixelRatio,l=o.size.value,f=us(l,a,c,n);f!==void 0&&(o.bubble.radius=f)},this._process=(o,n,s,r)=>{let a=this.container,c=r.bubbleObj.optValue,l=a.actualOptions,f=l.interactivity.modes.bubble;if(!f||c===void 0)return;let u=f.duration,h=a.retina.bubbleModeDistance,p=r.particlesObj.optValue,m=r.bubbleObj.value,g=r.particlesObj.value??wl,x=r.type;if(!(!h||h<hs||c===p))if(a.bubble||(a.bubble={}),a.bubble.durationEnd)m&&(x===ye.size&&delete o.bubble.radius,x===ye.opacity&&delete o.bubble.opacity);else if(n<=h){if((m??g)!==c){let v=g-s*(g-c)/u;x===ye.size&&(o.bubble.radius=v),x===ye.opacity&&(o.bubble.opacity=v)}}else x===ye.size&&delete o.bubble.radius,x===ye.opacity&&delete o.bubble.opacity},this._singleSelectorHover=(o,n,s)=>{let r=this.container,a=document.querySelectorAll(n),c=r.actualOptions.interactivity.modes.bubble;!c||!a.length||a.forEach(l=>{let f=l,u=r.retina.pixelRatio,h={x:(f.offsetLeft+f.offsetWidth*ds)*u,y:(f.offsetTop+f.offsetHeight*ds)*u},p=f.offsetWidth*ds*u,m=s.type===we.circle?new A(h.x,h.y,p):new X(f.offsetLeft*u,f.offsetTop*u,f.offsetWidth*u,f.offsetHeight*u),g=r.particles.quadTree.query(m,x=>this.isEnabled(x));for(let x of g){if(!m.contains(x.getPosition()))continue;x.bubble.inRange=!0;let b=c.divs,v=ii(b,f);(!x.bubble.div||x.bubble.div!==f)&&(this.clear(x,o,!0),x.bubble.div=f),this._hoverBubbleSize(x,ps,v),this._hoverBubbleOpacity(x,ps,v),this._hoverBubbleColor(x,ps,v)}})},this._engine=i,e.bubble||(e.bubble={}),this.handleClickMode=o=>{o===Ke&&(e.bubble||(e.bubble={}),e.bubble.clicking=!0)}}clear(e,i,o){e.bubble.inRange&&!o||(delete e.bubble.div,delete e.bubble.opacity,delete e.bubble.radius,delete e.bubble.color)}init(){let e=this.container,i=e.actualOptions.interactivity.modes.bubble;i&&(e.retina.bubbleModeDistance=i.distance*e.retina.pixelRatio,i.size!==void 0&&(e.retina.bubbleModeSize=i.size*e.retina.pixelRatio))}interact(e){let i=this.container.actualOptions,o=i.interactivity.events,n=o.onHover,s=o.onClick,r=n.enable,a=n.mode,c=s.enable,l=s.mode,f=o.onDiv;r&&O(Ke,a)?this._hoverBubble():c&&O(Ke,l)?this._clickBubble():lt(Ke,f,(u,h)=>this._singleSelectorHover(e,u,h))}isEnabled(e){let i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(e?.interactivity??o.interactivity).events,{onClick:r,onDiv:a,onHover:c}=s,l=ct(Ke,a);return l||c.enable&&n.position||r.enable&&n.clickPosition?O(Ke,c.mode)||O(Ke,r.mode)||l:!1}loadModeOptions(e,...i){e.bubble||(e.bubble=new Vo);for(let o of i)e.bubble.load(o?.bubble)}reset(e){e.bubble.inRange=!1}};async function _a(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalBubble",i=>Promise.resolve(new Bo(i,t)),e)}var qo=class{constructor(){this.opacity=.5}load(e){d(e)||e.opacity!==void 0&&(this.opacity=e.opacity)}};var No=class{constructor(){this.distance=80,this.links=new qo,this.radius=60}load(e){d(e)||(e.distance!==void 0&&(this.distance=e.distance),this.links.load(e.links),e.radius!==void 0&&(this.radius=e.radius))}};var ka=0,Ca=1,kl=0;function Cl(t,e,i,o){let n=Math.floor(i.getRadius()/e.getRadius()),s=e.getFillColor(),r=i.getFillColor();if(!s||!r)return;let a=e.getPosition(),c=i.getPosition(),l=Et(s,r,e.getRadius(),i.getRadius()),f=t.createLinearGradient(a.x,a.y,c.x,c.y);return f.addColorStop(ka,Ae(s,o)),f.addColorStop(U(n,ka,Ca),oe(l,o)),f.addColorStop(Ca,Ae(r,o)),f}function Ml(t,e,i,o,n){Ve(t,o,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}function Pl(t,e,i,o){let n=t.actualOptions,s=n.interactivity.modes.connect;if(s)return Cl(e,i,o,s.links.opacity)}function Ma(t,e,i){t.canvas.draw(o=>{let n=Pl(t,o,e,i);if(!n)return;let s=e.getPosition(),r=i.getPosition();Ml(o,e.retina.linksWidth??kl,n,s,r)})}var Ol="connect",Pa=0,Ho=class extends N{constructor(e){super(e)}clear(){}init(){let e=this.container,i=e.actualOptions.interactivity.modes.connect;i&&(e.retina.connectModeDistance=i.distance*e.retina.pixelRatio,e.retina.connectModeRadius=i.radius*e.retina.pixelRatio)}interact(){let e=this.container;if(e.actualOptions.interactivity.events.onHover.enable&&e.interactivity.status==="pointermove"){let o=e.interactivity.mouse.position,{connectModeDistance:n,connectModeRadius:s}=e.retina;if(!n||n<Pa||!s||s<Pa||!o)return;let r=Math.abs(s),a=e.particles.quadTree.queryCircle(o,r,c=>this.isEnabled(c));a.forEach((c,l)=>{let f=c.getPosition(),u=1;for(let h of a.slice(l+u)){let p=h.getPosition(),m=Math.abs(n),g=Math.abs(f.x-p.x),x=Math.abs(f.y-p.y);g<m&&x<m&&Ma(e,c,h)}})}}isEnabled(e){let i=this.container,o=i.interactivity.mouse,n=(e?.interactivity??i.actualOptions.interactivity).events;return n.onHover.enable&&o.position?O(Ol,n.onHover.mode):!1}loadModeOptions(e,...i){e.connect||(e.connect=new No);for(let o of i)e.connect.load(o?.connect)}reset(){}};async function Oa(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalConnect",i=>Promise.resolve(new Ho(i)),e)}var Uo=class{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(e){d(e)||(e.blink!==void 0&&(this.blink=e.blink),e.color!==void 0&&(this.color=z.create(this.color,e.color)),e.consent!==void 0&&(this.consent=e.consent),e.opacity!==void 0&&(this.opacity=e.opacity))}};var Wo=class{constructor(){this.distance=100,this.links=new Uo}load(e){d(e)||(e.distance!==void 0&&(this.distance=e.distance),this.links.load(e.links))}};var Rl=0;function Sl(t,e,i,o,n,s){Ve(t,i,o),t.strokeStyle=oe(n,s),t.lineWidth=e,t.stroke()}function Ra(t,e,i,o,n){t.canvas.draw(s=>{let r=e.getPosition();Sl(s,e.retina.linksWidth??Rl,r,n,i,o)})}var zl="grab",Dl=0,Il=0,jo=class extends N{constructor(e,i){super(e),this._engine=i}clear(){}init(){let e=this.container,i=e.actualOptions.interactivity.modes.grab;i&&(e.retina.grabModeDistance=i.distance*e.retina.pixelRatio)}interact(){let e=this.container,i=e.actualOptions,o=i.interactivity;if(!o.modes.grab||!o.events.onHover.enable||e.interactivity.status!==ae)return;let n=e.interactivity.mouse.position;if(!n)return;let s=e.retina.grabModeDistance;if(!s||s<Dl)return;let r=e.particles.quadTree.queryCircle(n,s,a=>this.isEnabled(a));for(let a of r){let c=a.getPosition(),l=F(c,n);if(l>s)continue;let f=o.modes.grab.links,u=f.opacity,h=u-l*u/s;if(h<=Il)continue;let p=f.color??a.options.links?.color;if(!e.particles.grabLineColor&&p){let g=o.modes.grab.links;e.particles.grabLineColor=ai(this._engine,p,g.blink,g.consent)}let m=Ft(a,void 0,e.particles.grabLineColor);m&&Ra(e,a,m,h,n)}}isEnabled(e){let i=this.container,o=i.interactivity.mouse,n=(e?.interactivity??i.actualOptions.interactivity).events;return n.onHover.enable&&!!o.position&&O(zl,n.onHover.mode)}loadModeOptions(e,...i){e.grab||(e.grab=new Wo);for(let o of i)e.grab.load(o?.grab)}reset(){}};async function Sa(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalGrab",i=>Promise.resolve(new jo(i,t)),e)}var Tl="pause",$o=class extends N{constructor(e){super(e),this.handleClickMode=i=>{if(i!==Tl)return;let o=this.container;o.animationStatus?o.pause():o.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}};async function za(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalPause",i=>Promise.resolve(new $o(i)),e)}var Go=class{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if(d(e))return;e.default!==void 0&&(this.default=e.default),e.groups!==void 0&&(this.groups=e.groups.map(o=>o)),this.groups.length||(this.default=!0);let i=e.quantity;i!==void 0&&(this.quantity=_(i))}};var El="push",Fl=0,Qo=class extends N{constructor(e){super(e),this.handleClickMode=i=>{if(i!==El)return;let o=this.container,n=o.actualOptions,s=n.interactivity.modes.push;if(!s)return;let r=y(s.quantity);if(r<=Fl)return;let a=rt([void 0,...s.groups]),c=a!==void 0?o.actualOptions.particles.groups[a]:void 0;o.particles.push(r,o.interactivity.mouse,c,a)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...i){e.push||(e.push=new Go);for(let o of i)e.push.load(o?.push)}reset(){}};async function Da(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalPush",i=>Promise.resolve(new Qo(i)),e)}var Yo=class{constructor(){this.quantity=2}load(e){if(d(e))return;let i=e.quantity;i!==void 0&&(this.quantity=_(i))}};var Ll="remove",Xo=class extends N{constructor(e){super(e),this.handleClickMode=i=>{let o=this.container,n=o.actualOptions;if(!n.interactivity.modes.remove||i!==Ll)return;let s=y(n.interactivity.modes.remove.quantity);o.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...i){e.remove||(e.remove=new Yo);for(let o of i)e.remove.load(o?.remove)}reset(){}};async function Ia(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalRemove",i=>Promise.resolve(new Xo(i)),e)}var bt=class{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=ke.easeOutQuad}load(e){d(e)||(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.easing!==void 0&&(this.easing=e.easing),e.factor!==void 0&&(this.factor=e.factor),e.speed!==void 0&&(this.speed=e.speed),e.maxSpeed!==void 0&&(this.maxSpeed=e.maxSpeed))}};var Zo=class extends bt{constructor(){super(),this.selectors=[]}load(e){super.load(e),!d(e)&&e.selectors!==void 0&&(this.selectors=e.selectors)}};var Ko=class extends bt{load(e){super.load(e),!d(e)&&(this.divs=W(e.divs,i=>{let o=new Zo;return o.load(i),o}))}};var Je="repulse",Al=0,Vl=6,Bl=3,ql=2,Nl=0,Hl=0,Ul=1,ms=.5,Jo=class extends N{constructor(e,i){super(i),this._clickRepulse=()=>{let o=this.container,n=o.actualOptions.interactivity.modes.repulse;if(!n)return;let s=o.repulse??{particles:[]};if(s.finish||(s.count||(s.count=0),s.count++,s.count===o.particles.count&&(s.finish=!0)),s.clicking){let r=o.retina.repulseModeDistance;if(!r||r<Al)return;let a=Math.pow(r/Vl,Bl),c=o.interactivity.mouse.clickPosition;if(c===void 0)return;let l=new A(c.x,c.y,a),f=o.particles.quadTree.query(l,u=>this.isEnabled(u));for(let u of f){let{dx:h,dy:p,distance:m}=T(c,u.position),g=m**ql,x=n.speed,b=-a*x/g;if(g<=a){s.particles.push(u);let v=D.create(h,p);v.length=b,u.velocity.setTo(v)}}}else if(s.clicking===!1){for(let r of s.particles)r.velocity.setTo(r.initialVelocity);s.particles=[]}},this._hoverRepulse=()=>{let o=this.container,n=o.interactivity.mouse.position,s=o.retina.repulseModeDistance;!s||s<Nl||!n||this._processRepulse(n,s,new A(n.x,n.y,s))},this._processRepulse=(o,n,s,r)=>{let a=this.container,c=a.particles.quadTree.query(s,x=>this.isEnabled(x)),l=a.actualOptions.interactivity.modes.repulse;if(!l)return;let{easing:f,speed:u,factor:h,maxSpeed:p}=l,m=this._engine.getEasing(f),g=(r?.speed??u)*h;for(let x of c){let{dx:b,dy:v,distance:k}=T(x.position,o),w=U(m(Ul-k/n)*g,Hl,p),P=D.create(k?b/k*w:g,k?v/k*w:g);x.position.addTo(P)}},this._singleSelectorRepulse=(o,n)=>{let s=this.container,r=s.actualOptions.interactivity.modes.repulse;if(!r)return;let a=document.querySelectorAll(o);a.length&&a.forEach(c=>{let l=c,f=s.retina.pixelRatio,u={x:(l.offsetLeft+l.offsetWidth*ms)*f,y:(l.offsetTop+l.offsetHeight*ms)*f},h=l.offsetWidth*ms*f,p=n.type===we.circle?new A(u.x,u.y,h):new X(l.offsetLeft*f,l.offsetTop*f,l.offsetWidth*f,l.offsetHeight*f),m=r.divs,g=ii(m,l);this._processRepulse(u,h,p,g)})},this._engine=e,i.repulse||(i.repulse={particles:[]}),this.handleClickMode=o=>{let n=this.container.actualOptions,s=n.interactivity.modes.repulse;if(!s||o!==Je)return;i.repulse||(i.repulse={particles:[]});let r=i.repulse;r.clicking=!0,r.count=0;for(let a of i.repulse.particles)this.isEnabled(a)&&a.velocity.setTo(a.initialVelocity);r.particles=[],r.finish=!1,setTimeout(()=>{i.destroyed||(r.clicking=!1)},s.duration*1e3)}}clear(){}init(){let e=this.container,i=e.actualOptions.interactivity.modes.repulse;i&&(e.retina.repulseModeDistance=i.distance*e.retina.pixelRatio)}interact(){let e=this.container,i=e.actualOptions,o=e.interactivity.status===ae,n=i.interactivity.events,s=n.onHover,r=s.enable,a=s.mode,c=n.onClick,l=c.enable,f=c.mode,u=n.onDiv;o&&r&&O(Je,a)?this._hoverRepulse():l&&O(Je,f)?this._clickRepulse():lt(Je,u,(h,p)=>this._singleSelectorRepulse(h,p))}isEnabled(e){let i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(e?.interactivity??o.interactivity).events,r=s.onDiv,a=s.onHover,c=s.onClick,l=ct(Je,r);if(!(l||a.enable&&n.position||c.enable&&n.clickPosition))return!1;let f=a.mode,u=c.mode;return O(Je,f)||O(Je,u)||l}loadModeOptions(e,...i){e.repulse||(e.repulse=new Ko);for(let o of i)e.repulse.load(o?.repulse)}reset(){}};async function Ta(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalRepulse",i=>Promise.resolve(new Jo(t,i)),e)}var en=class{constructor(){this.factor=3,this.radius=200}load(e){d(e)||(e.factor!==void 0&&(this.factor=e.factor),e.radius!==void 0&&(this.radius=e.radius))}};var Wl="slow",jl=0,tn=class extends N{constructor(e){super(e)}clear(e,i,o){e.slow.inRange&&!o||(e.slow.factor=1)}init(){let e=this.container,i=e.actualOptions.interactivity.modes.slow;i&&(e.retina.slowModeRadius=i.radius*e.retina.pixelRatio)}interact(){}isEnabled(e){let i=this.container,o=i.interactivity.mouse,n=(e?.interactivity??i.actualOptions.interactivity).events;return n.onHover.enable&&!!o.position&&O(Wl,n.onHover.mode)}loadModeOptions(e,...i){e.slow||(e.slow=new en);for(let o of i)e.slow.load(o?.slow)}reset(e){e.slow.inRange=!1;let i=this.container,o=i.actualOptions,n=i.interactivity.mouse.position,s=i.retina.slowModeRadius,r=o.interactivity.modes.slow;if(!r||!s||s<jl||!n)return;let a=e.getPosition(),c=F(n,a),l=c/s,f=r.factor,{slow:u}=e;c>s||(u.inRange=!0,u.factor=l/f)}};async function Ea(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalSlow",i=>Promise.resolve(new tn(i)),e)}var $l=0,Gl=1,Ql=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;function Yl(t,e,i){let{svgData:o}=t;if(!o)return"";let n=Ae(e,i);if(o.includes("fill"))return o.replace(Ql,()=>n);let s=o.indexOf(">");return`${o.substring($l,s)} fill="${n}"${o.substring(s)}`}async function wt(t){return new Promise(e=>{t.loading=!0;let i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,he().error(`${j} loading image: ${t.source}`),e()}),i.src=t.source})}async function Fa(t){if(t.type!=="svg"){await wt(t);return}t.loading=!0;let e=await fetch(t.source);e.ok?t.svgData=await e.text():(he().error(`${j} Image not found`),t.error=!0),t.loading=!1}function La(t,e,i,o){let n=Yl(t,i,o.opacity?.value??Gl),s={color:i,gif:e.gif,data:{...t,svgData:n},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(r=>{let a=new Blob([n],{type:"image/svg+xml"}),c=URL||window.URL||window.webkitURL||window,l=c.createObjectURL(a),f=new Image;f.addEventListener("load",()=>{s.loaded=!0,s.element=f,r(s),c.revokeObjectURL(l)});let u=async()=>{c.revokeObjectURL(l);let h={...t,error:!1,loading:!0};await wt(h),s.loaded=!0,s.element=h.element,r(s)};f.addEventListener("error",()=>void u()),f.src=l})}var on=[0,4,2,1],xs=[8,8,4,2];var nn=class{constructor(e){this.pos=0,this.data=new Uint8ClampedArray(e)}getString(e){let i=this.data.slice(this.pos,this.pos+e);return this.pos+=i.length,i.reduce((o,n)=>o+String.fromCharCode(n),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let e="",i=0,o=0,n=0;do{i=this.data[this.pos++];for(let s=i;--s>=o;e+=String.fromCharCode(this.data[this.pos++]));}while(i!==n);return e}readSubBlocksBin(){let e=this.data[this.pos],i=0,o=0,n=1;for(let r=0;e!==o;r+=e+n,e=this.data[this.pos+r])i+=e;let s=new Uint8Array(i);e=this.data[this.pos++];for(let r=0;e!==o;e=this.data[this.pos++])for(let a=e;--a>=o;s[r++]=this.data[this.pos++]);return s}skipSubBlocks(){for(let e=1,i=0;this.data[this.pos]!==i;this.pos+=this.data[this.pos]+e);this.pos++}};var pe;(function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"})(pe||(pe={}));var Ce;(function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"})(Ce||(Ce={}));var re={x:0,y:0},Xl=0,Aa=.5,Zl=0,Va=0,gs=0;function Ba(t,e){let i=[];for(let o=0;o<e;o++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function Kl(t,e,i,o){switch(t.nextByte()){case Ce.GraphicsControlExtension:{let n=e.frames[i(!1)];t.pos++;let s=t.nextByte();n.GCreserved=(s&224)>>>5,n.disposalMethod=(s&28)>>>2,n.userInputDelayFlag=(s&2)===2;let r=(s&1)===1;n.delayTime=t.nextTwoBytes()*10;let a=t.nextByte();r&&o(a),t.pos++;break}case Ce.ApplicationExtension:{t.pos++;let n={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(n);break}case Ce.CommentExtension:{e.comments.push([i(!1),t.readSubBlocks()]);break}case Ce.PlainTextExtension:{if(e.globalColorTable.length===0)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break}default:t.skipSubBlocks();break}}async function Jl(t,e,i,o,n,s){let r=e.frames[o(!0)];r.left=t.nextTwoBytes(),r.top=t.nextTwoBytes(),r.width=t.nextTwoBytes(),r.height=t.nextTwoBytes();let a=t.nextByte(),c=(a&128)===128,l=(a&64)===64;r.sortFlag=(a&32)===32,r.reserved=(a&24)>>>3;let f=1<<(a&7)+1;c&&(r.localColorTable=Ba(t,f));let u=b=>{let{r:v,g:k,b:w}=(c?r.localColorTable:e.globalColorTable)[b];return b!==n(null)?{r:v,g:k,b:w,a:255}:{r:v,g:k,b:w,a:i?~~((v+k+w)/3):0}},h=(()=>{try{return new ImageData(r.width,r.height,{colorSpace:"srgb"})}catch(b){if(b instanceof DOMException&&b.name==="IndexSizeError")return null;throw b}})();if(h==null)throw new EvalError("GIF frame size is to large");let p=t.nextByte(),m=t.readSubBlocksBin(),g=1<<p,x=(b,v)=>{let k=b>>>3,w=b&7;return(m[k]+(m[k+1]<<8)+(m[k+2]<<16)&(1<<v)-1<<w)>>>w};if(l){for(let b=0,v=p+1,k=0,w=[[0]],P=0;P<4;P++){if(on[P]<r.height){let V=0,S=0,Z=!1;for(;!Z;){let tt=b;if(b=x(k,v),k+=v+1,b===g){v=p+1,w.length=g+2;for(let Me=0;Me<w.length;Me++)w[Me]=Me<g?[Me]:[]}else{b>=w.length?w.push(w[tt].concat(w[tt][0])):tt!==g&&w.push(w[tt].concat(w[b][0]));for(let Me of w[b]){let{r:En,g:Fn,b:Pc,a:Oc}=u(Me);h.data.set([En,Fn,Pc,Oc],on[P]*r.width+xs[P]*S+V%(r.width*4)),V+=4}w.length===1<<v&&v<12&&v++}V===r.width*4*(S+1)&&(S++,on[P]+xs[P]*S>=r.height&&(Z=!0))}}s?.(t.pos/(t.data.length-1),o(!1)+1,h,{x:r.left,y:r.top},{width:e.width,height:e.height})}r.image=h,r.bitmap=await createImageBitmap(h)}else{let b=0,v=p+1,k=0,w=-4,P=!1,V=[[0]];for(;!P;){let S=b;if(b=x(k,v),k+=v,b===g){v=p+1,V.length=g+2;for(let Z=0;Z<V.length;Z++)V[Z]=Z<g?[Z]:[]}else{if(b===g+1){P=!0;break}b>=V.length?V.push(V[S].concat(V[S][0])):S!==g&&V.push(V[S].concat(V[b][0]));for(let Z of V[b]){let{r:tt,g:Me,b:En,a:Fn}=u(Z);h.data.set([tt,Me,En,Fn],w+=4)}V.length>=1<<v&&v<12&&v++}}r.image=h,r.bitmap=await createImageBitmap(h),s?.((t.pos+1)/t.data.length,o(!1)+1,r.image,{x:r.left,y:r.top},{width:e.width,height:e.height})}}async function ef(t,e,i,o,n,s){switch(t.nextByte()){case Ce.EndOfFile:return!0;case Ce.Image:await Jl(t,e,i,o,n,s);break;case Ce.Extension:Kl(t,e,o,n);break;default:throw new EvalError("undefined block found")}return!1}function tf(t){for(let e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}async function of(t,e,i){i||(i=!1);let o=await fetch(t);if(!o.ok&&o.status===404)throw new EvalError("file not found");let n=await o.arrayBuffer(),s={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},r=new nn(new Uint8ClampedArray(n));if(r.getString(6)!=="GIF89a")throw new Error("not a supported GIF file");s.width=r.nextTwoBytes(),s.height=r.nextTwoBytes();let a=r.nextByte(),c=(a&128)===128;s.colorRes=(a&112)>>>4,s.sortFlag=(a&8)===8;let l=1<<(a&7)+1,f=r.nextByte();s.pixelAspectRatio=r.nextByte(),s.pixelAspectRatio!==0&&(s.pixelAspectRatio=(s.pixelAspectRatio+15)/64),c&&(s.globalColorTable=Ba(r,l));let u=(()=>{try{return new ImageData(s.width,s.height,{colorSpace:"srgb"})}catch(w){if(w instanceof DOMException&&w.name==="IndexSizeError")return null;throw w}})();if(u==null)throw new Error("GIF frame size is to large");let{r:h,g:p,b:m}=s.globalColorTable[f];u.data.set(c?[h,p,m,255]:[0,0,0,0]);for(let w=4;w<u.data.length;w*=2)u.data.copyWithin(w,0,w);s.backgroundImage=u;let g=-1,x=!0,b=-1,v=w=>(w&&(x=!0),g),k=w=>(w!=null&&(b=w),b);try{do x&&(s.frames.push({left:0,top:0,width:0,height:0,disposalMethod:pe.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),g++,b=-1,x=!1);while(!await ef(r,s,i,v,k,e));s.frames.length--;for(let w of s.frames){if(w.userInputDelayFlag&&w.delayTime===0){s.totalTime=1/0;break}s.totalTime+=w.delayTime}return s}catch(w){throw w instanceof EvalError?new Error(`error while parsing frame ${g} "${w.message}"`):w}}function qa(t){let{context:e,radius:i,particle:o,delta:n}=t,s=o.image;if(!s?.gifData||!s.gif)return;let r=new OffscreenCanvas(s.gifData.width,s.gifData.height),a=r.getContext("2d");if(!a)throw new Error("could not create offscreen canvas context");a.imageSmoothingQuality="low",a.imageSmoothingEnabled=!1,a.clearRect(re.x,re.y,r.width,r.height),o.gifLoopCount===void 0&&(o.gifLoopCount=s.gifLoopCount??gs);let c=o.gifFrame??Xl,l={x:-s.gifData.width*Aa,y:-s.gifData.height*Aa},f=s.gifData.frames[c];if(o.gifTime===void 0&&(o.gifTime=Zl),!!f.bitmap){switch(e.scale(i/s.gifData.width,i/s.gifData.height),f.disposalMethod){case pe.UndefinedA:case pe.UndefinedB:case pe.UndefinedC:case pe.UndefinedD:case pe.Replace:a.drawImage(f.bitmap,f.left,f.top),e.drawImage(r,l.x,l.y),a.clearRect(re.x,re.y,r.width,r.height);break;case pe.Combine:a.drawImage(f.bitmap,f.left,f.top),e.drawImage(r,l.x,l.y);break;case pe.RestoreBackground:a.drawImage(f.bitmap,f.left,f.top),e.drawImage(r,l.x,l.y),a.clearRect(re.x,re.y,r.width,r.height),s.gifData.globalColorTable.length?a.putImageData(s.gifData.backgroundImage,l.x,l.y):a.putImageData(s.gifData.frames[Va].image,l.x+f.left,l.y+f.top);break;case pe.RestorePrevious:{let u=a.getImageData(re.x,re.y,r.width,r.height);a.drawImage(f.bitmap,f.left,f.top),e.drawImage(r,l.x,l.y),a.clearRect(re.x,re.y,r.width,r.height),a.putImageData(u,re.x,re.y)}break}if(o.gifTime+=n.value,o.gifTime>f.delayTime){if(o.gifTime-=f.delayTime,++c>=s.gifData.frames.length){if(--o.gifLoopCount<=gs)return;c=Va,a.clearRect(re.x,re.y,r.width,r.height)}o.gifFrame=c}e.scale(s.gifData.width/i,s.gifData.height/i)}}async function Na(t){if(t.type!=="gif"){await wt(t);return}t.loading=!0;try{t.gifData=await of(t.source),t.gifLoopCount=tf(t.gifData)??gs,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}var nf=2,sf=1,rf=12,af=1,sn=class{constructor(e){this.validTypes=["image","images"],this.loadImageShape=async i=>{if(!this._engine.loadImage)throw new Error(`${j} image shape not initialized`);await this._engine.loadImage({gif:i.gif,name:i.name,replaceColor:i.replaceColor??!1,src:i.src})},this._engine=e}addImage(e){this._engine.images||(this._engine.images=[]),this._engine.images.push(e)}draw(e){let{context:i,radius:o,particle:n,opacity:s}=e,r=n.image,a=r?.element;if(r){if(i.globalAlpha=s,r.gif&&r.gifData)qa(e);else if(a){let c=r.ratio,l={x:-o,y:-o},f=o*nf;i.drawImage(a,l.x,l.y,f,f/c)}i.globalAlpha=sf}}getSidesCount(){return rf}async init(e){let i=e.actualOptions;if(!(!i.preload||!this._engine.loadImage))for(let o of i.preload)await this._engine.loadImage(o)}loadShape(e){if(e.shape!=="image"&&e.shape!=="images")return;this._engine.images||(this._engine.images=[]);let i=e.shapeData;if(!i)return;this._engine.images.find(n=>n.name===i.name||n.source===i.src)||this.loadImageShape(i).then(()=>{this.loadShape(e)})}particleInit(e,i){if(i.shape!=="image"&&i.shape!=="images")return;this._engine.images||(this._engine.images=[]);let o=this._engine.images,n=i.shapeData;if(!n)return;let s=i.getFillColor(),r=o.find(c=>c.name===n.name||c.source===n.src);if(!r)return;let a=n.replaceColor??r.replaceColor;if(r.loading){setTimeout(()=>{this.particleInit(e,i)});return}(async()=>{let c;r.svgData&&s?c=await La(r,n,s,i):c={color:s,data:r,element:r.element,gif:r.gif,gifData:r.gifData,gifLoopCount:r.gifLoopCount,loaded:!0,ratio:n.width&&n.height?n.width/n.height:r.ratio??af,replaceColor:a,source:n.src},c.ratio||(c.ratio=1);let l=n.fill??i.shapeFill,f=n.close??i.shapeClose,u={image:c,fill:l,close:f};i.image=u.image,i.shapeFill=u.fill,i.shapeClose=u.close})()}};var rn=class{constructor(){this.src="",this.gif=!1}load(e){d(e)||(e.gif!==void 0&&(this.gif=e.gif),e.height!==void 0&&(this.height=e.height),e.name!==void 0&&(this.name=e.name),e.replaceColor!==void 0&&(this.replaceColor=e.replaceColor),e.src!==void 0&&(this.src=e.src),e.width!==void 0&&(this.width=e.width))}};var an=class{constructor(e){this.id="imagePreloader",this._engine=e}async getPlugin(){return await Promise.resolve(),{}}loadOptions(e,i){if(!i?.preload)return;e.preload||(e.preload=[]);let o=e.preload;for(let n of i.preload){let s=o.find(r=>r.name===n.name||r.src===n.src);if(s)s.load(n);else{let r=new rn;r.load(n),o.push(r)}}}needsPlugin(){return!0}};var cf=3;function lf(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${j} no image source provided`);if(t.images||(t.images=[]),!t.images.find(i=>i.name===e.name||i.source===e.src))try{let i={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-cf),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};t.images.push(i);let o;e.gif?o=Na:o=e.replaceColor?Fa:wt,await o(i)}catch{throw new Error(`${j} ${e.name??e.src} not found`)}})}async function Ha(t,e=!0){t.checkVersion("3.8.1"),lf(t);let i=new an(t);await t.addPlugin(i,e),await t.addShape(new sn(t),e)}var cn=class extends ie{constructor(){super(),this.sync=!1}load(e){d(e)||(super.load(e),e.sync!==void 0&&(this.sync=e.sync))}};var ln=class extends ie{constructor(){super(),this.sync=!1}load(e){d(e)||(super.load(e),e.sync!==void 0&&(this.sync=e.sync))}};var fn=class{constructor(){this.count=0,this.delay=new cn,this.duration=new ln}load(e){d(e)||(e.count!==void 0&&(this.count=e.count),this.delay.load(e.delay),this.duration.load(e.duration))}};var _t=0,ff=-1,Ua=0,Wa=0;function ja(t,e,i){if(!t.life)return;let o=t.life,n=!1;if(t.spawning)if(o.delayTime+=e.value,o.delayTime>=t.life.delay)n=!0,t.spawning=!1,o.delayTime=_t,o.time=_t;else return;if(o.duration===ff||t.spawning||(n?o.time=_t:o.time+=e.value,o.time<o.duration))return;if(o.time=_t,t.life.count>Ua&&t.life.count--,t.life.count===Ua){t.destroy();return}let s=_(Wa,i.width),r=_(Wa,i.width);t.position.x=Y(s),t.position.y=Y(r),t.spawning=!0,o.delayTime=_t,o.time=_t,t.reset();let a=t.options.life;a&&(o.delay=y(a.delay.value)*1e3,o.duration=y(a.duration.value)*1e3)}var et=0,$a=1,Ga=-1,un=class{constructor(e){this.container=e}init(e){let i=this.container,o=e.options,n=o.life;n&&(e.life={delay:i.retina.reduceFactor?y(n.delay.value)*(n.delay.sync?$a:M())/i.retina.reduceFactor*1e3:et,delayTime:et,duration:i.retina.reduceFactor?y(n.duration.value)*(n.duration.sync?$a:M())/i.retina.reduceFactor*1e3:et,time:et,count:n.count},e.life.duration<=et&&(e.life.duration=Ga),e.life.count<=et&&(e.life.count=Ga),e.life&&(e.spawning=e.life.delay>et))}isEnabled(e){return!e.destroyed}loadOptions(e,...i){e.life||(e.life=new fn);for(let o of i)e.life.load(o?.life)}update(e,i){!this.isEnabled(e)||!e.life||ja(e,i,this.container.canvas.size)}};async function Qa(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("life",async i=>Promise.resolve(new un(i)),e)}function Ya(t){let{context:e,particle:i,radius:o}=t,n=i.shapeData,s=0;e.moveTo(-o,s),e.lineTo(o,s),e.lineCap=n?.cap??"butt"}var uf=1,hn=class{constructor(){this.validTypes=["line"]}draw(e){Ya(e)}getSidesCount(){return uf}};async function Xa(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new hn,e)}var Za=.5,dn=class{init(){}isEnabled(e){return!be()&&!e.destroyed&&e.container.actualOptions.interactivity.events.onHover.parallax.enable}move(e){let i=e.container,o=i.actualOptions,n=o.interactivity.events.onHover.parallax;if(be()||!n.enable)return;let s=n.force,r=i.interactivity.mouse.position;if(!r)return;let a=i.canvas.size,c={x:a.width*Za,y:a.height*Za},l=n.smooth,f=e.getRadius()/s,u={x:(r.x-c.x)*f,y:(r.y-c.y)*f},{offset:h}=e;h.x+=(u.x-h.x)/l,h.y+=(u.y-h.y)/l}};async function Ka(t,e=!0){t.checkVersion("3.8.1"),await t.addMover("parallax",()=>Promise.resolve(new dn),e)}var Ja=1e3,hf=1,pn=class extends He{constructor(e){super(e)}clear(){}init(){}interact(e){let i=this.container;e.attractDistance===void 0&&(e.attractDistance=y(e.options.move.attract.distance)*i.retina.pixelRatio);let o=e.attractDistance,n=e.getPosition(),s=i.particles.quadTree.queryCircle(n,o);for(let r of s){if(e===r||!r.options.move.attract.enable||r.destroyed||r.spawning)continue;let a=r.getPosition(),{dx:c,dy:l}=T(n,a),f=e.options.move.attract.rotate,u=c/(f.x*Ja),h=l/(f.y*Ja),p=r.size.value/e.size.value,m=hf/p;e.velocity.x-=u*p,e.velocity.y-=h*p,r.velocity.x+=u*m,r.velocity.y+=h*m}}isEnabled(e){return e.options.move.attract.enable}reset(){}};async function ec(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("particlesAttract",i=>Promise.resolve(new pn(i)),e)}var df=.5,pf=10,mf=0;function tc(t,e,i,o,n,s){let r=U(t.options.collisions.absorb.speed*n.factor/pf,mf,o);t.size.value+=r*df,i.size.value-=r,o<=s&&(i.size.value=0,i.destroy())}function ic(t,e,i,o){let n=t.getRadius(),s=e.getRadius();n===void 0&&s!==void 0?t.destroy():n!==void 0&&s===void 0?e.destroy():n!==void 0&&s!==void 0&&(n>=s?tc(t,n,e,s,i,o):tc(e,s,t,n,i,o))}var oc=t=>{t.collisionMaxSpeed===void 0&&(t.collisionMaxSpeed=y(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function mn(t,e){oi(Tt(t),Tt(e)),oc(t),oc(e)}function nc(t,e){!t.unbreakable&&!e.unbreakable&&mn(t,e),t.getRadius()===void 0&&e.getRadius()!==void 0?t.destroy():t.getRadius()!==void 0&&e.getRadius()===void 0?e.destroy():t.getRadius()!==void 0&&e.getRadius()!==void 0&&(t.getRadius()>=e.getRadius()?e:t).destroy()}function sc(t,e,i,o){switch(t.options.collisions.mode){case Ne.absorb:{ic(t,e,i,o);break}case Ne.bounce:{mn(t,e);break}case Ne.destroy:{nc(t,e);break}}}var xf=2,xn=class extends He{constructor(e){super(e)}clear(){}init(){}interact(e,i){if(e.destroyed||e.spawning)return;let o=this.container,n=e.getPosition(),s=e.getRadius(),r=o.particles.quadTree.queryCircle(n,s*xf);for(let a of r){if(e===a||!a.options.collisions.enable||e.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;let c=a.getPosition(),l=a.getRadius();if(Math.abs(Math.round(n.z)-Math.round(c.z))>s+l)continue;let f=F(n,c),u=s+l;f>u||sc(e,a,i,o.retina.pixelRatio)}}isEnabled(e){return e.options.collisions.enable}reset(){}};async function rc(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("particlesCollisions",i=>Promise.resolve(new xn(i)),e)}var ys=2,gn=class extends A{constructor(e,i,o,n){super(e,i,o),this.canvasSize=n,this.canvasSize={...n}}contains(e){let{width:i,height:o}=this.canvasSize,{x:n,y:s}=e;return super.contains(e)||super.contains({x:n-i,y:s})||super.contains({x:n-i,y:s-o})||super.contains({x:n,y:s-o})}intersects(e){if(super.intersects(e))return!0;let i=e,o=e,n={x:e.position.x-this.canvasSize.width,y:e.position.y-this.canvasSize.height};if(o.radius!==void 0){let s=new A(n.x,n.y,o.radius*ys);return super.intersects(s)}else if(i.size!==void 0){let s=new X(n.x,n.y,i.size.width*ys,i.size.height*ys);return super.intersects(s)}return!1}};var yn=class{constructor(){this.blur=5,this.color=new z,this.color.value="#000",this.enable=!1}load(e){d(e)||(e.blur!==void 0&&(this.blur=e.blur),this.color=z.create(this.color,e.color),e.enable!==void 0&&(this.enable=e.enable))}};var vn=class{constructor(){this.enable=!1,this.frequency=1}load(e){d(e)||(e.color!==void 0&&(this.color=z.create(this.color,e.color)),e.enable!==void 0&&(this.enable=e.enable),e.frequency!==void 0&&(this.frequency=e.frequency),e.opacity!==void 0&&(this.opacity=e.opacity))}};var bn=class{constructor(){this.blink=!1,this.color=new z,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new yn,this.triangles=new vn,this.width=1,this.warp=!1}load(e){d(e)||(e.id!==void 0&&(this.id=e.id),e.blink!==void 0&&(this.blink=e.blink),this.color=z.create(this.color,e.color),e.consent!==void 0&&(this.consent=e.consent),e.distance!==void 0&&(this.distance=e.distance),e.enable!==void 0&&(this.enable=e.enable),e.frequency!==void 0&&(this.frequency=e.frequency),e.opacity!==void 0&&(this.opacity=e.opacity),this.shadow.load(e.shadow),this.triangles.load(e.triangles),e.width!==void 0&&(this.width=e.width),e.warp!==void 0&&(this.warp=e.warp))}};var ac=2,gf=1,wn={x:0,y:0},yf=0;function vf(t,e,i,o,n){let{dx:s,dy:r,distance:a}=T(t,e);if(!n||a<=i)return a;let c={x:Math.abs(s),y:Math.abs(r)},l={x:Math.min(c.x,o.width-c.x),y:Math.min(c.y,o.height-c.y)};return Math.sqrt(l.x**ac+l.y**ac)}var _n=class extends He{constructor(e,i){super(e),this._setColor=o=>{if(!o.options.links)return;let n=this._linkContainer,s=o.options.links,r=s.id===void 0?n.particles.linksColor:n.particles.linksColors.get(s.id);if(r)return;let a=s.color;r=ai(this._engine,a,s.blink,s.consent),s.id===void 0?n.particles.linksColor=r:n.particles.linksColors.set(s.id,r)},this._linkContainer=e,this._engine=i}clear(){}init(){this._linkContainer.particles.linksColor=void 0,this._linkContainer.particles.linksColors=new Map}interact(e){if(!e.options.links)return;e.links=[];let i=e.getPosition(),o=this.container,n=o.canvas.size;if(i.x<wn.x||i.y<wn.y||i.x>n.width||i.y>n.height)return;let s=e.options.links,r=s.opacity,a=e.retina.linksDistance??yf,c=s.warp,l;c?l=new gn(i.x,i.y,a,n):l=new A(i.x,i.y,a);let f=o.particles.quadTree.query(l);for(let u of f){let h=u.options.links;if(e===u||!h?.enable||s.id!==h.id||u.spawning||u.destroyed||!u.links||e.links.some(x=>x.destination===u)||u.links.some(x=>x.destination===e))continue;let p=u.getPosition();if(p.x<wn.x||p.y<wn.y||p.x>n.width||p.y>n.height)continue;let m=vf(i,p,a,n,c&&h.warp);if(m>a)continue;let g=(gf-m/a)*r;this._setColor(e),e.links.push({destination:u,opacity:g})}}isEnabled(e){return!!e.options.links?.enable}loadParticlesOptions(e,...i){e.links||(e.links=new bn);for(let o of i)e.links.load(o?.links)}reset(){}};async function cc(t,e=!0){await t.addInteractor("particlesLinks",async i=>Promise.resolve(new _n(i,t)),e)}function bf(t,e,i,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(o.x,o.y),t.closePath()}function lc(t){let e=!1,{begin:i,end:o,engine:n,maxDistance:s,context:r,canvasSize:a,width:c,backgroundMask:l,colorLine:f,opacity:u,links:h}=t;if(F(i,o)<=s)Ve(r,i,o),e=!0;else if(h.warp){let m,g,x={x:o.x-a.width,y:o.y},b=T(i,x);if(b.distance<=s){let v=i.y-b.dy/b.dx*i.x;m={x:0,y:v},g={x:a.width,y:v}}else{let v={x:o.x,y:o.y-a.height},k=T(i,v);if(k.distance<=s){let P=-(i.y-k.dy/k.dx*i.x)/(k.dy/k.dx);m={x:P,y:0},g={x:P,y:a.height}}else{let w={x:o.x-a.width,y:o.y-a.height},P=T(i,w);if(P.distance<=s){let V=i.y-P.dy/P.dx*i.x;m={x:-V/(P.dy/P.dx),y:V},g={x:m.x+a.width,y:m.y+a.height}}}}m&&g&&(Ve(r,i,m),Ve(r,o,g),e=!0)}if(!e)return;r.lineWidth=c,l.enable&&(r.globalCompositeOperation=l.composite),r.strokeStyle=oe(f,u);let{shadow:p}=h;if(p.enable){let m=te(n,p.color);m&&(r.shadowBlur=p.blur,r.shadowColor=oe(m))}r.stroke()}function fc(t){let{context:e,pos1:i,pos2:o,pos3:n,backgroundMask:s,colorTriangle:r,opacityTriangle:a}=t;bf(e,i,o,n),s.enable&&(e.globalCompositeOperation=s.composite),e.fillStyle=oe(r,a),e.fill()}function wf(t){return t.sort((e,i)=>e-i),t.join("_")}function vs(t,e){let i=wf(t.map(n=>n.id)),o=e.get(i);return o===void 0&&(o=M(),e.set(i,o)),o}var uc=0,bs=0,hc=0,_f=.5,kf=1,kn=class{constructor(e,i){this._drawLinkLine=(o,n)=>{let s=o.options.links;if(!s?.enable)return;let r=this._container,a=r.actualOptions,c=n.destination,l=o.getPosition(),f=c.getPosition(),u=n.opacity;r.canvas.draw(h=>{let p,m=o.options.twinkle?.lines;if(m?.enable){let v=m.frequency,k=te(this._engine,m.color);M()<v&&k&&(p=k,u=y(m.opacity))}if(!p){let v=s.id!==void 0?r.particles.linksColors.get(s.id):r.particles.linksColor;p=Ft(o,c,v)}if(!p)return;let g=o.retina.linksWidth??bs,x=o.retina.linksDistance??hc,{backgroundMask:b}=a;lc({context:h,width:g,begin:l,end:f,engine:this._engine,maxDistance:x,canvasSize:r.canvas.size,links:s,backgroundMask:b,colorLine:p,opacity:u})})},this._drawLinkTriangle=(o,n,s)=>{let r=o.options.links;if(!r?.enable)return;let a=r.triangles;if(!a.enable)return;let c=this._container,l=c.actualOptions,f=n.destination,u=s.destination,h=a.opacity??(n.opacity+s.opacity)*_f;h<=uc||c.canvas.draw(p=>{let m=o.getPosition(),g=f.getPosition(),x=u.getPosition(),b=o.retina.linksDistance??hc;if(F(m,g)>b||F(x,g)>b||F(x,m)>b)return;let v=te(this._engine,a.color);if(!v){let k=r.id!==void 0?c.particles.linksColors.get(r.id):c.particles.linksColor;v=Ft(o,f,k)}v&&fc({context:p,pos1:m,pos2:g,pos3:x,backgroundMask:l.backgroundMask,colorTriangle:v,opacityTriangle:h})})},this._drawTriangles=(o,n,s,r)=>{let a=s.destination;if(!(o.links?.triangles.enable&&a.options.links?.triangles.enable))return;let c=a.links?.filter(l=>{let f=this._getLinkFrequency(a,l.destination);return a.options.links&&f<=a.options.links.frequency&&r.findIndex(h=>h.destination===l.destination)>=0});if(c?.length)for(let l of c){let f=l.destination;this._getTriangleFrequency(n,a,f)>o.links.triangles.frequency||this._drawLinkTriangle(n,s,l)}},this._getLinkFrequency=(o,n)=>vs([o,n],this._freqs.links),this._getTriangleFrequency=(o,n,s)=>vs([o,n,s],this._freqs.triangles),this._container=e,this._engine=i,this._freqs={links:new Map,triangles:new Map}}drawParticle(e,i){let{links:o,options:n}=i;if(!o?.length)return;let s=o.filter(r=>n.links&&(n.links.frequency>=kf||this._getLinkFrequency(i,r.destination)<=n.links.frequency));for(let r of s)this._drawTriangles(n,i,r,s),r.opacity>uc&&(i.retina.linksWidth??bs)>bs&&this._drawLinkLine(i,r)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(e){if(e.links=[],!e.options.links)return;let i=this._container.retina.pixelRatio,{retina:o}=e,{distance:n,width:s}=e.options.links;o.linksDistance=n*i,o.linksWidth=s*i}particleDestroyed(e){e.links=[]}};var Cn=class{constructor(e){this.id="links",this._engine=e}getPlugin(e){return Promise.resolve(new kn(e,this._engine))}loadOptions(){}needsPlugin(){return!0}};async function dc(t,e=!0){let i=new Cn(t);await t.addPlugin(i,e)}async function pc(t,e=!0){t.checkVersion("3.8.1"),await cc(t,e),await dc(t,e)}var Cf=180,Mn={x:0,y:0},Mf=2;function mc(t,e,i){let{context:o}=t,n=i.count.numerator*i.count.denominator,s=i.count.numerator/i.count.denominator,r=Cf*(s-Mf)/s,a=Math.PI-ue(r);if(o){o.beginPath(),o.translate(e.x,e.y),o.moveTo(Mn.x,Mn.y);for(let c=0;c<n;c++)o.lineTo(i.length,Mn.y),o.translate(i.length,Mn.y),o.rotate(a)}}var Pf=5,kt=class{draw(e){let{particle:i,radius:o}=e,n=this.getCenter(i,o),s=this.getSidesData(i,o);mc(e,n,s)}getSidesCount(e){let i=e.shapeData;return Math.round(y(i?.sides??Pf))}};var xc=3.5,gc=2.66,Of=3,Pn=class extends kt{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(e,i){return{x:-i/(e.sides/xc),y:-i/(gc/xc)}}getSidesData(e,i){let o=e.sides;return{count:{denominator:1,numerator:o},length:i*gc/(o/Of)}}};var Rf=1.66,Sf=3,zf=2,On=class extends kt{constructor(){super(...arguments),this.validTypes=["triangle"]}getCenter(e,i){return{x:-i,y:i/Rf}}getSidesCount(){return Sf}getSidesData(e,i){let o=i*zf;return{count:{denominator:2,numerator:3},length:o}}};async function Df(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Pn,e)}async function If(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new On,e)}async function yc(t,e=!0){t.checkVersion("3.8.1"),await Df(t,e),await If(t,e)}var Rn=class{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){d(e)||(e.enable!==void 0&&(this.enable=e.enable),e.speed!==void 0&&(this.speed=_(e.speed)),e.decay!==void 0&&(this.decay=_(e.decay)),e.sync!==void 0&&(this.sync=e.sync))}};var Sn=class extends ie{constructor(){super(),this.animation=new Rn,this.direction=se.clockwise,this.path=!1,this.value=0}load(e){d(e)||(super.load(e),e.direction!==void 0&&(this.direction=e.direction),this.animation.load(e.animation),e.path!==void 0&&(this.path=e.path))}};var vc=2,Tf=Math.PI*vc,Ef=1,Ff=360,zn=class{constructor(e){this.container=e}init(e){let i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:ue(y(i.value)),min:0,max:Tf},e.pathRotation=i.path;let o=i.direction;switch(o===se.random&&(o=Math.floor(M()*vc)>0?se.counterClockwise:se.clockwise),o){case se.counterClockwise:case"counterClockwise":e.rotate.status=L.decreasing;break;case se.clockwise:e.rotate.status=L.increasing;break}let n=i.animation;n.enable&&(e.rotate.decay=Ef-y(n.decay),e.rotate.velocity=y(n.speed)/Ff*this.container.retina.reduceFactor,n.sync||(e.rotate.velocity*=M())),e.rotation=e.rotate.value}isEnabled(e){let i=e.options.rotate;return i?!e.destroyed&&!e.spawning&&(!!i.value||i.animation.enable||i.path):!1}loadOptions(e,...i){e.rotate||(e.rotate=new Sn);for(let o of i)e.rotate.load(o?.rotate)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(ft(e,e.rotate,!1,xe.none,i),e.rotation=e.rotate.value))}};async function bc(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("rotate",i=>Promise.resolve(new zn(i)),e)}var Lf=Math.sqrt(2),Af=2;function wc(t){let{context:e,radius:i}=t,o=i/Lf,n=o*Af;e.rect(-o,-o,n,n)}var Vf=4,Dn=class{constructor(){this.validTypes=["edge","square"]}draw(e){wc(e)}getSidesCount(){return Vf}};async function _c(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Dn,e)}var Ct={x:0,y:0};function kc(t){let{context:e,particle:i,radius:o}=t,n=i.sides,s=i.starInset??2;e.moveTo(Ct.x,Ct.y-o);for(let r=0;r<n;r++)e.rotate(Math.PI/n),e.lineTo(Ct.x,Ct.y-o*s),e.rotate(Math.PI/n),e.lineTo(Ct.x,Ct.y-o)}var Bf=2,qf=5,In=class{constructor(){this.validTypes=["star"]}draw(e){kc(e)}getSidesCount(e){let i=e.shapeData;return Math.round(y(i?.sides??qf))}particleInit(e,i){let o=i.shapeData;i.starInset=y(o?.inset??Bf)}};async function Cc(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new In,e)}var Nf=1,Tn=class{constructor(e,i){this._container=e,this._engine=i}init(e){let i=this._container,o=e.options,n=K(o.stroke,e.id,o.reduceDuplicates);e.strokeWidth=y(n.width)*i.retina.pixelRatio,e.strokeOpacity=y(n.opacity??Nf),e.strokeAnimation=n.color?.animation;let s=Se(this._engine,n.color)??e.getFillColor();s&&(e.strokeColor=ci(s,e.strokeAnimation,i.retina.reduceFactor))}isEnabled(e){let i=e.strokeAnimation,{strokeColor:o}=e;return!e.destroyed&&!e.spawning&&!!i&&(o?.h.value!==void 0&&o.h.enable||o?.s.value!==void 0&&o.s.enable||o?.l.value!==void 0&&o.l.enable)}update(e,i){this.isEnabled(e)&&li(e.strokeColor,i)}};async function Mc(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("strokeColor",i=>Promise.resolve(new Tn(i,t)),e)}async function Hf(t,e=!0){t.checkVersion("3.8.1"),await Ka(t,!1),await da(t,!1),await va(t,!1),await _a(t,!1),await Oa(t,!1),await Sa(t,!1),await za(t,!1),await Da(t,!1),await Ia(t,!1),await Ta(t,!1),await Ea(t,!1),await ec(t,!1),await rc(t,!1),await pc(t,!1),await sa(t,!1),await ca(t,!1),await Ha(t,!1),await Xa(t,!1),await yc(t,!1),await _c(t,!1),await Cc(t,!1),await Qa(t,!1),await bc(t,!1),await Mc(t,!1),await na(t,e)}export{Lr as a,Hf as b};
2
+ //# sourceMappingURL=chunk-EZH65B2P.js.map