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