@novely/particles 0.8.0 → 0.8.1

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 CHANGED
@@ -1,2 +1,2 @@
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};
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,zIndex:2},t),jc=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{instance:h}=o();h&&(h.destroy(),o({}))});let l=o(),c=l.options===t,f=!!l.instance;if(c&&f||c&&s)return;(async()=>{let h=await Gi.load({element:a,options:$c(t)});o({instance:h,options:t})})()};return e.callOnlyLatest=e.skipClearOnGoingBack=!0,e.id=Pa,e.key="particles",e},Gc=()=>{let t=({data:e,remove:i,flags:{preview:o}})=>{if(o)return;let{instance:n}=e();n&&n.destroy(),i()};return t.callOnlyLatest=!0,t.id=Pa,t.key="particles",t};export{Gc as hideParticles,jc as showParticles};
2
2
  //# sourceMappingURL=index.js.map